From: Victoria Milhoan Subject: RE: [BUG?] crypto: caam: little/big endianness on ARM vs PPC Date: Tue, 16 Jun 2015 16:00:05 +0000 Message-ID: References: <20150615155907.GC7947@pengutronix.de> <20150615220506.GA15134@gondor.apana.org.au> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Cc: Herbert Xu , Steffen Trumtrar , "linux-kernel@vger.kernel.org" , Ruchika Gupta , "linux-arm-kernel@lists.infradead.org" , "kernel@pengutronix.de" , Geanta Neag Horia , "linux-crypto@vger.kernel.org" To: Jon Nettleton Return-path: Received: from mail-bl2on0107.outbound.protection.outlook.com ([65.55.169.107]:27408 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753596AbbFPQAJ (ORCPT ); Tue, 16 Jun 2015 12:00:09 -0400 In-Reply-To: Content-Language: en-US Sender: linux-crypto-owner@vger.kernel.org List-ID: Sm9uLA0KDQpUaGUgcGF0Y2hlcyBwdWJsaXNoZWQgdG8gdGhlIG1haWxpbmcgbGlzdCB5ZXN0ZXJk YXkgZm9yIGNvbW1lbnQgKHRpdGxlZCBjcnlwdG86IGNhYW0gLSBBZGQgaS5NWDYgc3VwcG9ydCB0 byB0aGUgRnJlZXNjYWxlIENBQU0gZHJpdmVyKSBhcmUgYmFzZWQgb24gdGhlIHBhdGNoZXMgaW4g dGhlIEZyZWVzY2FsZSAzLjE0IGdpdCByZXBvc2l0b3J5IHdoaWNoIGVuYWJsZSBpLk1YNiBzdXBw b3J0LiBUaGUgaW5pdGlhbCBwYXRjaCBzZXQgaXMgaW50ZW5kZWQgdG8gcHJvdmlkZSBhIGZ1bmN0 aW9uYWwgZHJpdmVyLCBiYXNlZCBvbiB0aGUgbWFpbmxpbmUga2VybmVsLCB3aGljaCBzdXBwb3J0 cyBib3RoIFFvcklRIGFuZCBpLk1YNi4gDQoNClRoYW5rcywNClZpY3RvcmlhDQoNCi0tLS0tT3Jp Z2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