memmap.c (9a8dd708d547268c899f1cb443c49bd4d8c84eb3) memmap.c (7e1c4e27928e5f87b9b1eaf06dc31773b2f1e7f1)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Common EFI memory map functions.
4 */
5
6#define pr_fmt(fmt) "efi: " fmt
7
8#include <linux/init.h>
9#include <linux/kernel.h>
10#include <linux/efi.h>
11#include <linux/io.h>
12#include <asm/early_ioremap.h>
13#include <linux/memblock.h>
14#include <linux/slab.h>
15
16static phys_addr_t __init __efi_memmap_alloc_early(unsigned long size)
17{
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Common EFI memory map functions.
4 */
5
6#define pr_fmt(fmt) "efi: " fmt
7
8#include <linux/init.h>
9#include <linux/kernel.h>
10#include <linux/efi.h>
11#include <linux/io.h>
12#include <asm/early_ioremap.h>
13#include <linux/memblock.h>
14#include <linux/slab.h>
15
16static phys_addr_t __init __efi_memmap_alloc_early(unsigned long size)
17{
18 return memblock_phys_alloc(size, 0);
18 return memblock_phys_alloc(size, SMP_CACHE_BYTES);
19}
20
21static phys_addr_t __init __efi_memmap_alloc_late(unsigned long size)
22{
23 unsigned int order = get_order(size);
24 struct page *p = alloc_pages(GFP_KERNEL, order);
25
26 if (!p)

--- 316 unchanged lines hidden ---
19}
20
21static phys_addr_t __init __efi_memmap_alloc_late(unsigned long size)
22{
23 unsigned int order = get_order(size);
24 struct page *p = alloc_pages(GFP_KERNEL, order);
25
26 if (!p)

--- 316 unchanged lines hidden ---