[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <45807C88.6060807@zytor.com>
Date: Wed, 13 Dec 2006 14:19:52 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: Dave Jones <davej@...hat.com>, Rudolf Marek <r.marek@...embler.cz>,
hpa@...or.com, norsk5@...ssion.com,
lkml <linux-kernel@...r.kernel.org>,
LM Sensors <lm-sensors@...sensors.org>,
bluesmoke-devel@...ts.sourceforge.net
Subject: Re: [RFC] new MSR r/w functions per CPU
Dave Jones wrote:
>
> Exposing the guts of the msr driver like that doesn't seem too clean.
> For in-kernel use, why not just add something like this..
> (note:not even compile tested)..
>
Well, that *is* the guts of the MSR driver.
> void rdmsr_on_cpu(unsigned int cpu, unsigned long msr, unsigned long *lo, unsigned long *hi)
> {
> cpumask_t oldmask;
>
> oldmask = current->cpus_allowed;
> set_cpus_allowed(current, cpumask_of_cpu(cpu));
>
> rdmsr(msr, &lo, &hi);
>
> set_cpus_allowed(current, oldmask);
> }
>
[The above doesn't work, by the way. This approach was discussed a long
time ago, and vetoed due to the potential for deadlock.]
-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists