aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel/process.c')
-rw-r--r--arch/s390/kernel/process.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
index ec2e03b22ead..6ba42222b542 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -32,6 +32,7 @@
32#include <linux/kernel_stat.h> 32#include <linux/kernel_stat.h>
33#include <linux/syscalls.h> 33#include <linux/syscalls.h>
34#include <linux/compat.h> 34#include <linux/compat.h>
35#include <linux/kprobes.h>
35#include <asm/compat.h> 36#include <asm/compat.h>
36#include <asm/uaccess.h> 37#include <asm/uaccess.h>
37#include <asm/pgtable.h> 38#include <asm/pgtable.h>
@@ -41,6 +42,7 @@
41#include <asm/irq.h> 42#include <asm/irq.h>
42#include <asm/timer.h> 43#include <asm/timer.h>
43#include <asm/nmi.h> 44#include <asm/nmi.h>
45#include <asm/smp.h>
44#include "entry.h" 46#include "entry.h"
45 47
46asmlinkage void ret_from_fork(void) asm ("ret_from_fork"); 48asmlinkage void ret_from_fork(void) asm ("ret_from_fork");
@@ -75,13 +77,8 @@ unsigned long thread_saved_pc(struct task_struct *tsk)
75 */ 77 */
76static void default_idle(void) 78static void default_idle(void)
77{ 79{
78 /* CPU is going idle. */ 80 if (cpu_is_offline(smp_processor_id()))
79#ifdef CONFIG_HOTPLUG_CPU
80 if (cpu_is_offline(smp_processor_id())) {
81 preempt_enable_no_resched();
82 cpu_die(); 81 cpu_die();
83 }
84#endif
85 local_irq_disable(); 82 local_irq_disable();
86 if (need_resched()) { 83 if (need_resched()) {
87 local_irq_enable(); 84 local_irq_enable();
@@ -116,15 +113,17 @@ void cpu_idle(void)
116 } 113 }
117} 114}
118 115
119extern void kernel_thread_starter(void); 116extern void __kprobes kernel_thread_starter(void);
120 117
121asm( 118asm(
122 ".align 4\n" 119 ".section .kprobes.text, \"ax\"\n"
120 ".global kernel_thread_starter\n"
123 "kernel_thread_starter:\n" 121 "kernel_thread_starter:\n"
124 " la 2,0(10)\n" 122 " la 2,0(10)\n"
125 " basr 14,9\n" 123 " basr 14,9\n"
126 " la 2,0\n" 124 " la 2,0\n"
127 " br 11\n"); 125 " br 11\n"
126 ".previous\n");
128 127
129int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) 128int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
130{ 129{
@@ -214,8 +213,10 @@ int copy_thread(unsigned long clone_flags, unsigned long new_stackp,
214 /* start new process with ar4 pointing to the correct address space */ 213 /* start new process with ar4 pointing to the correct address space */
215 p->thread.mm_segment = get_fs(); 214 p->thread.mm_segment = get_fs();
216 /* Don't copy debug registers */ 215 /* Don't copy debug registers */
217 memset(&p->thread.per_info, 0, sizeof(p->thread.per_info)); 216 memset(&p->thread.per_user, 0, sizeof(p->thread.per_user));
217 memset(&p->thread.per_event, 0, sizeof(p->thread.per_event));
218 clear_tsk_thread_flag(p, TIF_SINGLE_STEP); 218 clear_tsk_thread_flag(p, TIF_SINGLE_STEP);
219 clear_tsk_thread_flag(p, TIF_PER_TRAP);
219 /* Initialize per thread user and system timer values */ 220 /* Initialize per thread user and system timer values */
220 ti = task_thread_info(p); 221 ti = task_thread_info(p);
221 ti->user_timer = 0; 222 ti->user_timer = 0;