Commit 3449f191 authored by Alastair D'Silva's avatar Alastair D'Silva Committed by Michael Ellerman

powerpc: Use TIDR CPU feature to control TIDR allocation

Switch the use of TIDR on it's CPU feature, rather than assuming it
is available based on architecture.
Signed-off-by: default avatarAlastair D'Silva <alastair@d-silva.org>
Reviewed-by: default avatarFrederic Barrat <fbarrat@linux.vnet.ibm.com>
Reviewed-by: default avatarAndrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 81984428
......@@ -1151,7 +1151,7 @@ static inline void restore_sprs(struct thread_struct *old_thread,
mtspr(SPRN_TAR, new_thread->tar);
}
if (cpu_has_feature(CPU_FTR_ARCH_300) &&
if (cpu_has_feature(CPU_FTR_P9_TIDR) &&
old_thread->tidr != new_thread->tidr)
mtspr(SPRN_TIDR, new_thread->tidr);
#endif
......@@ -1553,7 +1553,7 @@ void clear_thread_tidr(struct task_struct *t)
if (!t->thread.tidr)
return;
if (!cpu_has_feature(CPU_FTR_ARCH_300)) {
if (!cpu_has_feature(CPU_FTR_P9_TIDR)) {
WARN_ON_ONCE(1);
return;
}
......@@ -1576,7 +1576,7 @@ int set_thread_tidr(struct task_struct *t)
{
int rc;
if (!cpu_has_feature(CPU_FTR_ARCH_300))
if (!cpu_has_feature(CPU_FTR_P9_TIDR))
return -EINVAL;
if (t != current)
......
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