lkml.org 
[lkml]   [2010]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] x86, cacheinfo: Fix disabling of L3 cache indexes
On 01/19/2010 03:07 AM, Borislav Petkov wrote:
>
> +static void __wbinvd(void *dummy)
> +{
> + asm volatile("wbinvd" : : : "memory");
> +}
> +

[...]

> + smp_call_function_single(cpu, __wbinvd, NULL, 1);

I really don't like this combination.

First of all, it's an asm version of an instruction we already have
macros for. This should probably just be wbinvd(), or *possibly*
native_wbinvd(), although that would have to be justified -- especially
since the preexisting code used wbinvd().

Second, it's pretty obvious that the only reason for this function at
all is to provide a wrapper that can be passed to smp_call_function*().
It would be a lot cleaner to have a small function wbinvd_on_cpu(cpu)
as a wrapper for the higher-order functionality.

-hpa


\
 
 \ /
  Last update: 2010-01-21 00:09    [W:0.049 / U:0.756 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site