[Intel-gfx] [drm-intel:for-linux-next 1/1] include/linux/io-mapping.h:126:2: error: implicit declaration of function 'pgprot_writecombine'
Chris Wilson
chris at chris-wilson.co.uk
Tue Aug 23 19:16:25 UTC 2016
On Wed, Aug 24, 2016 at 02:22:29AM +0800, kbuild test robot wrote:
> tree: git://anongit.freedesktop.org/drm-intel for-linux-next
> head: ac96b5566926af83463ddcf4655856033c092f26
> commit: ac96b5566926af83463ddcf4655856033c092f26 [1/1] io-mapping.h: s/PAGE_KERNEL_IO/PAGE_KERNEL/
> config: microblaze-nommu_defconfig (attached as .config)
> compiler: microblaze-linux-gcc (GCC) 4.9.0
> reproduce:
> wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> git checkout ac96b5566926af83463ddcf4655856033c092f26
> # save the attached .config to linux build tree
> make.cross ARCH=microblaze
>
> All errors (new ones prefixed by >>):
>
> In file included from drivers/gpio/gpiolib-of.c:19:0:
> include/linux/io-mapping.h: In function 'io_mapping_init_wc':
> >> include/linux/io-mapping.h:126:2: error: implicit declaration of function 'pgprot_writecombine' [-Werror=implicit-function-declaration]
> iomap->prot = pgprot_writecombine(PAGE_KERNEL);
> ^
> >> include/linux/io-mapping.h:126:14: error: incompatible types when assigning to type 'pgprot_t' from type 'int'
> iomap->prot = pgprot_writecombine(PAGE_KERNEL);
> ^
> cc1: some warnings being treated as errors
>
> vim +/pgprot_writecombine +126 include/linux/io-mapping.h
Grrr.
diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h
index a87dd7fffc0a..babd4c53a5aa 100644
--- a/include/linux/io-mapping.h
+++ b/include/linux/io-mapping.h
@@ -114,6 +114,10 @@ io_mapping_unmap(void __iomem *vaddr)
#include <linux/uaccess.h>
#include <asm/pgtable.h>
+#ifdef pgprot_noncached_wc
+#define pgprot_writecombine pgprot_noncached_wc
+#endif
+
/* Create the io_mapping object*/
static inline struct io_mapping *
io_mapping_init_wc(struct io_mapping *iomap,
is what I have in mind. Looks like a divide between x86 and ppc (and
their followers).
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list