Re: [PATCH 04/26] mips: remove ioremap_cachable
Hi Christoph, On Sat, Aug 17, 2019 at 09:32:31AM +0200, Christoph Hellwig wrote: > Just define ioremap_cache directly. > > Signed-off-by: Christoph Hellwig Acked-by: Paul Burton Thanks, Paul > --- > arch/mips/include/asm/io.h | 7 +++ > 1 file changed, 3 insertions(+), 4 deletions(-) > > diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h > index 97a280640daf..c02db986ddf5 100644 > --- a/arch/mips/include/asm/io.h > +++ b/arch/mips/include/asm/io.h > @@ -262,11 +262,11 @@ static inline void __iomem *ioremap_prot(phys_addr_t > offset, > #define ioremap_uc ioremap_nocache > > /* > - * ioremap_cachable -map bus memory into CPU space > + * ioremap_cache - map bus memory into CPU space > * @offset: bus address of the memory > * @size:size of the resource to map > * > - * ioremap_nocache performs a platform specific sequence of operations to > + * ioremap_cache performs a platform specific sequence of operations to > * make bus memory CPU accessible via the readb/readw/readl/writeb/ > * writew/writel functions and the other mmio helpers. The returned > * address is not guaranteed to be usable directly as a virtual > @@ -276,9 +276,8 @@ static inline void __iomem *ioremap_prot(phys_addr_t > offset, > * the CPU. Also enables full write-combining. Useful for some > * memory-like regions on I/O busses. > */ > -#define ioremap_cachable(offset, size) > \ > +#define ioremap_cache(offset, size) \ > __ioremap_mode((offset), (size), _page_cachable_default) > -#define ioremap_cache ioremap_cachable > > /* > * ioremap_wc - map bus memory into CPU space > -- > 2.20.1 > ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH 18/26] m68k: rename __iounmap and mark it static
Hi Christoph, On Sat, Aug 17, 2019 at 9:49 AM Christoph Hellwig wrote: > m68k uses __iounmap as the name for an internal helper that is only > used for some CPU types. Mark it static and give it a better name. > > Signed-off-by: Christoph Hellwig Thanks for your patch! > --- a/arch/m68k/mm/kmap.c > +++ b/arch/m68k/mm/kmap.c > @@ -52,6 +52,7 @@ static inline void free_io_area(void *addr) > > #define IO_SIZE(256*1024) > > +static void __free_io_area(void *addr, unsigned long size); > static struct vm_struct *iolist; > > static struct vm_struct *get_io_area(unsigned long size) > @@ -90,7 +91,7 @@ static inline void free_io_area(void *addr) > if (tmp->addr == addr) { > *p = tmp->next; > /* remove gap added in get_io_area() */ > - __iounmap(tmp->addr, tmp->size - IO_SIZE); > + __free_io_area(tmp->addr, tmp->size - IO_SIZE); > kfree(tmp); > return; > } > @@ -249,12 +250,13 @@ void iounmap(void __iomem *addr) > } > EXPORT_SYMBOL(iounmap); > > +#ifndef CPU_M68040_OR_M68060_ONLY Cant you move this block up, to avoid adding more #ifdef cluttery? The rest looks good to me. > /* > - * __iounmap unmaps nearly everything, so be careful > + * __free_io_area unmaps nearly everything, so be careful > * Currently it doesn't free pointer/page tables anymore but this > * wasn't used anyway and might be added later. > */ > -void __iounmap(void *addr, unsigned long size) > +static void __free_io_area(void *addr, unsigned long size) > { > unsigned long virtaddr = (unsigned long)addr; > pgd_t *pgd_dir; > @@ -297,6 +299,7 @@ void __iounmap(void *addr, unsigned long size) > > flush_tlb_all(); > } > +#endif /* CPU_M68040_OR_M68060_ONLY */ > > /* > * Set new cache mode for some kernel address space. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@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 ___ linux-snps-arc mailing list linux-snps-arc@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-snps-arc
Re: [PATCH 08/26] m68k: simplify ioremap_nocache
Hi Christoph, On Sat, Aug 17, 2019 at 9:48 AM Christoph Hellwig wrote: > Just define ioremap_nocache to ioremap instead of duplicating the > inline. Also defined ioremap_uc in terms of ioremap instead of > the using a double indirection. > > Signed-off-by: Christoph Hellwig Acked-by: Geert Uytterhoeven BTW, shouldn't we get rid of the sole user of ioremap_uc(), too? Seems to make a difference on x86 only, where it is "strongly uncached" (whatever that may mean ;-) Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@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
Re: [PATCH 19/26] arm64: remove __iounmap
On Sat, Aug 17, 2019 at 09:32:46AM +0200, Christoph Hellwig wrote: > No need to indirect iounmap for arm64. > > Signed-off-by: Christoph Hellwig > --- > arch/arm64/include/asm/io.h | 3 +-- > arch/arm64/mm/ioremap.c | 4 ++-- > 2 files changed, 3 insertions(+), 4 deletions(-) Not sure why we did it like this... Acked-by: Will Deacon Will