Re: [tip:x86/cpu] x86, amd: Avoid cache aliasing penalties on AMDfamily 15h

From: H. Peter Anvin
Date: Fri Aug 05 2011 - 20:22:30 EST


On 08/05/2011 03:58 PM, tip-bot for Borislav Petkov wrote:
> diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
> index b13ed39..b0234bc 100644
> --- a/arch/x86/kernel/cpu/amd.c
> +++ b/arch/x86/kernel/cpu/amd.c
> @@ -458,6 +458,19 @@ static void __cpuinit early_init_amd(struct cpuinfo_x86 *c)
> "with P0 frequency!\n");
> }
> }
> +
> + if (c->x86 == 0x15) {
> + unsigned long upperbit;
> + u32 cpuid, assoc;
> +
> + cpuid = cpuid_edx(0x80000005);
> + assoc = cpuid >> 16 & 0xff;
> + upperbit = ((cpuid >> 24) << 10) / assoc;
> +
> + va_align.mask = (upperbit - 1) & PAGE_MASK;
> + va_align.flags = ALIGN_VA_32 | ALIGN_VA_64;
> +
> + }
> }
>
> static void __cpuinit init_amd(struct cpuinfo_x86 *c)

Breaks all i386 builds:

/home/hpa/kernel/linux-tip.cpu/arch/x86/kernel/cpu/amd.c:437: undefined
reference to `va_align'
/home/hpa/kernel/linux-tip.cpu/arch/x86/kernel/cpu/amd.c:436: undefined
reference to `va_align'

[the line numbers refer to the entire patchset]

-hpa
--
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/