Skip to content

Commit a71ac6c

Browse files
osalvadorvilardagaglaubitz
authored andcommitted
sh: Drop support for memory hotplug and memory hotremove
Support for memory hotplug was restricted to 64-bit platforms in 7ec58a2 ("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 <osalvador@suse.de> Reviewed-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Link: https://lore.kernel.org/r/20240518115808.8888-2-osalvador@suse.de Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
1 parent 1613e60 commit a71ac6c

File tree

3 files changed

+0
-34
lines changed

3 files changed

+0
-34
lines changed

arch/sh/Kconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ config SUPERH
33
def_bool y
44
select ARCH_32BIT_OFF_T
55
select ARCH_HAS_CPU_CACHE_ALIASING
6-
select ARCH_ENABLE_MEMORY_HOTPLUG if SPARSEMEM && MMU
7-
select ARCH_ENABLE_MEMORY_HOTREMOVE if SPARSEMEM && MMU
86
select ARCH_HAVE_NMI_SAFE_CMPXCHG if (GUSA_RB || CPU_SH4A)
97
select ARCH_HAS_BINFMT_FLAT if !MMU
108
select ARCH_HAS_CPU_FINALIZE_INIT

arch/sh/mm/Kconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,6 @@ config ARCH_SPARSEMEM_DEFAULT
144144
config ARCH_SELECT_MEMORY_MODEL
145145
def_bool y
146146

147-
config ARCH_MEMORY_PROBE
148-
def_bool y
149-
depends on MEMORY_HOTPLUG
150-
151147
config IOREMAP_FIXED
152148
def_bool y
153149
depends on X2TLB

arch/sh/mm/init.c

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -395,31 +395,3 @@ void __init mem_init(void)
395395

396396
mem_init_done = 1;
397397
}
398-
399-
#ifdef CONFIG_MEMORY_HOTPLUG
400-
int arch_add_memory(int nid, u64 start, u64 size,
401-
struct mhp_params *params)
402-
{
403-
unsigned long start_pfn = PFN_DOWN(start);
404-
unsigned long nr_pages = size >> PAGE_SHIFT;
405-
int ret;
406-
407-
if (WARN_ON_ONCE(params->pgprot.pgprot != PAGE_KERNEL.pgprot))
408-
return -EINVAL;
409-
410-
/* We only have ZONE_NORMAL, so this is easy.. */
411-
ret = __add_pages(nid, start_pfn, nr_pages, params);
412-
if (unlikely(ret))
413-
printk("%s: Failed, __add_pages() == %d\n", __func__, ret);
414-
415-
return ret;
416-
}
417-
418-
void arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap)
419-
{
420-
unsigned long start_pfn = PFN_DOWN(start);
421-
unsigned long nr_pages = size >> PAGE_SHIFT;
422-
423-
__remove_pages(start_pfn, nr_pages, altmap);
424-
}
425-
#endif /* CONFIG_MEMORY_HOTPLUG */

0 commit comments

Comments
 (0)