From: "H. Peter Anvin" <hpa@zytor.com>
To: Rudolf Marek <r.marek@assembler.cz>
Cc: norsk5@xmission.com, lkml <linux-kernel@vger.kernel.org>,
LM Sensors <lm-sensors@lm-sensors.org>,
bluesmoke-devel@lists.sourceforge.net
Subject: Re: [RFC] new MSR r/w functions per CPU
Date: Wed, 13 Dec 2006 14:01:42 -0800 [thread overview]
Message-ID: <45807846.3010705@zytor.com> (raw)
In-Reply-To: <45807469.6040609@assembler.cz>
Rudolf Marek wrote:
> Hello all,
>
> For my new coretemp driver[1], I need to execute the rdmsr on particular
> processor. There is no such "global" function for that in the kernel so
> far.
>
> The per CPU msr_read and msr_write are used in following drivers:
>
> msr.c (it is static there now)
> k8-edac.c (duplicated right now -> driver in -mm)
> coretemp.c (my new Core temperature sensor -> driver [1])
>
> Question is how make an access to that functions. Enclosed patch does
> simple EXPORT_SYMBOL_GPL for them, but then both drivers (k8-edac.c and
> coretemp.c) would depend on the MSR driver. The ultimate solution would
> be to move this type
> of function to separate module, but perhaps this is just bit overkill?
>
> Any ideas what would be the best solution?
>
For now I think you could just export these and allow the dependency.
I've been meaning to rewrite the MSR and CPUID drivers to use a common
core, which would also allow invoking nnostandard CPUID and msrs which
need the entire register file to be set; that should probably be
included in that.
In fact, I've made that change something like four times (it seems to be
an airplane project that I never get around to submitting), so I should
actually get it finished and sent in.
-hpa
next prev parent reply other threads:[~2006-12-13 22:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-13 21:45 Rudolf Marek
2006-12-13 22:01 ` H. Peter Anvin [this message]
2006-12-13 22:10 ` Dave Jones
2006-12-13 22:19 ` H. Peter Anvin
2006-12-13 22:26 ` Dave Jones
2006-12-13 22:45 ` 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=45807846.3010705@zytor.com \
--to=hpa@zytor.com \
--cc=bluesmoke-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lm-sensors@lm-sensors.org \
--cc=norsk5@xmission.com \
--cc=r.marek@assembler.cz \
/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
Powered by JetHome