linux-stable/arch/arm
Marek Szyprowski 34cf175a42 ARM: exynos: Fix undefined instruction during Exynos5422 resume
[ Upstream commit 4d8e3e951a ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-06-15 11:54:59 +02:00
..
boot ARM: dts: exynos: Always enable necessary APIO_1V8 and ABB_1V8 regulators on Arndale Octa 2019-06-15 11:54:59 +02:00
common ARM: 8743/1: bL_switcher: add MODULE_LICENSE tag 2018-02-25 11:07:51 +01:00
configs ARM: imx_v6_v7_defconfig: Select CONFIG_TMPFS_POSIX_ACL 2018-11-21 09:24:03 +01:00
crypto crypto: arm/aes-neonbs - don't access already-freed walk.iv 2019-05-21 18:50:15 +02:00
firmware ARM: trusted_foundations: do not use naked function 2018-12-01 09:42:49 +01:00
include ARM: prevent tracing IPI_CPU_BACKTRACE 2019-06-15 11:54:51 +02:00
kernel ARM: prevent tracing IPI_CPU_BACKTRACE 2019-06-15 11:54:51 +02:00
kvm ARM: KVM: Add SMCCC_ARCH_WORKAROUND_1 fast handling 2018-10-18 09:16:27 +02:00
lib ARM: 8833/1: Ensure that NEON code always compiles with Clang 2019-04-05 22:31:34 +02:00
mach-actions License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-alpine License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-artpec
mach-asm9260
mach-aspeed
mach-at91 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-axxia License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-bcm License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-berlin
mach-clps711x License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-cns3xxx ARM: cns3xxx: Fix writing to wrong PCI config registers after alignment 2019-02-06 17:31:34 +01:00
mach-davinci ARM: davinci: board-da850-evm: fix WP pin polarity for MMC/SD 2018-08-24 13:09:07 +02:00
mach-digicolor License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-dove License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-ebsa110 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-efm32 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-ep93xx License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-exynos ARM: exynos: Fix undefined instruction during Exynos5422 resume 2019-06-15 11:54:59 +02:00
mach-footbridge License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-gemini License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-highbank License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-hisi ARM: hisi: check of_iomap and fix missing of_node_put 2018-09-26 08:38:10 +02:00
mach-imx ARM: imx6q: cpuidle: fix bug that CPU might not wake up at expected time 2019-04-03 06:25:15 +02:00
mach-integrator gpio: pl061: handle failed allocations 2019-02-20 10:20:50 +01:00
mach-iop13xx ARM: iop: don't use using 64-bit DMA masks 2019-05-08 07:20:51 +02:00
mach-iop32x ARM: iop32x/n2100: fix PCI IRQ mapping 2019-02-15 08:09:12 +01:00
mach-iop33x License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-ixp4xx License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-keystone ARM: keystone: fix platform_domain_notifier array overrun 2018-06-21 04:02:59 +09:00
mach-ks8695 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-lpc18xx
mach-lpc32xx
mach-mediatek
mach-meson
mach-mmp ARM: mmp/mmp2: fix cpu_is_mmp2() on mmp2-dt 2018-12-21 14:13:05 +01:00
mach-moxart
mach-mv78xx0 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-mvebu ARM: mvebu: declare asm symbols as character arrays in pmsu.c 2018-10-03 17:00:52 -07:00
mach-mxs
mach-netx
mach-nomadik
mach-nspire
mach-omap1 ARM: OMAP1: ams-delta: Fix possible use of uninitialized field 2018-12-17 09:28:48 +01:00
mach-omap2 ARM: avoid Cortex-A9 livelock on tight dmb loops 2019-04-05 22:31:37 +02:00
mach-orion5x ARM: orion5x: Revert commit 4904dbda41. 2018-05-30 07:52:05 +02:00
mach-oxnas
mach-picoxcell
mach-prima2 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-pxa ARM: pxa: avoid section mismatch warning 2019-02-12 19:46:04 +01:00
mach-qcom
mach-realview
mach-rockchip ARM: rockchip: Force CONFIG_PM on Rockchip systems 2018-09-15 09:45:33 +02:00
mach-rpc License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-s3c24xx ARM: s3c24xx: Fix boolean expressions in osiris_dvs_notify 2019-03-23 14:35:27 +01:00
mach-s3c64xx License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-s5pv210
mach-sa1100 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-shmobile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-socfpga License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-spear License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-sti
mach-stm32
mach-sunxi
mach-tango ARM: tango: Improve ARCH_MULTIPLATFORM compatibility 2019-02-15 08:09:12 +01:00
mach-tegra License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-u300 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-uniphier License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-ux500 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-versatile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-vexpress License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-vt8500 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-w90x900 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-zx License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mach-zynq License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mm ARM: 8830/1: NOMMU: Toggle only bits in EXC_RETURN we are really care of 2019-04-05 22:31:37 +02:00
net bpf, arm: fix emit_ldx_r and emit_mov_i using TMP_REG_1 2018-12-21 14:13:18 +01:00
nwfpe License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
oprofile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
plat-iop ARM: iop: don't use using 64-bit DMA masks 2019-05-08 07:20:51 +02:00
plat-omap ARM: OMAP: Fix dmtimer init for omap1 2018-05-30 07:52:01 +02:00
plat-orion ARM: orion: don't use using 64-bit DMA masks 2019-05-08 07:20:51 +02:00
plat-pxa ARM: pxa: ssp: unneeded to free devm_ allocated data 2019-03-13 14:03:20 -07:00
plat-samsung ARM: samsung: Limit SAMSUNG_PM_CHECK config option to non-Exynos platforms 2019-04-20 09:15:05 +02:00
plat-versatile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
probes ARM: 8834/1: Fix: kprobes: optimized kprobes illegal instruction 2019-02-27 10:08:01 +01:00
tools License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vdso ARM: vdso: Remove dependency with the arch_timer driver internals 2019-05-31 06:47:18 -07:00
vfp ARM: 8810/1: vfp: Fix wrong assignement to ufp_exc 2019-02-20 10:20:46 +01:00
xen arm/xen: don't inclide rwlock.h directly. 2017-10-26 16:58:17 -04:00
Kconfig ARM: 8824/1: fix a migrating irq bug when hotplug cpu 2019-03-23 14:35:14 +01:00
Kconfig-nommu License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig.debug License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile ARM: 8766/1: drop no-thumb-interwork in EABI mode 2018-12-01 09:42:48 +01:00