summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/switch_to.h
diff options
context:
space:
mode:
authorSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>2017-11-08 05:23:54 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2017-11-12 01:03:09 +0300
commit9d2a4d71332cfdf4ea90754ad9b2f05a5ee5f6c7 (patch)
treeb31b08a67de28433232370862cfd128707a10838 /arch/powerpc/include/asm/switch_to.h
parentec233ede4c8654894610ea54f4dae7adc954ac62 (diff)
downloadlinux-9d2a4d71332cfdf4ea90754ad9b2f05a5ee5f6c7.tar.xz
powerpc: Define set_thread_uses_vas()
A CP_ABORT instruction is required in processes that have mapped a VAS "paste address" with the intention of using COPY/PASTE instructions. But since CP_ABORT is expensive, we want to restrict it to only processes that use/intend to use COPY/PASTE. Define an interface, set_thread_uses_vas(), that VAS can use to indicate that the current process opened a send window. During context switch, issue CP_ABORT only for processes that have the flag set. Thanks for input from Nick Piggin, Michael Ellerman. Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> [mpe: Fix to not use new_thread after _switch() returns] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include/asm/switch_to.h')
-rw-r--r--arch/powerpc/include/asm/switch_to.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/switch_to.h b/arch/powerpc/include/asm/switch_to.h
index f5da32f43fed..07ff06e9dae1 100644
--- a/arch/powerpc/include/asm/switch_to.h
+++ b/arch/powerpc/include/asm/switch_to.h
@@ -91,6 +91,8 @@ static inline void clear_task_ebb(struct task_struct *t)
#endif
}
+extern int set_thread_uses_vas(void);
+
extern int set_thread_tidr(struct task_struct *t);
extern void clear_thread_tidr(struct task_struct *t);