Commit:     9eb59573d4b86f347e6cd04f47a4c2082009fa58
Parent:     562d94d98f7032bdc4a99d9124a78a543dbea225
Author:     Andi Kleen <[EMAIL PROTECTED]>
AuthorDate: Wed Oct 10 02:18:27 2007 +0200
Committer:  Dave Jones <[EMAIL PROTECTED]>
CommitDate: Tue Oct 9 21:44:06 2007 -0400

    [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 <[EMAIL PROTECTED]>
    Cc: "Pallipadi, Venkatesh" <[EMAIL PROTECTED]>
    Signed-off-by: Dave Jones <[EMAIL PROTECTED]>
 drivers/cpufreq/cpufreq.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index e027052..f7b9d6f 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1111,12 +1111,7 @@ unsigned int cpufreq_quick_get(unsigned int cpu)
        unsigned int ret_freq = 0;
        if (policy) {
-               if (unlikely(lock_policy_rwsem_read(cpu)))
-                       return ret_freq;
                ret_freq = policy->cur;
-               unlock_policy_rwsem_read(cpu);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to