aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/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/m68k/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/m68k/include')
-rw-r--r--arch/m68k/include/asm/processor.h25
-rw-r--r--arch/m68k/include/asm/ptrace.h2
-rw-r--r--arch/m68k/include/asm/unistd.h2
3 files changed, 16 insertions, 13 deletions
diff --git a/arch/m68k/include/asm/processor.h b/arch/m68k/include/asm/processor.h
index f17c42aff7ff..ae700f49e51d 100644
--- a/arch/m68k/include/asm/processor.h
+++ b/arch/m68k/include/asm/processor.h
@@ -100,6 +100,16 @@ struct thread_struct {
100 .fs = __KERNEL_DS, \ 100 .fs = __KERNEL_DS, \
101} 101}
102 102
103/*
104 * ColdFire stack format sbould be 0x4 for an aligned usp (will always be
105 * true on thread creation). We need to set this explicitly.
106 */
107#ifdef CONFIG_COLDFIRE
108#define setframeformat(_regs) do { (_regs)->format = 0x4; } while(0)
109#else
110#define setframeformat(_regs) do { } while (0)
111#endif
112
103#ifdef CONFIG_MMU 113#ifdef CONFIG_MMU
104/* 114/*
105 * Do necessary setup to start up a newly executed thread. 115 * Do necessary setup to start up a newly executed thread.
@@ -109,6 +119,7 @@ static inline void start_thread(struct pt_regs * regs, unsigned long pc,
109{ 119{
110 regs->pc = pc; 120 regs->pc = pc;
111 regs->sr &= ~0x2000; 121 regs->sr &= ~0x2000;
122 setframeformat(regs);
112 wrusp(usp); 123 wrusp(usp);
113} 124}
114 125
@@ -116,21 +127,11 @@ extern int handle_kernel_fault(struct pt_regs *regs);
116 127
117#else 128#else
118 129
119/*
120 * Coldfire stacks need to be re-aligned on trap exit, conventional
121 * 68k can handle this case cleanly.
122 */
123#ifdef CONFIG_COLDFIRE
124#define reformat(_regs) do { (_regs)->format = 0x4; } while(0)
125#else
126#define reformat(_regs) do { } while (0)
127#endif
128
129#define start_thread(_regs, _pc, _usp) \ 130#define start_thread(_regs, _pc, _usp) \
130do { \ 131do { \
131 (_regs)->pc = (_pc); \ 132 (_regs)->pc = (_pc); \
132 ((struct switch_stack *)(_regs))[-1].a6 = 0; \ 133 ((struct switch_stack *)(_regs))[-1].a6 = 0; \
133 reformat(_regs); \ 134 setframeformat(_regs); \
134 if (current->mm) \ 135 if (current->mm) \
135 (_regs)->d5 = current->mm->start_data; \ 136 (_regs)->d5 = current->mm->start_data; \
136 (_regs)->sr &= ~0x2000; \ 137 (_regs)->sr &= ~0x2000; \
@@ -153,8 +154,6 @@ static inline void release_thread(struct task_struct *dead_task)
153{ 154{
154} 155}
155 156
156extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
157
158/* 157/*
159 * Free current thread data structures etc.. 158 * Free current thread data structures etc..
160 */ 159 */
diff --git a/arch/m68k/include/asm/ptrace.h b/arch/m68k/include/asm/ptrace.h
index 65322b17b6cf..5e08b597f012 100644
--- a/arch/m68k/include/asm/ptrace.h
+++ b/arch/m68k/include/asm/ptrace.h
@@ -85,6 +85,8 @@ struct switch_stack {
85#define user_mode(regs) (!((regs)->sr & PS_S)) 85#define user_mode(regs) (!((regs)->sr & PS_S))
86#define instruction_pointer(regs) ((regs)->pc) 86#define instruction_pointer(regs) ((regs)->pc)
87#define profile_pc(regs) instruction_pointer(regs) 87#define profile_pc(regs) instruction_pointer(regs)
88#define current_pt_regs() \
89 (struct pt_regs *)((char *)current_thread_info() + THREAD_SIZE) - 1
88 90
89#define arch_has_single_step() (1) 91#define arch_has_single_step() (1)
90 92
diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h
index 045cfd6a9e31..c702ad716791 100644
--- a/arch/m68k/include/asm/unistd.h
+++ b/arch/m68k/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