linux/arch/powerpc/kernel
Sourabh Jain cee00fd800 powerpc: Set crashkernel offset to mid of RMA region
[ Upstream commit 7c5ed82b800d8615cdda00729e7b62e5899f0b13 ]

On large config LPARs (having 192 and more cores), Linux fails to boot
due to insufficient memory in the first memblock. It is due to the
memory reservation for the crash kernel which starts at 128MB offset of
the first memblock. This memory reservation for the crash kernel doesn't
leave enough space in the first memblock to accommodate other essential
system resources.

The crash kernel start address was set to 128MB offset by default to
ensure that the crash kernel get some memory below the RMA region which
is used to be of size 256MB. But given that the RMA region size can be
512MB or more, setting the crash kernel offset to mid of RMA size will
leave enough space for the kernel to allocate memory for other system
resources.

Since the above crash kernel offset change is only applicable to the LPAR
platform, the LPAR feature detection is pushed before the crash kernel
reservation. The rest of LPAR specific initialization will still
be done during pseries_probe_fw_features as usual.

This patch is dependent on changes to paca allocation for boot CPU. It
expect boot CPU to discover 1T segment support which is introduced by
the patch posted here:
https://lists.ozlabs.org/pipermail/linuxppc-dev/2022-January/239175.html

Reported-by: Abdul haleem <abdhalee@linux.vnet.ibm.com>
Signed-off-by: Sourabh Jain <sourabhjain@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220204085601.107257-1-sourabhjain@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-15 14:18:32 +02:00
..
syscalls
trace
vdso32
vdso64
.gitignore
align.c
asm-offsets.c powerpc/64: Fix stack trace not displaying final frame 2021-03-17 17:03:43 +01:00
audit.c
btext.c powerpc/btext: add missing of_node_put 2022-01-27 09:19:47 +01:00
cacheinfo.c
cacheinfo.h
compat_audit.c
cpu_setup_6xx.S
cpu_setup_44x.S
cpu_setup_fsl_booke.S
cpu_setup_pa6t.S
cpu_setup_power.S powerpc/64s: Don't init FSCR_DSCR in __init_FSCR() 2020-09-03 11:26:39 +02:00
cpu_setup_ppc970.S
cputable.c powerpc: fix hardware PMU exception bug on PowerVM compatibility mode systems 2020-03-12 13:00:31 +01:00
crash_dump.c
crash.c
dawr.c
dbell.c
dma-iommu.c powerpc/dma: Fix dma_map_ops::get_required_mask 2020-09-23 12:40:46 +02:00
dma-mask.c
dma-swiotlb.c
dt_cpu_ftrs.c powerpc/64s: Don't let DT CPU features set FSCR_DSCR 2020-06-22 09:31:23 +02:00
early_32.c
eeh_cache.c powerpc/eeh_cache: Fix a possible debugfs deadlock 2020-11-18 19:20:18 +01:00
eeh_dev.c
eeh_driver.c powerpc/eeh: Fix deadlock handling dead PHB 2020-02-28 17:22:17 +01:00
eeh_event.c
eeh_pe.c
eeh_sysfs.c
eeh.c powerpc/eeh: Fix EEH handling for hugepages in ioremap space. 2021-05-11 14:04:15 +02:00
entry_32.S powerpc/32s: Add missing call to kuep_lock on syscall entry 2021-03-04 10:26:49 +01:00
entry_64.S
epapr_hcalls.S
epapr_paravirt.c
exceptions-64e.S
exceptions-64s.S powerpc/64s: flush L1D after user accesses 2020-11-22 10:14:10 +01:00
fadump.c powerpc/fadump: Mark fadump_calculate_reserve_size as __init 2021-05-14 09:44:26 +02:00
firmware.c
fpu.S
fsl_booke_entry_mapping.S
head_8xx.S powerpc/8xx: Fix software emulation interrupt 2021-03-04 10:26:33 +01:00
head_32.h
head_32.S powerpc/603: Fix protection of user pages mapped with PROT_NONE 2021-03-17 17:03:33 +01:00
head_40x.S
head_44x.S
head_64.S powerpc/64: Fix an EMIT_BUG_ENTRY in head_64.S 2020-12-30 11:51:17 +01:00
head_booke.h
head_fsl_booke.S powerpc/kasan: Fix boot failure with RELOCATABLE && FSL_BOOKE 2020-01-26 10:00:59 +01:00
hw_breakpoint.c
idle_6xx.S
idle_book3e.S
idle_book3s.S powerpc/idle: Don't corrupt back chain when going idle 2021-10-27 09:54:28 +02:00
idle_e500.S
idle_power4.S
idle.c
ima_kexec.c
io-workarounds.c
io.c
iomap.c
iommu.c powerpc/iommu: Annotate nested lock for lockdep 2021-05-19 10:08:24 +02:00
irq.c
isa-bridge.c
jump_label.c
kexec_elf_64.c
kgdb.c
kprobes-ftrace.c
kprobes.c powerpc/kprobes: Fix kprobe Oops happens in booke 2021-08-18 08:57:01 +02:00
kvm_emul.S
kvm.c powerpc/kvm: Fix kvm_use_magic_page 2022-04-15 14:18:01 +02:00
l2cr_6xx.S
legacy_serial.c
machine_kexec_32.c
machine_kexec_64.c
machine_kexec_file_64.c
machine_kexec.c powerpc: Set crashkernel offset to mid of RMA region 2022-04-15 14:18:32 +02:00
Makefile powerpc/32: Fix boot failure with GCC latent entropy plugin 2022-02-01 17:24:36 +01:00
mce_power.c
mce.c
misc_32.S powerpc: Convert flush_icache_range & friends to C 2020-03-12 13:00:25 +01:00
misc_64.S powerpc: Convert flush_icache_range & friends to C 2020-03-12 13:00:25 +01:00
misc.S
module_32.c
module_64.c
module.c
module.lds
msi.c
note.S
nvram_64.c
of_platform.c
optprobes_head.S
optprobes.c
paca.c powerpc: Avoid broken GCC __attribute__((optimize)) 2020-12-30 11:51:09 +01:00
pci_32.c
pci_64.c
pci_dn.c powerpc/sriov: Remove VF eeh_dev state when disabling SR-IOV 2020-02-24 08:36:56 +01:00
pci_of_scan.c
pci-common.c powerpc/pci: Add ppc_md.discover_phbs() 2021-03-17 17:03:42 +01:00
pci-hotplug.c
pmc.c
ppc32.h
ppc_save_regs.S
proc_powerpc.c
process.c powerpc/64: Fix stack trace not displaying final frame 2021-03-17 17:03:43 +01:00
prom_init_check.sh
prom_init.c powerpc/prom_init: Fix improper check of prom_getprop() 2022-01-27 09:19:38 +01:00
prom_parse.c
prom.c powerpc/prom: Mark identical_pvr_fixup as __init 2021-05-14 09:44:26 +02:00
ptrace32.c
ptrace.c
reloc_32.S
reloc_64.S
rtas_flash.c
rtas_pci.c
rtas-proc.c
rtas-rtc.c
rtas.c powerpc: Set crashkernel offset to mid of RMA region 2022-04-15 14:18:32 +02:00
rtasd.c
security.c powerpc/security: Add a helper to query stf_barrier type 2021-11-17 09:48:49 +01:00
setup_32.c
setup_64.c powerpc: Avoid broken GCC __attribute__((optimize)) 2020-12-30 11:51:09 +01:00
setup-common.c powerpc/64: Set up a kernel stack for secondaries before cpu_restore() 2020-12-30 11:51:04 +01:00
setup.h powerpc: Avoid broken GCC __attribute__((optimize)) 2020-12-30 11:51:09 +01:00
signal_32.c powerpc/tm: Fix clearing MSR[TS] in current when reclaiming on signal delivery 2020-02-28 17:22:17 +01:00
signal_64.c powerpc/64/tm: Don't let userspace set regs->trap via sigreturn 2020-04-17 10:50:22 +02:00
signal.c powerpc/tm: Fix clearing MSR[TS] in current when reclaiming on signal delivery 2020-02-28 17:22:17 +01:00
signal.h
smp-tbsync.c
smp.c powerpc: handle kdump appropriately with crash_kexec_post_notifiers option 2022-01-27 09:19:48 +01:00
stacktrace.c powerpc/stacktrace: Include linux/delay.h 2021-09-22 12:26:23 +02:00
suspend.c
swsusp_32.S
swsusp_64.c
swsusp_asm64.S
swsusp_booke.S
swsusp.c
sys_ppc32.c
syscalls.c
sysfs.c powerpc: Warn about use of smt_snooze_delay 2020-11-05 11:43:31 +01:00
systbl_chk.sh
systbl.S
tau_6xx.c powerpc/tau: Disable TAU between measurements 2020-10-29 09:57:49 +01:00
time.c Revert "powerpc/64: irq_work avoid interrupt when called with hardware irqs enabled" 2020-04-29 16:33:01 +02:00
tm.S
traps.c powerpc: improve handling of unrecoverable system reset 2021-03-17 17:03:42 +01:00
ucall.S
udbg_16550.c
udbg.c
uprobes.c
vdso.c powerpc/vdso: Fix vdso cpu truncation 2020-08-19 08:16:12 +02:00
vecemu.c
vector.S
vmlinux.lds.S vmlinux.lds.h: Create section for protection against instrumentation 2021-02-17 10:35:16 +01:00
watchdog.c powerpc/watchdog: Fix missed watchdog reset due to memory ordering race 2022-01-27 09:19:47 +01:00