From patchwork Mon May 8 20:07:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Zanussi X-Patchwork-Id: 91265 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2401894vqo; Mon, 8 May 2023 13:09:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Y6rpUfqDE/4pHS+oiZhPNaAMXa47js9/+vxpSY5qTS6tr8Va+0stsTgi/Kc6aB74rScZR X-Received: by 2002:a05:6a21:6d8a:b0:101:282c:2b with SMTP id wl10-20020a056a216d8a00b00101282c002bmr664684pzb.32.1683576592424; Mon, 08 May 2023 13:09:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683576592; cv=none; d=google.com; s=arc-20160816; b=cLrqUMjqVstavYA4TZcE/HWQbwyZrddb7hbFclrKuUA/Vy2HLRkowSirl/NUREB6Yh zz3p3uc+qH7gOocZ54crJQ695OBY8tlJR8IHhJO6lqlHelXHtOywHGSmB8DY5uHUSzXc 6GL7iewNsxWGDF/xxUw2R03B/j2bNfcsMIbXWMdVbMzaa0yf9oqzpY2Wt4nQrcHLwb2J /lW4kr/Efi5J7L+bL+wkxomJaivEqDnHhhdmfqk/R48m/vizFUjYc17x+VVFFV+iwN8p 39DYcEomB+lDYUKlK1hWSzdK4XtLXB4cSosjZZsuZOyCYdNCugYbe9PvBEyxdGnvBI85 nXig== 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=ZAECdf43FtF2AgFYbezmGJF/XF/DWJmhze0p32K8uSs=; b=a9Cvaad0cThWHKbMJjJYVk2iRlpu9DCyEc3dWGG0+MfEz2IwknDT8+UopChKDF+J5q 3LLWf1cH7k8k/7IjdTfttwOwmSLMewHi+Zi3wnwfCs3VGZECU6TLQzPgxqeZvn6dJyhL c8aQCpBUXjmAAC9ucftqJBV/VAF6NdgS5zhaW+UsJUUhWsBZZQQk0iT++Du360DCEciC +PCxygxX4vY0QlNdesNgD4qzYlPRS65MjfsDUC6y0wBzEfiKdccwV7EjtP8AD5eC6qCG Yfuku9osQtub+zUlj4x6SBY2Znx8WXye3XTHyzHaOa3fsEs85Tq/rettQ1aufhH4ILn9 hpxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=noOwMRwa; 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 c5-20020a6566c5000000b0052e91ef3a59si5304759pgw.99.2023.05.08.13.09.33; Mon, 08 May 2023 13:09:52 -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=noOwMRwa; 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 S229908AbjEHUIF (ORCPT + 99 others); Mon, 8 May 2023 16:08:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233726AbjEHUH4 (ORCPT ); Mon, 8 May 2023 16:07:56 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C357459F8; Mon, 8 May 2023 13:07:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683576470; x=1715112470; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=XQ1zGv9JKYUAvlq2H9+30zI4fnNsJOWmds2DkhxoNrs=; b=noOwMRwav3sikwndBeDcikFQW/Scbyzyh0kxrLo4K/wR8N0qPiph7m28 ao1fhTdjah/HEq7/P7So18Ncq/y/7IABo16aO79zZx01ie8qS1HcSC5QY RfNrSqUV4LyYch/z+9G65ok3OdTopRv5P2B4EldhaeNiqjtIpDuYVoqgu ANhGkT61fNO/115l1yS3dZUTLjlS1lLXGfNrYEBclo91d2tGuJtZGM7P0 Vvp+GhOcwaPAko1zpwl4C4QPPxu3Ds2ooCmBjib6iUjGF0GIYihxrAYLA ZHLV12satlOvm3/NX+vjkdGYm5OuUknudWxUGiu4fGcbfwxq6wKB8zDsS A==; X-IronPort-AV: E=McAfee;i="6600,9927,10704"; a="348573639" X-IronPort-AV: E=Sophos;i="5.99,259,1677571200"; d="scan'208";a="348573639" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2023 13:07:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10704"; a="788241634" X-IronPort-AV: E=Sophos;i="5.99,259,1677571200"; d="scan'208";a="788241634" Received: from sajmal-mobl1.amr.corp.intel.com (HELO tzanussi-mobl1.intel.com) ([10.212.74.4]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2023 13:07:49 -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, giovanni.cabiddu@intel.com, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, dmaengine@vger.kernel.org Subject: [PATCH v4 05/15] dmaengine: idxd: Export wq resource management functions Date: Mon, 8 May 2023 15:07:27 -0500 Message-Id: <4037f6839b847cd65b48381e491f0f14e05fa9ff.1683573703.git.zanussi@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: 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,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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765358009452117620?= X-GMAIL-MSGID: =?utf-8?q?1765358009452117620?= 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 af1aa88a66c1..7837d0a56314 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)