ARM: Fix build errors caused by adding generic macros
authorRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 21 Jul 2011 13:42:40 +0000 (14:42 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 21 Jul 2011 16:49:54 +0000 (17:49 +0100)
Commit 66a625a (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: Dave Martin <dave.martin@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/proc-arm920.S
arch/arm/mm/proc-arm926.S
arch/arm/mm/proc-macros.S
arch/arm/mm/proc-sa1100.S
arch/arm/mm/proc-v6.S
arch/arm/mm/proc-v7.S
arch/arm/mm/proc-xsc3.S
arch/arm/mm/proc-xscale.S

index 0dea376feaaab52013eebe3aadffe98efd8a1386..92bd102e39822f182db96b6b4900dc62df0c014d 100644 (file)
@@ -406,9 +406,6 @@ ENTRY(cpu_arm920_do_resume)
                     PMD_SECT_CACHEABLE | PMD_BIT4 | PMD_SECT_AP_WRITE
        b       cpu_resume_mmu
 ENDPROC(cpu_arm920_do_resume)
-#else
-#define cpu_arm920_do_suspend  0
-#define cpu_arm920_do_resume   0
 #endif
 
        __CPUINIT
index b2f9bde8ecef1357d1cba3235f675ee0de642006..2bbcf053dffd26054dceb5a56af537622c8ec843 100644 (file)
@@ -421,9 +421,6 @@ ENTRY(cpu_arm926_do_resume)
                     PMD_SECT_CACHEABLE | PMD_BIT4 | PMD_SECT_AP_WRITE
        b       cpu_resume_mmu
 ENDPROC(cpu_arm926_do_resume)
-#else
-#define cpu_arm926_do_suspend  0
-#define cpu_arm926_do_resume   0
 #endif
 
        __CPUINIT
index 4ae9b4407074b4e8679833e48294889c7bd205de..307a4def8d3a7d6c89d06211e53f855a7e518fea 100644 (file)
@@ -276,8 +276,13 @@ ENTRY(\name\()_processor_functions)
 
        .if \suspend
        .word   cpu_\name\()_suspend_size
+#ifdef CONFIG_PM_SLEEP
        .word   cpu_\name\()_do_suspend
        .word   cpu_\name\()_do_resume
+#else
+       .word   0
+       .word   0
+#endif
        .else
        .word   0
        .word   0
index c7e08cab55a866e38632c7fdc1fbc42b32bbc73c..e71587852cae52a52e5d2e45b58f6f3dd24baafe 100644 (file)
@@ -200,9 +200,6 @@ ENTRY(cpu_sa1100_do_resume)
                     PMD_SECT_CACHEABLE | PMD_SECT_AP_WRITE
        b       cpu_resume_mmu
 ENDPROC(cpu_sa1100_do_resume)
-#else
-#define cpu_sa1100_do_suspend  0
-#define cpu_sa1100_do_resume   0
 #endif
 
        __CPUINIT
index aedf3c5dbe4eb88a3602ad3c4b6dc666517061e4..219138d2f158843059fbfec5373e0dbf275dbab2 100644 (file)
@@ -169,9 +169,6 @@ ENDPROC(cpu_v6_do_resume)
 cpu_resume_l1_flags:
        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)
-#else
-#define cpu_v6_do_suspend 0
-#define cpu_v6_do_resume 0
 #endif
 
        string  cpu_v6_name, "ARMv6-compatible processor"
index 54d1a63517c5e482ae8d71a58eeeed2584007203..a30e78542ccf3201fa07e1dee6534552821dfa97 100644 (file)
@@ -263,9 +263,6 @@ ENDPROC(cpu_v7_do_resume)
 cpu_resume_l1_flags:
        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)
-#else
-#define cpu_v7_do_suspend      0
-#define cpu_v7_do_resume       0
 #endif
 
        __CPUINIT
index 1508f9bc526a2553a6f967052eca8cb7f2b45969..64f1fc7edf0a888111a10903b1dd2569654dc42e 100644 (file)
@@ -445,9 +445,6 @@ ENTRY(cpu_xsc3_do_resume)
        ldr     r3, =0x542e             @ section flags
        b       cpu_resume_mmu
 ENDPROC(cpu_xsc3_do_resume)
-#else
-#define cpu_xsc3_do_suspend    0
-#define cpu_xsc3_do_resume     0
 #endif
 
        __CPUINIT
index 76a8046050109867c146c9bb1522c1b6672d64f0..fbc06e55b87a1e2ba5c06078687ea6b9ad3c5e53 100644 (file)
@@ -554,9 +554,6 @@ ENTRY(cpu_xscale_do_resume)
                     PMD_SECT_CACHEABLE | PMD_SECT_AP_WRITE
        b       cpu_resume_mmu
 ENDPROC(cpu_xscale_do_resume)
-#else
-#define cpu_xscale_do_suspend  0
-#define cpu_xscale_do_resume   0
 #endif
 
        __CPUINIT