]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Make mem=nopentium clear cpu_has_pse
authorAndi Kleen <ak@muc.de>
Sun, 22 Dec 2002 10:56:03 +0000 (02:56 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Sun, 22 Dec 2002 10:56:03 +0000 (02:56 -0800)
"mem=nopentium" would clear the PSE bit in boot_cpu_data, but the CPU
detection later would overwrite it again from CPUID.

The large pages would be correctly disabled, but cpu_has_pse was lying.

This patch makes sure it stays clear when the option is given.

I also took the liberty to remove these obnoxious cpu capability
printks who give no use information (the data can be either gotten
from CPUID in user space in raw form or from /proc/cpuinfo processed)

arch/i386/kernel/cpu/common.c
arch/i386/kernel/setup.c

index b54998f01af4b70b0671145d83401d1a26f4da1c..eb0f950c0304d3fde41574851edebba9609adfec 100644 (file)
@@ -18,6 +18,8 @@ struct cpu_dev * cpu_devs[X86_VENDOR_NUM] = {};
 
 extern void mcheck_init(struct cpuinfo_x86 *c);
 
+extern int disable_pse;
+
 static void default_init(struct cpuinfo_x86 * c)
 {
        /* Not much we can do here... */
@@ -305,12 +307,6 @@ void __init identify_cpu(struct cpuinfo_x86 *c)
        else
                generic_identify(c);
 
-       printk(KERN_DEBUG "CPU: Before vendor init, caps: %08lx %08lx %08lx, vendor = %d\n",
-              c->x86_capability[0],
-              c->x86_capability[1],
-              c->x86_capability[2],
-              c->x86_vendor);
-
        /*
         * Vendor-specific initialization.  In this section we
         * canonicalize the feature flags, meaning if there are
@@ -327,12 +323,6 @@ void __init identify_cpu(struct cpuinfo_x86 *c)
        /* Disable the PN if appropriate */
        squash_the_stupid_serial_number(c);
 
-       printk(KERN_DEBUG "CPU: After vendor init, caps: %08lx %08lx %08lx %08lx\n",
-              c->x86_capability[0],
-              c->x86_capability[1],
-              c->x86_capability[2],
-              c->x86_capability[3]);
-
        /*
         * The vendor-specific functions might have changed features.  Now
         * we do "generic changes."
@@ -348,6 +338,9 @@ void __init identify_cpu(struct cpuinfo_x86 *c)
                clear_bit(X86_FEATURE_XMM, c->x86_capability);
        }
 
+       if (disable_pse)
+               clear_bit(X86_FEATURE_PSE, c->x86_capability);
+
        /* If the model name is still unset, do table lookup. */
        if ( !c->x86_model_id[0] ) {
                char *p;
@@ -380,12 +373,6 @@ void __init identify_cpu(struct cpuinfo_x86 *c)
                        boot_cpu_data.x86_capability[i] &= c->x86_capability[i];
        }
 
-       printk(KERN_DEBUG "CPU:             Common caps: %08lx %08lx %08lx %08lx\n",
-              boot_cpu_data.x86_capability[0],
-              boot_cpu_data.x86_capability[1],
-              boot_cpu_data.x86_capability[2],
-              boot_cpu_data.x86_capability[3]);
-
        /* Init Machine Check Exception if available. */
 #ifdef CONFIG_X86_MCE
        mcheck_init(c);
index 7e0a98337ba63bdd2d43938df3969a3771bf41df..3d2fc4e69c7b9e361b49ac0f3743b9a1df361bc7 100644 (file)
@@ -41,6 +41,8 @@
 #include <asm/arch_hooks.h>
 #include "setup_arch_pre.h"
 
+int disable_pse __initdata = 0;
+
 static inline char * __init machine_specific_memory_setup(void);
 
 /*
@@ -523,6 +525,7 @@ static void __init parse_cmdline_early (char ** cmdline_p)
                        if (!memcmp(from+4, "nopentium", 9)) {
                                from += 9+4;
                                clear_bit(X86_FEATURE_PSE, boot_cpu_data.x86_capability);
+                               disable_pse = 1;
                        } else if (!memcmp(from+4, "exactmap", 8)) {
                                from += 8+4;
                                e820.nr_map = 0;