arm64: mm: dump: add missing includes
Mark Rutland
reviewerPATCH 1/1 arm64: mm: dump: add missing includes
The arm64 dump code is currently relying on some definitions which are pulled in via transitive dependencies. On next-20150112 at least one of these (PCI_IOBASE) is no longer pulled in with a defconfig build, resulting in the following build failure:
arch/arm64/mm/dump.c:55:20: error: ?PCI_IOBASE? undeclared here (not in a function)
{ (unsigned long) PCI_IOBASE, "PCI I/O start" },
^
It seems we have implicit dependencies on the following definitions:
* PCI_IOBASE (asm/io.h) * MODULES_VADDR (asm/memory.h) * MODULES_END (asm/memory.h) * PAGE_OFFSET (asm/memory.h) * PTE_* (asm/pgtable-hwdef.h) * ENOMEM (asm/errno.h) * device_initcall (linux/init.h)
This patch ensures we explicitly include the relevant headers for the above items, fixing the observed build issue and hopefully preventing future issues as headers are refactored.
--- arch/arm64/mm/dump.c | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm64/mm/dump.c +5 -0
@@ -15,12 +15,17 @@*/ #include <linux/debugfs.h> #include <linux/fs.h> +#include <linux/init.h> #include <linux/mm.h> #include <linux/sched.h> #include <linux/seq_file.h> +#include <asm/errno.h> #include <asm/fixmap.h> +#include <asm/io.h> +#include <asm/memory.h> #include <asm/pgtable.h> +#include <asm/pgtable-hwdef.h> #define LOWEST_ADDR (UL(0xffffffffffffffff) << VA_BITS)
Signature · 1 line
1.9.1
PATCH 1/1 arm64: mm: dump: add missing includes
Quoted 18 lines · Mark Rutland
The arm64 dump code is currently relying on some definitions which are pulled in via transitive dependencies. On next-20150112 at least one of these (
PCI_IOBASE) is no longer pulled in with a defconfig build, resulting in the following build failure:
arch/arm64/mm/dump.c:55:20: error: ?PCI_IOBASE? undeclared here (not in a function)
{ (unsigned long)PCI_IOBASE, "PCI I/O start" },^It seems we have implicit dependencies on the following definitions:
* PCI_IOBASE (asm/io.h) * MODULES_VADDR (asm/memory.h) * MODULES_END (asm/memory.h) * PAGE_OFFSET (asm/memory.h) * PTE_* (asm/pgtable-hwdef.h) * ENOMEM (asm/errno.h) * device_initcall (linux/init.h)
Quoted 4 lines
This patch ensures we explicitly include the relevant headers for the above items, fixing the observed build issue and hopefully preventing future issues as headers are refactored.
Looks good to me.
Quoted 35 lines
Signed-off-by Mark Rutland <[email protected]>Reported-by Mark Brown <[email protected]>Cc Catalin Marinas <[email protected]>Cc Laura Abbott <[email protected]>Cc Steve Capper <[email protected]>Cc Will Deacon <[email protected]>--- arch/arm64/mm/dump.c | 5 +++++ 1 file changed, 5 insertions(+)arch/arm64/mm/dump.c +5
-1@@ -15,12 +15,17 @@*/ #include <linux/debugfs.h> #include <linux/fs.h> +#include <linux/init.h> #include <linux/mm.h> #include <linux/sched.h> #include <linux/seq_file.h> +#include <asm/errno.h> #include <asm/fixmap.h> +#include <asm/io.h> +#include <asm/memory.h> #include <asm/pgtable.h> +#include <asm/pgtable-hwdef.h> #define LOWEST_ADDR (UL(0xffffffffffffffff) << VA_BITS) --1.9.1
PATCH 1/1 arm64: mm: dump: add missing includes
In reply to Mark RutlandQuoted 41 lines · Mark Rutland
The arm64 dump code is currently relying on some definitions which are pulled in via transitive dependencies. On next-20150112 at least one of these (
PCI_IOBASE) is no longer pulled in with a defconfig build, resulting in the following build failure:
arch/arm64/mm/dump.c:55:20: error: ?PCI_IOBASE? undeclared here (not in a function)
{ (unsigned long)PCI_IOBASE, "PCI I/O start" },^It seems we have implicit dependencies on the following definitions:
* PCI_IOBASE (asm/io.h) * MODULES_VADDR (asm/memory.h) * MODULES_END (asm/memory.h) * PAGE_OFFSET (asm/memory.h) * PTE_* (asm/pgtable-hwdef.h) * ENOMEM (asm/errno.h) * device_initcall (linux/init.h)This patch ensures we explicitly include the relevant headers for the above items, fixing the observed build issue and hopefully preventing future issues as headers are refactored.
Signed-off-by Mark Rutland <[email protected]>Reported-by Mark Brown <[email protected]>Cc Catalin Marinas <[email protected]>Cc Laura Abbott <[email protected]>Cc Steve Capper <[email protected]>Cc Will Deacon <[email protected]>--- arch/arm64/mm/dump.c | 5 +++++ 1 file changed, 5 insertions(+)arch/arm64/mm/dump.c +1
-0@@ -15,12 +15,17 @@*/ #include <linux/debugfs.h> #include <linux/fs.h> +#include <linux/init.h>
arch/arm64/mm/dump.c line 28
Quoted 10 lines
arch/arm64/mm/dump.c +4
-0#include <linux/mm.h> #include <linux/sched.h> #include <linux/seq_file.h> +#include <asm/errno.h> #include <asm/fixmap.h> +#include <asm/io.h> +#include <asm/memory.h> #include <asm/pgtable.h> +#include <asm/pgtable-hwdef.h>
Don't forget to use linux/*.h includes instead of asm/*.h includes where appropriate. That being errno.h and io.h.
Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net.
Mark Rutland
reviewerPATCH 1/1 arm64: mm: dump: add missing includes
Quoted 46 lines · Russell King - ARM Linux
Quoted 45 lines · Mark Rutland
The arm64 dump code is currently relying on some definitions which are pulled in via transitive dependencies. On next-20150112 at least one of these (
PCI_IOBASE) is no longer pulled in with a defconfig build, resulting in the following build failure:
arch/arm64/mm/dump.c:55:20: error: ?PCI_IOBASE? undeclared here (not in a function)
{ (unsigned long)PCI_IOBASE, "PCI I/O start" },^It seems we have implicit dependencies on the following definitions:
* PCI_IOBASE (asm/io.h) * MODULES_VADDR (asm/memory.h) * MODULES_END (asm/memory.h) * PAGE_OFFSET (asm/memory.h) * PTE_* (asm/pgtable-hwdef.h) * ENOMEM (asm/errno.h) * device_initcall (linux/init.h)This patch ensures we explicitly include the relevant headers for the above items, fixing the observed build issue and hopefully preventing future issues as headers are refactored.
Signed-off-by Mark Rutland <[email protected]>Reported-by Mark Brown <[email protected]>Cc Catalin Marinas <[email protected]>Cc Laura Abbott <[email protected]>Cc Steve Capper <[email protected]>Cc Will Deacon <[email protected]>--- arch/arm64/mm/dump.c | 5 +++++ 1 file changed, 5 insertions(+)arch/arm64/mm/dump.c +1
-0@@ -15,12 +15,17 @@*/ #include <linux/debugfs.h> #include <linux/fs.h> +#include <linux/init.h> #include <linux/mm.h> #include <linux/sched.h> #include <linux/seq_file.h>
Quoted 9 lines
arch/arm64/mm/dump.c line 28
Quoted 6 lines
arch/arm64/mm/dump.c +4
-0+#include <asm/errno.h> #include <asm/fixmap.h> +#include <asm/io.h> +#include <asm/memory.h> #include <asm/pgtable.h> +#include <asm/pgtable-hwdef.h> Don't forget to use linux/*.h includes instead of asm/*.h includes where appropriate. That being
errno.handio.h.
Sure thing for errno.h.
I discovered a problem in the way we handle PCI I/O space here, and my solution for that [1] removes the need for io.h.
Thanks,
Mark.
[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-January/315444.html