.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) |
---|
3 | | - * Licensed under the GPL |
---|
4 | 4 | */ |
---|
5 | 5 | |
---|
6 | 6 | #include <linux/init.h> |
---|
7 | | -#include <linux/bootmem.h> |
---|
| 7 | +#include <linux/memblock.h> |
---|
8 | 8 | #include <linux/initrd.h> |
---|
9 | 9 | #include <asm/types.h> |
---|
10 | 10 | #include <init.h> |
---|
.. | .. |
---|
36 | 36 | return 0; |
---|
37 | 37 | } |
---|
38 | 38 | |
---|
39 | | - area = alloc_bootmem(size); |
---|
| 39 | + area = memblock_alloc(size, SMP_CACHE_BYTES); |
---|
| 40 | + if (!area) |
---|
| 41 | + panic("%s: Failed to allocate %llu bytes\n", __func__, size); |
---|
40 | 42 | |
---|
41 | 43 | if (load_initrd(initrd, area, size) == -1) |
---|
42 | 44 | return 0; |
---|