Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S268025AbUIUTmH (ORCPT ); Tue, 21 Sep 2004 15:42:07 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S268026AbUIUTmG (ORCPT ); Tue, 21 Sep 2004 15:42:06 -0400 Received: from fw.osdl.org ([65.172.181.6]:27371 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S268025AbUIUTmD (ORCPT ); Tue, 21 Sep 2004 15:42:03 -0400 Date: Tue, 21 Sep 2004 12:41:56 -0700 (PDT) From: Linus Torvalds To: Roland Dreier cc: Benjamin Herrenschmidt , Alan Cox , Andrew Morton , Linux Kernel Mailing List , Petr Vandrovec Subject: Re: [PATCH] ppc64: Fix __raw_* IO accessors In-Reply-To: <523c1bpghm.fsf@topspin.com> Message-ID: References: <1095758630.3332.133.camel@gaston> <1095761113.30931.13.camel@localhost.localdomain> <1095766919.3577.138.camel@gaston> <523c1bpghm.fsf@topspin.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1278 Lines: 37 On Tue, 21 Sep 2004, Roland Dreier wrote: > > Is it possible to use __raw_*() in portable code? I have some places > in my code where non-byte-swap IO functions would be useful, but on > ppc64, __raw_*() doesn't know about EEH. I don't think normal readb/writeb should know about EEH either. If you want error handling, there's a separate interface being worked on, so that normal accesses don't have to pay the cost.. > Clearly I don't want to > teach portable code about IO_TOKEN_TO_ADDR etc. so it seems I'm out of > luck. I end up doing the fairly insane: > > writel(swab32(val), addr); Ok, so that _is_ insane. Mind telling what kind of insane hardware is BE in this day and age? That said, I think > instead of what I really mean, which is: > > __raw_writel(cpu_to_be32(val), addr); should work, and if you start using it, and the driver is relevant, I'm sure other architectures will implement the __raw_ interfaces too. In the meantime, please just make it conditional on the proper architectures. Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/