[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4E3C4D8C.1010709@zytor.com>
Date: Fri, 05 Aug 2011 13:07:40 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Borislav Petkov <bp@...64.org>
CC: Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Avi Kivity <avi@...hat.com>,
"Przywara, Andre" <Andre.Przywara@....com>,
"Pohlack, Martin" <Martin.Pohlack@....com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -v3.2 3/3] x86, AMD: Move BSP code to cpu_dev helper
On 08/05/2011 11:04 AM, Borislav Petkov wrote:
> Move code which is run once on the BSP during boot into the cpu_dev
> helper.
> +static void __cpuinit bsp_init_amd(struct cpuinfo_x86 *c)
> +{
> + if (static_cpu_has(X86_FEATURE_CONSTANT_TSC)) {
> +
You can't use static_cpu_has() here, since this code runs before
alternatives -- it will always be false. Furthermore, for code that
only runs once, it is never a win to do patching.
Arguably bsp_init should be __init and not __cpuinit, but I don't know
how to make that work with the machinery, and is something that can be
fixed anyway.
-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