Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23799
b: refs/heads/master
c: 51f62e1
h: refs/heads/master
i:
  23797: fb6a09a
  23795: 7c58ae8
  23791: c4aeae3
v: v3
  • Loading branch information
Ashok Raj authored and Linus Torvalds committed Mar 25, 2006
1 parent a8bcd10 commit 418b5fc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 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: 45948d7720e8bd0104696087c6305fdd90e3b298
refs/heads/master: 51f62e186b78f8743246a349b09be370c8735479
19 changes: 8 additions & 11 deletions trunk/arch/x86_64/kernel/mpparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ static int __init mpf_checksum(unsigned char *mp, int len)
return sum & 0xFF;
}

static void __init MP_processor_info (struct mpc_config_processor *m)
static void __cpuinit MP_processor_info (struct mpc_config_processor *m)
{
int cpu;
unsigned char ver;
static int found_bsp=0;
cpumask_t tmp_map;

if (!(m->mpc_cpuflag & CPU_ENABLED)) {
disabled_cpus++;
Expand All @@ -133,8 +133,10 @@ static void __init MP_processor_info (struct mpc_config_processor *m)
return;
}

cpu = num_processors++;

num_processors++;
cpus_complement(tmp_map, cpu_present_map);
cpu = first_cpu(tmp_map);

#if MAX_APICS < 255
if ((int)m->mpc_apicid > MAX_APICS) {
printk(KERN_ERR "Processor #%d INVALID. (Max ID: %d).\n",
Expand All @@ -160,12 +162,7 @@ static void __init MP_processor_info (struct mpc_config_processor *m)
* entry is BSP, and so on.
*/
cpu = 0;

bios_cpu_apicid[0] = m->mpc_apicid;
x86_cpu_to_apicid[0] = m->mpc_apicid;
found_bsp = 1;
} else
cpu = num_processors - found_bsp;
}
bios_cpu_apicid[cpu] = m->mpc_apicid;
x86_cpu_to_apicid[cpu] = m->mpc_apicid;

Expand Down Expand Up @@ -691,7 +688,7 @@ void __init mp_register_lapic_address (
}


void __init mp_register_lapic (
void __cpuinit mp_register_lapic (
u8 id,
u8 enabled)
{
Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/x86_64/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,12 @@ void __init setup_arch(char **cmdline_p)

check_ioapic();

/*
* set this early, so we dont allocate cpu0
* if MADT list doesnt list BSP first
* mpparse.c/MP_processor_info() allocates logical cpu numbers.
*/
cpu_set(0, cpu_present_map);
#ifdef CONFIG_ACPI
/*
* Read APIC and some other early information from ACPI tables.
Expand Down

0 comments on commit 418b5fc

Please sign in to comment.