From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261203AbUKSBzW (ORCPT ); Thu, 18 Nov 2004 20:55:22 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261221AbUKSByH (ORCPT ); Thu, 18 Nov 2004 20:54:07 -0500 Received: from dns1.atmark-techno.com ([210.191.215.170]:40200 "EHLO dns1.atmark-techno.com") by vger.kernel.org with ESMTP id S261203AbUKSBsb (ORCPT ); Thu, 18 Nov 2004 20:48:31 -0500 Date: Fri, 19 Nov 2004 10:48:29 +0900 From: Yasushi SHOJI To: Linux Kernel list Subject: readl/writel: swap or not to swap (was: [PATCH] fbdev: Fix IO access in rivafb) In-Reply-To: <20041113122003.0CA8A3E90C@dns1.atmark-techno.com> References: <200411080521.iA85LbG6025914@hera.kernel.org> <1099893447.10262.154.camel@gaston> <200411081706.55261.adaplas@hotpop.com> <20041113122003.0CA8A3E90C@dns1.atmark-techno.com> User-Agent: User-Agent: Wanderlust/2.10.1 MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Message-Id: <20041119014829.DEE333E6F5@dns1.atmark-techno.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org At Sat, 13 Nov 2004 21:20:03 +0900, yashi wrote: [...] > > Why not just use __raw_readl/__raw_writel? > > > > That's what they exist for, and they still do any IO accesses correctly, > > which a direct store does not do (it would seriously break on older > > alphas, for example). > > sorry for a dumb question but should readl/writel on big endian system > swap like ppc does? I guess everyone is busy hacking. but can at least someone give me a hit? I'm worring about this issue because I'm about to use two deferent linux arch on same board. it's based on reconfigurable device so I can configure to have deferent cpu on it. if you are using two deferent arch of linux, it's natual to think you want to share all device drivers. but if one arch swap with readl and the other doesn't, I have to abstruct these low level access methods. (given that those to arch are same endian and connected with same bus and to the same devices) is there any rule we should follow? Is the ppc way the right direction to follow? I can ifdef anytime for my own use but I just want to know what _should_ be done. thanks, -- yashi