Re: [PATCH 15/26] 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 15/26] asm-generic: ioremap_uc should behave the same with and without MMU
- From: Paul Walmsley <paul.walmsley@xxxxxxxxxx>
- Date: Sat, 17 Aug 2019 14:07:29 -0700 (PDT)
- Cc: Arnd Bergmann <arnd@xxxxxxxx>, Guo Ren <guoren@xxxxxxxxxx>, Michal Simek <monstr@xxxxxxxxx>, Greentime Hu <green.hu@xxxxxxxxx>, Vincent Chen <deanbo422@xxxxxxxxx>, Guan Xuetao <gxt@xxxxxxxxxx>, x86@xxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-parisc@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, linux-hexagon@xxxxxxxxxxxxxxx, linux-xtensa@xxxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-m68k@xxxxxxxxxxxxxxx, openrisc@xxxxxxxxxxxxxxxxxxxx, linux-mtd@xxxxxxxxxxxxxxxxxxx, linux-alpha@xxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, nios2-dev@xxxxxxxxxxxxxxxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx, linux-snps-arc@xxxxxxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
- In-reply-to: <20190817073253.27819-16-hch@lst.de>
- References: <20190817073253.27819-1-hch@lst.de> <20190817073253.27819-16-hch@lst.de>
- User-agent: Alpine 2.21.9999 (DEB 301 2018-08-15)
On Sat, 17 Aug 2019, Christoph Hellwig 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.
>
> 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.
>
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
[ ... ]
> diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
> index d02806513670..a98ed6325727 100644
> --- a/include/asm-generic/io.h
> +++ b/include/asm-generic/io.h
[ ... ]
> @@ -1004,6 +985,21 @@ static inline void __iomem *ioremap_wt(phys_addr_t offset, size_t size)
> }
> #endif
>
> +/*
> + * 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
^^^ not
> + * driver and use plain ioremap, which is uncached by default. Similarly
^ instead
> + * architectures should not implement it unless they have a very good
> + * reason.
> + */
Looks like this mess is only needed on x86 with certain graphics drivers
and conflicts between MTRR and page table-based MMU attributes.
Reviewed-by: Paul Walmsley <paul.walmsley@xxxxxxxxxx>
Tested-by: Paul Walmsley <paul.walmsley@xxxxxxxxxx> # rv32, rv64 boot
- Paul
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]