From patchwork Thu Apr 29 12:44:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kanigeri, Hari" X-Patchwork-Id: 95907 X-Patchwork-Delegate: hiroshi.doyu@nokia.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3UH7Qv7007275 for ; Fri, 30 Apr 2010 17:07:31 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932646Ab0D3RFC (ORCPT ); Fri, 30 Apr 2010 13:05:02 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:55458 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932634Ab0D3REv convert rfc822-to-8bit (ORCPT ); Fri, 30 Apr 2010 13:04:51 -0400 Received: from dlep35.itg.ti.com ([157.170.170.118]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id o3TCiT6A024873 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 29 Apr 2010 07:44:29 -0500 Received: from dlep26.itg.ti.com (localhost [127.0.0.1]) by dlep35.itg.ti.com (8.13.7/8.13.7) with ESMTP id o3TCiTHY017939; Thu, 29 Apr 2010 07:44:29 -0500 (CDT) Received: from dlee74.ent.ti.com (localhost [127.0.0.1]) by dlep26.itg.ti.com (8.13.8/8.13.8) with ESMTP id o3TCiTg4028812; Thu, 29 Apr 2010 07:44:29 -0500 (CDT) Received: from dlee03.ent.ti.com ([157.170.170.18]) by dlee74.ent.ti.com ([157.170.170.8]) with mapi; Thu, 29 Apr 2010 07:44:29 -0500 From: "Kanigeri, Hari" To: Ohad Ben-Cohen , "linux-omap@vger.kernel.org" CC: Hiroshi Doyu Date: Thu, 29 Apr 2010 07:44:28 -0500 Subject: RE: [PATCH 1/4] omap: mailbox cleanup: convert rwlocks to spinlock Thread-Topic: [PATCH 1/4] omap: mailbox cleanup: convert rwlocks to spinlock Thread-Index: AcrmM0SSPYSK/FaIRJeCMM1H5TbgoQBZfw/w Message-ID: <8F7AF80515AF0D4D93307E594F3CB40E4B661D06@dlee03.ent.ti.com> References: <1272390982-14882-1-git-send-email-ohad@wizery.com> <1272390982-14882-2-git-send-email-ohad@wizery.com> In-Reply-To: <1272390982-14882-2-git-send-email-ohad@wizery.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 30 Apr 2010 17:07:32 +0000 (UTC) diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c index 27a8d98..d6a700d 100644 --- a/arch/arm/plat-omap/mailbox.c +++ b/arch/arm/plat-omap/mailbox.c @@ -243,16 +243,16 @@ static int omap_mbox_startup(struct omap_mbox *mbox) struct omap_mbox_queue *mq; if (likely(mbox->ops->startup)) { - write_lock(&mboxes_lock); + spin_lock(&mboxes_lock); if (!mbox_configured) ret = mbox->ops->startup(mbox); if (unlikely(ret)) { - write_unlock(&mboxes_lock); + spin_unlock(&mboxes_lock); return ret; } mbox_configured++; - write_unlock(&mboxes_lock); + spin_unlock(&mboxes_lock); } ret = request_irq(mbox->irq, mbox_interrupt, IRQF_SHARED, @@ -298,12 +298,12 @@ static void omap_mbox_fini(struct omap_mbox *mbox) free_irq(mbox->irq, mbox); if (likely(mbox->ops->shutdown)) { - write_lock(&mboxes_lock); + spin_lock(&mboxes_lock); if (mbox_configured > 0) mbox_configured--; if (!mbox_configured) mbox->ops->shutdown(mbox); - write_unlock(&mboxes_lock); + spin_unlock(&mboxes_lock); } }