Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116410
b: refs/heads/master
c: 71f521b
h: refs/heads/master
v: v3
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Oct 16, 2008
1 parent f5ed6f8 commit 5927e07
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a84488c213a8cfc29200344a6fb6357d48c8ed85
refs/heads/master: 71f521bbaf375b685aeea20c6b0ed8600cd6edfe
30 changes: 28 additions & 2 deletions trunk/arch/x86/kernel/acpi/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,29 @@ void __init mp_register_ioapic(int id, u32 address, u32 gsi_base)
nr_ioapics++;
}

int get_nr_irqs_via_madt(void)
{
int idx;
int nr = 0;

for (idx = 0; idx < nr_ioapics; idx++) {
if (mp_ioapic_routing[idx].gsi_end > nr)
nr = mp_ioapic_routing[idx].gsi_end;
}

nr++;

/* double it for hotplug and msi and nmi */
nr <<= 1;

/* something wrong ? */
if (nr < 32)
nr = 32;

return nr;

}

static void assign_to_mp_irq(struct mp_config_intsrc *m,
struct mp_config_intsrc *mp_irq)
{
Expand Down Expand Up @@ -1254,9 +1277,12 @@ static int __init acpi_parse_madt_ioapic_entries(void)
return count;
}


nr_irqs = get_nr_irqs_via_madt();

count =
acpi_table_parse_madt(ACPI_MADT_TYPE_INTERRUPT_OVERRIDE, acpi_parse_int_src_ovr,
NR_IRQ_VECTORS);
nr_irqs);
if (count < 0) {
printk(KERN_ERR PREFIX
"Error parsing interrupt source overrides entry\n");
Expand All @@ -1276,7 +1302,7 @@ static int __init acpi_parse_madt_ioapic_entries(void)

count =
acpi_table_parse_madt(ACPI_MADT_TYPE_NMI_SOURCE, acpi_parse_nmi_src,
NR_IRQ_VECTORS);
nr_irqs);
if (count < 0) {
printk(KERN_ERR PREFIX "Error parsing NMI SRC entry\n");
/* TBD: Cleanup to allow fallback to MPS */
Expand Down
1 change: 1 addition & 0 deletions trunk/include/asm-x86/mpspec.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ extern void mp_override_legacy_irq(u8 bus_irq, u8 polarity, u8 trigger,
u32 gsi);
extern void mp_config_acpi_legacy_irqs(void);
extern int mp_register_gsi(u32 gsi, int edge_level, int active_high_low);
extern int get_nr_irqs_via_madt(void);
#ifdef CONFIG_X86_IO_APIC
extern int mp_config_acpi_gsi(unsigned char number, unsigned int devfn, u8 pin,
u32 gsi, int triggering, int polarity);
Expand Down

0 comments on commit 5927e07

Please sign in to comment.