From patchwork Mon Jun 5 20:15:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Zanussi X-Patchwork-Id: 103490 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2938307vqr; Mon, 5 Jun 2023 13:34:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4hoTtfI1ePXv0Uf+eBTCYlT5NDEJttIjG0PGYHkton0F9o1jiqfI5fBXIngV9VhDWbw1BW X-Received: by 2002:a05:6808:6c3:b0:398:bd63:b5fe with SMTP id m3-20020a05680806c300b00398bd63b5femr8167674oih.18.1685997263688; Mon, 05 Jun 2023 13:34:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685997263; cv=none; d=google.com; s=arc-20160816; b=YMjLxuBsa1LLdf7S8b+UePEy/zPyvZVv77rFJB2RdXdhdMV8nQyVK4CyG74p4/otpR 148CzX/32uJ1q4nr11ZnPKghCAgIkjFGeqvciP4cWhGrGoXIuvdBZrW6+3WahFiWzVyG blbzHI4YCXxWHSyOKEBtl8CwKwT74JuEmc/C3qyq8IMXw6daf3OiiTcoibC3N8dDBq4z saNcPiMnC5LoiT1i+hH7vZs1CrBq3HaZgXT0sasa2NUphEg4Fhljx7JNsIxZ5BhiwZkB vztwbV3PBCV37HN4bg0iNfA2mYh46KEdEbx2AmNXVbCcXKB7hUS4ww/nPBYZwVESzMet 1PNg== 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=; b=IJv70Q/emC9ikpREK0MgzgEWwHU0IoZDJcWAXyZtqBEq27q6qxmAEMn0ycc3lmH0ye QRZV89LsX5Iz2lycNQ71ESt+zi4tLPapjAAPu9IDl/CpgGr6T4JnbSK555kR611ffQq+ 30kJeJRMd0crDXU8OQlwspg8qyKa+YtVcctc65+mei09VxFBQXPu0zNGhk5cB2BT5Arf g36J/Z/0Rf3KXXFJdf1/Nv5mYmrCkrX6XCxnwHfA9E01jgSzkkcWyqysNMPQxAn0SuhY +54ynRk8lv2PnMWNtv4EFt0KABbB7OwSevjE2XN5+7WsxzA//bxWRxKITcsZ1lSGWSQh GxQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=FEyMLJ5t; 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 j18-20020a633c12000000b00543cbc51742si931171pga.183.2023.06.05.13.34.11; Mon, 05 Jun 2023 13:34:23 -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=FEyMLJ5t; 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 S232173AbjFEUQL (ORCPT + 99 others); Mon, 5 Jun 2023 16:16:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232200AbjFEUQC (ORCPT ); Mon, 5 Jun 2023 16:16:02 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BFFC106; Mon, 5 Jun 2023 13:16:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685996161; x=1717532161; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=h7I8YHXeOlCOxfUwufW0FBvwo2i1M2IOXOG0q7S47gY=; b=FEyMLJ5tEpdaIzr3wWf9+mJkw7VPqBBtZx3jWd4vrF5ZcLF3iDnS95AJ pD2KnuYp/7yAUgn4428n5QaDeGmy4aIoUgE+Axuxb/nJEvfcpiSx5L/df o1rDu1hvx+B7d+r1FEA+etB0Cn9j1sLnKVqQPT/9jjYBiJkSJa+nVXHtI jutDcj7Yl+0MXnE8pQK6eFyrJNtoBT0aV4HalXL5nv0w3Xz9F3b8kJBYF wzg5l+vp8IWN5+YRO4DiZiphtriACMA06VDCs849PpcEbrDtFREqMDCin WsWy7RyW11fYt/qGuYApNA9+sEWc8KLUJ4KbHqDDzSYk2tCs4jqr06TS0 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10732"; a="356480336" X-IronPort-AV: E=Sophos;i="6.00,218,1681196400"; d="scan'208";a="356480336" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2023 13:15:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10732"; a="711934403" X-IronPort-AV: E=Sophos;i="6.00,218,1681196400"; d="scan'208";a="711934403" Received: from rkbrewer-mobl1.amr.corp.intel.com (HELO tzanussi-mobl1.intel.com) ([10.212.33.16]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2023 13:15:48 -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 v6 05/15] dmaengine: idxd: Export wq resource management functions Date: Mon, 5 Jun 2023 15:15:26 -0500 Message-Id: <20230605201536.738396-6-tom.zanussi@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230605201536.738396-1-tom.zanussi@linux.intel.com> References: <20230605201536.738396-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,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?1767896266829606371?= X-GMAIL-MSGID: =?utf-8?q?1767896266829606371?= 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)