Pull sbs into release branch
[pandora-kernel.git] / arch / i386 / kernel / cpu / mtrr / generic.c
index 000c07e..56f64e3 100644 (file)
@@ -38,11 +38,11 @@ static struct mtrr_state mtrr_state = {};
 #undef MODULE_PARAM_PREFIX
 #define MODULE_PARAM_PREFIX "mtrr."
 
-static __initdata int mtrr_show;
+static int mtrr_show;
 module_param_named(show, mtrr_show, bool, 0);
 
 /*  Get the MSR pair relating to a var range  */
-static void __init
+static void
 get_mtrr_var_range(unsigned int index, struct mtrr_var_range *vr)
 {
        rdmsr(MTRRphysBase_MSR(index), vr->base_lo, vr->base_hi);
@@ -65,15 +65,17 @@ get_fixed_ranges(mtrr_type * frs)
 
 void mtrr_save_fixed_ranges(void *info)
 {
-       get_fixed_ranges(mtrr_state.fixed_ranges);
+       if (cpu_has_mtrr)
+               get_fixed_ranges(mtrr_state.fixed_ranges);
 }
 
-static void __init print_fixed(unsigned base, unsigned step, const mtrr_type*types)
+static void print_fixed(unsigned base, unsigned step, const mtrr_type*types)
 {
        unsigned i;
 
        for (i = 0; i < 8; ++i, ++types, base += step)
-               printk(KERN_INFO "MTRR %05X-%05X %s\n", base, base + step - 1, mtrr_attrib_to_str(*types));
+               printk(KERN_INFO "MTRR %05X-%05X %s\n",
+                       base, base + step - 1, mtrr_attrib_to_str(*types));
 }
 
 /*  Grab all of the MTRR state for this CPU into *state  */
@@ -468,11 +470,6 @@ int generic_validate_add_page(unsigned long base, unsigned long size, unsigned i
                }
        }
 
-       if (base < 0x100) {
-               printk(KERN_WARNING "mtrr: cannot set region below 1 MiB (0x%lx000,0x%lx000)\n",
-                      base, size);
-               return -EINVAL;
-       }
        /*  Check upper bits of base and last are equal and lower bits are 0
            for base and 1 for last  */
        last = base + size - 1;