Re: [PATCH 2/7] x86, smp: Adjust native_wbinvd for smp_call_function-helpers

Borislav Petkov
2010-01-21T18:36:47Z

On Thu, Jan 21, 2010 at 10:07:51AM -0800, H. Peter Anvin wrote:
> On 01/21/2010 08:41 AM, Borislav Petkov wrote:
> > From: Borislav Petkov <borislav.petkov@amd.com>
> >
> > Add a wbinvd_on_cpu() helper and fold the void * arg in the wbinvd macro
> > definition so that native_wbinvd can be used in the smp_call_function_*
> > helpers as a pointed-to function.
> >
> > Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
>
> This patch is a lot of extra uglification just to avoid a simple jump
> stub -- and even then only with PV enabled -- for an operation which is
> then going to perform an IPI and WBINVD. That doesn't exactly seem like
> the right tradeoff.
>
> As such, I'm going to request that you just put a simple stub function
> in lib/smp.c rather than this whole patchset (well, the smp.h bit
> obviously needs to stay.)

..and I was wrapping the wrong way: wbinvd() was going to hide the void
* function argument while a simple stub in lib/smp.c could wrap around
wbinvd() which is much more cleaner. Thanks.

Will redo the patchset tomorrow.

--
Regards/Gruss,
Boris.

-
Advanced Micro Devices, Inc.
Operating Systems Research Center