Discussion:
[ORLinux] [PATCH] asm-generic/io.h: remove asm/cacheflush.h include
James Hogan
2012-10-23 09:21:57 UTC
Permalink
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 at imgtec.com>
Cc: Arnd Bergmann <arnd at arndb.de>
Cc: Jonas Bonn <jonas at southpole.se>
Cc: Chris Zankel <chris at zankel.net>
Cc: Max Filippov <jcmvbkbc at gmail.com>
Cc: Mike Frysinger <vapier at gentoo.org>
Cc: Chen Liqin <liqin.chen at sunplusct.com>
Cc: Lennox Wu <lennox.wu at gmail.com>
Cc: Guan Xuetao <gxt at mprc.pku.edu.cn>
---
Any compile testing of score and unicore32 anybody could provide would
be great.

arch/openrisc/include/asm/io.h | 1 +
include/asm-generic/io.h | 1 -
2 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/openrisc/include/asm/io.h b/arch/openrisc/include/asm/io.h
index 07f5299..7c69139 100644
--- a/arch/openrisc/include/asm/io.h
+++ b/arch/openrisc/include/asm/io.h
@@ -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);
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
index 448303b..616eea5 100644
--- a/include/asm-generic/io.h
+++ b/include/asm-generic/io.h
@@ -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
--
1.7.7.6
Jonas Bonn
2012-10-25 13:40:16 UTC
Permalink
Post by James Hogan
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.
Acked-by: Jonas Bonn <jonas at southpole.se> for OpenRISC

Who's tree should this go via. I can take it via the openrisc tree, but
it would be good to get some Ack's that this isn't going to break things
for the other arch's (in particular score and unicore32, since they are
untested).

/Jonas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.openrisc.net/pipermail/linux/attachments/20121025/717a71ae/attachment.pgp>
Arnd Bergmann
2012-10-25 14:07:26 UTC
Permalink
Post by Jonas Bonn
Post by James Hogan
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.
Acked-by: Jonas Bonn <jonas at southpole.se> for OpenRISC
Who's tree should this go via. I can take it via the openrisc tree, but
it would be good to get some Ack's that this isn't going to break things
for the other arch's (in particular score and unicore32, since they are
untested).
I've put it into the asm-generic tree, now that I have set it up again
for the 3.7 merge window.

Arnd
James Hogan
2012-10-25 14:07:27 UTC
Permalink
Post by Jonas Bonn
Post by James Hogan
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.
Acked-by: Jonas Bonn <jonas at southpole.se> for OpenRISC
Thanks Jonas
Post by Jonas Bonn
Who's tree should this go via. I can take it via the openrisc
tree, but it would be good to get some Ack's that this isn't going
to break things for the other arch's (in particular score and
unicore32, since they are untested).
Yeh I'd like some acks from score and unicore32 if possible, since I
didn't notice I needed the openrisc bit until I tried compiling it.

Cheers
James
Arnd Bergmann
2012-10-25 14:10:23 UTC
Permalink
Post by James Hogan
Post by Jonas Bonn
Who's tree should this go via. I can take it via the openrisc
tree, but it would be good to get some Ack's that this isn't going
to break things for the other arch's (in particular score and
unicore32, since they are untested).
Yeh I'd like some acks from score and unicore32 if possible, since I
didn't notice I needed the openrisc bit until I tried compiling it.
I'm not worried about score, because there have been no updates at
all for the entire last year, and I doubt anyone is using that any
more. I agree that having an Ack from Guan Xuetao would be good.

The patch will also show up in linux-next now, and I can update
it if necessary.

Arnd
Max Filippov
2012-10-25 21:19:47 UTC
Permalink
Post by James Hogan
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.
Acked-by: Max Filippov <jcmvbkbc at gmail.com> for xtensa part.
Post by James Hogan
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 at imgtec.com>
Cc: Arnd Bergmann <arnd at arndb.de>
Cc: Jonas Bonn <jonas at southpole.se>
Cc: Chris Zankel <chris at zankel.net>
Cc: Max Filippov <jcmvbkbc at gmail.com>
Cc: Mike Frysinger <vapier at gentoo.org>
Cc: Chen Liqin <liqin.chen at sunplusct.com>
Cc: Lennox Wu <lennox.wu at gmail.com>
Cc: Guan Xuetao <gxt at mprc.pku.edu.cn>
---
Any compile testing of score and unicore32 anybody could provide would
be great.
arch/openrisc/include/asm/io.h | 1 +
include/asm-generic/io.h | 1 -
2 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/openrisc/include/asm/io.h b/arch/openrisc/include/asm/io.h
index 07f5299..7c69139 100644
--- a/arch/openrisc/include/asm/io.h
+++ b/arch/openrisc/include/asm/io.h
@@ -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);
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
index 448303b..616eea5 100644
--- a/include/asm-generic/io.h
+++ b/include/asm-generic/io.h
@@ -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
--
1.7.7.6
--
Thanks.
-- Max
guanxuetao
2012-10-29 01:28:42 UTC
Permalink
Post by James Hogan
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 at imgtec.com>
Cc: Arnd Bergmann <arnd at arndb.de>
Cc: Jonas Bonn <jonas at southpole.se>
Cc: Chris Zankel <chris at zankel.net>
Cc: Max Filippov <jcmvbkbc at gmail.com>
Cc: Mike Frysinger <vapier at gentoo.org>
Cc: Chen Liqin <liqin.chen at sunplusct.com>
Cc: Lennox Wu <lennox.wu at gmail.com>
Cc: Guan Xuetao <gxt at mprc.pku.edu.cn>
Acked-by: Guan Xuetao <gxt at mprc.pku.edu.cn>
Post by James Hogan
---
Any compile testing of score and unicore32 anybody could provide would
be great.
arch/openrisc/include/asm/io.h | 1 +
include/asm-generic/io.h | 1 -
2 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/openrisc/include/asm/io.h
b/arch/openrisc/include/asm/io.h
index 07f5299..7c69139 100644
--- a/arch/openrisc/include/asm/io.h
+++ b/arch/openrisc/include/asm/io.h
@@ -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);
diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
index 448303b..616eea5 100644
--- a/include/asm-generic/io.h
+++ b/include/asm-generic/io.h
@@ -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
--
1.7.7.6
James Hogan
2012-10-29 09:28:09 UTC
Permalink
Post by guanxuetao
Post by James Hogan
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 at imgtec.com>
Cc: Arnd Bergmann <arnd at arndb.de>
Cc: Jonas Bonn <jonas at southpole.se>
Cc: Chris Zankel <chris at zankel.net>
Cc: Max Filippov <jcmvbkbc at gmail.com>
Cc: Mike Frysinger <vapier at gentoo.org>
Cc: Chen Liqin <liqin.chen at sunplusct.com>
Cc: Lennox Wu <lennox.wu at gmail.com>
Cc: Guan Xuetao <gxt at mprc.pku.edu.cn>
Acked-by: Guan Xuetao <gxt at mprc.pku.edu.cn>
Thanks Guan

Cheers
James

Loading...