Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6990
b: refs/heads/master
c: 4ad8d38
h: refs/heads/master
v: v3
  • Loading branch information
Zwane Mwaikambo authored and Linus Torvalds committed Sep 5, 2005
1 parent 5fc8965 commit 6d47519
Show file tree
Hide file tree
Showing 5 changed files with 15 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: d7271b14b2e9e5905aba0fbf5c4dc4f8980c0cb2
refs/heads/master: 4ad8d38342430f8b52f7a8458dce90caf8c8ca64
8 changes: 7 additions & 1 deletion trunk/arch/i386/kernel/mpparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ static int MP_valid_apicid(int apicid, int version)

static void __init MP_processor_info (struct mpc_config_processor *m)
{
int ver, apicid;
int ver, apicid, cpu, found_bsp = 0;
physid_mask_t tmp;

if (!(m->mpc_cpuflag & CPU_ENABLED))
Expand Down Expand Up @@ -181,6 +181,7 @@ static void __init MP_processor_info (struct mpc_config_processor *m)
if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) {
Dprintk(" Bootup CPU\n");
boot_cpu_physical_apicid = m->mpc_apicid;
found_bsp = 1;
}

if (num_processors >= NR_CPUS) {
Expand All @@ -204,6 +205,11 @@ static void __init MP_processor_info (struct mpc_config_processor *m)
return;
}

if (found_bsp)
cpu = 0;
else
cpu = num_processors - 1;
cpu_set(cpu, cpu_possible_map);
tmp = apicid_to_cpu_present(apicid);
physids_or(phys_cpu_present_map, phys_cpu_present_map, tmp);

Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/i386/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ EXPORT_SYMBOL(cpu_online_map);
cpumask_t cpu_callin_map;
cpumask_t cpu_callout_map;
EXPORT_SYMBOL(cpu_callout_map);
cpumask_t cpu_possible_map;
EXPORT_SYMBOL(cpu_possible_map);
static cpumask_t smp_commenced_mask;

/* TSC's upper 32 bits can't be written in eariler CPU (before prescott), there
Expand Down Expand Up @@ -1265,6 +1267,7 @@ void __devinit smp_prepare_boot_cpu(void)
cpu_set(smp_processor_id(), cpu_online_map);
cpu_set(smp_processor_id(), cpu_callout_map);
cpu_set(smp_processor_id(), cpu_present_map);
cpu_set(smp_processor_id(), cpu_possible_map);
per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE;
}

Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/i386/mach-voyager/voyager_smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ static cpumask_t smp_commenced_mask = CPU_MASK_NONE;
cpumask_t cpu_callin_map = CPU_MASK_NONE;
cpumask_t cpu_callout_map = CPU_MASK_NONE;
EXPORT_SYMBOL(cpu_callout_map);
cpumask_t cpu_possible_map = CPU_MASK_ALL;
EXPORT_SYMBOL(cpu_possible_map);

/* The per processor IRQ masks (these are usually kept in sync) */
static __u16 vic_irq_mask[NR_CPUS] __cacheline_aligned;
Expand Down Expand Up @@ -1910,6 +1912,7 @@ void __devinit smp_prepare_boot_cpu(void)
{
cpu_set(smp_processor_id(), cpu_online_map);
cpu_set(smp_processor_id(), cpu_callout_map);
cpu_set(smp_processor_id(), cpu_possible_map);
}

int __devinit
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/asm-i386/smp.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ extern void cpu_uninit(void);

extern cpumask_t cpu_callout_map;
extern cpumask_t cpu_callin_map;
#define cpu_possible_map cpu_callout_map
extern cpumask_t cpu_possible_map;

/* We don't mark CPUs online until __cpu_up(), so we need another measure */
static inline int num_booting_cpus(void)
Expand Down

0 comments on commit 6d47519

Please sign in to comment.