From patchwork Mon Jul 31 21:29:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Zanussi X-Patchwork-Id: 128903 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:918b:0:b0:3e4:2afc:c1 with SMTP id s11csp2325085vqg; Mon, 31 Jul 2023 16:25:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlFVbSNl/pR3TTmckkjeXe5zEO05nNX5tZWE/6fhQgpYSYM3hyTDMTkrQ62UFehTSVD/EinM X-Received: by 2002:aa7:d58b:0:b0:522:50b9:a177 with SMTP id r11-20020aa7d58b000000b0052250b9a177mr1009909edq.39.1690845946099; Mon, 31 Jul 2023 16:25:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690845946; cv=none; d=google.com; s=arc-20160816; b=BSYYe7VvaT+ItteBXrjrelukUQOEBV/MF429ufW6Lb4jbgenKp8mGeH/N0Y6hbReAq +1e8AgZzhLnO4gzdnLzX9ZAHxsmQik8wvQFbAF7CNkqPQ4aQX3qbJoZoOdLXU6HGLmHD XVIlXKP/3bpoilL2/b9psGbYbHNGSfDM/ESqpT03VzyymsSwaO0AEHWw4v4BPJ4N3bKG S83YaryDBpVjHfK6x3FLlw6SebCXDRt+edaFJL0dPI7BPWeJR0T0n0BcPgilVr5tPWJO AzaTlKesDXRY/t72KmucCrzI5mBasH74jH2bA6ynLhslnPVGxvHsS+UXSnE8A1zOscyM pqnQ== 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=BaSaG4g+ERS4sldxJqI9hLE4k75cAOqcGep433wIEwdhlOC9ZRcZNwFJXZ9eDny9kq 3Do0KQZe+gTfJkEbHEMokLMISQqBlUVqgg8FeyKHo8SdipG0j4Gl8shsKYHY7Q21pAqC XuNA3L2DEzx50Xy6E9zydhs0qYzdSB+pCMtXxHodns03+ZP8izt+EW3FzdaystXpSfvu LlJhkKrTEUykB210L50tDs+c5wo38zOxyYqkGiz5V1oYyXK5G0z1tnmLNl/RdN3545Lq vhHyjiboTnO40G7nns19ac0IJAOPNMW6ONVnIDJzocppQNgVRHo+kAAo8UFhXVH6XaH+ Wznw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=LbS+LT+F; 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 u10-20020a056402064a00b0051e3cbc399dsi6916615edx.287.2023.07.31.16.25.21; Mon, 31 Jul 2023 16:25:46 -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=LbS+LT+F; 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 S229973AbjGaVaX (ORCPT + 99 others); Mon, 31 Jul 2023 17:30:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231326AbjGaVaR (ORCPT ); Mon, 31 Jul 2023 17:30:17 -0400 Received: from mgamail.intel.com (unknown [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E40071BD9; Mon, 31 Jul 2023 14:29:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690838997; x=1722374997; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=h7I8YHXeOlCOxfUwufW0FBvwo2i1M2IOXOG0q7S47gY=; b=LbS+LT+FfoR32d/OuNLytW0nFnn7EZ56wb7jETEh+S8z8CG8qbFAjYce HUCiPTu1172ZAlQIFcOauof2Lkhec4PmBmuo8d1xdRVWQyisel74pMcJu vCY0IZWMSIAOuXshB7RlE8QdxpyBiroelah3JqoWx/Oz/VNBAoEdxRhUZ 8uysBC2PywrrihQWbow8G+kHsg2oxAIbAYuwqvN37TbUKZNuSdNr0Tcb2 xBxAZBgyCl9QfFYAduamc2O1mzrU0T7ay7Mfp8HCn7znGvzMBnJMPDNrz JObAOwpdbr4gkEu0Z5RP0A+rB8cT98sXFLRKNFrTHvifWgsqYNlH0Xdek Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10788"; a="349425806" X-IronPort-AV: E=Sophos;i="6.01,245,1684825200"; d="scan'208";a="349425806" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jul 2023 14:29:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10788"; a="728428412" X-IronPort-AV: E=Sophos;i="6.01,245,1684825200"; d="scan'208";a="728428412" Received: from sgimmeke-mobl.amr.corp.intel.com (HELO tzanussi-mobl1.intel.com) ([10.212.91.213]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jul 2023 14:29:54 -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 v8 05/14] dmaengine: idxd: Export wq resource management functions Date: Mon, 31 Jul 2023 16:29:30 -0500 Message-Id: <20230731212939.1391453-6-tom.zanussi@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230731212939.1391453-1-tom.zanussi@linux.intel.com> References: <20230731212939.1391453-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,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: 1772980478892388357 X-GMAIL-MSGID: 1772980478892388357 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 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)