]> err.no Git - linux-2.6/commit
[CPUFREQ] Don't take semaphore in cpufreq_quick_get()
authorAndi Kleen <ak@suse.de>
Wed, 10 Oct 2007 00:18:27 +0000 (02:18 +0200)
committerDave Jones <davej@redhat.com>
Wed, 10 Oct 2007 01:44:06 +0000 (21:44 -0400)
commit9eb59573d4b86f347e6cd04f47a4c2082009fa58
tree91209b4149bf791c36ed50da3d0261f491cd27b4
parent562d94d98f7032bdc4a99d9124a78a543dbea225
[CPUFREQ] Don't take semaphore in cpufreq_quick_get()

I don't see any reason to take an expensive lock in cpufreq_quick_get()
Reading policy->cur is a single atomic operation and after
the lock is dropped again the state could change any time anyways.

So don't take the lock in the first place.

This also makes this function interrupt safe which is useful
for some code of mine.

Signed-off-by: Andi Kleen <ak@suse.de>
Cc: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
drivers/cpufreq/cpufreq.c