Re: [PATCH 1/3] x86: Bugfix bit-rot in the calling of legacy_cache_size

From: Bryan O'Donoghue
Date: Tue Sep 30 2014 - 04:45:22 EST


On 30/09/14 04:41, Dave Jones wrote:
Shouldn't this patch be more like..

-#ifdef CONFIG_X86_64
cpu_detect_cache_sizes(c);
-#else
+
+#ifdef CONFIG_X86_32

?

Hmm, maybe but you have code in cpu_detect_cache_sizes that's X86_64 only..

void cpu_detect_cache_sizes(struct cpuinfo_x86 *c)
{
unsigned int n, dummy, ebx, ecx, edx, l2size;

n = c->extended_cpuid_level;

if (n >= 0x80000005) {
cpuid(0x80000005, &dummy, &ebx, &ecx, &edx);
c->x86_cache_size = (ecx>>24) + (edx>>24);
#ifdef CONFIG_X86_64
/* On K8 L1 TLB is inclusive, so don't count it */
c->x86_tlbsize = 0;
#endif

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/