* [PATCH] [POWERPC] iSeries: fix section mismatch warnings
@ 2007-07-24 23:27 Stephen Rothwell
2007-07-25 16:55 ` Will Schmidt
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2007-07-24 23:27 UTC (permalink / raw)
To: paulus; +Cc: ppc-dev
WARNING: vmlinux.o(.text+0x8124): Section mismatch: reference to .init.text:.iSeries_early_setup (between '.__start_initialization_iSeries' and '.__mmu_off')
WARNING: vmlinux.o(.text+0x8128): Section mismatch: reference to .init.text:.early_setup (between '.__start_initialization_iSeries' and '.__mmu_off')
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/powerpc/kernel/head_64.S | 7 ++++---
include/asm-powerpc/ppc_asm.h | 12 ++++++++++++
2 files changed, 16 insertions(+), 3 deletions(-)
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index 8cdd48e..1448af9 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -809,8 +809,9 @@ system_reset_iSeries:
mtmsrd r24 /* RI on */
lhz r24,PACAPACAINDEX(r13) /* Get processor # */
cmpwi 0,r24,0 /* Are we processor 0? */
- beq .__start_initialization_iSeries /* Start up the first processor */
- mfspr r4,SPRN_CTRLF
+ bne 1f
+ b .__start_initialization_iSeries /* Start up the first processor */
+1: mfspr r4,SPRN_CTRLF
li r5,CTRL_RUNLATCH /* Turn off the run light */
andc r4,r4,r5
mtspr SPRN_CTRLT,r4
@@ -1611,7 +1612,7 @@ _GLOBAL(generic_secondary_smp_init)
#endif
#ifdef CONFIG_PPC_ISERIES
-_STATIC(__start_initialization_iSeries)
+_INIT_STATIC(__start_initialization_iSeries)
/* Clear out the BSS */
LOAD_REG_IMMEDIATE(r11,__bss_stop)
LOAD_REG_IMMEDIATE(r8,__bss_start)
diff --git a/include/asm-powerpc/ppc_asm.h b/include/asm-powerpc/ppc_asm.h
index fa083d8..6532572 100644
--- a/include/asm-powerpc/ppc_asm.h
+++ b/include/asm-powerpc/ppc_asm.h
@@ -181,6 +181,18 @@ name: \
.type GLUE(.,name),@function; \
GLUE(.,name):
+#define _INIT_STATIC(name) \
+ .section ".text.init.refok"; \
+ .align 2 ; \
+ .section ".opd","aw"; \
+name: \
+ .quad GLUE(.,name); \
+ .quad .TOC.@tocbase; \
+ .quad 0; \
+ .previous; \
+ .type GLUE(.,name),@function; \
+GLUE(.,name):
+
#else /* 32-bit */
#define _GLOBAL(n) \
--
1.5.2.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] [POWERPC] iSeries: fix section mismatch warnings
2007-07-24 23:27 [PATCH] [POWERPC] iSeries: fix section mismatch warnings Stephen Rothwell
@ 2007-07-25 16:55 ` Will Schmidt
2007-07-26 1:56 ` Stephen Rothwell
0 siblings, 1 reply; 4+ messages in thread
From: Will Schmidt @ 2007-07-25 16:55 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: ppc-dev, paulus
> diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
> index 8cdd48e..1448af9 100644
> --- a/arch/powerpc/kernel/head_64.S
> +++ b/arch/powerpc/kernel/head_64.S
> @@ -809,8 +809,9 @@ system_reset_iSeries:
> mtmsrd r24 /* RI on */
> lhz r24,PACAPACAINDEX(r13) /* Get processor # */
> cmpwi 0,r24,0 /* Are we processor 0? */
> - beq .__start_initialization_iSeries /* Start up the first processor */
> - mfspr r4,SPRN_CTRLF
> + bne 1f
> + b .__start_initialization_iSeries /* Start up the first processor */
> +1: mfspr r4,SPRN_CTRLF
> li r5,CTRL_RUNLATCH /* Turn off the run light */
> andc r4,r4,r5
> mtspr SPRN_CTRLT,r4
This part isnt clicking for me..
How does changing a "beq" to a "bne" over a "b" fit into changing
__start_initialization_iSeries static?
-Will
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] [POWERPC] iSeries: fix section mismatch warnings
2007-07-25 16:55 ` Will Schmidt
@ 2007-07-26 1:56 ` Stephen Rothwell
2007-07-26 19:39 ` Will Schmidt
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Rothwell @ 2007-07-26 1:56 UTC (permalink / raw)
To: will_schmidt; +Cc: ppc-dev, paulus
[-- Attachment #1: Type: text/plain, Size: 1180 bytes --]
Hi Will,
On Wed, 25 Jul 2007 11:55:31 -0500 Will Schmidt <will_schmidt@vnet.ibm.com> wrote:
>
> > cmpwi 0,r24,0 /* Are we processor 0? */
> > - beq .__start_initialization_iSeries /* Start up the first processor */
> > - mfspr r4,SPRN_CTRLF
> > + bne 1f
> > + b .__start_initialization_iSeries /* Start up the first processor */
> > +1: mfspr r4,SPRN_CTRLF
> > li r5,CTRL_RUNLATCH /* Turn off the run light */
>
> This part isnt clicking for me..
> How does changing a "beq" to a "bne" over a "b" fit into changing
> __start_initialization_iSeries static?
Because I moved __start_initialization_iSeries into another section, it
ends up too far away for a conditional branch so something adds a jump
table to the .text section and changes this branch to be via that table.
Unfortunately, the jump table ends up at the start of the .text and ruins
our carefully laid out kernel image. By inverting the test I can turn
the branch into an unconditional one which has a larger possible offse
(effectively building the jump table manually).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] [POWERPC] iSeries: fix section mismatch warnings
2007-07-26 1:56 ` Stephen Rothwell
@ 2007-07-26 19:39 ` Will Schmidt
0 siblings, 0 replies; 4+ messages in thread
From: Will Schmidt @ 2007-07-26 19:39 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: ppc-dev, paulus
On Thu, 2007-07-26 at 11:56 +1000, Stephen Rothwell wrote:
> Hi Will,
>
> On Wed, 25 Jul 2007 11:55:31 -0500 Will Schmidt <will_schmidt@vnet.ibm.com> wrote:
> >
> > > cmpwi 0,r24,0 /* Are we processor 0? */
> > > - beq .__start_initialization_iSeries /* Start up the first processor */
> > > - mfspr r4,SPRN_CTRLF
> > > + bne 1f
> > > + b .__start_initialization_iSeries /* Start up the first processor */
> > > +1: mfspr r4,SPRN_CTRLF
> > > li r5,CTRL_RUNLATCH /* Turn off the run light */
> >
> > This part isnt clicking for me..
> > How does changing a "beq" to a "bne" over a "b" fit into changing
> > __start_initialization_iSeries static?
>
> Because I moved __start_initialization_iSeries into another section, it
> ends up too far away for a conditional branch so something adds a jump
> table to the .text section and changes this branch to be via that table.
> Unfortunately, the jump table ends up at the start of the .text and ruins
> our carefully laid out kernel image. By inverting the test I can turn
> the branch into an unconditional one which has a larger possible offse
> (effectively building the jump table manually).
Gotcha, thanks for the clarification. :-)
-Will
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-07-26 19:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-24 23:27 [PATCH] [POWERPC] iSeries: fix section mismatch warnings Stephen Rothwell
2007-07-25 16:55 ` Will Schmidt
2007-07-26 1:56 ` Stephen Rothwell
2007-07-26 19:39 ` Will Schmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).