lkml.org 
[lkml]   [2008]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2008-01-31 13:11    [W:0.033 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site