From patchwork Thu Sep 3 06:06:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11752461 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F03D9138A for ; Thu, 3 Sep 2020 06:06:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D61C520737 for ; Thu, 3 Sep 2020 06:06:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BVGnutTs" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725851AbgICGG6 (ORCPT ); Thu, 3 Sep 2020 02:06:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43460 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725943AbgICGG5 (ORCPT ); Thu, 3 Sep 2020 02:06:57 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36EF9C061244 for ; Wed, 2 Sep 2020 23:06:56 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id u13so1261205pgh.1 for ; Wed, 02 Sep 2020 23:06:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Q/4QvKZBb/mGn1yWZfjleUiofW6BFP93AH88fMJBGbQ=; b=BVGnutTsOjiEkog1rX/m20RZyGITJsFq/Zbzh8zmL2UlvN9kdtYIp2RrgYoLRRcC9m g2xwVB2bRBMRH12RTlpZPEe2FlEofTDnAAHTgL0++eFF90rrWZveW+AxiViBdGUzDlJ8 /skVlrEWzU8UqIPgYmfOK7fGkxpMIcywdC47dnV83hw7rsC2vkZYYfjusLa0/mmZK26t Hc7AILnieBdWHZBVKHWxvwyz76fBBmIP9PFKIrlKQZGWs5qmw7Qn7O1jKxsVIrrW2i+D EOzM44InuLtVKTvMOy4QpoOFjpSkm4l4k8dN0tzi+w6Rl0QlE9b69pzZt9STCC2Ukyxl LTgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Q/4QvKZBb/mGn1yWZfjleUiofW6BFP93AH88fMJBGbQ=; b=OqO67leZef0F5GJXBVSzYN3KlVlxgI1xV4rqln4ZFlv+ONCPcWnkas3Tfwi6W8+VJU eme2cWboC98cfgogwnKHHtmGfhOUm/vvEoyKKR6OyYpovrgztDjrGeprkXuKNOxnCEVG f9rU8525tt73JE4HpBj0XRsykOYFf256z02FIVUdyWDzJwUXn+GMRUQLFztqOXe1DsT1 Q8bNSWWwAgt01bhgtYToEOsiJ1AIkEMwYcCtX1uR21wun5uZXohw9TA++2w/T44THrSG nkXb3QCfv993FulLwGf0N+HTAw2mB4HRtjZI0mlHkR8gbXtFat7b+Xfp9w+6XyvxC7ms zufA== X-Gm-Message-State: AOAM531UyI9bubh3nClqgutTby5LNYrERzTRz2GcckqxS2Mt/SYy1aWM Qcmqkz5fLgJXmKJz792g3Ds= X-Google-Smtp-Source: ABdhPJxrO9CDDrlWoVfAQb2DOR02B87mu/g9LhYBnEQnwqO5n5N0otwCkGoZCYYYxzMIPDqTW2c79A== X-Received: by 2002:a62:7743:0:b029:13c:1611:658e with SMTP id s64-20020a6277430000b029013c1611658emr589126pfc.11.1599113215697; Wed, 02 Sep 2020 23:06:55 -0700 (PDT) Received: from localhost.localdomain ([49.207.196.170]) by smtp.gmail.com with ESMTPSA id v1sm1210395pjh.16.2020.09.02.23.06.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2020 23:06:55 -0700 (PDT) From: Allen Pais To: jgg@nvidia.com, dledford@redhat.com Cc: linux-rdma@vger.kernel.org, selvin.xavier@broadcom.com, devesh.sharma@broadcom.com, somnath.kotur@broadcom.com, sriharsha.basavapatna@broadcom.com, nareshkumar.pbs@broadcom.com, jgg@ziepe.ca, mike.marciniszyn@intel.com, dennis.dalessandro@intel.com, faisal.latif@intel.com, shiraz.saleem@intel.com, Allen Pais , Romain Perier Subject: [PATCH v2 1/5] RDMA/bnxt_re: convert tasklets to use new tasklet_setup() API Date: Thu, 3 Sep 2020 11:36:33 +0530 Message-Id: <20200903060637.424458-2-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200903060637.424458-1-allen.lkml@gmail.com> References: <20200903060637.424458-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/infiniband/hw/bnxt_re/qplib_fp.c | 7 +++---- drivers/infiniband/hw/bnxt_re/qplib_rcfw.c | 11 +++++------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/infiniband/hw/bnxt_re/qplib_fp.c b/drivers/infiniband/hw/bnxt_re/qplib_fp.c index d60e3dcea087..34a08ae00f24 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_fp.c +++ b/drivers/infiniband/hw/bnxt_re/qplib_fp.c @@ -295,9 +295,9 @@ static void __wait_for_all_nqes(struct bnxt_qplib_cq *cq, u16 cnq_events) } } -static void bnxt_qplib_service_nq(unsigned long data) +static void bnxt_qplib_service_nq(struct tasklet_struct *t) { - struct bnxt_qplib_nq *nq = (struct bnxt_qplib_nq *)data; + struct bnxt_qplib_nq *nq = from_tasklet(nq, t, nq_tasklet); struct bnxt_qplib_hwq *hwq = &nq->hwq; int num_srqne_processed = 0; int num_cqne_processed = 0; @@ -448,8 +448,7 @@ int bnxt_qplib_nq_start_irq(struct bnxt_qplib_nq *nq, int nq_indx, nq->msix_vec = msix_vector; if (need_init) - tasklet_init(&nq->nq_tasklet, bnxt_qplib_service_nq, - (unsigned long)nq); + tasklet_setup(&nq->nq_tasklet, bnxt_qplib_service_nq); else tasklet_enable(&nq->nq_tasklet); diff --git a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c index 4e211162acee..1f9e8234d0f4 100644 --- a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c +++ b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c @@ -50,7 +50,7 @@ #include "qplib_sp.h" #include "qplib_fp.h" -static void bnxt_qplib_service_creq(unsigned long data); +static void bnxt_qplib_service_creq(struct tasklet_struct *t); /* Hardware communication channel */ static int __wait_for_resp(struct bnxt_qplib_rcfw *rcfw, u16 cookie) @@ -79,7 +79,7 @@ static int __block_for_resp(struct bnxt_qplib_rcfw *rcfw, u16 cookie) goto done; do { mdelay(1); /* 1m sec */ - bnxt_qplib_service_creq((unsigned long)rcfw); + bnxt_qplib_service_creq(&rcfw->creq.creq_tasklet); } while (test_bit(cbit, cmdq->cmdq_bitmap) && --count); done: return count ? 0 : -ETIMEDOUT; @@ -369,9 +369,9 @@ static int bnxt_qplib_process_qp_event(struct bnxt_qplib_rcfw *rcfw, } /* SP - CREQ Completion handlers */ -static void bnxt_qplib_service_creq(unsigned long data) +static void bnxt_qplib_service_creq(struct tasklet_struct *t) { - struct bnxt_qplib_rcfw *rcfw = (struct bnxt_qplib_rcfw *)data; + struct bnxt_qplib_rcfw *rcfw = from_tasklet(rcfw, t, creq.creq_tasklet); struct bnxt_qplib_creq_ctx *creq = &rcfw->creq; u32 type, budget = CREQ_ENTRY_POLL_BUDGET; struct bnxt_qplib_hwq *hwq = &creq->hwq; @@ -685,8 +685,7 @@ int bnxt_qplib_rcfw_start_irq(struct bnxt_qplib_rcfw *rcfw, int msix_vector, creq->msix_vec = msix_vector; if (need_init) - tasklet_init(&creq->creq_tasklet, - bnxt_qplib_service_creq, (unsigned long)rcfw); + tasklet_setup(&creq->creq_tasklet, bnxt_qplib_service_creq); else tasklet_enable(&creq->creq_tasklet); rc = request_irq(creq->msix_vec, bnxt_qplib_creq_irq, 0, From patchwork Thu Sep 3 06:06:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11752463 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E23CA13B6 for ; Thu, 3 Sep 2020 06:07:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C78ED20737 for ; Thu, 3 Sep 2020 06:07:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rQXPXWsm" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725967AbgICGHE (ORCPT ); Thu, 3 Sep 2020 02:07:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725943AbgICGHC (ORCPT ); Thu, 3 Sep 2020 02:07:02 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADA73C061244 for ; Wed, 2 Sep 2020 23:07:00 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id o20so1391079pfp.11 for ; Wed, 02 Sep 2020 23:07:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qgTAEJ+MvTux0GG6ydOla3bizdzDlSbFfuqk1terVhA=; b=rQXPXWsm3J/JEy+yWVe+nbp18l6fBRfEuGjhc0dR2rVcJ2dcR+znf7ueidew1dBguR pvy4UNkoo7RAiu55NP89BSB77K8j2pd3GpdYOvhntfbMfDHq/4jhGl1naCGW1zySWRKz 95M/xuhd4aUc3Jw3d25JNTGZnQS/atQdg65SnzaW45+sACyt68/2sZe8yWLW7ugPvzaQ iaGEswsHacLJbPh7EcxPFYxZP2h1RGGDzNWS5A+c+A3ctyNDbBVHQfvF1mFzJPgPmYRv 7tU7l3JusmWyUJc1L+UcpB/AC3w0gZFzVN1GnBiom1D+WZjrseAQpguHQNd8pJvGHJod DR7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qgTAEJ+MvTux0GG6ydOla3bizdzDlSbFfuqk1terVhA=; b=mtleHwrZaTl5OXZdgWGznp+dhkOH+2dBweKw174gSvTsmBMCOZiyHC3axvKq59OLdT mO3REYyPnCMaScElZ2Bkhf80OQRKz2k6DjzRkUIivMrdHFwesqWFFShvWdDC/EAjqAZc ENIKRHjwYzOTxar46dSPOcnBkZOoCUohVEIT/zhH3eJGLvEHPThx0EV+DDRXE1jYW7jN SnT1W0RPdghDgPpX2tjip3XA8j3zdWOYfSklJZC2r6IoRXTKu5X0bNsuuwIQzoofWbfD XrkMKZI2EJ7oSIMqJMeQAXUwT+xK9cKy5GVcrD8PG2U0xBUvQGbVB+Mu7JOmQ44qfWKi Eaqw== X-Gm-Message-State: AOAM532nLvmPX23VXiR+2+YoDjP4yHmMZbiPimp4ibw7L0KoqcmOCGnX HI62k5fij/r/MIow6oZlheE= X-Google-Smtp-Source: ABdhPJxFaZwBIWtaWb79A+o68UJ4VuVLJ2FbbFvBxzbd0GpmBZW1CyNIBrgA+RtNgX+yoetwvueXwA== X-Received: by 2002:aa7:9a44:: with SMTP id x4mr2213275pfj.199.1599113220312; Wed, 02 Sep 2020 23:07:00 -0700 (PDT) Received: from localhost.localdomain ([49.207.196.170]) by smtp.gmail.com with ESMTPSA id v1sm1210395pjh.16.2020.09.02.23.06.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2020 23:06:59 -0700 (PDT) From: Allen Pais To: jgg@nvidia.com, dledford@redhat.com Cc: linux-rdma@vger.kernel.org, selvin.xavier@broadcom.com, devesh.sharma@broadcom.com, somnath.kotur@broadcom.com, sriharsha.basavapatna@broadcom.com, nareshkumar.pbs@broadcom.com, jgg@ziepe.ca, mike.marciniszyn@intel.com, dennis.dalessandro@intel.com, faisal.latif@intel.com, shiraz.saleem@intel.com, Allen Pais , Romain Perier Subject: [PATCH v2 2/5] IB/hfi1: convert tasklets to use new tasklet_setup() API Date: Thu, 3 Sep 2020 11:36:34 +0530 Message-Id: <20200903060637.424458-3-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200903060637.424458-1-allen.lkml@gmail.com> References: <20200903060637.424458-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/infiniband/hw/hfi1/sdma.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/infiniband/hw/hfi1/sdma.c b/drivers/infiniband/hw/hfi1/sdma.c index 04575c9afd61..a307d4c8b15a 100644 --- a/drivers/infiniband/hw/hfi1/sdma.c +++ b/drivers/infiniband/hw/hfi1/sdma.c @@ -232,11 +232,11 @@ static const struct sdma_set_state_action sdma_action_table[] = { static void sdma_complete(struct kref *); static void sdma_finalput(struct sdma_state *); static void sdma_get(struct sdma_state *); -static void sdma_hw_clean_up_task(unsigned long); +static void sdma_hw_clean_up_task(struct tasklet_struct *); static void sdma_put(struct sdma_state *); static void sdma_set_state(struct sdma_engine *, enum sdma_states); static void sdma_start_hw_clean_up(struct sdma_engine *); -static void sdma_sw_clean_up_task(unsigned long); +static void sdma_sw_clean_up_task(struct tasklet_struct *); static void sdma_sendctrl(struct sdma_engine *, unsigned); static void init_sdma_regs(struct sdma_engine *, u32, uint); static void sdma_process_event( @@ -545,9 +545,10 @@ static void sdma_err_progress_check(struct timer_list *t) schedule_work(&sde->err_halt_worker); } -static void sdma_hw_clean_up_task(unsigned long opaque) +static void sdma_hw_clean_up_task(struct tasklet_struct *t) { - struct sdma_engine *sde = (struct sdma_engine *)opaque; + struct sdma_engine *sde = from_tasklet(sde, t, + sdma_hw_clean_up_task); u64 statuscsr; while (1) { @@ -604,9 +605,9 @@ static void sdma_flush_descq(struct sdma_engine *sde) sdma_desc_avail(sde, sdma_descq_freecnt(sde)); } -static void sdma_sw_clean_up_task(unsigned long opaque) +static void sdma_sw_clean_up_task(struct tasklet_struct *t) { - struct sdma_engine *sde = (struct sdma_engine *)opaque; + struct sdma_engine *sde = from_tasklet(sde, t, sdma_sw_clean_up_task); unsigned long flags; spin_lock_irqsave(&sde->tail_lock, flags); @@ -1454,11 +1455,10 @@ int sdma_init(struct hfi1_devdata *dd, u8 port) sde->tail_csr = get_kctxt_csr_addr(dd, this_idx, SD(TAIL)); - tasklet_init(&sde->sdma_hw_clean_up_task, sdma_hw_clean_up_task, - (unsigned long)sde); - - tasklet_init(&sde->sdma_sw_clean_up_task, sdma_sw_clean_up_task, - (unsigned long)sde); + tasklet_setup(&sde->sdma_hw_clean_up_task, + sdma_hw_clean_up_task); + tasklet_setup(&sde->sdma_sw_clean_up_task, + sdma_sw_clean_up_task); INIT_WORK(&sde->err_halt_worker, sdma_err_halt_wait); INIT_WORK(&sde->flush_worker, sdma_field_flush); From patchwork Thu Sep 3 06:06:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11752465 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 13666138A for ; Thu, 3 Sep 2020 06:07:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EF1E520758 for ; Thu, 3 Sep 2020 06:07:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Wyz0rV52" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726022AbgICGHN (ORCPT ); Thu, 3 Sep 2020 02:07:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725943AbgICGHF (ORCPT ); Thu, 3 Sep 2020 02:07:05 -0400 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E10DC061244 for ; Wed, 2 Sep 2020 23:07:05 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id e33so1261815pgm.0 for ; Wed, 02 Sep 2020 23:07:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=owfrpNL/RiIwYXs92g1iDTHe3f/CAcnbksFi3Dnvj5A=; b=Wyz0rV52Qk3mPzP1tINrNKzp5WbBiz9zCZrfzZlc0WTSGmLIqYHQl+eN3yEuuRu2tT 6CzApIXl1wa0Hq+EGl58nstj+drrEUyhxTOrqfcx86Ym5HuUzP/335XW55bgE64J8bFf juIfD7xKvh3WIwmfZqQF4814dBQMeHJxutsnxrzZ+2pGOnCAlSgt/DJkQXs7HtO5Ly3b ig5W66/nRDyJhK8fxajcN7iGNxb6zDliHay5kjP/Iz8PiEdZhwd9utvecWd4l6q6/MSM XBaThDfCfoYku5vgNDvvSE46W6/tMWdwbN19S/FR0AYrqJ/ahWtYSIc0EF75hvUtfv/o dtLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=owfrpNL/RiIwYXs92g1iDTHe3f/CAcnbksFi3Dnvj5A=; b=Kz8YS3ox62GKdfqXbN1rzlyJVf9hXwk1M795r5m14QWmK0oEHjD0H3ADKk3xnEC1FR 0R5Zluxg1H0hmKLVhdRmtFKzdNXvhAWXgjHumlHVqGAGhdwrj4Vivravqu8Lgeri42jW Iid/9EECL4JvhVKnNQEKwutxJTpSMAtjJn4+34k/xU25vAQjvHWUpn5l4xm57KiimFNs 9fZIuzUEMg9z1LwrQ9IIiUTn9UsBa09BVZ4JEz3UHQOWDnEAYjdMnkUTDf35otHlEskv 7C6P6cUgdDyjpir+L8g0SqZnYXAu5KkRpciH2JchSYazvurVx/ebvdKQ4M8iqBY/21Wf n2Gg== X-Gm-Message-State: AOAM532pXKZ/G+e6SOMHzxnoG0col1ulDNImfxnqRiS4NpsWUt2k3gSf 70V+CT+UuZLYZc4iOPSQE64= X-Google-Smtp-Source: ABdhPJz7kfAR/+QTLxlgBSI4LyH8WxtPcSg8bnfJnfrvoN6ejpSqsMgTq+j20YSy29F8AaJkNbwooA== X-Received: by 2002:a17:902:7d85:: with SMTP id a5mr2195461plm.148.1599113224787; Wed, 02 Sep 2020 23:07:04 -0700 (PDT) Received: from localhost.localdomain ([49.207.196.170]) by smtp.gmail.com with ESMTPSA id v1sm1210395pjh.16.2020.09.02.23.07.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2020 23:07:04 -0700 (PDT) From: Allen Pais To: jgg@nvidia.com, dledford@redhat.com Cc: linux-rdma@vger.kernel.org, selvin.xavier@broadcom.com, devesh.sharma@broadcom.com, somnath.kotur@broadcom.com, sriharsha.basavapatna@broadcom.com, nareshkumar.pbs@broadcom.com, jgg@ziepe.ca, mike.marciniszyn@intel.com, dennis.dalessandro@intel.com, faisal.latif@intel.com, shiraz.saleem@intel.com, Allen Pais , Romain Perier Subject: [PATCH v2 3/5] RDMA/i40iw: convert tasklets to use new tasklet_setup() API Date: Thu, 3 Sep 2020 11:36:35 +0530 Message-Id: <20200903060637.424458-4-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200903060637.424458-1-allen.lkml@gmail.com> References: <20200903060637.424458-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/infiniband/hw/i40iw/i40iw_main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/infiniband/hw/i40iw/i40iw_main.c b/drivers/infiniband/hw/i40iw/i40iw_main.c index 58a433135a03..c0cdb25440bf 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_main.c +++ b/drivers/infiniband/hw/i40iw/i40iw_main.c @@ -192,9 +192,9 @@ static void i40iw_enable_intr(struct i40iw_sc_dev *dev, u32 msix_id) * i40iw_dpc - tasklet for aeq and ceq 0 * @data: iwarp device */ -static void i40iw_dpc(unsigned long data) +static void i40iw_dpc(struct tasklet_struct *t) { - struct i40iw_device *iwdev = (struct i40iw_device *)data; + struct i40iw_device *iwdev = from_tasklet(iwdev, t, dpc_tasklet); if (iwdev->msix_shared) i40iw_process_ceq(iwdev, iwdev->ceqlist); @@ -206,9 +206,9 @@ static void i40iw_dpc(unsigned long data) * i40iw_ceq_dpc - dpc handler for CEQ * @data: data points to CEQ */ -static void i40iw_ceq_dpc(unsigned long data) +static void i40iw_ceq_dpc(struct tasklet_struct *t) { - struct i40iw_ceq *iwceq = (struct i40iw_ceq *)data; + struct i40iw_ceq *iwceq = from_tasklet(iwceq, t, dpc_tasklet); struct i40iw_device *iwdev = iwceq->iwdev; i40iw_process_ceq(iwdev, iwceq); @@ -689,10 +689,10 @@ static enum i40iw_status_code i40iw_configure_ceq_vector(struct i40iw_device *iw enum i40iw_status_code status; if (iwdev->msix_shared && !ceq_id) { - tasklet_init(&iwdev->dpc_tasklet, i40iw_dpc, (unsigned long)iwdev); + tasklet_setup(&iwdev->dpc_tasklet, i40iw_dpc); status = request_irq(msix_vec->irq, i40iw_irq_handler, 0, "AEQCEQ", iwdev); } else { - tasklet_init(&iwceq->dpc_tasklet, i40iw_ceq_dpc, (unsigned long)iwceq); + tasklet_setup(&iwceq->dpc_tasklet, i40iw_ceq_dpc); status = request_irq(msix_vec->irq, i40iw_ceq_handler, 0, "CEQ", iwceq); } @@ -841,7 +841,7 @@ static enum i40iw_status_code i40iw_configure_aeq_vector(struct i40iw_device *iw u32 ret = 0; if (!iwdev->msix_shared) { - tasklet_init(&iwdev->dpc_tasklet, i40iw_dpc, (unsigned long)iwdev); + tasklet_setup(&iwdev->dpc_tasklet, i40iw_dpc); ret = request_irq(msix_vec->irq, i40iw_irq_handler, 0, "i40iw", iwdev); } if (ret) { From patchwork Thu Sep 3 06:06:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11752469 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B65B4166C for ; Thu, 3 Sep 2020 06:07:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9DBB420758 for ; Thu, 3 Sep 2020 06:07:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Mf+OBcvI" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726025AbgICGHN (ORCPT ); Thu, 3 Sep 2020 02:07:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726109AbgICGHJ (ORCPT ); Thu, 3 Sep 2020 02:07:09 -0400 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 683B9C061244 for ; Wed, 2 Sep 2020 23:07:09 -0700 (PDT) Received: by mail-pf1-x442.google.com with SMTP id k15so1384610pfc.12 for ; Wed, 02 Sep 2020 23:07:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0IAAG0FjZzDRtU1T0Ft7OlLUeddkej5M/Q99d+vMwhc=; b=Mf+OBcvI7TNvb3+jfyD9difio5rwle6pVPBEmnIzKZHx/CYmTvwgr14f55EcAKnM9f qhbmzeHutFxaz8Kkx6nyo1T4RDE9vA9Kf+33jvnTsopFAzCk1wJbHnv4trzleCQ9k7OX J/tdBjgw78UIkC7yshJYBUYf7OY/g/ZTHgrsZ/YSDKRKXU+1hyxxyhuNsYlZFIv1Zu6c LPQ7gx7+pzZydaTV9zmON/OFfd8AknvKlEcLMbp7pd8I6YF/IUhUe0iDKipollt3iwqf m6RaAReuIQDHeeA98pHfBB9xBePSZiGq9gRk4C/ZrNPzHGGw3W68QrMJ2jEK7A927YvK DGDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0IAAG0FjZzDRtU1T0Ft7OlLUeddkej5M/Q99d+vMwhc=; b=RIKGmNxRJO7r9q31l5rlxny7Ygv9/P7ifJyZAC4n3sTeuCQ8uUiZfocC0oGzusKm1X eFBIwo8Fuu4Es315io7UtjttQA0//qpoVpdoEhbsGRiItFaCtbNl1bELWyVDnnQNS3C3 1DK3aKw7J80i61tqc7pLneTIAwrkDHYXmG4ZZIG4fsqHbLkOaj2oNMLTOHS1bL1bpAa2 mGYBswj3w51hpv4v6RpO68g1R4rgUROAr7qN4VparfKFXpp/XbwUKU8REWYZA5zc3A9W WghtABOfzdtqBtLbXyFINAWLVWA+JK5ZcJ/HEysBhs3ie+I0MYBvK/MDVeUXsRfM2WJt gl2g== X-Gm-Message-State: AOAM533HjPDcI4j23d6a8PRc7Rxn3wYqOeI5nCtK3bNR+SEWX+mepPFz XMbBWdlGe8slvgqmw/SP2I8= X-Google-Smtp-Source: ABdhPJyw59KFVseWM7ViaFXbmWmoJMOO10m+8kNtECPM2TH/oq2Y8CMcVKFMm2UmfRPziZx1G1cXiw== X-Received: by 2002:a17:902:56a:: with SMTP id 97mr2249475plf.130.1599113229032; Wed, 02 Sep 2020 23:07:09 -0700 (PDT) Received: from localhost.localdomain ([49.207.196.170]) by smtp.gmail.com with ESMTPSA id v1sm1210395pjh.16.2020.09.02.23.07.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2020 23:07:08 -0700 (PDT) From: Allen Pais To: jgg@nvidia.com, dledford@redhat.com Cc: linux-rdma@vger.kernel.org, selvin.xavier@broadcom.com, devesh.sharma@broadcom.com, somnath.kotur@broadcom.com, sriharsha.basavapatna@broadcom.com, nareshkumar.pbs@broadcom.com, jgg@ziepe.ca, mike.marciniszyn@intel.com, dennis.dalessandro@intel.com, faisal.latif@intel.com, shiraz.saleem@intel.com, Allen Pais , Romain Perier Subject: [PATCH v2 4/5] RDMA/qib: convert tasklets to use new tasklet_setup() API Date: Thu, 3 Sep 2020 11:36:36 +0530 Message-Id: <20200903060637.424458-5-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200903060637.424458-1-allen.lkml@gmail.com> References: <20200903060637.424458-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/infiniband/hw/qib/qib_iba7322.c | 7 +++---- drivers/infiniband/hw/qib/qib_sdma.c | 10 +++++----- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/infiniband/hw/qib/qib_iba7322.c b/drivers/infiniband/hw/qib/qib_iba7322.c index a10eab89aee4..189a0ce6056a 100644 --- a/drivers/infiniband/hw/qib/qib_iba7322.c +++ b/drivers/infiniband/hw/qib/qib_iba7322.c @@ -1733,9 +1733,9 @@ static noinline void handle_7322_errors(struct qib_devdata *dd) return; } -static void qib_error_tasklet(unsigned long data) +static void qib_error_tasklet(struct tasklet_struct *t) { - struct qib_devdata *dd = (struct qib_devdata *)data; + struct qib_devdata *dd = from_tasklet(dd, t, error_tasklet); handle_7322_errors(dd); qib_write_kreg(dd, kr_errmask, dd->cspec->errormask); @@ -3537,8 +3537,7 @@ static void qib_setup_7322_interrupt(struct qib_devdata *dd, int clearpend) for (i = 0; i < ARRAY_SIZE(redirect); i++) qib_write_kreg(dd, kr_intredirect + i, redirect[i]); dd->cspec->main_int_mask = mask; - tasklet_init(&dd->error_tasklet, qib_error_tasklet, - (unsigned long)dd); + tasklet_setup(&dd->error_tasklet, qib_error_tasklet); } /** diff --git a/drivers/infiniband/hw/qib/qib_sdma.c b/drivers/infiniband/hw/qib/qib_sdma.c index 8f8d61736656..5e86cbf7d70e 100644 --- a/drivers/infiniband/hw/qib/qib_sdma.c +++ b/drivers/infiniband/hw/qib/qib_sdma.c @@ -62,7 +62,7 @@ static void sdma_get(struct qib_sdma_state *); static void sdma_put(struct qib_sdma_state *); static void sdma_set_state(struct qib_pportdata *, enum qib_sdma_states); static void sdma_start_sw_clean_up(struct qib_pportdata *); -static void sdma_sw_clean_up_task(unsigned long); +static void sdma_sw_clean_up_task(struct tasklet_struct *); static void unmap_desc(struct qib_pportdata *, unsigned); static void sdma_get(struct qib_sdma_state *ss) @@ -119,9 +119,10 @@ static void clear_sdma_activelist(struct qib_pportdata *ppd) } } -static void sdma_sw_clean_up_task(unsigned long opaque) +static void sdma_sw_clean_up_task(struct tasklet_struct *t) { - struct qib_pportdata *ppd = (struct qib_pportdata *) opaque; + struct qib_pportdata *ppd = from_tasklet(ppd, t, + sdma_sw_clean_up_task); unsigned long flags; spin_lock_irqsave(&ppd->sdma_lock, flags); @@ -436,8 +437,7 @@ int qib_setup_sdma(struct qib_pportdata *ppd) INIT_LIST_HEAD(&ppd->sdma_activelist); - tasklet_init(&ppd->sdma_sw_clean_up_task, sdma_sw_clean_up_task, - (unsigned long)ppd); + tasklet_setup(&ppd->sdma_sw_clean_up_task, sdma_sw_clean_up_task); ret = dd->f_init_sdma_regs(ppd); if (ret) From patchwork Thu Sep 3 06:06:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Allen X-Patchwork-Id: 11752473 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 47FE2138A for ; Thu, 3 Sep 2020 06:07:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2E17E2071B for ; Thu, 3 Sep 2020 06:07:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="s7RN7pAD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726339AbgICGHP (ORCPT ); Thu, 3 Sep 2020 02:07:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726047AbgICGHO (ORCPT ); Thu, 3 Sep 2020 02:07:14 -0400 Received: from mail-pj1-x1043.google.com (mail-pj1-x1043.google.com [IPv6:2607:f8b0:4864:20::1043]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF84BC061244 for ; Wed, 2 Sep 2020 23:07:13 -0700 (PDT) Received: by mail-pj1-x1043.google.com with SMTP id ds1so981925pjb.1 for ; Wed, 02 Sep 2020 23:07:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7qELzTY9D/PZ9hN6ksqo4sH3izZkxkXWXFuBSyF3z60=; b=s7RN7pAD8x8YfAXUMLp0Pph4yI6Sa4lS7J7rShZf3t79nOpYThmN3WP7pcw/IGm3OJ QvHPzjSR7fhT32gPheXkDF8RRB3NQPwDSBQq7Cs2scYBBPqPYB9057Y2ar3p6sLZFFyW 19Lj4MutdZlysbG/4exYiVBBIFZXuKstd06eexblKns7FK10hvSw5HRCf+GV8OT5ZENt n6CI87SV5esvVXQ92T9LZzF8DFS/pAY14CNcKhhZz3Yfy8DYrM0kVsCmYTEnudcU5U3s MWJzN4mLt9iswlWYCJwRuOAbxhrrCIGQwsbSgMgp1E/aNlET7VwTVGmzKDQmeObXCdTo ADJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7qELzTY9D/PZ9hN6ksqo4sH3izZkxkXWXFuBSyF3z60=; b=C/V3p6TVcM7a+MekBz08uvMHDdn7dhOHTuU70FndULUDQi5oOEmG3AXxZlB4j+gCZ7 Z0ldgsXV1wt9NwAxR9CVi9C62tyqonaZ5vBtT72YiQhWO9dd9ccfNO9FTmEaGz6J05j9 sVEt2aHUNOaKntV11WVVmocpab+lAwhtQkISza7Hbgb6fwfEyTj+syNVg9kbMxWOPyzx JdMiKz/uNahdjocuMIE4o6o1zK/QPlp5Hx4BMl3GI+nvclPSBG/jxvB8Fq92Z5xWsUjL 5h9cZngD9gul7nMMeDxGBzfg7QevwmwV1aK52ITNYM7D34lzLfF4oMpNj5Aqnp/m7HYb l3hg== X-Gm-Message-State: AOAM530Xx+W+GqzN6OI3im6aBfyhrrvFRAiueaYG0I4zNAnJz942DTqP gmt6pIIw6oa87l0g9EDehWc= X-Google-Smtp-Source: ABdhPJwydrFN5YgA2Le9U74T5ouf+Tn+dLHakb/eUKsb6vHGvyVCTFOs4RFGBcIdJMY8Gv/kbqsufw== X-Received: by 2002:a17:90a:e291:: with SMTP id d17mr1658391pjz.156.1599113233327; Wed, 02 Sep 2020 23:07:13 -0700 (PDT) Received: from localhost.localdomain ([49.207.196.170]) by smtp.gmail.com with ESMTPSA id v1sm1210395pjh.16.2020.09.02.23.07.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Sep 2020 23:07:12 -0700 (PDT) From: Allen Pais To: jgg@nvidia.com, dledford@redhat.com Cc: linux-rdma@vger.kernel.org, selvin.xavier@broadcom.com, devesh.sharma@broadcom.com, somnath.kotur@broadcom.com, sriharsha.basavapatna@broadcom.com, nareshkumar.pbs@broadcom.com, jgg@ziepe.ca, mike.marciniszyn@intel.com, dennis.dalessandro@intel.com, faisal.latif@intel.com, shiraz.saleem@intel.com, Allen Pais , Romain Perier Subject: [PATCH v2 5/5] RDMA/rxe: convert tasklets to use new tasklet_setup() API Date: Thu, 3 Sep 2020 11:36:37 +0530 Message-Id: <20200903060637.424458-6-allen.lkml@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200903060637.424458-1-allen.lkml@gmail.com> References: <20200903060637.424458-1-allen.lkml@gmail.com> MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier Signed-off-by: Allen Pais --- drivers/infiniband/sw/rxe/rxe_cq.c | 6 +++--- drivers/infiniband/sw/rxe/rxe_task.c | 8 ++++---- drivers/infiniband/sw/rxe/rxe_task.h | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/infiniband/sw/rxe/rxe_cq.c b/drivers/infiniband/sw/rxe/rxe_cq.c index ad3090131126..f232fd03d19a 100644 --- a/drivers/infiniband/sw/rxe/rxe_cq.c +++ b/drivers/infiniband/sw/rxe/rxe_cq.c @@ -66,9 +66,9 @@ int rxe_cq_chk_attr(struct rxe_dev *rxe, struct rxe_cq *cq, return -EINVAL; } -static void rxe_send_complete(unsigned long data) +static void rxe_send_complete(struct tasklet_struct *t) { - struct rxe_cq *cq = (struct rxe_cq *)data; + struct rxe_cq *cq = from_tasklet(cq, t, comp_task); unsigned long flags; spin_lock_irqsave(&cq->cq_lock, flags); @@ -107,7 +107,7 @@ int rxe_cq_from_init(struct rxe_dev *rxe, struct rxe_cq *cq, int cqe, cq->is_dying = false; - tasklet_init(&cq->comp_task, rxe_send_complete, (unsigned long)cq); + tasklet_setup(&cq->comp_task, rxe_send_complete); spin_lock_init(&cq->cq_lock); cq->ibcq.cqe = cqe; diff --git a/drivers/infiniband/sw/rxe/rxe_task.c b/drivers/infiniband/sw/rxe/rxe_task.c index ecdac3f8fcc9..afa38d613a91 100644 --- a/drivers/infiniband/sw/rxe/rxe_task.c +++ b/drivers/infiniband/sw/rxe/rxe_task.c @@ -55,12 +55,12 @@ int __rxe_do_task(struct rxe_task *task) * a second caller finds the task already running * but looks just after the last call to func */ -void rxe_do_task(unsigned long data) +void rxe_do_task(struct tasklet_struct *t) { int cont; int ret; unsigned long flags; - struct rxe_task *task = (struct rxe_task *)data; + struct rxe_task *task = from_tasklet(task, t, tasklet); spin_lock_irqsave(&task->state_lock, flags); switch (task->state) { @@ -123,7 +123,7 @@ int rxe_init_task(void *obj, struct rxe_task *task, snprintf(task->name, sizeof(task->name), "%s", name); task->destroyed = false; - tasklet_init(&task->tasklet, rxe_do_task, (unsigned long)task); + tasklet_setup(&task->tasklet, rxe_do_task); task->state = TASK_STATE_START; spin_lock_init(&task->state_lock); @@ -159,7 +159,7 @@ void rxe_run_task(struct rxe_task *task, int sched) if (sched) tasklet_schedule(&task->tasklet); else - rxe_do_task((unsigned long)task); + rxe_do_task(&task->tasklet); } void rxe_disable_task(struct rxe_task *task) diff --git a/drivers/infiniband/sw/rxe/rxe_task.h b/drivers/infiniband/sw/rxe/rxe_task.h index 08ff42d451c6..f69fbb2dd09f 100644 --- a/drivers/infiniband/sw/rxe/rxe_task.h +++ b/drivers/infiniband/sw/rxe/rxe_task.h @@ -80,7 +80,7 @@ int __rxe_do_task(struct rxe_task *task); * work to do someone must reschedule the task before * leaving */ -void rxe_do_task(unsigned long data); +void rxe_do_task(struct tasklet_struct *t); /* run a task, else schedule it to run as a tasklet, The decision * to run or schedule tasklet is based on the parameter sched.