linux-stable/arch/arm
Vladimir Murzin 870ab7ef97 ARM: 9046/1: decompressor: Do not clear SCTLR.nTLSMD for ARMv7+ cores
[ Upstream commit 2acb909750 ]

It was observed that decompressor running on hardware implementing ARM v8.2
Load/Store Multiple Atomicity and Ordering Control (LSMAOC), say, as guest,
would stuck just after:

Uncompressing Linux... done, booting the kernel.

The reason is that it clears nTLSMD bit when disabling caches:

  nTLSMD, bit [3]

  When ARMv8.2-LSMAOC is implemented:

    No Trap Load Multiple and Store Multiple to
    Device-nGRE/Device-nGnRE/Device-nGnRnE memory.

    0b0 All memory accesses by A32 and T32 Load Multiple and Store
        Multiple at EL1 or EL0 that are marked at stage 1 as
        Device-nGRE/Device-nGnRE/Device-nGnRnE memory are trapped and
        generate a stage 1 Alignment fault.

    0b1 All memory accesses by A32 and T32 Load Multiple and Store
        Multiple at EL1 or EL0 that are marked at stage 1 as
        Device-nGRE/Device-nGnRE/Device-nGnRnE memory are not trapped.

  This bit is permitted to be cached in a TLB.

  This field resets to 1.

  Otherwise:

  Reserved, RES1

So as effect we start getting traps we are not quite ready for.

Looking into history it seems that mask used for SCTLR clear came from
the similar code for ARMv4, where bit[3] is the enable/disable bit for
the write buffer. That not applicable to ARMv7 and onwards, so retire
that bit from the masks.

Fixes: 7d09e85448 ("[ARM] 4393/2: ARMv7: Add uncompressing code for the new CPU Id format")
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-03-04 10:26:32 +01:00
..
boot ARM: 9046/1: decompressor: Do not clear SCTLR.nTLSMD for ARMv7+ cores 2021-03-04 10:26:32 +01:00
common
configs
crypto crypto: arm/aes-ce - work around Cortex-A57/A72 silion errata 2020-12-30 11:51:36 +01:00
include ARM: kexec: fix oops after TLB are invalidated 2021-02-17 10:35:16 +01:00
kernel ARM: kexec: fix oops after TLB are invalidated 2021-02-17 10:35:16 +01:00
kvm
lib
mach-actions
mach-alpine
mach-artpec
mach-asm9260
mach-aspeed
mach-at91 ARM: at91: pm: of_node_put() after its usage 2020-10-29 09:57:58 +01:00
mach-axxia
mach-bcm
mach-berlin
mach-clps711x
mach-cns3xxx
mach-davinci
mach-digicolor
mach-dove
mach-ebsa110
mach-efm32
mach-ep93xx
mach-exynos
mach-footbridge ARM: footbridge: fix dc21285 PCI configuration accessors 2021-02-10 09:25:31 +01:00
mach-gemini
mach-highbank
mach-hisi
mach-imx ARM: imx: build suspend-imx6.S with arm instruction set 2021-02-03 23:25:58 +01:00
mach-integrator
mach-iop32x
mach-ixp4xx clocksource/drivers/ixp4xx: Select TIMER_OF when needed 2021-03-04 10:26:29 +01:00
mach-keystone
mach-lpc18xx
mach-lpc32xx
mach-mediatek
mach-meson
mach-milbeaut
mach-mmp
mach-moxart
mach-mv78xx0
mach-mvebu
mach-mxs
mach-nomadik
mach-npcm
mach-nspire
mach-omap1
mach-omap2 ARM: OMAP2+: Fix suspcious RCU usage splats for omap_enter_idle_coupled 2021-02-17 10:35:15 +01:00
mach-orion5x
mach-oxnas
mach-picoxcell
mach-prima2
mach-pxa
mach-qcom
mach-rda
mach-realview
mach-rockchip
mach-rpc
mach-s3c24xx ARM: s3c24xx: fix mmc gpio lookup tables 2020-10-29 09:57:58 +01:00
mach-s3c64xx
mach-s5pv210
mach-sa1100
mach-shmobile
mach-socfpga
mach-spear
mach-sti
mach-stm32
mach-sunxi ARM: sunxi: Add machine match for the Allwinner V3 SoC 2020-12-30 11:51:29 +01:00
mach-tango
mach-tegra
mach-u300
mach-uniphier
mach-ux500
mach-versatile
mach-vexpress
mach-vt8500
mach-zx
mach-zynq
mm ARM: 9007/1: l2c: fix prefetch bits init in L2X0_AUX_CTRL using DT values 2020-10-29 09:57:47 +01:00
net
nwfpe
oprofile
plat-omap
plat-orion
plat-pxa
plat-samsung ARM: samsung: fix PM debug build with DEBUG_LL but !MMU 2020-11-05 11:43:36 +01:00
plat-versatile
probes ARM: 9019/1: kprobes: Avoid fortify_panic() when copying optprobe template 2020-11-18 19:20:26 +01:00
tools
vdso
vfp
xen xen/arm: don't ignore return errors from set_phys_to_machine 2021-02-23 15:02:26 +01:00
Kconfig ARM: s3c24xx: fix missing system reset 2020-11-05 11:43:37 +01:00
Kconfig-nommu
Kconfig.debug
Makefile