[PATCH][2.4.21-pre6] update x86_64 for kernel_thread change

Mikael Pettersson (mikpe@user.it.uu.se)
Wed, 2 Apr 2003 21:18:25 +0200


Building an x86_64 kernel from 2.4.21-pre6 results in two linkage
errors due to the recent kernel_thread to arch_kernel_thread name change.
This patch updates x86_64 for that change.

/Mikael

--- linux-2.4.21-pre6/arch/x86_64/kernel/entry.S.~1~ 2003-04-02 20:02:40.000000000 +0200
+++ linux-2.4.21-pre6/arch/x86_64/kernel/entry.S 2003-04-02 20:51:08.000000000 +0200
@@ -77,7 +77,7 @@
jnz 2f
1:
RESTORE_REST
- testl $3,CS-ARGOFFSET(%rsp) # from kernel_thread?
+ testl $3,CS-ARGOFFSET(%rsp) # from arch_kernel_thread?
jz int_ret_from_sys_call
testl $ASM_THREAD_IA32,tsk_thread+thread_flags(%rcx)
jnz int_ret_from_sys_call
@@ -542,12 +542,12 @@
* Create a kernel thread.
*
* C extern interface:
- * extern long kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
+ * extern long arch_kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
*
* asm input arguments:
* rdi: fn, rsi: arg, rdx: flags
*/
-ENTRY(kernel_thread)
+ENTRY(arch_kernel_thread)
FAKE_STACK_FRAME $child_rip
SAVE_ALL

@@ -566,7 +566,7 @@

/*
* It isn't worth to check for reschedule here,
- * so internally to the x86_64 port you can rely on kernel_thread()
+ * so internally to the x86_64 port you can rely on arch_kernel_thread()
* not to reschedule the child before returning, this avoids the need
* of hacks for example to fork off the per-CPU idle tasks.
* [Hopefully no generic code relies on the reschedule -AK]
@@ -578,7 +578,7 @@
child_rip:
/*
* Here we are in the child and the registers are set as they were
- * at kernel_thread() invocation in the parent.
+ * at arch_kernel_thread() invocation in the parent.
*/
movq %rdi, %rax
movq %rsi, %rdi
--- linux-2.4.21-pre6/include/asm-x86_64/processor.h.~1~ 2003-04-02 20:40:19.000000000 +0200
+++ linux-2.4.21-pre6/include/asm-x86_64/processor.h 2003-04-02 20:49:53.000000000 +0200
@@ -361,7 +361,7 @@
/*
* create a kernel thread without removing it from tasklists
*/
-extern long kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
+extern long arch_kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);

/* Copy and release all segment info associated with a VM */
extern void copy_segments(struct task_struct *p, struct mm_struct * mm);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/