Commit b51b1153 authored by Anton Blanchard's avatar Anton Blanchard Committed by Michael Ellerman

powerpc: Remove NULL task struct pointer checks in FP and vector code

We used to allow giveup_*() to be called with a NULL task struct
pointer. Now those cases are handled in the caller we can remove
the checks. We can also remove giveup_altivec_notask() which is also
unused.
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 611b0e5c
...@@ -38,7 +38,6 @@ static inline void giveup_fpu(struct task_struct *t) { } ...@@ -38,7 +38,6 @@ static inline void giveup_fpu(struct task_struct *t) { }
#ifdef CONFIG_ALTIVEC #ifdef CONFIG_ALTIVEC
extern void flush_altivec_to_thread(struct task_struct *); extern void flush_altivec_to_thread(struct task_struct *);
extern void giveup_altivec(struct task_struct *); extern void giveup_altivec(struct task_struct *);
extern void giveup_altivec_notask(void);
#else #else
static inline void flush_altivec_to_thread(struct task_struct *t) static inline void flush_altivec_to_thread(struct task_struct *t)
{ {
......
...@@ -173,8 +173,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_VSX) ...@@ -173,8 +173,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_VSX)
MTMSRD(r5) /* enable use of fpu now */ MTMSRD(r5) /* enable use of fpu now */
SYNC_601 SYNC_601
isync isync
PPC_LCMPI 0,r3,0
beqlr- /* if no previous owner, done */
addi r3,r3,THREAD /* want THREAD of task */ addi r3,r3,THREAD /* want THREAD of task */
PPC_LL r6,THREAD_FPSAVEAREA(r3) PPC_LL r6,THREAD_FPSAVEAREA(r3)
PPC_LL r5,PT_REGS(r3) PPC_LL r5,PT_REGS(r3)
......
...@@ -992,8 +992,6 @@ _GLOBAL(giveup_spe) ...@@ -992,8 +992,6 @@ _GLOBAL(giveup_spe)
oris r5,r5,MSR_SPE@h oris r5,r5,MSR_SPE@h
mtmsr r5 /* enable use of SPE now */ mtmsr r5 /* enable use of SPE now */
isync isync
cmpi 0,r3,0
beqlr- /* if no previous owner, done */
addi r3,r3,THREAD /* want THREAD of task */ addi r3,r3,THREAD /* want THREAD of task */
lwz r5,PT_REGS(r3) lwz r5,PT_REGS(r3)
cmpi 0,r5,0 cmpi 0,r5,0
......
...@@ -111,16 +111,6 @@ _GLOBAL(load_up_altivec) ...@@ -111,16 +111,6 @@ _GLOBAL(load_up_altivec)
/* restore registers and return */ /* restore registers and return */
blr blr
_GLOBAL(giveup_altivec_notask)
mfmsr r3
andis. r4,r3,MSR_VEC@h
bnelr /* Already enabled? */
oris r3,r3,MSR_VEC@h
SYNC
MTMSRD(r3) /* enable use of VMX now */
isync
blr
/* /*
* giveup_altivec(tsk) * giveup_altivec(tsk)
* Disable VMX for the task given as the argument, * Disable VMX for the task given as the argument,
...@@ -133,8 +123,6 @@ _GLOBAL(giveup_altivec) ...@@ -133,8 +123,6 @@ _GLOBAL(giveup_altivec)
SYNC SYNC
MTMSRD(r5) /* enable use of VMX now */ MTMSRD(r5) /* enable use of VMX now */
isync isync
PPC_LCMPI 0,r3,0
beqlr /* if no previous owner, done */
addi r3,r3,THREAD /* want THREAD of task */ addi r3,r3,THREAD /* want THREAD of task */
PPC_LL r7,THREAD_VRSAVEAREA(r3) PPC_LL r7,THREAD_VRSAVEAREA(r3)
PPC_LL r5,PT_REGS(r3) PPC_LL r5,PT_REGS(r3)
...@@ -203,8 +191,6 @@ _GLOBAL(__giveup_vsx) ...@@ -203,8 +191,6 @@ _GLOBAL(__giveup_vsx)
mtmsrd r5 /* enable use of VSX now */ mtmsrd r5 /* enable use of VSX now */
isync isync
cmpdi 0,r3,0
beqlr- /* if no previous owner, done */
addi r3,r3,THREAD /* want THREAD of task */ addi r3,r3,THREAD /* want THREAD of task */
ld r5,PT_REGS(r3) ld r5,PT_REGS(r3)
cmpdi 0,r5,0 cmpdi 0,r5,0
......
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