Skip to content

Commit 4565c4f

Browse files
andy-shevrafaeljw
authored andcommitted
ACPI / x86: boot: Use INVALID_ACPI_IRQ instead of 0 for acpi_sci_override_gsi
0 is valid hardware interrupt which might be in some cases overridden. Due to this, switch to INVALID_ACPI_IRQ to mark SCI override not set. While here, change the type of the variable from int to u32 to match the GSI type used in the rest of the code. Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 220580f commit 4565c4f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

arch/x86/include/asm/acpi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ extern int acpi_fix_pin2_polarity;
4949
extern int acpi_disable_cmcff;
5050

5151
extern u8 acpi_sci_flags;
52-
extern int acpi_sci_override_gsi;
52+
extern u32 acpi_sci_override_gsi;
5353
void acpi_pic_sci_set_trigger(unsigned int, u16);
5454

5555
struct device;

arch/x86/kernel/acpi/boot.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ int acpi_ioapic;
6868
int acpi_strict;
6969
int acpi_disable_cmcff;
7070

71+
/* ACPI SCI override configuration */
7172
u8 acpi_sci_flags __initdata;
72-
int acpi_sci_override_gsi __initdata;
73+
u32 acpi_sci_override_gsi __initdata = INVALID_ACPI_IRQ;
7374
int acpi_skip_timer_override __initdata;
7475
int acpi_use_timer_override __initdata;
7576
int acpi_fix_pin2_polarity __initdata;
@@ -1209,7 +1210,7 @@ static int __init acpi_parse_madt_ioapic_entries(void)
12091210
* If BIOS did not supply an INT_SRC_OVR for the SCI
12101211
* pretend we got one so we can set the SCI flags.
12111212
*/
1212-
if (!acpi_sci_override_gsi)
1213+
if (acpi_sci_override_gsi == INVALID_ACPI_IRQ)
12131214
acpi_sci_ioapic_setup(acpi_gbl_FADT.sci_interrupt, 0, 0,
12141215
acpi_gbl_FADT.sci_interrupt);
12151216

0 commit comments

Comments
 (0)