core.c (7e6a6b400db8048bd1c06e497e338388413cf5bc) core.c (7c5ed82b800d8615cdda00729e7b62e5899f0b13)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Code to handle transition of Linux booting another kernel.
4 *
5 * Copyright (C) 2002-2003 Eric Biederman <ebiederm@xmission.com>
6 * GameCube/ppc32 port Copyright (C) 2004 Albert Herranz
7 * Copyright (C) 2005 IBM Corporation.
8 */

--- 120 unchanged lines hidden (view full) ---

129 printk("Crash kernel location must be 0x%x\n",
130 KDUMP_KERNELBASE);
131
132 crashk_res.start = KDUMP_KERNELBASE;
133#else
134 if (!crashk_res.start) {
135#ifdef CONFIG_PPC64
136 /*
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Code to handle transition of Linux booting another kernel.
4 *
5 * Copyright (C) 2002-2003 Eric Biederman <ebiederm@xmission.com>
6 * GameCube/ppc32 port Copyright (C) 2004 Albert Herranz
7 * Copyright (C) 2005 IBM Corporation.
8 */

--- 120 unchanged lines hidden (view full) ---

129 printk("Crash kernel location must be 0x%x\n",
130 KDUMP_KERNELBASE);
131
132 crashk_res.start = KDUMP_KERNELBASE;
133#else
134 if (!crashk_res.start) {
135#ifdef CONFIG_PPC64
136 /*
137 * On 64bit we split the RMO in half but cap it at half of
138 * a small SLB (128MB) since the crash kernel needs to place
139 * itself and some stacks to be in the first segment.
137 * On the LPAR platform place the crash kernel to mid of
138 * RMA size (512MB or more) to ensure the crash kernel
139 * gets enough space to place itself and some stack to be
140 * in the first segment. At the same time normal kernel
141 * also get enough space to allocate memory for essential
142 * system resource in the first segment. Keep the crash
143 * kernel starts at 128MB offset on other platforms.
140 */
144 */
141 crashk_res.start = min(0x8000000ULL, (ppc64_rma_size / 2));
145 if (firmware_has_feature(FW_FEATURE_LPAR))
146 crashk_res.start = ppc64_rma_size / 2;
147 else
148 crashk_res.start = min(0x8000000ULL, (ppc64_rma_size / 2));
142#else
143 crashk_res.start = KDUMP_KERNELBASE;
144#endif
145 }
146
147 crash_base = PAGE_ALIGN(crashk_res.start);
148 if (crash_base != crashk_res.start) {
149 printk("Crash kernel base must be aligned to 0x%lx\n",

--- 120 unchanged lines hidden ---
149#else
150 crashk_res.start = KDUMP_KERNELBASE;
151#endif
152 }
153
154 crash_base = PAGE_ALIGN(crashk_res.start);
155 if (crash_base != crashk_res.start) {
156 printk("Crash kernel base must be aligned to 0x%lx\n",

--- 120 unchanged lines hidden ---