Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764876AbYBGBJe (ORCPT ); Wed, 6 Feb 2008 20:09:34 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758396AbYBGBJY (ORCPT ); Wed, 6 Feb 2008 20:09:24 -0500 Received: from terminus.zytor.com ([198.137.202.10]:60327 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758349AbYBGBJX (ORCPT ); Wed, 6 Feb 2008 20:09:23 -0500 Message-ID: <47AA5A3D.9070707@zytor.com> Date: Wed, 06 Feb 2008 17:09:17 -0800 From: "H. Peter Anvin" User-Agent: Thunderbird 2.0.0.9 (X11/20071115) MIME-Version: 1.0 To: Hasan Rashid CC: "'Maxim Levitsky'" , linux-kernel@vger.kernel.org Subject: Re: Access MSR functions in userspace? References: <200802070059.m170xqHv008164@terminus.zytor.com> In-Reply-To: <200802070059.m170xqHv008164@terminus.zytor.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1139 Lines: 34 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/