From: Grant Likely <grant.likely@secretlab.ca>
To: linux-kernel@vger.kernel.org
Cc: Michal Simek <monstr@monstr.eu>
Subject: [RFC PATCH] of/microblaze: fix includes so that asm/prom.h doesn't need linux/of*.h
Date: Tue, 17 Aug 2010 00:02:37 -0600 [thread overview]
Message-ID: <20100817060051.20467.10072.stgit@angua> (raw)
asm/prom.h has some nasty include ordering issues because a number of
files assume that linux/of_* is included by prom.h. This patch fixes
the Microblaze occurrences.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
Hi Michal,
And here is my patch that fixes all the include issues so the remaining lines
can be removed from prom.h. I'll add this one to my test-devicetree branch
along with similar patches to fix powerpc and sparc, and probably merge it
in 2.6.37.
Cheers,
g.
arch/microblaze/include/asm/prom.h | 9 ---------
arch/microblaze/kernel/prom.c | 3 ++-
arch/microblaze/kernel/prom_parse.c | 3 ++-
arch/microblaze/kernel/setup.c | 3 ++-
arch/microblaze/pci/pci-common.c | 1 +
drivers/net/xilinx_emaclite.c | 1 +
drivers/serial/of_serial.c | 1 +
drivers/serial/uartlite.c | 1 +
8 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h
index 101fa09..59c7932 100644
--- a/arch/microblaze/include/asm/prom.h
+++ b/arch/microblaze/include/asm/prom.h
@@ -83,13 +83,4 @@ extern int of_irq_map_pci(struct pci_dev *pdev, struct of_irq *out_irq);
#endif /* __ASSEMBLY__ */
#endif /* __KERNEL__ */
-
-/* These includes are put at the bottom because they may contain things
- * that are overridden by this file. Ideally they shouldn't be included
- * by this file, but there are a bunch of .c files that currently depend
- * on it. Eventually they will be cleaned up. */
-#include <linux/of_fdt.h>
-#include <linux/of_irq.h>
-#include <linux/platform_device.h>
-
#endif /* _ASM_MICROBLAZE_PROM_H */
diff --git a/arch/microblaze/kernel/prom.c b/arch/microblaze/kernel/prom.c
index 427b13b..cca32f3 100644
--- a/arch/microblaze/kernel/prom.c
+++ b/arch/microblaze/kernel/prom.c
@@ -24,6 +24,8 @@
#include <linux/stringify.h>
#include <linux/delay.h>
#include <linux/initrd.h>
+#include <linux/of.h>
+#include <linux/of_fdt.h>
#include <linux/bitops.h>
#include <linux/module.h>
#include <linux/kexec.h>
@@ -31,7 +33,6 @@
#include <linux/irq.h>
#include <linux/memblock.h>
-#include <asm/prom.h>
#include <asm/page.h>
#include <asm/processor.h>
#include <asm/irq.h>
diff --git a/arch/microblaze/kernel/prom_parse.c b/arch/microblaze/kernel/prom_parse.c
index 99d9b61..004a276 100644
--- a/arch/microblaze/kernel/prom_parse.c
+++ b/arch/microblaze/kernel/prom_parse.c
@@ -6,8 +6,9 @@
#include <linux/module.h>
#include <linux/ioport.h>
#include <linux/etherdevice.h>
+#include <linux/of.h>
#include <linux/of_address.h>
-#include <asm/prom.h>
+#include <linux/of_irq.h>
#include <asm/pci-bridge.h>
#ifdef CONFIG_PCI
diff --git a/arch/microblaze/kernel/setup.c b/arch/microblaze/kernel/setup.c
index f5f7688..47c8331 100644
--- a/arch/microblaze/kernel/setup.c
+++ b/arch/microblaze/kernel/setup.c
@@ -24,6 +24,8 @@
#include <linux/param.h>
#include <linux/pci.h>
#include <linux/cache.h>
+#include <linux/of.h>
+#include <linux/of_fdt.h>
#include <linux/of_platform.h>
#include <linux/dma-mapping.h>
#include <asm/cacheflush.h>
@@ -31,7 +33,6 @@
#include <asm/cpuinfo.h>
#include <asm/system.h>
-#include <asm/prom.h>
#include <asm/pgtable.h>
DEFINE_PER_CPU(unsigned int, KSP); /* Saved kernel stack pointer */
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c
index 55ef532..2e3c60a 100644
--- a/arch/microblaze/pci/pci-common.c
+++ b/arch/microblaze/pci/pci-common.c
@@ -29,6 +29,7 @@
#include <linux/slab.h>
#include <linux/of.h>
#include <linux/of_address.h>
+#include <linux/of_irq.h>
#include <asm/processor.h>
#include <asm/io.h>
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index ecbbb68..68a4498 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -22,6 +22,7 @@
#include <linux/slab.h>
#include <linux/of_address.h>
#include <linux/of_device.h>
+#include <linux/of_irq.h>
#include <linux/of_platform.h>
#include <linux/of_mdio.h>
#include <linux/phy.h>
diff --git a/drivers/serial/of_serial.c b/drivers/serial/of_serial.c
index 2af8fd1..387858e 100644
--- a/drivers/serial/of_serial.c
+++ b/drivers/serial/of_serial.c
@@ -15,6 +15,7 @@
#include <linux/serial_core.h>
#include <linux/serial_8250.h>
#include <linux/of_address.h>
+#include <linux/of_irq.h>
#include <linux/of_platform.h>
#include <linux/nwpserial.h>
diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c
index 9b03d7b..95e5c27 100644
--- a/drivers/serial/uartlite.c
+++ b/drivers/serial/uartlite.c
@@ -23,6 +23,7 @@
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_device.h>
+#include <linux/of_irq.h>
#include <linux/of_platform.h>
/* Match table for of_platform binding */
next reply other threads:[~2010-08-17 6:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-17 6:02 Grant Likely [this message]
2010-08-17 6:15 ` [RFC PATCH] of/microblaze: fix includes so that asm/prom.h doesn't need linux/of*.h Michal Simek
2010-08-17 7:12 ` Grant Likely
2010-08-17 7:17 ` Grant Likely
2010-08-17 7:18 ` Michal Simek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100817060051.20467.10072.stgit@angua \
--to=grant.likely@secretlab.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=monstr@monstr.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox