From patchwork Wed Jun 1 08:56:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 68994 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp2409906qge; Wed, 1 Jun 2016 01:58:21 -0700 (PDT) X-Received: by 10.98.200.215 with SMTP id i84mr6343559pfk.28.1464771487506; Wed, 01 Jun 2016 01:58:07 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e128si3866272pfe.226.2016.06.01.01.58.07; Wed, 01 Jun 2016 01:58:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161016AbcFAI5y (ORCPT + 3 others); Wed, 1 Jun 2016 04:57:54 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:43110 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932409AbcFAI5s (ORCPT ); Wed, 1 Jun 2016 04:57:48 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id u518uxTm020032; Wed, 1 Jun 2016 03:56:59 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id u518v2ch019957; Wed, 1 Jun 2016 03:57:03 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.294.0; Wed, 1 Jun 2016 03:57:02 -0500 Received: from gomoku.home (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id u518ug0V002676; Wed, 1 Jun 2016 03:57:00 -0500 From: Tero Kristo To: , , , , CC: , , Tero Kristo Subject: [PATCH 06/28] crypto: omap-sham: avoid executing tasklet where not needed Date: Wed, 1 Jun 2016 11:56:07 +0300 Message-ID: <1464771389-10640-7-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1464771389-10640-1-git-send-email-t-kristo@ti.com> References: <1464771389-10640-1-git-send-email-t-kristo@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Some of the call paths of OMAP SHA driver can avoid executing the next step of the crypto queue under tasklet; instead, execute the next step directly via function call. This avoids a costly round-trip via the scheduler giving a slight performance boost. Signed-off-by: Tero Kristo --- drivers/crypto/omap-sham.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index a5c823b..34ebe1d 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers/crypto/omap-sham.c @@ -240,6 +240,8 @@ static struct omap_sham_drv sham = { .lock = __SPIN_LOCK_UNLOCKED(sham.lock), }; +static void omap_sham_done_task(unsigned long data); + static inline u32 omap_sham_read(struct omap_sham_dev *dd, u32 offset) { return __raw_readl(dd->io_base + offset); @@ -994,7 +996,7 @@ static void omap_sham_finish_req(struct ahash_request *req, int err) req->base.complete(&req->base, err); /* handle new request */ - tasklet_schedule(&dd->done_task); + omap_sham_done_task((unsigned long)dd); } static int omap_sham_handle_queue(struct omap_sham_dev *dd,