]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - arch/s390/kernel/ptrace.c
Merge branch 'tracing/core' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic...
[net-next-2.6.git] / arch / s390 / kernel / ptrace.c
index 1720f380add54f11cc9e19737b7455942becc0af..33fdc5a7976472831185126e419a637807e48b1d 100644 (file)
@@ -65,6 +65,7 @@ FixPerRegisters(struct task_struct *task)
 {
        struct pt_regs *regs;
        per_struct *per_info;
+       per_cr_words cr_words;
 
        regs = task_pt_regs(task);
        per_info = (per_struct *) &task->thread.per_info;
@@ -98,6 +99,13 @@ FixPerRegisters(struct task_struct *task)
                per_info->control_regs.bits.storage_alt_space_ctl = 1;
        else
                per_info->control_regs.bits.storage_alt_space_ctl = 0;
+
+       if (task == current) {
+               __ctl_store(cr_words, 9, 11);
+               if (memcmp(&cr_words, &per_info->control_regs.words,
+                          sizeof(cr_words)) != 0)
+                       __ctl_load(per_info->control_regs.words, 9, 11);
+       }
 }
 
 void user_enable_single_step(struct task_struct *task)