mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 12:25:08 +07:00
powerpc/process: Remove useless #ifdef CONFIG_VSX
cpu_has_feature(CPU_FTR_VSX) returns false when CONFIG_VSX is not set. There is no need to enclose the test in an #ifdef CONFIG_VSX. Remove it. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/0eb61cf0dc66d781d47deb2228498cd61d03a754.1597643221.git.christophe.leroy@csgroup.eu
This commit is contained in:
parent
60d62bfd24
commit
80739c2bd2
@ -124,10 +124,8 @@ unsigned long notrace msr_check_and_set(unsigned long bits)
|
||||
|
||||
newmsr = oldmsr | bits;
|
||||
|
||||
#ifdef CONFIG_VSX
|
||||
if (cpu_has_feature(CPU_FTR_VSX) && (bits & MSR_FP))
|
||||
newmsr |= MSR_VSX;
|
||||
#endif
|
||||
|
||||
if (oldmsr != newmsr)
|
||||
mtmsr_isync(newmsr);
|
||||
@ -144,10 +142,8 @@ void notrace __msr_check_and_clear(unsigned long bits)
|
||||
|
||||
newmsr = oldmsr & ~bits;
|
||||
|
||||
#ifdef CONFIG_VSX
|
||||
if (cpu_has_feature(CPU_FTR_VSX) && (bits & MSR_FP))
|
||||
newmsr &= ~MSR_VSX;
|
||||
#endif
|
||||
|
||||
if (oldmsr != newmsr)
|
||||
mtmsr_isync(newmsr);
|
||||
@ -162,10 +158,8 @@ static void __giveup_fpu(struct task_struct *tsk)
|
||||
save_fpu(tsk);
|
||||
msr = tsk->thread.regs->msr;
|
||||
msr &= ~(MSR_FP|MSR_FE0|MSR_FE1);
|
||||
#ifdef CONFIG_VSX
|
||||
if (cpu_has_feature(CPU_FTR_VSX))
|
||||
msr &= ~MSR_VSX;
|
||||
#endif
|
||||
tsk->thread.regs->msr = msr;
|
||||
}
|
||||
|
||||
@ -245,10 +239,8 @@ static void __giveup_altivec(struct task_struct *tsk)
|
||||
save_altivec(tsk);
|
||||
msr = tsk->thread.regs->msr;
|
||||
msr &= ~MSR_VEC;
|
||||
#ifdef CONFIG_VSX
|
||||
if (cpu_has_feature(CPU_FTR_VSX))
|
||||
msr &= ~MSR_VSX;
|
||||
#endif
|
||||
tsk->thread.regs->msr = msr;
|
||||
}
|
||||
|
||||
@ -421,10 +413,8 @@ static int __init init_msr_all_available(void)
|
||||
if (cpu_has_feature(CPU_FTR_ALTIVEC))
|
||||
msr_all_available |= MSR_VEC;
|
||||
#endif
|
||||
#ifdef CONFIG_VSX
|
||||
if (cpu_has_feature(CPU_FTR_VSX))
|
||||
msr_all_available |= MSR_VSX;
|
||||
#endif
|
||||
#ifdef CONFIG_SPE
|
||||
if (cpu_has_feature(CPU_FTR_SPE))
|
||||
msr_all_available |= MSR_SPE;
|
||||
@ -509,19 +499,18 @@ static bool should_restore_altivec(void) { return false; }
|
||||
static void do_restore_altivec(void) { }
|
||||
#endif /* CONFIG_ALTIVEC */
|
||||
|
||||
#ifdef CONFIG_VSX
|
||||
static bool should_restore_vsx(void)
|
||||
{
|
||||
if (cpu_has_feature(CPU_FTR_VSX))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
#ifdef CONFIG_VSX
|
||||
static void do_restore_vsx(void)
|
||||
{
|
||||
current->thread.used_vsr = 1;
|
||||
}
|
||||
#else
|
||||
static bool should_restore_vsx(void) { return false; }
|
||||
static void do_restore_vsx(void) { }
|
||||
#endif /* CONFIG_VSX */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user