of/microblaze: fix includes so that asm/prom.h doesn't need linux/of*.h
Subsystems (3)
RFC PATCH 1/1 of/microblaze: fix includes so that asm/prom.h doesn't need linux/of*.h
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.
---
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(-)
arch/microblaze/include/asm/prom.h +0 -9
@@ -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 */
arch/microblaze/kernel/prom.c +2 -1
@@ -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>
arch/microblaze/kernel/prom_parse.c +2 -1
@@ -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
arch/microblaze/kernel/setup.c +2 -1
@@ -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 */
arch/microblaze/pci/pci-common.c +1 -0
@@ -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>
drivers/net/xilinx_emaclite.c +1 -0
@@ -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>
drivers/serial/of_serial.c +1 -0
@@ -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>
drivers/serial/uartlite.c +1 -0
@@ -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 */
Michal Simek
maintainerQuoted 5 lines · Grant Likely
asm/prom.hhas some nasty include ordering issues because a number of files assume that linux/of_* is included byprom.h. This patch fixes the Microblaze occurrences.Signed-off-by Grant Likely <[email protected]>
Quoted 8 lines
---
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.
That's bad because I don't want to keep pci broken till 2.6.37 especially in case that I know that is broken.
If this is the right fix for my issue and you want to merge it in 2.6.37 then I prefer to use my patch which simple add one header to prom.h and then this patch fix it in general in 2.6.37.
What do you think?
Michal
Quoted 137 lines
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(-)arch/microblaze/include/asm/prom.h +0
-9@@ -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 */ arch/microblaze/kernel/prom.c +2
-1@@ -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> arch/microblaze/kernel/prom_parse.c +2
-1@@ -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 arch/microblaze/kernel/setup.c +2
-1@@ -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 */arch/microblaze/pci/pci-common.c +1
-0@@ -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> drivers/net/xilinx_emaclite.c +1
-0@@ -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> drivers/serial/of_serial.c +1
-0@@ -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> drivers/serial/uartlite.c +1
-0@@ -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 */
Signature · 4 lines
Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/ Microblaze U-BOOT custodian
Quoted 18 lines · Michal Simek
Quoted 8 lines · Grant Likely
asm/prom.hhas some nasty include ordering issues because a number of files assume that linux/of_* is included byprom.h. This patch fixes the Microblaze occurrences.Signed-off-by Grant Likely <[email protected]>---
Quoted 8 lines
Hi Michal,
And here is my patch that fixes all the include issues so the remaining lines
can be removed fromprom.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.
Quoted 8 lines
That's bad because I don't want to keep pci broken till 2.6.37 especially in case that I know that is broken.
If this is the right fix for my issue and you want to merge it in 2.6.37 then I prefer to use my patch which simple add one header to
prom.hand then this patch fix it in general in 2.6.37.What do you think?
heh, I think we're talking across purposes. I sent 2 patches.
The first patch fixes your immediate issue, and I'll ask Linus to merge it tomorrow.
The second patch (this patch) allows the rest of the linux/of*.h includes to be removed from prom.h, but I will not merge that one into 2.6.36 because it is riskier and it isn't a regression fix.
g.
Quoted 152 lines
Michal
Quoted 127 lines
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(-)arch/microblaze/include/asm/prom.h +0
-9@@ -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 */arch/microblaze/kernel/prom.c +2
-0@@ -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>arch/microblaze/kernel/prom_parse.c +2
-1@@ -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_PCIarch/microblaze/kernel/setup.c +2
-1@@ -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 */
arch/microblaze/pci/pci-common.c +1
-0@@ -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>drivers/net/xilinx_emaclite.c +1
-0@@ -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>drivers/serial/of_serial.c +1
-0@@ -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.cb/drivers/serial/uartlite.cindex 9b03d7b..95e5c27 100644drivers/serial/uartlite.c line 29
Quoted 7 lines
drivers/serial/uartlite.c +1
-0@@ -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 */--
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Signature · 2 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.
Quoted 28 lines · Grant Likely
Quoted 18 lines · Michal Simek
Quoted 8 lines · Grant Likely
asm/prom.hhas some nasty include ordering issues because a number of files assume that linux/of_* is included byprom.h. This patch fixes the Microblaze occurrences.Signed-off-by Grant Likely <[email protected]>---
Quoted 8 lines
Hi Michal,
And here is my patch that fixes all the include issues so the remaining lines
can be removed fromprom.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.Quoted 8 lines
That's bad because I don't want to keep pci broken till 2.6.37 especially in case that I know that is broken.
If this is the right fix for my issue and you want to merge it in 2.6.37 then I prefer to use my patch which simple add one header to
prom.hand then this patch fix it in general in 2.6.37.What do you think?
Quoted 7 lines
heh, I think we're talking across purposes. I sent 2 patches.
The first patch fixes your immediate issue, and I'll ask Linus to merge it tomorrow.
The second patch (this patch) allows the rest of thelinux/of*.hincludes to be removed fromprom.h, but I will not merge that one into 2.6.36 because it is riskier and it isn't a regression fix.
...and here's the link to the first patch in case it somehow missed your inbox:
http://lkml.org/lkml/2010/8/17/46
g.
Michal Simek
maintainerQuoted 26 lines · Grant Likely
Quoted 16 lines · Michal Simek
Quoted 7 lines · Grant Likely
asm/prom.hhas some nasty include ordering issues because a number of files assume that linux/of_* is included byprom.h. This patch fixes the Microblaze occurrences.Signed-off-by Grant Likely <[email protected]>---
Quoted 8 lines
Hi Michal,
And here is my patch that fixes all the include issues so the remaining lines
can be removed fromprom.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.Quoted 8 lines
That's bad because I don't want to keep pci broken till 2.6.37 especially in case that I know that is broken.
If this is the right fix for my issue and you want to merge it in 2.6.37 then I prefer to use my patch which simple add one header to
prom.hand then this patch fix it in general in 2.6.37.What do you think?
Quoted 7 lines
heh, I think we're talking across purposes. I sent 2 patches.
The first patch fixes your immediate issue, and I'll ask Linus to merge it tomorrow.
The second patch (this patch) allows the rest of thelinux/of*.hincludes to be removed fromprom.h, but I will not merge that one into 2.6.36 because it is riskier and it isn't a regression fix.
I forget to read your message - I completely jump over it. :-(
Thanks,
Michal
Quoted 156 lines
g.
Quoted 149 lines
Michal
Quoted 126 lines
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(-)arch/microblaze/include/asm/prom.h +0
-9@@ -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 */ arch/microblaze/kernel/prom.c +2
-0@@ -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> arch/microblaze/kernel/prom_parse.c +2
-1@@ -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 arch/microblaze/kernel/setup.c +2
-1@@ -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 */arch/microblaze/pci/pci-common.c +1
-0@@ -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> drivers/net/xilinx_emaclite.c +1
-0@@ -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> drivers/serial/of_serial.c +1
-0@@ -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.cindex 9b03d7b..95e5c27 100644
drivers/serial/uartlite.c line 29
Quoted 7 lines
drivers/serial/uartlite.c +1
-0@@ -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 */ --
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Signature · 4 lines
Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/ Microblaze U-BOOT custodian