hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/alpha/kernel/process.c
....@@ -37,7 +37,6 @@
3737 #include <asm/reg.h>
3838 #include <linux/uaccess.h>
3939 #include <asm/io.h>
40
-#include <asm/pgtable.h>
4140 #include <asm/hwrpb.h>
4241 #include <asm/fpu.h>
4342
....@@ -58,7 +57,7 @@
5857 void arch_cpu_idle(void)
5958 {
6059 wtint(0);
61
- local_irq_enable();
60
+ raw_local_irq_enable();
6261 }
6362
6463 void arch_cpu_idle_dead(void)
....@@ -234,10 +233,9 @@
234233 /*
235234 * Copy architecture-specific thread state
236235 */
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)
241239 {
242240 extern void ret_from_fork(void);
243241 extern void ret_from_kernel_thread(void);
....@@ -251,7 +249,7 @@
251249 childti->pcb.ksp = (unsigned long) childstack;
252250 childti->pcb.flags = 1; /* set FEN, clear everything else */
253251
254
- if (unlikely(p->flags & PF_KTHREAD)) {
252
+ if (unlikely(p->flags & (PF_KTHREAD | PF_IO_WORKER))) {
255253 /* kernel thread */
256254 memset(childstack, 0,
257255 sizeof(struct switch_stack) + sizeof(struct pt_regs));
....@@ -268,7 +266,7 @@
268266 required for proper operation in the case of a threaded
269267 application calling fork. */
270268 if (clone_flags & CLONE_SETTLS)
271
- childti->pcb.unique = regs->r20;
269
+ childti->pcb.unique = tls;
272270 else
273271 regs->r20 = 0; /* OSF/1 has some strange fork() semantics. */
274272 childti->pcb.usp = usp ?: rdusp();