Skip to contentSkip to conversation

ARM64 compilation fixes for missing header includes

PATCH New Paul Walmsley 3 participants 14 messages Jan 6, 2015 – Jan 7, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

#1 lore raw

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.

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 +1 -0
index 286b1bec547c..e271690753ff 100644
@@ -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
maintainer
#2 lore raw

PATCH 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, where PHYS_MASK is defined.

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
index 286b1bec547c..e271690753ff 100644

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

#3 lore raw

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
index 286b1bec547c..d646241a78f6 100644
@@ -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
#4 lore raw

PATCH 2/4 arm64: fix missing linux/bug.h include in asm/arch_timer.h

In reply to 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.

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 +1 -0
index b1fa4e614718..779455564c9a 100644
@@ -23,6 +23,7 @@
 
 #include <linux/init.h>
 #include <linux/types.h>
+#include <linux/bug.h>
 
 #include <clocksource/arm_arch_timer.h>
 
maintainer
#5 lore raw

PATCH 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.

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
index b1fa4e614718..779455564c9a 100644

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

#6 lore raw

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.h so 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
index b1fa4e614718..fbe0ca31a99c 100644
@@ -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
#7 lore raw

PATCH 3/4 arm64: fix missing asm/alternative.h include in kernel/module.c

In reply to 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 the apply_alternatives() prototype is declared.

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 +1 -0
index fd027b101de5..ac081d6fe184 100644
@@ -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
maintainer
#8 lore raw

PATCH 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 the apply_alternatives() prototype is declared.

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
index fd027b101de5..ac081d6fe184 100644

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

#9 lore raw

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
index fd027b101de5..9b6f71db2709 100644
@@ -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
#10 lore raw

PATCH 4/4 arm64: fix missing asm/io.h include in kernel/smp_spin_table.c

In reply to 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.

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 +1 -0
index 4f93c67e63de..4d9f10b9d869 100644
@@ -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;
maintainer
#11 lore raw

PATCH 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.

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
index 4f93c67e63de..4d9f10b9d869 100644

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 -0
 extern 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

#12 lore raw

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
index 4f93c67e63de..14944e5b28da 100644
@@ -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
#13 lore raw

cover ARM64 compilation fixes for missing header includes

In reply to Paul Walmsley
Quoted 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