asm-generic/io.h: remove asm/cacheflush.h include
authorJames Hogan <james.hogan@imgtec.com>
Tue, 23 Oct 2012 09:21:57 +0000 (10:21 +0100)
committerArnd Bergmann <arnd@arndb.de>
Thu, 25 Oct 2012 14:06:57 +0000 (16:06 +0200)
Including <asm/cacheflush.h> from <asm-generic/io.h> prevents
cacheflush.h being able to use I/O functions like readl and writel due
to circular include dependencies. It doesn't appear as if anything from
cacheflush.h is actually used by the generic io.h, so remove the
include.

I've compile tested a defconfig compilation of blackfin, openrisc (which
needed <asm/pgtable.h> including from it's <asm/io.h> to get the PAGE_*
definitions), and xtensa.

Other architectures which use asm-generic/io.h are score and unicore32,
and looking at their io.h I don't see any obvious problems.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Acked-by: Jonas Bonn <jonas@southpole.se>
Cc: Chris Zankel <chris@zankel.net>
Cc: Max Filippov <jcmvbkbc@gmail.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Chen Liqin <liqin.chen@sunplusct.com>
Cc: Lennox Wu <lennox.wu@gmail.com>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/openrisc/include/asm/io.h
include/asm-generic/io.h

index 07f5299d6c28814bb9b56e3b3af70c4770508c8f..7c691399da3f16c9b7eabe4d453a549ec611b8ee 100644 (file)
@@ -30,6 +30,7 @@
 #define PIO_MASK               0
 
 #include <asm-generic/io.h>
+#include <asm/pgtable.h>
 
 extern void __iomem *__ioremap(phys_addr_t offset, unsigned long size,
                                pgprot_t prot);
index 448303bdb85fd8009fdb6a6367fa9f2ed69b80ba..616eea53d633a02afc975c879b400f9fab76df1f 100644 (file)
@@ -12,7 +12,6 @@
 #define __ASM_GENERIC_IO_H
 
 #include <asm/page.h> /* I/O is all done through memory accesses */
-#include <asm/cacheflush.h>
 #include <linux/types.h>
 
 #ifdef CONFIG_GENERIC_IOMAP