From patchwork Mon Aug 7 20:37:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Zanussi X-Patchwork-Id: 132396 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp1722591vqr; Mon, 7 Aug 2023 14:32:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE/AwQ8/D2BOf5wFnXSk+inl5lwCHdIl9QFhLgaBlFTgsxYyUHjc+jQskOsq6pnVa3AvD57 X-Received: by 2002:a05:6402:2c5:b0:51d:9399:4707 with SMTP id b5-20020a05640202c500b0051d93994707mr7950382edx.26.1691443958820; Mon, 07 Aug 2023 14:32:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691443958; cv=none; d=google.com; s=arc-20160816; b=Gn7lgLgjAkDg9u2OpFLOSsI2ZSZN2WdB2NYJ9pjXMua0ulvJ1HL1e1NG92OwGCoFsE /D1QTyfgQopl/1sg1hWjg1tp22e72eXY6DXcef6BeQJiwrv5aBpjSfGNAIi2o8pWamRB Ljyaz2ny4sP5r1sJlWYq48P6d+bsMUaIDrQmg5jqumGb/BJZI9WIwT/mBW42KVgiTetk fS5mH21ir5hEZfSJ6VYqsn9E9tGToKmILZa2YSeTrhCaJqLNrOcPJ2rIyoOENrvMbJDm VtoZPvjLcNsQLf4Cu9yB7wScyAvudTYgBzQlctYfPsg+u0Xtx3n1mDYTPmJ+TEi7ePsj XBmQ== 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=tgFUqu1VQTYXtXyLrTtHfnPHWyXo08jQUiCdA42KsOE=; fh=KKYX96Dyn269sAN9Nbt8IfOk86mWVdLVST7Tbph7224=; b=Cd2OL7dO+ni0x61NHY2dwMXW5pogXHZ4GfNBNdCzfL08MlQx+LNoEaq6Il9fdt9p1o kdy4yD61W3tQyS2NBfDzgA4HivTDFjbKqJKjAvlGzlDZxH+kCpfvYpc1sinDF6V/7Hx5 uJnKT8Y8YWlAgLWOkkbGB3DvdFJKgJEjXHBFEFSnTm7J1oFvyG4+cwP9yjewJ5CEgM8i iCQszcfv4LTuZVrRcRzDPyvWsECFj6GeElZk1Zm4WwRSePk0wRSCdtVAvQv005fwd6qF BelpHSEJv7YV0Q9ZhAThxFfFG8V1xu+oJo7DVbKDdoYUuzmEZIqlmuapM3VUoIx/5G81 ugtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XF+1dSTv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z9-20020a50eb49000000b005222a4b267fsi6544072edp.38.2023.08.07.14.32.14; Mon, 07 Aug 2023 14:32:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=XF+1dSTv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S229700AbjHGUiU (ORCPT + 99 others); Mon, 7 Aug 2023 16:38:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230420AbjHGUiJ (ORCPT ); Mon, 7 Aug 2023 16:38:09 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B22EE5F; Mon, 7 Aug 2023 13:38:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1691440688; x=1722976688; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=vObohvQfDDNqka9m/gIuvJ0AUJRK4wpxi4IWTNHjdm0=; b=XF+1dSTv1eJLfOQiGRZpqnjzW3JSiN3qLUfnZgKVc3kf1/AopV0XhmSj BqrXu44LKByT0l31vR4dg94MedRQV+yIxrWirq/HdbeQpUakAiSROYdMf 7NnovLSX8eQarI5NxGW+oCRJYj4X2x4FExQXe7nLkX/61eIWBdHIi5E9/ 9N08J2hkX+K4rsApBHtQon2WKOVu6QVsEDVXk2uQEdvXVeQ4wKEH2fgV/ X0333ozcIGRxk2XopNBmi+aQxoVR/fzOde/XNoKwt9YlsoEpnQ6/EQmfr +3/lMOH1LLwr6P0skNpVCs06/+g70CQ9rIc+RI+eOXTjWFV6zJKcGs3yz A==; X-IronPort-AV: E=McAfee;i="6600,9927,10795"; a="374319677" X-IronPort-AV: E=Sophos;i="6.01,263,1684825200"; d="scan'208";a="374319677" 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:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10795"; a="766123345" X-IronPort-AV: E=Sophos;i="6.01,263,1684825200"; d="scan'208";a="766123345" 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:43 -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 05/14] dmaengine: idxd: Export wq resource management functions Date: Mon, 7 Aug 2023 15:37:17 -0500 Message-Id: <20230807203726.1682123-6-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 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-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773607540916521580 X-GMAIL-MSGID: 1773607540916521580 To allow idxd sub-drivers to access the wq resource management functions, export them. Signed-off-by: Tom Zanussi Reviewed-by: Dave Jiang Reviewed-by: Fenghua Yu Acked-by: Vinod Koul --- drivers/dma/idxd/device.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c index 9b2a6a1ee2af..4f6972cf656e 100644 --- a/drivers/dma/idxd/device.c +++ b/drivers/dma/idxd/device.c @@ -161,6 +161,7 @@ int idxd_wq_alloc_resources(struct idxd_wq *wq) free_hw_descs(wq); return rc; } +EXPORT_SYMBOL_NS_GPL(idxd_wq_alloc_resources, IDXD); void idxd_wq_free_resources(struct idxd_wq *wq) { @@ -174,6 +175,7 @@ void idxd_wq_free_resources(struct idxd_wq *wq) dma_free_coherent(dev, wq->compls_size, wq->compls, wq->compls_addr); sbitmap_queue_free(&wq->sbq); } +EXPORT_SYMBOL_NS_GPL(idxd_wq_free_resources, IDXD); int idxd_wq_enable(struct idxd_wq *wq) { @@ -422,6 +424,7 @@ int idxd_wq_init_percpu_ref(struct idxd_wq *wq) reinit_completion(&wq->wq_resurrect); return 0; } +EXPORT_SYMBOL_NS_GPL(idxd_wq_init_percpu_ref, IDXD); void __idxd_wq_quiesce(struct idxd_wq *wq) { @@ -431,6 +434,7 @@ void __idxd_wq_quiesce(struct idxd_wq *wq) complete_all(&wq->wq_resurrect); wait_for_completion(&wq->wq_dead); } +EXPORT_SYMBOL_NS_GPL(__idxd_wq_quiesce, IDXD); void idxd_wq_quiesce(struct idxd_wq *wq) { @@ -438,6 +442,7 @@ void idxd_wq_quiesce(struct idxd_wq *wq) __idxd_wq_quiesce(wq); mutex_unlock(&wq->wq_lock); } +EXPORT_SYMBOL_NS_GPL(idxd_wq_quiesce, IDXD); /* Device control bits */ static inline bool idxd_is_enabled(struct idxd_device *idxd)