[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.1.10.0805081650440.3318@apollo.tec.linutronix.de>
Date: Thu, 8 May 2008 16:53:13 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Rene Herman <rene.herman@...access.nl>
cc: "H. Peter Anvin" <hpa@...or.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Adrian Bunk <bunk@...nel.org>,
Yinghai Lu <yhlu.kernel@...il.com>,
Ingo Molnar <mingo@...e.hu>,
Linux Kernel <linux-kernel@...r.kernel.org>,
akpm@...ux-foundation.org, Pavel Machek <pavel@...e.cz>
Subject: Re: [PATCH] x86: introduce a new Linux defined feature flag for PAT
support
On Thu, 8 May 2008, Rene Herman wrote:
> However, I'm not sure, but:
>
> > + /* Paranoia check. */
> > + if (!cpu_has_pat) {
> > + printk(KERN_ERR "PAT enabled, but CPU feature cleared\n");
> > + /*
> > + * Panic if this happens on the secondary CPU, and we
> > + * switched to PAT on the boot CPU. We have no way to
> > + * undo PAT.
> > + */
> > + BUG_ON(boot_pat_state);
> > + }
>
> The 'if this happens on the secondary CPU' sounds a bit like this is
> directly checking the secondary CPU flag but cpu_has_pat translates into
> boot_cpu_has(X86_FEATURE_PAT), refers always to the boot cpu.
Right and thats fine because of:
/*
* On SMP, boot_cpu_data holds the common feature set between
* all CPUs; so make sure that we indicate which features are
* common between the CPUs. The first time this routine gets
* executed, c == &boot_cpu_data.
*/
if (c != &boot_cpu_data) {
/* AND the already accumulated flags with these */
for (i = 0 ; i < NCAPINTS ; i++)
boot_cpu_data.x86_capability[i] &= c->x86_capability[i];
}
Thanks,
tglx
--
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