diff options
Diffstat (limited to 'arch/mn10300/include')
-rw-r--r-- | arch/mn10300/include/asm/frame.inc | 2 | ||||
-rw-r--r-- | arch/mn10300/include/asm/processor.h | 18 | ||||
-rw-r--r-- | arch/mn10300/include/asm/ptrace.h | 1 | ||||
-rw-r--r-- | arch/mn10300/include/asm/thread_info.h | 3 | ||||
-rw-r--r-- | arch/mn10300/include/asm/unistd.h | 2 |
5 files changed, 9 insertions, 17 deletions
diff --git a/arch/mn10300/include/asm/frame.inc b/arch/mn10300/include/asm/frame.inc index 2ee58e3eb6b..1c3eb4fda95 100644 --- a/arch/mn10300/include/asm/frame.inc +++ b/arch/mn10300/include/asm/frame.inc | |||
@@ -61,7 +61,7 @@ | |||
61 | ############################################################################### | 61 | ############################################################################### |
62 | .macro RESTORE_ALL | 62 | .macro RESTORE_ALL |
63 | # peel back the stack to the calling frame | 63 | # peel back the stack to the calling frame |
64 | # - this permits execve() to discard extra frames due to kernel syscalls | 64 | # - we need that when returning from interrupts to kernel mode |
65 | GET_THREAD_INFO a0 | 65 | GET_THREAD_INFO a0 |
66 | mov (TI_frame,a0),fp | 66 | mov (TI_frame,a0),fp |
67 | mov fp,sp | 67 | mov fp,sp |
diff --git a/arch/mn10300/include/asm/processor.h b/arch/mn10300/include/asm/processor.h index 247928c9f54..8b80b19d0c8 100644 --- a/arch/mn10300/include/asm/processor.h +++ b/arch/mn10300/include/asm/processor.h | |||
@@ -119,20 +119,13 @@ struct thread_struct { | |||
119 | 119 | ||
120 | /* | 120 | /* |
121 | * do necessary setup to start up a newly executed thread | 121 | * do necessary setup to start up a newly executed thread |
122 | * - need to discard the frame stacked by the kernel thread invoking the execve | ||
123 | * syscall (see RESTORE_ALL macro) | ||
124 | */ | 122 | */ |
125 | static inline void start_thread(struct pt_regs *regs, | 123 | static inline void start_thread(struct pt_regs *regs, |
126 | unsigned long new_pc, unsigned long new_sp) | 124 | unsigned long new_pc, unsigned long new_sp) |
127 | { | 125 | { |
128 | struct thread_info *ti = current_thread_info(); | 126 | regs->epsw = EPSW_nSL | EPSW_IE | EPSW_IM; |
129 | struct pt_regs *frame0; | 127 | regs->pc = new_pc; |
130 | 128 | regs->sp = new_sp; | |
131 | frame0 = thread_info_to_uregs(ti); | ||
132 | frame0->epsw = EPSW_nSL | EPSW_IE | EPSW_IM; | ||
133 | frame0->pc = new_pc; | ||
134 | frame0->sp = new_sp; | ||
135 | ti->frame = frame0; | ||
136 | } | 129 | } |
137 | 130 | ||
138 | 131 | ||
@@ -140,11 +133,6 @@ static inline void start_thread(struct pt_regs *regs, | |||
140 | extern void release_thread(struct task_struct *); | 133 | extern void release_thread(struct task_struct *); |
141 | 134 | ||
142 | /* | 135 | /* |
143 | * create a kernel thread without removing it from tasklists | ||
144 | */ | ||
145 | extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); | ||
146 | |||
147 | /* | ||
148 | * Return saved PC of a blocked thread. | 136 | * Return saved PC of a blocked thread. |
149 | */ | 137 | */ |
150 | extern unsigned long thread_saved_pc(struct task_struct *tsk); | 138 | extern unsigned long thread_saved_pc(struct task_struct *tsk); |
diff --git a/arch/mn10300/include/asm/ptrace.h b/arch/mn10300/include/asm/ptrace.h index 44251b974f1..08ac856c053 100644 --- a/arch/mn10300/include/asm/ptrace.h +++ b/arch/mn10300/include/asm/ptrace.h | |||
@@ -86,6 +86,7 @@ struct pt_regs { | |||
86 | #define user_mode(regs) (((regs)->epsw & EPSW_nSL) == EPSW_nSL) | 86 | #define user_mode(regs) (((regs)->epsw & EPSW_nSL) == EPSW_nSL) |
87 | #define instruction_pointer(regs) ((regs)->pc) | 87 | #define instruction_pointer(regs) ((regs)->pc) |
88 | #define user_stack_pointer(regs) ((regs)->sp) | 88 | #define user_stack_pointer(regs) ((regs)->sp) |
89 | #define current_pt_regs() current_frame() | ||
89 | 90 | ||
90 | #define arch_has_single_step() (1) | 91 | #define arch_has_single_step() (1) |
91 | 92 | ||
diff --git a/arch/mn10300/include/asm/thread_info.h b/arch/mn10300/include/asm/thread_info.h index ac519bbd42f..f90062b0622 100644 --- a/arch/mn10300/include/asm/thread_info.h +++ b/arch/mn10300/include/asm/thread_info.h | |||
@@ -160,12 +160,13 @@ void arch_release_thread_info(struct thread_info *ti); | |||
160 | #define _TIF_SIGPENDING +(1 << TIF_SIGPENDING) | 160 | #define _TIF_SIGPENDING +(1 << TIF_SIGPENDING) |
161 | #define _TIF_NEED_RESCHED +(1 << TIF_NEED_RESCHED) | 161 | #define _TIF_NEED_RESCHED +(1 << TIF_NEED_RESCHED) |
162 | #define _TIF_SINGLESTEP +(1 << TIF_SINGLESTEP) | 162 | #define _TIF_SINGLESTEP +(1 << TIF_SINGLESTEP) |
163 | #define _TIF_RESTORE_SIGMASK +(1 << TIF_RESTORE_SIGMASK) | ||
164 | #define _TIF_POLLING_NRFLAG +(1 << TIF_POLLING_NRFLAG) | 163 | #define _TIF_POLLING_NRFLAG +(1 << TIF_POLLING_NRFLAG) |
165 | 164 | ||
166 | #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ | 165 | #define _TIF_WORK_MASK 0x0000FFFE /* work to do on interrupt/exception return */ |
167 | #define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ | 166 | #define _TIF_ALLWORK_MASK 0x0000FFFF /* work to do on any return to u-space */ |
168 | 167 | ||
168 | #define tsk_is_polling(t) test_tsk_thread_flag(t, TIF_POLLING_NRFLAG) | ||
169 | |||
169 | #endif /* __KERNEL__ */ | 170 | #endif /* __KERNEL__ */ |
170 | 171 | ||
171 | #endif /* _ASM_THREAD_INFO_H */ | 172 | #endif /* _ASM_THREAD_INFO_H */ |
diff --git a/arch/mn10300/include/asm/unistd.h b/arch/mn10300/include/asm/unistd.h index 866eb14749d..044c770adbb 100644 --- a/arch/mn10300/include/asm/unistd.h +++ b/arch/mn10300/include/asm/unistd.h | |||
@@ -382,6 +382,8 @@ | |||
382 | #define __ARCH_WANT_SYS_SIGPROCMASK | 382 | #define __ARCH_WANT_SYS_SIGPROCMASK |
383 | #define __ARCH_WANT_SYS_RT_SIGACTION | 383 | #define __ARCH_WANT_SYS_RT_SIGACTION |
384 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND | 384 | #define __ARCH_WANT_SYS_RT_SIGSUSPEND |
385 | #define __ARCH_WANT_SYS_EXECVE | ||
386 | #define __ARCH_WANT_KERNEL_EXECVE | ||
385 | 387 | ||
386 | /* | 388 | /* |
387 | * "Conditional" syscalls | 389 | * "Conditional" syscalls |