linux_dsm_epyc7002/arch/arm/plat-omap
Nishanth Menon 0eb4fd9b3e ARM: OMAP: clock: fix race in disable all clocks
clk_disable_unused is invoked when CONFIG_OMAP_RESET_CLOCKS=y.
Since clk_disable_unused is called as lateinitcall, there can
be more than a few workqueues executing off secondary CPU(s).
The current code does the following:
a) checks if clk is unused
b) holds lock
c) disables clk
d) unlocks

Between (a) and (b) being executed on CPU0, It is possible to
have a driver executing on CPU1 which could do a get_sync->clk_get
(and increase the use_count) of the clock which was just about
to be disabled by clk_disable_unused.

We ensure instead that the entire list traversal is protected by
the lock allowing for parent child clock traversal which could be
potentially be done by runtime operations to be safe as well.

Reported-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2012-04-04 09:23:34 -06:00
..
include/plat ARM: arm-soc fixes for 3.4-rc 2012-03-29 21:30:28 -07:00
clock.c ARM: OMAP: clock: fix race in disable all clocks 2012-04-04 09:23:34 -06:00
common.c Merge commit 'v3.3-rc6' 2012-03-06 13:20:31 +02:00
counter_32k.c ARM: OMAP: Remove plat/io.h by splitting it into mach/io.h and mach/hardware.h 2012-02-24 10:34:35 -08:00
debug-devices.c ARM: gpio: convert includes of mach/gpio.h and asm/gpio.h to linux/gpio.h 2011-08-08 14:27:41 +01:00
debug-leds.c Disintegrate asm/system.h for ARM 2012-03-28 18:30:01 +01:00
devices.c ARM: Add arm_memblock_steal() to allocate memory away from the kernel 2012-01-13 15:02:35 +00:00
dma.c Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
dmtimer.c ARM: global cleanups 2012-03-27 16:03:32 -07:00
fb.c ARM: OMAP2+: Fix compile error when FB_OMAP2 is not set 2012-03-09 09:53:21 +02:00
i2c.c ARM: OMAP: I2C: Fix omap_register_i2c_bus() return value on success 2011-11-04 17:41:07 -07:00
Kconfig ARM: device tree work 2012-03-27 16:47:35 -07:00
mailbox.c ARM: OMAP: mailbox: trivial whitespace fix 2012-03-05 16:11:03 -08:00
Makefile OMAP: mcbsp: Move core driver under sound/soc/omap 2012-03-12 13:34:19 +00:00
mux.c Disintegrate asm/system.h for ARM 2012-03-28 18:30:01 +01:00
ocpi.c [ARM] Convert asm/io.h to linux/io.h 2008-09-06 12:10:45 +01:00
omap_device.c ARM: device tree work 2012-03-27 16:47:35 -07:00
omap-pm-noop.c ARM: OMAP: omap_device: remove omap_device_parent 2012-03-05 15:38:02 -08:00
sram.c ARM: global cleanups 2012-03-27 16:03:32 -07:00
sram.h OMAP: plat-omap: Fix static function warnings 2010-10-08 10:12:38 -07:00
usb.c ARM: OMAP: Remove plat/io.h by splitting it into mach/io.h and mach/hardware.h 2012-02-24 10:34:35 -08:00