From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754271AbcEPPte (ORCPT ); Mon, 16 May 2016 11:49:34 -0400 Received: from mail-am1on0100.outbound.protection.outlook.com ([157.56.112.100]:36480 "EHLO emea01-am1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753892AbcEPPtc convert rfc822-to-8bit (ORCPT ); Mon, 16 May 2016 11:49:32 -0400 From: Horia Ioan Geanta Neag To: Herbert Xu , Arnd Bergmann , Catalin Marinas , Will Deacon , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Rob Herring , Olof Johansson CC: "linux-crypto@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "David S. Miller" , Cristian Stoica , Scott Wood , Alexandru Porosanu , Tudor-Dan Ambarus Subject: Re: [PATCH v2 0/8] crypto: caam - add support for LS1043A SoC Thread-Topic: [PATCH v2 0/8] crypto: caam - add support for LS1043A SoC Thread-Index: AQHRpuOZ6KQz2YwyQkiN9MFa6BDHJA== Date: Mon, 16 May 2016 15:49:27 +0000 Message-ID: References: <1462462435-27403-1-git-send-email-horia.geanta@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: gondor.apana.org.au; dkim=none (message not signed) header.d=none;gondor.apana.org.au; dmarc=none action=none header.from=nxp.com; x-originating-ip: [192.88.146.1] x-ms-office365-filtering-correlation-id: edcebcc9-0bd1-4ae1-a7c4-08d37da1a9c4 x-microsoft-exchange-diagnostics: 1;AM2PR04MB0673;5:GVT+vJcFOwrTj+xDVwZAR9jEuIuLWfPj6jqCc06xhSQhRf6ubPrk5ZNBF5QAlqWqVCp1KlwPd7SVLkNSlrU2YFhZhN1/YisSVhzcddT6QuFvNqVm/c08V/gS4MUMNrSVNTbtyGPU8TioOUor9K9unw==;24:CPgs7lnGQmD8WbSkTXjSK+uLbiikCifVu/Aqg2rY8HYURkXk9dA3rtS/1nWggL4mEgI/DdMlMeFBajG62kYBDeEz277Wu91I4+ZRnCBZJmI=;7:iku57QVpHF19LmT4y43LyIBkOq+IX8oWjnwBqaDaLurM16KAWWFWhUPl4Kpd9/x4wBNUrEktJisKa8uj0IbwCBJpF4hYLpgTz5vRUc8fZ96lcVv8uZZQhmMD4aGgmr1I0UQEbuWWOQUAnot6GgoRjmRNehy86p5ND9fEPoW0TiU9DDNOXAGkoNq+KmJ8xe+9 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM2PR04MB0673; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026);SRVR:AM2PR04MB0673;BCL:0;PCL:0;RULEID:;SRVR:AM2PR04MB0673; x-forefront-prvs: 09443CAA7E x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(377454003)(24454002)(122556002)(5003600100002)(92566002)(8676002)(81166006)(5008740100001)(66066001)(76576001)(189998001)(9686002)(2906002)(74316001)(3846002)(6116002)(102836003)(4326007)(586003)(3280700002)(106116001)(8936002)(3660700001)(5002640100001)(1220700001)(33656002)(5001770100001)(86362001)(77096005)(76176999)(50986999)(15975445007)(10400500002)(54356999)(87936001)(19580405001)(19580395003)(2900100001)(5004730100002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM2PR04MB0673;H:AM2PR04MB0673.eurprd04.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 16 May 2016 15:49:27.9253 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0673 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/5/2016 6:34 PM, Horia Geantã wrote: > v2: > As suggested by Arnd, patch 1 fixes io{read,write}{16,32}be accessors > to prevent the case when {read,write}{w,l} are overriden by arch-specific > ones having barriers, while the BE accessors previously mentioned are not > (thus behaving differently, having no barriers). > > Hi, > > [Patches 2-4 add io{read,write}64[be] accessors (generic, arm64, ppc64), > such that CAAM's accessors in regs.h are simplified a bit. > Patch 8 adds crypto node for LS1043A platform. > Let me know if it's ok to go with these through the cryptodev-2.6 tree.] > Herbert, Could you apply the patch set, but without patch 8/8 I guess - since DT maintainers haven't ack-ed it? I assume it's too late for 4.7, however applying the patches would solve dependencies b/w on-going caam development. Thanks, Horia > This is a follow-up on the following RFC patch set: > crypto: caam - Revamp I/O accessors > https://www.mail-archive.com/linux-crypto@vger.kernel.org/msg15878.html > > There are platforms such as LS1043A (or LS1012A) where core endianness > does not match CAAM/SEC endianness (LE vs. BE). > Add support in caam driver for these cases. > > Current patch set detects device endianness at runtime (as opposed to > compile-time endianness), in order to support multiplatform kernels. > Detection of device endianness is not device-tree based. > Instead, SSTA ("SEC STAtus") register has a property such that > reading it in any endianness and masking it properly, it's possible > to deduce device endianness. > > The performance drop due to the runtime detection is < 1.0%. > (An alternative implementation using function pointers has been tried, > but lead to a bigger performance drop.) > > Thanks, > Horia > > Cristian Stoica (1): > crypto: caam - fix offset field in hw sg entries > > Horia Geantã (7): > asm-generic/io.h: allow barriers in io{read,write}{16,32}be > asm-generic/io.h: add io{read,write}64 accessors > arm64: add io{read,write}64be accessors > powerpc: add io{read,write}64 accessors > crypto: caam - handle core endianness != caam endianness > crypto: caam - add ARCH_LAYERSCAPE to supported architectures > arm64: dts: ls1043a: add crypto node > > arch/arm64/boot/dts/freescale/fsl-ls1043a-rdb.dts | 4 + > arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 43 ++++++ > arch/arm64/include/asm/io.h | 4 +- > arch/powerpc/kernel/iomap.c | 24 ++++ > drivers/crypto/caam/Kconfig | 6 +- > drivers/crypto/caam/caamhash.c | 5 +- > drivers/crypto/caam/ctrl.c | 125 +++++++++++------- > drivers/crypto/caam/desc.h | 9 +- > drivers/crypto/caam/desc_constr.h | 44 ++++--- > drivers/crypto/caam/jr.c | 22 ++-- > drivers/crypto/caam/pdb.h | 137 +++++++++++++++----- > drivers/crypto/caam/regs.h | 151 +++++++++++++++------- > drivers/crypto/caam/sg_sw_sec4.h | 17 +-- > include/asm-generic/io.h | 71 +++++++++- > include/asm-generic/iomap.h | 8 ++ > 15 files changed, 494 insertions(+), 176 deletions(-) >