Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 138660
b: refs/heads/master
c: 8d4dd91
h: refs/heads/master
v: v3
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Mar 4, 2009
1 parent c2fd2e4 commit 8344025
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 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: b68adb16f29c8ea02f21f5ebf65bcabffe217e9f
refs/heads/master: 8d4dd919b46ed982da6ef6bf6fcec454cd7a5b1b
21 changes: 20 additions & 1 deletion trunk/arch/x86/kernel/mpparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,19 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type)

static struct mpf_intel *mpf_found;

static unsigned long __init get_mpc_size(unsigned long physptr)
{
struct mpc_table *mpc;
unsigned long size;

mpc = early_ioremap(physptr, PAGE_SIZE);
size = mpc->length;
early_iounmap(mpc, PAGE_SIZE);
apic_printk(APIC_VERBOSE, " mpc: %lx-%lx\n", physptr, physptr + size);

return size;
}

/*
* Scan the memory blocks for an SMP configuration block.
*/
Expand Down Expand Up @@ -611,21 +624,27 @@ static void __init __get_smp_config(unsigned int early)
construct_default_ISA_mptable(mpf->feature1);

} else if (mpf->physptr) {
struct mpc_table *mpc;
unsigned long size;

size = get_mpc_size(mpf->physptr);
mpc = early_ioremap(mpf->physptr, size);
/*
* Read the physical hardware table. Anything here will
* override the defaults.
*/
if (!smp_read_mpc(phys_to_virt(mpf->physptr), early)) {
if (!smp_read_mpc(mpc, early)) {
#ifdef CONFIG_X86_LOCAL_APIC
smp_found_config = 0;
#endif
printk(KERN_ERR
"BIOS bug, MP table errors detected!...\n");
printk(KERN_ERR "... disabling SMP support. "
"(tell your hw vendor)\n");
early_iounmap(mpc, size);
return;
}
early_iounmap(mpc, size);

if (early)
return;
Expand Down

0 comments on commit 8344025

Please sign in to comment.