Subject: kern/24067: amd64 GENERIC.MP kernel does not build since reaper removal
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <njoly@pasteur.fr>
List: netbsd-bugs
Date: 01/12/2004 11:41:14
>Number:         24067
>Category:       kern
>Synopsis:       amd64 GENERIC.MP does not build since reaper removal
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 12 10:42:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Nicolas Joly
>Release:        NetBSD 1.6ZH
>Organization:
	Institut Pasteur
>Environment:
System: NetBSD calimero.sis.pasteur.fr 1.6ZH NetBSD 1.6ZH (GENERIC.MP) #16: Mon Jan 12 10:02:03 CET 2004 njoly@calimero.sis.pasteur.fr:/local/src/NetBSD/obj/amd64/sys/arch/amd64/compile/GENERIC.MP amd64
Architecture: x86_64
Machine: amd64
>Description:
Since the reaper removal, amd64 kernels does not build anymore. They all
abort during `sys/arch/amd64/amd64/vm_machdep.c' compilation :

#   compile  GENERIC.MP/vm_machdep.o
/local/src/NetBSD/tool/amd64/bin/x86_64--netbsd-gcc -mcmodel=kernel -mno-red-zone -ffreestanding -O2 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wno-sign-compare -Damd64 -Dx86_64 -I. -I/local/src/NetBSD/src/sys/arch -I/local/src/NetBSD/src/sys -nostdinc -DLKM -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -c /local/src/NetBSD/src/sys/arch/amd64/amd64/vm_machdep.c
/local/src/NetBSD/src/sys/arch/amd64/amd64/vm_machdep.c:279: warning: no previous prototype for `cpu_wait'
*** Failed target:  vm_machdep.o

>How-To-Repeat:
Try to compile/cross-compile a recent amd64 kernel.
>Fix:
Remove `cpu_wait()' function, with the following patch.

Index: sys/arch/amd64/amd64/vm_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/amd64/amd64/vm_machdep.c,v
retrieving revision 1.4
diff -u -r1.4 vm_machdep.c
--- sys/arch/amd64/amd64/vm_machdep.c	2004/01/04 11:33:29	1.4
+++ sys/arch/amd64/amd64/vm_machdep.c	2004/01/12 10:24:00
@@ -253,6 +253,9 @@
 
 	if (proc && l->l_md.md_flags & MDP_USEDMTRR)
 		mtrr_clean(l->l_proc);
+
+        /* Nuke the TSS. */
+        tss_free(l->l_md.md_tss_sel);
 }
 
 /*
@@ -267,18 +270,6 @@
 {
 
 	switch_exit(l, lwp_exit2);
-}
-
-/*
- * cpu_wait is called from reaper() to let machine-dependent
- * code free machine-dependent resources that couldn't be freed
- * in cpu_exit().
- */
-void
-cpu_wait(struct lwp *l)
-{
-	/* Nuke the TSS. */
-	tss_free(l->l_md.md_tss_sel);
 }
 
 /*
>Release-Note:
>Audit-Trail:
>Unformatted: