Re: [PATCH][RFC] PentiumPro/II split in x86 config
Keith Owens (kaos@ocs.com.au)
Tue, 28 May 2002 10:15:52 +1000
On Mon, 27 May 2002 16:54:20 +0200,
"J.A. Magallon" <jamagallon@able.es> wrote:
>Due to Alan's advice, it also adds a check that will panic if a PII or
>higher kernel is run on a PPro or lesser (plz, I put that code in the
>place I thought it was the best, but probably I'm wrong...).
>+static void __init check_intel_compat(struct cpuinfo_x86 *c)
>+{
>+#if defined(CONFIG_MPENTIUMII) || defined(CONFIG_MPENTIUMIII) || defined(CONFIG_MPENTIUM4)
>+ if (c->x86 <= 5)
>+ panic("Kernel is unsafe/incompatible with this CPU model. Check your build settings !\n");
>+#endif
>+}
Don't rely on that working. When you compile with -march=i686, gcc
emits cmov instructions all over the place, including in printk code.
The first cmov takes a fault and tries to panic, the panic code uses
printk which hits a second cmov and the machine is dead with no
messages.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/