powerpc: Replace current_thread_info()->task with current
authorChristophe Leroy <christophe.leroy@c-s.fr>
Thu, 17 Jan 2019 12:25:12 +0000 (23:25 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Sat, 23 Feb 2019 11:31:40 +0000 (22:31 +1100)
We have a few places that use current_thread_info()->task to access
current. This won't work with THREAD_INFO_IN_TASK so fix them now.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
[mpe: Split out of larger patch]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/process.c

index 791bd8ea475dee34b5f1df6e5d93b8511a0030ac..dc2aaaf75c87b328111f84dce7c113d8dadd2e82 100644 (file)
@@ -1231,8 +1231,8 @@ struct task_struct *__switch_to(struct task_struct *prev,
                batch->active = 1;
        }
 
-       if (current_thread_info()->task->thread.regs) {
-               restore_math(current_thread_info()->task->thread.regs);
+       if (current->thread.regs) {
+               restore_math(current->thread.regs);
 
                /*
                 * The copy-paste buffer can only store into foreign real
@@ -1242,7 +1242,7 @@ struct task_struct *__switch_to(struct task_struct *prev,
                 * mappings, we must issue a cp_abort to clear any state and
                 * prevent snooping, corruption or a covert channel.
                 */
-               if (current_thread_info()->task->thread.used_vas)
+               if (current->thread.used_vas)
                        asm volatile(PPC_CP_ABORT);
        }
 #endif /* CONFIG_PPC_BOOK3S_64 */