From patchwork Mon Nov 27 20:26:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Zanussi X-Patchwork-Id: 170402 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp3441039vqx; Mon, 27 Nov 2023 12:28:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IH9hEGr9GscgelYQyvHn6dizgwy3hNmGgk04b+jnqNzT6r8kXorgKSNW8Ex+Ml+9qWHWlum X-Received: by 2002:a17:90a:187:b0:285:25ab:258e with SMTP id 7-20020a17090a018700b0028525ab258emr11807129pjc.34.1701116917888; Mon, 27 Nov 2023 12:28:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701116917; cv=none; d=google.com; s=arc-20160816; b=dJgy/BAf1jsV3eyTS0wwfbnXGuLcDBJaSux38KcomAnb+Toh7Ry17JqPZGtUpiJe5n /HXk41Gyg6x4sj8WiPhBMJNXA9NE6LYaQhd1Xpk8zu0RBNGvvaYw/d4/y9mSpkOrHkdo GYQSUn14Lbb3bJygz0lRDoHR8tWxW90FKlOwjS2+7gz/w34YdVy1zwE/rNYWB37e9SBU MiyqHuvSmFmao/ZVLODH7rytBsswSIATjz5RJ5lLeo10mWAfoBQU8DRRZi1YonIbB7Re SzBYrm2kmMzAvMzgyiZx4GlhrF54G/wtvadmhO/u+LRD7Zro4bulAZ/3bbXO3TXwsc+M 16MQ== 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=vDeUY0Zlln/kefZ1JGSrNKbGb+8qMIgxM/nqeUlLyck=; fh=CKy338m5MbqOKLCytkQoYDn9hkoAEvElo6dffmo/qoM=; b=bMRs5sLmFkQOSbXhxtw1dNuAgO7Jpvn6qgzQUVLwaVu5Y7nRT/XDqV3LkN7aonqW2O o43Hz77vogO+Jt/2t14C/SbNzhO2Q3hJTcq4fx2f3VJDdfz/+hwguf4BMX9oklynOrA5 Gf1bsZc3RoCQQK17wpEvYNuzU4Wlw1mUQFvYP6Bmoc/mBovUUOuqZeELCQ78R9R3hRGc 5uqj0ZOvkB9mRI5IgrTITPUKD/4SAgWYDCAgWXM7YcV3GIXTibCHHqVFl7EwKt+I1NXT dpWsB2uEuECLLNBuv6lnjqZ2h6hpDTEQDmtP6jjHaRrivASM5xezlqnsWUals4++BApO +X2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="lYO/8YU6"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id c16-20020a17090a8d1000b002851a2552f7si10316563pjo.7.2023.11.27.12.28.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 12:28:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="lYO/8YU6"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id D8471809989B; Mon, 27 Nov 2023 12:27:53 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233218AbjK0U10 (ORCPT + 99 others); Mon, 27 Nov 2023 15:27:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233148AbjK0U1S (ORCPT ); Mon, 27 Nov 2023 15:27:18 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6501810CA; Mon, 27 Nov 2023 12:27:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701116839; x=1732652839; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1hdHLETQMuJ0KalGVNJ3eGU0gg0ZdzTgPv56YEW+tSc=; b=lYO/8YU6/FEJ8oY6f3rzAAZlLsGJGCJHw/G/6fIN6R2QU9CdT1WH+v2C ToEo82V7foaCQpCgr3fkA1yYm3METTDRY5pA9XCcOSCVNBXsZgxRo5R1j LKG+ngyOo+4SfrulY8dKG4j7MZS1ZteF/+a5OvnZ8AVciGOSMkXf2nhzi cqTxXk7ICoGMbJgXsWB+3jWAyLuCDGg5oHHYQcGsHA3A/rlmMAYH70u1g 1A5X6F63W2F4SzFw5+eL5cC4tktfdNnxpcwOaFm0repFuVdEXSMMLwPGp nh9YqirJo6cVfZKiSJxBjWuuyjjrMsFZtsN+DFlYH/c/R6NrgoMpbroyO w==; X-IronPort-AV: E=McAfee;i="6600,9927,10907"; a="457115508" X-IronPort-AV: E=Sophos;i="6.04,231,1695711600"; d="scan'208";a="457115508" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Nov 2023 12:27:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,231,1695711600"; d="scan'208";a="16394533" Received: from rpkulapa-mobl.amr.corp.intel.com (HELO tzanussi-mobl1.hsd1.il.comcast.net) ([10.213.183.92]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Nov 2023 12:27:18 -0800 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, pavel@ucw.cz, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, dmaengine@vger.kernel.org Subject: [PATCH v10 04/14] dmaengine: idxd: Export wq resource management functions Date: Mon, 27 Nov 2023 14:26:54 -0600 Message-Id: <20231127202704.1263376-5-tom.zanussi@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231127202704.1263376-1-tom.zanussi@linux.intel.com> References: <20231127202704.1263376-1-tom.zanussi@linux.intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 27 Nov 2023 12:27:54 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783750373330302906 X-GMAIL-MSGID: 1783750373330302906 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 feca8534a1c5..e6176de0e12b 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) { @@ -405,6 +407,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) { @@ -414,6 +417,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) { @@ -421,6 +425,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)