linux-stable/arch/arm/kernel
Linus Walleij 463dbba4d1 ARM: 9104/2: Fix Keystone 2 kernel mapping regression
This fixes a Keystone 2 regression discovered as a side effect of
defining an passing the physical start/end sections of the kernel
to the MMU remapping code.

As the Keystone applies an offset to all physical addresses,
including those identified and patches by phys2virt, we fail to
account for this offset in the kernel_sec_start and kernel_sec_end
variables.

Further these offsets can extend into the 64bit range on LPAE
systems such as the Keystone 2.

Fix it like this:
- Extend kernel_sec_start and kernel_sec_end to be 64bit
- Add the offset also to kernel_sec_start and kernel_sec_end

As passing kernel_sec_start and kernel_sec_end as 64bit invariably
incurs BE8 endianness issues I have attempted to dry-code around
these.

Tested on the Vexpress QEMU model both with and without LPAE
enabled.

Fixes: 6e121df14c ("ARM: 9090/1: Map the lowmem and kernel separately")
Reported-by: Nishanth Menon <nmenon@kernel.org>
Suggested-by: Russell King <rmk+kernel@armlinux.org.uk>
Tested-by: Grygorii Strashko <grygorii.strashko@ti.com>
Tested-by: Nishanth Menon <nmenon@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
2021-08-10 12:17:25 +01:00
..
.gitignore
arch_timer.c
armksyms.c
asm-offsets.c ARM: 9075/1: kernel: Fix interrupted SMC calls 2021-04-18 19:15:14 +01:00
atags.h ARM: 9011/1: centralize phys-to-virt conversion of DT/ATAGS address 2020-10-27 12:10:59 +00:00
atags_compat.c
atags_parse.c ARM: 9011/1: centralize phys-to-virt conversion of DT/ATAGS address 2020-10-27 12:10:59 +00:00
atags_proc.c
bios32.c ARM/PCI: Remove unused fields from struct hw_pci 2020-09-18 22:39:09 +01:00
bugs.c
cpuidle.c treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
crash_dump.c
debug.S ARM: 9005/1: debug: Select flow control for all debug UARTs 2020-09-15 14:35:28 +01:00
devtree.c ARM: 9011/1: centralize phys-to-virt conversion of DT/ATAGS address 2020-10-27 12:10:59 +00:00
dma-isa.c
dma.c
early_printk.c
efi.c
elf.c
entry-armv.S ARM: 9030/1: entry: omit FP emulation for UND exceptions taken in kernel mode 2020-12-08 10:15:00 +00:00
entry-common.S ARM: 9068/1: syscalls: switch to generic syscalltbl.sh 2021-03-25 14:13:13 +00:00
entry-ftrace.S
entry-header.S
entry-v7m.S arm: add support for TIF_NOTIFY_SIGNAL 2020-11-12 08:45:51 -07:00
fiq.c
fiqasm.S
ftrace.c ARM: 9079/1: ftrace: Add MODULE_PLTS support 2021-06-07 12:56:20 +01:00
head-common.S Merge branch 'devel-stable' into for-next 2020-12-21 11:19:26 +00:00
head-inflate-data.c
head-nommu.S
head.S ARM: 9104/2: Fix Keystone 2 kernel mapping regression 2021-08-10 12:17:25 +01:00
hibernate.c
hw_breakpoint.c ARM: 9064/1: hw_breakpoint: Do not directly check the event's overflow_handler hook 2021-03-25 10:27:41 +00:00
hyp-stub.S Merge branch 'devel-stable' into for-next 2020-12-21 11:19:26 +00:00
insn.c ARM: 9078/1: Add warn suppress parameter to arm_gen_branch_link() 2021-06-07 12:56:20 +01:00
io.c
irq.c genirq: Move non-irqdomain handle_domain_irq() handling into ARM's handle_IRQ() 2021-06-10 13:09:19 +01:00
isa.c
iwmmxt.h ARM: 9029/1: Make iwmmxt.S support Clang's integrated assembler 2020-12-08 10:14:59 +00:00
iwmmxt.S ARM: 9029/1: Make iwmmxt.S support Clang's integrated assembler 2020-12-08 10:14:59 +00:00
jump_label.c
kgdb.c maccess: rename probe_kernel_{read,write} to copy_{from,to}_kernel_nofault 2020-06-17 10:57:41 -07:00
machine_kexec.c ARM: 9060/1: kexec: Remove unused kexec_reinit callback 2021-03-09 10:25:35 +00:00
Makefile ARM updates for 5.11: 2020-12-22 13:34:27 -08:00
module-plts.c ARM: 9098/1: ftrace: MODULE_PLT: Fix build problem without DYNAMIC_FTRACE 2021-07-05 11:52:26 +01:00
module.c ARM: module: add support for place relative relocations 2020-10-28 16:59:43 +01:00
opcodes.c
paravirt.c x86/paravirt: Switch time pvops functions to use static_call() 2021-03-11 16:17:52 +01:00
patch.c
perf_callchain.c
perf_event_v6.c
perf_event_v7.c arm_pmu: Fix write counter incorrect in ARMv7 big-endian mode 2021-06-01 14:17:01 +01:00
perf_event_xscale.c
perf_regs.c perf/arch: Remove perf_sample_data::regs_user_copy 2020-11-09 18:12:34 +01:00
phys2virt.S ARM: p2v: reduce p2v alignment requirement to 2 MiB 2020-10-28 16:59:43 +01:00
pj4-cp0.c
process.c sched: Introduce task_is_running() 2021-06-18 11:43:07 +02:00
psci_smp.c
ptrace.c arm: switch to ->regset_get() 2020-07-27 14:31:09 -04:00
reboot.c ARM: 9096/1: Remove arm_pm_restart() 2021-06-13 18:16:48 +01:00
reboot.h
relocate_kernel.S ARM: kexec: fix oops after TLB are invalidated 2021-02-05 10:23:29 +00:00
return_address.c
setup.c arm: convert to setup_initial_init_mm() 2021-07-08 11:48:21 -07:00
signal.c ARM: ensure the signal page contains defined contents 2021-02-05 10:23:00 +00:00
signal.h
sigreturn_codes.S
sleep.S ARM: sleep.S: use PC-relative insn sequence for sleep_save_sp/mpidr_hash 2020-10-28 17:05:40 +01:00
smccc-call.S ARM: 9075/1: kernel: Fix interrupted SMC calls 2021-04-18 19:15:14 +01:00
smp.c sched/core: Initialize the idle task with preemption disabled 2021-05-12 13:01:45 +02:00
smp_scu.c
smp_tlb.c
smp_twd.c
stacktrace.c ARM: 8992/1: Fix unwind_frame for clang-built kernels 2020-07-21 16:33:40 +01:00
suspend.c ARM: 9066/1: ftrace: pause/unpause function graph tracer in cpu_suspend() 2021-03-25 10:27:42 +00:00
swp_emulate.c mmap locking API: use coccinelle to convert mmap_sem rwsem call sites 2020-06-09 09:39:14 -07:00
sys_arm.c
sys_oabi-compat.c ARM: 9065/1: OABI compat: fix build when EPOLL is not enabled 2021-02-22 13:07:13 +00:00
tcm.c
thumbee.c
time.c ARM: rpc: use legacy_timer_tick 2020-10-30 21:57:05 +01:00
topology.c ARM, sched/topology: Revert back to default scheduler topology 2020-08-19 10:49:47 +02:00
traps.c arm: print alloc free paths for address in registers 2021-05-07 00:26:34 -07:00
unwind.c ARM: 9026/1: unwind: remove old check for GCC <= 4.2 2020-12-08 10:13:59 +00:00
v7m.c
vdso.c mm: forbid splitting special mappings 2020-12-15 12:13:41 -08:00
vmlinux-xip.lds.S arm/build: Assert for unwanted sections 2020-09-01 10:03:18 +02:00
vmlinux.lds.S ARM: 9088/1: Split KERNEL_OFFSET from PAGE_OFFSET 2021-06-13 18:16:40 +01:00
xscale-cp0.c