.. | .. |
---|
33 | 33 | |
---|
34 | 34 | void arch_cpu_idle(void) |
---|
35 | 35 | { |
---|
36 | | - local_irq_enable(); |
---|
| 36 | + raw_local_irq_enable(); |
---|
37 | 37 | } |
---|
38 | 38 | |
---|
39 | 39 | /* |
---|
.. | .. |
---|
100 | 100 | { |
---|
101 | 101 | } |
---|
102 | 102 | |
---|
103 | | -int copy_thread(unsigned long clone_flags, |
---|
104 | | - unsigned long usp, unsigned long arg, struct task_struct *p) |
---|
| 103 | +int copy_thread(unsigned long clone_flags, unsigned long usp, unsigned long arg, |
---|
| 104 | + struct task_struct *p, unsigned long tls) |
---|
105 | 105 | { |
---|
106 | 106 | struct pt_regs *childregs = task_pt_regs(p); |
---|
107 | 107 | struct pt_regs *regs; |
---|
.. | .. |
---|
109 | 109 | struct switch_stack *childstack = |
---|
110 | 110 | ((struct switch_stack *)childregs) - 1; |
---|
111 | 111 | |
---|
112 | | - if (unlikely(p->flags & PF_KTHREAD)) { |
---|
| 112 | + if (unlikely(p->flags & (PF_KTHREAD | PF_IO_WORKER))) { |
---|
113 | 113 | memset(childstack, 0, |
---|
114 | 114 | sizeof(struct switch_stack) + sizeof(struct pt_regs)); |
---|
115 | 115 | |
---|
.. | .. |
---|
140 | 140 | |
---|
141 | 141 | /* Initialize tls register. */ |
---|
142 | 142 | if (clone_flags & CLONE_SETTLS) |
---|
143 | | - childstack->r23 = regs->r8; |
---|
| 143 | + childstack->r23 = tls; |
---|
144 | 144 | |
---|
145 | 145 | return 0; |
---|
146 | 146 | } |
---|
.. | .. |
---|
252 | 252 | regs->sp = sp; |
---|
253 | 253 | } |
---|
254 | 254 | |
---|
255 | | -#include <linux/elfcore.h> |
---|
256 | | - |
---|
257 | | -/* Fill in the FPU structure for a core dump. */ |
---|
258 | | -int dump_fpu(struct pt_regs *regs, elf_fpregset_t *r) |
---|
| 255 | +asmlinkage int nios2_clone(unsigned long clone_flags, unsigned long newsp, |
---|
| 256 | + int __user *parent_tidptr, int __user *child_tidptr, |
---|
| 257 | + unsigned long tls) |
---|
259 | 258 | { |
---|
260 | | - return 0; /* Nios2 has no FPU and thus no FPU registers */ |
---|
| 259 | + struct kernel_clone_args args = { |
---|
| 260 | + .flags = (lower_32_bits(clone_flags) & ~CSIGNAL), |
---|
| 261 | + .pidfd = parent_tidptr, |
---|
| 262 | + .child_tid = child_tidptr, |
---|
| 263 | + .parent_tid = parent_tidptr, |
---|
| 264 | + .exit_signal = (lower_32_bits(clone_flags) & CSIGNAL), |
---|
| 265 | + .stack = newsp, |
---|
| 266 | + .tls = tls, |
---|
| 267 | + }; |
---|
| 268 | + |
---|
| 269 | + return kernel_clone(&args); |
---|
261 | 270 | } |
---|