kernel_optimize_test/arch/arm
Vladimir Murzin e699cd1380 ARM: 9046/1: decompressor: Do not clear SCTLR.nTLSMD for ARMv7+ cores
[ Upstream commit 2acb909750431030b65a0a2a17fd8afcbd813a84 ]

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 11:38:02 +01:00
..
boot ARM: 9046/1: decompressor: Do not clear SCTLR.nTLSMD for ARMv7+ cores 2021-03-04 11:38:02 +01:00
common ARM/sa1111: add a missing include of dma-map-ops.h 2020-10-20 09:40:33 +02:00
configs mm/zsmalloc.c: drop ZSMALLOC_PGTABLE_MAPPING 2020-12-06 10:19:07 -08:00
crypto crypto: arm/aes-ce - work around Cortex-A57/A72 silion errata 2020-12-30 11:54:11 +01:00
include ARM: kexec: fix oops after TLB are invalidated 2021-02-17 11:02:24 +01:00
kernel ARM: kexec: fix oops after TLB are invalidated 2021-02-17 11:02:24 +01:00
lib
mach-actions
mach-alpine
mach-artpec
mach-asm9260
mach-aspeed
mach-at91 ARM: at91: use proper asm syntax in pm_suspend 2021-03-04 11:37:28 +01:00
mach-axxia
mach-bcm
mach-berlin
mach-clps711x
mach-cns3xxx
mach-davinci ARM: SoC platform updates 2020-10-24 10:33:08 -07:00
mach-digicolor
mach-dove
mach-ebsa110
mach-efm32
mach-ep93xx
mach-exynos Samsung mach/soc changes for v5.10 2020-09-26 12:55:43 -07:00
mach-footbridge ARM: footbridge: fix dc21285 PCI configuration accessors 2021-02-10 09:29:20 +01:00
mach-gemini
mach-highbank dma-mapping: split <linux/dma-mapping.h> 2020-10-06 07:07:03 +02:00
mach-hisi ARM: hisi: add support for SD5203 SoC 2020-09-30 09:56:03 +08:00
mach-imx ARM: imx: build suspend-imx6.S with arm instruction set 2021-02-03 23:28:44 +01:00
mach-integrator
mach-iop32x
mach-ixp4xx clocksource/drivers/ixp4xx: Select TIMER_OF when needed 2021-03-04 11:37:57 +01:00
mach-keystone ARM: keystone: remove SECTION_SIZE_BITS/MAX_PHYSMEM_BITS 2020-12-07 15:32:04 +01:00
mach-lpc18xx
mach-lpc32xx
mach-mediatek
mach-meson
mach-milbeaut
mach-mmp
mach-moxart
mach-mstar ARM: mstar: Select MStar intc 2020-10-03 12:47:56 -07:00
mach-mv78xx0
mach-mvebu mvebu fixes for 5.9 (part 1) 2020-10-26 10:11:55 +01:00
mach-mxs
mach-nomadik
mach-npcm
mach-nspire
mach-omap1 ARM: OMAP1: OSK: fix ohci-omap breakage 2021-02-10 09:29:11 +01:00
mach-omap2 ARM: OMAP2+: Fix suspcious RCU usage splats for omap_enter_idle_coupled 2021-02-17 11:02:22 +01:00
mach-orion5x
mach-oxnas
mach-picoxcell
mach-prima2
mach-pxa power: supply: gpio-charger: Convert to GPIO descriptors 2020-08-27 16:47:14 +02:00
mach-qcom
mach-rda
mach-realtek
mach-realview
mach-rockchip
mach-rpc
mach-s3c ARM: s3c: fix fiq for clang IAS 2021-03-04 11:37:28 +01:00
mach-s5pv210
mach-sa1100 power: supply: gpio-charger: Convert to GPIO descriptors 2020-08-27 16:47:14 +02:00
mach-shmobile ARM: SoC platform updates 2020-10-24 10:33:08 -07:00
mach-socfpga
mach-spear
mach-sti
mach-stm32 ARM: stm32: Replace HTTP links with HTTPS ones 2020-10-03 12:38:54 -07:00
mach-sunxi ARM: sunxi: Add machine match for the Allwinner V3 SoC 2020-11-02 10:28:14 +01:00
mach-tango
mach-tegra
mach-u300
mach-uniphier
mach-ux500
mach-versatile
mach-vexpress
mach-vt8500
mach-zx
mach-zynq
mm ARM: 9025/1: Kconfig: CPU_BIG_ENDIAN depends on !LD_IS_LLD 2021-02-07 15:37:13 +01:00
net
nwfpe
oprofile
plat-omap PM: AVS: smartreflex Move driver to soc specific drivers 2020-10-16 18:28:43 +02:00
plat-orion
plat-pxa
plat-versatile
probes ARM: 9019/1: kprobes: Avoid fortify_panic() when copying optprobe template 2020-10-27 12:11:51 +00:00
tools mm/madvise: introduce process_madvise() syscall: an external memory hinting API 2020-10-18 09:27:10 -07:00
vdso kbuild: explicitly specify the build id style 2020-10-09 23:57:30 +09:00
vfp ARM: 9044/1: vfp: use undef hook for VFP support detection 2020-12-30 11:54:02 +01:00
xen xen/arm: don't ignore return errors from set_phys_to_machine 2021-02-23 15:53:24 +01:00
Kbuild
Kconfig kbuild: Hoist '--orphan-handling' into Kconfig 2020-12-01 22:45:36 +09:00
Kconfig-nommu
Kconfig.assembler
Kconfig.debug ARM: SoC platform updates 2020-10-24 10:33:08 -07:00
Makefile kbuild: Hoist '--orphan-handling' into Kconfig 2020-12-01 22:45:36 +09:00