Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145642
b: refs/heads/master
c: 2759c32
h: refs/heads/master
v: v3
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed May 18, 2009
1 parent bb3a008 commit 06a5ca1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 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: e5198075c67a22ec9a09565b1ce88d3d3f5ba855
refs/heads/master: 2759c3287de27266e06f1f4e82cbd2d65f6a044c
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/apic/apic_flat_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ static int flat_apic_id_registered(void)

static int flat_phys_pkg_id(int initial_apic_id, int index_msb)
{
return hard_smp_processor_id() >> index_msb;
return initial_apic_id >> index_msb;
}

struct apic apic_flat = {
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/cpu/amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ static void __cpuinit srat_detect_node(struct cpuinfo_x86 *c)
#if defined(CONFIG_NUMA) && defined(CONFIG_X86_64)
int cpu = smp_processor_id();
int node;
unsigned apicid = hard_smp_processor_id();
unsigned apicid = cpu_has_apic ? hard_smp_processor_id() : c->apicid;

node = c->phys_proc_id;
if (apicid_to_node[apicid] != NUMA_NO_NODE)
Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/x86/kernel/cpu/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,12 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
if (this_cpu->c_identify)
this_cpu->c_identify(c);

/* Clear/Set all flags overriden by options, after probe */
for (i = 0; i < NCAPINTS; i++) {
c->x86_capability[i] &= ~cpu_caps_cleared[i];
c->x86_capability[i] |= cpu_caps_set[i];
}

#ifdef CONFIG_X86_64
c->apicid = apic->phys_pkg_id(c->initial_apicid, 0);
#endif
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/x86/kernel/cpu/intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,12 @@ static void __cpuinit intel_workarounds(struct cpuinfo_x86 *c)
}
#endif

static void __cpuinit srat_detect_node(void)
static void __cpuinit srat_detect_node(struct cpuinfo_x86 *c)
{
#if defined(CONFIG_NUMA) && defined(CONFIG_X86_64)
unsigned node;
int cpu = smp_processor_id();
int apicid = hard_smp_processor_id();
int apicid = cpu_has_apic ? hard_smp_processor_id() : c->apicid;

/* Don't do the funky fallback heuristics the AMD version employs
for now. */
Expand Down Expand Up @@ -400,7 +400,7 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c)
}

/* Work around errata */
srat_detect_node();
srat_detect_node(c);

if (cpu_has(c, X86_FEATURE_VMX))
detect_vmx_virtcap(c);
Expand Down

0 comments on commit 06a5ca1

Please sign in to comment.