* [PATCH v1 1/1] x86/of: Remove unused early_init_dt_add_memory_arch()
@ 2022-11-24 18:48 Andy Shevchenko
2022-12-02 14:04 ` [tip: x86/apic] " tip-bot2 for Andy Shevchenko
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2022-11-24 18:48 UTC (permalink / raw)
To: Andy Shevchenko, linux-kernel
Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
H. Peter Anvin, Rob Herring
Recently the objtool starts complaining on the dead code
in the object files, in particular
vmlinux.o: warning: objtool: early_init_dt_scan_memory+0x191: unreachable instruction
when CONFIG_OF=y.
Indeed, the entire early_init_dt_scan() is not used on x86 and making it
compile (with help of CONFIG_OF) will abrupt the code flow since in the
middle of it we have a BUG() instruction.
Remove the entire culprit function to make objtool happy.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
arch/x86/kernel/devicetree.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c
index 5cd51f25f446..59438d2b204c 100644
--- a/arch/x86/kernel/devicetree.c
+++ b/arch/x86/kernel/devicetree.c
@@ -31,11 +31,6 @@ char __initdata cmd_line[COMMAND_LINE_SIZE];
int __initdata of_ioapic;
-void __init early_init_dt_add_memory_arch(u64 base, u64 size)
-{
- BUG();
-}
-
void __init add_dtb(u64 data)
{
initial_dtb = data + offsetof(struct setup_data, data);
--
2.35.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [tip: x86/apic] x86/of: Remove unused early_init_dt_add_memory_arch()
2022-11-24 18:48 [PATCH v1 1/1] x86/of: Remove unused early_init_dt_add_memory_arch() Andy Shevchenko
@ 2022-12-02 14:04 ` tip-bot2 for Andy Shevchenko
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Andy Shevchenko @ 2022-12-02 14:04 UTC (permalink / raw)
To: linux-tip-commits; +Cc: Andy Shevchenko, Thomas Gleixner, x86, linux-kernel
The following commit has been merged into the x86/apic branch of tip:
Commit-ID: 9b09927c0cdec4d4e75f7f9e621eaec179a888fd
Gitweb: https://git.kernel.org/tip/9b09927c0cdec4d4e75f7f9e621eaec179a888fd
Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
AuthorDate: Thu, 24 Nov 2022 20:48:24 +02:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Fri, 02 Dec 2022 14:57:13 +01:00
x86/of: Remove unused early_init_dt_add_memory_arch()
Recently objtool started complaining about dead code in the object files,
in particular
vmlinux.o: warning: objtool: early_init_dt_scan_memory+0x191: unreachable instruction
when CONFIG_OF=y.
Indeed, early_init_dt_scan() is not used on x86 and making it compile (with
help of CONFIG_OF) will abrupt the code flow since in the middle of it
there is a BUG() instruction.
Remove the pointless function.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20221124184824.9548-1-andriy.shevchenko@linux.intel.com
---
arch/x86/kernel/devicetree.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c
index 5cd51f2..59438d2 100644
--- a/arch/x86/kernel/devicetree.c
+++ b/arch/x86/kernel/devicetree.c
@@ -31,11 +31,6 @@ char __initdata cmd_line[COMMAND_LINE_SIZE];
int __initdata of_ioapic;
-void __init early_init_dt_add_memory_arch(u64 base, u64 size)
-{
- BUG();
-}
-
void __init add_dtb(u64 data)
{
initial_dtb = data + offsetof(struct setup_data, data);
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-12-02 14:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-24 18:48 [PATCH v1 1/1] x86/of: Remove unused early_init_dt_add_memory_arch() Andy Shevchenko
2022-12-02 14:04 ` [tip: x86/apic] " tip-bot2 for Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox