* [RFC] PMU: don't lock_kernel()
@ 2007-11-08 12:01 Johannes Berg
2007-11-11 20:54 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2007-11-08 12:01 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev list
I see nothing that this lock_kernel() actually protects against
so remove it.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
drivers/macintosh/via-pmu.c | 3 ---
1 file changed, 3 deletions(-)
--- everything.orig/drivers/macintosh/via-pmu.c 2007-11-08 11:48:37.192845813 +0100
+++ everything/drivers/macintosh/via-pmu.c 2007-11-08 11:48:48.292846681 +0100
@@ -33,7 +33,6 @@
#include <linux/adb.h>
#include <linux/pmu.h>
#include <linux/cuda.h>
-#include <linux/smp_lock.h>
#include <linux/module.h>
#include <linux/spinlock.h>
#include <linux/pm.h>
@@ -2436,7 +2435,6 @@ pmu_release(struct inode *inode, struct
struct pmu_private *pp = file->private_data;
unsigned long flags;
- lock_kernel();
if (pp != 0) {
file->private_data = NULL;
spin_lock_irqsave(&all_pvt_lock, flags);
@@ -2450,7 +2448,6 @@ pmu_release(struct inode *inode, struct
kfree(pp);
}
- unlock_kernel();
return 0;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [RFC] PMU: don't lock_kernel()
2007-11-08 12:01 [RFC] PMU: don't lock_kernel() Johannes Berg
@ 2007-11-11 20:54 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2007-11-11 20:54 UTC (permalink / raw)
To: Johannes Berg; +Cc: linuxppc-dev list
On Thu, 2007-11-08 at 13:01 +0100, Johannes Berg wrote:
> I see nothing that this lock_kernel() actually protects against
> so remove it.
>
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
> drivers/macintosh/via-pmu.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> --- everything.orig/drivers/macintosh/via-pmu.c 2007-11-08 11:48:37.192845813 +0100
> +++ everything/drivers/macintosh/via-pmu.c 2007-11-08 11:48:48.292846681 +0100
> @@ -33,7 +33,6 @@
> #include <linux/adb.h>
> #include <linux/pmu.h>
> #include <linux/cuda.h>
> -#include <linux/smp_lock.h>
> #include <linux/module.h>
> #include <linux/spinlock.h>
> #include <linux/pm.h>
> @@ -2436,7 +2435,6 @@ pmu_release(struct inode *inode, struct
> struct pmu_private *pp = file->private_data;
> unsigned long flags;
>
> - lock_kernel();
> if (pp != 0) {
> file->private_data = NULL;
> spin_lock_irqsave(&all_pvt_lock, flags);
> @@ -2450,7 +2448,6 @@ pmu_release(struct inode *inode, struct
>
> kfree(pp);
> }
> - unlock_kernel();
> return 0;
> }
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-11-11 20:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-08 12:01 [RFC] PMU: don't lock_kernel() Johannes Berg
2007-11-11 20:54 ` Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).