alistair23-linux/drivers/base
Daniel Wagner 5b02962494 firmware: do not use fw_lock for fw_state protection
fw_lock is to use to protect 'corner cases' inside firmware_class. It
is not exactly clear what those corner cases are nor what it exactly
protects. fw_state can be used without needing the fw_lock to protect
its state transition and wake ups.

fw_state is holds the state in status and the completion is used to
wake up all waiters (in this case that is the user land helper so only
one). This operation has to be 'atomic' to avoid races.  We can do this
by using swait which takes care we don't miss any wake up.

We use also swait instead of wait because don't need all the additional
features wait provides.

Note there some more cleanups possible after with this change. For
example for !CONFIG_FW_LOADER_USER_HELPER we don't check for the state
anymore.  Let's to this in the next patch instead mingling to many
changes into this one. And yes you get a gcc warning "‘__fw_state_check’
defined but not used [-Wunused-function] code." for the time beeing.

Cc: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
Acked-by: Luis R. Rodriguez <mcgrof@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-29 21:28:54 +01:00
..
power PM / runtime: Optimize the use of device links 2016-10-31 11:42:51 -06:00
regmap Merge remote-tracking branches 'regmap/topic/core' and 'regmap/topic/debugfs' into regmap-next 2016-10-04 05:17:12 +02:00
test driver-core: fix platform_no_drv_owner.cocci warnings 2016-11-29 20:58:31 +01:00
attribute_container.c attribute_container: Fix typo 2016-08-31 15:13:56 +02:00
base.h driver core: Add deferred_probe attribute to devices in sysfs 2016-11-10 17:22:23 +01:00
bus.c driver core: bus: use to_subsys_private and to_device_private_bus 2016-02-09 17:25:27 -08:00
cacheinfo.c drivers: base: cacheinfo: support DT overrides for cache properties 2016-11-10 17:30:53 +01:00
class.c driver core: class: add class_groups support 2016-11-29 21:12:12 +01:00
component.c Merge 4.5-rc4 into driver-core-next 2016-02-14 14:29:55 -08:00
container.c
core.c driver core: Add deferred_probe attribute to devices in sysfs 2016-11-10 17:22:23 +01:00
cpu.c cpu: clean up register_cpu func 2016-08-31 15:19:55 +02:00
dd.c driver core: Add deferred_probe attribute to devices in sysfs 2016-11-10 17:22:23 +01:00
devcoredump.c driver core: devcoredump: convert to use class_groups 2016-11-29 21:12:12 +01:00
devres.c
devtmpfs.c wrappers for ->i_mutex access 2016-01-22 18:04:28 -05:00
dma-coherent.c drivers: dma-coherent: Move spinlock in dma_alloc_from_coherent() 2016-09-28 17:53:16 +02:00
dma-contiguous.c
dma-mapping.c drivers/base dmam_declare_coherent_memory leaks 2016-08-31 15:19:55 +02:00
driver.c
firmware.c
firmware_class.c firmware: do not use fw_lock for fw_state protection 2016-11-29 21:28:54 +01:00
hypervisor.c
init.c
isa.c isa: Call isa_bus_init before dependent ISA bus drivers register 2016-06-17 20:47:11 -07:00
Kconfig driver-core: add test module for asynchronous probing 2016-11-10 17:28:16 +01:00
Makefile driver-core: add test module for asynchronous probing 2016-11-10 17:28:16 +01:00
map.c
memory.c drivers/base/memory.c: Remove unused 'first_page' variable 2016-11-29 20:58:31 +01:00
module.c base: make module_create_drivers_dir race-free 2016-06-15 19:21:31 -07:00
node.c treewide: replace obsolete _refok by __ref 2016-08-02 17:31:41 -04:00
pinctrl.c driver: base: pinctrl: return error from pinctrl_bind_pins() 2016-09-13 23:02:59 +02:00
platform-msi.c genirq/msi: Add cpumask allocation to alloc_msi_entry 2016-09-14 22:11:08 +02:00
platform.c driver-core: platform: Catch errors from calls to irq_get_irq_data 2016-09-27 12:30:37 +02:00
property.c device property: Add function to search for named child of device 2016-06-26 12:39:03 +01:00
soc.c base: soc: make it explicitly non-modular 2016-08-31 15:13:56 +02:00
syscore.c
topology.c topology/sysfs: provide drawer id and siblings attributes 2016-06-13 15:58:27 +02:00
transport_class.c