diff options
-rw-r--r-- | arch/x86/include/asm/io_apic.h | 4 | ||||
-rw-r--r-- | arch/x86/kernel/acpi/boot.c | 8 | ||||
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 12 | ||||
-rw-r--r-- | arch/x86/kernel/mpparse.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/sfi.c | 2 |
5 files changed, 14 insertions, 14 deletions
diff --git a/arch/x86/include/asm/io_apic.h b/arch/x86/include/asm/io_apic.h index 63cb4096c3dc..9cb2edb87c2f 100644 --- a/arch/x86/include/asm/io_apic.h +++ b/arch/x86/include/asm/io_apic.h | |||
@@ -183,7 +183,7 @@ struct mp_ioapic_gsi{ | |||
183 | u32 gsi_end; | 183 | u32 gsi_end; |
184 | }; | 184 | }; |
185 | extern struct mp_ioapic_gsi mp_gsi_routing[]; | 185 | extern struct mp_ioapic_gsi mp_gsi_routing[]; |
186 | extern u32 gsi_end; | 186 | extern u32 gsi_top; |
187 | int mp_find_ioapic(u32 gsi); | 187 | int mp_find_ioapic(u32 gsi); |
188 | int mp_find_ioapic_pin(int ioapic, u32 gsi); | 188 | int mp_find_ioapic_pin(int ioapic, u32 gsi); |
189 | void __init mp_register_ioapic(int id, u32 address, u32 gsi_base); | 189 | void __init mp_register_ioapic(int id, u32 address, u32 gsi_base); |
@@ -197,7 +197,7 @@ static const int timer_through_8259 = 0; | |||
197 | static inline void ioapic_init_mappings(void) { } | 197 | static inline void ioapic_init_mappings(void) { } |
198 | static inline void ioapic_insert_resources(void) { } | 198 | static inline void ioapic_insert_resources(void) { } |
199 | static inline void probe_nr_irqs_gsi(void) { } | 199 | static inline void probe_nr_irqs_gsi(void) { } |
200 | #define gsi_end (NR_IRQS_LEGACY - 1) | 200 | #define gsi_top (NR_IRQS_LEGACY) |
201 | static inline int mp_find_ioapic(u32 gsi) { return 0; } | 201 | static inline int mp_find_ioapic(u32 gsi) { return 0; } |
202 | 202 | ||
203 | struct io_apic_irq_attr; | 203 | struct io_apic_irq_attr; |
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 60cc4058ed5f..c05872aa3ce0 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -118,7 +118,7 @@ static unsigned int gsi_to_irq(unsigned int gsi) | |||
118 | if (gsi >= NR_IRQS_LEGACY) | 118 | if (gsi >= NR_IRQS_LEGACY) |
119 | irq = gsi; | 119 | irq = gsi; |
120 | else | 120 | else |
121 | irq = gsi_end + 1 + gsi; | 121 | irq = gsi_top + gsi; |
122 | 122 | ||
123 | return irq; | 123 | return irq; |
124 | } | 124 | } |
@@ -129,10 +129,10 @@ static u32 irq_to_gsi(int irq) | |||
129 | 129 | ||
130 | if (irq < NR_IRQS_LEGACY) | 130 | if (irq < NR_IRQS_LEGACY) |
131 | gsi = isa_irq_to_gsi[irq]; | 131 | gsi = isa_irq_to_gsi[irq]; |
132 | else if (irq <= gsi_end) | 132 | else if (irq < gsi_top) |
133 | gsi = irq; | 133 | gsi = irq; |
134 | else if (irq <= (gsi_end + NR_IRQS_LEGACY)) | 134 | else if (irq < (gsi_top + NR_IRQS_LEGACY)) |
135 | gsi = irq - gsi_end; | 135 | gsi = irq - gsi_top; |
136 | else | 136 | else |
137 | gsi = 0xffffffff; | 137 | gsi = 0xffffffff; |
138 | 138 | ||
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 33f3563a2a52..e41ed24ab26d 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -89,8 +89,8 @@ int nr_ioapics; | |||
89 | /* IO APIC gsi routing info */ | 89 | /* IO APIC gsi routing info */ |
90 | struct mp_ioapic_gsi mp_gsi_routing[MAX_IO_APICS]; | 90 | struct mp_ioapic_gsi mp_gsi_routing[MAX_IO_APICS]; |
91 | 91 | ||
92 | /* The last gsi number used */ | 92 | /* The one past the highest gsi number used */ |
93 | u32 gsi_end; | 93 | u32 gsi_top; |
94 | 94 | ||
95 | /* MP IRQ source entries */ | 95 | /* MP IRQ source entries */ |
96 | struct mpc_intsrc mp_irqs[MAX_IRQ_SOURCES]; | 96 | struct mpc_intsrc mp_irqs[MAX_IRQ_SOURCES]; |
@@ -1035,7 +1035,7 @@ static int pin_2_irq(int idx, int apic, int pin) | |||
1035 | if (gsi >= NR_IRQS_LEGACY) | 1035 | if (gsi >= NR_IRQS_LEGACY) |
1036 | irq = gsi; | 1036 | irq = gsi; |
1037 | else | 1037 | else |
1038 | irq = gsi_end + 1 + gsi; | 1038 | irq = gsi_top + gsi; |
1039 | } | 1039 | } |
1040 | 1040 | ||
1041 | #ifdef CONFIG_X86_32 | 1041 | #ifdef CONFIG_X86_32 |
@@ -3853,7 +3853,7 @@ void __init probe_nr_irqs_gsi(void) | |||
3853 | { | 3853 | { |
3854 | int nr; | 3854 | int nr; |
3855 | 3855 | ||
3856 | nr = gsi_end + 1 + NR_IRQS_LEGACY; | 3856 | nr = gsi_top + NR_IRQS_LEGACY; |
3857 | if (nr > nr_irqs_gsi) | 3857 | if (nr > nr_irqs_gsi) |
3858 | nr_irqs_gsi = nr; | 3858 | nr_irqs_gsi = nr; |
3859 | 3859 | ||
@@ -4294,8 +4294,8 @@ void __init mp_register_ioapic(int id, u32 address, u32 gsi_base) | |||
4294 | */ | 4294 | */ |
4295 | nr_ioapic_registers[idx] = entries; | 4295 | nr_ioapic_registers[idx] = entries; |
4296 | 4296 | ||
4297 | if (mp_gsi_routing[idx].gsi_end > gsi_end) | 4297 | if (mp_gsi_routing[idx].gsi_end >= gsi_top) |
4298 | gsi_end = mp_gsi_routing[idx].gsi_end; | 4298 | gsi_top = mp_gsi_routing[idx].gsi_end + 1; |
4299 | 4299 | ||
4300 | printk(KERN_INFO "IOAPIC[%d]: apic_id %d, version %d, address 0x%x, " | 4300 | printk(KERN_INFO "IOAPIC[%d]: apic_id %d, version %d, address 0x%x, " |
4301 | "GSI %d-%d\n", idx, mp_ioapics[idx].apicid, | 4301 | "GSI %d-%d\n", idx, mp_ioapics[idx].apicid, |
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c index 5ae5d2426edf..d86dbf7e54be 100644 --- a/arch/x86/kernel/mpparse.c +++ b/arch/x86/kernel/mpparse.c | |||
@@ -123,7 +123,7 @@ static void __init MP_ioapic_info(struct mpc_ioapic *m) | |||
123 | printk(KERN_INFO "I/O APIC #%d Version %d at 0x%X.\n", | 123 | printk(KERN_INFO "I/O APIC #%d Version %d at 0x%X.\n", |
124 | m->apicid, m->apicver, m->apicaddr); | 124 | m->apicid, m->apicver, m->apicaddr); |
125 | 125 | ||
126 | mp_register_ioapic(m->apicid, m->apicaddr, gsi_end + 1); | 126 | mp_register_ioapic(m->apicid, m->apicaddr, gsi_top); |
127 | } | 127 | } |
128 | 128 | ||
129 | static void print_MP_intsrc_info(struct mpc_intsrc *m) | 129 | static void print_MP_intsrc_info(struct mpc_intsrc *m) |
diff --git a/arch/x86/kernel/sfi.c b/arch/x86/kernel/sfi.c index 7ded57896c0a..cb22acf3ed09 100644 --- a/arch/x86/kernel/sfi.c +++ b/arch/x86/kernel/sfi.c | |||
@@ -93,7 +93,7 @@ static int __init sfi_parse_ioapic(struct sfi_table_header *table) | |||
93 | pentry = (struct sfi_apic_table_entry *)sb->pentry; | 93 | pentry = (struct sfi_apic_table_entry *)sb->pentry; |
94 | 94 | ||
95 | for (i = 0; i < num; i++) { | 95 | for (i = 0; i < num; i++) { |
96 | mp_register_ioapic(i, pentry->phys_addr, gsi_end + 1); | 96 | mp_register_ioapic(i, pentry->phys_addr, gsi_top); |
97 | pentry++; | 97 | pentry++; |
98 | } | 98 | } |
99 | 99 | ||