From: Kumar Gala <galak@kernel•crashing.org>
To: linuxppc-dev@ozlabs•org
Subject: [PATCH 15/22] [POWERPC] Fix modpost warnings from head*.S on ppc32
Date: Thu, 13 Sep 2007 16:07:53 -0500 [thread overview]
Message-ID: <11897177042582-git-send-email-galak@kernel.crashing.org> (raw)
In-Reply-To: <11897177032288-git-send-email-galak@kernel.crashing.org>
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>
---
arch/powerpc/kernel/head_32.S | 17 +++++++----------
arch/powerpc/kernel/head_40x.S | 12 ++++++------
arch/powerpc/kernel/head_44x.S | 6 +++---
arch/powerpc/kernel/head_8xx.S | 9 +++------
arch/powerpc/kernel/head_fsl_booke.S | 6 +++---
arch/powerpc/kernel/vmlinux.lds.S | 2 ++
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 0e3df1f..12febfe 100644
--- a/arch/powerpc/kernel/head_32.S
+++ b/arch/powerpc/kernel/head_32.S
@@ -48,20 +48,17 @@
mtspr SPRN_DBAT##n##L,RB; \
1:
- .text
+ .section .text.head, "ax"
.stabs "arch/powerpc/kernel/",N_SO,0,0,0f
.stabs "head_32.S",N_SO,0,0,0f
0:
- .globl _stext
-_stext:
+_ENTRY(_stext);
/*
* _start is defined this way because the XCOFF loader in the OpenFirmware
* on the powermac expects the entry point to be a procedure descriptor.
*/
- .text
- .globl _start
-_start:
+_ENTRY(_start);
/*
* These are here for legacy reasons, the kernel used to
* need to look like a coff function entry for the pmac
@@ -841,7 +838,7 @@ relocate_kernel:
* r3 = dest addr, r4 = source addr, r5 = copy limit, r6 = start offset
* on exit, r3, r4, r5 are unchanged, r6 is updated to be >= r5.
*/
-_GLOBAL(copy_and_flush)
+_ENTRY(copy_and_flush)
addi r5,r5,-4
addi r6,r6,-4
4: li r0,L1_CACHE_BYTES/4
@@ -954,9 +951,9 @@ __secondary_start:
* included in CONFIG_6xx
*/
#if !defined(CONFIG_6xx)
-_GLOBAL(__save_cpu_setup)
+_ENTRY(__save_cpu_setup)
blr
-_GLOBAL(__restore_cpu_setup)
+_ENTRY(__restore_cpu_setup)
blr
#endif /* !defined(CONFIG_6xx) */
@@ -1080,7 +1077,7 @@ start_here:
/*
* Set up the segment registers for a new context.
*/
-_GLOBAL(set_context)
+_ENTRY(set_context)
mulli r3,r3,897 /* multiply context by skew factor */
rlwinm r3,r3,4,8,27 /* VSID = (context & 0xfffff) << 4 */
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 a8e0457..00bdb6d 100644
--- a/arch/powerpc/kernel/head_40x.S
+++ b/arch/powerpc/kernel/head_40x.S
@@ -52,9 +52,9 @@
*
* This is all going to change RSN when we add bi_recs....... -- Dan
*/
- .text
-_GLOBAL(_stext)
-_GLOBAL(_start)
+ .section .text.head, "ax"
+_ENTRY(_stext);
+_ENTRY(_start);
/* Save parameters we are passed.
*/
@@ -89,9 +89,9 @@ turn_on_mmu:
*/
. = 0xc0
crit_save:
-_GLOBAL(crit_r10)
+_ENTRY(crit_r10)
.space 4
-_GLOBAL(crit_r11)
+_ENTRY(crit_r11)
.space 4
/*
@@ -814,7 +814,7 @@ finish_tlb_load:
* The PowerPC 4xx family of processors do not have an FPU, so this just
* returns.
*/
-_GLOBAL(giveup_fpu)
+_ENTRY(giveup_fpu)
blr
/* 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 e26d26e..a3dc0e4 100644
--- a/arch/powerpc/kernel/head_44x.S
+++ b/arch/powerpc/kernel/head_44x.S
@@ -50,9 +50,9 @@
* r7 - End of kernel command line string
*
*/
- .text
-_GLOBAL(_stext)
-_GLOBAL(_start)
+ .section .text.head, "ax"
+_ENTRY(_stext);
+_ENTRY(_start);
/*
* Reserve a word at a fixed location to store the address
* of abatron_pteptrs
diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S
index 901be47..a6ecdd6 100644
--- a/arch/powerpc/kernel/head_8xx.S
+++ b/arch/powerpc/kernel/head_8xx.S
@@ -38,12 +38,9 @@
#else
#define DO_8xx_CPU6(val, reg)
#endif
- .text
- .globl _stext
-_stext:
- .text
- .globl _start
-_start:
+ .section .text.head, "ax"
+_ENTRY(_stext);
+_ENTRY(_start);
/* MPC8xx
* 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 1f155d3..d83cbbb 100644
--- a/arch/powerpc/kernel/head_fsl_booke.S
+++ b/arch/powerpc/kernel/head_fsl_booke.S
@@ -52,9 +52,9 @@
* r7 - End of kernel command line string
*
*/
- .text
-_GLOBAL(_stext)
-_GLOBAL(_start)
+ .section .text.head, "ax"
+_ENTRY(_stext);
+_ENTRY(_start);
/*
* Reserve a word at a fixed location to store the address
* of abatron_pteptrs
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 0c45855..823a8cb 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -34,6 +34,8 @@ SECTIONS
/* Text and gots */
.text : {
+ ALIGN_FUNCTION();
+ *(.text.head)
_text = .;
TEXT_TEXT
SCHED_TEXT
diff --git a/include/asm-powerpc/ppc_asm.h b/include/asm-powerpc/ppc_asm.h
index 211fdae..2dbd4e7 100644
--- a/include/asm-powerpc/ppc_asm.h
+++ b/include/asm-powerpc/ppc_asm.h
@@ -209,6 +209,10 @@ GLUE(.,name):
#else /* 32-bit */
+#define _ENTRY(n) \
+ .globl n; \
+n:
+
#define _GLOBAL(n) \
.text; \
.stabs __stringify(n:F-1),N_FUN,0,0,n;\
--
1.5.2.4
next prev parent reply other threads:[~2007-09-13 21:08 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-13 21:07 [PATCH 00/22] [POWERPC] Patches in for-2.6.24 Kumar Gala
2007-09-13 21:07 ` [PATCH 01/22] ucc_geth: kill unused include Kumar Gala
2007-09-13 21:07 ` [PATCH 02/22] [POWERPC] 85xx: Renamed mpc8544_ds.c to mpc85xx_ds.c Kumar Gala
2007-09-13 21:07 ` [PATCH 03/22] [POWERPC] 85xx: Clean up from 85xx_ds rename Kumar Gala
2007-09-13 21:07 ` [PATCH 04/22] [POWERPC] Update mpc7448hpc2 device tree to be compatible for tsi109 chip Kumar Gala
2007-09-13 21:07 ` [PATCH 05/22] [POWERPC] linkstation updates Kumar Gala
2007-09-13 21:07 ` [PATCH 06/22] [POWERPC] 86xx: Remove unnecessary loops_per_jiffy initialization code Kumar Gala
2007-09-13 21:07 ` [PATCH 07/22] [POWERPC] 85xx: " Kumar Gala
2007-09-13 21:07 ` [PATCH 08/22] [POWERPC] fsl_soc.c cleanup Kumar Gala
2007-09-13 21:07 ` [PATCH 09/22] [POWERPC] Handle alignment faults on SPE load/store instructions Kumar Gala
2007-09-13 21:07 ` [PATCH 10/22] [POWERPC] 85xx: Add basic Uniprocessor MPC8572 DS port Kumar Gala
2007-09-13 21:07 ` [PATCH 11/22] [POWERPC] DTS cleanup Kumar Gala
2007-09-13 21:07 ` [PATCH 12/22] [POWERPC] Move PCI nodes to be sibilings with SOC nodes Kumar Gala
2007-09-13 21:07 ` [PATCH 13/22] [POWERPC] 83xx: Removed PCI exclude of PHB Kumar Gala
2007-09-13 21:07 ` [PATCH 14/22] [POWERPC] Add cpu feature for SPE handling Kumar Gala
2007-09-13 21:07 ` Kumar Gala [this message]
2007-09-13 21:07 ` [PATCH 16/22] [PPC] Add clrbits8 and setbits8 Kumar Gala
2007-09-13 21:07 ` [PATCH 17/22] [POWERPC] QE: extern par_io_config_pin and par_io_data_set funcs Kumar Gala
2007-09-13 21:07 ` [PATCH 18/22] [POWERPC] add clrsetbits macros Kumar Gala
2007-09-13 21:07 ` [PATCH 19/22] [POWERPC] 86xx: Fix definition of global-utilites structure Kumar Gala
2007-09-13 21:07 ` [PATCH 20/22] [POWERPC] 52xx: Fix mpc52xx_uart_of_assign to use correct index Kumar Gala
2007-09-13 21:07 ` [PATCH 21/22] [POWERPC] fsl_soc: add support for fsl_spi Kumar Gala
2007-09-13 21:08 ` [PATCH 22/22] [POWERPC] MPC832x_RDB: Update dts to use SPI1 in QE, register mmc_spi stub Kumar Gala
2007-09-14 12:32 ` Paul Mackerras
2007-09-14 13:21 ` Kumar Gala
2007-09-14 13:50 ` Kumar Gala
2007-09-13 22:54 ` [PATCH 04/22] [POWERPC] Update mpc7448hpc2 device tree to be compatible for tsi109 chip Segher Boessenkool
2007-09-14 13:28 ` Kumar Gala
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11897177042582-git-send-email-galak@kernel.crashing.org \
--to=galak@kernel$(echo .)crashing.org \
--cc=linuxppc-dev@ozlabs$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox