From patchwork Mon Jan 3 13:49:24 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejun Heo X-Patchwork-Id: 448121 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p03DvxKB030439 for ; Mon, 3 Jan 2011 13:57:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754982Ab1ACNuN (ORCPT ); Mon, 3 Jan 2011 08:50:13 -0500 Received: from mail-bw0-f46.google.com ([209.85.214.46]:36659 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754965Ab1ACNuM (ORCPT ); Mon, 3 Jan 2011 08:50:12 -0500 Received: by mail-bw0-f46.google.com with SMTP id 15so13706072bwz.19 for ; Mon, 03 Jan 2011 05:50:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer:in-reply-to:references; bh=pH0U7A8NtimqFmrbdtDmHBgRUeAf4C0aPYlR/Af2qKo=; b=EjknKkCStCRrhALi9n1Oy4DYLFRwZ+BcOgokpiZ4R346Umbrhm2Pw8WluxWptow53b nMqxVeF1WcWd20L5eR6XECx3vD5XCoqCcdm3dKHgSjiyPWdv2q40I9iHos4qM+KWa6Pq 24xuYzWTcabTl4rhtDOqVCfvi1gEGmCtfaQ8k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; b=Ho/A0Y3Jo8kFGrt3VblAiZRqDmOauZCBJelCmNnMy8H0QrpxBj2muL2bsSrp5qV6DL 7+j5UuxA+Me/ZEEMqj7Q7FiYroGbS6L9j/3AV/UtmOE93SCadvS2fzH8ngY6qQxFZiXS 9aXYNilpLALCB0IH5xcIUGE6dLF4AOUZZMPDs= Received: by 10.204.113.75 with SMTP id z11mr13988749bkp.90.1294062611071; Mon, 03 Jan 2011 05:50:11 -0800 (PST) Received: from localhost.localdomain ([130.75.117.88]) by mx.google.com with ESMTPS id f20sm9026594bkf.4.2011.01.03.05.50.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 03 Jan 2011 05:50:10 -0800 (PST) From: Tejun Heo To: linux-kernel@vger.kernel.org Cc: Tejun Heo , Tony Lindgren , linux-omap@vger.kernel.org Subject: [PATCH 01/32] arm/omap: use system_wq in mailbox Date: Mon, 3 Jan 2011 14:49:24 +0100 Message-Id: <1294062595-30097-2-git-send-email-tj@kernel.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1294062595-30097-1-git-send-email-tj@kernel.org> References: <1294062595-30097-1-git-send-email-tj@kernel.org> 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 (demeter1.kernel.org [140.211.167.41]); Mon, 03 Jan 2011 13:57:59 +0000 (UTC) diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c index d2fafb8..5bc4d7b 100644 --- a/arch/arm/plat-omap/mailbox.c +++ b/arch/arm/plat-omap/mailbox.c @@ -31,7 +31,6 @@ #include -static struct workqueue_struct *mboxd; static struct omap_mbox **mboxes; static bool rq_full; @@ -186,7 +185,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: - queue_work(mboxd, &mbox->rxq->work); + schedule_work(&mbox->rxq->work); } static irqreturn_t mbox_interrupt(int irq, void *p) @@ -291,7 +290,7 @@ static void omap_mbox_fini(struct omap_mbox *mbox) { free_irq(mbox->irq, mbox); tasklet_kill(&mbox->txq->tasklet); - flush_work(&mbox->rxq->work); + flush_work_sync(&mbox->rxq->work); mbox_queue_free(mbox->txq); mbox_queue_free(mbox->rxq); @@ -385,10 +384,6 @@ static int __init omap_mbox_init(void) if (err) return err; - mboxd = create_workqueue("mboxd"); - if (!mboxd) - return -ENOMEM; - /* kfifo size sanity check: alignment and minimal size */ mbox_kfifo_size = ALIGN(mbox_kfifo_size, sizeof(mbox_msg_t)); mbox_kfifo_size = max_t(unsigned int, mbox_kfifo_size, sizeof(mbox_msg_t)); @@ -399,7 +394,6 @@ subsys_initcall(omap_mbox_init); static void __exit omap_mbox_exit(void) { - destroy_workqueue(mboxd); class_unregister(&omap_mbox_class); } module_exit(omap_mbox_exit);