Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277431
b: refs/heads/master
c: 64be4c1
h: refs/heads/master
i:
  277429: 8e7d04a
  277427: 0534c3b
  277423: 3d45964
v: v3
  • Loading branch information
Daniel J Blueman authored and Ingo Molnar committed Dec 5, 2011
1 parent d118df2 commit 89fe91a
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9a0ebfbe3f1007008d198ccc6b86783cdb312fec
refs/heads/master: 64be4c1c2428e148de6081af235e2418e6a66dda
3 changes: 3 additions & 0 deletions trunk/arch/x86/include/asm/x86_init.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
struct mpc_bus;
struct mpc_cpu;
struct mpc_table;
struct cpuinfo_x86;

/**
* struct x86_init_mpparse - platform specific mpparse ops
Expand Down Expand Up @@ -147,6 +148,7 @@ struct x86_init_ops {
*/
struct x86_cpuinit_ops {
void (*setup_percpu_clockev)(void);
void (*fixup_cpu_id)(struct cpuinfo_x86 *c, int node);
};

/**
Expand Down Expand Up @@ -186,5 +188,6 @@ extern struct x86_msi_ops x86_msi;

extern void x86_init_noop(void);
extern void x86_init_uint_noop(unsigned int unused);
extern void x86_default_fixup_cpu_id(struct cpuinfo_x86 *c, int node);

#endif
7 changes: 7 additions & 0 deletions trunk/arch/x86/kernel/cpu/amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,13 @@ static void __cpuinit srat_detect_node(struct cpuinfo_x86 *c)
if (node == NUMA_NO_NODE)
node = per_cpu(cpu_llc_id, cpu);

/*
* If core numbers are inconsistent, it's likely a multi-fabric platform,
* so invoke platform-specific handler
*/
if (c->phys_proc_id != node)
x86_cpuinit.fixup_cpu_id(c, node);

if (!node_online(node)) {
/*
* Two possibilities here:
Expand Down
9 changes: 9 additions & 0 deletions trunk/arch/x86/kernel/cpu/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1140,6 +1140,15 @@ static void dbg_restore_debug_regs(void)
#define dbg_restore_debug_regs()
#endif /* ! CONFIG_KGDB */

/*
* Prints an error where the NUMA and configured core-number mismatch and the
* platform didn't override this to fix it up
*/
void __cpuinit x86_default_fixup_cpu_id(struct cpuinfo_x86 *c, int node)
{
pr_err("NUMA core number %d differs from configured core number %d\n", node, c->phys_proc_id);
}

/*
* cpu_init() initializes state that is per-CPU. Some data is already
* initialized (naturally) in the bootstrap process, such as the GDT
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/x86/kernel/x86_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ struct x86_init_ops x86_init __initdata = {

struct x86_cpuinit_ops x86_cpuinit __cpuinitdata = {
.setup_percpu_clockev = setup_secondary_APIC_clock,
.fixup_cpu_id = x86_default_fixup_cpu_id,
};

static void default_nmi_init(void) { };
Expand Down

0 comments on commit 89fe91a

Please sign in to comment.