From patchwork Mon Jul 10 19:06:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Zanussi X-Patchwork-Id: 118034 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp25263vqm; Mon, 10 Jul 2023 12:26:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlHcGAF5BdsS33b/DFL13IPYQDJVMhS9aows8Ig/Gjdw3NPoh/wCkCrUCtB8q0cRbOtsWMQq X-Received: by 2002:a05:6512:445:b0:4f8:710c:e2c7 with SMTP id y5-20020a056512044500b004f8710ce2c7mr9688455lfk.33.1689017160876; Mon, 10 Jul 2023 12:26:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689017160; cv=none; d=google.com; s=arc-20160816; b=UDuzLIiikYCc4eZpP3rRnlk8jHQEGpidVcjRbzkMXEA3F6CYzcF63vgVKgHhAbTjU1 I1R41DVJvb1fxJwB3twQeC6wVdj7x0SPfawJO64QgCTBv1z2AeLFPPHsHPmva0FQequd ORocQjeS1wGKByeihfY3SlBY/o03b1Hw70424WkoHIwXC60cL4TQnB25gM9qC70EmrWC WhHUtjO73k0G1fbQ+8logy6JNtqJZVx7zAbz7V2gGSzIY2tFr+CLaK8mWs87+zApxa+O zAmw6NyaAW7WEcLwhUVXna5qLNgkVUy+FF+brk7mML0hLdAbUaFYlhX/25xsLdJKnJ5k kpdg== 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=28ukhJ9ZEwjGhPAF7d4uGD1/Z77IIz6U7/9x19H/z9A=; fh=KKYX96Dyn269sAN9Nbt8IfOk86mWVdLVST7Tbph7224=; b=AEmGs8DvqSf9H9weEv+bn07pyO8QXHJuBE55n1/mVFs8VXSr8CFNghWQyS49T/ZH12 4eVQlgptgi3yltdIzPj4z23rptaOfP1H15FgYJa5jl9rn2ZhJ+GozIHmI8KcVfs4XAjq aeH5AiMDT1fnbgNBXFsdwh8xhye5pP8d+fCKybe3Zrm1n7Ct4lV8tLuPucSjoiDFj7Aq gNAIL6Ogaa1/HDjm2oBFR2F3eSnB2+dHAzw0RWVP6/+Jwr8/K4HckOL/TnQsMqmoVdAa aLFOzEL3MaY0wjllSyygoy8qN0m0SUw9jf5AQN+3zapox2V3nQ997wlNZO2AF6ExrYnc 7P9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=JC5cCqpn; 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 n26-20020a056402515a00b0051a4b972b70si164845edd.686.2023.07.10.12.25.37; Mon, 10 Jul 2023 12:26:00 -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=JC5cCqpn; 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 S230238AbjGJTHg (ORCPT + 99 others); Mon, 10 Jul 2023 15:07:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229560AbjGJTHX (ORCPT ); Mon, 10 Jul 2023 15:07:23 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A8B81A7; Mon, 10 Jul 2023 12:07:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689016030; x=1720552030; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=h7I8YHXeOlCOxfUwufW0FBvwo2i1M2IOXOG0q7S47gY=; b=JC5cCqpn7MCV6OQUNj84q/0N+olks4hiWCsP9012T5yrwN3eIRf20J3g QlTD4rrl1AdMHwEItpicumN/LveaFFoNGfp+Y/jTfkFFBRRYUOlAOdxTE 7iNbLlMdetJKn7V+qk/45ihnilDPSvAmBmxVYqWWSNxYQ/fNsae0EXmtN tVW3o/k7G2AAyXndroyPOvZ3nr9Ga0HZpF4WIL0DAif0gT+rcHqlPNUa8 eZNe6FvRvkSFBNe7z6Ht0EcUN4fLXyMAaA0kL00myrFzWSKOAF6oK+ka+ ozRbxfbz7uHnK2mNeFj4D8t6AOM26bLteoD/FytheIKIRnMczPHpuEiWO w==; X-IronPort-AV: E=McAfee;i="6600,9927,10767"; a="354290770" X-IronPort-AV: E=Sophos;i="6.01,195,1684825200"; d="scan'208";a="354290770" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jul 2023 12:07:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10767"; a="844991063" X-IronPort-AV: E=Sophos;i="6.01,195,1684825200"; d="scan'208";a="844991063" Received: from jdmillsx-mobl1.amr.corp.intel.com (HELO tzanussi-mobl1.intel.com) ([10.212.107.12]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jul 2023 12:07:08 -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 v7 05/14] dmaengine: idxd: Export wq resource management functions Date: Mon, 10 Jul 2023 14:06:45 -0500 Message-Id: <20230710190654.299639-6-tom.zanussi@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230710190654.299639-1-tom.zanussi@linux.intel.com> References: <20230710190654.299639-1-tom.zanussi@linux.intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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: 1771062858447227213 X-GMAIL-MSGID: 1771062858447227213 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 --- 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 87ad95fa3f98..626600bd394b 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)