|
@@ -40,6 +40,8 @@
|
|
|
#include <asm/prctl.h>
|
|
|
#include <asm/spec-ctrl.h>
|
|
|
|
|
|
+#include "process.h"
|
|
|
+
|
|
|
/*
|
|
|
* per-CPU TSS segments. Threads are completely 'soft' on Linux,
|
|
|
* no more per-task TSS's. The TSS size is kept cacheline-aligned
|
|
@@ -252,11 +254,12 @@ void arch_setup_new_exec(void)
|
|
|
enable_cpuid();
|
|
|
}
|
|
|
|
|
|
-static inline void switch_to_bitmap(struct tss_struct *tss,
|
|
|
- struct thread_struct *prev,
|
|
|
+static inline void switch_to_bitmap(struct thread_struct *prev,
|
|
|
struct thread_struct *next,
|
|
|
unsigned long tifp, unsigned long tifn)
|
|
|
{
|
|
|
+ struct tss_struct *tss = this_cpu_ptr(&cpu_tss_rw);
|
|
|
+
|
|
|
if (tifn & _TIF_IO_BITMAP) {
|
|
|
/*
|
|
|
* Copy the relevant range of the IO bitmap.
|
|
@@ -448,8 +451,7 @@ void speculation_ctrl_update(unsigned long tif)
|
|
|
preempt_enable();
|
|
|
}
|
|
|
|
|
|
-void __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p,
|
|
|
- struct tss_struct *tss)
|
|
|
+void __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p)
|
|
|
{
|
|
|
struct thread_struct *prev, *next;
|
|
|
unsigned long tifp, tifn;
|
|
@@ -459,7 +461,7 @@ void __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p,
|
|
|
|
|
|
tifn = READ_ONCE(task_thread_info(next_p)->flags);
|
|
|
tifp = READ_ONCE(task_thread_info(prev_p)->flags);
|
|
|
- switch_to_bitmap(tss, prev, next, tifp, tifn);
|
|
|
+ switch_to_bitmap(prev, next, tifp, tifn);
|
|
|
|
|
|
propagate_user_return_notify(prev_p, next_p);
|
|
|
|