Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp3447794rwb; Mon, 7 Aug 2023 13:49:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGHrlGf7Mfc5k5KvwoY5YQ1+ayQ9k9unNkkmSIXJaVvm2sj4gXPLeBsjolbTCXBZBnqv1+K X-Received: by 2002:a05:6a20:54a7:b0:13b:79db:e222 with SMTP id i39-20020a056a2054a700b0013b79dbe222mr12314010pzk.53.1691441359893; Mon, 07 Aug 2023 13:49:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691441359; cv=none; d=google.com; s=arc-20160816; b=TFmYuT9WKfkzF7W3aGiWawe4AMPd46yFXgVTFzzdE+1NUCXasi87AjwDBE5AvTwaXi czaZetyrh6hOERY0N6jQti+2Z31Gzudl4i5FIfVOze0lHTFh9k4Mm3RB6GkF7M/X8LtJ Ry8x7eJsAm3//Z5EvnsSZj0SklfvkPJan0Gwb/eSnYYAhEYwWHskV0+qNJ16TsBE7/z4 Q9HX9FYsFgKF4H1eSnGvAUYNiPIArNJnLT13gXXhcCpvUYhJu2UNkRxifvBnhFoBi0qn +HJWlDO2UyJ+hubOe4Dhtt7mOXe8yctNbKMmLJJGmr6eOM+zftDX4g7mSwFBSiUvMoSA V1Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/ap9Qa5SiM5wZxir+cBGUFgiTvu+Chao1/TGzrtjlCU=; fh=KKYX96Dyn269sAN9Nbt8IfOk86mWVdLVST7Tbph7224=; b=I5VhORFFIIS7qBtrvP9hK2ps8JUewdVymjMYsujUSEiG9dQMBABGwuk9qc1akNoEAG va9fIeFwjCyOTSjroD8HUJt3pRA8mtirzhEmJsQdF8YlSzbGOwYsxIzP6x9hq3fOIFke QwPOwzlb6EyTWhqLumhWUI6aFPMMnZoqd2wRkUd8jeWjtvlz8aj8mY5bK6xvprCbiKcv 9cPm19/nKAYUz2fjD3TdgwqnSLka3pGPCuGYSPwehl87J/+HHCjsvYdztaTfWeofRETn YcZ1hi3gdjoTC7iF7cP7uTcQfS3cigqt/dG1KP0J08gs/dcgT+9dk02qxAm4uA1jwbYo xJ7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=aaZ4vlKB; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z70-20020a633349000000b00564b8c575c4si2784486pgz.819.2023.08.07.13.49.07; Mon, 07 Aug 2023 13:49:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=aaZ4vlKB; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230487AbjHGUiJ (ORCPT + 99 others); Mon, 7 Aug 2023 16:38:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230384AbjHGUiI (ORCPT ); Mon, 7 Aug 2023 16:38:08 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31EACE72; Mon, 7 Aug 2023 13:38:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691440687; x=1722976687; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=y+Ivwl3zqH1CG6gfDZ8cqgNS8YcsCKSCTJeLMghKzaQ=; b=aaZ4vlKBxyy5a5CLAnIRz4bRj8+EInXaBFH2rAEUo7NptqcDuOkFbRtm 5ee3Lz+vBle0N4hb6MtAW4AfgSqibh3yx1x6TjQNK/WhqnMuxUOQyFGf3 VAvD2BMxdOh3Thk+YJHobNEkQjHnwlgWTjKWlz2XhTeowPhjROjCb1YyQ wmPWXQcGc6kdcsfkmBNLBWsYjQTUAoUa3HIJO8/AX/tff0wsNUUUKmcwd 94vxcQH8eybfRZoC+lpHirRighm6egHZqpvTR9wMyMfbU7eQxhXmiWmUJ a9n6HI/nHZAiOT+O8gIbIS08/A2SvdCl2konLSYXrw1fdRk1tnycd9U/s w==; X-IronPort-AV: E=McAfee;i="6600,9927,10795"; a="374319659" X-IronPort-AV: E=Sophos;i="6.01,263,1684825200"; d="scan'208";a="374319659" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Aug 2023 13:37:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10795"; a="766123334" X-IronPort-AV: E=Sophos;i="6.01,263,1684825200"; d="scan'208";a="766123334" Received: from eeroesle-mobl.amr.corp.intel.com (HELO tzanussi-mobl1.intel.com) ([10.212.81.193]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Aug 2023 13:37:38 -0700 From: Tom Zanussi To: herbert@gondor.apana.org.au, davem@davemloft.net, fenghua.yu@intel.com, vkoul@kernel.org Cc: dave.jiang@intel.com, tony.luck@intel.com, wajdi.k.feghali@intel.com, james.guilford@intel.com, kanchana.p.sridhar@intel.com, vinodh.gopal@intel.com, giovanni.cabiddu@intel.com, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, dmaengine@vger.kernel.org Subject: [PATCH v9 03/14] dmaengine: idxd: Rename drv_enable/disable_wq to idxd_drv_enable/disable_wq, and export Date: Mon, 7 Aug 2023 15:37:15 -0500 Message-Id: <20230807203726.1682123-4-tom.zanussi@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230807203726.1682123-1-tom.zanussi@linux.intel.com> References: <20230807203726.1682123-1-tom.zanussi@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Rename drv_enable_wq and drv_disable_wq to idxd_drv_enable_wq and idxd_drv_disable_wq respectively, so that they're no longer too generic to be exported. This also matches existing naming within the idxd driver. And to allow idxd sub-drivers to enable and disable wqs, export them. Signed-off-by: Tom Zanussi Reviewed-by: Dave Jiang Reviewed-by: Fenghua Yu --- drivers/dma/idxd/cdev.c | 6 +++--- drivers/dma/idxd/device.c | 6 ++++-- drivers/dma/idxd/dma.c | 6 +++--- drivers/dma/idxd/idxd.h | 4 ++-- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/dma/idxd/cdev.c b/drivers/dma/idxd/cdev.c index 0423655f5a88..1d918d45d9f6 100644 --- a/drivers/dma/idxd/cdev.c +++ b/drivers/dma/idxd/cdev.c @@ -550,7 +550,7 @@ static int idxd_user_drv_probe(struct idxd_dev *idxd_dev) } wq->type = IDXD_WQT_USER; - rc = drv_enable_wq(wq); + rc = idxd_drv_enable_wq(wq); if (rc < 0) goto err; @@ -565,7 +565,7 @@ static int idxd_user_drv_probe(struct idxd_dev *idxd_dev) return 0; err_cdev: - drv_disable_wq(wq); + idxd_drv_disable_wq(wq); err: destroy_workqueue(wq->wq); wq->type = IDXD_WQT_NONE; @@ -580,7 +580,7 @@ static void idxd_user_drv_remove(struct idxd_dev *idxd_dev) mutex_lock(&wq->wq_lock); idxd_wq_del_cdev(wq); - drv_disable_wq(wq); + idxd_drv_disable_wq(wq); wq->type = IDXD_WQT_NONE; destroy_workqueue(wq->wq); wq->wq = NULL; diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c index 5abbcc61c528..9b2a6a1ee2af 100644 --- a/drivers/dma/idxd/device.c +++ b/drivers/dma/idxd/device.c @@ -1368,7 +1368,7 @@ int idxd_wq_request_irq(struct idxd_wq *wq) return rc; } -int drv_enable_wq(struct idxd_wq *wq) +int idxd_drv_enable_wq(struct idxd_wq *wq) { struct idxd_device *idxd = wq->idxd; struct device *dev = &idxd->pdev->dev; @@ -1505,8 +1505,9 @@ int drv_enable_wq(struct idxd_wq *wq) err: return rc; } +EXPORT_SYMBOL_NS_GPL(idxd_drv_enable_wq, IDXD); -void drv_disable_wq(struct idxd_wq *wq) +void idxd_drv_disable_wq(struct idxd_wq *wq) { struct idxd_device *idxd = wq->idxd; struct device *dev = &idxd->pdev->dev; @@ -1526,6 +1527,7 @@ void drv_disable_wq(struct idxd_wq *wq) wq->type = IDXD_WQT_NONE; wq->client_count = 0; } +EXPORT_SYMBOL_NS_GPL(idxd_drv_disable_wq, IDXD); int idxd_device_drv_probe(struct idxd_dev *idxd_dev) { diff --git a/drivers/dma/idxd/dma.c b/drivers/dma/idxd/dma.c index 8bb7e7ff8d6a..7e4dcc20d8cf 100644 --- a/drivers/dma/idxd/dma.c +++ b/drivers/dma/idxd/dma.c @@ -313,7 +313,7 @@ static int idxd_dmaengine_drv_probe(struct idxd_dev *idxd_dev) wq->type = IDXD_WQT_KERNEL; - rc = drv_enable_wq(wq); + rc = idxd_drv_enable_wq(wq); if (rc < 0) { dev_dbg(dev, "Enable wq %d failed: %d\n", wq->id, rc); rc = -ENXIO; @@ -332,7 +332,7 @@ static int idxd_dmaengine_drv_probe(struct idxd_dev *idxd_dev) return 0; err_dma: - drv_disable_wq(wq); + idxd_drv_disable_wq(wq); err: wq->type = IDXD_WQT_NONE; mutex_unlock(&wq->wq_lock); @@ -346,7 +346,7 @@ static void idxd_dmaengine_drv_remove(struct idxd_dev *idxd_dev) mutex_lock(&wq->wq_lock); __idxd_wq_quiesce(wq); idxd_unregister_dma_channel(wq); - drv_disable_wq(wq); + idxd_drv_disable_wq(wq); mutex_unlock(&wq->wq_lock); } diff --git a/drivers/dma/idxd/idxd.h b/drivers/dma/idxd/idxd.h index 276b5f9cf967..f58df2cd9cf5 100644 --- a/drivers/dma/idxd/idxd.h +++ b/drivers/dma/idxd/idxd.h @@ -680,8 +680,8 @@ int idxd_register_idxd_drv(void); void idxd_unregister_idxd_drv(void); int idxd_device_drv_probe(struct idxd_dev *idxd_dev); void idxd_device_drv_remove(struct idxd_dev *idxd_dev); -int drv_enable_wq(struct idxd_wq *wq); -void drv_disable_wq(struct idxd_wq *wq); +int idxd_drv_enable_wq(struct idxd_wq *wq); +void idxd_drv_disable_wq(struct idxd_wq *wq); int idxd_device_init_reset(struct idxd_device *idxd); int idxd_device_enable(struct idxd_device *idxd); int idxd_device_disable(struct idxd_device *idxd); -- 2.34.1