diff options
Diffstat (limited to 'arch/m68k/include')
-rw-r--r-- | arch/m68k/include/asm/processor.h | 25 | ||||
-rw-r--r-- | arch/m68k/include/asm/ptrace.h | 2 | ||||
-rw-r--r-- | arch/m68k/include/asm/unistd.h | 2 |
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) \ |
130 | do { \ | 131 | do { \ |
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 | ||
156 | extern 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 |