From patchwork Fri Dec 1 20:10:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Zanussi X-Patchwork-Id: 172638 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp1388988vqy; Fri, 1 Dec 2023 12:11:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IEjJWquDiHFKyiZYt6WYp0daBc5M4UJdOaPjGqmE6iRbE5XFoT4sS/9xFtSNu588tVAwr5q X-Received: by 2002:a17:902:da8b:b0:1cf:d660:5b09 with SMTP id j11-20020a170902da8b00b001cfd6605b09mr61778plx.0.1701461514618; Fri, 01 Dec 2023 12:11:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701461514; cv=none; d=google.com; s=arc-20160816; b=HYBiBwTY4Getbdwp8VwBkHJPrWPr0zAwhwc9HRsg0fr/i7MrLYAhq2j9Jmbnj/29Oc NfjVdj7mQvV2j1cPcV7u5BGpn3SSpGqujG6732MLfbmp94aTvbNd4zPUcL1gtqaUKY7+ CAAz28jMM2Ga1yHEu+s7JI8IYZy4yEOs9PN+y/xB421wcZ6fH1HYmm16795OoifVBV6j KvhoeLnUZlLHhAwmh9rPOOTfcKAiYhOriRehMn7doqv/vAE4BwPkun+qUt0loJ+GzYKI 6bHLCDUGhsZfl4WsdrdBHzVBKHKyghHO5PSRSkjPp82GU2ka3l+MqQHkHmBvo+sAPXCd uWCQ== 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=nPG77Z3Z9dO4Eddp2ozX/nPd0Js/3v8cq+ZwfcisPrFB+iqK5QKEZCwuKx1iiVfgef JH31007KH3d9RmRAyqc2UmtvkgVVQc+1c6GLi7VykUU5W/vdM4yQQEYDzfe5qAMRi/3w S4KZPd9cQSYGZdeTgB5fsalxWcum1XRH7vk7ojE0SCAgeZOZEFRtaYT0qt/ZC3KYkB4c /BoFrH92p9woMigqglHrIphgcFKyEFuUoxxMy4OVOBsrHb3OJR7FIowrlClbN+A0xtmw h7C++lIem6NR7D9V5esZCDdQyzPoj6ULYZSktDt6kYBI1dLVDurE1hUFYG/piRj4apP3 KIYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=kYuGtg32; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id j14-20020a170902da8e00b001cfc170c11asi1192771plx.475.2023.12.01.12.11.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 12:11:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=kYuGtg32; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 71C598163C01; Fri, 1 Dec 2023 12:11:46 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379643AbjLAULN (ORCPT + 99 others); Fri, 1 Dec 2023 15:11:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379594AbjLAULA (ORCPT ); Fri, 1 Dec 2023 15:11:00 -0500 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEEA410F0; Fri, 1 Dec 2023 12:11:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701461468; x=1732997468; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1hdHLETQMuJ0KalGVNJ3eGU0gg0ZdzTgPv56YEW+tSc=; b=kYuGtg32XdUWRkVhoWKPKbq2FRjld4s9NWCSksSphxWv1yXQSGNzDwUV 0LV//1OmI1Y484MZnlpcnk7yRSWRBoMIg1QcDQ4UyxEGkzpSlibTPxmNg UvI1lYqUjqMLv1dV2QBASUl0gelzGQFvNG8nZv9jN/tqVUUSedaUlPZ83 DTgtgppvxe75ye3UJSx2YkhqA/ecxDC/9Zb8bM8iUYJ8w47fK2rQ3tiZT 6hA439GZTKC/2LnlOoDmP8q0YozUTWnnInaPQyGCh/X6qezjLkWKo0Q20 /Nb9OR/oYd5bjCjNWziTg2vB1DjY190ZOT7h3pq7kgDDCovW3E0O+PxNc g==; X-IronPort-AV: E=McAfee;i="6600,9927,10911"; a="427798" X-IronPort-AV: E=Sophos;i="6.04,242,1695711600"; d="scan'208";a="427798" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2023 12:10:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10911"; a="860671164" X-IronPort-AV: E=Sophos;i="6.04,242,1695711600"; d="scan'208";a="860671164" Received: from temersox-mobl2.amr.corp.intel.com (HELO tzanussi-mobl1.amr.corp.intel.com) ([10.213.166.197]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2023 12:10:47 -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 v11 04/14] dmaengine: idxd: Export wq resource management functions Date: Fri, 1 Dec 2023 14:10:25 -0600 Message-Id: <20231201201035.172465-5-tom.zanussi@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231201201035.172465-1-tom.zanussi@linux.intel.com> References: <20231201201035.172465-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 agentk.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 (agentk.vger.email [0.0.0.0]); Fri, 01 Dec 2023 12:11:46 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784111709008049252 X-GMAIL-MSGID: 1784111709008049252 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)