mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/AMD: Fix Socket ID for LLC topology for AMD Fam17h systems
@ 2016-08-31 20:21 Yazen Ghannam
  2016-09-02  8:41 ` Thomas Gleixner
  0 siblings, 1 reply; 5+ messages in thread
From: Yazen Ghannam @ 2016-08-31 20:21 UTC (permalink / raw)
  To: tglx, mingo, hpa, x86; +Cc: linux-kernel, Yazen Ghannam

The Socket ID is ApicId[bits] on Fam17h systems.

Change substraction to logical AND when extracting socket_id
from c->apicid.

Signed-off-by: Yazen Ghannam <Yazen.Ghannam@amd.com>
---
 arch/x86/kernel/cpu/amd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index f5c69d8..479555f 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -365,7 +365,7 @@ static void amd_detect_cmp(struct cpuinfo_x86 *c)
 	 if (c->x86 != 0x17 || !cpuid_edx(0x80000006))
 		return;
 
-	socket_id	= (c->apicid >> bits) - 1;
+	socket_id	= (c->apicid >> bits) & 1;
 	core_complex_id	= (c->apicid & ((1 << bits) - 1)) >> 3;
 
 	per_cpu(cpu_llc_id, cpu) = (socket_id << 3) | core_complex_id;
-- 
1.9.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-09-02 18:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-31 20:21 [PATCH] x86/AMD: Fix Socket ID for LLC topology for AMD Fam17h systems Yazen Ghannam
2016-09-02  8:41 ` Thomas Gleixner
2016-09-02 12:57   ` Ghannam, Yazen
2016-09-02 13:13     ` Thomas Gleixner
2016-09-02 16:28       ` Ghannam, Yazen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®