Message ID | 20180511061303.10728-3-alastair@au1.ibm.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 3449f191ca9be1a6ac9757b8ab55f239092362e5 |
Headers | show |
Series | ocxl: Implement Power9 as_notify/wait for OpenCAPI | expand |
Le 11/05/2018 à 08:12, Alastair D'Silva a écrit : > From: Alastair D'Silva <alastair@d-silva.org> > > Switch the use of TIDR on it's CPU feature, rather than assuming it > is available based on architecture. > > Signed-off-by: Alastair D'Silva <alastair@d-silva.org> > --- Reviewed-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> > arch/powerpc/kernel/process.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c > index 1237f13fed51..3b00da47699b 100644 > --- a/arch/powerpc/kernel/process.c > +++ b/arch/powerpc/kernel/process.c > @@ -1154,7 +1154,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 > @@ -1570,7 +1570,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; > } > @@ -1593,7 +1593,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) >
On 11/05/18 16:12, Alastair D'Silva wrote: > From: Alastair D'Silva <alastair@d-silva.org> > > Switch the use of TIDR on it's CPU feature, rather than assuming it > is available based on architecture. > > Signed-off-by: Alastair D'Silva <alastair@d-silva.org> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 1237f13fed51..3b00da47699b 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c @@ -1154,7 +1154,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 @@ -1570,7 +1570,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; } @@ -1593,7 +1593,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)