CVS commit: src/sys/sys
Module Name:src Committed By: dholland Date: Fri Apr 23 05:10:19 UTC 2010 Modified Files: src/sys/sys: vnode.h Log Message: vgonel() went away a long time ago, so stop declaring it. To generate a diff of this commit: cvs rdiff -u -r1.216 -r1.217 src/sys/sys/vnode.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/vnode.h diff -u src/sys/sys/vnode.h:1.216 src/sys/sys/vnode.h:1.217 --- src/sys/sys/vnode.h:1.216 Sat Apr 10 19:41:54 2010 +++ src/sys/sys/vnode.h Fri Apr 23 05:10:19 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: vnode.h,v 1.216 2010/04/10 19:41:54 pooka Exp $ */ +/* $NetBSD: vnode.h,v 1.217 2010/04/23 05:10:19 dholland Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -589,7 +589,6 @@ int vget(struct vnode *, int); bool vtryget(struct vnode *); void vgone(struct vnode *); -void vgonel(struct vnode *, struct lwp *); int vinvalbuf(struct vnode *, int, kauth_cred_t, struct lwp *, bool, int); void vprint(const char *, struct vnode *); void vput(struct vnode *);
CVS commit: [netbsd-5-0] src/doc
Module Name:src Committed By: snj Date: Fri Apr 23 04:21:59 UTC 2010 Modified Files: src/doc [netbsd-5-0]: CHANGES-5.0.3 Log Message: Ticket 1380. To generate a diff of this commit: cvs rdiff -u -r1.1.2.11 -r1.1.2.12 src/doc/CHANGES-5.0.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.0.3 diff -u src/doc/CHANGES-5.0.3:1.1.2.11 src/doc/CHANGES-5.0.3:1.1.2.12 --- src/doc/CHANGES-5.0.3:1.1.2.11 Thu Apr 22 20:12:37 2010 +++ src/doc/CHANGES-5.0.3 Fri Apr 23 04:21:59 2010 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.0.3,v 1.1.2.11 2010/04/22 20:12:37 snj Exp $ +# $NetBSD: CHANGES-5.0.3,v 1.1.2.12 2010/04/23 04:21:59 snj Exp $ A complete list of changes from the NetBSD 5.0.2 release to the NetBSD 5.0.3 release: @@ -209,3 +209,21 @@ cpu_feature variables are set to 0. [jym, ticket #1377] +sys/arch/amd64/amd64/locore.S patch +sys/arch/amd64/amd64/machdep.c patch +sys/arch/amd64/amd64/mptramp.S patch +sys/arch/i386/i386/machdep.c patch +sys/arch/i386/isa/npx.cpatch +sys/arch/x86/include/cpu.h patch +sys/arch/x86/include/cpuvar.h patch +sys/arch/x86/x86/cpu.cpatch +sys/arch/x86/x86/identcpu.c patch +sys/arch/x86/x86/pmap.cpatch +sys/arch/xen/x86/cpu.cpatch + + Fix the NX regression issue observed on amd64 kernels, where + per-page execution right was disabled (therefore leading to the + inability of the kernel to detect fraudulent use of memory mappings + marked as not being executable). + [jym, ticket #1380] +
CVS commit: [netbsd-5-0] src/sys/arch
Module Name:src Committed By: snj Date: Fri Apr 23 04:17:31 UTC 2010 Modified Files: src/sys/arch/amd64/amd64 [netbsd-5-0]: locore.S machdep.c mptramp.S src/sys/arch/i386/i386 [netbsd-5-0]: machdep.c src/sys/arch/i386/isa [netbsd-5-0]: npx.c src/sys/arch/x86/include [netbsd-5-0]: cpu.h cpuvar.h src/sys/arch/x86/x86 [netbsd-5-0]: cpu.c identcpu.c pmap.c src/sys/arch/xen/x86 [netbsd-5-0]: cpu.c Log Message: Apply patch (requested by jym in ticket #1380): Fix the NX regression issue observed on amd64 kernels, where per-page execution right was disabled (therefore leading to the inability of the kernel to detect fraudulent use of memory mappings marked as not being executable). To generate a diff of this commit: cvs rdiff -u -r1.47.8.2.2.1 -r1.47.8.2.2.2 src/sys/arch/amd64/amd64/locore.S cvs rdiff -u -r1.102.4.10 -r1.102.4.10.2.1 src/sys/arch/amd64/amd64/machdep.c cvs rdiff -u -r1.9 -r1.9.14.1 src/sys/arch/amd64/amd64/mptramp.S cvs rdiff -u -r1.644.4.10 -r1.644.4.10.2.1 src/sys/arch/i386/i386/machdep.c cvs rdiff -u -r1.129.10.5 -r1.129.10.5.2.1 src/sys/arch/i386/isa/npx.c cvs rdiff -u -r1.9 -r1.9.8.1 src/sys/arch/x86/include/cpu.h cvs rdiff -u -r1.27 -r1.27.14.1 src/sys/arch/x86/include/cpuvar.h cvs rdiff -u -r1.57.4.3 -r1.57.4.3.2.1 src/sys/arch/x86/x86/cpu.c cvs rdiff -u -r1.10.4.2.2.1 -r1.10.4.2.2.2 src/sys/arch/x86/x86/identcpu.c cvs rdiff -u -r1.74.4.1 -r1.74.4.1.2.1 src/sys/arch/x86/x86/pmap.c cvs rdiff -u -r1.28.4.1 -r1.28.4.1.2.1 src/sys/arch/xen/x86/cpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/amd64/locore.S diff -u src/sys/arch/amd64/amd64/locore.S:1.47.8.2.2.1 src/sys/arch/amd64/amd64/locore.S:1.47.8.2.2.2 --- src/sys/arch/amd64/amd64/locore.S:1.47.8.2.2.1 Thu Apr 22 19:39:44 2010 +++ src/sys/arch/amd64/amd64/locore.S Fri Apr 23 04:17:29 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.47.8.2.2.1 2010/04/22 19:39:44 snj Exp $ */ +/* $NetBSD: locore.S,v 1.47.8.2.2.2 2010/04/23 04:17:29 snj Exp $ */ /* * Copyright-o-rama! @@ -235,7 +235,7 @@ #endif .globl _C_LABEL(cpu_id),_C_LABEL(cpu_vendorname), _C_LABEL(cpu_brand_id) - .globl _C_LABEL(cpuid_level),_C_LABEL(cpu_feature),_C_LABEL(cpu_feature2) + .globl _C_LABEL(cpuid_level) .globl _C_LABEL(esym),_C_LABEL(eblob),_C_LABEL(boothowto) .globl _C_LABEL(bootinfo),_C_LABEL(atdevbase) .globl _C_LABEL(proc0paddr),_C_LABEL(PDPpaddr) @@ -245,10 +245,6 @@ _C_LABEL(cpu): .long 0 # are we 386, 386sx, or 486, # or Pentium, or.. _C_LABEL(cpu_id): .long 0 # saved from `cpuid' instruction -_C_LABEL(cpu_feature): .long 0 # feature flags from 'cpuid' - # instruction -_C_LABEL(cpu_feature2): .long 0 # feature flags from 'cpuid' - # instruction _C_LABEL(cpuid_level): .long -1 # max. level accepted by 'cpuid' # instruction _C_LABEL(cpu_vendorname): .space 16 # vendor string returned by `cpuid' @@ -300,7 +296,7 @@ gdt64_end: farjmp64: - .long longmode-KERNBASE + .long _RELOC(longmode) .word GSEL(GCODE_SEL, SEL_KPL) #endif /* !XEN */ @@ -423,18 +419,11 @@ movl $1,%eax cpuid movl %eax,RELOC(cpu_id) - movl %edx,RELOC(cpu_feature) - movl %ecx,RELOC(cpu_feature2) /* Brand ID is bits 0-7 of %ebx */ andl $255,%ebx movl %ebx,RELOC(cpu_brand_id) - /* add AMD specific feature flags */ - movl $0x8001,%eax - cpuid - orl %edx,RELOC(cpu_feature) - /* * Finished with old stack; load new %esp now instead of later so we * can trace this code without having to worry about the trace trap Index: src/sys/arch/amd64/amd64/machdep.c diff -u src/sys/arch/amd64/amd64/machdep.c:1.102.4.10 src/sys/arch/amd64/amd64/machdep.c:1.102.4.10.2.1 --- src/sys/arch/amd64/amd64/machdep.c:1.102.4.10 Sat Apr 4 17:39:09 2009 +++ src/sys/arch/amd64/amd64/machdep.c Fri Apr 23 04:17:29 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.102.4.10 2009/04/04 17:39:09 snj Exp $ */ +/* $NetBSD: machdep.c,v 1.102.4.10.2.1 2010/04/23 04:17:29 snj Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008 @@ -112,7 +112,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.102.4.10 2009/04/04 17:39:09 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.102.4.10.2.1 2010/04/23 04:17:29 snj Exp $"); /* #define XENDEBUG_LOW */ @@ -1386,9 +1386,9 @@ __PRINTK(("init_x86_64(0x%lx)\n", first_avail)); first_bt_vaddr = (vaddr_t) (first_avail + KERNBASE + PAGE_SIZE * 2); __PRINTK(("first_bt_vaddr 0x%lx\n", first_bt_vaddr)); - cpu_feature = cpu_info_primary.ci_feature_flags; /* not on Xen... */ - cpu_feature &= ~(CPUID_PGE|CPUID_PSE|CPUID_MTRR|CPUID_FXSR|CPUID_NOX); + cpu_feature &= ~(CPUID_PGE|CPUID_PSE|CPUID_MTRR|CPUID_FXSR); + cpu_feature3 &= ~(CPUID_NOX); #endif /* XEN */ cpu_init_msrs(&cpu_info_primary, true); Index: src/sys/arch/amd64/amd64/mptramp.S diff -u src/sys/arch/amd64/amd64/mptramp.S:1.9 src/sys/arch/amd64/
CVS commit: src/sys/compat/linux/arch/i386
Module Name:src Committed By: chs Date: Fri Apr 23 03:03:03 UTC 2010 Modified Files: src/sys/compat/linux/arch/i386: linux_syscall.h linux_syscallargs.h linux_syscalls.c linux_sysent.c Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 src/sys/compat/linux/arch/i386/linux_syscall.h \ src/sys/compat/linux/arch/i386/linux_syscallargs.h \ src/sys/compat/linux/arch/i386/linux_sysent.c cvs rdiff -u -r1.87 -r1.88 src/sys/compat/linux/arch/i386/linux_syscalls.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux/arch/i386/linux_syscall.h diff -u src/sys/compat/linux/arch/i386/linux_syscall.h:1.86 src/sys/compat/linux/arch/i386/linux_syscall.h:1.87 --- src/sys/compat/linux/arch/i386/linux_syscall.h:1.86 Mon Dec 14 00:58:36 2009 +++ src/sys/compat/linux/arch/i386/linux_syscall.h Fri Apr 23 03:03:03 2010 @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscall.h,v 1.86 2009/12/14 00:58:36 matt Exp $ */ +/* $NetBSD: linux_syscall.h,v 1.87 2010/04/23 03:03:03 chs Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.101 2009/11/24 10:42:43 njoly Exp + * created from NetBSD: syscalls.master,v 1.102 2010/04/23 03:02:16 chs Exp */ #ifndef _LINUX_SYS_SYSCALL_H_ @@ -346,7 +346,7 @@ /* syscall: "sigreturn" ret: "int" args: "struct linux_sigcontext *" */ #define LINUX_SYS_sigreturn 119 -/* syscall: "clone" ret: "int" args: "int" "void *" "void *" "void *" */ +/* syscall: "clone" ret: "int" args: "int" "void *" "void *" "void *" "void *" */ #define LINUX_SYS_clone 120 /* syscall: "setdomainname" ret: "int" args: "char *" "int" */ Index: src/sys/compat/linux/arch/i386/linux_syscallargs.h diff -u src/sys/compat/linux/arch/i386/linux_syscallargs.h:1.86 src/sys/compat/linux/arch/i386/linux_syscallargs.h:1.87 --- src/sys/compat/linux/arch/i386/linux_syscallargs.h:1.86 Mon Dec 14 00:58:36 2009 +++ src/sys/compat/linux/arch/i386/linux_syscallargs.h Fri Apr 23 03:03:03 2010 @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscallargs.h,v 1.86 2009/12/14 00:58:36 matt Exp $ */ +/* $NetBSD: linux_syscallargs.h,v 1.87 2010/04/23 03:03:03 chs Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.101 2009/11/24 10:42:43 njoly Exp + * created from NetBSD: syscalls.master,v 1.102 2010/04/23 03:02:16 chs Exp */ #ifndef _LINUX_SYS_SYSCALLARGS_H_ @@ -443,6 +443,7 @@ syscallarg(int) flags; syscallarg(void *) stack; syscallarg(void *) parent_tidptr; + syscallarg(void *) tls; syscallarg(void *) child_tidptr; }; check_syscall_args(linux_sys_clone) Index: src/sys/compat/linux/arch/i386/linux_sysent.c diff -u src/sys/compat/linux/arch/i386/linux_sysent.c:1.86 src/sys/compat/linux/arch/i386/linux_sysent.c:1.87 --- src/sys/compat/linux/arch/i386/linux_sysent.c:1.86 Mon Dec 14 00:58:36 2009 +++ src/sys/compat/linux/arch/i386/linux_sysent.c Fri Apr 23 03:03:03 2010 @@ -1,14 +1,14 @@ -/* $NetBSD: linux_sysent.c,v 1.86 2009/12/14 00:58:36 matt Exp $ */ +/* $NetBSD: linux_sysent.c,v 1.87 2010/04/23 03:03:03 chs Exp $ */ /* * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.101 2009/11/24 10:42:43 njoly Exp + * created from NetBSD: syscalls.master,v 1.102 2010/04/23 03:02:16 chs Exp */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.86 2009/12/14 00:58:36 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.87 2010/04/23 03:03:03 chs Exp $"); #include #include Index: src/sys/compat/linux/arch/i386/linux_syscalls.c diff -u src/sys/compat/linux/arch/i386/linux_syscalls.c:1.87 src/sys/compat/linux/arch/i386/linux_syscalls.c:1.88 --- src/sys/compat/linux/arch/i386/linux_syscalls.c:1.87 Mon Dec 14 00:58:36 2009 +++ src/sys/compat/linux/arch/i386/linux_syscalls.c Fri Apr 23 03:03:03 2010 @@ -1,14 +1,14 @@ -/* $NetBSD: linux_syscalls.c,v 1.87 2009/12/14 00:58:36 matt Exp $ */ +/* $NetBSD: linux_syscalls.c,v 1.88 2010/04/23 03:03:03 chs Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.101 2009/11/24 10:42:43 njoly Exp + * created from NetBSD: syscalls.master,v 1.102 2010/04/23 03:02:16 chs Exp */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.87 2009/12/14 00:58:36 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.88 2010/04/23 03:03:03 chs Exp $"); #if defined(_KERNEL_OPT) #include
CVS commit: src/sys/compat/linux/arch/i386
Module Name:src Committed By: chs Date: Fri Apr 23 03:02:16 UTC 2010 Modified Files: src/sys/compat/linux/arch/i386: syscalls.master Log Message: add missing argument to clone(). the symptom of this was that pthread_join() would sometimes get stuck, such as in our "mutex2" regression test. To generate a diff of this commit: cvs rdiff -u -r1.101 -r1.102 src/sys/compat/linux/arch/i386/syscalls.master Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux/arch/i386/syscalls.master diff -u src/sys/compat/linux/arch/i386/syscalls.master:1.101 src/sys/compat/linux/arch/i386/syscalls.master:1.102 --- src/sys/compat/linux/arch/i386/syscalls.master:1.101 Tue Nov 24 10:42:43 2009 +++ src/sys/compat/linux/arch/i386/syscalls.master Fri Apr 23 03:02:16 2010 @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.101 2009/11/24 10:42:43 njoly Exp $ + $NetBSD: syscalls.master,v 1.102 2010/04/23 03:02:16 chs Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 @@ -227,7 +227,7 @@ 118 NOARGS { int|sys||fsync(int fd); } 119 STD { int|linux_sys||sigreturn(struct linux_sigcontext *scp); } 120 STD { int|linux_sys||clone(int flags, void *stack, \ - void *parent_tidptr, void *child_tidptr); } + void *parent_tidptr, void *tls, void *child_tidptr); } 121 STD { int|linux_sys||setdomainname(char *domainname, \ int len); } 122 STD { int|linux_sys||uname(struct linux_utsname *up); }
CVS commit: src/doc
Module Name:src Committed By: christos Date: Fri Apr 23 02:12:58 UTC 2010 Modified Files: src/doc: HACKS Log Message: mention crash ldscript. To generate a diff of this commit: cvs rdiff -u -r1.113 -r1.114 src/doc/HACKS Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/HACKS diff -u src/doc/HACKS:1.113 src/doc/HACKS:1.114 --- src/doc/HACKS:1.113 Sun Jan 11 16:02:36 2009 +++ src/doc/HACKS Thu Apr 22 22:12:58 2010 @@ -1,4 +1,4 @@ -# $NetBSD: HACKS,v 1.113 2009/01/11 21:02:36 sketch Exp $ +# $NetBSD: HACKS,v 1.114 2010/04/23 02:12:58 christos Exp $ # # This file is intended to document workarounds for currently unsolved # (mostly) compiler bugs. @@ -321,6 +321,17 @@ which uses -O1 by default. kcah +hack MKPIE ldscript for /usr.sbin/crash +cdate 22 April 2010 +who christos +file src/usr.sbin/crash/Makefile : 1.5 +file src/usr.sbin/crash/ldscript.crash : 1.1 +pr N/A +descr + fixed in binutils-2.20.1. Linking with MKPIE=yes causes overlapping + sections +kcah + port vax hack gcc4/vax ICE
CVS commit: src/usr.sbin/crash
Module Name:src Committed By: christos Date: Fri Apr 23 02:10:02 UTC 2010 Modified Files: src/usr.sbin/crash: Makefile Added Files: src/usr.sbin/crash: ldscript.crash Log Message: workaround for MKPIE=yes until binutils-2.20.1 is imported. From Piotr Meyer To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/crash/Makefile cvs rdiff -u -r0 -r1.1 src/usr.sbin/crash/ldscript.crash Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/crash/Makefile diff -u src/usr.sbin/crash/Makefile:1.4 src/usr.sbin/crash/Makefile:1.5 --- src/usr.sbin/crash/Makefile:1.4 Wed Feb 3 10:34:46 2010 +++ src/usr.sbin/crash/Makefile Thu Apr 22 22:10:01 2010 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.4 2010/02/03 15:34:46 roy Exp $ +# $NetBSD: Makefile,v 1.5 2010/04/23 02:10:01 christos Exp $ PROG= crash MAN= crash.8 RUMPKERNEL= yes # XXX: Avoid -mcmodel=kernel -LDADD+= -lkvm -ledit -lterminfo +LDADD+= -lkvm -ledit -lterminfo -T${.CURDIR}/ldscript.crash DPADD+= ${LIBKVM} ${LIBEDIT} ${LIBTERMINFO} # some ddb kernel components need limited modifications. for now, Added files: Index: src/usr.sbin/crash/ldscript.crash diff -u /dev/null src/usr.sbin/crash/ldscript.crash:1.1 --- /dev/null Thu Apr 22 22:10:02 2010 +++ src/usr.sbin/crash/ldscript.crash Thu Apr 22 22:10:01 2010 @@ -0,0 +1,9 @@ + +SECTIONS +{ + .note.netbsd.ident : + { +KEEP(*(.note.netbsd.ident)); + } +} +INSERT AFTER .gnu.version_r;
CVS commit: src/usr.bin/make
Module Name:src Committed By: sjg Date: Fri Apr 23 00:18:50 UTC 2010 Modified Files: src/usr.bin/make: compat.c job.c main.c make.h Log Message: On darwin at least, vfork() fails in child of vfork(). It probably shouldn't work anyway, so avoid this. We use the macro vFork() - a function seems to cause problems and is unnecessary overhead. To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/usr.bin/make/compat.c cvs rdiff -u -r1.148 -r1.149 src/usr.bin/make/job.c cvs rdiff -u -r1.182 -r1.183 src/usr.bin/make/main.c cvs rdiff -u -r1.81 -r1.82 src/usr.bin/make/make.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/compat.c diff -u src/usr.bin/make/compat.c:1.77 src/usr.bin/make/compat.c:1.78 --- src/usr.bin/make/compat.c:1.77 Wed Apr 7 00:11:27 2010 +++ src/usr.bin/make/compat.c Fri Apr 23 00:18:50 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.77 2010/04/07 00:11:27 sjg Exp $ */ +/* $NetBSD: compat.c,v 1.78 2010/04/23 00:18:50 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: compat.c,v 1.77 2010/04/07 00:11:27 sjg Exp $"; +static char rcsid[] = "$NetBSD: compat.c,v 1.78 2010/04/23 00:18:50 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: compat.c,v 1.77 2010/04/07 00:11:27 sjg Exp $"); +__RCSID("$NetBSD: compat.c,v 1.78 2010/04/23 00:18:50 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -355,7 +355,7 @@ /* * Fork and execute the single command. If the fork fails, we abort. */ -cpid = vfork(); +cpid = vFork(); if (cpid < 0) { Fatal("Could not fork"); } Index: src/usr.bin/make/job.c diff -u src/usr.bin/make/job.c:1.148 src/usr.bin/make/job.c:1.149 --- src/usr.bin/make/job.c:1.148 Thu Apr 22 19:11:17 2010 +++ src/usr.bin/make/job.c Fri Apr 23 00:18:50 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.148 2010/04/22 19:11:17 sjg Exp $ */ +/* $NetBSD: job.c,v 1.149 2010/04/23 00:18:50 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: job.c,v 1.148 2010/04/22 19:11:17 sjg Exp $"; +static char rcsid[] = "$NetBSD: job.c,v 1.149 2010/04/23 00:18:50 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: job.c,v 1.148 2010/04/22 19:11:17 sjg Exp $"); +__RCSID("$NetBSD: job.c,v 1.149 2010/04/23 00:18:50 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -1299,7 +1299,7 @@ /* Pre-emptively mark job running, pid still zero though */ job->job_state = JOB_ST_RUNNING; -cpid = vfork(); +cpid = vFork(); if (cpid == -1) Punt("Cannot vfork: %s", strerror(errno)); Index: src/usr.bin/make/main.c diff -u src/usr.bin/make/main.c:1.182 src/usr.bin/make/main.c:1.183 --- src/usr.bin/make/main.c:1.182 Thu Apr 22 22:39:13 2010 +++ src/usr.bin/make/main.c Fri Apr 23 00:18:50 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.182 2010/04/22 22:39:13 dholland Exp $ */ +/* $NetBSD: main.c,v 1.183 2010/04/23 00:18:50 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.182 2010/04/22 22:39:13 dholland Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.183 2010/04/23 00:18:50 sjg Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.182 2010/04/22 22:39:13 dholland Exp $"); +__RCSID("$NetBSD: main.c,v 1.183 2010/04/23 00:18:50 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -185,6 +185,7 @@ static char objdir[MAXPATHLEN + 1]; /* where we chdir'ed to */ char *progname;/* the program name */ char *makeDependfile; +pid_t myPid; Boolean forceJobs = FALSE; @@ -842,6 +843,8 @@ #endif } + myPid = getpid(); /* remember this for vFork() */ + /* * Just in case MAKEOBJDIR wants us to do something tricky. */ @@ -923,7 +926,7 @@ ep = "0"; } Var_Set(MAKE_LEVEL, ep, VAR_GLOBAL, 0); - snprintf(tmp, sizeof(tmp), "%u", getpid()); + snprintf(tmp, sizeof(tmp), "%u", myPid); Var_Set(".MAKE.PID", tmp, VAR_GLOBAL, 0); snprintf(tmp, sizeof(tmp), "%u", getppid()); Var_Set(".MAKE.PPID", tmp, VAR_GLOBAL, 0); @@ -1581,7 +1584,7 @@ /* * Fork */ -switch (cpid = vfork()) { +switch (cpid = vFork()) { case 0: /* * Close input side of pipe Index: src/usr.bin/make/make.h diff -u src/usr.bin/make/make.h:1.81 src/usr.bin/make/make.h:1.82 --- src/usr.bin/make/make.h:1.81 Thu Apr 22 19:11:17 2010 +++ src/usr.bin/make/make.h Fri Apr 2
CVS commit: src/usr.bin/make
Module Name:src Committed By: dholland Date: Thu Apr 22 22:39:13 UTC 2010 Modified Files: src/usr.bin/make: main.c Log Message: Use _PATH_TMP instead of a literal /tmp; noted by Christos To generate a diff of this commit: cvs rdiff -u -r1.181 -r1.182 src/usr.bin/make/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/main.c diff -u src/usr.bin/make/main.c:1.181 src/usr.bin/make/main.c:1.182 --- src/usr.bin/make/main.c:1.181 Thu Apr 22 20:25:16 2010 +++ src/usr.bin/make/main.c Thu Apr 22 22:39:13 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.181 2010/04/22 20:25:16 dholland Exp $ */ +/* $NetBSD: main.c,v 1.182 2010/04/22 22:39:13 dholland Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.181 2010/04/22 20:25:16 dholland Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.182 2010/04/22 22:39:13 dholland Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.181 2010/04/22 20:25:16 dholland Exp $"); +__RCSID("$NetBSD: main.c,v 1.182 2010/04/22 22:39:13 dholland Exp $"); #endif #endif /* not lint */ #endif @@ -1967,7 +1967,7 @@ * Honor $TMPDIR but only if it is valid. * Ensure it ends with /. */ - tmpdir = Var_Subst(NULL, "${TMPDIR:tA:U/tmp}/", VAR_GLOBAL, 0); + tmpdir = Var_Subst(NULL, "${TMPDIR:tA:U" _PATH_TMP "}/", VAR_GLOBAL, 0); if (stat(tmpdir, &st) < 0 || !S_ISDIR(st.st_mode)) { free(tmpdir); tmpdir = bmake_strdup(_PATH_TMP);
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Thu Apr 22 21:58:09 UTC 2010 Modified Files: src/sys/dev/acpi: acpi.c acpi_pci.c acpi_pci.h Log Message: Some pretty printing for ACPIVERBOSE. To generate a diff of this commit: cvs rdiff -u -r1.181 -r1.182 src/sys/dev/acpi/acpi.c cvs rdiff -u -r1.8 -r1.9 src/sys/dev/acpi/acpi_pci.c cvs rdiff -u -r1.4 -r1.5 src/sys/dev/acpi/acpi_pci.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/acpi.c diff -u src/sys/dev/acpi/acpi.c:1.181 src/sys/dev/acpi/acpi.c:1.182 --- src/sys/dev/acpi/acpi.c:1.181 Thu Apr 22 18:40:09 2010 +++ src/sys/dev/acpi/acpi.c Thu Apr 22 21:58:08 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi.c,v 1.181 2010/04/22 18:40:09 jruoho Exp $ */ +/* $NetBSD: acpi.c,v 1.182 2010/04/22 21:58:08 jruoho Exp $ */ /*- * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.181 2010/04/22 18:40:09 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.182 2010/04/22 21:58:08 jruoho Exp $"); #include "opt_acpi.h" #include "opt_pcifixup.h" @@ -169,7 +169,7 @@ static void acpi_build_tree(struct acpi_softc *); -#ifdef ACPI_DEBUG +#ifdef ACPIVERBOSE static void acpi_print_tree(struct acpi_devnode *, uint32_t); #endif @@ -597,17 +597,18 @@ (void)AcpiWalkNamespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, UINT32_MAX, acpi_make_devnode, acpi_make_devnode_post, &awc, NULL); -#ifdef ACPI_DEBUG - acpi_print_tree(sc->sc_root, 0); -#endif - acpi_rescan1(sc, NULL, NULL); acpi_rescan_capabilities(sc); - acpi_pcidev_scan(sc); + (void)acpi_pcidev_scan(sc->sc_root); + +#ifdef ACPIVERBOSE + aprint_normal("\n"); + acpi_print_tree(sc->sc_root, 0); +#endif } -#ifdef ACPI_DEBUG +#ifdef ACPIVERBOSE static void acpi_print_tree(struct acpi_devnode *ad, uint32_t level) { @@ -615,9 +616,28 @@ uint32_t i; for (i = 0; i < level; i++) - aprint_normal(" "); + aprint_normal(""); - aprint_normal("[%02u] %-5s\n", ad->ad_type, ad->ad_name); + aprint_normal("%-5s [%02u] [%c%c] ", ad->ad_name, ad->ad_type, + ((ad->ad_flags & ACPI_DEVICE_POWER) != 0) ? 'P' : 'x', + ((ad->ad_flags & ACPI_DEVICE_WAKEUP) != 0) ? 'W' : 'x'); + + if (ad->ad_pciinfo == NULL) + aprint_normal("@ xx:xx:xx:xx "); + else { + aprint_normal("@ 0x%02x:0x%02x:0x%02x:0x%02x ", + ad->ad_pciinfo->ap_segment, ad->ad_pciinfo->ap_bus, + ad->ad_pciinfo->ap_device, ad->ad_pciinfo->ap_function); + + if ((ad->ad_devinfo->Flags & ACPI_PCI_ROOT_BRIDGE) != 0) + aprint_normal("[R] "); + + if (ad->ad_pciinfo->ap_bridge != false) + aprint_normal("[B] -> 0x%02X", + ad->ad_pciinfo->ap_downbus); + } + + aprint_normal("\n\n"); SIMPLEQ_FOREACH(child, &ad->ad_child_head, ad_child_list) acpi_print_tree(child, level + 1); @@ -1047,18 +1067,6 @@ ad->ad_flags |= ACPI_DEVICE_WAKEUP; acpi_wakedev_add(ad); } - - if (ad->ad_flags != 0) { - aprint_debug_dev(sc->sc_dev, "%-5s ", ad->ad_name); - - if ((ad->ad_flags & ACPI_DEVICE_WAKEUP) != 0) -aprint_debug("wake-up "); - - if ((ad->ad_flags & ACPI_DEVICE_POWER) != 0) -aprint_debug("power (D%d) ", ad->ad_state); - - aprint_debug("\n"); - } } } Index: src/sys/dev/acpi/acpi_pci.c diff -u src/sys/dev/acpi/acpi_pci.c:1.8 src/sys/dev/acpi/acpi_pci.c:1.9 --- src/sys/dev/acpi/acpi_pci.c:1.8 Thu Apr 22 15:25:46 2010 +++ src/sys/dev/acpi/acpi_pci.c Thu Apr 22 21:58:08 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_pci.c,v 1.8 2010/04/22 15:25:46 jruoho Exp $ */ +/* $NetBSD: acpi_pci.c,v 1.9 2010/04/22 21:58:08 jruoho Exp $ */ /* * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_pci.c,v 1.8 2010/04/22 15:25:46 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_pci.c,v 1.9 2010/04/22 21:58:08 jruoho Exp $"); #include #include @@ -57,8 +57,6 @@ static ACPI_STATUS acpi_pcidev_pciroot_bus(ACPI_HANDLE, uint16_t *); static ACPI_STATUS acpi_pcidev_pciroot_bus_callback(ACPI_RESOURCE *, void *); -static ACPI_STATUS acpi_pcidev_scan_rec(struct acpi_devnode *); - /* * Regarding PCI Segment Groups, the ACPI spec says (cf. ACPI 4.0, p. 277): @@ -154,15 +152,15 @@ } /* - * acpi_pcidev_scan_rec: + * acpi_pcidev_scan: * * Scan the ACPI device tree for PCI devices. A node is detected as a * PCI device if it has an ancestor that is a PCI root bridge and such * that all intermediate nodes are PCI-to-PCI bridges. Depth-first * recursive implementation. */ -static ACPI_STATUS -acpi_pcidev_scan_rec(struct acpi_devnode *ad) +ACPI_STATUS +acpi_pcidev_scan(struct acpi_devnode *ad) { struct acpi_devnode *child; struct acpi_pci_info *ap; @@ -239,9 +237,10 @@ goto rec; } + rec: SIMPLEQ_FOREACH(child, &ad->ad_child_head, ad_child_list) { - rv = acpi_pcidev_scan_rec(child); + rv = acpi_pcidev_
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: jym Date: Thu Apr 22 21:47:32 UTC 2010 Modified Files: src/sys/arch/x86/x86: via_padlock.c Log Message: Uses cpu_feature, so include To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/x86/x86/via_padlock.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/x86/via_padlock.c diff -u src/sys/arch/x86/x86/via_padlock.c:1.12 src/sys/arch/x86/x86/via_padlock.c:1.13 --- src/sys/arch/x86/x86/via_padlock.c:1.12 Sun Apr 18 23:47:51 2010 +++ src/sys/arch/x86/x86/via_padlock.c Thu Apr 22 21:47:32 2010 @@ -1,5 +1,5 @@ /* $OpenBSD: via.c,v 1.8 2006/11/17 07:47:56 tom Exp $ */ -/* $NetBSD: via_padlock.c,v 1.12 2010/04/18 23:47:51 jym Exp $ */ +/* $NetBSD: via_padlock.c,v 1.13 2010/04/22 21:47:32 jym Exp $ */ /*- * Copyright (c) 2003 Jason Wright @@ -20,7 +20,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: via_padlock.c,v 1.12 2010/04/18 23:47:51 jym Exp $"); +__KERNEL_RCSID(0, "$NetBSD: via_padlock.c,v 1.13 2010/04/22 21:47:32 jym Exp $"); #include "rnd.h" @@ -43,6 +43,7 @@ #include #include +#include #include #include
CVS commit: src/usr.bin/make/unit-tests
Module Name:src Committed By: sjg Date: Thu Apr 22 21:41:11 UTC 2010 Modified Files: src/usr.bin/make/unit-tests: Makefile Log Message: Force LANG=C to ensure sort(1) behaves as expected To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/usr.bin/make/unit-tests/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/unit-tests/Makefile diff -u src/usr.bin/make/unit-tests/Makefile:1.27 src/usr.bin/make/unit-tests/Makefile:1.28 --- src/usr.bin/make/unit-tests/Makefile:1.27 Thu Apr 22 19:15:24 2010 +++ src/usr.bin/make/unit-tests/Makefile Thu Apr 22 21:41:11 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.27 2010/04/22 19:15:24 sjg Exp $ +# $NetBSD: Makefile,v 1.28 2010/04/22 21:41:11 sjg Exp $ # # Unit tests for make(1) # The main targets are: @@ -58,6 +58,10 @@ TEST_MAKE?= ${.MAKE} TOOL_SED?= sed +# ensure consistent results from sort(1) +LANG= C +.export LANG + # The driver. # We always pretend .MAKE was called 'make' # and strip ${.CURDIR}/ from the output
CVS commit: src/sys/arch/i386/i386
Module Name:src Committed By: jym Date: Thu Apr 22 21:02:25 UTC 2010 Modified Files: src/sys/arch/i386/i386: pmc.c Log Message: CPUID_TSC => cpu_hascounter(). This one was missing in my cpu_feature rework patch. Should fix the i386/ALL build issue many have reported. Thanks! To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/i386/i386/pmc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/i386/pmc.c diff -u src/sys/arch/i386/i386/pmc.c:1.17 src/sys/arch/i386/i386/pmc.c:1.18 --- src/sys/arch/i386/i386/pmc.c:1.17 Sun May 11 14:44:54 2008 +++ src/sys/arch/i386/i386/pmc.c Thu Apr 22 21:02:25 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pmc.c,v 1.17 2008/05/11 14:44:54 ad Exp $ */ +/* $NetBSD: pmc.c,v 1.18 2010/04/22 21:02:25 jym Exp $ */ /*- * Copyright (c) 2000 Zembu Labs, Inc. @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmc.c,v 1.17 2008/05/11 14:44:54 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmc.c,v 1.18 2010/04/22 21:02:25 jym Exp $"); #include #include @@ -122,7 +122,7 @@ break; } - if (pmc_type != PMC_TYPE_NONE && (cpu_feature & CPUID_TSC) != 0) + if (pmc_type != PMC_TYPE_NONE && cpu_hascounter()) pmc_flags |= PMC_INFO_HASTSC; #ifdef MULTIPROCESSOR
CVS commit: src/usr.bin/make
Module Name:src Committed By: dholland Date: Thu Apr 22 20:25:16 UTC 2010 Modified Files: src/usr.bin/make: main.c Log Message: don't use strlcpy; it causes bootstrap issues. (noted by moof) To generate a diff of this commit: cvs rdiff -u -r1.180 -r1.181 src/usr.bin/make/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/main.c diff -u src/usr.bin/make/main.c:1.180 src/usr.bin/make/main.c:1.181 --- src/usr.bin/make/main.c:1.180 Thu Apr 22 19:11:17 2010 +++ src/usr.bin/make/main.c Thu Apr 22 20:25:16 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.180 2010/04/22 19:11:17 sjg Exp $ */ +/* $NetBSD: main.c,v 1.181 2010/04/22 20:25:16 dholland Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.180 2010/04/22 19:11:17 sjg Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.181 2010/04/22 20:25:16 dholland Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.180 2010/04/22 19:11:17 sjg Exp $"); +__RCSID("$NetBSD: main.c,v 1.181 2010/04/22 20:25:16 dholland Exp $"); #endif #endif /* not lint */ #endif @@ -1974,7 +1974,7 @@ } } if (pattern[0] == '/') { - strlcpy(tfile, pattern, sizeof(tfile)); + snprintf(tfile, sizeof(tfile), "%s", pattern); } else { snprintf(tfile, sizeof(tfile), "%s%s", tmpdir, pattern); }
CVS commit: [netbsd-5-0] src/doc
Module Name:src Committed By: snj Date: Thu Apr 22 20:12:37 UTC 2010 Modified Files: src/doc [netbsd-5-0]: CHANGES-5.0.3 Log Message: Tickets 1376 and 1377. To generate a diff of this commit: cvs rdiff -u -r1.1.2.10 -r1.1.2.11 src/doc/CHANGES-5.0.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.0.3 diff -u src/doc/CHANGES-5.0.3:1.1.2.10 src/doc/CHANGES-5.0.3:1.1.2.11 --- src/doc/CHANGES-5.0.3:1.1.2.10 Mon Apr 12 21:55:48 2010 +++ src/doc/CHANGES-5.0.3 Thu Apr 22 20:12:37 2010 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.0.3,v 1.1.2.10 2010/04/12 21:55:48 snj Exp $ +# $NetBSD: CHANGES-5.0.3,v 1.1.2.11 2010/04/22 20:12:37 snj Exp $ A complete list of changes from the NetBSD 5.0.2 release to the NetBSD 5.0.3 release: @@ -193,3 +193,19 @@ Fix CVE-2009-3767. [lukem, ticket #1374] +sys/arch/amd64/amd64/locore.S 1.56 + + When kernel remaps to high memory in amd64 locore, the GDT used + before becomes invalid. As such, split it in two parts, one for + use when system boots in low memory, and one for use when it jumps + to high memory. + [jym, ticket #1376] + +sys/arch/x86/x86/identcpu.c 1.19 + + Fix a test semantic in cpu_probe(): check that the CPU currently + probed is the first one booting by comparing its struct cpu_info + address with cpu_info_primary, rather than supposing that + cpu_feature variables are set to 0. + [jym, ticket #1377] +
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: snj Date: Thu Apr 22 20:08:56 UTC 2010 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Tickets 1376, 1377, and 1380. To generate a diff of this commit: cvs rdiff -u -r1.1.2.226 -r1.1.2.227 src/doc/CHANGES-5.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.1 diff -u src/doc/CHANGES-5.1:1.1.2.226 src/doc/CHANGES-5.1:1.1.2.227 --- src/doc/CHANGES-5.1:1.1.2.226 Mon Apr 12 21:46:03 2010 +++ src/doc/CHANGES-5.1 Thu Apr 22 20:08:56 2010 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.226 2010/04/12 21:46:03 snj Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.227 2010/04/22 20:08:56 snj Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -17176,3 +17176,38 @@ Fix CVE-2009-3767. [lukem, ticket #1374] +sys/arch/amd64/amd64/locore.S 1.56 + + When kernel remaps to high memory in amd64 locore, the GDT used + before becomes invalid. As such, split it in two parts, one for + use when system boots in low memory, and one for use when it jumps + to high memory. + [jym, ticket #1376] + +sys/arch/x86/x86/identcpu.c 1.19 + + Fix a test semantic in cpu_probe(): check that the CPU currently + probed is the first one booting by comparing its struct cpu_info + address with cpu_info_primary, rather than supposing that + cpu_feature variables are set to 0. + [jym, ticket #1377] + +sys/arch/amd64/amd64/locore.S patch +sys/arch/amd64/amd64/machdep.c patch +sys/arch/amd64/amd64/mptramp.S patch +sys/arch/i386/i386/machdep.c patch +sys/arch/i386/isa/npx.cpatch +sys/arch/x86/include/cpu.h patch +sys/arch/x86/include/cpuvar.h patch +sys/arch/x86/x86/cpu.cpatch +sys/arch/x86/x86/cpu_topology.c patch +sys/arch/x86/x86/identcpu.c patch +sys/arch/x86/x86/pmap.cpatch +sys/arch/xen/x86/cpu.cpatch + + Fix the NX regression issue observed on amd64 kernels, where + per-page execution right was disabled (therefore leading to the + inability of the kernel to detect fraudulent use of memory mappings + marked as not being executable). + [jym, ticket #1380] +
CVS commit: src/sys/netinet6
Module Name:src Committed By: dyoung Date: Thu Apr 22 20:05:15 UTC 2010 Modified Files: src/sys/netinet6: in6.c Log Message: When choosing IPv6 source addresses, respect the ifaddr preference level such as one might set with 'ifconfig xx0 inet6 preference '. I've been running this for many months without any problems. To generate a diff of this commit: cvs rdiff -u -r1.155 -r1.156 src/sys/netinet6/in6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/in6.c diff -u src/sys/netinet6/in6.c:1.155 src/sys/netinet6/in6.c:1.156 --- src/sys/netinet6/in6.c:1.155 Wed Apr 7 22:59:15 2010 +++ src/sys/netinet6/in6.c Thu Apr 22 20:05:15 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: in6.c,v 1.155 2010/04/07 22:59:15 oki Exp $ */ +/* $NetBSD: in6.c,v 1.156 2010/04/22 20:05:15 dyoung Exp $ */ /* $KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.155 2010/04/07 22:59:15 oki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.156 2010/04/22 20:05:15 dyoung Exp $"); #include "opt_inet.h" #include "opt_pfil_hooks.h" @@ -1792,6 +1792,14 @@ return error; } +static struct ifaddr * +bestifa(struct ifaddr *best_ifa, struct ifaddr *ifa) +{ + if (best_ifa == NULL || best_ifa->ifa_preference < ifa->ifa_preference) + return ifa; + return best_ifa; +} + /* * Find an IPv6 interface link-local address specific to an interface. */ @@ -1809,10 +1817,7 @@ continue; if struct in6_ifaddr *)ifa)->ia6_flags & ignoreflags) != 0) continue; - if (best_ifa == NULL) - best_ifa = ifa; - else if (best_ifa->ifa_preference < ifa->ifa_preference) - best_ifa = ifa; + best_ifa = bestifa(best_ifa, ifa); } return (struct in6_ifaddr *)best_ifa; @@ -1825,18 +1830,28 @@ struct in6_ifaddr * in6ifa_ifpwithaddr(const struct ifnet *ifp, const struct in6_addr *addr) { - struct ifaddr *ifa; + struct ifaddr *best_ifa = NULL, *ifa; IFADDR_FOREACH(ifa, ifp) { if (ifa->ifa_addr == NULL) continue; /* just for safety */ if (ifa->ifa_addr->sa_family != AF_INET6) continue; - if (IN6_ARE_ADDR_EQUAL(addr, IFA_IN6(ifa))) - break; + if (!IN6_ARE_ADDR_EQUAL(addr, IFA_IN6(ifa))) + continue; + best_ifa = bestifa(best_ifa, ifa); } - return (struct in6_ifaddr *)ifa; + return (struct in6_ifaddr *)best_ifa; +} + +static struct in6_ifaddr * +bestia(struct in6_ifaddr *best_ia, struct in6_ifaddr *ia) +{ + if (best_ia == NULL || + best_ia->ia_ifa.ifa_preference < ia->ia_ifa.ifa_preference) + return ia; + return best_ia; } /* @@ -1847,7 +1862,7 @@ in6ifa_ifplocaladdr(const struct ifnet *ifp, const struct in6_addr *addr) { struct ifaddr *ifa; - struct in6_ifaddr *ia; + struct in6_ifaddr *best_ia = NULL, *ia; IFADDR_FOREACH(ifa, ifp) { if (ifa->ifa_addr == NULL) @@ -1855,13 +1870,14 @@ if (ifa->ifa_addr->sa_family != AF_INET6) continue; ia = (struct in6_ifaddr *)ifa; - if (IN6_ARE_MASKED_ADDR_EQUAL(addr, + if (!IN6_ARE_MASKED_ADDR_EQUAL(addr, &ia->ia_addr.sin6_addr, &ia->ia_prefixmask.sin6_addr)) - return ia; + continue; + best_ia = bestia(best_ia, ia); } - return NULL; + return best_ia; } /* @@ -2043,7 +2059,7 @@ { int dst_scope = in6_addrscope(dst), blen = -1, tlen; struct ifaddr *ifa; - struct in6_ifaddr *besta = 0; + struct in6_ifaddr *best_ia = NULL, *ia; struct in6_ifaddr *dep[2]; /* last-resort: deprecated */ dep[0] = dep[1] = NULL; @@ -2057,54 +2073,60 @@ IFADDR_FOREACH(ifa, ifp) { if (ifa->ifa_addr->sa_family != AF_INET6) continue; - if (((struct in6_ifaddr *)ifa)->ia6_flags & IN6_IFF_ANYCAST) + ia = (struct in6_ifaddr *)ifa; + if (ia->ia6_flags & IN6_IFF_ANYCAST) continue; /* XXX: is there any case to allow anycast? */ - if (((struct in6_ifaddr *)ifa)->ia6_flags & IN6_IFF_NOTREADY) + if (ia->ia6_flags & IN6_IFF_NOTREADY) continue; /* don't use this interface */ - if (((struct in6_ifaddr *)ifa)->ia6_flags & IN6_IFF_DETACHED) + if (ia->ia6_flags & IN6_IFF_DETACHED) continue; - if (((struct in6_ifaddr *)ifa)->ia6_flags & IN6_IFF_DEPRECATED) { + if (ia->ia6_flags & IN6_IFF_DEPRECATED) { if (ip6_use_deprecated) -dep[0] = (struct in6_ifaddr *)ifa; +dep[0] = ia; continue; } - if (dst_scope == in6_addrscope(IFA_IN6(ifa))) { - /* - * call in6_matchlen() as few as possible - */ - if (besta) { -if (blen == -1) - blen = in6_matchlen(&besta->ia_addr.sin6_addr, dst); -tlen = in6_matchlen(IFA_IN6(ifa), dst); -if (tlen > blen) { - blen = tlen; - besta = (struct in6_ifaddr *)ifa; -} - } else -besta = (struct in6_ifaddr *)ifa; + if (dst_scope != in6_addrscope(IFA_IN6(ifa))) + continue; + /* + * call in6_matchlen() as few as possible + */ + if (best_ia == NULL) { + best_ia = ia; + continue; } + if (blen == -1) + blen = in6_matchlen(&best_ia->ia_a
CVS commit: [netbsd-5] src/sys/arch
Module Name:src Committed By: snj Date: Thu Apr 22 20:02:49 UTC 2010 Modified Files: src/sys/arch/amd64/amd64 [netbsd-5]: locore.S machdep.c mptramp.S src/sys/arch/i386/i386 [netbsd-5]: machdep.c src/sys/arch/i386/isa [netbsd-5]: npx.c src/sys/arch/x86/include [netbsd-5]: cpu.h cpuvar.h src/sys/arch/x86/x86 [netbsd-5]: cpu.c cpu_topology.c identcpu.c pmap.c src/sys/arch/xen/x86 [netbsd-5]: cpu.c Log Message: Apply patch (requested by jym in ticket #1380): Fix the NX regression issue observed on amd64 kernels, where per-page execution right was disabled (therefore leading to the inability of the kernel to detect fraudulent use of memory mappings marked as not being executable). To generate a diff of this commit: cvs rdiff -u -r1.47.8.3 -r1.47.8.4 src/sys/arch/amd64/amd64/locore.S cvs rdiff -u -r1.102.4.12 -r1.102.4.13 src/sys/arch/amd64/amd64/machdep.c cvs rdiff -u -r1.9 -r1.9.8.1 src/sys/arch/amd64/amd64/mptramp.S cvs rdiff -u -r1.644.4.11 -r1.644.4.12 src/sys/arch/i386/i386/machdep.c cvs rdiff -u -r1.129.10.5 -r1.129.10.6 src/sys/arch/i386/isa/npx.c cvs rdiff -u -r1.9.4.1 -r1.9.4.2 src/sys/arch/x86/include/cpu.h cvs rdiff -u -r1.27.8.2 -r1.27.8.3 src/sys/arch/x86/include/cpuvar.h cvs rdiff -u -r1.57.4.3 -r1.57.4.4 src/sys/arch/x86/x86/cpu.c cvs rdiff -u -r1.2.2.3 -r1.2.2.4 src/sys/arch/x86/x86/cpu_topology.c cvs rdiff -u -r1.10.4.5 -r1.10.4.6 src/sys/arch/x86/x86/identcpu.c cvs rdiff -u -r1.74.4.2 -r1.74.4.3 src/sys/arch/x86/x86/pmap.c cvs rdiff -u -r1.28.4.1 -r1.28.4.2 src/sys/arch/xen/x86/cpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/amd64/locore.S diff -u src/sys/arch/amd64/amd64/locore.S:1.47.8.3 src/sys/arch/amd64/amd64/locore.S:1.47.8.4 --- src/sys/arch/amd64/amd64/locore.S:1.47.8.3 Thu Apr 22 19:54:34 2010 +++ src/sys/arch/amd64/amd64/locore.S Thu Apr 22 20:02:48 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.47.8.3 2010/04/22 19:54:34 snj Exp $ */ +/* $NetBSD: locore.S,v 1.47.8.4 2010/04/22 20:02:48 snj Exp $ */ /* * Copyright-o-rama! @@ -235,7 +235,7 @@ #endif .globl _C_LABEL(cpu_id),_C_LABEL(cpu_vendorname), _C_LABEL(cpu_brand_id) - .globl _C_LABEL(cpuid_level),_C_LABEL(cpu_feature),_C_LABEL(cpu_feature2) + .globl _C_LABEL(cpuid_level) .globl _C_LABEL(esym),_C_LABEL(eblob),_C_LABEL(boothowto) .globl _C_LABEL(bootinfo),_C_LABEL(atdevbase) .globl _C_LABEL(proc0paddr),_C_LABEL(PDPpaddr) @@ -245,10 +245,6 @@ _C_LABEL(cpu): .long 0 # are we 386, 386sx, or 486, # or Pentium, or.. _C_LABEL(cpu_id): .long 0 # saved from `cpuid' instruction -_C_LABEL(cpu_feature): .long 0 # feature flags from 'cpuid' - # instruction -_C_LABEL(cpu_feature2): .long 0 # feature flags from 'cpuid' - # instruction _C_LABEL(cpuid_level): .long -1 # max. level accepted by 'cpuid' # instruction _C_LABEL(cpu_vendorname): .space 16 # vendor string returned by `cpuid' @@ -300,7 +296,7 @@ gdt64_end: farjmp64: - .long longmode-KERNBASE + .long _RELOC(longmode) .word GSEL(GCODE_SEL, SEL_KPL) #endif /* !XEN */ @@ -423,18 +419,11 @@ movl $1,%eax cpuid movl %eax,RELOC(cpu_id) - movl %edx,RELOC(cpu_feature) - movl %ecx,RELOC(cpu_feature2) /* Brand ID is bits 0-7 of %ebx */ andl $255,%ebx movl %ebx,RELOC(cpu_brand_id) - /* add AMD specific feature flags */ - movl $0x8001,%eax - cpuid - orl %edx,RELOC(cpu_feature) - /* * Finished with old stack; load new %esp now instead of later so we * can trace this code without having to worry about the trace trap Index: src/sys/arch/amd64/amd64/machdep.c diff -u src/sys/arch/amd64/amd64/machdep.c:1.102.4.12 src/sys/arch/amd64/amd64/machdep.c:1.102.4.13 --- src/sys/arch/amd64/amd64/machdep.c:1.102.4.12 Tue Dec 1 19:29:54 2009 +++ src/sys/arch/amd64/amd64/machdep.c Thu Apr 22 20:02:48 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.102.4.12 2009/12/01 19:29:54 snj Exp $ */ +/* $NetBSD: machdep.c,v 1.102.4.13 2010/04/22 20:02:48 snj Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008 @@ -112,7 +112,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.102.4.12 2009/12/01 19:29:54 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.102.4.13 2010/04/22 20:02:48 snj Exp $"); /* #define XENDEBUG_LOW */ @@ -1392,9 +1392,9 @@ __PRINTK(("init_x86_64(0x%lx)\n", first_avail)); first_bt_vaddr = (vaddr_t) (first_avail + KERNBASE + PAGE_SIZE * 2); __PRINTK(("first_bt_vaddr 0x%lx\n", first_bt_vaddr)); - cpu_feature = cpu_info_primary.ci_feature_flags; /* not on Xen... */ - cpu_feature &= ~(CPUID_PGE|CPUID_PSE|CPUID_MTRR|CPUID_FXSR|CPUID_NOX); + cpu_feature &= ~(CPUID_PGE|CPUID_PSE|CPUID_MTRR|CPUID_FXSR); + cpu_feature3 &= ~(CPUID_NOX); #endif /* XEN */ cpu_init_msrs(&cpu_info_primary, true); Index: src/sys/arch/amd64/amd64/mptramp.S diff -u src/sys/arch/amd64/amd64/mptramp.S:1.9 src/sys/arch/
CVS commit: [netbsd-5] src/sys/arch/x86/x86
Module Name:src Committed By: snj Date: Thu Apr 22 19:56:45 UTC 2010 Modified Files: src/sys/arch/x86/x86 [netbsd-5]: identcpu.c Log Message: Pull up following revision(s) (requested by jym in ticket #1377): sys/arch/x86/x86/identcpu.c: revision 1.19 Fix a test semantic in cpu_probe(): check that the CPU currently probed is the first one booting by comparing its struct cpu_info address with cpu_info_primary, rather than supposing that cpu_feature variables are set to 0. To generate a diff of this commit: cvs rdiff -u -r1.10.4.4 -r1.10.4.5 src/sys/arch/x86/x86/identcpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/x86/identcpu.c diff -u src/sys/arch/x86/x86/identcpu.c:1.10.4.4 src/sys/arch/x86/x86/identcpu.c:1.10.4.5 --- src/sys/arch/x86/x86/identcpu.c:1.10.4.4 Mon Oct 5 11:37:14 2009 +++ src/sys/arch/x86/x86/identcpu.c Thu Apr 22 19:56:44 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: identcpu.c,v 1.10.4.4 2009/10/05 11:37:14 sborrill Exp $ */ +/* $NetBSD: identcpu.c,v 1.10.4.5 2010/04/22 19:56:44 snj Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.10.4.4 2009/10/05 11:37:14 sborrill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.10.4.5 2010/04/22 19:56:44 snj Exp $"); #include "opt_enhanced_speedstep.h" #include "opt_intel_odcm.h" @@ -623,7 +623,7 @@ wrmsr(MSR_MISC_ENABLE, rdmsr(MSR_MISC_ENABLE) | (1<<3)); } - if ((cpu_feature | cpu_feature2) == 0) { + if (ci == &cpu_info_primary) { /* If first. */ cpu_feature = ci->ci_feature_flags; cpu_feature2 = ci->ci_feature2_flags;
CVS commit: [netbsd-5] src/sys/arch/amd64/amd64
Module Name:src Committed By: snj Date: Thu Apr 22 19:54:34 UTC 2010 Modified Files: src/sys/arch/amd64/amd64 [netbsd-5]: locore.S Log Message: Pull up following revision(s) (requested by jym in ticket #1376): sys/arch/amd64/amd64/locore.S: revision 1.56 When kernel remaps to high memory in amd64 locore, the GDT used before becomes invalid. As such, split it in two parts, one for use when system boots in low memory, and one for use when it jumps to high memory. To generate a diff of this commit: cvs rdiff -u -r1.47.8.2 -r1.47.8.3 src/sys/arch/amd64/amd64/locore.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/amd64/locore.S diff -u src/sys/arch/amd64/amd64/locore.S:1.47.8.2 src/sys/arch/amd64/amd64/locore.S:1.47.8.3 --- src/sys/arch/amd64/amd64/locore.S:1.47.8.2 Mon Feb 2 03:24:05 2009 +++ src/sys/arch/amd64/amd64/locore.S Thu Apr 22 19:54:34 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.47.8.2 2009/02/02 03:24:05 snj Exp $ */ +/* $NetBSD: locore.S,v 1.47.8.3 2010/04/22 19:54:34 snj Exp $ */ /* * Copyright-o-rama! @@ -274,13 +274,25 @@ #define RELOC(x) _RELOC(_C_LABEL(x)) #ifndef XEN - .globl gdt64 + .globl gdt64_lo + .globl gdt64_hi -gdt64: - .word gdt64_end-gdt64_start +#define GDT64_LIMIT gdt64_end-gdt64_start-1 + +/* Temporary gdt64, with base address in low memory */ +gdt64_lo: + .word GDT64_LIMIT .quad _RELOC(gdt64_start) .align 64 +/* Temporary gdt64, with base address in high memory */ +gdt64_hi: + .word GDT64_LIMIT + .quad gdt64_start +.align 64 + +#undef GDT64_LIMIT + gdt64_start: .quad 0x /* always empty */ .quad 0x00af9a00 /* kernel CS */ @@ -643,7 +655,7 @@ * in it to do that. */ - movl $RELOC(gdt64),%eax + movl $RELOC(gdt64_lo),%eax lgdt (%eax) movl $RELOC(farjmp64),%eax ljmp *(%eax) @@ -659,9 +671,17 @@ */ movabsq $longmode_hi,%rax jmp *%rax + longmode_hi: + + /* + * We left the identity mapped area. Base address of + * the temporary gdt64 should now be in high memory. + */ + movq $RELOC(gdt64_hi),%rax + lgdt (%rax) + /* - * We have arrived. * There's no need anymore for the identity mapping in low * memory, remove it. */
CVS commit: [netbsd-5-0] src/sys/arch/x86/x86
Module Name:src Committed By: snj Date: Thu Apr 22 19:41:49 UTC 2010 Modified Files: src/sys/arch/x86/x86 [netbsd-5-0]: identcpu.c Log Message: Pull up following revision(s) (requested by jym in ticket #1377): sys/arch/x86/x86/identcpu.c: revision 1.19 Fix a test semantic in cpu_probe(): check that the CPU currently probed is the first one booting by comparing its struct cpu_info address with cpu_info_primary, rather than supposing that cpu_feature variables are set to 0. To generate a diff of this commit: cvs rdiff -u -r1.10.4.2 -r1.10.4.2.2.1 src/sys/arch/x86/x86/identcpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/x86/identcpu.c diff -u src/sys/arch/x86/x86/identcpu.c:1.10.4.2 src/sys/arch/x86/x86/identcpu.c:1.10.4.2.2.1 --- src/sys/arch/x86/x86/identcpu.c:1.10.4.2 Mon Feb 2 18:50:01 2009 +++ src/sys/arch/x86/x86/identcpu.c Thu Apr 22 19:41:49 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: identcpu.c,v 1.10.4.2 2009/02/02 18:50:01 snj Exp $ */ +/* $NetBSD: identcpu.c,v 1.10.4.2.2.1 2010/04/22 19:41:49 snj Exp $ */ /*- * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -56,7 +56,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.10.4.2 2009/02/02 18:50:01 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: identcpu.c,v 1.10.4.2.2.1 2010/04/22 19:41:49 snj Exp $"); #include "opt_enhanced_speedstep.h" #include "opt_intel_odcm.h" @@ -698,7 +698,7 @@ wrmsr(MSR_MISC_ENABLE, rdmsr(MSR_MISC_ENABLE) | (1<<3)); } - if ((cpu_feature | cpu_feature2) == 0) { + if (ci == &cpu_info_primary) { /* If first. */ cpu_feature = ci->ci_feature_flags; cpu_feature2 = ci->ci_feature2_flags;
CVS commit: [netbsd-5-0] src/sys/arch/amd64/amd64
Module Name:src Committed By: snj Date: Thu Apr 22 19:39:45 UTC 2010 Modified Files: src/sys/arch/amd64/amd64 [netbsd-5-0]: locore.S Log Message: Pull up following revision(s) (requested by jym in ticket #1376): sys/arch/amd64/amd64/locore.S: revision 1.56 When kernel remaps to high memory in amd64 locore, the GDT used before becomes invalid. As such, split it in two parts, one for use when system boots in low memory, and one for use when it jumps to high memory. To generate a diff of this commit: cvs rdiff -u -r1.47.8.2 -r1.47.8.2.2.1 src/sys/arch/amd64/amd64/locore.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/amd64/locore.S diff -u src/sys/arch/amd64/amd64/locore.S:1.47.8.2 src/sys/arch/amd64/amd64/locore.S:1.47.8.2.2.1 --- src/sys/arch/amd64/amd64/locore.S:1.47.8.2 Mon Feb 2 03:24:05 2009 +++ src/sys/arch/amd64/amd64/locore.S Thu Apr 22 19:39:44 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.47.8.2 2009/02/02 03:24:05 snj Exp $ */ +/* $NetBSD: locore.S,v 1.47.8.2.2.1 2010/04/22 19:39:44 snj Exp $ */ /* * Copyright-o-rama! @@ -274,13 +274,25 @@ #define RELOC(x) _RELOC(_C_LABEL(x)) #ifndef XEN - .globl gdt64 + .globl gdt64_lo + .globl gdt64_hi -gdt64: - .word gdt64_end-gdt64_start +#define GDT64_LIMIT gdt64_end-gdt64_start-1 + +/* Temporary gdt64, with base address in low memory */ +gdt64_lo: + .word GDT64_LIMIT .quad _RELOC(gdt64_start) .align 64 +/* Temporary gdt64, with base address in high memory */ +gdt64_hi: + .word GDT64_LIMIT + .quad gdt64_start +.align 64 + +#undef GDT64_LIMIT + gdt64_start: .quad 0x /* always empty */ .quad 0x00af9a00 /* kernel CS */ @@ -643,7 +655,7 @@ * in it to do that. */ - movl $RELOC(gdt64),%eax + movl $RELOC(gdt64_lo),%eax lgdt (%eax) movl $RELOC(farjmp64),%eax ljmp *(%eax) @@ -659,9 +671,17 @@ */ movabsq $longmode_hi,%rax jmp *%rax + longmode_hi: + + /* + * We left the identity mapped area. Base address of + * the temporary gdt64 should now be in high memory. + */ + movq $RELOC(gdt64_hi),%rax + lgdt (%rax) + /* - * We have arrived. * There's no need anymore for the identity mapping in low * memory, remove it. */
CVS commit: src/usr.bin/make
Module Name:src Committed By: sjg Date: Thu Apr 22 19:15:24 UTC 2010 Modified Files: src/usr.bin/make: Makefile make.1 src/usr.bin/make/unit-tests: Makefile modmisc test.exp Log Message: PR: 42850 Reviewed by: modmisc: since we apply an exists() test to $paths, be conservative in what we expect. Run the unit tests with -r -m / so that we do not fail if there is no sys.mk present. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/usr.bin/make/Makefile cvs rdiff -u -r1.170 -r1.171 src/usr.bin/make/make.1 cvs rdiff -u -r1.26 -r1.27 src/usr.bin/make/unit-tests/Makefile cvs rdiff -u -r1.4 -r1.5 src/usr.bin/make/unit-tests/modmisc cvs rdiff -u -r1.32 -r1.33 src/usr.bin/make/unit-tests/test.exp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/Makefile diff -u src/usr.bin/make/Makefile:1.49 src/usr.bin/make/Makefile:1.50 --- src/usr.bin/make/Makefile:1.49 Tue Apr 14 22:15:23 2009 +++ src/usr.bin/make/Makefile Thu Apr 22 19:15:23 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.49 2009/04/14 22:15:23 lukem Exp $ +# $NetBSD: Makefile,v 1.50 2010/04/22 19:15:23 sjg Exp $ # @(#)Makefile 5.2 (Berkeley) 12/28/90 PROG= make @@ -37,4 +37,4 @@ # A simple unit-test driver to help catch regressions accept test: - cd ${.CURDIR}/unit-tests && ${.MAKE:S,^./,${.CURDIR}/,} TEST_MAKE=${TEST_MAKE:U${.OBJDIR}/${PROG:T}} ${.TARGET} + cd ${.CURDIR}/unit-tests && ${.MAKE} -r -m / TEST_MAKE=${TEST_MAKE:U${.OBJDIR}/${PROG:T}} ${.TARGET} Index: src/usr.bin/make/make.1 diff -u src/usr.bin/make/make.1:1.170 src/usr.bin/make/make.1:1.171 --- src/usr.bin/make/make.1:1.170 Thu Apr 15 03:48:39 2010 +++ src/usr.bin/make/make.1 Thu Apr 22 19:15:23 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.170 2010/04/15 03:48:39 sjg Exp $ +.\" $NetBSD: make.1,v 1.171 2010/04/22 19:15:23 sjg Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd April 14, 2010 +.Dd April 21, 2010 .Dt MAKE 1 .Os .Sh NAME @@ -659,6 +659,10 @@ .It Va .MAKE.EXPORTED The list of variables exported by .Nm . +.It Va .MAKE.JOBS +The argument to the +.Fl j +option. .It Va .MAKE.JOB.PREFIX If .Nm Index: src/usr.bin/make/unit-tests/Makefile diff -u src/usr.bin/make/unit-tests/Makefile:1.26 src/usr.bin/make/unit-tests/Makefile:1.27 --- src/usr.bin/make/unit-tests/Makefile:1.26 Thu Apr 8 17:41:29 2010 +++ src/usr.bin/make/unit-tests/Makefile Thu Apr 22 19:15:24 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.26 2010/04/08 17:41:29 sjg Exp $ +# $NetBSD: Makefile,v 1.27 2010/04/22 19:15:24 sjg Exp $ # # Unit tests for make(1) # The main targets are: @@ -53,9 +53,10 @@ clean: rm -f *.out *.fail *.core -.include +.-include TEST_MAKE?= ${.MAKE} +TOOL_SED?= sed # The driver. # We always pretend .MAKE was called 'make' Index: src/usr.bin/make/unit-tests/modmisc diff -u src/usr.bin/make/unit-tests/modmisc:1.4 src/usr.bin/make/unit-tests/modmisc:1.5 --- src/usr.bin/make/unit-tests/modmisc:1.4 Thu May 11 15:37:07 2006 +++ src/usr.bin/make/unit-tests/modmisc Thu Apr 22 19:15:24 2010 @@ -1,8 +1,8 @@ -# $Id: modmisc,v 1.4 2006/05/11 15:37:07 sjg Exp $ +# $Id: modmisc,v 1.5 2010/04/22 19:15:24 sjg Exp $ # # miscellaneous modifier tests -path=:/bin:/usr/bin::/sbin:/usr/sbin:.:/home/user/bin:. +path=:/bin:/usr/bin::/:.:/user/bin:. # strip cwd from path. MOD_NODOT=S/:/ /g:N.:ts: # and decorate, note that $'s need to be doubled. Also note that Index: src/usr.bin/make/unit-tests/test.exp diff -u src/usr.bin/make/unit-tests/test.exp:1.32 src/usr.bin/make/unit-tests/test.exp:1.33 --- src/usr.bin/make/unit-tests/test.exp:1.32 Wed Apr 21 04:25:28 2010 +++ src/usr.bin/make/unit-tests/test.exp Thu Apr 22 19:15:24 2010 @@ -112,14 +112,14 @@ LIB=e X_LIBS:M*/lib${LIB}.a is "/tmp/libe.a" LIB=e X_LIBS:M*/lib${LIB}.a:tu is "/TMP/LIBE.A" Mscanner=OK -path=':/bin:/usr/bin::/sbin:/usr/sbin:.:/home/user/bin:.' -path='/bin:/usr/bin:/sbin:/usr/sbin:/home/user/bin' -path='/bin:/usr/bin:/sbin:/usr/sbin:/homes/user/bin' -path='/bin':'/usr/bin':'/sbin':'/usr/sbin':'/home/user/bin' -path='/bin':'/usr/bin':'/sbin':'/usr/sbin':'/homes/user/bin' +path=':/bin:/usr/bin::/:.:/user/bin:.' +path='/bin:/usr/bin:/:/user/bin' +path='/bin:/usr/bin:/:/user/bin' +path='/bin':'/usr/bin':'/':'/user/bin' +path='/bin':'/usr/bin':'/':'/user/bin' path_/usr/xbin=/opt/xbin/ -paths=/bin /usr/bin /sbin /usr/sbin /homes/user/bin /opt/xbin -PATHS=/BIN /USR/BIN /SBIN /USR/SBIN /HOMES/USER/BIN /OPT/XBIN +paths=/bin /usr/bin / /user/bin /opt/xbin +PATHS=/BIN /USR/BIN / /USER/BIN /OPT/XBIN LIST = one two three four five six seven eight nine ten LIST:O= eight five four nine one seven six ten three two LIST:Ox = Ok
CVS commit: src/usr.bin/make
Module Name:src Committed By: sjg Date: Thu Apr 22 19:11:17 UTC 2010 Modified Files: src/usr.bin/make: job.c main.c make.h Log Message: Just because $TMPDIR is set does not mean it is valid. Add a central function for creating temp files so we have one place to audit. Reviewed by: dh To generate a diff of this commit: cvs rdiff -u -r1.147 -r1.148 src/usr.bin/make/job.c cvs rdiff -u -r1.179 -r1.180 src/usr.bin/make/main.c cvs rdiff -u -r1.80 -r1.81 src/usr.bin/make/make.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/job.c diff -u src/usr.bin/make/job.c:1.147 src/usr.bin/make/job.c:1.148 --- src/usr.bin/make/job.c:1.147 Wed Apr 7 00:11:27 2010 +++ src/usr.bin/make/job.c Thu Apr 22 19:11:17 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.147 2010/04/07 00:11:27 sjg Exp $ */ +/* $NetBSD: job.c,v 1.148 2010/04/22 19:11:17 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: job.c,v 1.147 2010/04/07 00:11:27 sjg Exp $"; +static char rcsid[] = "$NetBSD: job.c,v 1.148 2010/04/22 19:11:17 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: job.c,v 1.147 2010/04/07 00:11:27 sjg Exp $"); +__RCSID("$NetBSD: job.c,v 1.148 2010/04/22 19:11:17 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -342,8 +342,6 @@ #define KILLPG(pid, sig) killpg((pid), (sig)) #endif -static char *tmpdir; /* directory name, always ending with "/" */ - static void JobChildSig(int); static void JobContinueSig(int); static Job *JobFindPid(int, int); @@ -1555,11 +1553,7 @@ } JobSigLock(&mask); - tfile = bmake_malloc(strlen(tmpdir) + sizeof(TMPPAT)); - strcpy(tfile, tmpdir); - strcat(tfile, TMPPAT); - if ((tfd = mkstemp(tfile)) == -1) - Punt("Could not create temporary file %s", strerror(errno)); + tfd = mkTempFile(TMPPAT, &tfile); if (!DEBUG(SCRIPT)) (void)eunlink(tfile); JobSigUnlock(&mask); @@ -2122,8 +2116,6 @@ Job_Init(void) { GNode *begin; /* node for commands to do at the very start */ -const char*p; -size_tlen; /* Allocate space for all the job info */ job_table = bmake_malloc(maxJobs * sizeof *job_table); @@ -2136,18 +2128,6 @@ lastNode = NULL; -/* set tmpdir, and ensure that it ends with "/" */ -p = getenv("TMPDIR"); -if (p == NULL || *p == '\0') { - p = _PATH_TMP; -} -len = strlen(p); -tmpdir = bmake_malloc(len + 2); -strcpy(tmpdir, p); -if (tmpdir[len - 1] != '/') { - strcat(tmpdir, "/"); -} - if (maxJobs == 1) { /* * If only one job can run at a time, there's no need for a banner, Index: src/usr.bin/make/main.c diff -u src/usr.bin/make/main.c:1.179 src/usr.bin/make/main.c:1.180 --- src/usr.bin/make/main.c:1.179 Tue Apr 20 17:18:08 2010 +++ src/usr.bin/make/main.c Thu Apr 22 19:11:17 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.179 2010/04/20 17:18:08 sjg Exp $ */ +/* $NetBSD: main.c,v 1.180 2010/04/22 19:11:17 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.179 2010/04/20 17:18:08 sjg Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.180 2010/04/22 19:11:17 sjg Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.179 2010/04/20 17:18:08 sjg Exp $"); +__RCSID("$NetBSD: main.c,v 1.180 2010/04/22 19:11:17 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -385,6 +385,7 @@ case 'B': compatMake = TRUE; Var_Append(MAKEFLAGS, "-B", VAR_GLOBAL); + Var_Set(MAKE_MODE, "compat", VAR_GLOBAL, 0); break; case 'C': if (chdir(argvalue) == -1) { @@ -500,6 +501,7 @@ } Var_Append(MAKEFLAGS, "-j", VAR_GLOBAL); Var_Append(MAKEFLAGS, argvalue, VAR_GLOBAL); + Var_Set(".MAKE.JOBS", argvalue, VAR_GLOBAL, 0); maxJobTokens = maxJobs; break; case 'k': @@ -1942,3 +1944,46 @@ #endif } } + +/* + * Create and open a temp file using "pattern". + * If "fnamep" is provided set it to a copy of the filename created. + * Otherwise unlink the file once open. + */ +int +mkTempFile(const char *pattern, char **fnamep) +{ +static char *tmpdir = NULL; +char tfile[MAXPATHLEN]; +int fd; + +if (!pattern) + pattern = TMPPAT; + +if (!tmpdir) { + struct stat st; + + /* + * Honor $TMPDIR but only if it is valid. + * Ensure it ends with /. + */ + tmpdir = Var_Subst(NULL, "${TMPDIR:tA:U/tmp}/", VAR_GLOBAL, 0); + if (stat(tmpdir, &st) < 0 || !S_ISDIR(st.st_mode)) { + free(tmpdir); + tmpdir = bmake_strdup(_PATH_TMP); + } +} +if (pattern[0] == '/') { + strlcpy(tfile, pattern, sizeof(tfile)); +} else
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Thu Apr 22 18:53:24 UTC 2010 Modified Files: src/sys/dev/acpi: acpivar.h Log Message: Remove a redundant prototype. A leftover from the previous commit. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/dev/acpi/acpivar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/acpivar.h diff -u src/sys/dev/acpi/acpivar.h:1.51 src/sys/dev/acpi/acpivar.h:1.52 --- src/sys/dev/acpi/acpivar.h:1.51 Thu Apr 22 18:40:09 2010 +++ src/sys/dev/acpi/acpivar.h Thu Apr 22 18:53:23 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpivar.h,v 1.51 2010/04/22 18:40:09 jruoho Exp $ */ +/* $NetBSD: acpivar.h,v 1.52 2010/04/22 18:53:23 jruoho Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -276,8 +276,6 @@ void acpi_resource_print(device_t, struct acpi_resources *); void acpi_resource_cleanup(struct acpi_resources *); -ACPI_STATUS acpi_pwr_switch_consumer(ACPI_HANDLE, int); - void * acpi_pci_link_devbyhandle(ACPI_HANDLE); void acpi_pci_link_add_reference(void *, int, int, int, int); int acpi_pci_link_route_interrupt(void *, int, int *, int *, int *);
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Thu Apr 22 18:40:10 UTC 2010 Modified Files: src/sys/dev/acpi: acpi.c acpi_tz.c acpivar.h files.acpi Added Files: src/sys/dev/acpi: acpi_power.c acpi_power.h Removed Files: src/sys/dev/acpi: acpi_powerres.c Log Message: Merge new code for ACPI power resources. The old code served us well, but a major overhaul would have been needed for it to cope with the increased demands of the code -- and the specifications. ok jmcneill@, pgoyette@ To generate a diff of this commit: cvs rdiff -u -r1.180 -r1.181 src/sys/dev/acpi/acpi.c cvs rdiff -u -r0 -r1.1 src/sys/dev/acpi/acpi_power.c \ src/sys/dev/acpi/acpi_power.h cvs rdiff -u -r1.12 -r0 src/sys/dev/acpi/acpi_powerres.c cvs rdiff -u -r1.66 -r1.67 src/sys/dev/acpi/acpi_tz.c cvs rdiff -u -r1.50 -r1.51 src/sys/dev/acpi/acpivar.h cvs rdiff -u -r1.73 -r1.74 src/sys/dev/acpi/files.acpi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/acpi.c diff -u src/sys/dev/acpi/acpi.c:1.180 src/sys/dev/acpi/acpi.c:1.181 --- src/sys/dev/acpi/acpi.c:1.180 Thu Apr 22 14:50:30 2010 +++ src/sys/dev/acpi/acpi.c Thu Apr 22 18:40:09 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi.c,v 1.180 2010/04/22 14:50:30 jruoho Exp $ */ +/* $NetBSD: acpi.c,v 1.181 2010/04/22 18:40:09 jruoho Exp $ */ /*- * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.180 2010/04/22 14:50:30 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.181 2010/04/22 18:40:09 jruoho Exp $"); #include "opt_acpi.h" #include "opt_pcifixup.h" @@ -82,6 +82,7 @@ #include #include #include +#include #include #include @@ -979,11 +980,18 @@ /* * Handled internally. */ - if (ad->ad_devinfo->Type == ACPI_TYPE_PROCESSOR || - ad->ad_devinfo->Type == ACPI_TYPE_POWER) + if (ad->ad_devinfo->Type == ACPI_TYPE_PROCESSOR) continue; /* + * Ditto, but bind power resources. + */ + if (ad->ad_devinfo->Type == ACPI_TYPE_POWER) { + acpi_power_res_add(ad); + continue; + } + + /* * Skip ignored HIDs. */ if (acpi_match_hid(ad->ad_devinfo, acpi_ignored_ids)) @@ -1019,14 +1027,16 @@ /* * Scan power resource capabilities. + * + * If any power states are supported, + * at least _PR0 and _PR3 must be present. */ rv = AcpiGetHandle(ad->ad_handle, "_PR0", &tmp); - if (ACPI_FAILURE(rv)) - rv = AcpiGetHandle(ad->ad_handle, "_PSC", &tmp); - - if (ACPI_SUCCESS(rv)) + if (ACPI_SUCCESS(rv)) { ad->ad_flags |= ACPI_DEVICE_POWER; + (void)acpi_power_get(ad, NULL); + } /* * Scan wake-up capabilities. @@ -1041,12 +1051,12 @@ if (ad->ad_flags != 0) { aprint_debug_dev(sc->sc_dev, "%-5s ", ad->ad_name); - if ((ad->ad_flags & ACPI_DEVICE_POWER) != 0) -aprint_debug("power "); - if ((ad->ad_flags & ACPI_DEVICE_WAKEUP) != 0) aprint_debug("wake-up "); + if ((ad->ad_flags & ACPI_DEVICE_POWER) != 0) +aprint_debug("power (D%d) ", ad->ad_state); + aprint_debug("\n"); } } Index: src/sys/dev/acpi/acpi_tz.c diff -u src/sys/dev/acpi/acpi_tz.c:1.66 src/sys/dev/acpi/acpi_tz.c:1.67 --- src/sys/dev/acpi/acpi_tz.c:1.66 Fri Apr 16 01:52:54 2010 +++ src/sys/dev/acpi/acpi_tz.c Thu Apr 22 18:40:09 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_tz.c,v 1.66 2010/04/16 01:52:54 christos Exp $ */ +/* $NetBSD: acpi_tz.c,v 1.67 2010/04/22 18:40:09 jruoho Exp $ */ /* * Copyright (c) 2003 Jared D. McNeill @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.66 2010/04/16 01:52:54 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_tz.c,v 1.67 2010/04/22 18:40:09 jruoho Exp $"); #include #include @@ -40,6 +40,7 @@ #include #include +#include #define _COMPONENT ACPI_TZ_COMPONENT ACPI_MODULE_NAME("acpi_tz") @@ -211,6 +212,7 @@ acpitz_get_zone(self, 1); acpitz_get_status(self); + (void)acpi_power_register(sc->sc_devnode); (void)acpi_register_notify(sc->sc_devnode, acpitz_notify_handler); callout_init(&sc->sc_callout, CALLOUT_MPSAFE); @@ -373,8 +375,8 @@ acpitz_switch_cooler(ACPI_OBJECT *obj, void *arg) { ACPI_HANDLE cooler; - ACPI_STATUS rv; int pwr_state, flag; + ACPI_STATUS rv; flag = *(int *)arg; @@ -384,15 +386,13 @@ pwr_state = ACPI_STATE_D3; rv = acpi_eval_reference_handle(obj, &cooler); + if (ACPI_FAILURE(rv)) { aprint_error("%s: failed to get handle\n", __func__); return rv; } - rv = acpi_pwr_switch_consumer(cooler, pwr_state); - if (rv != AE_BAD_PARAMETER && ACPI_FAILURE(rv)) - aprint_error("%s: failed to change state for %s: %s\n", - __func__, acpi_name(cooler), AcpiFormatException(rv)); + (void)acpi_power_set_from_handle(cooler, pwr_state); return AE_OK; } Index: src/sys/dev/acpi/acpivar.h diff -u src/sys/dev/acpi/acpivar.h:1.50 src/sys/dev/acpi/acpivar.h:1.51 --
CVS commit: [matt-nb5-mips64] src/common/lib/libc/arch/mips/string
Module Name:src Committed By: matt Date: Thu Apr 22 17:50:31 UTC 2010 Modified Files: src/common/lib/libc/arch/mips/string [matt-nb5-mips64]: ffs.S Log Message: Fix mips32/mips64 versions of ffs. To generate a diff of this commit: cvs rdiff -u -r1.1.40.2 -r1.1.40.3 src/common/lib/libc/arch/mips/string/ffs.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/mips/string/ffs.S diff -u src/common/lib/libc/arch/mips/string/ffs.S:1.1.40.2 src/common/lib/libc/arch/mips/string/ffs.S:1.1.40.3 --- src/common/lib/libc/arch/mips/string/ffs.S:1.1.40.2 Wed Apr 21 05:17:12 2010 +++ src/common/lib/libc/arch/mips/string/ffs.S Thu Apr 22 17:50:30 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: ffs.S,v 1.1.40.2 2010/04/21 05:17:12 matt Exp $ */ +/* $NetBSD: ffs.S,v 1.1.40.3 2010/04/22 17:50:30 matt Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. * All rights reserved. @@ -30,7 +30,7 @@ #include -RCSID("$NetBSD: ffs.S,v 1.1.40.2 2010/04/21 05:17:12 matt Exp $") +RCSID("$NetBSD: ffs.S,v 1.1.40.3 2010/04/22 17:50:30 matt Exp $") /* bit = ffs(value) */ @@ -45,9 +45,11 @@ .set mips32 li v1, 32 #if __mips == 64 - sll v0, a0, 0 + sll a0, a0, 0 #endif - clz v0, v0 + negu a1, a0 + and a0, a1 + clz v0, a0 j ra subu v0, v1, v0 .set pop @@ -55,6 +57,8 @@ #if defined(_LP64) && __mips == 64 LEAF(ffsl) li v1, 64 + negu a1, a0 + and a0, a1 dclz v0, a0 j ra subu v0, v1, v0
CVS commit: src/external/bsd/tre/dist/lib
Module Name:src Committed By: agc Date: Thu Apr 22 17:33:54 UTC 2010 Modified Files: src/external/bsd/tre/dist/lib: regexec.c Log Message: implement the REG_STARTEND extension using tre_regnexec - REG_STARTEND is used by mail(1), and file(1), to name but two. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/tre/dist/lib/regexec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tre/dist/lib/regexec.c diff -u src/external/bsd/tre/dist/lib/regexec.c:1.1.1.1 src/external/bsd/tre/dist/lib/regexec.c:1.2 --- src/external/bsd/tre/dist/lib/regexec.c:1.1.1.1 Thu Feb 25 07:33:19 2010 +++ src/external/bsd/tre/dist/lib/regexec.c Thu Apr 22 17:33:54 2010 @@ -213,7 +213,20 @@ tre_regexec(const regex_t *preg, const char *str, size_t nmatch, regmatch_t pmatch[], int eflags) { - return tre_regnexec(preg, str, (unsigned)-1, nmatch, pmatch, eflags); + const char *newstr; + unsigned newflags; + size_t newlen; + + if (eflags & REG_STARTEND) { + newstr = &str[pmatch[0].rm_so]; + newlen = pmatch[0].rm_eo; + newflags = (unsigned)(eflags & ~REG_STARTEND); + } else { + newstr = str; + newlen = (size_t)-1; + newflags = (unsigned)eflags; + } + return tre_regnexec(preg, newstr, newlen, nmatch, pmatch, (int)newflags); }
CVS commit: src/external/bsd/tre/dist/lib
Module Name:src Committed By: agc Date: Thu Apr 22 17:32:37 UTC 2010 Modified Files: src/external/bsd/tre/dist/lib: tre.h Log Message: don't include parameter names in the namespace for function prototypes. define REG_STARTEND include tre-config.h inplace in tre.h, since it is small, always gets included anyway, and this means that we don't have to install tre-config.h in the dest tree. this will be addressed differently long-term. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/tre/dist/lib/tre.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tre/dist/lib/tre.h diff -u src/external/bsd/tre/dist/lib/tre.h:1.1.1.1 src/external/bsd/tre/dist/lib/tre.h:1.2 --- src/external/bsd/tre/dist/lib/tre.h:1.1.1.1 Thu Feb 25 07:33:19 2010 +++ src/external/bsd/tre/dist/lib/tre.h Thu Apr 22 17:32:37 2010 @@ -9,7 +9,58 @@ #ifndef TRE_H #define TRE_H 1 -#include "tre-config.h" +/* #include "tre-config.h" */ + +/* included tre-config.h inline below - agc */ +/* >>> */ +/* lib/tre-config.h. Generated from tre-config.h.in by configure. */ +/* tre-config.h.in. This file has all definitions that are needed in + `tre.h'. Note that this file must contain only the bare minimum + of definitions without the TRE_ prefix to avoid conflicts between + definitions here and definitions included from somewhere else. */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LIBUTF8_H */ + +/* Define to 1 if the system has the type `reg_errcode_t'. */ +/* #undef HAVE_REG_ERRCODE_T */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_TYPES_H */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Define if you want to enable approximate matching functionality. */ +#define TRE_APPROX 1 + +/* Define to enable multibyte character set support. */ +#define TRE_MULTIBYTE 1 + +/* Define to the absolute path to the system tre.h */ +/* #undef TRE_SYSTEM_REGEX_H_PATH */ + +/* Define to include the system regex.h from tre.h */ +/* #undef TRE_USE_SYSTEM_REGEX_H */ + +/* Define to enable wide character (wchar_t) support. */ +#define TRE_WCHAR 1 + +/* TRE version string. */ +#define TRE_VERSION "0.8.0" + +/* TRE version level 1. */ +#define TRE_VERSION_1 0 + +/* TRE version level 2. */ +#define TRE_VERSION_2 8 + +/* TRE version level 3. */ +#define TRE_VERSION_3 0 + +/* <<< */ +/* end of tre-config.h */ #ifdef HAVE_SYS_TYPES_H #include @@ -114,6 +165,9 @@ #define REG_APPROX_MATCHER (REG_NOTEOL << 1) #define REG_BACKTRACKING_MATCHER (REG_APPROX_MATCHER << 1) +/* emulate Spencer regexp behavior with tre_regnexec */ +#define REG_STARTEND (REG_BACKTRACKING_MATCHER << 1) + #endif /* !TRE_USE_SYSTEM_REGEX_H */ /* REG_NOSPEC and REG_LITERAL mean the same thing. */ @@ -129,18 +183,16 @@ /* The POSIX.2 regexp functions */ extern int -tre_regcomp(regex_t *preg, const char *regex, int cflags); +tre_regcomp(regex_t *, const char *, int); extern int -tre_regexec(const regex_t *preg, const char *string, size_t nmatch, - regmatch_t pmatch[], int eflags); +tre_regexec(const regex_t *, const char *, size_t, regmatch_t *, int); extern size_t -tre_regerror(int errcode, const regex_t *preg, char *errbuf, - size_t errbuf_size); +tre_regerror(int, const regex_t *, char *, size_t); extern void -tre_regfree(regex_t *preg); +tre_regfree(regex_t *); #ifdef TRE_WCHAR #ifdef HAVE_WCHAR_H @@ -149,29 +201,29 @@ /* Wide character versions (not in POSIX.2). */ extern int -tre_regwcomp(regex_t *preg, const wchar_t *regex, int cflags); +tre_regwcomp(regex_t *, const wchar_t *, int); extern int -tre_regwexec(const regex_t *preg, const wchar_t *string, - size_t nmatch, regmatch_t pmatch[], int eflags); +tre_regwexec(const regex_t *, const wchar_t *, + size_t, regmatch_t [], int); #endif /* TRE_WCHAR */ /* Versions with a maximum length argument and therefore the capability to handle null characters in the middle of the strings (not in POSIX.2). */ extern int -tre_regncomp(regex_t *preg, const char *regex, size_t len, int cflags); +tre_regncomp(regex_t *, const char *, size_t, int); extern int -tre_regnexec(const regex_t *preg, const char *string, size_t len, - size_t nmatch, regmatch_t pmatch[], int eflags); +tre_regnexec(const regex_t *, const char *, size_t, + size_t, regmatch_t [], int); #ifdef TRE_WCHAR extern int -tre_regwncomp(regex_t *preg, const wchar_t *regex, size_t len, int cflags); +tre_regwncomp(regex_t *, const wchar_t *, size_t, int); extern int -tre_regwnexec(const regex_t *preg, const wchar_t *string, size_t len, - size_t nmatch, regmatch_t pmatch[], int eflags); +tre_regwnexec(const regex_t *, const wchar_t *, size_t, + size_t, regmatch_t [
CVS commit: src/external/bsd/tre/dist/lib
Module Name:src Committed By: agc Date: Thu Apr 22 17:28:59 UTC 2010 Modified Files: src/external/bsd/tre/dist/lib: tre-mem.c Log Message: clean up some lint To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 src/external/bsd/tre/dist/lib/tre-mem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/tre/dist/lib/tre-mem.c diff -u src/external/bsd/tre/dist/lib/tre-mem.c:1.1.1.1 src/external/bsd/tre/dist/lib/tre-mem.c:1.2 --- src/external/bsd/tre/dist/lib/tre-mem.c:1.1.1.1 Thu Feb 25 07:33:19 2010 +++ src/external/bsd/tre/dist/lib/tre-mem.c Thu Apr 22 17:28:59 2010 @@ -106,7 +106,7 @@ } else { - int block_size; + unsigned block_size; if (size * 8 > TRE_MEM_BLOCK_SIZE) block_size = size * 8; else
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Thu Apr 22 15:25:46 UTC 2010 Modified Files: src/sys/dev/acpi: acpi_pci.c Log Message: Wrap long lines, add some white space for readability, remove unnecessary variable assignments, misc KNF. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/dev/acpi/acpi_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/acpi_pci.c diff -u src/sys/dev/acpi/acpi_pci.c:1.7 src/sys/dev/acpi/acpi_pci.c:1.8 --- src/sys/dev/acpi/acpi_pci.c:1.7 Thu Apr 22 15:14:24 2010 +++ src/sys/dev/acpi/acpi_pci.c Thu Apr 22 15:25:46 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_pci.c,v 1.7 2010/04/22 15:14:24 jruoho Exp $ */ +/* $NetBSD: acpi_pci.c,v 1.8 2010/04/22 15:25:46 jruoho Exp $ */ /* * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_pci.c,v 1.7 2010/04/22 15:14:24 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_pci.c,v 1.8 2010/04/22 15:25:46 jruoho Exp $"); #include #include @@ -123,31 +123,34 @@ return AE_NOT_EXIST; *busp = (uint16_t)bus; + return rv; } static ACPI_STATUS acpi_pcidev_pciroot_bus_callback(ACPI_RESOURCE *res, void *context) { - int32_t *bus = context; ACPI_RESOURCE_ADDRESS64 addr64; + int32_t *bus = context; + /* Always continue the walk by returning AE_OK. */ if ((res->Type != ACPI_RESOURCE_TYPE_ADDRESS16) && (res->Type != ACPI_RESOURCE_TYPE_ADDRESS32) && (res->Type != ACPI_RESOURCE_TYPE_ADDRESS64)) - return AE_OK; /* continue the walk */ + return AE_OK; if (ACPI_FAILURE(AcpiResourceToAddress64(res, &addr64))) - return AE_OK; /* continue the walk */ + return AE_OK; if (addr64.ResourceType != ACPI_BUS_NUMBER_RANGE) - return AE_OK; /* continue the walk */ + return AE_OK; if (*bus != -1) return AE_ALREADY_EXISTS; *bus = addr64.Minimum; - return AE_OK; /* continue the walk */ + + return AE_OK; } /* @@ -173,24 +176,25 @@ } if (ad->ad_devinfo->Flags & ACPI_PCI_ROOT_BRIDGE) { + ap = kmem_zalloc(sizeof(*ap), KM_SLEEP); + if (ap == NULL) return AE_NO_MEMORY; - rv = acpi_eval_integer(ad->ad_handle, METHOD_NAME__SEG, &val); + rv = acpi_eval_integer(ad->ad_handle, "_SEG", &val); + if (ACPI_SUCCESS(rv)) ap->ap_segment = ACPI_LOWORD(val); - else - ap->ap_segment = 0; - /* try to get bus number using _CRS first */ + /* Try to get bus number using _CRS first. */ rv = acpi_pcidev_pciroot_bus(ad->ad_handle, &ap->ap_bus); + if (ACPI_FAILURE(rv)) { - rv = acpi_eval_integer(ad->ad_handle, METHOD_NAME__BBN, &val); + rv = acpi_eval_integer(ad->ad_handle, "_BBN", &val); + if (ACPI_SUCCESS(rv)) ap->ap_bus = ACPI_LOWORD(val); - else -ap->ap_bus = 0; } ap->ap_device = ACPI_HILODWORD(ad->ad_devinfo->Address); @@ -200,6 +204,7 @@ ap->ap_downbus = ap->ap_bus; ad->ad_pciinfo = ap; + goto rec; } @@ -212,6 +217,7 @@ * bus number. */ ap = kmem_zalloc(sizeof(*ap), KM_SLEEP); + if (ap == NULL) return AE_NO_MEMORY; @@ -227,17 +233,16 @@ */ rv = acpi_pcidev_ppb_downbus(ap->ap_segment, ap->ap_bus, ap->ap_device, ap->ap_function, &ap->ap_downbus); - if (ACPI_SUCCESS(rv)) - ap->ap_bridge = true; - else - ap->ap_bridge = false; + ap->ap_bridge = (rv != AE_OK) ? false : true; ad->ad_pciinfo = ap; + goto rec; } - rec: +rec: SIMPLEQ_FOREACH(child, &ad->ad_child_head, ad_child_list) { rv = acpi_pcidev_scan_rec(child); + if (ACPI_FAILURE(rv)) return rv; } @@ -275,18 +280,21 @@ /* Check that this device exists. */ val = pci_conf_read(pc, tag, PCI_ID_REG); + if (PCI_VENDOR(val) == PCI_VENDOR_INVALID || PCI_VENDOR(val) == 0) return AE_NOT_EXIST; /* Check that this device is a PCI-to-PCI bridge. */ val = pci_conf_read(pc, tag, PCI_BHLC_REG); + if (PCI_HDRTYPE_TYPE(val) != PCI_HDRTYPE_PPB) return AE_TYPE; /* This is a PCI-to-PCI bridge. Get its secondary bus#. */ val = pci_conf_read(pc, tag, PPB_REG_BUSINFO); *downbus = PPB_BUSINFO_SECONDARY(val); + return AE_OK; } @@ -313,10 +321,13 @@ acpi_pcidev_scan_rec(sc->sc_root); aprint_debug_dev(sc->sc_dev, "pci devices:"); + SIMPLEQ_FOREACH(ad, &sc->ad_head, ad_list) { + if (ad->ad_pciinfo != NULL) acpi_pcidev_print(ad); } + aprint_debug("\n"); } @@ -339,6 +350,7 @@ return AE_NOT_FOUND; SIMPLEQ_FOREACH(ad, &sc->ad_head, ad_list) { + if ((ad->ad_pciinfo != NULL) && (ad->ad_pciinfo->ap_segment == segment) && (ad->ad_pciinfo->ap_bus == bus) && @@ -348,5 +360,6 @@ return AE_OK; } } + return AE_NOT_FOUND; }
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Thu Apr 22 15:14:24 UTC 2010 Modified Files: src/sys/dev/acpi: acpi_pci.c Log Message: Shorten the long lines with two custom macros. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/dev/acpi/acpi_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/acpi_pci.c diff -u src/sys/dev/acpi/acpi_pci.c:1.6 src/sys/dev/acpi/acpi_pci.c:1.7 --- src/sys/dev/acpi/acpi_pci.c:1.6 Thu Apr 22 14:50:31 2010 +++ src/sys/dev/acpi/acpi_pci.c Thu Apr 22 15:14:24 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_pci.c,v 1.6 2010/04/22 14:50:31 jruoho Exp $ */ +/* $NetBSD: acpi_pci.c,v 1.7 2010/04/22 15:14:24 jruoho Exp $ */ /* * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_pci.c,v 1.6 2010/04/22 14:50:31 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_pci.c,v 1.7 2010/04/22 15:14:24 jruoho Exp $"); #include #include @@ -48,13 +48,16 @@ #include #include -#define _COMPONENT ACPI_BUS_COMPONENT -ACPI_MODULE_NAME ("acpi_pci") +#define _COMPONENT ACPI_BUS_COMPONENT +ACPI_MODULE_NAME ("acpi_pci") -static ACPI_STATUS acpi_pcidev_pciroot_bus(ACPI_HANDLE, uint16_t *); -static ACPI_STATUS acpi_pcidev_pciroot_bus_callback(ACPI_RESOURCE *, - void *); -static ACPI_STATUS acpi_pcidev_scan_rec(struct acpi_devnode *); +#define ACPI_HILODWORD(x) ACPI_HIWORD(ACPI_LODWORD((x))) +#define ACPI_LOLODWORD(x) ACPI_LOWORD(ACPI_LODWORD((x))) + +static ACPI_STATUS acpi_pcidev_pciroot_bus(ACPI_HANDLE, uint16_t *); +static ACPI_STATUS acpi_pcidev_pciroot_bus_callback(ACPI_RESOURCE *, + void *); +static ACPI_STATUS acpi_pcidev_scan_rec(struct acpi_devnode *); /* @@ -190,8 +193,8 @@ ap->ap_bus = 0; } - ap->ap_device = ACPI_HIWORD(ACPI_LODWORD(ad->ad_devinfo->Address)); - ap->ap_function = ACPI_LOWORD(ACPI_LODWORD(ad->ad_devinfo->Address)); + ap->ap_device = ACPI_HILODWORD(ad->ad_devinfo->Address); + ap->ap_function = ACPI_LOLODWORD(ad->ad_devinfo->Address); ap->ap_bridge = true; ap->ap_downbus = ap->ap_bus; @@ -214,8 +217,9 @@ ap->ap_segment = ad->ad_parent->ad_pciinfo->ap_segment; ap->ap_bus = ad->ad_parent->ad_pciinfo->ap_downbus; - ap->ap_device = ACPI_HIWORD(ACPI_LODWORD(ad->ad_devinfo->Address)); - ap->ap_function = ACPI_LOWORD(ACPI_LODWORD(ad->ad_devinfo->Address)); + + ap->ap_device = ACPI_HILODWORD(ad->ad_devinfo->Address); + ap->ap_function = ACPI_LOLODWORD(ad->ad_devinfo->Address); /* * Check whether this device is a PCI-to-PCI bridge and get its
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Thu Apr 22 14:50:31 UTC 2010 Modified Files: src/sys/dev/acpi: acpi.c acpi_pci.c acpi_pci.h acpivar.h Log Message: >From Gregoire Sutre: rework the ACPI PCI support. This makes ACPI to correctly pick PCI segment groups, PCI bus numbers, PCI root bridges, PCI-to-PCI bridges, and PCI devices, among other things. In short: it is more robust than the old code or anything in sys/arch/x86/x86/mpacpi.c. ok cegger@, jmcneill@ To generate a diff of this commit: cvs rdiff -u -r1.179 -r1.180 src/sys/dev/acpi/acpi.c cvs rdiff -u -r1.5 -r1.6 src/sys/dev/acpi/acpi_pci.c cvs rdiff -u -r1.3 -r1.4 src/sys/dev/acpi/acpi_pci.h cvs rdiff -u -r1.49 -r1.50 src/sys/dev/acpi/acpivar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/acpi/acpi.c diff -u src/sys/dev/acpi/acpi.c:1.179 src/sys/dev/acpi/acpi.c:1.180 --- src/sys/dev/acpi/acpi.c:1.179 Tue Apr 20 04:57:04 2010 +++ src/sys/dev/acpi/acpi.c Thu Apr 22 14:50:30 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi.c,v 1.179 2010/04/20 04:57:04 jruoho Exp $ */ +/* $NetBSD: acpi.c,v 1.180 2010/04/22 14:50:30 jruoho Exp $ */ /*- * Copyright (c) 2003, 2007 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.179 2010/04/20 04:57:04 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi.c,v 1.180 2010/04/22 14:50:30 jruoho Exp $"); #include "opt_acpi.h" #include "opt_pcifixup.h" @@ -662,6 +662,7 @@ ad->ad_device = NULL; ad->ad_notify = NULL; + ad->ad_pciinfo = NULL; ad->ad_type = type; ad->ad_handle = handle; Index: src/sys/dev/acpi/acpi_pci.c diff -u src/sys/dev/acpi/acpi_pci.c:1.5 src/sys/dev/acpi/acpi_pci.c:1.6 --- src/sys/dev/acpi/acpi_pci.c:1.5 Sun Apr 18 14:05:26 2010 +++ src/sys/dev/acpi/acpi_pci.c Thu Apr 22 14:50:31 2010 @@ -1,11 +1,11 @@ -/* $NetBSD: acpi_pci.c,v 1.5 2010/04/18 14:05:26 jruoho Exp $ */ +/* $NetBSD: acpi_pci.c,v 1.6 2010/04/22 14:50:31 jruoho Exp $ */ /* - * Copyright (c) 2009 The NetBSD Foundation, Inc. + * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation - * by Christoph Egger. + * by Christoph Egger and Gregoire Sutre. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -33,147 +33,287 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_pci.c,v 1.5 2010/04/18 14:05:26 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_pci.c,v 1.6 2010/04/22 14:50:31 jruoho Exp $"); #include #include #include -#include #include +#include +#include +#include + #include #include #include -struct acpi_pcidev; +#define _COMPONENT ACPI_BUS_COMPONENT +ACPI_MODULE_NAME ("acpi_pci") + +static ACPI_STATUS acpi_pcidev_pciroot_bus(ACPI_HANDLE, uint16_t *); +static ACPI_STATUS acpi_pcidev_pciroot_bus_callback(ACPI_RESOURCE *, + void *); +static ACPI_STATUS acpi_pcidev_scan_rec(struct acpi_devnode *); -static TAILQ_HEAD(, acpi_pcidev) acpi_pcidevlist = -TAILQ_HEAD_INITIALIZER(acpi_pcidevlist); -struct acpi_pcidev { - struct acpi_devnode *ap_node; - uint32_t ap_pciseg; - uint32_t ap_pcibus; - uint32_t ap_pcidev; - uint32_t ap_pcifunc; - bool ap_pcihost; - TAILQ_ENTRY(acpi_pcidev) ap_list; -}; - - -static const char * const acpi_pcidev_ids[] = { - "PNP0A??", /* ACPI PCI host controllers */ - NULL -}; +/* + * Regarding PCI Segment Groups, the ACPI spec says (cf. ACPI 4.0, p. 277): + * + * "The optional _SEG object is located under a PCI host bridge and + * evaluates to an integer that describes the PCI Segment Group (see PCI + * Firmware Specification v3.0)." + * + * "PCI Segment Group supports more than 256 buses in a system by allowing + * the reuse of the PCI bus numbers. Within each PCI Segment Group, the bus + * numbers for the PCI buses must be unique. PCI buses in different PCI + * Segment Group are permitted to have the same bus number." + * + * "If _SEG does not exist, OSPM assumes that all PCI bus segments are in + * PCI Segment Group 0." + * + * "The lower 16 bits of _SEG returned integer is the PCI Segment Group + * number. Other bits are reserved." + */ -static bool -acpi_pcidev_add(struct acpi_softc *sc, struct acpi_devnode *ad) +/* + * Regarding PCI Base Bus Numbers, the ACPI spec says (cf. ACPI 4.0, p. 277): + * + * "For multi-root PCI platforms, the _BBN object evaluates to the PCI bus + * number that the BIOS assigns. This is needed to access a PCI_Config + * operation region for the specified bus. The _BBN object is located under + * a PCI host bridge and must be unique for every host bridge within a + * segment since it is the PCI bus number." + * + * Moreover, the ACPI FAQ (http://www.acpi.info/acpi_faq.htm) says: + * + * "For a multiple root bus machine, _BBN is required for each bus. _
CVS commit: src/usr.bin/netstat
Module Name:src Committed By: plunky Date: Thu Apr 22 14:37:06 UTC 2010 Modified Files: src/usr.bin/netstat: unix.c Log Message: no need to forward declare struct uio and proc before including as it does that internally, and don't continue the _KERNEL definition afterwards as it causes some other problems with pcc relating to unreferenced symbols in unused static inline functions which gcc optimises away. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/usr.bin/netstat/unix.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/netstat/unix.c diff -u src/usr.bin/netstat/unix.c:1.29 src/usr.bin/netstat/unix.c:1.30 --- src/usr.bin/netstat/unix.c:1.29 Sun Apr 12 16:08:37 2009 +++ src/usr.bin/netstat/unix.c Thu Apr 22 14:37:06 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: unix.c,v 1.29 2009/04/12 16:08:37 lukem Exp $ */ +/* $NetBSD: unix.c,v 1.30 2010/04/22 14:37:06 plunky Exp $ */ /*- * Copyright (c) 1983, 1988, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "from: @(#)unix.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: unix.c,v 1.29 2009/04/12 16:08:37 lukem Exp $"); +__RCSID("$NetBSD: unix.c,v 1.30 2010/04/22 14:37:06 plunky Exp $"); #endif #endif /* not lint */ @@ -53,9 +53,8 @@ #include #include #define _KERNEL -struct uio; -struct proc; #include +#undef _KERNEL #include
CVS commit: src/usr.bin/netstat
Module Name:src Committed By: plunky Date: Thu Apr 22 14:32:30 UTC 2010 Modified Files: src/usr.bin/netstat: route.c Log Message: it is not [any longer] necessary to #define _KERNEL while including so remove it. This fixes a build problem with pcc which is not as clever as gcc when optimising away unused static inline functions which refer to unknown symbols (eg sockaddr_dup). To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/usr.bin/netstat/route.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/netstat/route.c diff -u src/usr.bin/netstat/route.c:1.73 src/usr.bin/netstat/route.c:1.74 --- src/usr.bin/netstat/route.c:1.73 Sun Apr 12 16:08:37 2009 +++ src/usr.bin/netstat/route.c Thu Apr 22 14:32:30 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: route.c,v 1.73 2009/04/12 16:08:37 lukem Exp $ */ +/* $NetBSD: route.c,v 1.74 2010/04/22 14:32:30 plunky Exp $ */ /* * Copyright (c) 1983, 1988, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "from: @(#)route.c 8.3 (Berkeley) 3/9/94"; #else -__RCSID("$NetBSD: route.c,v 1.73 2009/04/12 16:08:37 lukem Exp $"); +__RCSID("$NetBSD: route.c,v 1.74 2010/04/22 14:32:30 plunky Exp $"); #endif #endif /* not lint */ @@ -48,9 +48,7 @@ #include #include #include -#define _KERNEL #include -#undef _KERNEL #include #include #include
CVS commit: src/games/factor
Module Name:src Committed By: drochner Date: Thu Apr 22 14:28:48 UTC 2010 Modified Files: src/games/factor: factor.c Log Message: fix an obvious flaw in bounds check: the array of precomputed primes could be overrun if its last entry (65537) was a factor of the input (this does not affect PR misc/43192 -- the factors are much larger here: 7742394596501*159455563099482401) To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/games/factor/factor.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/factor/factor.c diff -u src/games/factor/factor.c:1.19 src/games/factor/factor.c:1.20 --- src/games/factor/factor.c:1.19 Wed Aug 12 05:54:31 2009 +++ src/games/factor/factor.c Thu Apr 22 14:28:48 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: factor.c,v 1.19 2009/08/12 05:54:31 dholland Exp $ */ +/* $NetBSD: factor.c,v 1.20 2010/04/22 14:28:48 drochner Exp $ */ /* * Copyright (c) 1989, 1993 @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)factor.c 8.4 (Berkeley) 5/4/95"; #else -__RCSID("$NetBSD: factor.c,v 1.19 2009/08/12 05:54:31 dholland Exp $"); +__RCSID("$NetBSD: factor.c,v 1.20 2010/04/22 14:28:48 drochner Exp $"); #endif #endif /* not lint */ @@ -214,10 +214,11 @@ putchar(':'); for (fact = &prime[0]; !BN_is_one(val); ++fact) { /* Look for the smallest factor. */ - do { + while (fact <= pr_limit) { if (BN_mod_word(val, (BN_ULONG)*fact) == 0) break; - } while (++fact <= pr_limit); + fact++; + } /* Watch for primes larger than the table. */ if (fact > pr_limit) {
CVS commit: src/lib/libc/ssp
Module Name:src Committed By: jruoho Date: Thu Apr 22 13:41:40 UTC 2010 Modified Files: src/lib/libc/ssp: __builtin_object_size.3 Log Message: gcc -> GCC, offset indent. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/lib/libc/ssp/__builtin_object_size.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/ssp/__builtin_object_size.3 diff -u src/lib/libc/ssp/__builtin_object_size.3:1.4 src/lib/libc/ssp/__builtin_object_size.3:1.5 --- src/lib/libc/ssp/__builtin_object_size.3:1.4 Fri Jun 6 05:51:46 2008 +++ src/lib/libc/ssp/__builtin_object_size.3 Thu Apr 22 13:41:40 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: __builtin_object_size.3,v 1.4 2008/06/06 05:51:46 yamt Exp $ +.\" $NetBSD: __builtin_object_size.3,v 1.5 2010/04/22 13:41:40 jruoho Exp $ .\" .\" Copyright (c) 2007 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -28,7 +28,7 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .\" -.Dd May 23, 2007 +.Dd April 22, 2010 .Dt __BUILTIN_OBJECT_SIZE 3 .Os .Sh NAME @@ -50,7 +50,7 @@ If the size of the object is not known or it has side effects the .Fn __builtin_object_size function returns: -.Bl -tag -width (size_t)-1 +.Bl -tag -width (size_t)-1 -offset indent .It Dv (size_t)-1 for .Fa type @@ -82,4 +82,5 @@ .Sh HISTORY The .Fn __builtin_object_size -appeared in gcc 4.1. +appeared in +.Tn GCC 4.1 .
CVS commit: src/distrib
Module Name:src Committed By: he Date: Thu Apr 22 11:58:59 UTC 2010 Modified Files: src/distrib/i386/cdroms: Makefile.cdrom src/distrib/sparc64/cdroms/installcd: Makefile Log Message: Change use of ${CP} and ${CHMOD} to ${INSTALL_FILE}, so that if the target is made un-writeable, the build won't bomb out during an UPDATE build. OK'ed by mar...@. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/distrib/i386/cdroms/Makefile.cdrom cvs rdiff -u -r1.5 -r1.6 src/distrib/sparc64/cdroms/installcd/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/i386/cdroms/Makefile.cdrom diff -u src/distrib/i386/cdroms/Makefile.cdrom:1.18 src/distrib/i386/cdroms/Makefile.cdrom:1.19 --- src/distrib/i386/cdroms/Makefile.cdrom:1.18 Mon Apr 19 04:41:36 2010 +++ src/distrib/i386/cdroms/Makefile.cdrom Thu Apr 22 11:58:59 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.cdrom,v 1.18 2010/04/19 04:41:36 martin Exp $ +# $NetBSD: Makefile.cdrom,v 1.19 2010/04/22 11:58:59 he Exp $ .include @@ -58,10 +58,9 @@ ${CP} ${.CURDIR}/../../../common/99-print-sysinst cdrom/libexec/dhcpcd-hooks ${MKDIR} cdrom/etc ${HOST_LN} -fs /tmp/gettytab cdrom/etc/gettytab - ${CP} ${.CURDIR}/../etc.ttys cdrom/etc/ttys - ${CP} ${.CURDIR}/../etc.rc cdrom/etc/rc - ${CP} ${.CURDIR}/../install.sh cdrom/install.sh - ${CHMOD} 0555 cdrom/install.sh + ${INSTALL_FILE} ${.CURDIR}/../etc.ttys cdrom/etc/ttys + ${INSTALL_FILE} ${.CURDIR}/../etc.rc cdrom/etc/rc + ${INSTALL_FILE} -m 0555 ${.CURDIR}/../install.sh cdrom/install.sh ${MKDIR} cdrom/mnt2 cdrom/targetroot ${CP} ${SYSINSTDIR}/sysinst cdrom ${CHMOD} ugo+rx cdrom/sysinst Index: src/distrib/sparc64/cdroms/installcd/Makefile diff -u src/distrib/sparc64/cdroms/installcd/Makefile:1.5 src/distrib/sparc64/cdroms/installcd/Makefile:1.6 --- src/distrib/sparc64/cdroms/installcd/Makefile:1.5 Sun Apr 18 16:10:03 2010 +++ src/distrib/sparc64/cdroms/installcd/Makefile Thu Apr 22 11:58:59 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2010/04/18 16:10:03 martin Exp $ +# $NetBSD: Makefile,v 1.6 2010/04/22 11:58:59 he Exp $ CDBASE= sparc64cd # gives ${CDBASE}.iso CDRELEASE= true # include $RELEASEDIR/$MACHINE @@ -60,14 +60,14 @@ ${CP} ${.CURDIR}/../../../common/99-print-sysinst cdrom/libexec/dhcpcd-hooks ${MKDIR} cdrom/etc ${HOST_LN} -fs /tmp/gettytab cdrom/etc/gettytab - ${CP} ${.CURDIR}/etc.ttys cdrom/etc/ttys - ${CP} ${.CURDIR}/etc.rc cdrom/etc/rc - ${CP} ${.CURDIR}/install.sh cdrom/install.sh - ${CHMOD} 0555 cdrom/install.sh + ${INSTALL_FILE} ${.CURDIR}/etc.ttys cdrom/etc/ttys + ${INSTALL_FILE} ${.CURDIR}/etc.rc cdrom/etc/rc + ${INSTALL_FILE} -m 0555 ${.CURDIR}/install.sh cdrom/install.sh ${MKDIR} cdrom/mnt2 cdrom/targetroot - ${CP} ${SYSINSTDIR}/sysinst cdrom - ${CHMOD} ugo+rx cdrom/sysinst - ${CP} ${SYSINSTDIR}/sysinstmsgs.?? cdrom + ${INSTALL_FILE} -m 0555 ${SYSINSTDIR}/sysinst cdrom + for f in ${SYSINSTDIR}/sysinstmsgs.??; do \ + ${INSTALL_FILE} $$f cdrom; \ + done ${MKDIR} cdrom/var ${MKDIR} cdrom/kern ${CP} ${RELEASEDIR}/sparc64/binary/kernel/netbsd-GENERIC.gz cdrom/netbsd
CVS commit: src/sys/dev/usb
Module Name:src Committed By: pooka Date: Thu Apr 22 08:45:56 UTC 2010 Modified Files: src/sys/dev/usb: pseye.c uvideo.c Log Message: fix compilation with -Wmissing-field-initializers. smoke _KERNEL_OPT where appropriate. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/dev/usb/pseye.c cvs rdiff -u -r1.30 -r1.31 src/sys/dev/usb/uvideo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/pseye.c diff -u src/sys/dev/usb/pseye.c:1.15 src/sys/dev/usb/pseye.c:1.16 --- src/sys/dev/usb/pseye.c:1.15 Sun Dec 6 21:40:31 2009 +++ src/sys/dev/usb/pseye.c Thu Apr 22 08:45:55 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pseye.c,v 1.15 2009/12/06 21:40:31 dyoung Exp $ */ +/* $NetBSD: pseye.c,v 1.16 2010/04/22 08:45:55 pooka Exp $ */ /*- * Copyright (c) 2008 Jared D. McNeill @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pseye.c,v 1.15 2009/12/06 21:40:31 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pseye.c,v 1.16 2010/04/22 08:45:55 pooka Exp $"); #include #include @@ -848,7 +848,7 @@ .cf_flags = 0, .cf_pspec = &uhubparent, }, - { NULL } + { NULL, NULL, 0, 0, NULL, 0, NULL } }; static int Index: src/sys/dev/usb/uvideo.c diff -u src/sys/dev/usb/uvideo.c:1.30 src/sys/dev/usb/uvideo.c:1.31 --- src/sys/dev/usb/uvideo.c:1.30 Thu Nov 12 20:01:15 2009 +++ src/sys/dev/usb/uvideo.c Thu Apr 22 08:45:55 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: uvideo.c,v 1.30 2009/11/12 20:01:15 dyoung Exp $ */ +/* $NetBSD: uvideo.c,v 1.31 2010/04/22 08:45:55 pooka Exp $ */ /* * Copyright (c) 2008 Patrick Mahoney @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvideo.c,v 1.30 2009/11/12 20:01:15 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvideo.c,v 1.31 2010/04/22 08:45:55 pooka Exp $"); #ifdef _MODULE #include @@ -75,7 +75,7 @@ #include -#if !defined(_MODULE) +#if defined(_KERNEL_OPT) #include "opt_uvideo.h" #endif @@ -2342,7 +2342,7 @@ .cf_flags = 0, .cf_pspec = &uhubparent, }, - { NULL } + { NULL, NULL, 0, 0, NULL, 0, NULL }, }; static int
CVS commit: src/share/man/man3
Module Name:src Committed By: jruoho Date: Thu Apr 22 08:42:34 UTC 2010 Modified Files: src/share/man/man3: types.3 Log Message: A small correction. Typos. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/share/man/man3/types.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man3/types.3 diff -u src/share/man/man3/types.3:1.3 src/share/man/man3/types.3:1.4 --- src/share/man/man3/types.3:1.3 Thu Apr 22 06:55:07 2010 +++ src/share/man/man3/types.3 Thu Apr 22 08:42:34 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: types.3,v 1.3 2010/04/22 06:55:07 wiz Exp $ +.\" $NetBSD: types.3,v 1.4 2010/04/22 08:42:34 jruoho Exp $ .\" .\" Copyright (c) 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -77,10 +77,10 @@ .In sys/types.h and provides additional types as well as other facilities. .Ss Standard Types -The following standards-compliant data types are defined: +The following standards-compliant system data types are defined: .Pp .Bl -column -offset indent \ -"suseconds_t " "file system block counts " "clock_settime(3) " +"suseconds_t " "process and process group IDs " "clock_settime(3) " .It Sy Type Ta Sy Typical use Ta Sy Example .It Va blkcnt_t Ta file block counts Ta Xr stat 2 .It Va blksize_t Ta block sizes Ta Xr stat 2 @@ -96,9 +96,9 @@ .It Va mode_t Ta file attributes Ta Xr stat 2 .It Va nlink_t Ta link counts Ta Xr stat 2 .It Va off_t Ta file sizes Ta Xr fseek 3 -.It Va pid_t Ta process and group IDs Ta Xr getpid 2 +.It Va pid_t Ta process and process group IDs Ta Xr getpid 2 .It Va size_t Ta size of objects Ta Xr stddef 3 -.It Va ssize_t Ta a count of bytes Ta Xr write 2 +.It Va ssize_t Ta count of bytes Ta Xr write 2 .It Va suseconds_t Ta microseconds Ta Xr gettimeofday 2 .It Va time_t Ta time in seconds Ta Xr time 3 .It Va timer_t Ta timer IDs Ta Xr timer_create 2 @@ -173,7 +173,7 @@ .Em size_t . .El .Ss NetBSD-specific Types -In addition to the standard types, the +In addition to the standard types, .In sys/types.h defines some data types specific to .Nx . @@ -182,9 +182,9 @@ on these types to be available in other systems. Examples include: .Bl -column -offset indent \ -"suseconds_t " "file system block counts " "clock_settime(3) " +"suseconds_t " "synonym for uint64_t " "getdevmajor(3) " .It Sy Type Ta Sy Typical use Ta Sy Example -.It Va cpuid_t Ta CPU ID Ta Xr cpuset 3 +.It Va cpuid_t Ta CPU IDs Ta Xr cpuset 3 .It Va daddr_t Ta disk address Ta Xr buffercache 9 .It Va devmajor_t Ta major device number Ta Xr getdevmajor 3 .It Va lwp_t Ta typedef of Va struct lwp Ta Xr kthread 9
CVS commit: src/lib/libc
Module Name:src Committed By: jruoho Date: Thu Apr 22 08:00:34 UTC 2010 Modified Files: src/lib/libc/gen: confstr.3 src/lib/libc/sys: pathconf.2 Log Message: Use .In for includes. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/lib/libc/gen/confstr.3 cvs rdiff -u -r1.22 -r1.23 src/lib/libc/sys/pathconf.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/confstr.3 diff -u src/lib/libc/gen/confstr.3:1.19 src/lib/libc/gen/confstr.3:1.20 --- src/lib/libc/gen/confstr.3:1.19 Tue Mar 10 23:14:40 2009 +++ src/lib/libc/gen/confstr.3 Thu Apr 22 08:00:34 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: confstr.3,v 1.19 2009/03/10 23:14:40 joerg Exp $ +.\" $NetBSD: confstr.3,v 1.20 2010/04/22 08:00:34 jruoho Exp $ .\" .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)confstr.3 8.1 (Berkeley) 6/4/93 .\" -.Dd December 2, 2006 +.Dd April 22, 2010 .Dt CONFSTR 3 .Os .Sh NAME @@ -55,8 +55,9 @@ The .Fa name argument specifies the system variable to be queried. -Symbolic constants for each name value are found in the include file -.Li \*[Lt]unistd.h\*[Gt] . +Symbolic constants for each name value are found in the +.In unistd.h +header. The .Fa len argument specifies the size of the buffer referenced by the Index: src/lib/libc/sys/pathconf.2 diff -u src/lib/libc/sys/pathconf.2:1.22 src/lib/libc/sys/pathconf.2:1.23 --- src/lib/libc/sys/pathconf.2:1.22 Wed Mar 11 13:39:14 2009 +++ src/lib/libc/sys/pathconf.2 Thu Apr 22 08:00:34 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: pathconf.2,v 1.22 2009/03/11 13:39:14 joerg Exp $ +.\" $NetBSD: pathconf.2,v 1.23 2010/04/22 08:00:34 jruoho Exp $ .\" .\" Copyright (c) 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)pathconf.2 8.1 (Berkeley) 6/4/93 .\" -.Dd August 14, 2008 +.Dd April 22, 2010 .Dt PATHCONF 2 .Os .Sh NAME @@ -66,8 +66,9 @@ The .Fa name argument specifies the system variable to be queried. -Symbolic constants for each name value are found in the include file -.Li \*[Lt]unistd.h\*[Gt] . +Symbolic constants for each name value are found in the +.In unistd.h +header. .Pp The available values are as follows: .Pp
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Thu Apr 22 07:10:47 UTC 2010 Modified Files: src/sys/rump/librump/rumpkern: rump.c signals.c Log Message: more signal stuff to group. no functional change. To generate a diff of this commit: cvs rdiff -u -r1.162 -r1.163 src/sys/rump/librump/rumpkern/rump.c cvs rdiff -u -r1.1 -r1.2 src/sys/rump/librump/rumpkern/signals.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/rump.c diff -u src/sys/rump/librump/rumpkern/rump.c:1.162 src/sys/rump/librump/rumpkern/rump.c:1.163 --- src/sys/rump/librump/rumpkern/rump.c:1.162 Wed Apr 21 16:16:31 2010 +++ src/sys/rump/librump/rumpkern/rump.c Thu Apr 22 07:10:47 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rump.c,v 1.162 2010/04/21 16:16:31 pooka Exp $ */ +/* $NetBSD: rump.c,v 1.163 2010/04/22 07:10:47 pooka Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.162 2010/04/21 16:16:31 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.163 2010/04/22 07:10:47 pooka Exp $"); #include #include @@ -103,8 +103,6 @@ struct rumpuser_mtx *rump_giantlock; -sigset_t sigcantmask; - struct device rump_rootdev = { .dv_class = DV_VIRTUAL }; Index: src/sys/rump/librump/rumpkern/signals.c diff -u src/sys/rump/librump/rumpkern/signals.c:1.1 src/sys/rump/librump/rumpkern/signals.c:1.2 --- src/sys/rump/librump/rumpkern/signals.c:1.1 Wed Apr 21 11:38:05 2010 +++ src/sys/rump/librump/rumpkern/signals.c Thu Apr 22 07:10:47 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: signals.c,v 1.1 2010/04/21 11:38:05 pooka Exp $ */ +/* $NetBSD: signals.c,v 1.2 2010/04/22 07:10:47 pooka Exp $ */ /* * Copyright (c) 2010 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: signals.c,v 1.1 2010/04/21 11:38:05 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: signals.c,v 1.2 2010/04/22 07:10:47 pooka Exp $"); #include #include @@ -40,6 +40,7 @@ #include "rumpkern_if_priv.h" const struct filterops sig_filtops; +sigset_t sigcantmask; /* RUMP_SIGMODEL_PANIC */