From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965348AbcAZLbY (ORCPT ); Tue, 26 Jan 2016 06:31:24 -0500 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:47067 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752924AbcAZLbT (ORCPT ); Tue, 26 Jan 2016 06:31:19 -0500 Date: Tue, 26 Jan 2016 11:31:03 +0000 From: Mark Brown To: Arnd Bergmann Cc: Johannes Berg , Simon Arlott , linux-kernel@vger.kernel.org Message-ID: <20160126113103.GA6588@sirena.org.uk> Mail-Followup-To: Arnd Bergmann , Johannes Berg , Simon Arlott , linux-kernel@vger.kernel.org References: <1453759675-28461-1-git-send-email-johannes@sipsolutions.net> <20160125235254.GZ6588@sirena.org.uk> <1453796736.2759.2.camel@sipsolutions.net> <6962431.EnoXCqILtZ@wuerfel> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qeb4w1GYuZGoePro" Content-Disposition: inline In-Reply-To: <6962431.EnoXCqILtZ@wuerfel> X-Cookie: APL hackers do it in the quad. User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: 2a01:348:6:8808:fab::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH] Revert "regmap-mmio: Use native endianness for read/write" X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --qeb4w1GYuZGoePro Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jan 26, 2016 at 10:09:35AM +0100, Arnd Bergmann wrote: > * On 32-bit architectures, you generally cannot do 64-bit atomic I/O > operations, and we have two implementations that do it nonatomically, > depending on how a device is wired to the bus, see > include/linux/io-64-nonatomic-{hi-lo,lo-hi}.h. > I think we should just not go there for regmap unless we absolutely > have to. That's fine, we don't support 64 bit MMIO regmaps on 32 bit systems anyway (they're ifdefed out and will generate an error if you try to use them). If someone wants that functionality they can sort it out. > However, we have some freedom at the regmap-mmio level, which we can > sanitize in 4.6 if we want to make it more consistent with the rest > of regmap. We have around 50 callers of {devm_,}regmap_init_mmio() > and almost all of them do not specify endianess but expect little-endian > behavior. We can change all existing instances to set REGMAP_ENDIAN_NATIVE > explicitly and change regmap_init_mmio() to return an error if the > caller does not specify a particular endianess (big, little, native). As far as I can tell almost all the users actually want little endian (everyone except these MIPS users) so if we're going to go through and change all the users we should be going for that. Given that things just won't work if they have the wrong endianness I'm reasonably comfortable with keeping a default in the core - so long as the core is explicit about what it's doing so unlikely to get confused I think we are reasonably safe. > This is a tradeoff between interface simplicity (defaulting to LE is > convenient for most people) and consistency (all other regmap interfaces > default to native if I understood Mark right). All other regmaps default to either native or big endian (native for things with explicit read and write operations, big for byte stream buses). --qeb4w1GYuZGoePro Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWp1j3AAoJECTWi3JdVIfQLhwH/jfJ9RX8i5lR/OJBNR1HtJlP N1d75Akib5ufDSEXiSp0Qcx0Mc9O7wrdEFjGpVnYfotKoUbDnRQ5wKlBKTNjI9Tg 2yPGN5v8eYpMCkFdJNPZn1mtV+pbRO532S+szuMVGWjU6VokiVVHu8rwkuxjBd9/ /iCLNAetD8ySMlLTj1ATubomOZL7ZVYzV9QDO57lCMXSx0bGl3QwODrKEqaPW1Fj v3WCh8vAjqhWEM7ptdrz4X+WiL2vXwwWWI4KYfAb1bUO+4wbRhlz90Z9vRgMeII1 UUkZnvZ3r3bSso4o8Z17ybAmoi3GphfhOzgFYsD3M5U55kF6TqRtmta5BewoLjk= =ZIJe -----END PGP SIGNATURE----- --qeb4w1GYuZGoePro--