Commit 2dc3d4cc authored by Liu Yu's avatar Liu Yu Committed by Kumar Gala

powerpc/e500: make load_up_spe a normal fuction

So that we can call it when improving SPE switch like book3e did for fp
switch.
Signed-off-by: default avatarLiu Yu <yu.liu@freescale.com>
Signed-off-by: default avatarOlivia Yin <hong-hua.yin@freescale.com>
Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
parent d729b900
...@@ -556,8 +556,10 @@ END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV) ...@@ -556,8 +556,10 @@ END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV)
/* SPE Unavailable */ /* SPE Unavailable */
START_EXCEPTION(SPEUnavailable) START_EXCEPTION(SPEUnavailable)
NORMAL_EXCEPTION_PROLOG(SPE_UNAVAIL) NORMAL_EXCEPTION_PROLOG(SPE_UNAVAIL)
bne load_up_spe beq 1f
addi r3,r1,STACK_FRAME_OVERHEAD bl load_up_spe
b fast_exception_return
1: addi r3,r1,STACK_FRAME_OVERHEAD
EXC_XFER_EE_LITE(0x2010, KernelSPE) EXC_XFER_EE_LITE(0x2010, KernelSPE)
#else #else
EXCEPTION(0x2020, SPE_UNAVAIL, SPEUnavailable, \ EXCEPTION(0x2020, SPE_UNAVAIL, SPEUnavailable, \
...@@ -778,7 +780,7 @@ tlb_write_entry: ...@@ -778,7 +780,7 @@ tlb_write_entry:
/* Note that the SPE support is closely modeled after the AltiVec /* Note that the SPE support is closely modeled after the AltiVec
* support. Changes to one are likely to be applicable to the * support. Changes to one are likely to be applicable to the
* other! */ * other! */
load_up_spe: _GLOBAL(load_up_spe)
/* /*
* Disable SPE for the task which had SPE previously, * Disable SPE for the task which had SPE previously,
* and save its SPE registers in its thread_struct. * and save its SPE registers in its thread_struct.
...@@ -826,20 +828,7 @@ load_up_spe: ...@@ -826,20 +828,7 @@ load_up_spe:
subi r4,r5,THREAD subi r4,r5,THREAD
stw r4,last_task_used_spe@l(r3) stw r4,last_task_used_spe@l(r3)
#endif /* !CONFIG_SMP */ #endif /* !CONFIG_SMP */
/* restore registers and return */ blr
2: REST_4GPRS(3, r11)
lwz r10,_CCR(r11)
REST_GPR(1, r11)
mtcr r10
lwz r10,_LINK(r11)
mtlr r10
REST_GPR(10, r11)
mtspr SPRN_SRR1,r9
mtspr SPRN_SRR0,r12
REST_GPR(9, r11)
REST_GPR(12, r11)
lwz r11,GPR11(r11)
rfi
/* /*
* SPE unavailable trap from kernel - print a message, but let * SPE unavailable trap from kernel - print a message, but let
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment