mdesc.c (9a8dd708d547268c899f1cb443c49bd4d8c84eb3) | mdesc.c (53ab85ebfd27cdf16c8ddc72781c072a63bef3cb) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* mdesc.c: Sun4V machine description handling. 3 * 4 * Copyright (C) 2007, 2008 David S. Miller <davem@davemloft.net> 5 */ 6#include <linux/kernel.h> 7#include <linux/types.h> 8#include <linux/memblock.h> 9#include <linux/log2.h> 10#include <linux/list.h> 11#include <linux/slab.h> 12#include <linux/mm.h> 13#include <linux/miscdevice.h> 14#include <linux/bootmem.h> | 1// SPDX-License-Identifier: GPL-2.0 2/* mdesc.c: Sun4V machine description handling. 3 * 4 * Copyright (C) 2007, 2008 David S. Miller <davem@davemloft.net> 5 */ 6#include <linux/kernel.h> 7#include <linux/types.h> 8#include <linux/memblock.h> 9#include <linux/log2.h> 10#include <linux/list.h> 11#include <linux/slab.h> 12#include <linux/mm.h> 13#include <linux/miscdevice.h> 14#include <linux/bootmem.h> |
15#include <linux/memblock.h> |
|
15#include <linux/export.h> 16#include <linux/refcount.h> 17 18#include <asm/cpudata.h> 19#include <asm/hypervisor.h> 20#include <asm/mdesc.h> 21#include <asm/prom.h> 22#include <linux/uaccess.h> --- 162 unchanged lines hidden (view full) --- 185 unsigned int alloc_size; 186 unsigned long start; 187 188 BUG_ON(refcount_read(&hp->refcnt) != 0); 189 BUG_ON(!list_empty(&hp->list)); 190 191 alloc_size = PAGE_ALIGN(hp->handle_size); 192 start = __pa(hp); | 16#include <linux/export.h> 17#include <linux/refcount.h> 18 19#include <asm/cpudata.h> 20#include <asm/hypervisor.h> 21#include <asm/mdesc.h> 22#include <asm/prom.h> 23#include <linux/uaccess.h> --- 162 unchanged lines hidden (view full) --- 186 unsigned int alloc_size; 187 unsigned long start; 188 189 BUG_ON(refcount_read(&hp->refcnt) != 0); 190 BUG_ON(!list_empty(&hp->list)); 191 192 alloc_size = PAGE_ALIGN(hp->handle_size); 193 start = __pa(hp); |
193 free_bootmem_late(start, alloc_size); | 194 memblock_free_late(start, alloc_size); |
194} 195 196static struct mdesc_mem_ops memblock_mdesc_ops = { 197 .alloc = mdesc_memblock_alloc, 198 .free = mdesc_memblock_free, 199}; 200 201static struct mdesc_handle *mdesc_kmalloc(unsigned int mdesc_size) --- 1150 unchanged lines hidden --- | 195} 196 197static struct mdesc_mem_ops memblock_mdesc_ops = { 198 .alloc = mdesc_memblock_alloc, 199 .free = mdesc_memblock_free, 200}; 201 202static struct mdesc_handle *mdesc_kmalloc(unsigned int mdesc_size) --- 1150 unchanged lines hidden --- |