diff options
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 73ec92838d83..0a053e61b3ea 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -3855,7 +3855,11 @@ int __init io_apic_get_redir_entries (int ioapic) | |||
3855 | reg_01.raw = io_apic_read(ioapic, 1); | 3855 | reg_01.raw = io_apic_read(ioapic, 1); |
3856 | raw_spin_unlock_irqrestore(&ioapic_lock, flags); | 3856 | raw_spin_unlock_irqrestore(&ioapic_lock, flags); |
3857 | 3857 | ||
3858 | return reg_01.bits.entries; | 3858 | /* The register returns the maximum index redir index |
3859 | * supported, which is one less than the total number of redir | ||
3860 | * entries. | ||
3861 | */ | ||
3862 | return reg_01.bits.entries + 1; | ||
3859 | } | 3863 | } |
3860 | 3864 | ||
3861 | void __init probe_nr_irqs_gsi(void) | 3865 | void __init probe_nr_irqs_gsi(void) |
@@ -3871,7 +3875,7 @@ void __init probe_nr_irqs_gsi(void) | |||
3871 | 3875 | ||
3872 | nr = 0; | 3876 | nr = 0; |
3873 | for (idx = 0; idx < nr_ioapics; idx++) | 3877 | for (idx = 0; idx < nr_ioapics; idx++) |
3874 | nr += io_apic_get_redir_entries(idx) + 1; | 3878 | nr += io_apic_get_redir_entries(idx); |
3875 | 3879 | ||
3876 | if (nr > nr_irqs_gsi) | 3880 | if (nr > nr_irqs_gsi) |
3877 | nr_irqs_gsi = nr; | 3881 | nr_irqs_gsi = nr; |
@@ -4306,7 +4310,7 @@ void __init mp_register_ioapic(int id, u32 address, u32 gsi_base) | |||
4306 | */ | 4310 | */ |
4307 | mp_gsi_routing[idx].gsi_base = gsi_base; | 4311 | mp_gsi_routing[idx].gsi_base = gsi_base; |
4308 | mp_gsi_routing[idx].gsi_end = gsi_base + | 4312 | mp_gsi_routing[idx].gsi_end = gsi_base + |
4309 | io_apic_get_redir_entries(idx); | 4313 | io_apic_get_redir_entries(idx) - 1; |
4310 | 4314 | ||
4311 | printk(KERN_INFO "IOAPIC[%d]: apic_id %d, version %d, address 0x%x, " | 4315 | printk(KERN_INFO "IOAPIC[%d]: apic_id %d, version %d, address 0x%x, " |
4312 | "GSI %d-%d\n", idx, mp_ioapics[idx].apicid, | 4316 | "GSI %d-%d\n", idx, mp_ioapics[idx].apicid, |