From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934470AbcAZNIN (ORCPT ); Tue, 26 Jan 2016 08:08:13 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:61056 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934009AbcAZNIL (ORCPT ); Tue, 26 Jan 2016 08:08:11 -0500 From: Arnd Bergmann To: Johannes Berg Cc: Mark Brown , Simon Arlott , linux-kernel@vger.kernel.org Subject: Re: [PATCH] Revert "regmap-mmio: Use native endianness for read/write" Date: Tue, 26 Jan 2016 14:07:58 +0100 Message-ID: <1892074.6qgPEBOL6R@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1453800262.2759.9.camel@sipsolutions.net> References: <1453759675-28461-1-git-send-email-johannes@sipsolutions.net> <6962431.EnoXCqILtZ@wuerfel> <1453800262.2759.9.camel@sipsolutions.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:WsAdBkEQ6u4MbJsy/pMDblglX/1VZt0i4bO3o9Om5+szFQUliBY rzVrwk4YHDF93YebEnDCFndVwRIGJ0NUm7xHbQ/A1pdIMiYWLAgYdhjwzKHSQxpVqXyzYL+ C1VBOXhMby/cchNiTFksrTmKYB/tiMbvhrQ7HPDqC5IQvmT3kr+xPw1jnL85fNBPrcZXGof YeZ0ssffX2O/S07PABaTA== X-UI-Out-Filterresults: notjunk:1;V01:K0:7qm3Avtya8I=:qtXR/+SpVlLc2EX4u/qWYV XZqwJd7UmzW/jVyw0rQWTLR+zDbXDXq4ETXxdzhIcRhzFGp1UTODyTz1ULBOn2qd3oL8caAkw jU/Vkg3gu5SG/Ngp6K9XSWJddXnsNOL1OWpouLSpPBaPycuBAZQpt//ef6lJisGqpO6ByiFWo D9EEVb+BDqxYfACU0ATFJdaeR/7VdhMFMAPva1SsdPPf+s78OTmyr3bSZ2i/RLqAaV0p6BCBc HtprauURXr4PYTU2aDCZBrkcdEs+d9SHk5+alBo7qsIQz3KoJ7dZMZySvGKEitX6HLAYD4gK9 EJdPecNdm8FoV/wj0kAdkS/1KhUZ1n9CeAY8eg8eWtFJMbRL2X7yFwASKkHEgoORrFtk/T6Z9 +pIrE3pOC3KztuKAB3A8ElNdf1RYFPj1K8n5rZxwncGsYt2SP13k+4DpcZSsNnCAO4X3ypnDA ICbEfalUu7Xo8LMja3S4L6TkI1liTOpRHVRVXBD0sK8N1RLa/Ww8RxHurSN3WtZusq7Yl6ios uElCRM2Qfgwygn8JE/oywPhc1y0Y5/H1mZbqv+H5UNt0tS6dCDFsVQErUe3w05vr4qrVvnyUN kHcqGQp2h2qNzJrQFI9OVGNL8U8l+AVslGX/ukcs1rIxXWuSWwOSXrrM1lLdtwrSDuFfGVKkX kAMrCxpap+rnRMx5TIdGiajFZps3iYHOh9qANCkMbwbh5WxM+yoVWG7VFKIpLviorKZxAk+/l kNRVAGd/XttnEeXG Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tuesday 26 January 2016 10:24:22 Johannes Berg wrote: > On Tue, 2016-01-26 at 10:09 +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. > > regmap-mmio doesn't define the 8-bit accesses for 32-bit platforms, so > this is a non-issue, I think. Ok, good. > > There is still one open question about the defaults: I think we all > > agree that there is no way we can change the default for > > compatible="syscon" devices on ARM to from little-endian to cpu- > > endian, as that would break everything. Annotating the MIPS dts files > > as "cpu-endian" and leaving the rest to default to "little" is > > probably best here. > > Since regmap-mmio in practice was always little endian, we should > definitely make that consistent and explicit. Annotating those that > need special CPU-endian handling (MIPS with the byteswap engine) would > be best, I agree. > > Note that I made a mistake here yesterday - the *reg* for MMIO is still > NATIVE, while the *value* is LITTLE_ENDIAN. Looks like regmap-core can > byteswap both, which makes sense for I2C and similar busses. I see, that's something I completely missed, and it's logical that the reg number must be native endian for MMIO but not for everything. Arnd