Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp3171462rwb; Mon, 5 Sep 2022 07:30:41 -0700 (PDT) X-Google-Smtp-Source: AA6agR7xZ4WsHIRHgwhPEgzOn04x2sgHjdL+jookr3PbiCcGl6sClVLFaS9kIfemYBHcT2mlUc5T X-Received: by 2002:a17:903:41d0:b0:174:d8e0:b0f1 with SMTP id u16-20020a17090341d000b00174d8e0b0f1mr36066105ple.74.1662388241513; Mon, 05 Sep 2022 07:30:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1662388241; cv=pass; d=google.com; s=arc-20160816; b=Hzh5z38Ep9nKWeueC122IfHb48x46AGVOtuSsGnbwP1nGNJk/8WJsATzvZlpIXk1TT u01rgUvlKb3MQXSE/H3vMzJf0ERZdyCcfYD18uQomuC4JA5jN5UBrsTys6Ka7yFNJcsU wp8ICRJLsLXu3FDpR4OBXwV+KV6YYXjrgTU7JvIXvo3O+/LpLIe+GAwdnCXGvdGs2hIz L6ZbIYFxAPiCb9Fwm2Ag1WWQqL587EY/dOyuOtJXhXWdlJriX0vDAC6sJpMw5awghhX6 lWhMiN733DkQ94cNsPI8EPZbegXTMUo2yjt892paGhA882aU6SmmQN+Nz5aUejXSLZ4j 0pLg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ouXMirUJooxVjewuyl91g8VCVuTnSKkxZ1LRI17MI+8=; b=gs482sDOGOF4SJzYGfSVdvMmF4YHU2ERwjIQHd+8/Hp0v5P9K+dQ6vzoLkhc1s4Rkz 6GaFEQNhVXjDaMUYflS3HBgwY3l+iT4OsJUg4YzFNyebyLU1XiTEpen60yIIzuH1WKUp vst50mWyhqPH09GFFBxZzC8q4qMSiefu5V7vGQePz4EC5i2TRxskv8JZius+8KriWHYa er38U+4yDaInue3ZJ5sjNcvgsnzLcV4FjEJw0bY1uVVlUDfADXIppZVkFezYapqH1jCx Ww95HXE2fr8n7aWVMkxpGtXpUlQlzk0MCIvm2FJ7wbOo+A++0lpMIYnTv/yTT/Pu+PlY cQ3g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=UuhaeVLz; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p22-20020a170902a41600b0016d4e5ca5fbsi10073933plq.308.2022.09.05.07.30.29; Mon, 05 Sep 2022 07:30:41 -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=@nxp.com header.s=selector2 header.b=UuhaeVLz; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238008AbiIENfU (ORCPT + 99 others); Mon, 5 Sep 2022 09:35:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238035AbiIENfF (ORCPT ); Mon, 5 Sep 2022 09:35:05 -0400 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-eopbgr60050.outbound.protection.outlook.com [40.107.6.50]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A84801403B for ; Mon, 5 Sep 2022 06:35:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hhmTKdP+ovBnziefiVC4Qf0G0MAyRb5gm8Dw+UAihRfjLBRAesrL5HyLUbgqEFiu+RBSJUGY+u+G09GFJUcG6FOjUx5CbaqZJ67g4yAnnqlSUnIEsqlXzOLI7wQ8qzVnHYD9JAQ+stemUl4rRYoffgBsz77Tu0XIfwoECA7DCUTvPWqK2EANllmRM0oedP5EyM5B8O15MCgHBJkINHy+SSxIr1XI41qiezJRY7LYTgqSW+3wxz1sWShKktYHNwLYxySZql5/dr1Xol9ADqpmxzzOLmsQQrbUcz38fceSg61I0998UY/sZ9YPnk3M3Dh8WVghFOOLCVW5zmHAKa4UEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ouXMirUJooxVjewuyl91g8VCVuTnSKkxZ1LRI17MI+8=; b=DaDhesPX81QEO3PedUcVlt8swzJ6GN+sAo7tb6IligoLDYojr83gImz6IO+LdfdogSPQnwydBjrjgG7upNcvH0wh3RjAoaS+/jnNgk2OTHit6CxQ4IvcnD3iJzZdQzzR34Af2QmEKIB7Gl0f/ccNiANYJetTakyvCzpPd25ikhqych7hI0hjzP8P3gwcmQxGyp60eB+ADTwJ1r7lpK+re+6Iv/Q74P6YQyBrq/1XcZORh9kwsBdc4WBsFqVIxz5PEkNKQw4GYPg2Up6EF094vum3lSCAAuoR666EgdowGl9P81A9ixXK0h5GzeKqED6y284eWjWLEAJGWctroe92Vw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ouXMirUJooxVjewuyl91g8VCVuTnSKkxZ1LRI17MI+8=; b=UuhaeVLz20RxfH89/dFBdrUwwgsgND2hES6w+hmkrF2YTo2aSUJ7Ep8TfdOwTIfv1BXyK7ALSDO4RcFUqr73nGOwcRdgrHwYIdzxT+CevPHCPbnUxGb4rrORqQc2wcuzTiBtrfm21d1ebVj/YaoGZZDYdtTuWvL5mgVMeQ25t9s= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8630.eurprd04.prod.outlook.com (2603:10a6:10:2dd::15) by AM0PR04MB5585.eurprd04.prod.outlook.com (2603:10a6:208:133::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.18; Mon, 5 Sep 2022 13:34:59 +0000 Received: from DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::6cde:8704:ed0a:c87b]) by DU2PR04MB8630.eurprd04.prod.outlook.com ([fe80::6cde:8704:ed0a:c87b%4]) with mapi id 15.20.5588.018; Mon, 5 Sep 2022 13:34:59 +0000 From: Pankaj Gupta To: gaurav.jain@nxp.com, sahil.malhotra@nxp.com, kshitiz.varshney@nxp.com, horia.geanta@nxp.com, linux-kernel@vger.kernel.org, V.Sethi@nxp.com Cc: Pankaj Gupta Subject: [RFC PATCH HBK: 5/8] caam blob-gen: moving blob_priv to caam_drv_private Date: Mon, 5 Sep 2022 20:06:28 +0530 Message-Id: <20220905143631.2832-6-pankaj.gupta@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220905143631.2832-1-pankaj.gupta@nxp.com> References: <20220905143631.2832-1-pankaj.gupta@nxp.com> Content-Type: text/plain X-ClientProxiedBy: SG2PR04CA0173.apcprd04.prod.outlook.com (2603:1096:4::35) To DU2PR04MB8630.eurprd04.prod.outlook.com (2603:10a6:10:2dd::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9e7ac7ca-6a0b-4690-4add-08da8f436d6d X-MS-TrafficTypeDiagnostic: AM0PR04MB5585:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kUhnibSSjXJDsY8wEJX4f572kpqslqiNFox6kIGS3lK0cijHzGHBVDBm2sjRxdOolGPU3keW0HiHNWPOzDJ3EbrdLHqJpn1FRtZg4KKXStzbMxOkp6U/Txkxhi0VdB18em9YWHUZQHxuMC9MUM3GTon/8Ux5aEGUddnt2s8w1F0YKdAR0jS/hHUmyRoDeNU+RsFM2igr+7M6ze1guSAHVW3WYKW5w54zVd8pTJuF5JrHPlCNvW26vMQds8h5kg7xScgsVVve+/v/idNZajC5z0QUKbONjhMPDtHI2wRbupyDicJMUUWiZZk2d+sAP5yN2JDtjFEMi/J3SMEXlwxaj02ix5ZJkBw8aSEV0YEU2ltq8v5EKJR1zu+DfkeEYEJcqMTdELTncxJo2lWhde5bGLphwkhb8q2b3NK4sNyxtL8ZE1WwfG4DSJMfjhseASUUpROTX4WVIiXbJIpJOC6Gbe6xOnA+rqSCkxmn8tmohbYIbv/OBNLzYN3RC3oJQoeTY4Kws2BIo/MamLJ4LjXPqrPW3+658ZvZl+BKJSKYp08wx/lQ1OOLRVm9S0ZJCKJZxSdjBefjFtX70PH8zhCJcJGEvWYfHHgpyH9VaXHTci+hGisgWO6x/QhdqLYhlATol5+kBCCX0ALEO4cDmjsbXReDVoc7/jCBy5wPO2jU2dwGBlID2MMe3IOJGOS2xXsMzDfxp4pujwmCg4x9cui6IbL4nXElnSndofE5xCJn8RuedMz/nmCt3ppbEEC72KkvfgD5XvP8wRcbWY47IaYBfQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8630.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230016)(4636009)(136003)(396003)(376002)(346002)(39860400002)(366004)(316002)(86362001)(6636002)(36756003)(2906002)(38350700002)(38100700002)(44832011)(8936002)(5660300002)(8676002)(4326008)(83380400001)(66476007)(66946007)(6512007)(41300700001)(6486002)(2616005)(1076003)(186003)(6666004)(6506007)(478600001)(66556008)(26005)(52116002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?FxPqMPRG6UCZGPSg0XK2feO/TO7FYQKZYb651TFxrwCPMop55FaESumHqnND?= =?us-ascii?Q?shj9VnKbbpKQxRE/k+zubqCdV/ZzlB6Q3+diw7dSbeeT1cIPSnAo+nJVtDlk?= =?us-ascii?Q?nXSktZ34TMp0r9gQELJ++09SFMySu/4qUyKHVQbYsD5/5fsh03cs3fmHwTcL?= =?us-ascii?Q?66+QHElEVZ6QxZ/Kg938lDaAxibGxMEiHEZ0wRnzAM1gdj+bJZ+oQre4C80X?= =?us-ascii?Q?mIfsnNJvlGXC+iVlQpdt/9u1a6Ms1LxMbjNzXi0hvUlIXZTaPXfIDIzFmr5L?= =?us-ascii?Q?2Cf9V1GDuBOYRkQM84bYUi20uqPnPaPKPczjyb1ZlxsA+BYChRvfQPIfcZzU?= =?us-ascii?Q?CW6m2nBRGapqw54E+t9SnyFntKQfp9VehcyulVaAqRV5MXAqwg/njGXbF0TJ?= =?us-ascii?Q?eWwX9Fxzu7u3lAeJspAq6iKLoaUhWUlwmqV0NRjwZoRGhd0MoWJT+GgztVdV?= =?us-ascii?Q?vyjoUIsucrh7kz44Gw4DekQyarXGpjo1Nj3VdBy6V80kUIhAVN3lrBRZIwYT?= =?us-ascii?Q?pAgWv6fjnHMI00U3g76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wlGouP+sJ8bdFJb4?= =?us-ascii?Q?qExVHpLfohJyanYrfgkRK9BtCbW3e370chwt4dnBdT4IggvvDPgn54WUII/T?= =?us-ascii?Q?CWu6sD37nE5yIM6ItXWvYTex6sg5B9pbkNmmSIyAN014HhEEk08far5R2F2E?= =?us-ascii?Q?quLcOKOhTbCTSNxyNZIhSr3TFpu/DbCdfXYCYLni?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9e7ac7ca-6a0b-4690-4add-08da8f436d6d X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8630.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Sep 2022 13:34:59.0149 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Yjec1AaxUKtKFPpl2ZPCgSrJbrmiM2jJjFg3ouL8/JeLE0JQ/ZRGaDMuaDfN3G2fiempvHv9swkgpw7kxCeyMw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB5585 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,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 caam blob-gen: moving structure blob_priv to structure caam_drv_private. Signed-off-by: Pankaj Gupta --- drivers/crypto/caam/blob_gen.c | 8 ++++---- drivers/crypto/caam/intern.h | 6 +++++- include/soc/fsl/caam-blob.h | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/crypto/caam/blob_gen.c b/drivers/crypto/caam/blob_gen.c index c128a83cc8dd..5164e62f9596 100644 --- a/drivers/crypto/caam/blob_gen.c +++ b/drivers/crypto/caam/blob_gen.c @@ -70,7 +70,7 @@ int caam_encap_blob(struct caam_blob_priv *priv, struct caam_blob_info *info) { struct caam_blob_job_result testres; - struct device *jrdev = &priv->jrdev; + struct device *jrdev = priv->jrdev; dma_addr_t dma_in, dma_out; int op = OP_PCLID_BLOB; size_t output_len; @@ -163,7 +163,7 @@ int caam_decap_blob(struct caam_blob_priv *priv, struct caam_blob_info *info) { struct caam_blob_job_result testres; - struct device *jrdev = &priv->jrdev; + struct device *jrdev = priv->jrdev; dma_addr_t dma_in, dma_out; int op = OP_PCLID_BLOB; size_t output_len; @@ -267,12 +267,12 @@ struct caam_blob_priv *caam_blob_gen_init(void) return ERR_PTR(-ENODEV); } - return container_of(jrdev, struct caam_blob_priv, jrdev); + return &ctrlpriv->blob_priv; } EXPORT_SYMBOL(caam_blob_gen_init); void caam_blob_gen_exit(struct caam_blob_priv *priv) { - caam_jr_free(&priv->jrdev); + caam_jr_free(priv->jrdev); } EXPORT_SYMBOL(caam_blob_gen_exit); diff --git a/drivers/crypto/caam/intern.h b/drivers/crypto/caam/intern.h index 572cf66c887a..2fb7df3ffda5 100644 --- a/drivers/crypto/caam/intern.h +++ b/drivers/crypto/caam/intern.h @@ -4,7 +4,7 @@ * Private/internal definitions between modules * * Copyright 2008-2011 Freescale Semiconductor, Inc. - * Copyright 2019 NXP + * Copyright 2019-2022 NXP */ #ifndef INTERN_H @@ -12,6 +12,7 @@ #include "ctrl.h" #include +#include /* Currently comes from Kconfig param as a ^2 (driver-required) */ #define JOBR_DEPTH (1 << CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE) @@ -114,6 +115,9 @@ struct caam_drv_private { struct dentry *ctl; /* controller dir */ struct debugfs_blob_wrapper ctl_kek_wrap, ctl_tkek_wrap, ctl_tdsk_wrap; #endif +#ifdef CONFIG_CRYPTO_DEV_FSL_CAAM_BLOB_GEN + struct caam_blob_priv blob_priv; +#endif }; #ifdef CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API diff --git a/include/soc/fsl/caam-blob.h b/include/soc/fsl/caam-blob.h index 632944df29f7..380b0bcb79dc 100644 --- a/include/soc/fsl/caam-blob.h +++ b/include/soc/fsl/caam-blob.h @@ -15,7 +15,7 @@ #define CAAM_BLOB_MAX_LEN 4096 struct caam_blob_priv { - struct device jrdev; + struct device *jrdev; }; -- 2.17.1