.. | .. |
---|
37 | 37 | #include <asm/reg.h> |
---|
38 | 38 | #include <linux/uaccess.h> |
---|
39 | 39 | #include <asm/io.h> |
---|
40 | | -#include <asm/pgtable.h> |
---|
41 | 40 | #include <asm/hwrpb.h> |
---|
42 | 41 | #include <asm/fpu.h> |
---|
43 | 42 | |
---|
.. | .. |
---|
58 | 57 | void arch_cpu_idle(void) |
---|
59 | 58 | { |
---|
60 | 59 | wtint(0); |
---|
61 | | - local_irq_enable(); |
---|
| 60 | + raw_local_irq_enable(); |
---|
62 | 61 | } |
---|
63 | 62 | |
---|
64 | 63 | void arch_cpu_idle_dead(void) |
---|
.. | .. |
---|
234 | 233 | /* |
---|
235 | 234 | * Copy architecture-specific thread state |
---|
236 | 235 | */ |
---|
237 | | -int |
---|
238 | | -copy_thread(unsigned long clone_flags, unsigned long usp, |
---|
239 | | - unsigned long kthread_arg, |
---|
240 | | - struct task_struct *p) |
---|
| 236 | +int copy_thread(unsigned long clone_flags, unsigned long usp, |
---|
| 237 | + unsigned long kthread_arg, struct task_struct *p, |
---|
| 238 | + unsigned long tls) |
---|
241 | 239 | { |
---|
242 | 240 | extern void ret_from_fork(void); |
---|
243 | 241 | extern void ret_from_kernel_thread(void); |
---|
.. | .. |
---|
251 | 249 | childti->pcb.ksp = (unsigned long) childstack; |
---|
252 | 250 | childti->pcb.flags = 1; /* set FEN, clear everything else */ |
---|
253 | 251 | |
---|
254 | | - if (unlikely(p->flags & PF_KTHREAD)) { |
---|
| 252 | + if (unlikely(p->flags & (PF_KTHREAD | PF_IO_WORKER))) { |
---|
255 | 253 | /* kernel thread */ |
---|
256 | 254 | memset(childstack, 0, |
---|
257 | 255 | sizeof(struct switch_stack) + sizeof(struct pt_regs)); |
---|
.. | .. |
---|
268 | 266 | required for proper operation in the case of a threaded |
---|
269 | 267 | application calling fork. */ |
---|
270 | 268 | if (clone_flags & CLONE_SETTLS) |
---|
271 | | - childti->pcb.unique = regs->r20; |
---|
| 269 | + childti->pcb.unique = tls; |
---|
272 | 270 | else |
---|
273 | 271 | regs->r20 = 0; /* OSF/1 has some strange fork() semantics. */ |
---|
274 | 272 | childti->pcb.usp = usp ?: rdusp(); |
---|