linux_dsm_epyc7002/arch/arm/mach-omap2
Grygorii Strashko 918af9f941 ARM: OMAP4+: SMP: use lockless clkdm/pwrdm api in omap4_boot_secondary
OMAP CPU hotplug uses cpu1's clocks and power domains for CPU1 wake up
from low power states (or turn on CPU1). This part of code is also
part of system suspend (disable_nonboot_cpus()).
>From other side, cpu1's clocks and power domains are used by CPUIdle. All above
functionality is mutually exclusive and, therefore, lockless clkdm/pwrdm api
can be used in omap4_boot_secondary().

This fixes below back-trace on -RT which is triggered by
pwrdm_lock/unlock():

BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:917
 in_atomic(): 1, irqs_disabled(): 0, pid: 118, name: sh
 9 locks held by sh/118:
  #0:  (sb_writers#4){.+.+.+}, at: [<c0144a6c>] vfs_write+0x13c/0x164
  #1:  (&of->mutex){+.+.+.}, at: [<c01b4c70>] kernfs_fop_write+0x48/0x19c
  #2:  (s_active#24){.+.+.+}, at: [<c01b4c78>] kernfs_fop_write+0x50/0x19c
  #3:  (device_hotplug_lock){+.+.+.}, at: [<c03cbff0>] lock_device_hotplug_sysfs+0xc/0x4c
  #4:  (&dev->mutex){......}, at: [<c03cd284>] device_online+0x14/0x88
  #5:  (cpu_add_remove_lock){+.+.+.}, at: [<c003af90>] cpu_up+0x50/0x1a0
  #6:  (cpu_hotplug.lock){++++++}, at: [<c003ae48>] cpu_hotplug_begin+0x0/0xc4
  #7:  (cpu_hotplug.lock#2){+.+.+.}, at: [<c003aec0>] cpu_hotplug_begin+0x78/0xc4
  #8:  (boot_lock){+.+...}, at: [<c002b254>] omap4_boot_secondary+0x1c/0x178
 Preemption disabled at:[<  (null)>]   (null)

 CPU: 0 PID: 118 Comm: sh Not tainted 4.1.12-rt11-01998-gb4a62c3-dirty #137
 Hardware name: Generic DRA74X (Flattened Device Tree)
 [<c0017574>] (unwind_backtrace) from [<c0013be8>] (show_stack+0x10/0x14)
 [<c0013be8>] (show_stack) from [<c05a8670>] (dump_stack+0x80/0x94)
 [<c05a8670>] (dump_stack) from [<c05ad158>] (rt_spin_lock+0x24/0x54)
 [<c05ad158>] (rt_spin_lock) from [<c0030dac>] (clkdm_wakeup+0x10/0x2c)
 [<c0030dac>] (clkdm_wakeup) from [<c002b2c0>] (omap4_boot_secondary+0x88/0x178)
 [<c002b2c0>] (omap4_boot_secondary) from [<c0015d00>] (__cpu_up+0xc4/0x164)
 [<c0015d00>] (__cpu_up) from [<c003b09c>] (cpu_up+0x15c/0x1a0)
 [<c003b09c>] (cpu_up) from [<c03cd2d4>] (device_online+0x64/0x88)
 [<c03cd2d4>] (device_online) from [<c03cd360>] (online_store+0x68/0x74)
 [<c03cd360>] (online_store) from [<c01b4ce0>] (kernfs_fop_write+0xb8/0x19c)
 [<c01b4ce0>] (kernfs_fop_write) from [<c0144124>] (__vfs_write+0x20/0xd8)
 [<c0144124>] (__vfs_write) from [<c01449c0>] (vfs_write+0x90/0x164)
 [<c01449c0>] (vfs_write) from [<c01451e4>] (SyS_write+0x44/0x9c)
 [<c01451e4>] (SyS_write) from [<c0010240>] (ret_fast_syscall+0x0/0x54)
 CPU1: smp_ops.cpu_die() returned, trying to resuscitate

Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2015-11-25 11:03:20 -08:00
..
include/mach ARM: omap2: restore OMAP4 barrier behaviour 2015-07-25 15:28:16 +01:00
am33xx-restart.c
am33xx.h
board-flash.c
board-flash.h
board-generic.c ARM: SoC cleanups for v4.4 2015-11-10 14:48:36 -08:00
board-ldp.c arm: omap2: timer: rename omap_sync32k_timer_init() 2015-10-16 11:06:23 -05:00
board-n8x0.c
board-rx51-peripherals.c
board-rx51-video.c
board-rx51.c arm: omap2: timer: rename omap_sync32k_timer_init() 2015-10-16 11:06:23 -05:00
board-rx51.h
clkt2xxx_dpll.c
clkt2xxx_dpllcore.c
clkt2xxx_virt_prcm_set.c
clock2xxx.h
clock3xxx.h
clock.c Merge branch 'cleanup-clk-h-includes' into clk-next 2015-07-28 11:59:09 -07:00
clock.h
clockdomain.c
clockdomain.h ARM: OMAP2+: Add minimal clockdomains for dm814x 2015-07-16 02:09:33 -07:00
clockdomains2xxx_3xxx_data.c
clockdomains3xxx_data.c
clockdomains7xx_data.c ARM: OMAP2+: DRA7: clockdomain: change l4per2_7xx_clkdm to SW_WKUP 2015-07-15 13:57:28 -06:00
clockdomains33xx_data.c
clockdomains43xx_data.c
clockdomains44xx_data.c
clockdomains54xx_data.c
clockdomains81xx_data.c ARM: OMAP2+: Add minimal clockdomains for dm814x 2015-07-16 02:09:33 -07:00
clockdomains2420_data.c
clockdomains2430_data.c
cm1_7xx.h
cm1_44xx.h
cm1_54xx.h
cm2_7xx.h
cm2_44xx.h
cm2_54xx.h
cm2xxx_3xxx.h
cm2xxx.c
cm2xxx.h
cm3xxx.c
cm3xxx.h
cm33xx.c
cm33xx.h
cm44xx.h
cm81xx.h
cm_common.c
cm-regbits-7xx.h
cm-regbits-24xx.h
cm-regbits-33xx.h
cm-regbits-34xx.h
cm-regbits-44xx.h
cm-regbits-54xx.h
cm.h
cminst44xx.c
common-board-devices.c
common-board-devices.h
common.c Revert "ARM: OMAP4: remove dead kconfig option OMAP4_ERRATA_I688" 2015-07-25 15:28:14 +01:00
common.h arm: omap2: timer: rename omap_sync32k_timer_init() 2015-10-16 11:06:23 -05:00
control.c ARM: OMAP2+: Fix scm compatible for dm814x 2015-07-16 02:09:10 -07:00
control.h
cpuidle34xx.c
cpuidle44xx.c
ctrl_module_wkup_44xx.h
devices.c ARM: OMAP2+: Remove legacy OMAP3 ISP instantiation 2015-10-12 10:04:39 -07:00
display.c
display.h
dma.c
drm.c
dss-common.c
dss-common.h
fb.c
gpio.c
gpmc-nand.c
gpmc-onenand.c
gpmc-smsc911x.c
gpmc-smsc911x.h
gpmc.h
hdq1w.c
hdq1w.h
hsmmc.c
hsmmc.h
i2c.c
i2c.h
id.c ARM: OMAP: Change all cpu_is_* occurences to soc_is_* for id.c 2015-10-16 10:27:03 -07:00
id.h
io.c ARM: OMAP2+: AM43XX: Enable autoidle for clks in am43xx_init_late 2015-09-16 17:01:39 -07:00
iomap.h ARM: DRA7: Provide proper IO map table 2015-07-16 00:06:05 -07:00
Kconfig ARM: SoC cleanups for v4.4 2015-11-10 14:48:36 -08:00
l3_2xxx.h
l3_3xxx.h
l4_2xxx.h
l4_3xxx.h
Makefile ARM: OMAP3: clock: remove un-used core dpll re-program code 2015-10-14 12:35:27 -07:00
Makefile.boot
mcbsp.c
mmc.h
msdi.c
mux34xx.c
mux34xx.h
mux.c
mux.h
omap2-restart.c
omap3-restart.c ARM: OMAP2+: sparse: add missing function declarations 2015-07-15 23:43:41 -06:00
omap4-common.c ARM: omap2: restore OMAP4 barrier behaviour 2015-07-25 15:28:16 +01:00
omap4-restart.c ARM: OMAP2+: sparse: add missing function declarations 2015-07-15 23:43:41 -06:00
omap4-sar-layout.h
omap24xx.h
omap34xx.h
omap44xx.h
omap54xx.h ARM: DRA7: Provide proper IO map table 2015-07-16 00:06:05 -07:00
omap_device.c ARM: OMAP2+: omap-device: fix race deferred probe of omap_hsmmc vs omap_device_late_init 2015-09-01 13:59:24 -07:00
omap_device.h
omap_hwmod_2xxx_3xxx_interconnect_data.c
omap_hwmod_2xxx_3xxx_ipblock_data.c
omap_hwmod_2xxx_interconnect_data.c
omap_hwmod_2xxx_ipblock_data.c ARM: OMAP2+: sparse: add missing static declaration 2015-07-15 23:42:12 -06:00
omap_hwmod_3xxx_data.c ARM: OMAP3: hwmod data: Remove legacy mailbox data and addrs 2015-10-23 13:01:25 -06:00
omap_hwmod_7xx_data.c ARM: OMAP: DRA7: hwmod: Add data for McASP3 2015-11-12 09:57:44 -08:00
omap_hwmod_33xx_43xx_common_data.h
omap_hwmod_33xx_43xx_interconnect_data.c ARM: DRA7/AM335x/AM437x: hwmod: Remove gpmc address space from hwmod data 2015-10-23 13:01:24 -06:00
omap_hwmod_33xx_43xx_ipblock_data.c
omap_hwmod_33xx_data.c
omap_hwmod_43xx_data.c ARM: OMAP2+: sparse: add missing static declaration 2015-07-15 23:42:12 -06:00
omap_hwmod_44xx_data.c ARM: OMAP4: hwmod data: Remove spinlock hwmod addrs 2015-10-23 13:01:24 -06:00
omap_hwmod_54xx_data.c ARM: OMAP: Remove duplicated operand in OR operation 2015-10-20 01:29:40 -06:00
omap_hwmod_81xx_data.c arm: omap2+: add missing HWMOD_NO_IDLEST in 81xx hwmod data 2015-11-25 10:54:22 -08:00
omap_hwmod_2420_data.c
omap_hwmod_2430_data.c
omap_hwmod_common_data.c
omap_hwmod_common_data.h
omap_hwmod_common_ipblock_data.c
omap_hwmod_reset.c
omap_hwmod.c ARM: OMAP2+: hwmod: Add hwmod flag for HWMOD_OPT_CLKS_NEEDED 2015-11-12 09:57:44 -08:00
omap_hwmod.h ARM: OMAP2+: hwmod: Add hwmod flag for HWMOD_OPT_CLKS_NEEDED 2015-11-12 09:57:44 -08:00
omap_opp_data.h
omap_phy_internal.c
omap_twl.c
omap-headsmp.S
omap-hotplug.c ARM: Remove __ref on hotplug cpu die path 2015-10-22 09:55:03 -07:00
omap-iommu.c ARM: OMAP2+: Remove module references from IOMMU machine layer 2015-07-16 00:14:50 -07:00
omap-mpuss-lowpower.c ARM: OMAP2+: sparse: add missing static declaration 2015-07-15 23:42:12 -06:00
omap-pm-noop.c
omap-pm.h
omap-secure.c
omap-secure.h ARM: omap2: restore OMAP4 barrier behaviour 2015-07-25 15:28:16 +01:00
omap-smc.S
omap-smp.c ARM: OMAP4+: SMP: use lockless clkdm/pwrdm api in omap4_boot_secondary 2015-11-25 11:03:20 -08:00
omap-wakeupgen.c ARM: SoC cleanups for v4.4 2015-11-10 14:48:36 -08:00
omap-wakeupgen.h
opp2xxx.h
opp3xxx_data.c
opp4xxx_data.c
opp2420_data.c
opp2430_data.c
opp.c
pdata-quirks.c ARM: OMAP2+: remove custom abort handler for t410 2015-11-12 10:02:05 -08:00
pm24xx.c ARM: OMAP2+: Include clk.h 2015-07-20 10:52:36 -07:00
pm34xx.c ARM: OMAP2+: PM: Denote the cpuidle tracepoints as _rcuidle() 2015-10-12 16:09:57 -07:00
pm44xx.c ARM: OMAP2+: Remove unneeded semicolons 2015-10-12 10:56:36 -07:00
pm-debug.c
pm.c
pm.h ARM: OMAP4+: PM: erratum is used by OMAP5 and DRA7 as well 2015-09-14 12:14:47 -07:00
pmu.c
powerdomain-common.c
powerdomain.c
powerdomain.h
powerdomains2xxx_3xxx_data.c
powerdomains2xxx_3xxx_data.h
powerdomains2xxx_data.c
powerdomains3xxx_data.c ARM: OMAP2+: Remove unneeded semicolons 2015-10-12 10:56:36 -07:00
powerdomains7xx_data.c
powerdomains33xx_data.c
powerdomains43xx_data.c
powerdomains44xx_data.c
powerdomains54xx_data.c
prcm43xx.h ARM: AM43xx: Add the PRM IRQ register offsets 2015-07-23 05:54:38 -06:00
prcm44xx.h
prcm_mpu7xx.h
prcm_mpu44xx.c
prcm_mpu44xx.h
prcm_mpu54xx.h
prcm_mpu_44xx_54xx.h
prcm-common.h Merge branch 'dm814x-soc' into omap-for-v4.3/soc 2015-07-23 21:59:18 -07:00
prm2xxx_3xxx.c
prm2xxx_3xxx.h
prm2xxx.c
prm2xxx.h
prm3xxx.c
prm3xxx.h
prm7xx.h
prm33xx.c
prm33xx.h
prm44xx_54xx.h
prm44xx.c ARM: OMAP4+: PRM: Add AM437x specific data 2015-07-23 06:08:24 -06:00
prm44xx.h
prm54xx.h
prm_common.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
prm-regbits-24xx.h
prm-regbits-33xx.h
prm-regbits-34xx.h
prm-regbits-44xx.h
prm.h
prminst44xx.c
prminst44xx.h
scrm44xx.h
scrm54xx.h
sdram-hynix-h8mbx00u0mer-0em.h
sdram-micron-mt46h32m32lf-6.h
sdram-nokia.c
sdram-nokia.h
sdram-numonyx-m65kxxxxam.h
sdram-qimonda-hyb18m512160af-6.h
sdrc2xxx.c
sdrc.c
sdrc.h
serial.c
serial.h
sleep24xx.S
sleep34xx.S
sleep44xx.S ARM: omap2: restore OMAP4 barrier behaviour 2015-07-25 15:28:16 +01:00
smartreflex-class3.c
soc.h ARM: OMAP2+: Rename cpu_is macros to soc_is 2015-10-16 10:08:45 -07:00
sr_device.c
sram242x.S
sram243x.S
sram.c ARM: OMAP3: clock: remove un-used core dpll re-program code 2015-10-14 12:35:27 -07:00
sram.h ARM: OMAP3: clock: remove un-used core dpll re-program code 2015-10-14 12:35:27 -07:00
ti81xx-restart.c
ti81xx.h
timer.c ARM: SoC cleanups for v4.4 2015-11-10 14:48:36 -08:00
twl-common.c
twl-common.h
usb-host.c
usb-musb.c
usb-tusb6010.c
usb.h
vc3xxx_data.c
vc44xx_data.c
vc.c ARM: OMAP3: vc: Remove unused macros 2015-10-12 10:56:36 -07:00
vc.h
voltage.c
voltage.h
voltagedomains2xxx_data.c
voltagedomains3xxx_data.c ARM: appropriate __init annotation for const data 2015-07-28 13:55:27 +02:00
voltagedomains44xx_data.c ARM: appropriate __init annotation for const data 2015-07-28 13:55:27 +02:00
voltagedomains54xx_data.c ARM: appropriate __init annotation for const data 2015-07-28 13:55:27 +02:00
vp3xxx_data.c
vp44xx_data.c
vp.c
vp.h
wd_timer.c
wd_timer.h