| .. | .. |
|---|
| 18 | 18 | #include <linux/tick.h> |
|---|
| 19 | 19 | #include <linux/bitops.h> |
|---|
| 20 | 20 | #include <linux/ptrace.h> |
|---|
| 21 | | -#include <asm/pgalloc.h> |
|---|
| 22 | 21 | #include <linux/uaccess.h> /* for USER_DS macros */ |
|---|
| 23 | 22 | #include <asm/cacheflush.h> |
|---|
| 24 | 23 | |
|---|
| .. | .. |
|---|
| 54 | 53 | { |
|---|
| 55 | 54 | } |
|---|
| 56 | 55 | |
|---|
| 57 | | -int copy_thread(unsigned long clone_flags, unsigned long usp, |
|---|
| 58 | | - unsigned long arg, struct task_struct *p) |
|---|
| 56 | +int copy_thread(unsigned long clone_flags, unsigned long usp, unsigned long arg, |
|---|
| 57 | + struct task_struct *p, unsigned long tls) |
|---|
| 59 | 58 | { |
|---|
| 60 | 59 | struct pt_regs *childregs = task_pt_regs(p); |
|---|
| 61 | 60 | struct thread_info *ti = task_thread_info(p); |
|---|
| 62 | 61 | |
|---|
| 63 | | - if (unlikely(p->flags & PF_KTHREAD)) { |
|---|
| 62 | + if (unlikely(p->flags & (PF_KTHREAD | PF_IO_WORKER))) { |
|---|
| 64 | 63 | /* if we're creating a new kernel thread then just zeroing all |
|---|
| 65 | 64 | * the registers. That's OK for a brand new thread.*/ |
|---|
| 66 | 65 | memset(childregs, 0, sizeof(struct pt_regs)); |
|---|
| .. | .. |
|---|
| 114 | 113 | * which contains TLS area |
|---|
| 115 | 114 | */ |
|---|
| 116 | 115 | if (clone_flags & CLONE_SETTLS) |
|---|
| 117 | | - childregs->r21 = childregs->r10; |
|---|
| 116 | + childregs->r21 = tls; |
|---|
| 118 | 117 | |
|---|
| 119 | 118 | return 0; |
|---|
| 120 | 119 | } |
|---|
| .. | .. |
|---|
| 150 | 149 | |
|---|
| 151 | 150 | void arch_cpu_idle(void) |
|---|
| 152 | 151 | { |
|---|
| 153 | | - local_irq_enable(); |
|---|
| 152 | + raw_local_irq_enable(); |
|---|
| 154 | 153 | } |
|---|