[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1279664546.2899.50.camel@sbs-t61.sc.intel.com>
Date: Tue, 20 Jul 2010 15:22:26 -0700
From: Suresh Siddha <suresh.b.siddha@...el.com>
To: Robert Richter <robert.richter@....com>
Cc: "H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...e.hu>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 07/10] x86, xsave: reduce cpu_has_xsave checks
On Tue, 2010-07-20 at 11:50 -0700, Robert Richter wrote:
> This moves the cpu_has_xsave check at the beginning of
> xsave_init(). All other checks may removed then.
>
> Signed-off-by: Robert Richter <robert.richter@....com>
Acked-by: Suresh Siddha <suresh.b.siddha@...el.com>
> ---
> arch/x86/kernel/xsave.c | 9 +++------
> 1 files changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/arch/x86/kernel/xsave.c b/arch/x86/kernel/xsave.c
> index a594f49..550bf45 100644
> --- a/arch/x86/kernel/xsave.c
> +++ b/arch/x86/kernel/xsave.c
> @@ -362,9 +362,6 @@ unsigned int sig_xstate_size = sizeof(struct _fpstate);
> */
> static void __cpuinit __xsave_init(void)
> {
> - if (!cpu_has_xsave)
> - return;
> -
> set_in_cr4(X86_CR4_OSXSAVE);
>
> /*
> @@ -433,9 +430,6 @@ static void __cpuinit xsave_cntxt_init(void)
> {
> unsigned int eax, ebx, ecx, edx;
>
> - if (!cpu_has_xsave)
> - return;
> -
> cpuid_count(0xd, 0, &eax, &ebx, &ecx, &edx);
> pcntxt_mask = eax + ((u64)edx << 32);
>
> @@ -469,6 +463,9 @@ static void __cpuinit xsave_cntxt_init(void)
>
> void __cpuinit xsave_init(void)
> {
> + if (!cpu_has_xsave)
> + return;
> +
> /*
> * Boot processor to setup the FP and extended state context info.
> */
--
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