[Intel-gfx] [PATCH] io-mapping: Fixup for different names of writecombine
Joonas Lahtinen
joonas.lahtinen at linux.intel.com
Wed Aug 24 06:54:45 UTC 2016
On ti, 2016-08-23 at 22:22 +0200, Daniel Vetter wrote:
> Somehow architectures can't agree on this. And for good measure make
> sure we have a fallback which should work everywhere (fingers
> crossed).
>
> This is to fix a compile fail on microblaze in gpiolib-of.c, which
> misguidedly includes io-mapping.h (instead of screaming at whichever
> achitecture doesn't correctly pull in asm/io.h from linux/io.h).
>
> Not tested since there's no reasonable way to get at microblaze
> toolchains :(
>
> Fixes: ac96b5566926 ("io-mapping.h: s/PAGE_KERNEL_IO/PAGE_KERNEL/")
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Cc: linux-mm at kvack.org
> Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> ---
> include/linux/io-mapping.h | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h
> index a87dd7fffc0a..f4e33756c09c 100644
> --- a/include/linux/io-mapping.h
> +++ b/include/linux/io-mapping.h
> @@ -123,7 +123,13 @@ io_mapping_init_wc(struct io_mapping *iomap,
> iomap->base = base;
> iomap->size = size;
> iomap->iomem = ioremap_wc(base, size);
> +#ifdef pgprot_noncached_wc /* archs can't agree on a name ... */
> + iomap->prot = pgprot_noncached_wc(PAGE_KERNEL);
> +#elif pgprot_writecombine
Maybe you meant #elif defined pgprot_writecombine?
Regards, Joonas
> iomap->prot = pgprot_writecombine(PAGE_KERNEL);
> +#else
> + iomap->prot = pgprot_noncached(PAGE_KERNEL);
> +#endif
>
> return iomap;
> }
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
More information about the Intel-gfx
mailing list