Message ID | 20230710190654.299639-7-tom.zanussi@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp23538vqm; Mon, 10 Jul 2023 12:22:17 -0700 (PDT) X-Google-Smtp-Source: APBJJlGl8GJ5vHusfZiynO0YaY6o9vx23Ep/wUhEGyFrfBonAukMcCKOuaIP/mUOn+qaw6H4XMe4 X-Received: by 2002:a17:903:2441:b0:1b8:1c4f:4f72 with SMTP id l1-20020a170903244100b001b81c4f4f72mr12750242pls.61.1689016937063; Mon, 10 Jul 2023 12:22:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689016937; cv=none; d=google.com; s=arc-20160816; b=KxaQvsBrZNqnRziRMAo3xSslOG9v2uAP/pCISIxiK/57XnjhsYeZ/F4sqlWohG3Rmp fFTmD2WCf0gZ4yrN6S6rlq1Px60o/Lr3AeGNxhzEjVDGQN6CVUJUcWV7mbjzjBdzgXnr 8+jlHhe6d/uWTn7aaOx3FDF9aDx93Llo9/WNFYdzgFNKqcSb7YFQUHYFujF7QoteY8Vt n2PEWN49BfuZjSILPDVhOYMeQjgs8igspzgNdS9xwZWvTsGF8aoxLmwLcxLJg3wk+1g7 ev0YLWn/nB8buBi9FbC/3GvBbzTjmsbuouVswEI3vn1DcSFIwlUww7538Xn3/of59tXE 3StA== 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=YMP4dzpRdZYf/r56bxQyRb4VHIawngvu8u0qfuecpPI=; fh=KKYX96Dyn269sAN9Nbt8IfOk86mWVdLVST7Tbph7224=; b=WxjsuMq0SW68Np3BPrDtbnF2UtgmU/qd1L1aPjtVDFCRbFgOvJI21ttAsHK5mwlIz8 Sn3TAaXK2sjePvA0llyZ/qTKxKrmL6ugCw3Dsx07OjrUuoKJZkC8tr1VRGam1L8hdNhw b/DzaN516p5/h3Ec6UAO76LX1XxFuUG8IQCjwyWzsjVK/hGZf9ChYtamdMf0xjXq3k// 744jAoceUAFGJpfwHX5pswKADNKTqhp8aLv57xV3JJgz6agFcq39S/y37u6B2PwTInsu Vbxk1RwPHO90Y/OdVheAfeKlpVH+i3BCf9suK+gupUqjpzzc4/aGN+0aTvHQ8H+KeLRg DJ2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QEqPGlii; 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 x7-20020a170902ec8700b001b89b802e2dsi274162plg.26.2023.07.10.12.22.04; Mon, 10 Jul 2023 12:22:17 -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=QEqPGlii; 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 S229756AbjGJTHn (ORCPT <rfc822;gnulinuxfreebsd@gmail.com> + 99 others); Mon, 10 Jul 2023 15:07:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231452AbjGJTH1 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 10 Jul 2023 15:07:27 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 937541B8; Mon, 10 Jul 2023 12:07:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689016032; x=1720552032; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=yPVyZBdMFSkLLY+neCVq3Ouyo7u0i8a/xzk2t6QMfsQ=; b=QEqPGliifEO7X5dUgzblbwroYX1N77rUtstDhJjNi4wKyoYI6HK8T1Y5 ssXCOJqfj1uoKF0VpMGiv5SJhZD7XcB6HrovcG8uZ2DBgBSfv0UhCMaYL nlIaJ4rVH2w4EECh+rQ2Ub2oZ0OOHdFlebVW1++MTRBaq7raVXynS+5zR vkYY0trMS1ocZsLhwQOTYC3vObN9v1VV/nQCE5zmZY+hBOMRqEJiz8yls WhH7hLyaQEODo1flcRKyLQh8AuwH4OZFCIWxH7fqM7rjE5xtYXo55Qd9V LfiOdOWLTaURON+2BadIXaRQMSNzOPF/fIDa323gHeMRxLqEFHO7OLOzs Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10767"; a="354290782" X-IronPort-AV: E=Sophos;i="6.01,195,1684825200"; d="scan'208";a="354290782" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jul 2023 12:07:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10767"; a="844991086" X-IronPort-AV: E=Sophos;i="6.01,195,1684825200"; d="scan'208";a="844991086" Received: from jdmillsx-mobl1.amr.corp.intel.com (HELO tzanussi-mobl1.intel.com) ([10.212.107.12]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jul 2023 12:07:10 -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, vinodh.gopal@intel.com, giovanni.cabiddu@intel.com, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, dmaengine@vger.kernel.org Subject: [PATCH v7 06/14] dmaengine: idxd: Add wq private data accessors Date: Mon, 10 Jul 2023 14:06:46 -0500 Message-Id: <20230710190654.299639-7-tom.zanussi@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230710190654.299639-1-tom.zanussi@linux.intel.com> References: <20230710190654.299639-1-tom.zanussi@linux.intel.com> 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, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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: INBOX X-GMAIL-THRID: 1771062624003552436 X-GMAIL-MSGID: 1771062624003552436 |
Series |
crypto: Add Intel Analytics Accelerator (IAA) crypto compression driver
|
|
Commit Message
Tom Zanussi
July 10, 2023, 7:06 p.m. UTC
Add the accessors idxd_wq_set_private() and idxd_wq_get_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
> From: Tom Zanussi <tom.zanussi@linux.intel.com> > Add the accessors idxd_wq_set_private() and idxd_wq_get_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> Reviewed-by: Fenghua Yu <fenghua.yu@intel.com> Thanks. -Fenghua
diff --git a/drivers/dma/idxd/idxd.h b/drivers/dma/idxd/idxd.h index 276b5f9cf967..971daf323655 100644 --- a/drivers/dma/idxd/idxd.h +++ b/drivers/dma/idxd/idxd.h @@ -609,6 +609,16 @@ static inline int idxd_wq_refcount(struct idxd_wq *wq) return wq->client_count; }; +static inline void idxd_wq_set_private(struct idxd_wq *wq, void *private) +{ + dev_set_drvdata(wq_confdev(wq), private); +} + +static inline void *idxd_wq_get_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