From: Dave Jones <davej@redhat.com>
To: kernel@mikebell.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: /proc/mtrr in 2.6
Date: Wed, 19 Nov 2003 16:10:44 +0000 [thread overview]
Message-ID: <20031119161044.GA27802@redhat.com> (raw)
In-Reply-To: <20031119051233.GB1485@mikebell.org>
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) {
next prev parent reply other threads:[~2003-11-19 16:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-19 5:12 /proc/mtrr in 2.6 kernel
2003-11-19 16:10 ` Dave Jones [this message]
2003-11-19 17:06 ` Dave Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20031119161044.GA27802@redhat.com \
--to=davej@redhat.com \
--cc=kernel@mikebell.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox