* Restore 2.4 MTRR feature.
@ 2004-01-23 6:35 davej
0 siblings, 0 replies; only message in thread
From: davej @ 2004-01-23 6:35 UTC (permalink / raw)
To: linux-kernel; +Cc: torvalds, akpm
If the CPU doesn't support MTRRs, don't create a /proc/mtrr
Dave
diff -urpN --exclude-from=/home/davej/.exclude bk-linus/arch/i386/kernel/cpu/mtrr/if.c linux-2.5/arch/i386/kernel/cpu/mtrr/if.c
--- bk-linus/arch/i386/kernel/cpu/mtrr/if.c 2003-09-29 19:45:18.000000000 +0100
+++ linux-2.5/arch/i386/kernel/cpu/mtrr/if.c 2003-11-27 17:04:42.000000000 +0000
@@ -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) {
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-01-23 6:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-23 6:35 Restore 2.4 MTRR feature davej
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®