* [PATCH] io-mapping: Fixup for different names of writecombine
@ 2016-08-23 20:22 Daniel Vetter
2016-08-24 6:06 ` Chris Wilson
2016-08-24 6:54 ` Joonas Lahtinen
0 siblings, 2 replies; 4+ messages in thread
From: Daniel Vetter @ 2016-08-23 20:22 UTC (permalink / raw)
To: Intel Graphics Development
Cc: Daniel Vetter, Chris Wilson, Joonas Lahtinen, linux-mm, Daniel Vetter
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@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: linux-mm@kvack.org
Signed-off-by: Daniel Vetter <daniel.vetter@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
iomap->prot = pgprot_writecombine(PAGE_KERNEL);
+#else
+ iomap->prot = pgprot_noncached(PAGE_KERNEL);
+#endif
return iomap;
}
--
2.9.3
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] io-mapping: Fixup for different names of writecombine
2016-08-23 20:22 [PATCH] io-mapping: Fixup for different names of writecombine Daniel Vetter
@ 2016-08-24 6:06 ` Chris Wilson
2016-08-24 6:54 ` Joonas Lahtinen
1 sibling, 0 replies; 4+ messages in thread
From: Chris Wilson @ 2016-08-24 6:06 UTC (permalink / raw)
To: Daniel Vetter
Cc: Intel Graphics Development, Joonas Lahtinen, linux-mm, Daniel Vetter
On Tue, Aug 23, 2016 at 10:22:33PM +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@chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: linux-mm@kvack.org
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
As mentioned I'm looking at reducing the number of unused includes of
io-mapping.h, discussion in progress over at gpio/mlx4.
On the positive side, this does at least mean the WC pgprot mess is
hidden away in the header!
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] io-mapping: Fixup for different names of writecombine
2016-08-23 20:22 [PATCH] io-mapping: Fixup for different names of writecombine Daniel Vetter
@ 2016-08-24 6:54 ` Joonas Lahtinen
2016-08-24 6:54 ` Joonas Lahtinen
1 sibling, 0 replies; 4+ messages in thread
From: Joonas Lahtinen @ 2016-08-24 6:54 UTC (permalink / raw)
To: Daniel Vetter, Intel Graphics Development
Cc: Chris Wilson, linux-mm, Daniel Vetter
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@chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: linux-mm@kvack.org
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
> A include/linux/io-mapping.h | 6 ++++++
> A 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,
> A iomap->base = base;
> A iomap->size = size;
> A 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
> A iomap->prot = pgprot_writecombine(PAGE_KERNEL);
> +#else
> + iomap->prot = pgprot_noncached(PAGE_KERNEL);
> +#endif
> A
> A return iomap;
> A }
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] io-mapping: Fixup for different names of writecombine
@ 2016-08-24 6:54 ` Joonas Lahtinen
0 siblings, 0 replies; 4+ messages in thread
From: Joonas Lahtinen @ 2016-08-24 6:54 UTC (permalink / raw)
To: Daniel Vetter, Intel Graphics Development
Cc: Chris Wilson, linux-mm, Daniel Vetter
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@chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: linux-mm@kvack.org
> Signed-off-by: Daniel Vetter <daniel.vetter@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
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-08-24 6:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-23 20:22 [PATCH] io-mapping: Fixup for different names of writecombine Daniel Vetter
2016-08-24 6:06 ` Chris Wilson
2016-08-24 6:54 ` Joonas Lahtinen
2016-08-24 6:54 ` Joonas Lahtinen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.