[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20080131120829.GB12571@elte.hu>
Date: Thu, 31 Jan 2008 13:08:29 +0100
From: Ingo Molnar <mingo@...e.hu>
To: "Huang, Ying" <ying.huang@...el.com>
Cc: Andi Kleen <ak@...e.de>, Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/5] x86: c_p_a clflush_cache_range fix
* Huang, Ying <ying.huang@...el.com> wrote:
> +++ b/arch/x86/kernel/cpu/common.c
> @@ -274,8 +274,10 @@ void __init cpu_detect(struct cpuinfo_x8
> if (c->x86 >= 0x6)
> c->x86_model += ((tfms >> 16) & 0xF) << 4;
> c->x86_mask = tfms & 15;
> - if (cap0 & (1<<19))
> + if (cap0 & (1<<19)) {
> c->x86_cache_alignment = ((misc >> 8) & 0xff) * 8;
> + c->x86_clflush_size = ((misc >> 8) & 0xff) * 8;
> + }
thanks!
> @@ -317,6 +319,7 @@ static void __init early_cpu_detect(void
> struct cpuinfo_x86 *c = &boot_cpu_data;
>
> c->x86_cache_alignment = 32;
> + c->x86_clflush_size = 32;
i suspect 32 is a good lower limit (it's not a big issue to do too
finegrained flushes, and CLFLUSH is valid with arbitrary alignment) -
and this will be overriden with 64 later on.
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists