Re: [PATCH 10/21] asm-generic: ioremap_uc should behave the same with and without MMU
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Christoph Hellwig <hch@xxxxxx>
- Subject: Re: [PATCH 10/21] asm-generic: ioremap_uc should behave the same with and without MMU
- From: Arnd Bergmann <arnd@xxxxxxxx>
- Date: Mon, 11 Nov 2019 11:09:05 +0100
- Cc: Guo Ren <guoren@xxxxxxxxxx>, Michal Simek <monstr@xxxxxxxxx>, Greentime Hu <green.hu@xxxxxxxxx>, Vincent Chen <deanbo422@xxxxxxxxx>, Guan Xuetao <gxt@xxxxxxxxxx>, "the arch/x86 maintainers" <x86@xxxxxxxxxx>, alpha <linux-alpha@xxxxxxxxxxxxxxx>, "open list:SYNOPSYS ARC ARCHITECTURE" <linux-snps-arc@xxxxxxxxxxxxxxxxxxx>, Linux ARM <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, "open list:QUALCOMM HEXAGON..." <linux-hexagon@xxxxxxxxxxxxxxx>, linux-ia64@xxxxxxxxxxxxxxx, linux-m68k <linux-m68k@xxxxxxxxxxxxxxx>, linux-mips@xxxxxxxxxxxxxxx, "moderated list:NIOS2 ARCHITECTURE" <nios2-dev@xxxxxxxxxxxxxxxxxxxxxx>, openrisc@xxxxxxxxxxxxxxxxxxxx, Parisc List <linux-parisc@xxxxxxxxxxxxxxx>, linux-riscv@xxxxxxxxxxxxxxxxxxx, linux-s390 <linux-s390@xxxxxxxxxxxxxxx>, Linux-sh list <linux-sh@xxxxxxxxxxxxxxx>, sparclinux <sparclinux@xxxxxxxxxxxxxxx>, linux-xtensa@xxxxxxxxxxxxxxxx, linux-mtd <linux-mtd@xxxxxxxxxxxxxxxxxxx>, linux-arch <linux-arch@xxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>
- In-reply-to: <20191029064834.23438-11-hch@lst.de>
- References: <20191029064834.23438-1-hch@lst.de> <20191029064834.23438-11-hch@lst.de>
On Tue, Oct 29, 2019 at 7:49 AM Christoph Hellwig <hch@xxxxxx> wrote:
>
> Whatever reason there is for the existence of ioremap_uc, and the fact
> that it returns NULL by default on architectures with an MMU applies
> equally to nommu architectures, so don't provide different defaults.
Makes sense.
> In practice the difference is meaningless as the only portable driver
> that uses ioremap_uc is atyfb which probably doesn't show up on nommu
> devices.
> +/*
> + * ioremap_uc is special in that we do require an explicit architecture
> + * implementation. In general you do now want to use this function in a
> + * driver and use plain ioremap, which is uncached by default. Similarly
> + * architectures should not implement it unless they have a very good
> + * reason.
> + */
> +#ifndef ioremap_uc
> +#define ioremap_uc ioremap_uc
> +static inline void __iomem *ioremap_uc(phys_addr_t offset, size_t size)
> +{
> + return NULL;
> +}
> +#endif
Maybe we could move the definition into the atyfb driver itself?
As I understand it, the difference between ioremap()/ioremap_nocache()
and ioremap_uc() only exists on pre-PAT x86-32 systems (i.e. 486, P5,
Ppro, PII, K6, VIA C3), while on more modern systems (all non-x86,
PentiumIII, Athlon, VIA C7) those three are meant to be synonyms
anyway.
Arnd
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]