diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2007-09-13 16:42:35 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2007-09-14 09:53:36 -0400 |
commit | 748a768384e05c021ea6be221b80c62a83d7b520 (patch) | |
tree | 8789a521471506c1601fff44a446a5e801fe4062 | |
parent | 5e14d21e3f28a4181dacff0336040e30942f4921 (diff) |
[POWERPC] Fix modpost warnings from head*.S on ppc32
We get warnings like the following from the various ppc32 head*.S files:
WARNING: vmlinux.o(.text+0x358): Section mismatch: reference to .init.text:early_init (between 'skpinv' and 'interrupt_base')
WARNING: vmlinux.o(.text+0x380): Section mismatch: reference to .init.text:machine_init (between 'skpinv' and 'interrupt_base')
WARNING: vmlinux.o(.text+0x384): Section mismatch: reference to .init.text:MMU_init (between 'skpinv' and 'interrupt_base')
WARNING: vmlinux.o(.text+0x3aa): Section mismatch: reference to .init.text:start_kernel (between 'skpinv' and 'interrupt_base')
WARNING: vmlinux.o(.text+0x3ae): Section mismatch: reference to .init.text:start_kernel (between 'skpinv' and 'interrupt_base')
Added a .text.head section simliar to what other architectures do since
modpost already excludes this from its warnings.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
-rw-r--r-- | arch/powerpc/kernel/head_32.S | 17 | ||||
-rw-r--r-- | arch/powerpc/kernel/head_40x.S | 12 | ||||
-rw-r--r-- | arch/powerpc/kernel/head_44x.S | 6 | ||||
-rw-r--r-- | arch/powerpc/kernel/head_8xx.S | 9 | ||||
-rw-r--r-- | arch/powerpc/kernel/head_fsl_booke.S | 6 | ||||
-rw-r--r-- | arch/powerpc/kernel/vmlinux.lds.S | 2 | ||||
-rw-r--r-- | include/asm-powerpc/ppc_asm.h | 4 |
7 files changed, 28 insertions, 28 deletions
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S index 0e3df1f55feb..12febfe43de6 100644 --- a/arch/powerpc/kernel/head_32.S +++ b/arch/powerpc/kernel/head_32.S | |||
@@ -48,20 +48,17 @@ | |||
48 | mtspr SPRN_DBAT##n##L,RB; \ | 48 | mtspr SPRN_DBAT##n##L,RB; \ |
49 | 1: | 49 | 1: |
50 | 50 | ||
51 | .text | 51 | .section .text.head, "ax" |
52 | .stabs "arch/powerpc/kernel/",N_SO,0,0,0f | 52 | .stabs "arch/powerpc/kernel/",N_SO,0,0,0f |
53 | .stabs "head_32.S",N_SO,0,0,0f | 53 | .stabs "head_32.S",N_SO,0,0,0f |
54 | 0: | 54 | 0: |
55 | .globl _stext | 55 | _ENTRY(_stext); |
56 | _stext: | ||
57 | 56 | ||
58 | /* | 57 | /* |
59 | * _start is defined this way because the XCOFF loader in the OpenFirmware | 58 | * _start is defined this way because the XCOFF loader in the OpenFirmware |
60 | * on the powermac expects the entry point to be a procedure descriptor. | 59 | * on the powermac expects the entry point to be a procedure descriptor. |
61 | */ | 60 | */ |
62 | .text | 61 | _ENTRY(_start); |
63 | .globl _start | ||
64 | _start: | ||
65 | /* | 62 | /* |
66 | * These are here for legacy reasons, the kernel used to | 63 | * These are here for legacy reasons, the kernel used to |
67 | * need to look like a coff function entry for the pmac | 64 | * need to look like a coff function entry for the pmac |
@@ -841,7 +838,7 @@ relocate_kernel: | |||
841 | * r3 = dest addr, r4 = source addr, r5 = copy limit, r6 = start offset | 838 | * r3 = dest addr, r4 = source addr, r5 = copy limit, r6 = start offset |
842 | * on exit, r3, r4, r5 are unchanged, r6 is updated to be >= r5. | 839 | * on exit, r3, r4, r5 are unchanged, r6 is updated to be >= r5. |
843 | */ | 840 | */ |
844 | _GLOBAL(copy_and_flush) | 841 | _ENTRY(copy_and_flush) |
845 | addi r5,r5,-4 | 842 | addi r5,r5,-4 |
846 | addi r6,r6,-4 | 843 | addi r6,r6,-4 |
847 | 4: li r0,L1_CACHE_BYTES/4 | 844 | 4: li r0,L1_CACHE_BYTES/4 |
@@ -954,9 +951,9 @@ __secondary_start: | |||
954 | * included in CONFIG_6xx | 951 | * included in CONFIG_6xx |
955 | */ | 952 | */ |
956 | #if !defined(CONFIG_6xx) | 953 | #if !defined(CONFIG_6xx) |
957 | _GLOBAL(__save_cpu_setup) | 954 | _ENTRY(__save_cpu_setup) |
958 | blr | 955 | blr |
959 | _GLOBAL(__restore_cpu_setup) | 956 | _ENTRY(__restore_cpu_setup) |
960 | blr | 957 | blr |
961 | #endif /* !defined(CONFIG_6xx) */ | 958 | #endif /* !defined(CONFIG_6xx) */ |
962 | 959 | ||
@@ -1080,7 +1077,7 @@ start_here: | |||
1080 | /* | 1077 | /* |
1081 | * Set up the segment registers for a new context. | 1078 | * Set up the segment registers for a new context. |
1082 | */ | 1079 | */ |
1083 | _GLOBAL(set_context) | 1080 | _ENTRY(set_context) |
1084 | mulli r3,r3,897 /* multiply context by skew factor */ | 1081 | mulli r3,r3,897 /* multiply context by skew factor */ |
1085 | rlwinm r3,r3,4,8,27 /* VSID = (context & 0xfffff) << 4 */ | 1082 | rlwinm r3,r3,4,8,27 /* VSID = (context & 0xfffff) << 4 */ |
1086 | addis r3,r3,0x6000 /* Set Ks, Ku bits */ | 1083 | addis r3,r3,0x6000 /* Set Ks, Ku bits */ |
diff --git a/arch/powerpc/kernel/head_40x.S b/arch/powerpc/kernel/head_40x.S index a8e045773a92..00bdb6d1c724 100644 --- a/arch/powerpc/kernel/head_40x.S +++ b/arch/powerpc/kernel/head_40x.S | |||
@@ -52,9 +52,9 @@ | |||
52 | * | 52 | * |
53 | * This is all going to change RSN when we add bi_recs....... -- Dan | 53 | * This is all going to change RSN when we add bi_recs....... -- Dan |
54 | */ | 54 | */ |
55 | .text | 55 | .section .text.head, "ax" |
56 | _GLOBAL(_stext) | 56 | _ENTRY(_stext); |
57 | _GLOBAL(_start) | 57 | _ENTRY(_start); |
58 | 58 | ||
59 | /* Save parameters we are passed. | 59 | /* Save parameters we are passed. |
60 | */ | 60 | */ |
@@ -89,9 +89,9 @@ turn_on_mmu: | |||
89 | */ | 89 | */ |
90 | . = 0xc0 | 90 | . = 0xc0 |
91 | crit_save: | 91 | crit_save: |
92 | _GLOBAL(crit_r10) | 92 | _ENTRY(crit_r10) |
93 | .space 4 | 93 | .space 4 |
94 | _GLOBAL(crit_r11) | 94 | _ENTRY(crit_r11) |
95 | .space 4 | 95 | .space 4 |
96 | 96 | ||
97 | /* | 97 | /* |
@@ -814,7 +814,7 @@ finish_tlb_load: | |||
814 | * The PowerPC 4xx family of processors do not have an FPU, so this just | 814 | * The PowerPC 4xx family of processors do not have an FPU, so this just |
815 | * returns. | 815 | * returns. |
816 | */ | 816 | */ |
817 | _GLOBAL(giveup_fpu) | 817 | _ENTRY(giveup_fpu) |
818 | blr | 818 | blr |
819 | 819 | ||
820 | /* This is where the main kernel code starts. | 820 | /* This is where the main kernel code starts. |
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S index e26d26e31813..a3dc0e4d0456 100644 --- a/arch/powerpc/kernel/head_44x.S +++ b/arch/powerpc/kernel/head_44x.S | |||
@@ -50,9 +50,9 @@ | |||
50 | * r7 - End of kernel command line string | 50 | * r7 - End of kernel command line string |
51 | * | 51 | * |
52 | */ | 52 | */ |
53 | .text | 53 | .section .text.head, "ax" |
54 | _GLOBAL(_stext) | 54 | _ENTRY(_stext); |
55 | _GLOBAL(_start) | 55 | _ENTRY(_start); |
56 | /* | 56 | /* |
57 | * Reserve a word at a fixed location to store the address | 57 | * Reserve a word at a fixed location to store the address |
58 | * of abatron_pteptrs | 58 | * of abatron_pteptrs |
diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index 901be47a02a9..a6ecdd643167 100644 --- a/arch/powerpc/kernel/head_8xx.S +++ b/arch/powerpc/kernel/head_8xx.S | |||
@@ -38,12 +38,9 @@ | |||
38 | #else | 38 | #else |
39 | #define DO_8xx_CPU6(val, reg) | 39 | #define DO_8xx_CPU6(val, reg) |
40 | #endif | 40 | #endif |
41 | .text | 41 | .section .text.head, "ax" |
42 | .globl _stext | 42 | _ENTRY(_stext); |
43 | _stext: | 43 | _ENTRY(_start); |
44 | .text | ||
45 | .globl _start | ||
46 | _start: | ||
47 | 44 | ||
48 | /* MPC8xx | 45 | /* MPC8xx |
49 | * This port was done on an MBX board with an 860. Right now I only | 46 | * This port was done on an MBX board with an 860. Right now I only |
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S index 1f155d399d57..d83cbbb264e2 100644 --- a/arch/powerpc/kernel/head_fsl_booke.S +++ b/arch/powerpc/kernel/head_fsl_booke.S | |||
@@ -52,9 +52,9 @@ | |||
52 | * r7 - End of kernel command line string | 52 | * r7 - End of kernel command line string |
53 | * | 53 | * |
54 | */ | 54 | */ |
55 | .text | 55 | .section .text.head, "ax" |
56 | _GLOBAL(_stext) | 56 | _ENTRY(_stext); |
57 | _GLOBAL(_start) | 57 | _ENTRY(_start); |
58 | /* | 58 | /* |
59 | * Reserve a word at a fixed location to store the address | 59 | * Reserve a word at a fixed location to store the address |
60 | * of abatron_pteptrs | 60 | * of abatron_pteptrs |
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index 0c458556399f..823a8cbd60b5 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S | |||
@@ -34,6 +34,8 @@ SECTIONS | |||
34 | 34 | ||
35 | /* Text and gots */ | 35 | /* Text and gots */ |
36 | .text : { | 36 | .text : { |
37 | ALIGN_FUNCTION(); | ||
38 | *(.text.head) | ||
37 | _text = .; | 39 | _text = .; |
38 | TEXT_TEXT | 40 | TEXT_TEXT |
39 | SCHED_TEXT | 41 | SCHED_TEXT |
diff --git a/include/asm-powerpc/ppc_asm.h b/include/asm-powerpc/ppc_asm.h index 211fdaeeef84..2dbd4e7884fa 100644 --- a/include/asm-powerpc/ppc_asm.h +++ b/include/asm-powerpc/ppc_asm.h | |||
@@ -209,6 +209,10 @@ GLUE(.,name): | |||
209 | 209 | ||
210 | #else /* 32-bit */ | 210 | #else /* 32-bit */ |
211 | 211 | ||
212 | #define _ENTRY(n) \ | ||
213 | .globl n; \ | ||
214 | n: | ||
215 | |||
212 | #define _GLOBAL(n) \ | 216 | #define _GLOBAL(n) \ |
213 | .text; \ | 217 | .text; \ |
214 | .stabs __stringify(n:F-1),N_FUN,0,0,n;\ | 218 | .stabs __stringify(n:F-1),N_FUN,0,0,n;\ |