mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Rahul Tanwar" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Rahul Tanwar <rtanwar@maxlinear.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/apic] x86/of: Add support for boot time interrupt delivery mode configuration
Date: Fri, 02 Dec 2022 14:03:57 -0000	[thread overview]
Message-ID: <166998983740.4906.7393408926569297500.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20221124084143.21841-5-rtanwar@maxlinear.com>

The following commit has been merged into the x86/apic branch of tip:

Commit-ID:     2833275568755eb937a52c358bf8bfa7125a463e
Gitweb:        https://git.kernel.org/tip/2833275568755eb937a52c358bf8bfa7125a463e
Author:        Rahul Tanwar <rtanwar@maxlinear.com>
AuthorDate:    Thu, 24 Nov 2022 16:41:43 +08:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Fri, 02 Dec 2022 14:57:14 +01:00

x86/of: Add support for boot time interrupt delivery mode configuration

Presently, init/boot time interrupt delivery mode is enumerated only for
ACPI enabled systems by parsing MADT table or for older systems by parsing
MP table. But for OF based x86 systems, it is assumed & hardcoded to be
legacy PIC mode. This causes a boot time crash for platforms which do not
provide a 8259 compliant legacy PIC.

Add support for configuration of init time interrupt delivery mode for x86
OF based systems by introducing a new optional boolean property
'intel,virtual-wire-mode' for the local APIC interrupt-controller
node. This property emulates IMCRP Bit 7 of MP feature info byte 2 of MP
floating pointer structure.

Defaults to legacy PIC mode if absent. Configures it to virtual wire
compatibility mode if present.

Signed-off-by: Rahul Tanwar <rtanwar@maxlinear.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20221124084143.21841-5-rtanwar@maxlinear.com

---
 arch/x86/kernel/devicetree.c |  9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c
index 484783f..28da5dd 100644
--- a/arch/x86/kernel/devicetree.c
+++ b/arch/x86/kernel/devicetree.c
@@ -162,7 +162,14 @@ static void __init dtb_lapic_setup(void)
 			return;
 	}
 	smp_found_config = 1;
-	pic_mode = 1;
+	if (of_property_read_bool(dn, "intel,virtual-wire-mode")) {
+		pr_info("Virtual Wire compatibility mode.\n");
+		pic_mode = 0;
+	} else {
+		pr_info("IMCR and PIC compatibility mode.\n");
+		pic_mode = 1;
+	}
+
 	register_lapic_address(lapic_addr);
 }
 

      reply	other threads:[~2022-12-02 14:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-24  8:41 [PATCH v5 0/4] x86/of: Add support for interrupt mode config for x86 OF systems Rahul Tanwar
2022-11-24  8:41 ` [PATCH v5 1/4] dt-bindings: x86: apic: Convert Intel's APIC bindings to YAML schema Rahul Tanwar
2022-11-30 21:21   ` Rob Herring
2022-12-02 14:04   ` [tip: x86/apic] " tip-bot2 for Rahul Tanwar
2022-11-24  8:41 ` [PATCH v5 2/4] dt-bindings: x86: apic: Introduce new optional bool property for lapic Rahul Tanwar
2022-11-30 21:21   ` Rob Herring
2022-12-02 14:03   ` [tip: x86/apic] " tip-bot2 for Rahul Tanwar
2022-11-24  8:41 ` [PATCH v5 3/4] x86/of: Replace printk(KERN_LVL) with pr_lvl() Rahul Tanwar
2022-12-02 14:03   ` [tip: x86/apic] " tip-bot2 for Rahul Tanwar
2022-11-24  8:41 ` [PATCH v5 4/4] x86/of: Add support for boot time interrupt delivery mode configuration Rahul Tanwar
2022-12-02 14:03   ` tip-bot2 for Rahul Tanwar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=166998983740.4906.7393408926569297500.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=rtanwar@maxlinear.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®