linux/arch/arm/mach-exynos
Marek Szyprowski 4d8e3e951a ARM: exynos: Fix undefined instruction during Exynos5422 resume
During early system resume on Exynos5422 with performance counters enabled
the following kernel oops happens:

    Internal error: Oops - undefined instruction: 0 [#1] PREEMPT SMP ARM
    Modules linked in:
    CPU: 0 PID: 1433 Comm: bash Tainted: G        W         5.0.0-rc5-next-20190208-00023-gd5fb5a8a13e6-dirty #5480
    Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
    ...
    Flags: nZCv  IRQs off  FIQs off  Mode SVC_32  ISA ARM  Segment none
    Control: 10c5387d  Table: 4451006a  DAC: 00000051
    Process bash (pid: 1433, stack limit = 0xb7e0e22f)
    ...
    (reset_ctrl_regs) from [<c0112ad0>] (dbg_cpu_pm_notify+0x1c/0x24)
    (dbg_cpu_pm_notify) from [<c014c840>] (notifier_call_chain+0x44/0x84)
    (notifier_call_chain) from [<c014cbc0>] (__atomic_notifier_call_chain+0x7c/0x128)
    (__atomic_notifier_call_chain) from [<c01ffaac>] (cpu_pm_notify+0x30/0x54)
    (cpu_pm_notify) from [<c055116c>] (syscore_resume+0x98/0x3f4)
    (syscore_resume) from [<c0189350>] (suspend_devices_and_enter+0x97c/0xe74)
    (suspend_devices_and_enter) from [<c0189fb8>] (pm_suspend+0x770/0xc04)
    (pm_suspend) from [<c0187740>] (state_store+0x6c/0xcc)
    (state_store) from [<c09fa698>] (kobj_attr_store+0x14/0x20)
    (kobj_attr_store) from [<c030159c>] (sysfs_kf_write+0x4c/0x50)
    (sysfs_kf_write) from [<c0300620>] (kernfs_fop_write+0xfc/0x1e0)
    (kernfs_fop_write) from [<c0282be8>] (__vfs_write+0x2c/0x160)
    (__vfs_write) from [<c0282ea4>] (vfs_write+0xa4/0x16c)
    (vfs_write) from [<c0283080>] (ksys_write+0x40/0x8c)
    (ksys_write) from [<c0101000>] (ret_fast_syscall+0x0/0x28)

Undefined instruction is triggered during CP14 reset, because bits: #16
(Secure privileged invasive debug disabled) and #17 (Secure privileged
noninvasive debug disable) are set in DSCR. Those bits depend on SPNIDEN
and SPIDEN lines, which are provided by Secure JTAG hardware block. That
block in turn is powered from cluster 0 (big/Eagle), but the Exynos5422
boots on cluster 1 (LITTLE/KFC).

To fix this issue it is enough to turn on the power on the cluster 0 for
a while. This lets the Secure JTAG block to propagate the needed signals
to LITTLE/KFC cores and change their DSCR.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2019-03-19 21:08:28 +01:00
..
include/mach ARM: exynos: Remove static mapping of SCU SFR 2018-05-13 14:06:55 +02:00
common.h ARM: exynos: Add CPU state management for Exynos542x under secure firmware 2019-03-19 21:07:47 +01:00
exynos-smc.S ARM: EXYNOS: Add SPDX license identifiers 2018-01-03 18:36:22 +01:00
exynos.c ARM: exynos: Add CPU state management for Exynos542x under secure firmware 2019-03-19 21:07:47 +01:00
firmware.c ARM: exynos: Fix imprecise abort during Exynos5422 suspend to RAM 2018-08-30 19:46:06 +02:00
headsmp.S ARM: smp: remove arch-provided "pen_release" 2019-02-01 22:05:23 +00:00
Kconfig ARM: exynos: no need to select ARCH_HAS_BANDGAP any longer 2018-05-03 18:19:59 +02:00
Makefile ARM: EXYNOS: Add SPDX license identifiers 2018-01-03 18:36:22 +01:00
mcpm-exynos.c ARM: EXYNOS: Add SPDX license identifiers 2018-01-03 18:36:22 +01:00
platsmp.c ARM updates for 5.1-rc1 2019-03-15 14:37:46 -07:00
pm.c ARM: exynos: Remove static mapping of SCU SFR 2018-05-13 14:06:55 +02:00
sleep.S ARM: EXYNOS: Add SPDX license identifiers 2018-01-03 18:36:22 +01:00
smc.h ARM: exynos: Add Exynos SMC values for secure memory write 2019-03-19 21:07:47 +01:00
suspend.c ARM: exynos: Fix undefined instruction during Exynos5422 resume 2019-03-19 21:08:28 +01:00