From: davej@redhat.com If the CPU doesn't support MTRRs, don't create a /proc/mtrr --- arch/i386/kernel/cpu/mtrr/if.c | 8 ++++++++ 1 files changed, 8 insertions(+) diff -puN arch/i386/kernel/cpu/mtrr/if.c~restore-24-mtrr-feature arch/i386/kernel/cpu/mtrr/if.c --- 25/arch/i386/kernel/cpu/mtrr/if.c~restore-24-mtrr-feature 2004-01-22 22:53:39.000000000 -0800 +++ 25-akpm/arch/i386/kernel/cpu/mtrr/if.c 2004-01-22 22:53:39.000000000 -0800 @@ -352,6 +352,14 @@ static int mtrr_seq_show(struct seq_file static int __init mtrr_if_init(void) { + struct cpuinfo_x86 *c = &boot_cpu_data; + + if ((!cpu_has(c, X86_FEATURE_MTRR)) && + (!cpu_has(c, X86_FEATURE_K6_MTRR)) && + (!cpu_has(c, X86_FEATURE_CYRIX_ARR)) && + (!cpu_has(c, X86_FEATURE_CENTAUR_MCR))) + return -ENODEV; + proc_root_mtrr = create_proc_entry("mtrr", S_IWUSR | S_IRUGO, &proc_root); if (proc_root_mtrr) { _