From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751074AbcFIMDd (ORCPT ); Thu, 9 Jun 2016 08:03:33 -0400 Received: from mail1.bemta12.messagelabs.com ([216.82.251.17]:41216 "EHLO mail1.bemta12.messagelabs.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750806AbcFIMDb convert rfc822-to-8bit (ORCPT ); Thu, 9 Jun 2016 08:03:31 -0400 X-Brightmail-Tracker: H4sIAAAAAAAAA1WSW0zTUBzGd9auLYRiGeCOxEuYSIgCuiGxiSH oWzWYGB+cyIN2WlnNNkg7FB+IIN6YQryAyoAAAQWVyFVggELQBwUVBEWBEBEWAqioaNT4QGxX L/j2+5/v+853TvInEG0eFkJw6Q5OsLNWPeaLdsXFWaL8kxJNGy7WrqA9XWcAfbWgH9DVNcUYP fbUQGdX1GJ0Ts5ZDX2lXkfXDeUj9LmOD4AuP12J0oNtkmugq0xNn1ooxum5H7k43dUrWRobCp AtFON2jeFMRceMmpl79gxnsq9UapjOkhrpLO+yhpk+/wBlPt5/iTFfGlYyj05+1ez03avh7ea U9P0ay2jjOJ46p01feOVUZ4KJJU7gS2ipNgBbblfgytAJYGv3E40T+EhDLYCF0xkyY5QBDt1o xmQOoiJg/cAIIgcQ6gQBS0b7vUIgtRs6e14AxWSCmUW5vwNG2OS6icuMUmHw29xttcwklQDf5 JcCpbkZwDudfV6TD0XD7udTXhOglsLvPTVeRigdHPGUehlSFKzs6EMUDoYzkwsahTfAu9fvow rr4dSX97iSjYRl7fOYwuvgjfJ3iPKIAPi40IMqPw6Dj9sXsAtA51pU51oUdy2KuxbFywB6C0S InHCEE6KMxmizwCdbHDaWt0YZDMZoGyeKbDJnZc1i9IEUWwOQ9uS4SgVaQXHW9m6wjFDrg0nP 5kST1t+ccvCYhRUt+4Q0Kyd2g+UEoYdkfKKkBQhcMpd+iLdKy/ZHhoSfPohkZZkUU1mbyCcrU g8IDdGRR2WBkgVLmv1v7M+aDoAVIYEkUKlUWr9UTrDxjv/1WaAjgD6Q5ORb/Hi74+/ts1KxWi quemiSix3sPykkEzj5yD1VO4k23vJ2OGEZf+3J5u+T7Z8qtoWN66sLX1o9MeHVIqibbV+KPqx q+dybdCnuwSbD6yB7SkLsqaiswZjDSaK9fnWJe6NtV6z7JH/RMLb+o/necCiZMe5n3Fo+H76j Ex0uInc8GnCvOXJ178jPtIn4spqIptOC+0Xqquu4HhUtrGEtIojsLyNCx+mhAwAA X-Env-Sender: Timothy.Sell@unisys.com X-Msg-Ref: server-6.tower-200.messagelabs.com!1465473804!5718022!3 X-Originating-IP: [192.61.61.104] X-StarScan-Received: X-StarScan-Version: 8.46; banners=-,-,- X-VirusChecked: Checked From: "Sell, Timothy C" To: Thomas Gleixner CC: "corbet@lwn.net" , "mingo@redhat.com" , "hpa@zytor.com" , "gregkh@linuxfoundation.org" , "Arfvidson, Erik" , "hofrat@osadl.org" , "dzickus@redhat.com" , "jes.sorensen@redhat.com" , "Curtin, Alexander Paul" , "janani.rvchndrn@gmail.com" , "sudipm.mukherjee@gmail.com" , "prarit@redhat.com" , "Binder, David Anthony" , "nhorman@redhat.com" , "dan.j.williams@intel.com" , "linux-kernel@vger.kernel.org" , "linux-doc@vger.kernel.org" , "driverdev-devel@linuxdriverproject.org" , *S-Par-Maintainer , "Kershner, David A" Subject: RE: [PATCH v4 09/29] staging: unisys: visorinput: remove unnecessary locking Thread-Topic: [PATCH v4 09/29] staging: unisys: visorinput: remove unnecessary locking Thread-Index: AQHRwi3SY3dOhZbHakquG+La5owSsZ/hBrwA Date: Thu, 9 Jun 2016 12:03:15 +0000 Message-ID: References: <1465420463-24982-1-git-send-email-david.kershner@unisys.com> <1465420463-24982-10-git-send-email-david.kershner@unisys.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [172.17.126.198] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Thomas Gleixner [mailto:tglx@linutronix.de] > Sent: Thursday, June 09, 2016 5:01 AM > To: Kershner, David A > Cc: corbet@lwn.net; mingo@redhat.com; hpa@zytor.com; > gregkh@linuxfoundation.org; Arfvidson, Erik; Sell, Timothy C; > hofrat@osadl.org; dzickus@redhat.com; jes.sorensen@redhat.com; Curtin, > Alexander Paul; janani.rvchndrn@gmail.com; > sudipm.mukherjee@gmail.com; prarit@redhat.com; Binder, David Anthony; > nhorman@redhat.com; dan.j.williams@intel.com; linux- > kernel@vger.kernel.org; linux-doc@vger.kernel.org; driverdev- > devel@linuxdriverproject.org; *S-Par-Maintainer > Subject: Re: [PATCH v4 09/29] staging: unisys: visorinput: remove > unnecessary locking > > On Wed, 8 Jun 2016, David Kershner wrote: > > + /* > > + * If we're not paused, really enable interrupts. > > + * Regardless of whether we are paused, set a flag indicating > > + * interrupts should be enabled so when we resume, interrupts > > + * will really be enabled. > > + */ > > + down_write(&devdata->lock_visor_dev); > > I think I asked this before, but I might have missed the answer. > > Why is this a rw_sempahore? It's never taken with down_read and looking > at the > usage sites it's simply a mutex, right? > > Thanks, > > tglx (Yes, I attempted to address this question in a post I made 6/3/2016 4:30 UTC, which I have basically pasted below.) You are correct that this should be a mutex. We have a local patch that addresses this, but would like to submit this via a follow-on patchset if possible. I'll explain. Rationale: our intent for this patchset was to focus on the visorbus driver ONLY. The only reason visorinput got involved in the first place was due to the visorbus change that necessitated that we remove the locking from visorinput_channel_interrupt(), due to that now being called from atomic context. If the semaphore --> mutex change would have been as simple as it sounds, we would have had NO problem including it with the next version (v3) of this patchset. But unfortunately, this change uncovered a latent defect, which necessitated yet another patch. (I know... hard to believe that something this simple would do that, but it did.) Rather than further complicating this patchset, we thought it would be better to address the visorinput issues via a separate follow-on patchset. Is that acceptable for you? Tim Sell From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 2B7911C156A for ; Thu, 9 Jun 2016 12:03:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 247A389655 for ; Thu, 9 Jun 2016 12:03:30 +0000 (UTC) Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kY86I1gwkCUx for ; Thu, 9 Jun 2016 12:03:28 +0000 (UTC) Received: from mail1.bemta12.messagelabs.com (mail1.bemta12.messagelabs.com [216.82.251.17]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 28A9C8704E for ; Thu, 9 Jun 2016 12:03:28 +0000 (UTC) From: "Sell, Timothy C" Subject: RE: [PATCH v4 09/29] staging: unisys: visorinput: remove unnecessary locking Date: Thu, 9 Jun 2016 12:03:15 +0000 Message-ID: References: <1465420463-24982-1-git-send-email-david.kershner@unisys.com> <1465420463-24982-10-git-send-email-david.kershner@unisys.com> In-Reply-To: Content-Language: en-US MIME-Version: 1.0 List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" To: Thomas Gleixner Cc: "dzickus@redhat.com" , "prarit@redhat.com" , "driverdev-devel@linuxdriverproject.org" , "janani.rvchndrn@gmail.com" , "corbet@lwn.net" , "jes.sorensen@redhat.com" , "gregkh@linuxfoundation.org" , "Binder, David Anthony" , "hofrat@osadl.org" , "linux-doc@vger.kernel.org" , "nhorman@redhat.com" , "linux-kernel@vger.kernel.org" , "mingo@redhat.com" , "hpa@zytor.com" , "dan.j.williams@intel.com" , "sudipm.mukherjee@gmail.com" , *S-Par-Maintainer > -----Original Message----- > From: Thomas Gleixner [mailto:tglx@linutronix.de] > Sent: Thursday, June 09, 2016 5:01 AM > To: Kershner, David A > Cc: corbet@lwn.net; mingo@redhat.com; hpa@zytor.com; > gregkh@linuxfoundation.org; Arfvidson, Erik; Sell, Timothy C; > hofrat@osadl.org; dzickus@redhat.com; jes.sorensen@redhat.com; Curtin, > Alexander Paul; janani.rvchndrn@gmail.com; > sudipm.mukherjee@gmail.com; prarit@redhat.com; Binder, David Anthony; > nhorman@redhat.com; dan.j.williams@intel.com; linux- > kernel@vger.kernel.org; linux-doc@vger.kernel.org; driverdev- > devel@linuxdriverproject.org; *S-Par-Maintainer > Subject: Re: [PATCH v4 09/29] staging: unisys: visorinput: remove > unnecessary locking > > On Wed, 8 Jun 2016, David Kershner wrote: > > + /* > > + * If we're not paused, really enable interrupts. > > + * Regardless of whether we are paused, set a flag indicating > > + * interrupts should be enabled so when we resume, interrupts > > + * will really be enabled. > > + */ > > + down_write(&devdata->lock_visor_dev); > > I think I asked this before, but I might have missed the answer. > > Why is this a rw_sempahore? It's never taken with down_read and looking > at the > usage sites it's simply a mutex, right? > > Thanks, > > tglx (Yes, I attempted to address this question in a post I made 6/3/2016 4:30 UTC, which I have basically pasted below.) You are correct that this should be a mutex. We have a local patch that addresses this, but would like to submit this via a follow-on patchset if possible. I'll explain. Rationale: our intent for this patchset was to focus on the visorbus driver ONLY. The only reason visorinput got involved in the first place was due to the visorbus change that necessitated that we remove the locking from visorinput_channel_interrupt(), due to that now being called from atomic context. If the semaphore --> mutex change would have been as simple as it sounds, we would have had NO problem including it with the next version (v3) of this patchset. But unfortunately, this change uncovered a latent defect, which necessitated yet another patch. (I know... hard to believe that something this simple would do that, but it did.) Rather than further complicating this patchset, we thought it would be better to address the visorinput issues via a separate follow-on patchset. Is that acceptable for you? Tim Sell _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel