From patchwork Wed Nov 9 08:46:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Horia Geanta X-Patchwork-Id: 9418599 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C53A360512 for ; Wed, 9 Nov 2016 09:02:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8E67284D9 for ; Wed, 9 Nov 2016 09:02:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC7D22890A; Wed, 9 Nov 2016 09:02:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UPPERCASE_50_75 autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 23727284D9 for ; Wed, 9 Nov 2016 09:02:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752956AbcKIJCA (ORCPT ); Wed, 9 Nov 2016 04:02:00 -0500 Received: from mail-by2nam01on0053.outbound.protection.outlook.com ([104.47.34.53]:41386 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752922AbcKIJB7 (ORCPT ); Wed, 9 Nov 2016 04:01:59 -0500 X-Greylist: delayed 840 seconds by postgrey-1.27 at vger.kernel.org; Wed, 09 Nov 2016 04:01:59 EST Received: from BN3PR0301CA0003.namprd03.prod.outlook.com (10.160.180.141) by CY4PR03MB2887.namprd03.prod.outlook.com (10.175.116.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.707.6; Wed, 9 Nov 2016 08:47:45 +0000 Received: from BL2FFO11FD040.protection.gbl (2a01:111:f400:7c09::197) by BN3PR0301CA0003.outlook.office365.com (2a01:111:e400:4000::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.721.10 via Frontend Transport; Wed, 9 Nov 2016 08:47:45 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BL2FFO11FD040.mail.protection.outlook.com (10.173.161.136) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.707.3 via Frontend Transport; Wed, 9 Nov 2016 08:47:44 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:799; Count:13 Received: from enigma.ea.freescale.net (enigma.ea.freescale.net [10.171.77.120]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id uA98lTXO026193; Wed, 9 Nov 2016 01:47:43 -0700 From: =?UTF-8?q?Horia=20Geant=C4=83?= To: Herbert Xu CC: "David S. Miller" , Subject: [PATCH 03/14] crypto: caam - desc.h fixes Date: Wed, 9 Nov 2016 10:46:13 +0200 Message-ID: <1478681184-9442-4-git-send-email-horia.geanta@nxp.com> X-Mailer: git-send-email 2.4.4 In-Reply-To: <1478681184-9442-1-git-send-email-horia.geanta@nxp.com> References: <1478681184-9442-1-git-send-email-horia.geanta@nxp.com> MIME-Version: 1.0 X-IncomingHeaderCount: 13 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131231548649313475; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(92566002)(626004)(305945005)(23676002)(106466001)(104016004)(87936001)(76176999)(85426001)(33646002)(2870700001)(5660300001)(69596002)(50986999)(50226002)(105606002)(81166006)(77096005)(81156014)(5820100001)(575784001)(189998001)(6916009)(586003)(110136003)(47776003)(2950100002)(68736007)(86362001)(97736004)(6666003)(8676002)(50466002)(356003)(7846002)(2906002)(36756003)(4326007)(229853001)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2887; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD040; 1:D5I/SViq7q1pbady0reqckTw1uchfQVR+8SW3os/6cLVgB7p0S/MTws8zzUYE+zT1dXS3B35CfCOxYs6Zd161iIOETT5NLq/YJIJH/20knFcwgqVsNk9h5DqwZx65m4BbnK4fnyMi6pk1EGxSMHVnR1Z1MyWsUQQHjLhkC+moFnHoOyGcdZd0R5haGX4VTO0BrJJUJxg3QR9JXcWsvqtgWAUtXcPCa0EA3RoLD2b1LvtUvO8WSHKZC47ngsuXn1F2mYWPs3xrFXY02Lk5M2DPOMxYXq+PGEBYZeGNtcZMrblIGagPXr66UZrugwQC/j1N6NdxTBWN5p3Bg2YvSdWGxexYd0ubQbTVHL37pbj0Ly9AAf/QAZbVsmBNCwdvRqKJQipUhyvSJrmuXPjJ0L9j7c6OUGCvw4NHy3pD4M6g8ozvdA2sWVSooxhLVIhMKzO7toYLhgL9AMfJKelgLOdRGybEmSwRK/y2xd3lkcvK2O/mkzO+S9Vi0hgdeMvklbqn17y48Zb2TKyyIGJqLKeG+neq9aPm/bkWeDesGIge5ZQL/nOqBzGFkPz+2bXPm+Zj0+Gq5hEtuP4iFS7bmpVWSeR8ndd20qJOevWDmHJhlkPNIBibk8300n+hBjjID3+ X-MS-Office365-Filtering-Correlation-Id: 505acbd9-4825-44cb-14c3-08d4087d1308 X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2887; 2:cr1jH9VPMyHTNfX+md5EK8bN8LBg1+VdZdCX+ZgBZC90rhQgYWpfa894fuyEKfq3nkktM8tQ444XPsrsYppQKeQr6QU66160jIhqFYQGckosLzLhiYMzPqm2XngPwjEn3eZPwLTWtiAbMshwYaokv+DNeCh1yTDf+qwTabnLeWyBAWjnvplni2keK0Je9D5cDCiOfJnOfKsvK16g2Ox0uw==; 3:7BrrbYKUjM6XbMk1eFx8nHON0DRqGADFtTWB/nD12ZqvD20NS3CqGNwoHYkBDTpgkuFJPvaNEywBpw0eFHKDyPsgeHcHL2QBbDLIOLsNGWEBWT2X/y3Byen43nVjMaWvbE4IFUAFITLlZqKCEmYCHotXLTuV84RzrmSJul3wEGpiRR/Xv1CJ71PlHItZ3rZ2Uzoyww7BVTdxceOB8Sd8aLs0QQmLMvv7lKOnhSY1bzRjfmh9UDlvjC8pxsqAnt0r X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY4PR03MB2887; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2887; 25:XABytK4Jvs77UWTIsqJ8efKWth6oLu8Q7NwbgqMU0MYTqEMgoqS3P/ejFHhFF2WnkJJyuXQok9acnKtMeFiyKsaITC3toSEdAivqTGWmwXKg9942Kzd8QA2u7Utg2bia8xboG6+0FUshcE9HkwZ2Rez6HRNy2MFEd7nZhSdk/JbJYwRYV+mdR5s+n+VItLjsq1ZbWHWRfM6svlWGbSo9hoOip1BsMgKoJRdUB8RWwa2T6FHY/FFGvkkIMT71iZbzdMeVoRvmim8xpoRu2XBaHvNz97D9seibwJdUnc9hB24ltECTyO6lsYwFA+8nsHZkcBv0HUbR0D6T1TTZ51G10Cl6JcIfbvFk+xUOwtXwjkhUCKjm3eVN2twEP/hqBLpCtigHI3TY0JKL4LsP9hnYo15BhF7ExIOjSHF3c0gG1QwVGDWCfBfyG3QqrmioNwynOUrx6LsNsWyMnD/DvPbQHA==; 31:NcRUPd93IBUhotJpBilziFbDkxb5gkIbF47xbOcOrJjtlHG7LOKKolZ/ASbbM63VK0AbwLTD50dCFaeMKebZEiN8iNlevz6v3GM8FrMWuF6yvapfRo89gb70NcHibxhuyu5Ts4dKdUau2asjEZCRTf//vuOOaKy2p43m5iu0mmoeEryuz8awvevbf1aFWyQOl0Kh8SiDWsvjGoNriqRm14xY1gEgBjvD/wYWKNOLlIaCc7B1UilQawv4bKPEPm76dyUYa+rmcz4BfhbpPVTpeg/VlnGKLkSXBYx41agpw8tPqZWv14ycaKyXRHY7Q5no X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(13015025)(13023025)(13024025)(13017025)(13018025)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:CY4PR03MB2887; BCL:0; PCL:0; RULEID:(400006); SRVR:CY4PR03MB2887; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2887; 4:ArMmJ/jxMZEfy/irjJaMa8NEKDUOhBS26DKaYJuaf3HG/+XuR/rAxdwOAbjMhIjeANWDBndIYSdxakpcZmO4SXOA7D00smC0wLUYK6tbQNcappJnQGYjj9Y+5czH3BYhrJfEQHiai1jy6D4bhd7E6F5cJHGP7IDdb5TbGUIP7JGNdHF+hElpvNlJztsb+CFFx3/RXLHYETO55kv+zRqt7rprMaI0GU1fFtxqAODKby+vpyqzXk+MTle0PKP3Dnh6o2x9Fm3wTnizb7ArBPDHNY0TlTEhJFNiXBsVcskEdcODHG1DhWdmm8/629zAvGZwMy1ELEr38nhnYQs6GtkFmk/w7rLWEbcQ/w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XiL6bRm?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2887; 6:ENU57ai5Wl2hSCtlALCgSlVh8eZ3ZCgyifv11ywUSRBt3K/zntZmrEeFE1Q7uiEqy7I5VvixH6uwnA5HG15kITa9BTFblp10rwq0eCxFSHMu9NRLgspIvfBUm4BOXjZEBqRYh2PEyyjcKXn4KbJyiIuQByaEz++d741w6S9BR+bhDWz5emT6N46+f3/Tu0WibW7FwgsEdVQcfD3vGeWi7vSnCPga3Gmj6VEoqGNAGbjv3Ov2Fbgakhu13T5gTOfAGA5MNisr2/C+nuFgeEdVnjdNRn8I9Dsnj/NrtOkACRh7a/gBMLImrAjr6buBHsGC; 5:oS+CtmhHfTRueG2jy7i8F88mCFLpWbX1yOha8r3I9U5AqOlZCq5BY0NfQpdOo7yh4wMlFn2b/dcsNcxoNagdcqV91LhQasK9kC8BFrspNBdO9jNytONOD2QtxNHTNeCoIVdsMtCHXlOB07E2c+mO0/9Cp23hqWop5id5yst6AHe1bm10pexyE2qIaE7w8E/i; 24:D6jYfZBEWp7/qDx9x+7MgKgpACDvGCVJVyC+nkwESVIQAhMmiOkWvcPgaa+BiS2XvvMEqKE+2lPnXF/WJTDRMBlYdiMrsVlzMLfTX+gkLng= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2887; 7:63IjdFXhiCRpaazU42gcr+mo9Wndr3lCProZnCemu2ssnBiCUzi1aJj1wwuSiNwjNS27dfvagvYDfUvV59gx3DYGYuI11GJf/wlKYGcO6jqaEuVKUU7rEDXhWrn0xVUKv30fChWlkyKeZmEwmBcx5vliYfRdD/6MNEYAIuKxqWLnoEKoIm+5+pSFnwWD7Pjk3yabClsKj1iV5O9Hd33d2f+WaekuYwVugj28cD6HuIxWRNSfLa7FklvHZtLetYIdGUtWRfo0lM7FmCOZinzFgqfVnm/0xjs+2XP6+twxVsKApiOH3IK7MVpxBJhvSDj0IfkZXq8piecpx6H4ong3mgfCkchS4b7Jc14jRTwKhKU= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Nov 2016 08:47:44.6973 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR03MB2887 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 1. fix HDR_START_IDX_MASK, HDR_SD_SHARE_MASK, HDR_JD_SHARE_MASK Define HDR_START_IDX_MASK consistently with the other masks: mask = bitmask << offset 2. OP_ALG_TYPE_CLASS1 and OP_ALG_TYPE_CLASS2 must be shifted. 3. fix FIFO_STORE output data type value for AFHA S-Box 4. fix OPERATION pkha modular arithmetic source mask 5. rename LDST_SRCDST_WORD_CLASS1_ICV_SZ to LDST_SRCDST_WORD_CLASS1_IV_SZ (it refers to IV, not ICV). Signed-off-by: Horia Geantă --- drivers/crypto/caam/desc.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/caam/desc.h b/drivers/crypto/caam/desc.h index 513b6646bb36..61059abef737 100644 --- a/drivers/crypto/caam/desc.h +++ b/drivers/crypto/caam/desc.h @@ -90,8 +90,8 @@ struct sec4_sg_entry { #define HDR_ZRO 0x00008000 /* Start Index or SharedDesc Length */ -#define HDR_START_IDX_MASK 0x3f #define HDR_START_IDX_SHIFT 16 +#define HDR_START_IDX_MASK (0x3f << HDR_START_IDX_SHIFT) /* If shared descriptor header, 6-bit length */ #define HDR_DESCLEN_SHR_MASK 0x3f @@ -121,10 +121,10 @@ struct sec4_sg_entry { #define HDR_PROP_DNR 0x00000800 /* JobDesc/SharedDesc share property */ -#define HDR_SD_SHARE_MASK 0x03 #define HDR_SD_SHARE_SHIFT 8 -#define HDR_JD_SHARE_MASK 0x07 +#define HDR_SD_SHARE_MASK (0x03 << HDR_SD_SHARE_SHIFT) #define HDR_JD_SHARE_SHIFT 8 +#define HDR_JD_SHARE_MASK (0x07 << HDR_JD_SHARE_SHIFT) #define HDR_SHARE_NEVER (0x00 << HDR_SD_SHARE_SHIFT) #define HDR_SHARE_WAIT (0x01 << HDR_SD_SHARE_SHIFT) @@ -235,7 +235,7 @@ struct sec4_sg_entry { #define LDST_SRCDST_WORD_DECO_MATH2 (0x0a << LDST_SRCDST_SHIFT) #define LDST_SRCDST_WORD_DECO_AAD_SZ (0x0b << LDST_SRCDST_SHIFT) #define LDST_SRCDST_WORD_DECO_MATH3 (0x0b << LDST_SRCDST_SHIFT) -#define LDST_SRCDST_WORD_CLASS1_ICV_SZ (0x0c << LDST_SRCDST_SHIFT) +#define LDST_SRCDST_WORD_CLASS1_IV_SZ (0x0c << LDST_SRCDST_SHIFT) #define LDST_SRCDST_WORD_ALTDS_CLASS1 (0x0f << LDST_SRCDST_SHIFT) #define LDST_SRCDST_WORD_PKHA_A_SZ (0x10 << LDST_SRCDST_SHIFT) #define LDST_SRCDST_WORD_PKHA_B_SZ (0x11 << LDST_SRCDST_SHIFT) @@ -400,7 +400,7 @@ struct sec4_sg_entry { #define FIFOST_TYPE_PKHA_N (0x08 << FIFOST_TYPE_SHIFT) #define FIFOST_TYPE_PKHA_A (0x0c << FIFOST_TYPE_SHIFT) #define FIFOST_TYPE_PKHA_B (0x0d << FIFOST_TYPE_SHIFT) -#define FIFOST_TYPE_AF_SBOX_JKEK (0x10 << FIFOST_TYPE_SHIFT) +#define FIFOST_TYPE_AF_SBOX_JKEK (0x20 << FIFOST_TYPE_SHIFT) #define FIFOST_TYPE_AF_SBOX_TKEK (0x21 << FIFOST_TYPE_SHIFT) #define FIFOST_TYPE_PKHA_E_JKEK (0x22 << FIFOST_TYPE_SHIFT) #define FIFOST_TYPE_PKHA_E_TKEK (0x23 << FIFOST_TYPE_SHIFT) @@ -1107,8 +1107,8 @@ struct sec4_sg_entry { /* For non-protocol/alg-only op commands */ #define OP_ALG_TYPE_SHIFT 24 #define OP_ALG_TYPE_MASK (0x7 << OP_ALG_TYPE_SHIFT) -#define OP_ALG_TYPE_CLASS1 2 -#define OP_ALG_TYPE_CLASS2 4 +#define OP_ALG_TYPE_CLASS1 (2 << OP_ALG_TYPE_SHIFT) +#define OP_ALG_TYPE_CLASS2 (4 << OP_ALG_TYPE_SHIFT) #define OP_ALG_ALGSEL_SHIFT 16 #define OP_ALG_ALGSEL_MASK (0xff << OP_ALG_ALGSEL_SHIFT) @@ -1249,7 +1249,7 @@ struct sec4_sg_entry { #define OP_ALG_PKMODE_MOD_PRIMALITY 0x00f /* PKHA mode copy-memory functions */ -#define OP_ALG_PKMODE_SRC_REG_SHIFT 13 +#define OP_ALG_PKMODE_SRC_REG_SHIFT 17 #define OP_ALG_PKMODE_SRC_REG_MASK (7 << OP_ALG_PKMODE_SRC_REG_SHIFT) #define OP_ALG_PKMODE_DST_REG_SHIFT 10 #define OP_ALG_PKMODE_DST_REG_MASK (7 << OP_ALG_PKMODE_DST_REG_SHIFT)