From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonas Bonn Subject: Re: [PATCH 1/2] asm-generic: add MMU variants of io.h functions Date: Sat, 02 Jul 2011 18:47:30 +0200 Message-ID: <1309625250.24186.1224.camel@localhost> References: <1309622006-28343-1-git-send-email-jonas@southpole.se> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: Received: from mail.southpole.se ([193.12.106.18]:41139 "EHLO mail.southpole.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752308Ab1GBQrk (ORCPT ); Sat, 2 Jul 2011 12:47:40 -0400 In-Reply-To: Sender: linux-arch-owner@vger.kernel.org List-ID: To: Mike Frysinger Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, liqin.chen@sunplusct.com, gxt@mprc.pku.edu.cn On Sat, 2011-07-02 at 12:38 -0400, Mike Frysinger wrote: > On Sat, Jul 2, 2011 at 11:53, Jonas Bonn wrote: > > Some of the implementations, in particular the ioremap variants, in > > asm-generic/io.h are for systems with an MMU. > > do you mean "without an MMU" ? Yes, of course... that's supposed to be _without_ an MMU. > > > +#ifdef CONFIG_MMU > > +#define xlate_dev_mem_ptr(p) __va(p) > > +#else > > #define xlate_dev_mem_ptr(p) ((void *) (p)) > > +#endif > > i wonder if we could do: > #ifndef __va > #define __va(p) ((void *)(p)) > #endif > #define xlate_dev_mem_ptr(p) __va(p) > -mike This seems to introduce an artificial definition of a "virtual" address for systems without an MMU, which strikes me as a bit odd. If this is what people prefer, that's fine... I think I prefer the former variant, though. /Jonas