public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/of: Don't log error on the missing IO-APIC unconditionally
@ 2025-01-09 18:40 Roman Kisel
  2025-01-10 19:57 ` kernel test robot
  0 siblings, 1 reply; 2+ messages in thread
From: Roman Kisel @ 2025-01-09 18:40 UTC (permalink / raw)
  To: bp, dave.hansen, hpa, ilpo.jarvinen, mingo, robh, sboyd, ssengar,
	tglx, usamaarif642, x86, linux-kernel
  Cc: apais, benhill, ssengar, sunilmut, vdso

The x86 OF code reports the missing IO-APIC wihtout any
checks whether the IO-APIC presence is required or not.
That is due to that part of the code being dovetailed to
the Intel MID platform.

Check if the IO-APIC must be available. Log the error only
when the IO-APIC is expected to be present.

Signed-off-by: Roman Kisel <romank@linux.microsoft.com>
---
 arch/x86/kernel/devicetree.c | 25 +++++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c
index 59d23cdf4ed0..5b3b47930d1c 100644
--- a/arch/x86/kernel/devicetree.c
+++ b/arch/x86/kernel/devicetree.c
@@ -47,6 +47,15 @@ static struct of_device_id __initdata ce4100_ids[] = {
 	{},
 };
 
+static bool falconfalls_compatible(void)
+{
+	if (!of_have_populated_dt())
+		return false;
+
+	return of_flat_dt_is_compatible(
+			of_get_flat_dt_root(), "intel,falconfalls");
+}
+
 static int __init add_bus_probe(void)
 {
 	if (!of_have_populated_dt())
@@ -259,12 +268,20 @@ static void __init dtb_ioapic_setup(void)
 
 	for_each_compatible_node(dn, NULL, "intel,ce4100-ioapic")
 		dtb_add_ioapic(dn);
+	if (!nr_ioapics && falconfalls_compatible())
+		pr_err("Error: No information about IO-APIC in OF.\n");
 
-	if (nr_ioapics) {
+	if (nr_ioapics)
 		of_ioapic = 1;
-		return;
-	}
-	pr_err("Error: No information about IO-APIC in OF.\n");
+
+	/*
+	 * At this point, it might so happen that no IO-APIC has been discovered.
+	 *
+	 * A general assumption would be that most x86 boards have IO-APIC,
+	 * yet that is not something the kernel should report as a firmware
+	 * bug unconditionally as there are setups (VMs would be an easy example)
+	 * that are able to employ other means of interrupt routing.
+	 */
 }
 #else
 static void __init dtb_ioapic_setup(void) {}

base-commit: eea6e4b4dfb8859446177c32961c96726d0117be
-- 
2.34.1


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

end of thread, other threads:[~2025-01-10 19:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-09 18:40 [PATCH] x86/of: Don't log error on the missing IO-APIC unconditionally Roman Kisel
2025-01-10 19:57 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox