From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP id EEDD6DDE99 for ; Mon, 12 Nov 2007 07:54:58 +1100 (EST) Subject: Re: [RFC] PMU: don't lock_kernel() From: Benjamin Herrenschmidt To: Johannes Berg In-Reply-To: <1194523283.6294.9.camel@johannes.berg> References: <1194523283.6294.9.camel@johannes.berg> Content-Type: text/plain Date: Mon, 12 Nov 2007 07:54:50 +1100 Message-Id: <1194814490.6510.18.camel@pasglop> Mime-Version: 1.0 Cc: linuxppc-dev list Reply-To: benh@kernel.crashing.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Acked-by: Benjamin Herrenschmidt > --- > 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 > #include > #include > -#include > #include > #include > #include > @@ -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; > } > >