aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/process.c
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2014-04-15 06:55:07 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2014-05-20 02:58:47 -0400
commitd3a73acbc26a4a81a01a35fd162973e53d0386f5 (patch)
tree5b8fd3880f3b38575b1a043f3f4f07623a633bd1 /arch/s390/kernel/process.c
parentbeef560b4cdfafb2211a856e1d722540f5151933 (diff)
s390: split TIF bits into CIF, PIF and TIF bits
The oi and ni instructions used in entry[64].S to set and clear bits in the thread-flags are not guaranteed to be atomic in regard to other CPUs. Split the TIF bits into CPU, pt_regs and thread-info specific bits. Updates on the TIF bits are done with atomic instructions, updates on CPU and pt_regs bits are done with non-atomic instructions. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/process.c')
-rw-r--r--arch/s390/kernel/process.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
index dd145321d215..93b9ca42e5c0 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -64,7 +64,7 @@ unsigned long thread_saved_pc(struct task_struct *tsk)
64void arch_cpu_idle(void) 64void arch_cpu_idle(void)
65{ 65{
66 local_mcck_disable(); 66 local_mcck_disable();
67 if (test_thread_flag(TIF_MCCK_PENDING)) { 67 if (test_cpu_flag(CIF_MCCK_PENDING)) {
68 local_mcck_enable(); 68 local_mcck_enable();
69 local_irq_enable(); 69 local_irq_enable();
70 return; 70 return;
@@ -76,7 +76,7 @@ void arch_cpu_idle(void)
76 76
77void arch_cpu_idle_exit(void) 77void arch_cpu_idle_exit(void)
78{ 78{
79 if (test_thread_flag(TIF_MCCK_PENDING)) 79 if (test_cpu_flag(CIF_MCCK_PENDING))
80 s390_handle_mcck(); 80 s390_handle_mcck();
81} 81}
82 82
@@ -123,7 +123,6 @@ int copy_thread(unsigned long clone_flags, unsigned long new_stackp,
123 memset(&p->thread.per_user, 0, sizeof(p->thread.per_user)); 123 memset(&p->thread.per_user, 0, sizeof(p->thread.per_user));
124 memset(&p->thread.per_event, 0, sizeof(p->thread.per_event)); 124 memset(&p->thread.per_event, 0, sizeof(p->thread.per_event));
125 clear_tsk_thread_flag(p, TIF_SINGLE_STEP); 125 clear_tsk_thread_flag(p, TIF_SINGLE_STEP);
126 clear_tsk_thread_flag(p, TIF_PER_TRAP);
127 /* Initialize per thread user and system timer values */ 126 /* Initialize per thread user and system timer values */
128 ti = task_thread_info(p); 127 ti = task_thread_info(p);
129 ti->user_timer = 0; 128 ti->user_timer = 0;
@@ -152,6 +151,7 @@ int copy_thread(unsigned long clone_flags, unsigned long new_stackp,
152 } 151 }
153 frame->childregs = *current_pt_regs(); 152 frame->childregs = *current_pt_regs();
154 frame->childregs.gprs[2] = 0; /* child returns 0 on fork. */ 153 frame->childregs.gprs[2] = 0; /* child returns 0 on fork. */
154 frame->childregs.flags = 0;
155 if (new_stackp) 155 if (new_stackp)
156 frame->childregs.gprs[15] = new_stackp; 156 frame->childregs.gprs[15] = new_stackp;
157 157