Skip to content

Commit 2833275

Browse files
Rahul TanwarKAGA-KOKO
authored andcommitted
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
1 parent 5354033 commit 2833275

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

arch/x86/kernel/devicetree.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,14 @@ static void __init dtb_lapic_setup(void)
162162
return;
163163
}
164164
smp_found_config = 1;
165-
pic_mode = 1;
165+
if (of_property_read_bool(dn, "intel,virtual-wire-mode")) {
166+
pr_info("Virtual Wire compatibility mode.\n");
167+
pic_mode = 0;
168+
} else {
169+
pr_info("IMCR and PIC compatibility mode.\n");
170+
pic_mode = 1;
171+
}
172+
166173
register_lapic_address(lapic_addr);
167174
}
168175

0 commit comments

Comments
 (0)