|
@@ -1569,16 +1569,19 @@ void arch_release_task_struct(struct task_struct *t)
|
|
*/
|
|
*/
|
|
int set_thread_tidr(struct task_struct *t)
|
|
int set_thread_tidr(struct task_struct *t)
|
|
{
|
|
{
|
|
|
|
+ int rc;
|
|
|
|
+
|
|
if (!cpu_has_feature(CPU_FTR_ARCH_300))
|
|
if (!cpu_has_feature(CPU_FTR_ARCH_300))
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
if (t != current)
|
|
if (t != current)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
- t->thread.tidr = assign_thread_tidr();
|
|
|
|
- if (t->thread.tidr < 0)
|
|
|
|
- return t->thread.tidr;
|
|
|
|
|
|
+ rc = assign_thread_tidr();
|
|
|
|
+ if (rc < 0)
|
|
|
|
+ return rc;
|
|
|
|
|
|
|
|
+ t->thread.tidr = rc;
|
|
mtspr(SPRN_TIDR, t->thread.tidr);
|
|
mtspr(SPRN_TIDR, t->thread.tidr);
|
|
|
|
|
|
return 0;
|
|
return 0;
|