ARM64 compilation fixes for missing header includes
Subsystems (2)
cover ARM64 compilation fixes for missing header includes
Hi Will & Catalin,
An ARM64 build here on next-20150105 breaks due to some missing header file includes. Looks like someone reorganized some headers - although I have not tracked down what the root cause is. These patches get the kernel building again. They are based on the arm64 fixes/core branch.
The patches are also available via git at this signed tag:
git://git.kernel.org/pub/scm/linux/kernel/git/pjw/tegra-pending tags/arm64-header-fixes-20150105
Compile-tested only.
- Paul
---
Paul Walmsley (4):
arm64: fix missing asm/pgtable-hwdef.h include in asm/processor.h
arm64: fix missing linux/bug.h include in asm/arch_timer.h
arm64: fix missing asm/alternative.h include in kernel/module.c
arm64: fix missing asm/io.h include in kernel/smp_spin_table.c
arch/arm64/include/asm/arch_timer.h | 1 + arch/arm64/include/asm/processor.h | 1 + arch/arm64/kernel/module.c | 1 + arch/arm64/kernel/smp_spin_table.c | 1 + 4 files changed, 4 insertions(+)
arm64-header-file-fixes-v3.19-rc1
text data bss dec hex filename
7173728 449984 199064 7822776 775db8 vmlinux
7173728 449984 199064 7822776 775db8 vmlinux
PATCH 1/4 arm64: fix missing asm/pgtable-hwdef.h include in asm/processor.h
On next-20150105, defconfig compilation breaks with:
./arch/arm64/include/asm/processor.h:47:32: error: ?PHYS_MASK? undeclared (first use in this function)
Fix by including asm/pgtable-hwdef.h, where PHYS_MASK is defined.
--- arch/arm64/include/asm/processor.h | 1 + 1 file changed, 1 insertion(+)
arch/arm64/include/asm/processor.h +1 -0
@@ -33,6 +33,7 @@#include <asm/hw_breakpoint.h> #include <asm/ptrace.h> #include <asm/types.h> +#include <asm/pgtable-hwdef.h> #ifdef __KERNEL__#define STACK_TOP_MAX TASK_SIZE_64
Mark Rutland
maintainerPATCH 1/4 arm64: fix missing asm/pgtable-hwdef.h include in asm/processor.h
Quoted 19 lines · Paul Walmsley
On next-20150105, defconfig compilation breaks with:
./arch/arm64/include/asm/processor.h:47:32: error: ?PHYS_MASK? undeclared (first use in this function)Fix by including
asm/pgtable-hwdef.h, wherePHYS_MASKis defined.Signed-off-by Paul Walmsley <[email protected]>Cc Paul Walmsley <[email protected]>Cc Catalin Marinas <[email protected]>Cc Will Deacon <[email protected]>--- arch/arm64/include/asm/processor.h | 1 + 1 file changed, 1 insertion(+)arch/arm64/include/asm/processor.h +0
-0
arch/arm64/include/asm/processor.h line 36
Quoted 4 lines
arch/arm64/include/asm/processor.h +1
-0@@ -33,6 +33,7 @@#include <asm/hw_breakpoint.h> #include <asm/ptrace.h> #include <asm/types.h> +#include <asm/pgtable-hwdef.h>
If you can move this above the include of asm/ptrace.h,
Thanks,
Mark.
Quoted 10 lines
arch/arm64/include/asm/processor.h +0
-0#ifdef __KERNEL__#define STACK_TOP_MAX TASK_SIZE_64_______________________________________________
linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 1/4 arm64: fix missing asm/pgtable-hwdef.h include in asm/processor.h
Hi Mark,
Quoted 1 line · Mark Rutland
If you can move this above the include of
asm/ptrace.h,
Done; updated patch below. Thanks for the review,
- Paul
From: Paul Walmsley <[email protected]>
Date: Mon, 5 Jan 2015 17:38:41 -0700
Subject: [PATCH 1/4] arm64: fix missing asm/pgtable-hwdef.h include in asm/processor.h
On next-20150105, defconfig compilation breaks with:
./arch/arm64/include/asm/processor.h:47:32: error: ?PHYS_MASK? undeclared (first use in this function)
Fix by including asm/pgtable-hwdef.h, where PHYS_MASK is defined.
This second version incorporates a comment from Mark Rutland <[email protected]> to keep the includes in alphabetical order by filename.
--- arch/arm64/include/asm/processor.h | 1 + 1 file changed, 1 insertion(+)
arch/arm64/include/asm/processor.h +1 -0
@@ -31,6 +31,7 @@#include <asm/fpsimd.h> #include <asm/hw_breakpoint.h> +#include <asm/pgtable-hwdef.h> #include <asm/ptrace.h> #include <asm/types.h>
Signature · 1 line
2.1.4
PATCH 2/4 arm64: fix missing linux/bug.h include in asm/arch_timer.h
In reply to Paul WalmsleyOn next-20150105, defconfig compilation breaks with:
./arch/arm64/include/asm/arch_timer.h:112:2: error: implicit declaration of function ?BUG? [-Werror=implicit-function-declaration]
Fix by including linux/bug.h, where the BUG macro is defined.
--- arch/arm64/include/asm/arch_timer.h | 1 + 1 file changed, 1 insertion(+)
arch/arm64/include/asm/arch_timer.h +1 -0
@@ -23,6 +23,7 @@#include <linux/init.h> #include <linux/types.h> +#include <linux/bug.h> #include <clocksource/arm_arch_timer.h>
Mark Rutland
maintainerPATCH 2/4 arm64: fix missing linux/bug.h include in asm/arch_timer.h
Hi Paul,
Quoted 19 lines · Paul Walmsley
On next-20150105, defconfig compilation breaks with:
./arch/arm64/include/asm/arch_timer.h:112:2: error: implicit declaration of function ?BUG? [-Werror=implicit-function-declaration]Fix by including
linux/bug.h, where the BUG macro is defined.Signed-off-by Paul Walmsley <[email protected]>Cc Paul Walmsley <[email protected]>Cc Catalin Marinas <[email protected]>Cc Will Deacon <[email protected]>--- arch/arm64/include/asm/arch_timer.h | 1 + 1 file changed, 1 insertion(+)arch/arm64/include/asm/arch_timer.h +0
-0
arch/arm64/include/asm/arch_timer.h line 26
Quoted 4 lines
arch/arm64/include/asm/arch_timer.h +1
-0@@ -23,6 +23,7 @@#include <linux/init.h> #include <linux/types.h> +#include <linux/bug.h>
Nit: could you move this above the include of linux/init.h so as to keep these in alphabetical order?
Otherwise:
Thanks,
Mark.
Quoted 10 lines
arch/arm64/include/asm/arch_timer.h +0
-0#include <clocksource/arm_arch_timer.h> _______________________________________________
linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 2/4 arm64: fix missing linux/bug.h include in asm/arch_timer.h
Hi Mark,
Quoted 2 lines · Mark Rutland
Nit: could you move this above the include of
linux/init.hso as to keep these in alphabetical order?
Done. Updated patch below. Thanks for the review,
- Paul
From: Paul Walmsley <[email protected]>
Date: Mon, 5 Jan 2015 17:38:41 -0700
Subject: [PATCH 2/4] arm64: fix missing linux/bug.h include in asm/arch_timer.h
On next-20150105, defconfig compilation breaks with:
./arch/arm64/include/asm/arch_timer.h:112:2: error: implicit declaration of function ?BUG? [-Werror=implicit-function-declaration]
Fix by including linux/bug.h, where the BUG macro is defined.
This second version incorporates a comment from Mark Rutland <[email protected]> to keep the includes in alphabetical order by filename.
--- arch/arm64/include/asm/arch_timer.h | 1 + 1 file changed, 1 insertion(+)
arch/arm64/include/asm/arch_timer.h +1 -0
@@ -21,6 +21,7 @@#include <asm/barrier.h> +#include <linux/bug.h> #include <linux/init.h> #include <linux/types.h>
Signature · 1 line
2.1.4
PATCH 3/4 arm64: fix missing asm/alternative.h include in kernel/module.c
In reply to Paul WalmsleyOn next-20150105, defconfig compilation breaks with:
arch/arm64/kernel/module.c:408:4: error: implicit declaration of function ?apply_alternatives? [-Werror=implicit-function-declaration]
Fix by including asm/alternative.h, where the apply_alternatives() prototype is declared.
--- arch/arm64/kernel/module.c | 1 + 1 file changed, 1 insertion(+)
arch/arm64/kernel/module.c +1 -0
@@ -27,6 +27,7 @@#include <linux/vmalloc.h> #include <asm/insn.h> #include <asm/sections.h> +#include <asm/alternative.h> #define AARCH64_INSN_IMM_MOVNZ AARCH64_INSN_IMM_MAX#define AARCH64_INSN_IMM_MOVK AARCH64_INSN_IMM_16
Mark Rutland
maintainerPATCH 3/4 arm64: fix missing asm/alternative.h include in kernel/module.c
Quoted 20 lines · Paul Walmsley
On next-20150105, defconfig compilation breaks with:
arch/arm64/kernel/module.c:408:4: error: implicit declaration of function ?apply_alternatives? [-Werror=implicit-function-declaration]Fix by including
asm/alternative.h, where theapply_alternatives()prototype is declared.Signed-off-by Paul Walmsley <[email protected]>Cc Paul Walmsley <[email protected]>Cc Catalin Marinas <[email protected]>Cc Will Deacon <[email protected]>--- arch/arm64/kernel/module.c | 1 + 1 file changed, 1 insertion(+)arch/arm64/kernel/module.c +0
-0
arch/arm64/kernel/module.c line 30
Quoted 4 lines
arch/arm64/kernel/module.c +1
-0@@ -27,6 +27,7 @@#include <linux/vmalloc.h> #include <asm/insn.h> #include <asm/sections.h> +#include <asm/alternative.h>
If this can move above the include of asm/insn.h:
Thanks,
Mark.
Quoted 10 lines
arch/arm64/kernel/module.c +0
-0#define AARCH64_INSN_IMM_MOVNZ AARCH64_INSN_IMM_MAX#define AARCH64_INSN_IMM_MOVK AARCH64_INSN_IMM_16_______________________________________________
linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 3/4 arm64: fix missing asm/alternative.h include in kernel/module.c
Hi Mark,
Quoted 1 line · Mark Rutland
If this can move above the include of
asm/insn.h:
Done; updated patch below.
cheers,
- Paul
From: Paul Walmsley <[email protected]>
Date: Mon, 5 Jan 2015 17:38:41 -0700
Subject: [PATCH 3/4] arm64: fix missing asm/alternative.h include in kernel/module.c
On next-20150105, defconfig compilation breaks with:
arch/arm64/kernel/module.c:408:4: error: implicit declaration of function ?apply_alternatives? [-Werror=implicit-function-declaration]
Fix by including asm/alternative.h, where the apply_alternatives() prototype is declared.
This second version incorporates a comment from Mark Rutland <[email protected]> to keep the includes in alphabetical order by filename.
--- arch/arm64/kernel/module.c | 1 + 1 file changed, 1 insertion(+)
arch/arm64/kernel/module.c +1 -0
@@ -25,6 +25,7 @@#include <linux/mm.h> #include <linux/moduleloader.h> #include <linux/vmalloc.h> +#include <asm/alternative.h> #include <asm/insn.h> #include <asm/sections.h>
Signature · 1 line
2.1.4
PATCH 4/4 arm64: fix missing asm/io.h include in kernel/smp_spin_table.c
In reply to Paul WalmsleyOn next-20150105, defconfig compilation breaks with:
arch/arm64/kernel/smp_spin_table.c:80:2: error: implicit declaration of function ?ioremap_cache? [-Werror=implicit-function-declaration] arch/arm64/kernel/smp_spin_table.c:92:2: error: implicit declaration of function ?writeq_relaxed? [-Werror=implicit-function-declaration] arch/arm64/kernel/smp_spin_table.c:101:2: error: implicit declaration of function ?iounmap? [-Werror=implicit-function-declaration]
Fix by including asm/io.h, which contains definitions or prototypes for these macros or functions.
--- arch/arm64/kernel/smp_spin_table.c | 1 + 1 file changed, 1 insertion(+)
arch/arm64/kernel/smp_spin_table.c +1 -0
@@ -26,6 +26,7 @@#include <asm/cpu_ops.h> #include <asm/cputype.h> #include <asm/smp_plat.h> +#include <asm/io.h> extern void secondary_holding_pen (void );volatile unsigned long secondary_holding_pen_release =INVALID_HWID ;
Mark Rutland
maintainerPATCH 4/4 arm64: fix missing asm/io.h include in kernel/smp_spin_table.c
Hi Paul,
Quoted 22 lines · Paul Walmsley
On next-20150105, defconfig compilation breaks with:
arch/arm64/kernel/smp_spin_table.c:80:2: error: implicit declaration of function ?ioremap_cache? [-Werror=implicit-function-declaration]arch/arm64/kernel/smp_spin_table.c:92:2: error: implicit declaration of function ?writeq_relaxed? [-Werror=implicit-function-declaration]arch/arm64/kernel/smp_spin_table.c:101:2: error: implicit declaration of function ?iounmap? [-Werror=implicit-function-declaration]Fix by including
asm/io.h, which contains definitions or prototypes for these macros or functions.Signed-off-by Paul Walmsley <[email protected]>Cc Paul Walmsley <[email protected]>Cc Catalin Marinas <[email protected]>Cc Will Deacon <[email protected]>--- arch/arm64/kernel/smp_spin_table.c | 1 + 1 file changed, 1 insertion(+)arch/arm64/kernel/smp_spin_table.c +0
-0
arch/arm64/kernel/smp_spin_table.c line 29
Quoted 4 lines
arch/arm64/kernel/smp_spin_table.c +1
-0@@ -26,6 +26,7 @@#include <asm/cpu_ops.h> #include <asm/cputype.h> #include <asm/smp_plat.h> +#include <asm/io.h>
Nit: please move between the include of asm/cputype and asm/smp_plat.h, so as to keep the list in alphabetical order.
Otherwise:
Thanks,
Mark.
Quoted 10 lines
arch/arm64/kernel/smp_spin_table.c +0
-0extern void secondary_holding_pen (void );volatile unsigned long secondary_holding_pen_release =INVALID_HWID ;_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 4/4 arm64: fix missing asm/io.h include in kernel/smp_spin_table.c
Hi Mark,
Quoted 2 lines · Mark Rutland
Nit: please move between the include of asm/cputype and
asm/smp_plat.h, so as to keep the list in alphabetical order.
Done. Updated patch below. Thanks for the review,
- Paul
From: Paul Walmsley <[email protected]>
Date: Mon, 5 Jan 2015 17:38:42 -0700
Subject: [PATCH 4/4] arm64: fix missing asm/io.h include in kernel/smp_spin_table.c
On next-20150105, defconfig compilation breaks with:
arch/arm64/kernel/smp_spin_table.c:80:2: error: implicit declaration of function ?ioremap_cache? [-Werror=implicit-function-declaration] arch/arm64/kernel/smp_spin_table.c:92:2: error: implicit declaration of function ?writeq_relaxed? [-Werror=implicit-function-declaration] arch/arm64/kernel/smp_spin_table.c:101:2: error: implicit declaration of function ?iounmap? [-Werror=implicit-function-declaration]
Fix by including asm/io.h, which contains definitions or prototypes for these macros or functions.
This second version incorporates a comment from Mark Rutland <[email protected]> to keep the includes in alphabetical order by filename.
--- arch/arm64/kernel/smp_spin_table.c | 1 + 1 file changed, 1 insertion(+)
arch/arm64/kernel/smp_spin_table.c +1 -0
@@ -25,6 +25,7 @@#include <asm/cacheflush.h> #include <asm/cpu_ops.h> #include <asm/cputype.h> +#include <asm/io.h> #include <asm/smp_plat.h> extern void secondary_holding_pen (void );
Signature · 1 line
2.1.4
cover ARM64 compilation fixes for missing header includes
In reply to Paul WalmsleyQuoted 7 lines · Paul Walmsley
Hi Will & Catalin,
An ARM64 build here on next-20150105 breaks due to some missing header file includes. Looks like someone reorganized some headers - although I have not tracked down what the root cause is. These patches get the kernel building again. They are based on the arm64 fixes/core branch.
Thanks Paul. Whilst the breakage appears in -next, I'll queue these for 3.19 as they are straight-forward fixes.
Will