diff options
author | Michael Neuling <mikey@neuling.org> | 2008-06-25 00:07:18 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-06-30 21:28:45 -0400 |
commit | 6f3d8e6947ec98e358514fc0f7b2e37fe88a21bb (patch) | |
tree | b91f2832c61b80bce0137473f6dca6e7df36b7d8 /arch | |
parent | 10e343925ab5d9f6c651ad808f2e413e3cc053b3 (diff) |
powerpc: Make load_up_fpu and load_up_altivec callable
Make load_up_fpu and load_up_altivec callable so they can be reused by
the VSX code.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/fpu.S | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/head_32.S | 6 | ||||
-rw-r--r-- | arch/powerpc/kernel/head_64.S | 10 | ||||
-rw-r--r-- | arch/powerpc/kernel/head_booke.h | 6 |
4 files changed, 16 insertions, 8 deletions
diff --git a/arch/powerpc/kernel/fpu.S b/arch/powerpc/kernel/fpu.S index 821e152e093c..8a2b3d62b9b8 100644 --- a/arch/powerpc/kernel/fpu.S +++ b/arch/powerpc/kernel/fpu.S | |||
@@ -85,7 +85,7 @@ _GLOBAL(load_up_fpu) | |||
85 | #endif /* CONFIG_SMP */ | 85 | #endif /* CONFIG_SMP */ |
86 | /* restore registers and return */ | 86 | /* restore registers and return */ |
87 | /* we haven't used ctr or xer or lr */ | 87 | /* we haven't used ctr or xer or lr */ |
88 | b fast_exception_return | 88 | blr |
89 | 89 | ||
90 | /* | 90 | /* |
91 | * giveup_fpu(tsk) | 91 | * giveup_fpu(tsk) |
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S index 785af9b56591..99ee2f0f0f2b 100644 --- a/arch/powerpc/kernel/head_32.S +++ b/arch/powerpc/kernel/head_32.S | |||
@@ -421,8 +421,10 @@ BEGIN_FTR_SECTION | |||
421 | b ProgramCheck | 421 | b ProgramCheck |
422 | END_FTR_SECTION_IFSET(CPU_FTR_FPU_UNAVAILABLE) | 422 | END_FTR_SECTION_IFSET(CPU_FTR_FPU_UNAVAILABLE) |
423 | EXCEPTION_PROLOG | 423 | EXCEPTION_PROLOG |
424 | bne load_up_fpu /* if from user, just load it up */ | 424 | beq 1f |
425 | addi r3,r1,STACK_FRAME_OVERHEAD | 425 | bl load_up_fpu /* if from user, just load it up */ |
426 | b fast_exception_return | ||
427 | 1: addi r3,r1,STACK_FRAME_OVERHEAD | ||
426 | EXC_XFER_EE_LITE(0x800, kernel_fp_unavailable_exception) | 428 | EXC_XFER_EE_LITE(0x800, kernel_fp_unavailable_exception) |
427 | 429 | ||
428 | /* Decrementer */ | 430 | /* Decrementer */ |
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index dd9e6595cae5..64433731d995 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S | |||
@@ -741,7 +741,8 @@ fp_unavailable_common: | |||
741 | ENABLE_INTS | 741 | ENABLE_INTS |
742 | bl .kernel_fp_unavailable_exception | 742 | bl .kernel_fp_unavailable_exception |
743 | BUG_OPCODE | 743 | BUG_OPCODE |
744 | 1: b .load_up_fpu | 744 | 1: bl .load_up_fpu |
745 | b fast_exception_return | ||
745 | 746 | ||
746 | .align 7 | 747 | .align 7 |
747 | .globl altivec_unavailable_common | 748 | .globl altivec_unavailable_common |
@@ -749,7 +750,10 @@ altivec_unavailable_common: | |||
749 | EXCEPTION_PROLOG_COMMON(0xf20, PACA_EXGEN) | 750 | EXCEPTION_PROLOG_COMMON(0xf20, PACA_EXGEN) |
750 | #ifdef CONFIG_ALTIVEC | 751 | #ifdef CONFIG_ALTIVEC |
751 | BEGIN_FTR_SECTION | 752 | BEGIN_FTR_SECTION |
752 | bne .load_up_altivec /* if from user, just load it up */ | 753 | beq 1f |
754 | bl .load_up_altivec | ||
755 | b fast_exception_return | ||
756 | 1: | ||
753 | END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) | 757 | END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) |
754 | #endif | 758 | #endif |
755 | bl .save_nvgprs | 759 | bl .save_nvgprs |
@@ -829,7 +833,7 @@ _STATIC(load_up_altivec) | |||
829 | std r4,0(r3) | 833 | std r4,0(r3) |
830 | #endif /* CONFIG_SMP */ | 834 | #endif /* CONFIG_SMP */ |
831 | /* restore registers and return */ | 835 | /* restore registers and return */ |
832 | b fast_exception_return | 836 | blr |
833 | #endif /* CONFIG_ALTIVEC */ | 837 | #endif /* CONFIG_ALTIVEC */ |
834 | 838 | ||
835 | /* | 839 | /* |
diff --git a/arch/powerpc/kernel/head_booke.h b/arch/powerpc/kernel/head_booke.h index 505494f1ee7c..b0461be1c928 100644 --- a/arch/powerpc/kernel/head_booke.h +++ b/arch/powerpc/kernel/head_booke.h | |||
@@ -376,8 +376,10 @@ label: | |||
376 | #define FP_UNAVAILABLE_EXCEPTION \ | 376 | #define FP_UNAVAILABLE_EXCEPTION \ |
377 | START_EXCEPTION(FloatingPointUnavailable) \ | 377 | START_EXCEPTION(FloatingPointUnavailable) \ |
378 | NORMAL_EXCEPTION_PROLOG; \ | 378 | NORMAL_EXCEPTION_PROLOG; \ |
379 | bne load_up_fpu; /* if from user, just load it up */ \ | 379 | beq 1f; \ |
380 | addi r3,r1,STACK_FRAME_OVERHEAD; \ | 380 | bl load_up_fpu; /* if from user, just load it up */ \ |
381 | b fast_exception_return; \ | ||
382 | 1: addi r3,r1,STACK_FRAME_OVERHEAD; \ | ||
381 | EXC_XFER_EE_LITE(0x800, kernel_fp_unavailable_exception) | 383 | EXC_XFER_EE_LITE(0x800, kernel_fp_unavailable_exception) |
382 | 384 | ||
383 | #ifndef __ASSEMBLY__ | 385 | #ifndef __ASSEMBLY__ |