]> Git Repo - linux.git/commitdiff
sh: Drop support for memory hotplug and memory hotremove
authorOscar Salvador <[email protected]>
Sat, 18 May 2024 11:58:07 +0000 (13:58 +0200)
committerJohn Paul Adrian Glaubitz <[email protected]>
Sun, 14 Jul 2024 08:52:19 +0000 (10:52 +0200)
Support for memory hotplug was restricted to 64-bit platforms in
7ec58a2b941e ("mm/memory_hotplug: restrict CONFIG_MEMORY_HOTPLUG
to 64 bit") while sh is a pure 32-bit platform since the removal
of sh5 support. Thus, drop support for memory hotplug and the
associated memory hotremove on this platform.

Signed-off-by: Oscar Salvador <[email protected]>
Reviewed-by: John Paul Adrian Glaubitz <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: John Paul Adrian Glaubitz <[email protected]>
arch/sh/Kconfig
arch/sh/mm/Kconfig
arch/sh/mm/init.c

index 5e6a3ead51fb1e5120d167702fdf55288d3e4502..1aa3c4a0c5b276260bffb449e666479bde4df0c4 100644 (file)
@@ -3,8 +3,6 @@ config SUPERH
        def_bool y
        select ARCH_32BIT_OFF_T
        select ARCH_HAS_CPU_CACHE_ALIASING
-       select ARCH_ENABLE_MEMORY_HOTPLUG if SPARSEMEM && MMU
-       select ARCH_ENABLE_MEMORY_HOTREMOVE if SPARSEMEM && MMU
        select ARCH_HAVE_NMI_SAFE_CMPXCHG if (GUSA_RB || CPU_SH4A)
        select ARCH_HAS_BINFMT_FLAT if !MMU
        select ARCH_HAS_CPU_FINALIZE_INIT
index f32a1963ff0c5693da82fd234ebbc617fd8b27a5..1862411665ab8ec631a3d6316f2498fcb0a5ceaa 100644 (file)
@@ -144,10 +144,6 @@ config ARCH_SPARSEMEM_DEFAULT
 config ARCH_SELECT_MEMORY_MODEL
        def_bool y
 
-config ARCH_MEMORY_PROBE
-       def_bool y
-       depends on MEMORY_HOTPLUG
-
 config IOREMAP_FIXED
        def_bool y
        depends on X2TLB
index bf1b5405531642d1e36649040c671e22206e580c..d1fe90b2f5ff4b8a58e0fde10980a22716337af6 100644 (file)
@@ -395,31 +395,3 @@ void __init mem_init(void)
 
        mem_init_done = 1;
 }
-
-#ifdef CONFIG_MEMORY_HOTPLUG
-int arch_add_memory(int nid, u64 start, u64 size,
-                   struct mhp_params *params)
-{
-       unsigned long start_pfn = PFN_DOWN(start);
-       unsigned long nr_pages = size >> PAGE_SHIFT;
-       int ret;
-
-       if (WARN_ON_ONCE(params->pgprot.pgprot != PAGE_KERNEL.pgprot))
-               return -EINVAL;
-
-       /* We only have ZONE_NORMAL, so this is easy.. */
-       ret = __add_pages(nid, start_pfn, nr_pages, params);
-       if (unlikely(ret))
-               printk("%s: Failed, __add_pages() == %d\n", __func__, ret);
-
-       return ret;
-}
-
-void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap)
-{
-       unsigned long start_pfn = PFN_DOWN(start);
-       unsigned long nr_pages = size >> PAGE_SHIFT;
-
-       __remove_pages(start_pfn, nr_pages, altmap);
-}
-#endif /* CONFIG_MEMORY_HOTPLUG */
This page took 0.05413 seconds and 4 git commands to generate.