.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
---|
1 | 2 | /* |
---|
2 | 3 | * machine_kexec.c - handle transition of Linux booting another kernel |
---|
3 | 4 | * Copyright (C) 2002-2003 Eric Biederman <ebiederm@xmission.com> |
---|
4 | 5 | * |
---|
5 | 6 | * GameCube/ppc32 port Copyright (C) 2004 Albert Herranz |
---|
6 | 7 | * LANDISK/sh4 supported by kogiidena |
---|
7 | | - * |
---|
8 | | - * This source code is licensed under the GNU General Public License, |
---|
9 | | - * Version 2. See the file COPYING for more details. |
---|
10 | 8 | */ |
---|
11 | 9 | #include <linux/mm.h> |
---|
12 | 10 | #include <linux/kexec.h> |
---|
.. | .. |
---|
16 | 14 | #include <linux/ftrace.h> |
---|
17 | 15 | #include <linux/suspend.h> |
---|
18 | 16 | #include <linux/memblock.h> |
---|
19 | | -#include <asm/pgtable.h> |
---|
20 | | -#include <asm/pgalloc.h> |
---|
21 | 17 | #include <asm/mmu_context.h> |
---|
22 | 18 | #include <asm/io.h> |
---|
23 | 19 | #include <asm/cacheflush.h> |
---|
.. | .. |
---|
170 | 166 | crash_size = PAGE_ALIGN(resource_size(&crashk_res)); |
---|
171 | 167 | if (!crashk_res.start) { |
---|
172 | 168 | unsigned long max = memblock_end_of_DRAM() - memory_limit; |
---|
173 | | - crashk_res.start = __memblock_alloc_base(crash_size, PAGE_SIZE, max); |
---|
| 169 | + crashk_res.start = memblock_phys_alloc_range(crash_size, |
---|
| 170 | + PAGE_SIZE, 0, max); |
---|
174 | 171 | if (!crashk_res.start) { |
---|
175 | 172 | pr_err("crashkernel allocation failed\n"); |
---|
176 | 173 | goto disable; |
---|