mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Andreas Herrmann <andreas.herrmann3@amd.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	andreas.herrmann3@amd.com, tglx@linutronix.de,
	hpa@linux.intel.com
Subject: [tip:x86/cpu] x86, cacheinfo: Make use of CPUID 0x8000001d for cache information on AMD
Date: Tue, 13 Nov 2012 14:00:45 -0800	[thread overview]
Message-ID: <tip-2e8458dfe4202df75543402c7343b8f94de4101e@git.kernel.org> (raw)
In-Reply-To: <20121019090049.GF26718@alberich>

Commit-ID:  2e8458dfe4202df75543402c7343b8f94de4101e
Gitweb:     http://git.kernel.org/tip/2e8458dfe4202df75543402c7343b8f94de4101e
Author:     Andreas Herrmann <andreas.herrmann3@amd.com>
AuthorDate: Fri, 19 Oct 2012 11:00:49 +0200
Committer:  H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Tue, 13 Nov 2012 11:22:30 -0800

x86, cacheinfo: Make use of CPUID 0x8000001d for cache information on AMD

Rely on CPUID 0x8000001d for cache information when AMD CPUID topology
extensions are available.

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Link: http://lkml.kernel.org/r/20121019090049.GF26718@alberich
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
---
 arch/x86/kernel/cpu/intel_cacheinfo.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
index 8ce7a83..cd2e1cc 100644
--- a/arch/x86/kernel/cpu/intel_cacheinfo.c
+++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
@@ -538,7 +538,11 @@ __cpuinit cpuid4_cache_lookup_regs(int index,
 	unsigned		edx;
 
 	if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) {
-		amd_cpuid4(index, &eax, &ebx, &ecx);
+		if (cpu_has_topoext)
+			cpuid_count(0x8000001d, index, &eax.full,
+				    &ebx.full, &ecx.full, &edx);
+		else
+			amd_cpuid4(index, &eax, &ebx, &ecx);
 		amd_init_l3_cache(this_leaf, index);
 	} else {
 		cpuid_count(4, index, &eax.full, &ebx.full, &ecx.full, &edx);

  reply	other threads:[~2012-11-13 22:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-19  8:55 [PATCH 0/4] x86, cacheinfo: Use AMD topology extensions Andreas Herrmann
2012-10-19  8:58 ` [PATCH 1/4] x86: Add cpu_has_topoext Andreas Herrmann
2012-11-13 21:58   ` [tip:x86/cpu] " tip-bot for Andreas Herrmann
2012-10-19  8:59 ` [PATCH 2/4] x86, cacheinfo: Determine number of cache leafs using CPUID 0x8000001d on AMD Andreas Herrmann
2012-11-13 21:59   ` [tip:x86/cpu] " tip-bot for Andreas Herrmann
2012-10-19  9:00 ` [PATCH 3/4] x86, cacheinfo: Make use of CPUID 0x8000001d for cache information " Andreas Herrmann
2012-11-13 22:00   ` tip-bot for Andreas Herrmann [this message]
2012-10-19  9:02 ` [PATCH 4/4] x86, cacheinfo: Base cache sharing info on CPUID 0x8000001d " Andreas Herrmann
2012-11-13 22:01   ` [tip:x86/cpu] " tip-bot for Andreas Herrmann
2012-11-06 20:47 ` [PATCH 0/4] x86, cacheinfo: Use AMD topology extensions Jacob Shin
2012-11-07  9:48   ` H. Peter Anvin
2012-11-13 18:28     ` Jacob Shin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-2e8458dfe4202df75543402c7343b8f94de4101e@git.kernel.org \
    --to=andreas.herrmann3@amd.com \
    --cc=hpa@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome