android_kernel_oneplus_msm8998/arch/arm
Marek Szyprowski 38fbd5c2d5 ARM: exynos: Fix undefined instruction during Exynos5422 resume
[ Upstream commit 4d8e3e951a856777720272ce27f2c738a3eeef8c ]

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-22 08:18:22 +02:00
..
boot ARM: dts: exynos: Always enable necessary APIO_1V8 and ABB_1V8 regulators on Arndale Octa 2019-06-22 08:18:21 +02:00
common ARM: sa1111: fix pcmcia suspend/resume 2016-10-07 15:23:44 +02:00
configs Revert "ARM: imx_v6_v7_defconfig: Select ULPI support" 2018-09-15 09:40:40 +02:00
crypto crypto: arm/aes-neonbs - don't access already-freed walk.iv 2019-06-11 12:23:41 +02:00
firmware
include ARM: avoid Cortex-A9 livelock on tight dmb loops 2019-04-27 09:33:52 +02:00
kernel ARM: 8839/1: kprobe: make patch_lock a raw_spinlock_t 2019-04-27 09:33:59 +02:00
kvm KVM: arm/arm64: Ensure vcpu target is unset on reset failure 2019-06-11 12:23:49 +02:00
lib ARM: 8833/1: Ensure that NEON code always compiles with Clang 2019-04-27 09:33:51 +02:00
mach-alpine
mach-asm9260
mach-at91 ARM: remove duplicate 'const' annotations' 2017-10-08 10:14:20 +02:00
mach-axxia
mach-bcm ARM: remove duplicate 'const' annotations' 2017-10-08 10:14:20 +02:00
mach-berlin
mach-clps711x
mach-cns3xxx ARM: cns3xxx: Fix writing to wrong PCI config registers after alignment 2019-02-06 19:43:07 +01:00
mach-davinci ARM: davinci: da8xx: Create DSP device only when assigned memory 2018-04-13 19:50:09 +02:00
mach-digicolor
mach-dove ARM: dove: Fix legacy get_irqnr_and_base 2015-11-25 14:59:12 +00:00
mach-ebsa110
mach-efm32
mach-ep93xx
mach-exynos ARM: exynos: Fix undefined instruction during Exynos5422 resume 2019-06-22 08:18:22 +02:00
mach-footbridge
mach-gemini
mach-highbank
mach-hisi ARM: hisi: check of_iomap and fix missing of_node_put 2018-09-26 08:35:09 +02:00
mach-imx ARM: imx6q: cpuidle: fix bug that CPU might not wake up at expected time 2019-04-03 06:23:26 +02:00
mach-integrator gpio: pl061: handle failed allocations 2019-02-20 10:13:21 +01:00
mach-iop13xx ARM: iop: don't use using 64-bit DMA masks 2019-05-16 19:45:02 +02:00
mach-iop32x ARM: iop32x/n2100: fix PCI IRQ mapping 2019-02-20 10:13:19 +01:00
mach-iop33x
mach-ixp4xx ARM: ixp4xx: fix read{b,w,l} return types 2015-12-01 23:45:30 +01:00
mach-keystone
mach-ks8695
mach-lpc18xx
mach-lpc32xx
mach-mediatek ARM: SoC platform updates for v4.4 2015-11-10 14:56:23 -08:00
mach-meson
mach-mmp
mach-moxart
mach-mv78xx0
mach-mvebu ARM: mvebu: declare asm symbols as character arrays in pmsu.c 2018-10-10 08:52:06 +02:00
mach-mxs
mach-netx
mach-nomadik
mach-nspire
mach-omap1 ARM: OMAP1: ams-delta: Fix possible use of uninitialized field 2018-12-17 21:55:09 +01:00
mach-omap2 ARM: avoid Cortex-A9 livelock on tight dmb loops 2019-04-27 09:33:52 +02:00
mach-orion5x ARM: orion5x: Fix legacy get_irqnr_and_base 2015-11-25 15:01:00 +00:00
mach-picoxcell
mach-prima2 ARM: prima2: always enable reset controller 2016-05-04 14:48:53 -07:00
mach-pxa ARM: pxa: avoid section mismatch warning 2019-02-20 10:13:09 +01:00
mach-qcom
mach-realview net: smc91x: fix SMC accesses 2016-09-30 10:18:37 +02:00
mach-rockchip
mach-rpc
mach-s3c24xx ARM: s3c24xx: Fix boolean expressions in osiris_dvs_notify 2019-03-23 08:44:38 +01:00
mach-s3c64xx ASoC: samsung: pass DMA channels as pointers 2016-04-12 09:08:32 -07:00
mach-s5pv210
mach-sa1100 ARM: sa1100: clear reset status prior to reboot 2016-10-07 15:23:43 +02:00
mach-shmobile ARM: shmobile: fix regulator quirk for Gen2 2016-10-07 15:23:43 +02:00
mach-socfpga ARM: SoCFPGA: Fix secondary CPU startup in thumb2 kernel 2016-05-11 11:21:14 +02:00
mach-spear ARM: remove duplicate 'const' annotations' 2017-10-08 10:14:20 +02:00
mach-sti
mach-stm32
mach-sunxi ARM: SoC platform updates for v4.4 2015-11-10 14:56:23 -08:00
mach-tegra ARM: tegra: select USB_ULPI from EHCI rather than platform 2018-02-25 11:03:51 +01:00
mach-u300 spi: Updates for v4.4 2015-11-05 13:15:12 -08:00
mach-uniphier ARM: uniphier: rework SMP operations to use trampoline code 2015-10-27 09:20:53 +09:00
mach-ux500 ARM: ux500: fix prcmu_is_cpu_in_wfi() calculation 2017-01-26 08:23:49 +01:00
mach-versatile
mach-vexpress
mach-vt8500
mach-w90x900
mach-zx ARM: zx: only build power domain code when CONFIG_PM=y 2015-11-19 16:16:45 +01:00
mach-zynq ARM: zynq: Reserve correct amount of non-DMA RAM 2017-01-15 13:41:36 +01:00
mm ARM: 8494/1: mm: Enable PXN when running non-LPAE kernel on LPAE processor 2019-04-03 06:23:20 +02:00
net ARM: net: bpf: fix zero right shift 2016-01-06 01:32:09 -05:00
nwfpe
oprofile
plat-iop ARM: iop: don't use using 64-bit DMA masks 2019-05-16 19:45:02 +02:00
plat-omap ARM: OMAP: Fix dmtimer init for omap1 2018-05-30 07:49:00 +02:00
plat-orion ARM: orion: don't use using 64-bit DMA masks 2019-05-16 19:45:02 +02:00
plat-pxa ARM: pxa: ssp: unneeded to free devm_ allocated data 2019-03-23 08:44:27 +01:00
plat-samsung ARM: samsung: Limit SAMSUNG_PM_CHECK config option to non-Exynos platforms 2019-04-27 09:33:58 +02:00
plat-versatile
probes ARM: 8770/1: kprobes: Prohibit probing on optimized_callback 2018-05-26 08:48:57 +02:00
tools
vdso ARM: 8449/1: fix bug in vdsomunge swab32 macro 2015-10-29 15:20:15 +00:00
vfp
xen swiotlb-xen: implement xen_swiotlb_dma_mmap callback 2017-10-05 09:41:48 +02:00
Kconfig ARM: 8510/1: rework ARM_CPU_SUSPEND dependencies 2019-04-03 06:23:23 +02:00
Kconfig-nommu ARM: 8635/1: nommu: allow enabling REMAP_VECTORS_TO_RAM 2017-10-08 10:14:17 +02:00
Kconfig.debug ARM: debug-ll: fix BCM63xx entry for multiplatform 2016-03-03 15:07:08 -08:00
Makefile