diff options
author | Mike Rapoport <rppt@linux.vnet.ibm.com> | 2018-07-23 08:56:58 +0300 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2018-07-23 11:32:36 -0700 |
commit | f62800992e5917f2bed143dbcdce2501bc6933a9 (patch) | |
tree | 93de6d99759cc4268ffb542e7fd284b691cc38a8 /arch/ia64/kernel/setup.c | |
parent | fb63fbee423afc6fa6f982d31c6894bb2da8f7ef (diff) | |
download | linux-f62800992e5917f2bed143dbcdce2501bc6933a9.tar.bz2 |
ia64: switch to NO_BOOTMEM
Since ia64 already uses memblock to register available physical memory it
is only required to move the calls to register_active_ranges() that wrap
memblock_add_node() earlier and replace bootmem memory reservations with
memblock_reserve(). Of course, all the code that find the place to put the
bootmem bitmap is removed.
Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/kernel/setup.c')
-rw-r--r-- | arch/ia64/kernel/setup.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index ad43cbf70628..0e6c2d9fb498 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c @@ -32,6 +32,7 @@ #include <linux/delay.h> #include <linux/cpu.h> #include <linux/kernel.h> +#include <linux/memblock.h> #include <linux/reboot.h> #include <linux/sched/mm.h> #include <linux/sched/clock.h> @@ -383,8 +384,16 @@ reserve_memory (void) sort_regions(rsvd_region, num_rsvd_regions); num_rsvd_regions = merge_regions(rsvd_region, num_rsvd_regions); -} + /* reserve all regions except the end of memory marker with memblock */ + for (n = 0; n < num_rsvd_regions - 1; n++) { + struct rsvd_region *region = &rsvd_region[n]; + phys_addr_t addr = __pa(region->start); + phys_addr_t size = region->end - region->start; + + memblock_reserve(addr, size); + } +} /** * find_initrd - get initrd parameters from the boot parameter structure |