lkml.org 
[lkml]   [2015]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v11 6/12] x86, mm, asm-gen: Add ioremap_wt() for WT
From
On Sat, May 30, 2015 at 12:59 AM, Toshi Kani <toshi.kani@hp.com> wrote:
> --- a/include/asm-generic/io.h
> +++ b/include/asm-generic/io.h
> @@ -785,8 +785,17 @@ static inline void __iomem *ioremap_wc(phys_addr_t offset, size_t size)
> }
> #endif
>
> +#ifndef ioremap_wt
> +#define ioremap_wt ioremap_wt
> +static inline void __iomem *ioremap_wt(phys_addr_t offset, size_t size)
> +{
> + return ioremap_nocache(offset, size);
> +}
> +#endif
> +
> #ifndef iounmap
> #define iounmap iounmap
> +
> static inline void iounmap(void __iomem *addr)
> {
> }
> diff --git a/include/asm-generic/iomap.h b/include/asm-generic/iomap.h
> index 1b41011..d8f8622 100644
> --- a/include/asm-generic/iomap.h
> +++ b/include/asm-generic/iomap.h
> @@ -66,6 +66,10 @@ extern void ioport_unmap(void __iomem *);
> #define ioremap_wc ioremap_nocache
> #endif
>
> +#ifndef ARCH_HAS_IOREMAP_WT
> +#define ioremap_wt ioremap_nocache
> +#endif

Defining ioremap_wt in two different places in asm-generic looks fishy to me.

If <asm/io.h> already provides it (either through asm-generic/io.h or
arch/<arch>/include/asm/io.h), why does asm-generic/iomap.h need to define
its own version?

I see this pattern already exists for ioremap_wc...

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


\
 
 \ /
  Last update: 2015-05-30 12:01    [W:0.364 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site