Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

asm-generic/io.h: remove asm/cacheflush.h include

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>

authored by

James Hogan and committed by
Arnd Bergmann
9b04ebd1 6f0c0580

+1 -1
+1
arch/openrisc/include/asm/io.h
··· 30 30 #define PIO_MASK 0 31 31 32 32 #include <asm-generic/io.h> 33 + #include <asm/pgtable.h> 33 34 34 35 extern void __iomem *__ioremap(phys_addr_t offset, unsigned long size, 35 36 pgprot_t prot);
-1
include/asm-generic/io.h
··· 12 12 #define __ASM_GENERIC_IO_H 13 13 14 14 #include <asm/page.h> /* I/O is all done through memory accesses */ 15 - #include <asm/cacheflush.h> 16 15 #include <linux/types.h> 17 16 18 17 #ifdef CONFIG_GENERIC_IOMAP