From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751104AbXB0NUe (ORCPT ); Tue, 27 Feb 2007 08:20:34 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751281AbXB0NUe (ORCPT ); Tue, 27 Feb 2007 08:20:34 -0500 Received: from stout.engsoc.carleton.ca ([134.117.69.22]:60839 "EHLO stout.engsoc.carleton.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751104AbXB0NUd (ORCPT ); Tue, 27 Feb 2007 08:20:33 -0500 Date: Tue, 27 Feb 2007 08:20:21 -0500 From: Kyle McMartin To: Alexey Zaytsev Cc: Kyle McMartin , Linux Kernel Mailing List Subject: Re: ioread32 endianess. Message-ID: <20070227132021.GC3545@athena.road.mcmartin.ca> References: <20070226160450.GB3787@athena.road.mcmartin.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 27, 2007 at 03:31:20PM +0300, Alexey Zaytsev wrote: > Than how should one write a portable endian-independent driver? Should > I wrap ioread32 with an le32_to_cpu? > PCI is always little endian, unless it's not. In which case you're probably dealing with a graphics card which likely has some kind of palindromic register which you can read and write to set the endianness of the host interface. Whoo. Run on sentence.