PAGE_KERNEL_IO is an x86-ism. Though it is used to define the pgprot_t
used for the iomapped region, it itself is just PAGE_KERNEL. On all
other arches, PAGE_KERNEL_IO is undefined so in a general header we must
refrain from using it.

Reported-by: Stephen Rothwell <s...@canb.auug.org.au>
Fixes: cafaf14a5d8f ("io-mapping: Always create a struct to hold metadata about 
the io-mapping")
Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vet...@ffwll.ch>
Cc: Joonas Lahtinen <joonas.lahti...@linux.intel.com>
Cc: linux...@kvack.org
---
 include/linux/io-mapping.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h
index b4c4b5c4216d..ab690801eb59 100644
--- a/include/linux/io-mapping.h
+++ b/include/linux/io-mapping.h
@@ -112,7 +112,6 @@ io_mapping_unmap(void __iomem *vaddr)
 #else
 
 #include <linux/uaccess.h>
-#include <asm/pgtable_types.h>
 
 /* Create the io_mapping object*/
 static inline struct io_mapping *
@@ -123,7 +122,7 @@ io_mapping_init_wc(struct io_mapping *iomap,
        iomap->base = base;
        iomap->size = size;
        iomap->iomem = ioremap_wc(base, size);
-       iomap->prot = pgprot_writecombine(PAGE_KERNEL_IO);
+       iomap->prot = pgprot_writecombine(PAGE_KERNEL);
 
        return iomap;
 }
-- 
2.9.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to