LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] of: fdt: Remove weak early_init_dt_mark_hotplug_memory_arch()
@ 2021-08-11  8:53 Geert Uytterhoeven
  2021-08-15 14:55 ` Rob Herring
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2021-08-11  8:53 UTC (permalink / raw)
  To: Rob Herring, Frank Rowand; +Cc: devicetree, linux-kernel, Geert Uytterhoeven

Commit 41a9ada3e6b4253f ("of/fdt: mark hotpluggable memory") introduced
two (for systems with and without memblock) weak versions of
early_init_dt_mark_hotplug_memory_arch(), that could be overridden by an
architecture-specific version.  However, no overrides ever emerged.
Later, commit aca52c3983891060 ("mm: remove CONFIG_HAVE_MEMBLOCK")
removed the non-memblock version.

Remove early_init_dt_mark_hotplug_memory_arch(), and replace it by a
direct call to memblock_mark_hotplug().

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/of/fdt.c       | 7 +------
 include/linux/of_fdt.h | 1 -
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index ee8f9937227b5e45..d29e610d336d39a5 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -1120,7 +1120,7 @@ int __init early_init_dt_scan_memory(unsigned long node, const char *uname,
 		if (!hotpluggable)
 			continue;
 
-		if (early_init_dt_mark_hotplug_memory_arch(base, size))
+		if (memblock_mark_hotplug(base, size))
 			pr_warn("failed to mark hotplug range 0x%llx - 0x%llx\n",
 				base, base + size);
 	}
@@ -1235,11 +1235,6 @@ void __init __weak early_init_dt_add_memory_arch(u64 base, u64 size)
 	memblock_add(base, size);
 }
 
-int __init __weak early_init_dt_mark_hotplug_memory_arch(u64 base, u64 size)
-{
-	return memblock_mark_hotplug(base, size);
-}
-
 static void * __init early_init_dt_alloc_memory_arch(u64 size, u64 align)
 {
 	void *ptr = memblock_alloc(size, align);
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index 3b1500a0116f91fd..cf6a65b94d40e6a7 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -67,7 +67,6 @@ extern void early_init_fdt_scan_reserved_mem(void);
 extern void early_init_fdt_reserve_self(void);
 extern void __init early_init_dt_scan_chosen_arch(unsigned long node);
 extern void early_init_dt_add_memory_arch(u64 base, u64 size);
-extern int early_init_dt_mark_hotplug_memory_arch(u64 base, u64 size);
 extern u64 dt_mem_next_cell(int s, const __be32 **cellp);
 
 /* Early flat tree scan hooks */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] of: fdt: Remove weak early_init_dt_mark_hotplug_memory_arch()
  2021-08-11  8:53 [PATCH] of: fdt: Remove weak early_init_dt_mark_hotplug_memory_arch() Geert Uytterhoeven
@ 2021-08-15 14:55 ` Rob Herring
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2021-08-15 14:55 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: devicetree, Frank Rowand, linux-kernel, Rob Herring

On Wed, 11 Aug 2021 10:53:37 +0200, Geert Uytterhoeven wrote:
> Commit 41a9ada3e6b4253f ("of/fdt: mark hotpluggable memory") introduced
> two (for systems with and without memblock) weak versions of
> early_init_dt_mark_hotplug_memory_arch(), that could be overridden by an
> architecture-specific version.  However, no overrides ever emerged.
> Later, commit aca52c3983891060 ("mm: remove CONFIG_HAVE_MEMBLOCK")
> removed the non-memblock version.
> 
> Remove early_init_dt_mark_hotplug_memory_arch(), and replace it by a
> direct call to memblock_mark_hotplug().
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  drivers/of/fdt.c       | 7 +------
>  include/linux/of_fdt.h | 1 -
>  2 files changed, 1 insertion(+), 7 deletions(-)
> 

Applied, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-15 14:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-11  8:53 [PATCH] of: fdt: Remove weak early_init_dt_mark_hotplug_memory_arch() Geert Uytterhoeven
2021-08-15 14:55 ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).