Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88861
b: refs/heads/master
c: 857033a
h: refs/heads/master
i:
  88859: 61f6519
v: v3
  • Loading branch information
Alexey Starikovskiy authored and Ingo Molnar committed Apr 17, 2008
1 parent 07b6a8c commit 7f2e58d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 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: d2953315c70a4783c94ae6af04f4b0aaad2f09c5
refs/heads/master: 857033a696996beb1cdc0d5ee5cfcfa91c8bbece
37 changes: 19 additions & 18 deletions trunk/arch/x86/kernel/mpparse_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,23 +287,32 @@ static void __init MP_bus_info (struct mpc_config_bus *m)
}
}

static int bad_ioapic(unsigned long address)
{
if (nr_ioapics >= MAX_IO_APICS) {
printk(KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded "
"(found %d)\n", MAX_IO_APICS, nr_ioapics);
panic("Recompile kernel with bigger MAX_IO_APICS!\n");
}
if (!address) {
printk(KERN_ERR "WARNING: Bogus (zero) I/O APIC address"
" found in table, skipping!\n");
return 1;
}
return 0;
}

static void __init MP_ioapic_info (struct mpc_config_ioapic *m)
{
if (!(m->mpc_flags & MPC_APIC_USABLE))
return;

printk(KERN_INFO "I/O APIC #%d Version %d at 0x%X.\n",
m->mpc_apicid, m->mpc_apicver, m->mpc_apicaddr);
if (nr_ioapics >= MAX_IO_APICS) {
printk(KERN_CRIT "Max # of I/O APICs (%d) exceeded (found %d).\n",
MAX_IO_APICS, nr_ioapics);
panic("Recompile kernel with bigger MAX_IO_APICS!.\n");
}
if (!m->mpc_apicaddr) {
printk(KERN_ERR "WARNING: bogus zero I/O APIC address"
" found in MP table, skipping!\n");

if (bad_ioapic(m->mpc_apicaddr))
return;
}

mp_ioapics[nr_ioapics] = *m;
nr_ioapics++;
}
Expand Down Expand Up @@ -918,16 +927,8 @@ void __init mp_register_ioapic(u8 id, u32 address, u32 gsi_base)
int idx = 0;
int tmpid;

if (nr_ioapics >= MAX_IO_APICS) {
printk(KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded "
"(found %d)\n", MAX_IO_APICS, nr_ioapics);
panic("Recompile kernel with bigger MAX_IO_APICS!\n");
}
if (!address) {
printk(KERN_ERR "WARNING: Bogus (zero) I/O APIC address"
" found in MADT table, skipping!\n");
if (bad_ioapic(address))
return;
}

idx = nr_ioapics++;

Expand Down

0 comments on commit 7f2e58d

Please sign in to comment.