diff options
author | Yoshinori Sato <ysato@users.sourceforge.jp> | 2019-06-02 08:46:11 +0200 |
---|---|---|
committer | Yoshinori Sato <ysato@users.sourceforge.jp> | 2019-06-02 08:46:11 +0200 |
commit | 860dbce3d8dd90cb9e909c58fa79808766243651 (patch) | |
tree | f68920c82fa779ae37bbce08a58259e5c3934ab3 /arch/sh/mm/init.c | |
parent | Fix allyesconfig output. (diff) | |
parent | Merge tag 'nfsd-5.2-1' of git://linux-nfs.org/~bfields/linux (diff) | |
download | linux-860dbce3d8dd90cb9e909c58fa79808766243651.tar.xz linux-860dbce3d8dd90cb9e909c58fa79808766243651.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
Diffstat (limited to 'arch/sh/mm/init.c')
-rw-r--r-- | arch/sh/mm/init.c | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c index 70621324db41..13c6a6bb5fd9 100644 --- a/arch/sh/mm/init.c +++ b/arch/sh/mm/init.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * linux/arch/sh/mm/init.c * @@ -26,7 +27,7 @@ #include <asm/sections.h> #include <asm/setup.h> #include <asm/cache.h> -#include <asm/sizes.h> +#include <linux/sizes.h> pgd_t swapper_pg_dir[PTRS_PER_PGD]; @@ -403,28 +404,16 @@ void __init mem_init(void) mem_init_done = 1; } -void free_initmem(void) -{ - free_initmem_default(-1); -} - -#ifdef CONFIG_BLK_DEV_INITRD -void free_initrd_mem(unsigned long start, unsigned long end) -{ - free_reserved_area((void *)start, (void *)end, -1, "initrd"); -} -#endif - #ifdef CONFIG_MEMORY_HOTPLUG -int arch_add_memory(int nid, u64 start, u64 size, struct vmem_altmap *altmap, - bool want_memblock) +int arch_add_memory(int nid, u64 start, u64 size, + struct mhp_restrictions *restrictions) { unsigned long start_pfn = PFN_DOWN(start); unsigned long nr_pages = size >> PAGE_SHIFT; int ret; /* We only have ZONE_NORMAL, so this is easy.. */ - ret = __add_pages(nid, start_pfn, nr_pages, altmap, want_memblock); + ret = __add_pages(nid, start_pfn, nr_pages, restrictions); if (unlikely(ret)) printk("%s: Failed, __add_pages() == %d\n", __func__, ret); @@ -441,20 +430,15 @@ EXPORT_SYMBOL_GPL(memory_add_physaddr_to_nid); #endif #ifdef CONFIG_MEMORY_HOTREMOVE -int arch_remove_memory(int nid, u64 start, u64 size, struct vmem_altmap *altmap) +void arch_remove_memory(int nid, u64 start, u64 size, + struct vmem_altmap *altmap) { unsigned long start_pfn = PFN_DOWN(start); unsigned long nr_pages = size >> PAGE_SHIFT; struct zone *zone; - int ret; zone = page_zone(pfn_to_page(start_pfn)); - ret = __remove_pages(zone, start_pfn, nr_pages, altmap); - if (unlikely(ret)) - pr_warn("%s: Failed, __remove_pages() == %d\n", __func__, - ret); - - return ret; + __remove_pages(zone, start_pfn, nr_pages, altmap); } #endif #endif /* CONFIG_MEMORY_HOTPLUG */ |