linux-stable/arch
Alexey Kardashevskiy e022914f20 powerpc: Fix early setup to make early_ioremap() work
[ Upstream commit e2f5efd0f0 ]

The immediate problem is that after commit
0bd3f9e953 ("powerpc/legacy_serial: Use early_ioremap()") the kernel
silently reboots on some systems.

The reason is that early_ioremap() returns broken addresses as it uses
slot_virt[] array which initialized with offsets from FIXADDR_TOP ==
IOREMAP_END+FIXADDR_SIZE == KERN_IO_END - FIXADDR_SIZ + FIXADDR_SIZE ==
__kernel_io_end which is 0 when early_ioremap_setup() is called.
__kernel_io_end is initialized little bit later in early_init_mmu().

This fixes the initialization by swapping early_ioremap_setup() and
early_init_mmu().

Fixes: 265c3491c4 ("powerpc: Add support for GENERIC_EARLY_IOREMAP")
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
[mpe: Drop unrelated cleanup & cleanup change log]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210520032919.358935-1-aik@ozlabs.ru
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-26 12:06:50 +02:00
..
alpha local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
arc ARC: mm: Use max_high_pfn as a HIGHMEM zone border 2021-05-19 10:13:10 +02:00
arm ARM: 9075/1: kernel: Fix interrupted SMC calls 2021-05-22 11:40:53 +02:00
arm64 arm64: Fix race condition on PG_dcache_clean in __sync_icache_dcache() 2021-05-19 10:13:11 +02:00
c6x
csky csky: change a Kconfig symbol name to fix e1000 build error 2021-04-28 13:40:02 +02:00
h8300 h8300: fix PREEMPTION build, TI_PRE_COUNT undefined 2021-02-17 11:02:28 +01:00
hexagon local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
ia64 tweewide: Fix most Shebang lines 2021-05-22 11:40:55 +02:00
m68k m68k: Add missing mmap_read_lock() to sys_cacheflush() 2021-05-14 09:50:19 +02:00
microblaze local64.h: make <asm/local64.h> mandatory 2021-01-12 20:18:16 +01:00
mips MIPS: Avoid handcoded DIVU in `__div64_32' altogether 2021-05-19 10:13:17 +02:00
nds32 nds32: flush_dcache_page: use page_mapping_file to avoid races with swapoff 2021-04-14 08:41:58 +02:00
nios2 nios2: fixed broken sys_clone syscall 2021-03-04 11:38:16 +01:00
openrisc openrisc: Fix a memory leak 2021-05-26 12:06:47 +02:00
parisc parisc: avoid a warning on u8 cast for cmpxchg on u8 pointers 2021-04-14 08:41:59 +02:00
powerpc powerpc: Fix early setup to make early_ioremap() work 2021-05-26 12:06:50 +02:00
riscv riscv: Workaround mcount name prior to clang-13 2021-05-22 11:40:53 +02:00
s390 KVM: s390: extend kvm_s390_shadow_fault to return entry pointer 2021-05-14 09:50:03 +02:00
sh sh: Remove unused HAVE_COPY_THREAD_TLS macro 2021-01-27 11:55:20 +01:00
sparc sparc64: Fix opcode filtering in handling of no fault loads 2021-03-30 14:31:50 +02:00
um um: Disable CONFIG_GCOV with MODULES 2021-05-22 11:40:53 +02:00
x86 perf/x86: Avoid touching LBR_TOS MSR for Arch LBR 2021-05-26 12:06:50 +02:00
xtensa xtensa: move coprocessor_flush to the .text section 2021-04-07 15:00:09 +02:00
.gitignore
Kconfig fanotify: Fix sys_fanotify_mark() on native x86-32 2021-01-17 14:16:59 +01:00