aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mn10300/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-11 21:49:08 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-11 21:49:08 -0400
commit8213a2f3eeafdecf06dd718cb4130372263f6067 (patch)
tree0d02e3201dac64d1429f8552ee1163d4a1ef1646 /arch/mn10300/include
parent40924754f2cabd5d9af4bcd4dcecc362b5e0baa1 (diff)
parent12f79be93d94698778ff2b3f921073fc5f6780d6 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal
Pull pile 2 of execve and kernel_thread unification work from Al Viro: "Stuff in there: kernel_thread/kernel_execve/sys_execve conversions for several more architectures plus assorted signal fixes and cleanups. There'll be more (in particular, real fixes for the alpha do_notify_resume() irq mess)..." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal: (43 commits) alpha: don't open-code trace_report_syscall_{enter,exit} Uninclude linux/freezer.h m32r: trim masks avr32: trim masks tile: don't bother with SIGTRAP in setup_frame microblaze: don't bother with SIGTRAP in setup_rt_frame() mn10300: don't bother with SIGTRAP in setup_frame() frv: no need to raise SIGTRAP in setup_frame() x86: get rid of duplicate code in case of CONFIG_VM86 unicore32: remove pointless test h8300: trim _TIF_WORK_MASK parisc: decide whether to go to slow path (tracesys) based on thread flags parisc: don't bother looping in do_signal() parisc: fix double restarts bury the rest of TIF_IRET sanitize tsk_is_polling() bury _TIF_RESTORE_SIGMASK unicore32: unobfuscate _TIF_WORK_MASK mips: NOTIFY_RESUME is not needed in TIF masks mips: merge the identical "return from syscall" per-ABI code ... Conflicts: arch/arm/include/asm/thread_info.h
Diffstat (limited to 'arch/mn10300/include')
-rw-r--r--arch/mn10300/include/asm/frame.inc2
-rw-r--r--arch/mn10300/include/asm/processor.h18
-rw-r--r--arch/mn10300/include/asm/ptrace.h1
-rw-r--r--arch/mn10300/include/asm/thread_info.h3
-rw-r--r--arch/mn10300/include/asm/unistd.h2
5 files changed, 9 insertions, 17 deletions
diff --git a/arch/mn10300/include/asm/frame.inc b/arch/mn10300/include/asm/frame.inc
index 2ee58e3eb6b3..1c3eb4fda958 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 247928c9f549..8b80b19d0c8a 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 */
125static inline void start_thread(struct pt_regs *regs, 123static 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,
140extern void release_thread(struct task_struct *); 133extern void release_thread(struct task_struct *);
141 134
142/* 135/*
143 * create a kernel thread without removing it from tasklists
144 */
145extern 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 */
150extern unsigned long thread_saved_pc(struct task_struct *tsk); 138extern 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 44251b974f1d..08ac856c053e 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 ac519bbd42ff..f90062b0622d 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 866eb14749d7..044c770adbb6 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