]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
x86/platform: Remove incorrect error message in x86_default_fixup_cpu_id()
authorAndreas Herrmann <andreas.herrmann3@amd.com>
Mon, 2 Apr 2012 16:06:48 +0000 (18:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 May 2012 15:53:19 +0000 (08:53 -0700)
commit 68894632afb2729a1d8785c877840953894c7283 upstream.

It's only called from amd.c:srat_detect_node(). The introduced
condition for calling the fixup code is true for all AMD
multi-node processors, e.g. Magny-Cours and Interlagos. There we
have 2 NUMA nodes on one socket. Thus there are cores having
different numa-node-id but with equal phys_proc_id.

There is no point to print error messages in such a situation.

The confusing/misleading error message was introduced with
commit 64be4c1c2428e148de6081af235e2418e6a66dda ("x86: Add
x86_init platform override to fix up NUMA core numbering").

Remove the default fixup function (especially the error message)
and replace it by a NULL pointer check, move the
Numascale-specific condition for calling the fixup into the
fixup-function itself and slightly adapt the comment.

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Acked-by: Borislav Petkov <borislav.petkov@amd.com>
Cc: <sp@numascale.com>
Cc: <bp@amd64.org>
Cc: <daniel@numascale-asia.com>
Link: http://lkml.kernel.org/r/20120402160648.GR27684@alberich.amd.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/include/asm/x86_init.h
arch/x86/kernel/apic/apic_numachip.c
arch/x86/kernel/cpu/amd.c
arch/x86/kernel/cpu/common.c
arch/x86/kernel/x86_init.c

index 517d4767ffdda95e249cc5c173eb008a439cd346..a609c397d6715065d8cf04b5d17fb17a8fafd868 100644 (file)
@@ -189,6 +189,5 @@ 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
index 09d3d8c1cd996d4fec3b13cbdd3a41dbdabd1856..ade0182a46ecfaddfddcfaf420c338429d5b15f5 100644 (file)
@@ -201,8 +201,11 @@ static void __init map_csrs(void)
 
 static void fixup_cpu_id(struct cpuinfo_x86 *c, int node)
 {
-       c->phys_proc_id = node;
-       per_cpu(cpu_llc_id, smp_processor_id()) = node;
+
+       if (c->phys_proc_id != node) {
+               c->phys_proc_id = node;
+               per_cpu(cpu_llc_id, smp_processor_id()) = node;
+       }
 }
 
 static int __init numachip_system_init(void)
index f4773f4aae35be4964827563d6f2843199f639b3..80ab83dc5f6eacd0a47e47fba881f94e14e52b0e 100644 (file)
@@ -352,10 +352,11 @@ static void __cpuinit srat_detect_node(struct cpuinfo_x86 *c)
                node = per_cpu(cpu_llc_id, cpu);
 
        /*
-        * If core numbers are inconsistent, it's likely a multi-fabric platform,
-        * so invoke platform-specific handler
+        * On multi-fabric platform (e.g. Numascale NumaChip) a
+        * platform-specific handler needs to be called to fixup some
+        * IDs of the CPU.
         */
-       if (c->phys_proc_id != node)
+       if (x86_cpuinit.fixup_cpu_id)
                x86_cpuinit.fixup_cpu_id(c, node);
 
        if (!node_online(node)) {
index c0f7d68d318f1b7a8a6a27f798250b53c778d50f..1a810e4d33249a728afaa4a9ffff60f5388233a4 100644 (file)
@@ -1162,15 +1162,6 @@ 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
index 947a06ccc67305d014dd558a68be75f0f8a34c11..83b05adaadf1f73473f89840c63f3fcfe4b2293c 100644 (file)
@@ -92,7 +92,6 @@ 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) { };