linux/arch/arm/common
Dave Martin 0577fee283 ARM: bL_switcher: Add switch completion callback for bL_switch_request()
There is no explicit way to know when a switch started via
bL_switch_request() is complete.  This can lead to unpredictable
behaviour when the switcher is controlled by a subsystem which
makes dynamic decisions (such as cpufreq).

The CPU PM notifier is not really suitable for signalling
completion, because the CPU could get suspended and resumed for
other, independent reasons while a switch request is in flight.
Adding a whole new notifier for this seems excessive, and may tempt
people to put heavyweight code on this path.

This patch implements a new bL_switch_request_cb() function that
allows for a per-request lightweight callback, private between the
switcher and the caller of bL_switch_request_cb().

Overlapping switches on a single CPU are considered incorrect if
they are requested via bL_switch_request_cb() with a callback (they
will lead to an unpredictable final state without explicit external
synchronisation to force the requests into a particular order).
Queuing requests robustly would be overkill because only one
subsystem should be attempting to control the switcher at any time.

Overlapping requests of this kind will be failed with -EBUSY to
indicate that the second request won't take effect and the
completer will never be called for it.

bL_switch_request() is retained as a wrapper round the new function,
with the old, fire-and-forget semantics.  In this case the last request
will always win. The request may still be denied if a previous request
with a completer is still pending.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
2013-09-23 18:39:19 -04:00
..
bL_switcher.c ARM: bL_switcher: Add switch completion callback for bL_switch_request() 2013-09-23 18:39:19 -04:00
bL_switcher_dummy_if.c ARM: bL_switcher: add a simple /dev user interface for debugging purposes 2013-08-05 00:13:00 -04:00
dmabounce.c ARM: dma-mapping: add support for dma_get_sgtable() 2012-07-30 12:25:47 +02:00
edma.c ARM: edma: Add function to manually trigger an EDMA channel 2013-09-04 18:38:46 +05:30
firmware.c ARM: Add interface for registering and calling firmware-specific operations 2013-04-09 01:52:06 +09:00
icst.c
it8152.c ARM: pxa: armcore: fix PCI PIO warnings 2012-10-09 21:58:01 +02:00
Kconfig ARM: davinci: move private EDMA API to arm/common 2013-06-18 10:52:03 +05:30
locomo.c
Makefile ARM: bL_switcher: add a simple /dev user interface for debugging purposes 2013-08-05 00:13:00 -04:00
mcpm_entry.c ARM: mcpm: introduce helpers for platform coherency exit/setup 2013-04-24 10:37:00 -04:00
mcpm_head.S ARM: mcpm: use -st dsb option prior to sev instructions 2013-08-12 12:25:45 +01:00
mcpm_platsmp.c arm: delete __cpuinit/__CPUINIT usage from all ARM users 2013-07-14 19:36:52 -04:00
sa1111.c ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
scoop.c ARM: drivers: remove __dev* attributes. 2013-01-03 15:57:04 -08:00
sharpsl_param.c
timer-sp.c ARM: timer-sp: Set dynamic irq affinity 2013-08-22 00:18:53 +02:00
via82c505.c ARM: PCI: provide a default bus scan implementation 2012-05-13 17:12:17 +01:00
vlock.h ARM: mcpm: Add baremetal voting mutexes 2013-04-24 10:37:01 -04:00
vlock.S ARM: mcpm: use -st dsb option prior to sev instructions 2013-08-12 12:25:45 +01:00