Messages in this thread |  | | | Date | Thu, 31 Jan 2008 13:08:29 +0100 | | From | Ingo Molnar <> | | Subject | Re: [PATCH 2/5] x86: c_p_a clflush_cache_range fix |
| |
* Huang, Ying <ying.huang@intel.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
|  |