Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3372844rdh; Mon, 27 Nov 2023 12:29:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IGRv7aV6Ep979eRm2H3sZLstzaIg61mcKfLdt1OgxJ8BxbyLZE6vdblIBSqUiicqR7UkUVw X-Received: by 2002:a05:6a21:33a9:b0:18c:14e2:ad92 with SMTP id yy41-20020a056a2133a900b0018c14e2ad92mr11402296pzb.34.1701116968038; Mon, 27 Nov 2023 12:29:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701116968; cv=none; d=google.com; s=arc-20160816; b=j2rgb2VuwsavwodxXStyyo4qpYYqXJI2S98RI6PZkPbZvEfAFCfzSm1OUiaJfUjS0N loZXB4SbDmsly0L6Dd0rr8BvwflfS40tXUGGmjm1wIrKJwRJ5v4xYoXCCzvN/VwQfJd5 5Si9yNJ+eqFYvHAqs1RvPNjMVfHjihEBgdKkexrmAoNxBqCUUYMKMyoeNxR0PeJipsZy Ln9zts4UGbOpziddUdW0bL38FQlYB8X3TbY7bv3JcIMlFbATBjDIWn3f9SZVsfuwrb/Z GLejaALxUOWJybY8d5kvGwuTGmlq+8OuCH6KUM5ojTWAGJrNedV+sF9fYya+0navPYIy EdAQ== 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=mqmDuGiaKFqi20mPRCbu/CkM7y1Z+3EADC5nu+qqTpk=; fh=CKy338m5MbqOKLCytkQoYDn9hkoAEvElo6dffmo/qoM=; b=W8Je5gh6uUCYuXuv5jXD7m7nCKh2Svek2Kip3njYOBJ3SViwJwSR72Sbo1YBMekZsK Prhj3VRNW1nyDLOZoBnJpUjBUM2Xdr33fpsu0ShraLtMPFK60FfU5qhjP77zb8uns+p9 XCB+dK1sGZo3MNQ5OfvcSzIwRDJ6yKWDo3M4yvnfLz+iY3eLn8CKk/AaS3Mtp8s7LT8Q x+nvzvq2UOjlac+G3SiyF1W25Jl8jXoQqyHte0DwfYYOniWf6tRrijrOWBEoSDGgbO6p R4zz2zTSDGlyqldyUHOMRQFuD1wm+SxnIrPGedSUfEA168CL4iHbJt7zEVsW2M3BtVsV 0SHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lapHfLT8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id g14-20020a056a000b8e00b006cd84c5266dsi4512088pfj.142.2023.11.27.12.29.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 12:29:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lapHfLT8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (Postfix) with ESMTP id 9662580725D0; Mon, 27 Nov 2023 12:29:20 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233196AbjK0U1T (ORCPT + 99 others); Mon, 27 Nov 2023 15:27:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232596AbjK0U1I (ORCPT ); Mon, 27 Nov 2023 15:27:08 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CA36D4D; Mon, 27 Nov 2023 12:27:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701116835; x=1732652835; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=g0CJ08TTgyAzZEVGqXStJEZZ7q/F/2UL56Fr67YcaEU=; b=lapHfLT8mq4jL1Erv8dvyq08JVf6KWhl642MrYQtAI36x/cahtz3R1Ox rdL08FWFBTh81SU9PSmYC3sNpV2osN6mPVcKTptQq0ilojQAIWTvmxY1C abbhKpfuwpjhZvyWzedhkUXGC4GoUkfeaPc9tc5AZrizCPMT1A27orgc/ 0ovG40r9Z+6fDNRPMDHZOZOu7oRmfKp92il0xtmQey8/PcmEdxjAtZYte A4tIkThrkqKGLd1mWBnFuJvMRYiaG4mHIBdbluPT/kvo29RVEBlsh72Rz Le46A12QF3WnlOIjhUiTBYImkd+pGcYG5QNuhTj/4geKsGInqmQCDqtmq Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10907"; a="457115477" X-IronPort-AV: E=Sophos;i="6.04,231,1695711600"; d="scan'208";a="457115477" 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:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,231,1695711600"; d="scan'208";a="16394520" 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:13 -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 02/14] dmaengine: idxd: Rename drv_enable/disable_wq to idxd_drv_enable/disable_wq, and export Date: Mon, 27 Nov 2023 14:26:52 -0600 Message-Id: <20231127202704.1263376-3-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 Content-Transfer-Encoding: 8bit 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 howler.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 (howler.vger.email [0.0.0.0]); Mon, 27 Nov 2023 12:29:20 -0800 (PST) Rename drv_enable_wq and drv_disable_wq to idxd_drv_enable_wq and idxd_drv_disable_wq respectively, so that they're no longer too generic to be exported. This also matches existing naming within the idxd driver. And to allow idxd sub-drivers to enable and disable wqs, export them. Signed-off-by: Tom Zanussi Reviewed-by: Dave Jiang Reviewed-by: Fenghua Yu --- drivers/dma/idxd/cdev.c | 6 +++--- drivers/dma/idxd/device.c | 6 ++++-- drivers/dma/idxd/dma.c | 6 +++--- drivers/dma/idxd/idxd.h | 4 ++-- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/dma/idxd/cdev.c b/drivers/dma/idxd/cdev.c index 0423655f5a88..1d918d45d9f6 100644 --- a/drivers/dma/idxd/cdev.c +++ b/drivers/dma/idxd/cdev.c @@ -550,7 +550,7 @@ static int idxd_user_drv_probe(struct idxd_dev *idxd_dev) } wq->type = IDXD_WQT_USER; - rc = drv_enable_wq(wq); + rc = idxd_drv_enable_wq(wq); if (rc < 0) goto err; @@ -565,7 +565,7 @@ static int idxd_user_drv_probe(struct idxd_dev *idxd_dev) return 0; err_cdev: - drv_disable_wq(wq); + idxd_drv_disable_wq(wq); err: destroy_workqueue(wq->wq); wq->type = IDXD_WQT_NONE; @@ -580,7 +580,7 @@ static void idxd_user_drv_remove(struct idxd_dev *idxd_dev) mutex_lock(&wq->wq_lock); idxd_wq_del_cdev(wq); - drv_disable_wq(wq); + idxd_drv_disable_wq(wq); wq->type = IDXD_WQT_NONE; destroy_workqueue(wq->wq); wq->wq = NULL; diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c index 8f754f922217..feca8534a1c5 100644 --- a/drivers/dma/idxd/device.c +++ b/drivers/dma/idxd/device.c @@ -1350,7 +1350,7 @@ int idxd_wq_request_irq(struct idxd_wq *wq) return rc; } -int drv_enable_wq(struct idxd_wq *wq) +int idxd_drv_enable_wq(struct idxd_wq *wq) { struct idxd_device *idxd = wq->idxd; struct device *dev = &idxd->pdev->dev; @@ -1482,8 +1482,9 @@ int drv_enable_wq(struct idxd_wq *wq) err: return rc; } +EXPORT_SYMBOL_NS_GPL(idxd_drv_enable_wq, IDXD); -void drv_disable_wq(struct idxd_wq *wq) +void idxd_drv_disable_wq(struct idxd_wq *wq) { struct idxd_device *idxd = wq->idxd; struct device *dev = &idxd->pdev->dev; @@ -1503,6 +1504,7 @@ void drv_disable_wq(struct idxd_wq *wq) wq->type = IDXD_WQT_NONE; wq->client_count = 0; } +EXPORT_SYMBOL_NS_GPL(idxd_drv_disable_wq, IDXD); int idxd_device_drv_probe(struct idxd_dev *idxd_dev) { diff --git a/drivers/dma/idxd/dma.c b/drivers/dma/idxd/dma.c index 47a01893cfdb..e7043e235408 100644 --- a/drivers/dma/idxd/dma.c +++ b/drivers/dma/idxd/dma.c @@ -314,7 +314,7 @@ static int idxd_dmaengine_drv_probe(struct idxd_dev *idxd_dev) wq->type = IDXD_WQT_KERNEL; - rc = drv_enable_wq(wq); + rc = idxd_drv_enable_wq(wq); if (rc < 0) { dev_dbg(dev, "Enable wq %d failed: %d\n", wq->id, rc); rc = -ENXIO; @@ -333,7 +333,7 @@ static int idxd_dmaengine_drv_probe(struct idxd_dev *idxd_dev) return 0; err_dma: - drv_disable_wq(wq); + idxd_drv_disable_wq(wq); err: wq->type = IDXD_WQT_NONE; mutex_unlock(&wq->wq_lock); @@ -347,7 +347,7 @@ static void idxd_dmaengine_drv_remove(struct idxd_dev *idxd_dev) mutex_lock(&wq->wq_lock); __idxd_wq_quiesce(wq); idxd_unregister_dma_channel(wq); - drv_disable_wq(wq); + idxd_drv_disable_wq(wq); mutex_unlock(&wq->wq_lock); } diff --git a/drivers/dma/idxd/idxd.h b/drivers/dma/idxd/idxd.h index e541d19f14d0..ae3be5cb2ee3 100644 --- a/drivers/dma/idxd/idxd.h +++ b/drivers/dma/idxd/idxd.h @@ -685,8 +685,8 @@ void idxd_unmask_error_interrupts(struct idxd_device *idxd); /* device control */ int idxd_device_drv_probe(struct idxd_dev *idxd_dev); void idxd_device_drv_remove(struct idxd_dev *idxd_dev); -int drv_enable_wq(struct idxd_wq *wq); -void drv_disable_wq(struct idxd_wq *wq); +int idxd_drv_enable_wq(struct idxd_wq *wq); +void idxd_drv_disable_wq(struct idxd_wq *wq); int idxd_device_init_reset(struct idxd_device *idxd); int idxd_device_enable(struct idxd_device *idxd); int idxd_device_disable(struct idxd_device *idxd); -- 2.34.1