Commit 6645cb61 authored by Russell King's avatar Russell King

ARM: Fix build errors caused by adding generic macros

Commit 66a625a8 (ARM: mm: proc-macros: Add generic proc/cache/tlb struct
definition macros) introduced build errors when PM_SLEEP is not enabled.
The per-CPU do_suspend/do_resume functions are defined via the
preprocessor to constant 0.  However, the macros which use these were
converted to assembly, resulting in undefined references to these
functions.  Fix that by moving the ! ifdef section into proc-macros.S
and deleting it from all effected proc-*.S files.
Acked-by: default avatarDave Martin <dave.martin@linaro.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 07f1c295
...@@ -406,9 +406,6 @@ ENTRY(cpu_arm920_do_resume) ...@@ -406,9 +406,6 @@ ENTRY(cpu_arm920_do_resume)
PMD_SECT_CACHEABLE | PMD_BIT4 | PMD_SECT_AP_WRITE PMD_SECT_CACHEABLE | PMD_BIT4 | PMD_SECT_AP_WRITE
b cpu_resume_mmu b cpu_resume_mmu
ENDPROC(cpu_arm920_do_resume) ENDPROC(cpu_arm920_do_resume)
#else
#define cpu_arm920_do_suspend 0
#define cpu_arm920_do_resume 0
#endif #endif
__CPUINIT __CPUINIT
......
...@@ -421,9 +421,6 @@ ENTRY(cpu_arm926_do_resume) ...@@ -421,9 +421,6 @@ ENTRY(cpu_arm926_do_resume)
PMD_SECT_CACHEABLE | PMD_BIT4 | PMD_SECT_AP_WRITE PMD_SECT_CACHEABLE | PMD_BIT4 | PMD_SECT_AP_WRITE
b cpu_resume_mmu b cpu_resume_mmu
ENDPROC(cpu_arm926_do_resume) ENDPROC(cpu_arm926_do_resume)
#else
#define cpu_arm926_do_suspend 0
#define cpu_arm926_do_resume 0
#endif #endif
__CPUINIT __CPUINIT
......
...@@ -276,8 +276,13 @@ ENTRY(\name\()_processor_functions) ...@@ -276,8 +276,13 @@ ENTRY(\name\()_processor_functions)
.if \suspend .if \suspend
.word cpu_\name\()_suspend_size .word cpu_\name\()_suspend_size
#ifdef CONFIG_PM_SLEEP
.word cpu_\name\()_do_suspend .word cpu_\name\()_do_suspend
.word cpu_\name\()_do_resume .word cpu_\name\()_do_resume
#else
.word 0
.word 0
#endif
.else .else
.word 0 .word 0
.word 0 .word 0
......
...@@ -200,9 +200,6 @@ ENTRY(cpu_sa1100_do_resume) ...@@ -200,9 +200,6 @@ ENTRY(cpu_sa1100_do_resume)
PMD_SECT_CACHEABLE | PMD_SECT_AP_WRITE PMD_SECT_CACHEABLE | PMD_SECT_AP_WRITE
b cpu_resume_mmu b cpu_resume_mmu
ENDPROC(cpu_sa1100_do_resume) ENDPROC(cpu_sa1100_do_resume)
#else
#define cpu_sa1100_do_suspend 0
#define cpu_sa1100_do_resume 0
#endif #endif
__CPUINIT __CPUINIT
......
...@@ -169,9 +169,6 @@ ENDPROC(cpu_v6_do_resume) ...@@ -169,9 +169,6 @@ ENDPROC(cpu_v6_do_resume)
cpu_resume_l1_flags: cpu_resume_l1_flags:
ALT_SMP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_FLAGS_SMP) ALT_SMP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_FLAGS_SMP)
ALT_UP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_FLAGS_UP) ALT_UP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_FLAGS_UP)
#else
#define cpu_v6_do_suspend 0
#define cpu_v6_do_resume 0
#endif #endif
string cpu_v6_name, "ARMv6-compatible processor" string cpu_v6_name, "ARMv6-compatible processor"
......
...@@ -263,9 +263,6 @@ ENDPROC(cpu_v7_do_resume) ...@@ -263,9 +263,6 @@ ENDPROC(cpu_v7_do_resume)
cpu_resume_l1_flags: cpu_resume_l1_flags:
ALT_SMP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_FLAGS_SMP) ALT_SMP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_FLAGS_SMP)
ALT_UP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_FLAGS_UP) ALT_UP(.long PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_FLAGS_UP)
#else
#define cpu_v7_do_suspend 0
#define cpu_v7_do_resume 0
#endif #endif
__CPUINIT __CPUINIT
......
...@@ -445,9 +445,6 @@ ENTRY(cpu_xsc3_do_resume) ...@@ -445,9 +445,6 @@ ENTRY(cpu_xsc3_do_resume)
ldr r3, =0x542e @ section flags ldr r3, =0x542e @ section flags
b cpu_resume_mmu b cpu_resume_mmu
ENDPROC(cpu_xsc3_do_resume) ENDPROC(cpu_xsc3_do_resume)
#else
#define cpu_xsc3_do_suspend 0
#define cpu_xsc3_do_resume 0
#endif #endif
__CPUINIT __CPUINIT
......
...@@ -554,9 +554,6 @@ ENTRY(cpu_xscale_do_resume) ...@@ -554,9 +554,6 @@ ENTRY(cpu_xscale_do_resume)
PMD_SECT_CACHEABLE | PMD_SECT_AP_WRITE PMD_SECT_CACHEABLE | PMD_SECT_AP_WRITE
b cpu_resume_mmu b cpu_resume_mmu
ENDPROC(cpu_xscale_do_resume) ENDPROC(cpu_xscale_do_resume)
#else
#define cpu_xscale_do_suspend 0
#define cpu_xscale_do_resume 0
#endif #endif
__CPUINIT __CPUINIT
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment