mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-26 03:40:55 +07:00
arch/arm/kernel/: use memblock apis for early memory allocations
Switch to memblock interfaces for early memory allocator instead of bootmem allocator. No functional change in beahvior than what it is in current code from bootmem users points of view. Archs already converted to NO_BOOTMEM now directly use memblock interfaces instead of bootmem wrappers build on top of memblock. And the archs which still uses bootmem, these new apis just fallback to exiting bootmem APIs. Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Christoph Lameter <cl@linux-foundation.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Grygorii Strashko <grygorii.strashko@ti.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Cc: Michal Hocko <mhocko@suse.cz> Cc: Paul Walmsley <paul@pwsan.com> Cc: Pavel Machek <pavel@ucw.cz> Cc: Russell King <linux@arm.linux.org.uk> Cc: Tejun Heo <tj@kernel.org> Cc: Tony Lindgren <tony@atomide.com> Cc: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
4fc0bc58cb
commit
9233d2be10
@ -33,7 +33,7 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
|
|||||||
|
|
||||||
void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
|
void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
|
||||||
{
|
{
|
||||||
return alloc_bootmem_align(size, align);
|
return memblock_virt_alloc(size, align);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __init arm_dt_memblock_reserve(void)
|
void __init arm_dt_memblock_reserve(void)
|
||||||
|
@ -717,7 +717,7 @@ static void __init request_standard_resources(const struct machine_desc *mdesc)
|
|||||||
kernel_data.end = virt_to_phys(_end - 1);
|
kernel_data.end = virt_to_phys(_end - 1);
|
||||||
|
|
||||||
for_each_memblock(memory, region) {
|
for_each_memblock(memory, region) {
|
||||||
res = alloc_bootmem_low(sizeof(*res));
|
res = memblock_virt_alloc(sizeof(*res), 0);
|
||||||
res->name = "System RAM";
|
res->name = "System RAM";
|
||||||
res->start = __pfn_to_phys(memblock_region_memory_base_pfn(region));
|
res->start = __pfn_to_phys(memblock_region_memory_base_pfn(region));
|
||||||
res->end = __pfn_to_phys(memblock_region_memory_end_pfn(region)) - 1;
|
res->end = __pfn_to_phys(memblock_region_memory_end_pfn(region)) - 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user