Message ID | 038db785a87dc59c0073989633eee0205958cb67.1683573703.git.zanussi@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2413602vqo; Mon, 8 May 2023 13:31:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6HVoJ9RYYdDCtS9TcPEththjy9CZppieKa0yHxI9UMYnNJtAACdwmLaNAA42na/BBpel1C X-Received: by 2002:a17:903:124f:b0:1aa:f6e9:4cb3 with SMTP id u15-20020a170903124f00b001aaf6e94cb3mr14591489plh.52.1683577886829; Mon, 08 May 2023 13:31:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683577886; cv=none; d=google.com; s=arc-20160816; b=I4PAIup3ht53i5yjRoHOptaP2TFLyLjuGiaeb6/j3q2lNs9vCss73ah7l2AIz+ATCL YmRLNCVnX9AgUPErUiLlHzC/5DttZ3oj24C8xokz9OAqa2xDICceDxzYQJd9HWWxv7sW dCtY6mO7TlwrmB7W9P+a5GY+ib6OUA0y4UM1tZ7GpC2CGGyGcn8116V+6wXiIQGTAz8t TwieYKLxo+wNuBuEH+6FyOz0w3Y0UfyVotNH/aSUUw8B+P9za5C/P4osqnT0IbZPUOBD VZG7BqX/Z88TaHtBkIznVJ4N0BdugXKizn21EHDvpW1LJiQSBWZ9UshCOoKi/iJ03HVq B7/w== 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=khvsANz6GErcDpyJO1rxJHSu4stNaohxS1m2yXjkBao=; b=WAxSKWiGnG8K/la87lIjtKI8vyhYMw9ICQcKG71xe9Q7OPxF1NqSvm2cYO61Org30i 2EKil6g98xl+zmH7nfrv5pw6Ymt6HL0e/eCVXlql7N6a3gS1lMkEYL3nR7sXvBY0tXIn aWizbZt5e6mi/UpbVQYfhJP7vzf/obNaOu9wXrWCMUQOmre7IekHyqQzcMZoEMav5gcf K+QTEEWfDE9jzLQ+8bvQfTycwwsacGc0LO/7Hq2pF15xEI/QC3HfkJQnTfBiBdiiYg2R hWAae3HwPuiTV/bgxsMXSwEcqT4JhaQOXlLL6I2bVJEdIs+eR5/9I38SNwUuqQadABIU bkqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=EHzSlJFL; 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 g12-20020a170902c38c00b001a1a0db7f61si8754716plg.336.2023.05.08.13.31.11; Mon, 08 May 2023 13:31:26 -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=EHzSlJFL; 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 S234060AbjEHUIP (ORCPT <rfc822;jeantsuru.cumc.mandola@gmail.com> + 99 others); Mon, 8 May 2023 16:08:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233815AbjEHUH7 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 8 May 2023 16:07:59 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE0B56598; Mon, 8 May 2023 13:07:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683576472; x=1715112472; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/c7K9mHlTLpNQ6n5p6hJXCXC+v9mwx4ANeUBizx7FVM=; b=EHzSlJFLYXl59vn3fXEyPVWsgAIfbp1qQDun8yugfunzrfMSNnZ3EqUK rnW+R/7fY4/LZvpDqDlLv6gMHNWTB0hVxhDkkQZpK4KJ8x6mlJrEqSFEq PJBhA/ihpLAnkxBPeFKfsOjpwKb37ebNq09Kn21XcHA1qhfx7d9Ut7w/A L3y8ltvzev0l0sWEQOl/V/vam44XMGXweG8bGgthuxyukonrFjcKvn4SA jH0O+f/OqX9TJ1Gzwkbjg3DfKFVmUWsxAw6B4c1XtGc1TeJnwbgERsFr6 TOpmPKuWSmMv7T/Tslz6vBsGhI3FGXPrPoAhG+aNmZea3nenB8fden3n6 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10704"; a="348573647" X-IronPort-AV: E=Sophos;i="5.99,259,1677571200"; d="scan'208";a="348573647" 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:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10704"; a="788241640" X-IronPort-AV: E=Sophos;i="5.99,259,1677571200"; d="scan'208";a="788241640" 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:51 -0700 From: Tom Zanussi <tom.zanussi@linux.intel.com> 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 06/15] dmaengine: idxd: Add wq private data accessors Date: Mon, 8 May 2023 15:07:28 -0500 Message-Id: <038db785a87dc59c0073989633eee0205958cb67.1683573703.git.zanussi@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <cover.1683573703.git.zanussi@kernel.org> References: <cover.1683573703.git.zanussi@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765359366677797735?= X-GMAIL-MSGID: =?utf-8?q?1765359366677797735?= |
Series |
crypto: Add Intel Analytics Accelerator (IAA) crypto compression driver
|
|
Commit Message
Tom Zanussi
May 8, 2023, 8:07 p.m. UTC
Add the accessors set_idxd_wq_private() and idxd_wq_private() allowing
users to set and retrieve a private void * associated with an idxd_wq.
The private data is stored in the idxd_dev.conf_dev associated with
each idxd_wq.
Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
---
drivers/dma/idxd/idxd.h | 10 ++++++++++
1 file changed, 10 insertions(+)
Comments
On 5/8/23 1:07 PM, Tom Zanussi wrote: > Add the accessors set_idxd_wq_private() and idxd_wq_private() allowing > users to set and retrieve a private void * associated with an idxd_wq. > > The private data is stored in the idxd_dev.conf_dev associated with > each idxd_wq. > > Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> > --- > drivers/dma/idxd/idxd.h | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/dma/idxd/idxd.h b/drivers/dma/idxd/idxd.h > index 193552dea224..71cd4ca7d27a 100644 > --- a/drivers/dma/idxd/idxd.h > +++ b/drivers/dma/idxd/idxd.h > @@ -552,6 +552,16 @@ static inline int idxd_wq_refcount(struct idxd_wq *wq) > return wq->client_count; > }; > > +static inline void set_idxd_wq_private(struct idxd_wq *wq, void *private) I would go with the same kernel naming convention: idxd_wq_set_private() and idxd_wq_get_private()? > +{ > + dev_set_drvdata(wq_confdev(wq), private); > +} > + > +static inline void *idxd_wq_private(struct idxd_wq *wq) > +{ > + return dev_get_drvdata(wq_confdev(wq)); > +} > + > /* > * Intel IAA does not support batch processing. > * The max batch size of device, max batch size of wq and
On Mon, 2023-05-08 at 13:43 -0700, Dave Jiang wrote: > > > On 5/8/23 1:07 PM, Tom Zanussi wrote: > > Add the accessors set_idxd_wq_private() and idxd_wq_private() > > allowing > > users to set and retrieve a private void * associated with an > > idxd_wq. > > > > The private data is stored in the idxd_dev.conf_dev associated with > > each idxd_wq. > > > > Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> > > --- > > drivers/dma/idxd/idxd.h | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/drivers/dma/idxd/idxd.h b/drivers/dma/idxd/idxd.h > > index 193552dea224..71cd4ca7d27a 100644 > > --- a/drivers/dma/idxd/idxd.h > > +++ b/drivers/dma/idxd/idxd.h > > @@ -552,6 +552,16 @@ static inline int idxd_wq_refcount(struct > > idxd_wq *wq) > > return wq->client_count; > > }; > > > > +static inline void set_idxd_wq_private(struct idxd_wq *wq, void > > *private) > > I would go with the same kernel naming convention: > > idxd_wq_set_private() and idxd_wq_get_private()? Yeah, makes sense, will change. Thanks, Tom > > +{ > > + dev_set_drvdata(wq_confdev(wq), private); > > +} > > + > > +static inline void *idxd_wq_private(struct idxd_wq *wq) > > +{ > > + return dev_get_drvdata(wq_confdev(wq)); > > +} > > + > > /* > > * Intel IAA does not support batch processing. > > * The max batch size of device, max batch size of wq and
diff --git a/drivers/dma/idxd/idxd.h b/drivers/dma/idxd/idxd.h index 193552dea224..71cd4ca7d27a 100644 --- a/drivers/dma/idxd/idxd.h +++ b/drivers/dma/idxd/idxd.h @@ -552,6 +552,16 @@ static inline int idxd_wq_refcount(struct idxd_wq *wq) return wq->client_count; }; +static inline void set_idxd_wq_private(struct idxd_wq *wq, void *private) +{ + dev_set_drvdata(wq_confdev(wq), private); +} + +static inline void *idxd_wq_private(struct idxd_wq *wq) +{ + return dev_get_drvdata(wq_confdev(wq)); +} + /* * Intel IAA does not support batch processing. * The max batch size of device, max batch size of wq and