* /proc/mtrr in 2.6 @ 2003-11-19 5:12 kernel 2003-11-19 16:10 ` Dave Jones 0 siblings, 1 reply; 3+ messages in thread From: kernel @ 2003-11-19 5:12 UTC (permalink / raw) To: linux-kernel In 2.6, having /proc/mtrr support in a kernel run on a system which lacks MTRR support (like my crusoe) results in /proc/mtrr existing, but giving EIO if you try to read it. On 2.4, it is detected as not existing and not created. Is this the new intentional behaviour, or just a bug? ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: /proc/mtrr in 2.6 2003-11-19 5:12 /proc/mtrr in 2.6 kernel @ 2003-11-19 16:10 ` Dave Jones 2003-11-19 17:06 ` Dave Jones 0 siblings, 1 reply; 3+ messages in thread From: Dave Jones @ 2003-11-19 16:10 UTC (permalink / raw) To: kernel; +Cc: linux-kernel On Tue, Nov 18, 2003 at 09:12:34PM -0800, kernel@mikebell.org wrote: > In 2.6, having /proc/mtrr support in a kernel run on a system which > lacks MTRR support (like my crusoe) results in /proc/mtrr existing, but > giving EIO if you try to read it. On 2.4, it is detected as not existing > and not created. Is this the new intentional behaviour, or just a bug? Need something like this perhaps ? --- 1/arch/i386/kernel/cpu/mtrr/if.c~ 2003-11-19 16:00:10.000000000 +0000 +++ 2/arch/i386/kernel/cpu/mtrr/if.c 2003-11-19 16:09:25.000000000 +0000 @@ -352,6 +352,14 @@ 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] 3+ messages in thread
* Re: /proc/mtrr in 2.6 2003-11-19 16:10 ` Dave Jones @ 2003-11-19 17:06 ` Dave Jones 0 siblings, 0 replies; 3+ messages in thread From: Dave Jones @ 2003-11-19 17:06 UTC (permalink / raw) To: kernel, linux-kernel On Wed, Nov 19, 2003 at 04:10:44PM +0000, Dave Jones wrote: > On Tue, Nov 18, 2003 at 09:12:34PM -0800, kernel@mikebell.org wrote: > > In 2.6, having /proc/mtrr support in a kernel run on a system which > > lacks MTRR support (like my crusoe) results in /proc/mtrr existing, but > > giving EIO if you try to read it. On 2.4, it is detected as not existing > > and not created. Is this the new intentional behaviour, or just a bug? > > Need something like this perhaps ? Better yet, get the logic right.. --- linux-2.5/arch/i386/kernel/cpu/mtrr/if.c~ Wed Nov 19 17:04:50 2003 +++ linux-2.5/arch/i386/kernel/cpu/mtrr/if.c Wed Nov 19 17:05:29 2003 @@ -352,6 +352,14 @@ 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] 3+ messages in thread
end of thread, other threads:[~2003-11-19 17:11 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2003-11-19 5:12 /proc/mtrr in 2.6 kernel 2003-11-19 16:10 ` Dave Jones 2003-11-19 17:06 ` Dave Jones
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox