From patchwork Thu Feb 18 21:07:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suman Anna X-Patchwork-Id: 80438 X-Patchwork-Delegate: tony@atomide.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 o1IL7YCC025683 for ; Thu, 18 Feb 2010 21:07:34 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753550Ab0BRVHe (ORCPT ); Thu, 18 Feb 2010 16:07:34 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:53139 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753151Ab0BRVHd convert rfc822-to-8bit (ORCPT ); Thu, 18 Feb 2010 16:07:33 -0500 Received: from dlep34.itg.ti.com ([157.170.170.115]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id o1IL7TWO018355 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Feb 2010 15:07:29 -0600 Received: from dlep26.itg.ti.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id o1IL7Tn4010968; Thu, 18 Feb 2010 15:07:29 -0600 (CST) 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 o1IL7T9u004303; Thu, 18 Feb 2010 15:07:29 -0600 (CST) Received: from dlee04.ent.ti.com ([157.170.170.9]) by dlee74.ent.ti.com ([157.170.170.8]) with mapi; Thu, 18 Feb 2010 15:07:28 -0600 From: "Anna, Suman" To: "linux-omap@vger.kernel.org" CC: "Hiroshi.DOYU@nokia.com" , "Clark, Rob" , "Kanigeri, Hari" , "C.A, Subramaniam" Date: Thu, 18 Feb 2010 15:07:27 -0600 Subject: [PATCH 4/5] omap2/3/4: mailbox: use dedicated work queue for handling mailbox rx interrupt Thread-Topic: [PATCH 4/5] omap2/3/4: mailbox: use dedicated work queue for handling mailbox rx interrupt Thread-Index: Acqw3mBBPo33MuVpSEuoNMXlX1XoFw== Message-ID: <2C1563023E232C49B9F505633D57C2DA2640D0235F@dlee04.ent.ti.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]); Thu, 18 Feb 2010 21:07:35 +0000 (UTC) diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c index 8e90633..4229cec 100644 --- a/arch/arm/plat-omap/mailbox.c +++ b/arch/arm/plat-omap/mailbox.c @@ -28,6 +28,7 @@ #include +static struct workqueue_struct *mboxd; static struct omap_mbox *mboxes; static DEFINE_RWLOCK(mboxes_lock); @@ -188,7 +189,7 @@ static void __mbox_rx_interrupt(struct omap_mbox *mbox) /* no more messages in the fifo. clear IRQ source. */ ack_mbox_irq(mbox, IRQ_RX); nomem: - schedule_work(&mbox->rxq->work); + queue_work(mboxd, &mbox->rxq->work); } static irqreturn_t mbox_interrupt(int irq, void *p) @@ -401,12 +402,17 @@ EXPORT_SYMBOL(omap_mbox_unregister); static int __init omap_mbox_init(void) { + mboxd = create_workqueue("mboxd"); + if (!mboxd) + return -ENOMEM; + return 0; } module_init(omap_mbox_init); static void __exit omap_mbox_exit(void) { + destroy_workqueue(mboxd); } module_exit(omap_mbox_exit);