Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e8458df authored by Andreas Herrmann's avatar Andreas Herrmann Committed by H. Peter Anvin
Browse files

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: default avatarAndreas Herrmann <andreas.herrmann3@amd.com>
Link: http://lkml.kernel.org/r/20121019090049.GF26718@alberich


Signed-off-by: default avatarH. Peter Anvin <hpa@linux.intel.com>
parent 04a15418
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -538,6 +538,10 @@ __cpuinit cpuid4_cache_lookup_regs(int index,
	unsigned		edx;
	unsigned		edx;


	if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) {
	if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) {
		if (cpu_has_topoext)
			cpuid_count(0x8000001d, index, &eax.full,
				    &ebx.full, &ecx.full, &edx);
		else
			amd_cpuid4(index, &eax, &ebx, &ecx);
			amd_cpuid4(index, &eax, &ebx, &ecx);
		amd_init_l3_cache(this_leaf, index);
		amd_init_l3_cache(this_leaf, index);
	} else {
	} else {