Merge branch 'linus' into perfcounters/core
[linux-drm-fsl-dcu.git] / arch / x86 / kernel / acpi / boot.c
index 4cb5964f149979deb409d85b32d1019ed18c25b6..c193ec3c695e66f2e3bfa223f513d7bbc83e45dd 100644 (file)
@@ -973,6 +973,29 @@ void __init mp_register_ioapic(int id, u32 address, u32 gsi_base)
        nr_ioapics++;
 }
 
+int __init acpi_probe_gsi(void)
+{
+       int idx;
+       int gsi;
+       int max_gsi = 0;
+
+       if (acpi_disabled)
+               return 0;
+
+       if (!acpi_ioapic)
+               return 0;
+
+       max_gsi = 0;
+       for (idx = 0; idx < nr_ioapics; idx++) {
+               gsi = mp_ioapic_routing[idx].gsi_end;
+
+               if (gsi > max_gsi)
+                       max_gsi = gsi;
+       }
+
+       return max_gsi + 1;
+}
+
 static void assign_to_mp_irq(struct mpc_intsrc *m,
                                    struct mpc_intsrc *mp_irq)
 {