Skip to contentSkip to conversation

x86, amd: Get multi-node CPU info from NodeId MSR instead of PCI config space

PATCH RESEND Superseded Andreas Herrmann 3 participants 5 messages Dec 15, 2009 – Dec 17, 2009 x86

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 x86, amd: Get multi-node CPU info from NodeId MSR instead of PCI config space

Use NodeId MSR to get NodeId and number of nodes per processor.

---
 arch/x86/include/asm/cpufeature.h |    1 +
 arch/x86/kernel/cpu/amd.c         |   53 ++++++++++--------------------------
 2 files changed, 16 insertions(+), 38 deletions(-)
arch/x86/include/asm/cpufeature.h +1 -0
index 9cfc88b..2cbf0a2 100644
@@ -153,6 +153,7 @@
 #define X86_FEATURE_SSE5	(6*32+11) /* SSE-5 */
 #define X86_FEATURE_SKINIT	(6*32+12) /* SKINIT/STGI instructions */
 #define X86_FEATURE_WDT		(6*32+13) /* Watchdog timer */
+#define X86_FEATURE_NODEID_MSR	(6*32+19) /* NodeId MSR */
 
 /*
  * Auxiliary flags: Linux defined - For features scattered in various
arch/x86/kernel/cpu/amd.c +15 -38

74 lines not on this page · raw message

Signature · 1 line
1.6.5
#1 lore raw

arch/x86/kernel/cpu/amd.c static int __cpuinit nearby_node(int apicid) · line 273

Quoted 1 line · Andreas Herrmann
arch/x86/kernel/cpu/amd.c +1 -0
+	rdmsrl(0xc001100c, value);

Dont we want some nice, meaningfully named symbolic constant here, instead of 0xc001100c?

Ingo

#2 lore raw
Quoted 7 lines · Ingo Molnar

arch/x86/kernel/cpu/amd.c static int __cpuinit nearby_node(int apicid) · line 273

Quoted 1 line · Andreas Herrmann
arch/x86/kernel/cpu/amd.c +1 -0
+	rdmsrl(0xc001100c, value);

Dont we want some nice, meaningfully named symbolic constant here, instead of 0xc001100c?

The MSR name is actually in the commit msg, maybe something like MSR_F10H_NODE_ID.

Signature · 8 lines
Regards/Gruss,
Boris.

Operating | Advanced Micro Devices GmbH
  System  | Karl-Hammerschmidt-Str. 34, 85609 Dornach b. München, Germany
 Research | Geschäftsführer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni
  Center  | Sitz: Dornach, Gemeinde Aschheim, Landkreis München
  (OSRC)  | Registergericht München, HRB Nr. 43632
#3 lore raw

PATCH v2 1/1 x86, amd: Get multi-node CPU info from NodeId MSR instead of PCI config space

In reply to Andreas Herrmann

Use NodeId MSR to get NodeId and number of nodes per processor.

---
 arch/x86/include/asm/cpufeature.h |    1 +
 arch/x86/include/asm/msr-index.h  |    1 +
 arch/x86/kernel/cpu/amd.c         |   53 ++++++++++--------------------------
 3 files changed, 17 insertions(+), 38 deletions(-)
arch/x86/include/asm/cpufeature.h +1 -0
index 613700f..637e1ec 100644
@@ -153,6 +153,7 @@
 #define X86_FEATURE_SSE5	(6*32+11) /* SSE-5 */
 #define X86_FEATURE_SKINIT	(6*32+12) /* SKINIT/STGI instructions */
 #define X86_FEATURE_WDT		(6*32+13) /* Watchdog timer */
+#define X86_FEATURE_NODEID_MSR	(6*32+19) /* NodeId MSR */
 
 /*
  * Auxiliary flags: Linux defined - For features scattered in various
arch/x86/include/asm/msr-index.h +1 -0
index 4ffe09b..9d976a7 100644
@@ -123,6 +123,7 @@
 #define FAM10H_MMIO_CONF_BUSRANGE_SHIFT 2
 #define FAM10H_MMIO_CONF_BASE_MASK	0xfffffff
 #define FAM10H_MMIO_CONF_BASE_SHIFT	20
+#define MSR_FAM10H_NODE_ID		0xc001100c
 
 /* K8 MSRs */
 #define MSR_K8_TOP_MEM1			0xc001001a
arch/x86/kernel/cpu/amd.c +15 -38

74 lines not on this page · raw message

Signature · 1 line
1.6.5.3
#4 lore raw
Commit-ID:  9d260ebc09a0ad6b5c73e17676df42c7bc75ff64
Gitweb:     http://git.kernel.org/tip/9d260ebc09a0ad6b5c73e17676df42c7bc75ff64
Author:     Andreas Herrmann <[email protected]>
AuthorDate: Wed, 16 Dec 2009 15:43:55 +0100
Committer:  H. Peter Anvin <[email protected]>
CommitDate: Wed, 16 Dec 2009 15:06:23 -0800

x86, amd: Get multi-node CPU info from NodeId MSR instead of PCI config space

Use NodeId MSR to get NodeId and number of nodes per processor.

LKML-Reference: <[email protected]>

---
 arch/x86/include/asm/cpufeature.h |    1 +
 arch/x86/include/asm/msr-index.h  |    1 +
 arch/x86/kernel/cpu/amd.c         |   53 ++++++++++--------------------------
 3 files changed, 17 insertions(+), 38 deletions(-)
arch/x86/include/asm/cpufeature.h +1 -0
index 613700f..637e1ec 100644
@@ -153,6 +153,7 @@
 #define X86_FEATURE_SSE5	(6*32+11) /* SSE-5 */
 #define X86_FEATURE_SKINIT	(6*32+12) /* SKINIT/STGI instructions */
 #define X86_FEATURE_WDT		(6*32+13) /* Watchdog timer */
+#define X86_FEATURE_NODEID_MSR	(6*32+19) /* NodeId MSR */
 
 /*
  * Auxiliary flags: Linux defined - For features scattered in various
arch/x86/include/asm/msr-index.h +1 -0
index ac98d29..1cd58cd 100644
@@ -124,6 +124,7 @@
 #define FAM10H_MMIO_CONF_BUSRANGE_SHIFT 2
 #define FAM10H_MMIO_CONF_BASE_MASK	0xfffffff
 #define FAM10H_MMIO_CONF_BASE_SHIFT	20
+#define MSR_FAM10H_NODE_ID		0xc001100c
 
 /* K8 MSRs */
 #define MSR_K8_TOP_MEM1			0xc001001a
arch/x86/kernel/cpu/amd.c +15 -38

74 lines not on this page · raw message