Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755434AbbFBIjB (ORCPT ); Tue, 2 Jun 2015 04:39:01 -0400 Received: from mail-ob0-f172.google.com ([209.85.214.172]:36022 "EHLO mail-ob0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752854AbbFBIit (ORCPT ); Tue, 2 Jun 2015 04:38:49 -0400 MIME-Version: 1.0 In-Reply-To: <1825055.kiMypDskUT@wuerfel> References: <20150530185425.32590.3190.stgit@dwillia2-desk3.amr.corp.intel.com> <20150530185923.32590.98598.stgit@dwillia2-desk3.amr.corp.intel.com> <1433198166.23540.128.camel@misato.fc.hp.com> <1825055.kiMypDskUT@wuerfel> Date: Tue, 2 Jun 2015 10:38:48 +0200 X-Google-Sender-Auth: yIZHcle4haO46z4d3Q5w_539iFM Message-ID: Subject: Re: [PATCH v2 1/4] arch/*/asm/io.h: add ioremap_cache() to all architectures From: Geert Uytterhoeven To: Arnd Bergmann Cc: Toshi Kani , Dan Williams , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Thomas Gleixner , ross.zwisler@linux.intel.com, Andrew Morton , jgross@suse.com, "the arch/x86 maintainers" , linux-nvdimm@ml01.01.org, "Luis R. Rodriguez" , Konrad Rzeszutek Wilk , "linux-kernel@vger.kernel.org" , stefan.bader@canonical.com, Andy Lutomirski , Linux MM , Henrique de Moraes Holschuh , Tejun Heo , Christoph Hellwig , David Howells Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1570 Lines: 44 On Tue, Jun 2, 2015 at 10:20 AM, Arnd Bergmann wrote: >> > --- a/arch/mn10300/include/asm/io.h >> > +++ b/arch/mn10300/include/asm/io.h >> > @@ -283,6 +283,7 @@ static inline void __iomem *ioremap_nocache(unsigned long offset, unsigned long >> > >> > #define ioremap_wc ioremap_nocache >> > #define ioremap_wt ioremap_nocache >> > +#define ioremap_cache ioremap_nocache >> >> From the comment in ioremap_nocache(), ioremap() may be cacheable in >> this arch. > > Right, and I guess that would be a bug. ;-) > > mn10300 decides caching on the address, so presumably all arguments passed into Aha, like MIPS... > ioremap here already have that bit set. I've checked all the resource > definitions for mn10300, and they are all between 0xA0000000 and 0xBFFFFFFF, > which is non-cacheable. But ioremap() clears that bit again: static inline void __iomem *ioremap(unsigned long offset, unsigned long size) { return (void __iomem *)(offset & ~0x20000000); } Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- 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/