diff options
Diffstat (limited to 'arch/x86/kernel/acpi/boot.c')
-rw-r--r-- | arch/x86/kernel/acpi/boot.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 2ddfabae382b..f226bdc19f69 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -1154,6 +1154,28 @@ int mp_register_gsi(u32 gsi, int triggering, int polarity) | |||
1154 | return gsi; | 1154 | return gsi; |
1155 | } | 1155 | } |
1156 | 1156 | ||
1157 | int mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin, | ||
1158 | u32 gsi, int triggering, int polarity) | ||
1159 | { | ||
1160 | struct mpc_config_intsrc intsrc; | ||
1161 | int ioapic; | ||
1162 | |||
1163 | /* print the entry should happen on mptable identically */ | ||
1164 | intsrc.mpc_type = MP_INTSRC; | ||
1165 | intsrc.mpc_irqtype = mp_INT; | ||
1166 | intsrc.mpc_irqflag = (triggering == ACPI_EDGE_SENSITIVE ? 4 : 0x0c) | | ||
1167 | (polarity == ACPI_ACTIVE_HIGH ? 1 : 3); | ||
1168 | intsrc.mpc_srcbus = number; | ||
1169 | intsrc.mpc_srcbusirq = (((devfn >> 3) & 0x1f) << 2) | ((pin - 1) & 3); | ||
1170 | ioapic = mp_find_ioapic(gsi); | ||
1171 | intsrc.mpc_dstapic = mp_ioapic_routing[ioapic].apic_id; | ||
1172 | intsrc.mpc_dstirq = gsi - mp_ioapic_routing[ioapic].gsi_base; | ||
1173 | |||
1174 | MP_intsrc_info(&intsrc); | ||
1175 | |||
1176 | return 0; | ||
1177 | } | ||
1178 | |||
1157 | /* | 1179 | /* |
1158 | * Parse IOAPIC related entries in MADT | 1180 | * Parse IOAPIC related entries in MADT |
1159 | * returns 0 on success, < 0 on error | 1181 | * returns 0 on success, < 0 on error |