linux-stable/arch/arm/mach-exynos
Marek Szyprowski 970f6cf2e9 ARM: exynos: Simplify code in Exynos3250 CPU core restart path
exynos_core_restart() is called by secondary CPU boot procedure, used by
CPU hotplug and coupled CPU idle. Replace of_machine_is_compatible() call
with a simple SoC revision check.

of_machine_is_compatible() function performs a dozen of string comparisons
during the full device tree walk, while soc_is_exynos3250() is a simple
integer check on SoC revision variable. This change also fixes the
following warning:

=============================
WARNING: suspicious RCU usage
5.10.0-rc1-00001-g6f65599d1f4f-dirty #1800 Not tainted
-----------------------------
./include/trace/events/lock.h:37 suspicious rcu_dereference_check() usage!

other info that might help us debug this:

rcu_scheduler_active = 2, debug_locks = 1
RCU used illegally from extended quiescent state!
no locks held by swapper/0/0.

stack backtrace:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.10.0-rc1-00001-g6f65599d1f4f-dirty #1800
Hardware name: Samsung Exynos (Flattened Device Tree)
[<c0111514>] (unwind_backtrace) from [<c010ceb8>] (show_stack+0x10/0x14)
[<c010ceb8>] (show_stack) from [<c0b1d8dc>] (dump_stack+0xb4/0xd4)
[<c0b1d8dc>] (dump_stack) from [<c0194acc>] (lock_acquire+0x418/0x584)
[<c0194acc>] (lock_acquire) from [<c0b29e58>] (_raw_spin_lock_irqsave+0x4c/0x60)
[<c0b29e58>] (_raw_spin_lock_irqsave) from [<c0897af4>] (of_device_is_compatible+0x1c/0x4c)
[<c0897af4>] (of_device_is_compatible) from [<c01216d8>] (exynos_core_restart+0x14/0xb0)
[<c01216d8>] (exynos_core_restart) from [<c0120a78>] (exynos_cpu0_enter_aftr+0x1d0/0x1dc)
[<c0120a78>] (exynos_cpu0_enter_aftr) from [<c08575b0>] (exynos_enter_coupled_lowpower+0x44/0x74)
[<c08575b0>] (exynos_enter_coupled_lowpower) from [<c085477c>] (cpuidle_enter_state+0x178/0x660)
[<c085477c>] (cpuidle_enter_state) from [<c08572dc>] (cpuidle_enter_state_coupled+0x35c/0x378)
[<c08572dc>] (cpuidle_enter_state_coupled) from [<c0854cc8>] (cpuidle_enter+0x50/0x54)
[<c0854cc8>] (cpuidle_enter) from [<c0164854>] (do_idle+0x224/0x2a4)
[<c0164854>] (do_idle) from [<c0164c88>] (cpu_startup_entry+0x18/0x1c)
[<c0164c88>] (cpu_startup_entry) from [<c1100fa0>] (start_kernel+0x640/0x67c)
[<c1100fa0>] (start_kernel) from [<00000000>] (0x0)

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://lore.kernel.org/r/20201027201716.15745-1-m.szyprowski@samsung.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-10-28 21:00:32 +01:00
..
common.h ARM: exynos: use private samsung_cpu_id copy 2020-08-19 21:10:50 +02:00
exynos-smc.S ARM: use arch_extension directive instead of arch argument 2019-06-19 09:44:25 -07:00
exynos.c Samsung mach/soc changes for v5.10 2020-09-26 12:55:43 -07:00
firmware.c ARM: exynos: Fix a leaked reference by adding missing of_node_put 2019-03-19 21:34:38 +01:00
headsmp.S ARM: smp: remove arch-provided "pen_release" 2019-02-01 22:05:23 +00:00
Kconfig ARM: samsung: remove HAVE_S3C2410_WATCHDOG and use direct dependencies 2020-08-19 20:57:35 +02:00
Makefile ARM: exynos: stop selecting PLAT_SAMSUNG 2020-08-19 21:14:13 +02:00
mcpm-exynos.c ARM: exynos: MCPM: Restore big.LITTLE cpuidle support 2020-06-29 20:27:33 +02:00
platsmp.c ARM: exynos: Simplify code in Exynos3250 CPU core restart path 2020-10-28 21:00:32 +01:00
pm.c ARM: exynos: use private samsung_cpu_id copy 2020-08-19 21:10:50 +02:00
sleep.S ARM: use arch_extension directive instead of arch argument 2019-06-19 09:44:25 -07:00
smc.h ARM: samsung: Rename Samsung and Exynos to lowercase 2020-01-07 20:44:22 +01:00
suspend.c ARM: samsung: Rename Samsung and Exynos to lowercase 2020-01-07 20:44:22 +01:00