tmp_suning_uos_patched/drivers/base
Takashi Iwai 82fd7a8142 firmware: Add support for loading compressed files
This patch adds the support for loading compressed firmware files.
The primary motivation is to reduce the storage size; e.g. currently
the files in /lib/firmware on my machine counts up to 419MB, while
they can be reduced to 130MB by file compression.

The patch introduces a new kconfig option CONFIG_FW_LOADER_COMPRESS.
Even with this option set, the firmware loader still tries to load the
original firmware file as-is at first, but then falls back to the file
with ".xz" extension when it's not found, and the decompressed file
content is returned to the caller of request_firmware().  So, no
change is needed for the rest.

Currently only XZ format is supported.  A caveat is that the kernel XZ
helper code supports only CRC32 (or none) integrity check type, so
you'll have to compress the files via xz -C crc32 option.

Since we can't determine the expanded size immediately from an XZ
file, the patch re-uses the paged buffer that was used for the
user-mode fallback; it puts the decompressed content page, which are
vmapped at the end.  The paged buffer code is conditionally built with
a new Kconfig that is selected automatically.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-18 09:11:22 +02:00
..
firmware_loader firmware: Add support for loading compressed files 2019-06-18 09:11:22 +02:00
power More power management updates for 5.2-rc1 2019-05-15 08:46:44 -07:00
regmap Merge branch 'regmap-5.2' into regmap-next 2019-04-25 20:27:04 +01:00
test drivers: base: test: add proper SPDX identifier to Makefile 2019-04-04 20:03:40 +02:00
arch_topology.c arch_topology: Make cpu_capacity sysfs node as read-only 2019-04-04 18:41:21 +02:00
attribute_container.c
base.h
bus.c
cacheinfo.c
class.c
component.c drivers/component: kerneldoc polish 2019-02-19 13:20:35 +01:00
container.c
core.c driver core: Clarify which counterparts to use to device_add() 2019-04-25 19:34:54 +02:00
cpu.c Merge branch 'x86-mds-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-05-14 07:57:29 -07:00
dd.c driver core: Postpone DMA tear-down until after devres release for probe failure 2019-04-25 21:48:37 +02:00
devcon.c device connection: Find device connections also from device graphs 2019-02-14 10:52:25 +01:00
devcoredump.c
devres.c
devtmpfs.c
driver.c
firmware.c
hypervisor.c
init.c
isa.c
Kconfig Driver core/kobject patches for 5.2-rc1 2019-05-07 13:01:40 -07:00
Makefile
map.c
memory.c mm/memory_hotplug: make unregister_memory_section() never fail 2019-05-14 09:47:49 -07:00
module.c
node.c node: Add memory-side caching attributes 2019-04-04 18:41:21 +02:00
pinctrl.c
platform-msi.c
platform.c Revert "driver core: platform: Fix the usage of platform device name(pdev->name)" 2019-04-29 19:49:21 +02:00
property.c device property: Add fwnode_graph_get_endpoint_by_id() 2019-04-18 16:44:05 +02:00
soc.c
swnode.c drivers: base: swnode: Make two functions static 2019-03-19 16:37:56 +01:00
syscore.c treewide: Switch printk users from %pf and %pF to %ps and %pS, respectively 2019-04-09 14:19:06 +02:00
topology.c
transport_class.c