From: "H. Peter Anvin" <hpa@zytor.com>
To: Hasan Rashid <hasan@digitalpath.net>
Cc: "'Maxim Levitsky'" <maximlevitsky@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: Access MSR functions in userspace?
Date: Wed, 06 Feb 2008 17:09:17 -0800 [thread overview]
Message-ID: <47AA5A3D.9070707@zytor.com> (raw)
In-Reply-To: <200802070059.m170xqHv008164@terminus.zytor.com>
Hasan Rashid wrote:
> I am using kernel 2.4.32. Inside msr.c it is trying to register cpu/msr as
> shown here.
>
> int __init msr_init(void)
> {
> if (register_chrdev(MSR_MAJOR, "cpu/msr", &msr_fops)) {
> printk(KERN_ERR "msr: unable to get major %d for msr\n",
> MSR_MAJOR);
> return -EBUSY;
> }
>
> return 0;
> }
>
> I did use the MAKEDEV script with the tools but since the msr module isn't
> trying to register at any of those locations, they don't work.
Nonsense. All that matters is major:minor.
> There is only one processor on my board, I am going to register device under
> cpu/0/msr and see if that solves the issue.
It's irrelevant where it "registers" (on your kernel it only affects
/proc/devices, nothing else, unless you're using devfs, in which case,
well, don't.) The MAKEDEV script with the tools creates the appropriate
device entries.
-hpa
next parent reply other threads:[~2008-02-07 1:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200802070059.m170xqHv008164@terminus.zytor.com>
2008-02-07 1:09 ` H. Peter Anvin [this message]
[not found] <200802070037.m170b4Bb000579@terminus.zytor.com>
2008-02-07 0:48 ` Access MSR functions in userspace? H. Peter Anvin
2008-02-06 3:29 Hasan Rashid
2008-02-06 4:00 ` Maxim Levitsky
2008-02-06 5:59 ` H. Peter Anvin
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=47AA5A3D.9070707@zytor.com \
--to=hpa@zytor.com \
--cc=hasan@digitalpath.net \
--cc=linux-kernel@vger.kernel.org \
--cc=maximlevitsky@gmail.com \
/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