[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <517E94E6.6040201@zytor.com>
Date: Mon, 29 Apr 2013 08:42:30 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Borislav Petkov <bp@...en8.de>
CC: X86 ML <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
Borislav Petkov <bp@...e.de>
Subject: Re: [PATCH 3/3] x86, FPU: Do not use static_cpu_has before alternatives
On 04/29/2013 07:04 AM, Borislav Petkov wrote:
> From: Borislav Petkov <bp@...e.de>
>
> The call stack below shows how this happens: basically eager_fpu_init()
> calls __thread_fpu_begin(current) which then does if (!use_eager_fpu()),
> which, in turn, uses static_cpu_has.
>
> And we're executing before alternatives so static_cpu_has doesn't work
> there yet.
>
> However, I don't want to cause the penalty of not using static_cpu_has
> to all callers of use_eager_fpu() which are a bunch spread around the
> tree so let's add the change only to __thread_fpu_begin() - it is still
> on the context switch path but we can at least keep the static_cpu_has
> call in the rest of the use_eager_fpu() callsites.
>
I *was* considering adding static_cpu_has_safe() at some point which
would have a three-state jump, with the default (pre-alternatives) jump
pointing to dynamic detection code.
This might be useful here, on the other hand, perhaps it is acceptable
for use_eager_fpu() to be initially false?
-hpa
--
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