* [PATCH] powerpc: Eliminate "exceeds stub group size" linker warning
@ 2006-11-01 1:01 Paul Mackerras
2006-11-01 14:50 ` Linus Torvalds
0 siblings, 1 reply; 3+ messages in thread
From: Paul Mackerras @ 2006-11-01 1:01 UTC (permalink / raw)
To: Linus Torvalds; +Cc: akpm, linuxppc-dev, linux-kernel
It turns out that the linker warnings on 64-bit powerpc about "section
blah exceeds stub group size" were being triggered by conditional
branches in head_64.S branching to global symbols, whether in
head_64.S or in other files. This eliminates the warnings by making
some global symbols in head_64.S no longer global, and by rearranging
some branches.
Signed-off-by: Paul Mackerras <paulus@samba.org>
---
Linus,
If you think this is 2.6.19 material, feel free to put it in your
tree. Otherwise I'll put it in the powerpc.git tree to go in for
2.6.20.
Paul.
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index 47fcff1..c005f15 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -505,7 +505,7 @@ BEGIN_FTR_SECTION
rlwimi r13,r12,16,0x20
mfcr r12
cmpwi r13,0x2c
- beq .do_stab_bolted_pSeries
+ beq do_stab_bolted_pSeries
mtcrf 0x80,r12
mfspr r12,SPRN_SPRG2
END_FTR_SECTION_IFCLR(CPU_FTR_SLB)
@@ -635,7 +635,7 @@ masked_interrupt:
b .
.align 7
-_GLOBAL(do_stab_bolted_pSeries)
+do_stab_bolted_pSeries:
mtcrf 0x80,r12
mfspr r12,SPRN_SPRG2
EXCEPTION_PROLOG_PSERIES(PACA_EXSLB, .do_stab_bolted)
@@ -1090,7 +1090,7 @@ slb_miss_fault:
li r5,0
std r4,_DAR(r1)
std r5,_DSISR(r1)
- b .handle_page_fault
+ b handle_page_fault
unrecov_user_slb:
EXCEPTION_PROLOG_COMMON(0x4200, PACA_EXGEN)
@@ -1218,12 +1218,13 @@ program_check_common:
.globl fp_unavailable_common
fp_unavailable_common:
EXCEPTION_PROLOG_COMMON(0x800, PACA_EXGEN)
- bne .load_up_fpu /* if from user, just load it up */
+ bne 1f /* if from user, just load it up */
bl .save_nvgprs
addi r3,r1,STACK_FRAME_OVERHEAD
ENABLE_INTS
bl .kernel_fp_unavailable_exception
BUG_OPCODE
+1: b .load_up_fpu
.align 7
.globl altivec_unavailable_common
@@ -1323,10 +1324,10 @@ _GLOBAL(do_hash_page)
std r4,_DSISR(r1)
andis. r0,r4,0xa450 /* weird error? */
- bne- .handle_page_fault /* if not, try to insert a HPTE */
+ bne- handle_page_fault /* if not, try to insert a HPTE */
BEGIN_FTR_SECTION
andis. r0,r4,0x0020 /* Is it a segment table fault? */
- bne- .do_ste_alloc /* If so handle it */
+ bne- do_ste_alloc /* If so handle it */
END_FTR_SECTION_IFCLR(CPU_FTR_SLB)
/*
@@ -1368,7 +1369,7 @@ BEGIN_FW_FTR_SECTION
* because ret_from_except_lite will check for and handle pending
* interrupts if necessary.
*/
- beq .ret_from_except_lite
+ beq 14f
END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES)
#endif
BEGIN_FW_FTR_SECTION
@@ -1390,16 +1391,17 @@ END_FW_FTR_SECTION_IFCLR(FW_FEATURE_ISER
ld r3,SOFTE(r1)
bl .local_irq_restore
b 11f
+14: b .ret_from_except_lite
/* Here we have a page fault that hash_page can't handle. */
-_GLOBAL(handle_page_fault)
+handle_page_fault:
ENABLE_INTS
11: ld r4,_DAR(r1)
ld r5,_DSISR(r1)
addi r3,r1,STACK_FRAME_OVERHEAD
bl .do_page_fault
cmpdi r3,0
- beq+ .ret_from_except_lite
+ beq+ 14b
bl .save_nvgprs
mr r5,r3
addi r3,r1,STACK_FRAME_OVERHEAD
@@ -1417,11 +1419,11 @@ _GLOBAL(handle_page_fault)
b .ret_from_except
/* here we have a segment miss */
-_GLOBAL(do_ste_alloc)
+do_ste_alloc:
bl .ste_allocate /* try to insert stab entry */
cmpdi r3,0
- beq+ fast_exception_return
- b .handle_page_fault
+ bne- handle_page_fault
+ b fast_exception_return
/*
* r13 points to the PACA, r9 contains the saved CR,
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] powerpc: Eliminate "exceeds stub group size" linker warning
2006-11-01 1:01 [PATCH] powerpc: Eliminate "exceeds stub group size" linker warning Paul Mackerras
@ 2006-11-01 14:50 ` Linus Torvalds
2006-11-01 22:43 ` Paul Mackerras
0 siblings, 1 reply; 3+ messages in thread
From: Linus Torvalds @ 2006-11-01 14:50 UTC (permalink / raw)
To: Paul Mackerras; +Cc: akpm, linuxppc-dev, linux-kernel
On Wed, 1 Nov 2006, Paul Mackerras wrote:
>
> If you think this is 2.6.19 material, feel free to put it in your
> tree. Otherwise I'll put it in the powerpc.git tree to go in for
> 2.6.20.
Hmm. I'd love to get rid of the warnings, because they obviously mean that
I don't look at warnings much at all ("they're all bogus"), but this patch
must be against some version of arch/powerpc/kernel/head_64.S that I've
never seen.
That "do_stab_bolted_pSeries" function is in a totally different place for
me, and the index that git diff mentiones of 47fcff1 doesn't exist in my
tree (so I've literally never had it).
Linus
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] powerpc: Eliminate "exceeds stub group size" linker warning
2006-11-01 14:50 ` Linus Torvalds
@ 2006-11-01 22:43 ` Paul Mackerras
0 siblings, 0 replies; 3+ messages in thread
From: Paul Mackerras @ 2006-11-01 22:43 UTC (permalink / raw)
To: Linus Torvalds; +Cc: akpm, linuxppc-dev, linux-kernel
Linus Torvalds writes:
> Hmm. I'd love to get rid of the warnings, because they obviously mean that
> I don't look at warnings much at all ("they're all bogus"), but this patch
> must be against some version of arch/powerpc/kernel/head_64.S that I've
> never seen.
Sorry, my mistake, it was against the "master" head of the powerpc.git
tree. New patch coming.
Paul.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-11-01 22:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-01 1:01 [PATCH] powerpc: Eliminate "exceeds stub group size" linker warning Paul Mackerras
2006-11-01 14:50 ` Linus Torvalds
2006-11-01 22:43 ` Paul Mackerras
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).