Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136418
b: refs/heads/master
c: f10fcd4
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Ingo Molnar committed Jan 16, 2009
1 parent 00aa4db commit eccb67d
Show file tree
Hide file tree
Showing 4 changed files with 7 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: 7de6883faad71e3a253d55b9e1a47b89ebce0a31
refs/heads/master: f10fcd47120e80f66665567dbe17f5071c7aef52
6 changes: 3 additions & 3 deletions trunk/arch/x86/include/asm/percpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,9 @@ do { \
#define early_per_cpu_ptr(_name) (_name##_early_ptr)
#define early_per_cpu_map(_name, _idx) (_name##_early_map[_idx])
#define early_per_cpu(_name, _cpu) \
(early_per_cpu_ptr(_name) ? \
early_per_cpu_ptr(_name)[_cpu] : \
per_cpu(_name, _cpu))
*(early_per_cpu_ptr(_name) ? \
&early_per_cpu_ptr(_name)[_cpu] : \
&per_cpu(_name, _cpu))

#else /* !CONFIG_SMP */
#define DEFINE_EARLY_PER_CPU(_type, _name, _initvalue) \
Expand Down
5 changes: 1 addition & 4 deletions trunk/arch/x86/include/asm/topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,7 @@ static inline int cpu_to_node(int cpu)
/* Same function but used if called before per_cpu areas are setup */
static inline int early_cpu_to_node(int cpu)
{
if (early_per_cpu_ptr(x86_cpu_to_node_map))
return early_per_cpu_ptr(x86_cpu_to_node_map)[cpu];

return per_cpu(x86_cpu_to_node_map, cpu);
return early_per_cpu(x86_cpu_to_node_map, cpu);
}

/* Returns a pointer to the cpumask of CPUs on Node 'node'. */
Expand Down
13 changes: 2 additions & 11 deletions trunk/arch/x86/kernel/apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1877,17 +1877,8 @@ void __cpuinit generic_processor_info(int apicid, int version)
#endif

#if defined(CONFIG_X86_SMP) || defined(CONFIG_X86_64)
/* are we being called early in kernel startup? */
if (early_per_cpu_ptr(x86_cpu_to_apicid)) {
u16 *cpu_to_apicid = early_per_cpu_ptr(x86_cpu_to_apicid);
u16 *bios_cpu_apicid = early_per_cpu_ptr(x86_bios_cpu_apicid);

cpu_to_apicid[cpu] = apicid;
bios_cpu_apicid[cpu] = apicid;
} else {
per_cpu(x86_cpu_to_apicid, cpu) = apicid;
per_cpu(x86_bios_cpu_apicid, cpu) = apicid;
}
early_per_cpu(x86_cpu_to_apicid, cpu) = apicid;
early_per_cpu(x86_bios_cpu_apicid, cpu) = apicid;
#endif

set_cpu_possible(cpu, true);
Expand Down

0 comments on commit eccb67d

Please sign in to comment.