CVS commit: src/tests/net/carp
Module Name:src Committed By: ozaki-r Date: Mon Feb 27 07:25:59 UTC 2017 Modified Files: src/tests/net/carp: t_basic.sh Log Message: Test handovers on interface down as well as server halt To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/net/carp/t_basic.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/net/carp/t_basic.sh diff -u src/tests/net/carp/t_basic.sh:1.2 src/tests/net/carp/t_basic.sh:1.3 --- src/tests/net/carp/t_basic.sh:1.2 Mon Feb 27 07:24:26 2017 +++ src/tests/net/carp/t_basic.sh Mon Feb 27 07:25:59 2017 @@ -1,4 +1,4 @@ -# $NetBSD: t_basic.sh,v 1.2 2017/02/27 07:24:26 ozaki-r Exp $ +# $NetBSD: t_basic.sh,v 1.3 2017/02/27 07:25:59 ozaki-r Exp $ # # Copyright (c) 2017 Internet Initiative Japan Inc. # All rights reserved. @@ -31,11 +31,19 @@ SOCK_BACKUP=unix://carp_backup BUS=bus_carp TIMEOUT=3 -atf_test_case carp_handover cleanup +atf_test_case carp_handover_halt cleanup carp_handover_head() { - atf_set "descr" "Tests for CARP handover" + atf_set "descr" "Tests for CARP handover on halt" + atf_set "require.progs" "rump_server" +} + +atf_test_case carp_handover_ifdown cleanup +carp_handover_head() +{ + + atf_set "descr" "Tests for CARP handover on ifconfig down" atf_set "require.progs" "rump_server" } @@ -95,8 +103,9 @@ wait_handover() fi } -carp_handover_body() +test_carp_handover() { + local op=$1 rump_server_start $SOCK_CLIENT rump_server_start $SOCK_MASTER @@ -138,7 +147,11 @@ carp_handover_body() rump.ping -n -w $TIMEOUT -c 1 $IP_CARP # KILLING SPREE - env RUMP_SERVER=$SOCK_MASTER rump.halt + if [ $op = halt ]; then + env RUMP_SERVER=$SOCK_MASTER rump.halt + elif [ $op = ifdown ]; then + env RUMP_SERVER=$SOCK_MASTER rump.ifconfig shmif0 down + fi sleep 1 # Check that primary is now dead @@ -153,20 +166,51 @@ carp_handover_body() $DEBUG && rump.ifconfig atf_check -s exit:0 -o match:'carp: MASTER carpdev shmif0' \ rump.ifconfig carp1 + + if [ $op = ifdown ]; then + rump_server_destroy_ifaces + fi +} + +carp_handover_halt_body() +{ + + test_carp_handover halt +} + +carp_handover_ifdown_body() +{ + + test_carp_handover ifdown +} + +carp_handover_halt_cleanup() +{ + + $DEBUG && dump + cleanup } -carp_handover_cleanup() +carp_handover_ifdown_cleanup() { $DEBUG && dump cleanup } -atf_test_case carp6_handover cleanup -carp6_handover_head() +atf_test_case carp6_handover_halt cleanup +carp6_handover_halt_head() { - atf_set "descr" "Tests for CARP handover (IPv6)" + atf_set "descr" "Tests for CARP handover on halt (IPv6)" + atf_set "require.progs" "rump_server" +} + +atf_test_case carp6_handover_ifdown cleanup +carp6_handover_ifdown_head() +{ + + atf_set "descr" "Tests for CARP handover on ifconfig down (IPv6)" atf_set "require.progs" "rump_server" } @@ -225,8 +269,9 @@ wait_carp6_handover() fi } -carp6_handover_body() +test_carp6_handover() { + local op=$1 atf_expect_fail 'The implementation of CARP on IPv6 is incomplete yet.' @@ -270,7 +315,11 @@ carp6_handover_body() rump.ping6 -n -X $TIMEOUT -c 1 $IP6_CARP # KILLING SPREE - env RUMP_SERVER=$SOCK_MASTER rump.halt + if [ $op = halt ]; then + env RUMP_SERVER=$SOCK_MASTER rump.halt + elif [ $op = ifdown ]; then + env RUMP_SERVER=$SOCK_MASTER rump.ifconfig shmif0 down + fi sleep 1 # Check that primary is now dead @@ -285,9 +334,32 @@ carp6_handover_body() $DEBUG && rump.ifconfig atf_check -s exit:0 -o match:'carp: MASTER carpdev shmif0' \ rump.ifconfig carp1 + + if [ $op = ifdown ]; then + rump_server_destroy_ifaces + fi +} + +carp6_handover_halt_body() +{ + + test_carp6_handover halt +} + +carp6_handover_ifdown_body() +{ + + test_carp6_handover ifdown +} + +carp6_handover_halt_cleanup() +{ + + $DEBUG && dump + cleanup } -carp6_handover_cleanup() +carp6_handover_ifdown_cleanup() { $DEBUG && dump @@ -297,6 +369,8 @@ carp6_handover_cleanup() atf_init_test_cases() { - atf_add_test_case carp_handover - atf_add_test_case carp6_handover + atf_add_test_case carp_handover_halt + atf_add_test_case carp_handover_ifdown + atf_add_test_case carp6_handover_halt + atf_add_test_case carp6_handover_ifdown }
CVS commit: src/tests/net/carp
Module Name:src Committed By: ozaki-r Date: Mon Feb 27 07:24:26 UTC 2017 Modified Files: src/tests/net/carp: t_basic.sh Log Message: Add a test case for CARP on IPv6 The test case fails expectedly because the implementation of CARP on IPv6 is incomplete yet. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/net/carp/t_basic.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/net/carp/t_basic.sh diff -u src/tests/net/carp/t_basic.sh:1.1 src/tests/net/carp/t_basic.sh:1.2 --- src/tests/net/carp/t_basic.sh:1.1 Mon Jan 16 08:18:11 2017 +++ src/tests/net/carp/t_basic.sh Mon Feb 27 07:24:26 2017 @@ -1,4 +1,4 @@ -# $NetBSD: t_basic.sh,v 1.1 2017/01/16 08:18:11 ozaki-r Exp $ +# $NetBSD: t_basic.sh,v 1.2 2017/02/27 07:24:26 ozaki-r Exp $ # # Copyright (c) 2017 Internet Initiative Japan Inc. # All rights reserved. @@ -29,14 +29,9 @@ SOCK_CLIENT=unix://carp_client SOCK_MASTER=unix://carp_master SOCK_BACKUP=unix://carp_backup BUS=bus_carp -IP_CLIENT=10.1.1.240 -IP_MASTER=10.1.1.1 -IP_BACKUP=10.1.1.2 -IP_CARP=10.1.1.100 TIMEOUT=3 atf_test_case carp_handover cleanup - carp_handover_head() { @@ -44,6 +39,11 @@ carp_handover_head() atf_set "require.progs" "rump_server" } +IP_CLIENT=10.1.1.240 +IP_MASTER=10.1.1.1 +IP_BACKUP=10.1.1.2 +IP_CARP=10.1.1.100 + setup_carp() { local sock=$1 @@ -61,6 +61,10 @@ setup_carp() fi export RUMP_SERVER=$sock + if $DEBUG; then + atf_check -s exit:0 -o match:'0.->.1' \ + rump.sysctl -w net.inet.carp.log=1 + fi atf_check -s exit:0 rump.ifconfig $carpif create atf_check -s exit:0 rump.ifconfig shmif0 $ip/24 up atf_check -s exit:0 rump.ifconfig $carpif \ @@ -158,8 +162,141 @@ carp_handover_cleanup() cleanup } +atf_test_case carp6_handover cleanup +carp6_handover_head() +{ + + atf_set "descr" "Tests for CARP handover (IPv6)" + atf_set "require.progs" "rump_server" +} + +IP6_CLIENT=fd00:1::240 +IP6_MASTER=fd00:1::1 +IP6_BACKUP=fd00:1::2 +IP6_CARP=fd00:1::100 + +setup_carp6() +{ + local sock=$1 + local master=$2 + local carpif= ip= advskew= + + if $master; then + carpif=carp0 + ip=$IP6_MASTER + advskew=0 + else + carpif=carp1 + ip=$IP6_BACKUP + advskew=200 + fi + + export RUMP_SERVER=$sock + if $DEBUG; then + atf_check -s exit:0 -o match:'0.->.1' \ + rump.sysctl -w net.inet.carp.log=1 + fi + atf_check -s exit:0 rump.ifconfig $carpif create + atf_check -s exit:0 rump.ifconfig shmif0 inet6 $ip up + atf_check -s exit:0 rump.ifconfig $carpif inet6 \ + vhid 175 advskew $advskew advbase 1 pass s3cret $IP6_CARP + atf_check -s exit:0 rump.ifconfig -w 10 +} + +wait_carp6_handover() +{ + local i=0 + + export RUMP_SERVER=$SOCK_CLIENT + + while [ $i -ne 5 ]; do + $DEBUG && echo "Trying ping6 $IP6_CARP" + rump.ping6 -n -X 1 -c 1 $IP6_CARP >/dev/null + if [ $? = 0 ]; then + $DEBUG && echo "Passed ping $IP6_CARP" + break; + fi + $DEBUG && echo "Failed ping6 $IP6_CARP" + i=$((i + 1)) + done + + if [ $i -eq 5 ]; then + atf_fail "Failed to failover (5 sec)" + fi +} + +carp6_handover_body() +{ + + atf_expect_fail 'The implementation of CARP on IPv6 is incomplete yet.' + + rump_server_start $SOCK_CLIENT netinet6 + rump_server_start $SOCK_MASTER netinet6 + rump_server_start $SOCK_BACKUP netinet6 + + rump_server_add_iface $SOCK_CLIENT shmif0 $BUS + rump_server_add_iface $SOCK_MASTER shmif0 $BUS + rump_server_add_iface $SOCK_BACKUP shmif0 $BUS + + setup_carp6 $SOCK_MASTER true + setup_carp6 $SOCK_BACKUP false + + export RUMP_SERVER=$SOCK_CLIENT + atf_check -s exit:0 rump.ifconfig shmif0 inet6 $IP6_CLIENT up + atf_check -s exit:0 rump.ifconfig -w 10 + + # Check that the primary addresses are up + atf_check -s exit:0 -o ignore \ + rump.ping6 -n -X $TIMEOUT -c 1 $IP6_MASTER + atf_check -s exit:0 -o ignore \ + rump.ping6 -n -X $TIMEOUT -c 1 $IP6_BACKUP + + # Give carp a while to croak + sleep 4 + + # Check state + export RUMP_SERVER=$SOCK_MASTER + $DEBUG && rump.ifconfig + atf_check -s exit:0 -o match:'carp: MASTER carpdev shmif0' \ + rump.ifconfig carp0 + export RUMP_SERVER=$SOCK_BACKUP + $DEBUG && rump.ifconfig + atf_check -s exit:0 -o match:'carp: BACKUP carpdev shmif0' \ + rump.ifconfig carp1 + export RUMP_SERVER=$SOCK_CLIENT + + # Check that the shared IP works + atf_check -s exit:0 -o ignore \ + rump.ping6 -n -X $TIMEOUT -c 1 $IP6_CARP + + # KILLING SPREE + env RUMP_SERVER=$SOCK_MASTER rump.halt + sleep 1 + + # Check that primary is now dead + atf_check -s not-exit:0 -o ignore \ + rump.ping6 -n -X $TIMEOUT -c 1 $IP6_MASTER + + # Do it in installments. carp will cluck meanwhile + wait_carp6_handover + + # Check state + export RUMP_SERVER=$SOCK_BACKUP + $DEBUG && rump.ifconfig + atf_check -s exit:0 -o match:'carp: MASTER carpdev shmif0' \ + rump.ifconfig carp1 +} + +carp6_handover_cleanup() +{ + + $DEBUG && dump + cleanup +} + atf_init_test_cases() { atf_add_test_case
CVS commit: src/distrib/sets/lists/xdebug
Module Name:src Committed By: chs Date: Mon Feb 27 07:11:06 UTC 2017 Modified Files: src/distrib/sets/lists/xdebug: md.macppc Log Message: add glint driver debuginfo file. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/distrib/sets/lists/xdebug/md.macppc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/xdebug/md.macppc diff -u src/distrib/sets/lists/xdebug/md.macppc:1.10 src/distrib/sets/lists/xdebug/md.macppc:1.11 --- src/distrib/sets/lists/xdebug/md.macppc:1.10 Sat Sep 24 21:57:38 2016 +++ src/distrib/sets/lists/xdebug/md.macppc Mon Feb 27 07:11:06 2017 @@ -1,4 +1,4 @@ -# $NetBSD: md.macppc,v 1.10 2016/09/24 21:57:38 mrg Exp $ +# $NetBSD: md.macppc,v 1.11 2017/02/27 07:11:06 chs Exp $ ./usr/X11R7/lib/modules/extensions/libcfb32_g.a -unknown- obsolete ./usr/X11R7/lib/modules/extensions/libcfb_g.a -unknown- obsolete ./usr/X11R7/lib/modules/extensions/libdbe_g.a -unknown- debuglib,xorg,obsolete @@ -55,6 +55,7 @@ ./usr/libdata/debug/usr/X11R7/lib/modules/dri/tdfx_dri.so.0.debug -unknown- obsolete ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ati_drv.so.6.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/chips_drv.so.1.debug -unknown- xorg,debug +./usr/libdata/debug/usr/X11R7/lib/modules/drivers/glint_drv.so.1.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/kbd_drv.so.1.debug -unknown- xorg,debug ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libati_drv.so.6.debug obsolete xorg,obsolete ./usr/libdata/debug/usr/X11R7/lib/modules/drivers/libchips_drv.so.1.debug obsolete xorg,obsolete
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: chs Date: Mon Feb 27 06:57:45 UTC 2017 Modified Files: src/sys/arch/mips/mips: fp.S Log Message: in mips_emul_fp(), clear all pending FP exceptions rather than just a particular one, otherwise the kernel can take another FPU trap when it writes back the new FCSR value. discovered via the fesetround() bug that wrote garbage to the FCSR. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/arch/mips/mips/fp.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/mips/mips/fp.S diff -u src/sys/arch/mips/mips/fp.S:1.47 src/sys/arch/mips/mips/fp.S:1.48 --- src/sys/arch/mips/mips/fp.S:1.47 Thu Oct 13 18:54:46 2016 +++ src/sys/arch/mips/mips/fp.S Mon Feb 27 06:57:45 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fp.S,v 1.47 2016/10/13 18:54:46 macallan Exp $ */ +/* $NetBSD: fp.S,v 1.48 2017/02/27 06:57:45 chs Exp $ */ /* * Copyright (c) 1992, 1993 @@ -145,7 +145,7 @@ NESTED(mips_emul_fp, CALLFRAME_SIZ, ra) #else cfc1 a2, MIPS_FPU_CSR # get exception register PTR_L a3, fmt_tbl(v0) # switch on FUNC & FMT - and a2, a2, ~MIPS_FPU_EXCEPTION_UNIMPL # clear exception + and a2, a2, ~MIPS_FPU_EXCEPTION_BITS # clear exception ctc1 a2, MIPS_FPU_CSR #endif j a3
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: chs Date: Mon Feb 27 06:57:16 UTC 2017 Modified Files: src/sys/arch/mips/include: fenv.h Log Message: fix fesetround() to set the FPSR to the desired value rather than a pointer to a local variable. wrap the asm in inline functions so that the compiler can do type checking for us. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/include/fenv.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/arch/mips/include/fenv.h diff -u src/sys/arch/mips/include/fenv.h:1.2 src/sys/arch/mips/include/fenv.h:1.3 --- src/sys/arch/mips/include/fenv.h:1.2 Fri Jan 13 19:10:14 2017 +++ src/sys/arch/mips/include/fenv.h Mon Feb 27 06:57:16 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fenv.h,v 1.2 2017/01/13 19:10:14 christos Exp $ */ +/* $NetBSD: fenv.h,v 1.3 2017/02/27 06:57:16 chs Exp $ */ /*- * Copyright (c) 2004-2005 David Schultz@@ -67,9 +67,21 @@ extern const fenv_t __fe_dfl_env; #define _ENABLE_MASK (FE_ALL_EXCEPT << _ENABLE_SHIFT) #define _ENABLE_SHIFT5 +static inline fpu_control_t +__rfs(void) +{ + fpu_control_t __fpsr; + + __asm __volatile("cfc1 %0,$31" : "=r" (__fpsr)); + return __fpsr; +} -#define __rfs(__fpsr) __asm __volatile("cfc1 %0,$31" : "=r" ((*__fpsr))) -#define __wfs(__fpsr) __asm __volatile("ctc1 %0,$31" : : "r" (__fpsr)) +static inline void +__wfs(fpu_control_t __fpsr) +{ + + __asm __volatile("ctc1 %0,$31" : : "r" (__fpsr)); +} __fenv_static inline int feclearexcept(int __excepts) @@ -77,7 +89,7 @@ feclearexcept(int __excepts) fexcept_t __fpsr; __excepts &= FE_ALL_EXCEPT; - __rfs(&__fpsr); + __fpsr = __rfs(); __fpsr &= ~(__excepts | (__excepts << _ENABLE_SHIFT)); __wfs(__fpsr); return 0; @@ -88,7 +100,7 @@ fegetexceptflag(fexcept_t *__flagp, int { fexcept_t __fpsr; - __rfs(&__fpsr); + __fpsr = __rfs(); *__flagp = __fpsr & __excepts; return (0); } @@ -98,7 +110,7 @@ fesetexceptflag(const fexcept_t *__flagp { fexcept_t __fpsr; - __rfs(&__fpsr); + __fpsr = __rfs(); __fpsr &= ~__excepts; __fpsr |= *__flagp & __excepts; __wfs(__fpsr); @@ -119,7 +131,7 @@ fetestexcept(int __excepts) { fexcept_t __fpsr; - __rfs(&__fpsr); + __fpsr = __rfs(); return (__fpsr & __excepts); } @@ -128,7 +140,7 @@ fegetround(void) { fexcept_t __fpsr; - __rfs(&__fpsr); + __fpsr = __rfs(); return __fpsr & _ROUND_MASK; } @@ -139,10 +151,10 @@ fesetround(int __round) if (__round & ~_ROUND_MASK) return 1; - __rfs(&__fpsr); + __fpsr = __rfs(); __fpsr &= ~_ROUND_MASK; __fpsr |= __round; - __wfs(&__fpsr); + __wfs(__fpsr); return 0; } @@ -151,7 +163,7 @@ __fenv_static inline int fegetenv(fenv_t *__envp) { - __rfs(__envp); + *__envp = __rfs(); return (0); } @@ -160,7 +172,7 @@ feholdexcept(fenv_t *__envp) { fenv_t __env; - __rfs(&__env); + __env = __rfs(); *__envp = __env; __env &= ~(FE_ALL_EXCEPT | _ENABLE_MASK); __wfs(__env); @@ -180,7 +192,7 @@ feupdateenv(const fenv_t *__envp) { fexcept_t __fpsr; - __rfs(&__fpsr); + __fpsr = __rfs(); __wfs(*__envp); feraiseexcept(__fpsr & FE_ALL_EXCEPT); return (0); @@ -195,7 +207,7 @@ feenableexcept(int __excepts) { fenv_t __old_fpsr, __new_fpsr; - __rfs(&__new_fpsr); + __new_fpsr = __rfs(); __old_fpsr = (__new_fpsr & _ENABLE_MASK) >> _ENABLE_SHIFT; __excepts &= FE_ALL_EXCEPT; __new_fpsr |= __excepts << _ENABLE_SHIFT; @@ -208,7 +220,7 @@ fedisableexcept(int __excepts) { fenv_t __old_fpsr, __new_fpsr; - __rfs(&__new_fpsr); + __new_fpsr = __rfs(); __old_fpsr = (__new_fpsr & _ENABLE_MASK) >> _ENABLE_SHIFT; __excepts &= FE_ALL_EXCEPT; __new_fpsr &= ~(__excepts << _ENABLE_SHIFT); @@ -221,7 +233,7 @@ fegetexcept(void) { fenv_t __fpsr; - __rfs(&__fpsr); + __fpsr = __rfs(); return ((__fpsr & _ENABLE_MASK) >> _ENABLE_SHIFT); }
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: chs Date: Mon Feb 27 06:56:03 UTC 2017 Modified Files: src/sys/arch/mips/include: ieeefp.h Log Message: the FP_* rounding constants need to be different from the new FE_* constants to preserve the ABI, so shift them as needed when using them. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/include/ieeefp.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/arch/mips/include/ieeefp.h diff -u src/sys/arch/mips/include/ieeefp.h:1.8 src/sys/arch/mips/include/ieeefp.h:1.9 --- src/sys/arch/mips/include/ieeefp.h:1.8 Fri Dec 25 06:01:38 2015 +++ src/sys/arch/mips/include/ieeefp.h Mon Feb 27 06:56:03 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ieeefp.h,v 1.8 2015/12/25 06:01:38 christos Exp $ */ +/* $NetBSD: ieeefp.h,v 1.9 2017/02/27 06:56:03 chs Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -17,11 +17,15 @@ #if !defined(_ISOC99_SOURCE) typedef unsigned int fp_except; -#define FP_X_IMP FE_INEXACT /* imprecise (loss of precision) */ -#define FP_X_UFL FE_UNDERFLOW /* underflow exception */ -#define FP_X_OFL FE_OVERFLOW /* overflow exception */ -#define FP_X_DZ FE_DIVBYZERO /* divide-by-zero exception */ -#define FP_X_INV FE_INVALID /* invalid operation exception */ + +/* adjust for FP_* and FE_* value differences */ +#define __FPE(x) ((x) >> 2) + +#define FP_X_IMP __FPE(FE_INEXACT) /* imprecise (loss of precision) */ +#define FP_X_UFL __FPE(FE_UNDERFLOW) /* underflow exception */ +#define FP_X_OFL __FPE(FE_OVERFLOW) /* overflow exception */ +#define FP_X_DZ __FPE(FE_DIVBYZERO) /* divide-by-zero exception */ +#define FP_X_INV __FPE(FE_INVALID) /* invalid operation exception */ typedef enum { FP_RN=FE_TONEAREST, /* round to nearest representable number */
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: chs Date: Mon Feb 27 06:56:33 UTC 2017 Modified Files: src/sys/arch/mips/mips: db_disasm.c Log Message: the second operand to cfc1/ctc1 isn't an FPU data register so don't make it look like one. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/mips/mips/db_disasm.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/mips/mips/db_disasm.c diff -u src/sys/arch/mips/mips/db_disasm.c:1.30 src/sys/arch/mips/mips/db_disasm.c:1.31 --- src/sys/arch/mips/mips/db_disasm.c:1.30 Sat Jun 27 03:31:29 2015 +++ src/sys/arch/mips/mips/db_disasm.c Mon Feb 27 06:56:32 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: db_disasm.c,v 1.30 2015/06/27 03:31:29 matt Exp $ */ +/* $NetBSD: db_disasm.c,v 1.31 2017/02/27 06:56:32 chs Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.30 2015/06/27 03:31:29 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.31 2017/02/27 06:56:32 chs Exp $"); #include #include @@ -623,13 +623,13 @@ db_disasm_insn(int insn, db_addr_t loc, break; case OP_CT: - db_printf("ctc1\t%s,f%d", + db_printf("ctc1\t%s,%d", reg_name[i.RType.rt], i.RType.rd); break; case OP_CF: - db_printf("cfc1\t%s,f%d", + db_printf("cfc1\t%s,%d", reg_name[i.RType.rt], i.RType.rd); break;
CVS commit: src/lib/libc/arch/mips/gen
Module Name:src Committed By: chs Date: Mon Feb 27 06:55:26 UTC 2017 Modified Files: src/lib/libc/arch/mips/gen: fpsetmask.c fpsetround.c fpsetsticky.c Log Message: fix asm operands: "ctc1" uses the register as an input, not an output. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/lib/libc/arch/mips/gen/fpsetmask.c \ src/lib/libc/arch/mips/gen/fpsetsticky.c cvs rdiff -u -r1.7 -r1.8 src/lib/libc/arch/mips/gen/fpsetround.c 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/arch/mips/gen/fpsetmask.c diff -u src/lib/libc/arch/mips/gen/fpsetmask.c:1.9 src/lib/libc/arch/mips/gen/fpsetmask.c:1.10 --- src/lib/libc/arch/mips/gen/fpsetmask.c:1.9 Wed Sep 17 11:02:55 2014 +++ src/lib/libc/arch/mips/gen/fpsetmask.c Mon Feb 27 06:55:26 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fpsetmask.c,v 1.9 2014/09/17 11:02:55 joerg Exp $ */ +/* $NetBSD: fpsetmask.c,v 1.10 2017/02/27 06:55:26 chs Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpsetmask.c,v 1.9 2014/09/17 11:02:55 joerg Exp $"); +__RCSID("$NetBSD: fpsetmask.c,v 1.10 2017/02/27 06:55:26 chs Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -29,7 +29,7 @@ fpsetmask(fp_except mask) new = old & ~(0x1f << 7); new |= ((mask & 0x1f) << 7); - __asm(".set push; .set noat; ctc1 %0,$31; .set pop" : "=r" (new)); + __asm(".set push; .set noat; ctc1 %0,$31; .set pop" : : "r" (new)); return (old >> 7) & 0x1f; } Index: src/lib/libc/arch/mips/gen/fpsetsticky.c diff -u src/lib/libc/arch/mips/gen/fpsetsticky.c:1.9 src/lib/libc/arch/mips/gen/fpsetsticky.c:1.10 --- src/lib/libc/arch/mips/gen/fpsetsticky.c:1.9 Wed Sep 17 11:02:55 2014 +++ src/lib/libc/arch/mips/gen/fpsetsticky.c Mon Feb 27 06:55:26 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fpsetsticky.c,v 1.9 2014/09/17 11:02:55 joerg Exp $ */ +/* $NetBSD: fpsetsticky.c,v 1.10 2017/02/27 06:55:26 chs Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpsetsticky.c,v 1.9 2014/09/17 11:02:55 joerg Exp $"); +__RCSID("$NetBSD: fpsetsticky.c,v 1.10 2017/02/27 06:55:26 chs Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -29,7 +29,7 @@ fpsetsticky(fp_except sticky) new = old & ~(0x1f << 2); new |= (sticky & 0x1f) << 2; - __asm(".set push; .set noat; ctc1 %0,$31; .set pop" : "=r" (new)); + __asm(".set push; .set noat; ctc1 %0,$31; .set pop" : : "r" (new)); return (old >> 2) & 0x1f; } Index: src/lib/libc/arch/mips/gen/fpsetround.c diff -u src/lib/libc/arch/mips/gen/fpsetround.c:1.7 src/lib/libc/arch/mips/gen/fpsetround.c:1.8 --- src/lib/libc/arch/mips/gen/fpsetround.c:1.7 Wed Sep 17 11:02:55 2014 +++ src/lib/libc/arch/mips/gen/fpsetround.c Mon Feb 27 06:55:26 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fpsetround.c,v 1.7 2014/09/17 11:02:55 joerg Exp $ */ +/* $NetBSD: fpsetround.c,v 1.8 2017/02/27 06:55:26 chs Exp $ */ /* * Written by J.T. Conklin, Apr 11, 1995 @@ -7,7 +7,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpsetround.c,v 1.7 2014/09/17 11:02:55 joerg Exp $"); +__RCSID("$NetBSD: fpsetround.c,v 1.8 2017/02/27 06:55:26 chs Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -29,7 +29,7 @@ fpsetround(fp_rnd rnd_dir) new = old & ~0x03; new |= rnd_dir & 0x03; - __asm(".set push; .set noat; ctc1 %0,$31; .set pop" : "=r" (new)); + __asm(".set push; .set noat; ctc1 %0,$31; .set pop" : : "r" (new)); return old & 0x03; }
CVS commit: src/sys/arch/powerpc/include
Module Name:src Committed By: chs Date: Mon Feb 27 06:54:43 UTC 2017 Modified Files: src/sys/arch/powerpc/include: fenv.h Log Message: update the FE0/FE1 MSR bits as needed when changing the exception mask. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/powerpc/include/fenv.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/arch/powerpc/include/fenv.h diff -u src/sys/arch/powerpc/include/fenv.h:1.1 src/sys/arch/powerpc/include/fenv.h:1.2 --- src/sys/arch/powerpc/include/fenv.h:1.1 Sun Dec 20 16:23:14 2015 +++ src/sys/arch/powerpc/include/fenv.h Mon Feb 27 06:54:42 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fenv.h,v 1.1 2015/12/20 16:23:14 christos Exp $ */ +/* $NetBSD: fenv.h,v 1.2 2017/02/27 06:54:42 chs Exp $ */ /*- * Copyright (c) 2004-2005 David Schultz@@ -92,9 +92,45 @@ extern const fenv_t __fe_dfl_env; #ifndef _SOFT_FLOAT #define __mffs(__env) __asm __volatile("mffs %0" : "=f" (*(__env))) #define __mtfsf(__env) __asm __volatile("mtfsf 255,%0" : : "f" (__env)) + +static inline uint32_t +__mfmsr(void) +{ + uint32_t __msr; + + __asm volatile ("mfmsr %0" : "=r"(__msr)); + return __msr; +} + +static inline void +__mtmsr(uint32_t __msr) +{ + + __asm volatile ("mtmsr %0" : : "r"(__msr)); +} + +#define __MSR_FE_MASK (0x0800 | 0x0100) +#define __MSR_FE_DIS (0) +#define __MSR_FE_PREC (0x0800 | 0x0100) + +static inline void +__updatemsr(uint32_t __reg) +{ + uint32_t __msr; + + __msr = __mfmsr() & ~__MSR_FE_MASK; + if (__reg != 0) { + __msr |= __MSR_FE_PREC; + } else { + __msr |= __MSR_FE_DIS; + } + __mtmsr(__msr); +} + #else #define __mffs(__env) #define __mtfsf(__env) +#define __updatemsr(__reg) #endif union __fpscr { @@ -201,11 +237,13 @@ __fenv_static inline int feholdexcept(fenv_t *__envp) { union __fpscr __r; + uint32_t msr; __mffs(&__r.__d); *__envp = __r.__d; __r.__bits.__reg &= ~(FE_ALL_EXCEPT | _ENABLE_MASK); __mtfsf(__r.__d); + __updatemsr(__r.__bits.__reg); return (0); } @@ -216,6 +254,7 @@ fesetenv(const fenv_t *__envp) __r.__bits.__reg = *__envp; __mtfsf(__r.__d); + __updatemsr(__r.__bits.__reg); return (0); } @@ -228,6 +267,7 @@ feupdateenv(const fenv_t *__envp) __r.__bits.__reg &= FE_ALL_EXCEPT; __r.__bits.__reg |= *__envp; __mtfsf(__r.__d); + __updatemsr(__r.__bits.__reg); return (0); } @@ -245,6 +285,7 @@ feenableexcept(int __mask) __oldmask = __r.__bits.__reg; __r.__bits.__reg |= (__mask & FE_ALL_EXCEPT) >> _FPUSW_SHIFT; __mtfsf(__r.__d); + __updatemsr(__r.__bits.__reg); return ((__oldmask & _ENABLE_MASK) << _FPUSW_SHIFT); } @@ -258,6 +299,7 @@ fedisableexcept(int __mask) __oldmask = __r.__bits.__reg; __r.__bits.__reg &= ~((__mask & FE_ALL_EXCEPT) >> _FPUSW_SHIFT); __mtfsf(__r.__d); + __updatemsr(__r.__bits.__reg); return ((__oldmask & _ENABLE_MASK) << _FPUSW_SHIFT); }
CVS commit: src
Module Name:src Committed By: chs Date: Mon Feb 27 06:54:00 UTC 2017 Modified Files: src/lib/libc/arch/powerpc/gen: fpsetmask.c src/sys/arch/powerpc/include: instr.h src/sys/arch/powerpc/powerpc: trap.c Log Message: have fpsetmask() change the FE0/FE1 MSR bits to precise mode if any FP exceptions are enabled. fix the kernel emulation of mfmsr and mtmsr to use the correct opcodes for these instructions. ignore PSL_FE (the FP enable bit) in the MSR that a user program tries to set, since it will naturally be set for FP-using processes but we can't let the user process manage that bit. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libc/arch/powerpc/gen/fpsetmask.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/include/instr.h cvs rdiff -u -r1.150 -r1.151 src/sys/arch/powerpc/powerpc/trap.c 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/arch/powerpc/gen/fpsetmask.c diff -u src/lib/libc/arch/powerpc/gen/fpsetmask.c:1.10 src/lib/libc/arch/powerpc/gen/fpsetmask.c:1.11 --- src/lib/libc/arch/powerpc/gen/fpsetmask.c:1.10 Sun Jul 10 21:18:47 2011 +++ src/lib/libc/arch/powerpc/gen/fpsetmask.c Mon Feb 27 06:54:00 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fpsetmask.c,v 1.10 2011/07/10 21:18:47 matt Exp $ */ +/* $NetBSD: fpsetmask.c,v 1.11 2017/02/27 06:54:00 chs Exp $ */ /* * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fpsetmask.c,v 1.10 2011/07/10 21:18:47 matt Exp $"); +__RCSID("$NetBSD: fpsetmask.c,v 1.11 2017/02/27 06:54:00 chs Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -39,6 +39,7 @@ __RCSID("$NetBSD: fpsetmask.c,v 1.10 201 #include #include #include +#include #ifdef __weak_alias __weak_alias(fpsetmask,_fpsetmask) @@ -47,6 +48,24 @@ __weak_alias(fpsetmask,_fpsetmask) #define MASKBITS (FPSCR_XE|FPSCR_ZE|FPSCR_UE|FPSCR_OE|FPSCR_VE) #define MASKSHFT 3 +static __inline uint32_t +mfmsr(void) +{ + uint32_t msr; + + __asm volatile ("mfmsr %0" : "=r"(msr)); + return msr; +} + +static __inline void +mtmsr(uint32_t msr) +{ + + __asm volatile ("mtmsr %0" : : "r"(msr)); +} + +#include + fp_except fpsetmask(fp_except mask) { @@ -54,12 +73,20 @@ fpsetmask(fp_except mask) double u_d; uint64_t u_fpscr; } ud; - fp_except old; + fp_except old, new; + uint32_t msr; __asm volatile("mffs %0" : "=f"(ud.u_d)); old = ((uint32_t)ud.u_fpscr & MASKBITS) >> MASKSHFT; ud.u_fpscr &= ~MASKBITS; - ud.u_fpscr |= ((uint32_t)mask << MASKSHFT) & MASKBITS; + new = ((uint32_t)mask << MASKSHFT) & MASKBITS; + ud.u_fpscr |= new; __asm volatile("mtfsf 0xff,%0" :: "f"(ud.u_d)); + + msr = mfmsr(); + msr = (msr & ~(PSL_FE0 | PSL_FE1)) | + (new ? PSL_FE_PREC : PSL_FE_DIS); + mtmsr(msr); + return (old); } Index: src/sys/arch/powerpc/include/instr.h diff -u src/sys/arch/powerpc/include/instr.h:1.7 src/sys/arch/powerpc/include/instr.h:1.8 --- src/sys/arch/powerpc/include/instr.h:1.7 Fri Aug 1 21:56:36 2014 +++ src/sys/arch/powerpc/include/instr.h Mon Feb 27 06:54:00 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: instr.h,v 1.7 2014/08/01 21:56:36 matt Exp $ */ +/* $NetBSD: instr.h,v 1.8 2017/02/27 06:54:00 chs Exp $ */ /* * Copyright (c) 1992, 1993 @@ -405,7 +405,7 @@ union instr { #define OPC_MFSPR_REG(o) (((o) >> 21) & 0x1f) #define OPC_MFSPR_P(o, spr) (((o) & OPC_MFSPR_MASK) == OPC_MFSPR(spr)) -#define OPC_MFMSR_CODE 0x7ca8 +#define OPC_MFMSR_CODE 0x7ca6 #define OPC_MFMSR_MASK 0xfc1f #define OPC_MFMSR OPC_MFMSR_CODE #define OPC_MFMSR_REG(o) (((o) >> 21) & 0x1f) Index: src/sys/arch/powerpc/powerpc/trap.c diff -u src/sys/arch/powerpc/powerpc/trap.c:1.150 src/sys/arch/powerpc/powerpc/trap.c:1.151 --- src/sys/arch/powerpc/powerpc/trap.c:1.150 Tue Aug 12 20:27:10 2014 +++ src/sys/arch/powerpc/powerpc/trap.c Mon Feb 27 06:54:00 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.150 2014/08/12 20:27:10 joerg Exp $ */ +/* $NetBSD: trap.c,v 1.151 2017/02/27 06:54:00 chs Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.150 2014/08/12 20:27:10 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.151 2017/02/27 06:54:00 chs Exp $"); #include "opt_altivec.h" #include "opt_ddb.h" @@ -1015,6 +1015,7 @@ int emulated_opcode(struct lwp *l, struct trapframe *tf) { uint32_t opcode; + if (copyin((void *)tf->tf_srr0, , sizeof(opcode)) != 0) return 0; @@ -1038,7 +1039,7 @@ emulated_opcode(struct lwp *l, struct tr return 1; } -#define OPC_MTMSR_CODE 0x7ca8 +#define OPC_MTMSR_CODE 0x7c000124 #define OPC_MTMSR_MASK 0xfc1f #define OPC_MTMSR OPC_MTMSR_CODE #define OPC_MTMSR_REG(o) (((o) >> 21) & 0x1f) @@ -1049,15 +1050,24 @@ emulated_opcode(struct lwp *l, struct tr register_t msr =
CVS commit: src/sys/arch/powerpc/include
Module Name:src Committed By: chs Date: Mon Feb 27 06:51:46 UTC 2017 Modified Files: src/sys/arch/powerpc/include: ieeefp.h Log Message: the FP_* exception constants need to be different from the new FE_* constants to preserve the ABI, so shift them as needed when using them. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/include/ieeefp.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/arch/powerpc/include/ieeefp.h diff -u src/sys/arch/powerpc/include/ieeefp.h:1.5 src/sys/arch/powerpc/include/ieeefp.h:1.6 --- src/sys/arch/powerpc/include/ieeefp.h:1.5 Fri Dec 25 06:02:10 2015 +++ src/sys/arch/powerpc/include/ieeefp.h Mon Feb 27 06:51:46 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ieeefp.h,v 1.5 2015/12/25 06:02:10 christos Exp $ */ +/* $NetBSD: ieeefp.h,v 1.6 2017/02/27 06:51:46 chs Exp $ */ /* * Written by J.T. Conklin, Apr 6, 1995 @@ -17,11 +17,15 @@ #if !defined(_ISOC99_SOURCE) typedef int fp_except; -#define FP_X_IMP FE_INEXACT /* imprecise (loss of precision) */ -#define FP_X_DZ FE_DIVBYZERO /* divide-by-zero exception */ -#define FP_X_UFL FE_UNDERFLOW /* underflow exception */ -#define FP_X_OFL FE_OVERFLOW /* overflow exception */ -#define FP_X_INV FE_INVALID /* invalid operation exception */ + +/* adjust for FP_* and FE_* value differences */ +#define __FPE(x) ((x) >> 25) + +#define FP_X_IMP __FPE(FE_INEXACT) /* imprecise (loss of precision) */ +#define FP_X_DZ __FPE(FE_DIVBYZERO) /* divide-by-zero exception */ +#define FP_X_UFL __FPE(FE_UNDERFLOW) /* underflow exception */ +#define FP_X_OFL __FPE(FE_OVERFLOW) /* overflow exception */ +#define FP_X_INV __FPE(FE_INVALID) /* invalid operation exception */ typedef enum { FP_RN=FE_TONEAREST, /* round to nearest representable number */
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: chs Date: Mon Feb 27 06:50:16 UTC 2017 Modified Files: src/sys/arch/evbarm/conf: IGEPV2 std.igepv2 Log Message: fix the build of this kernel config by adding the omapscm driver. turn on options for dtrace, turn off USB debugging. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/evbarm/conf/IGEPV2 cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/conf/std.igepv2 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/evbarm/conf/IGEPV2 diff -u src/sys/arch/evbarm/conf/IGEPV2:1.28 src/sys/arch/evbarm/conf/IGEPV2:1.29 --- src/sys/arch/evbarm/conf/IGEPV2:1.28 Sun Feb 19 07:47:00 2017 +++ src/sys/arch/evbarm/conf/IGEPV2 Mon Feb 27 06:50:15 2017 @@ -1,5 +1,5 @@ # -# $NetBSD: IGEPV2,v 1.28 2017/02/19 07:47:00 rin Exp $ +# $NetBSD: IGEPV2,v 1.29 2017/02/27 06:50:15 chs Exp $ # # IGEPv2 -- TI OMAP 3530 Eval Board Kernel # @@ -36,7 +36,7 @@ file-system MSDOSFS # MS-DOS file syste #file-system FDESC # /dev/fd #file-system KERNFS # /kern #file-system NULLFS # loopback file system -#file-system PROCFS # /proc +file-system PROCFS # /proc #file-system PUFFS # Userspace file systems (e.g. ntfs-3g & sshfs) #file-system UMAPFS # NULLFS + uid and gid remapping #file-system UNION # union file system @@ -136,9 +136,9 @@ makeoptions DEBUG="-g" # compile full sy makeoptions COPY_SYMTAB=1 ## USB Debugging options -options USB_DEBUG -options OHCI_DEBUG -options UHUB_DEBUG +#options USB_DEBUG +#options OHCI_DEBUG +#options UHUB_DEBUG # Valid options for BOOT_ARGS: @@ -212,6 +212,9 @@ omapgpio5 at obio2 addr 0x49058000 size gpio* at omapgpio? +# System Control Module +omapscm0 at obio0 addr 0x48002000 size 0x1000 + # I2C Controller omapiic0 at obio0 addr 0x4807 size 0x1000 intr 56 # I2C1 omapiic1 at obio0 addr 0x4806 size 0x1000 intr 61 # I2C3 Index: src/sys/arch/evbarm/conf/std.igepv2 diff -u src/sys/arch/evbarm/conf/std.igepv2:1.7 src/sys/arch/evbarm/conf/std.igepv2:1.8 --- src/sys/arch/evbarm/conf/std.igepv2:1.7 Sun Aug 10 23:46:09 2014 +++ src/sys/arch/evbarm/conf/std.igepv2 Mon Feb 27 06:50:15 2017 @@ -1,4 +1,4 @@ -# $NetBSD: std.igepv2,v 1.7 2014/08/10 23:46:09 chs Exp $ +# $NetBSD: std.igepv2,v 1.8 2017/02/27 06:50:15 chs Exp $ # # standard NetBSD/evbarm for IGEPV2 options @@ -8,6 +8,9 @@ include "arch/evbarm/conf/std.evbarm" # Pull in BEAGLEBOARD config definitions. include "arch/evbarm/conf/files.beagle" +options KDTRACE_HOOKS +options MODULAR +options MODULAR_DEFAULT_AUTOLOAD options CORTEX_PMC options __HAVE_CPU_COUNTER options __HAVE_FAST_SOFTINTS # should be in types.h
CVS commit: src/lib/libm/src
Module Name:src Committed By: chs Date: Mon Feb 27 06:49:02 UTC 2017 Modified Files: src/lib/libm/src: lrint.c Log Message: the MI lrint() code assumes that rounding is done in at most double precision but m68k (68881) uses extended precision by default, so put the FPU in double-precision mode temporarily here. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/lib/libm/src/lrint.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libm/src/lrint.c diff -u src/lib/libm/src/lrint.c:1.5 src/lib/libm/src/lrint.c:1.6 --- src/lib/libm/src/lrint.c:1.5 Thu Jul 9 06:17:13 2015 +++ src/lib/libm/src/lrint.c Mon Feb 27 06:49:02 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: lrint.c,v 1.5 2015/07/09 06:17:13 nat Exp $ */ +/* $NetBSD: lrint.c,v 1.6 2017/02/27 06:49:02 chs Exp $ */ /*- * Copyright (c) 2004 @@ -46,6 +46,15 @@ TWO52[2]={ -4.5035996273704960e+15, /* 0xC330, 0x */ }; +#ifdef __HAVE_68881__ +#include + +#define get_fpcr(__fpcr) \ +__asm__ __volatile__ ("fmove%.l %!,%0" : "=dm" (__fpcr)) +#define set_fpcr(__fpcr) \ +__asm__ __volatile__ ("fmove%.l %0,%!" : : "dm" (__fpcr)) +#endif + RESTYPE LRINTNAME(double x) { @@ -68,8 +77,20 @@ LRINTNAME(double x) /* >= 2^52 is already an exact integer */ if (e < DBL_FRACBITS) { /* round, using current direction */ +#ifdef __HAVE_68881__ + int ofpcr, nfpcr; + + /* For m68k hardfloat, use double-precision */ + get_fpcr(ofpcr); + nfpcr = (ofpcr & ~FPCR_PREC) | FPCR_DBL; + set_fpcr(nfpcr); +#endif x += TWO52[s]; x -= TWO52[s]; +#ifdef __HAVE_68881__ + __asm__ __volatile__ ("/* dummy %0 */" : : "f" (x)); + set_fpcr(ofpcr); +#endif } else return x;
CVS commit: src/sys/arch/m68k/include
Module Name:src Committed By: chs Date: Mon Feb 27 06:47:58 UTC 2017 Modified Files: src/sys/arch/m68k/include: ieeefp.h Log Message: the FP_* constants need to be different from the new FE_* constants to preserve the ABI, so shift them as needed when using them. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/m68k/include/ieeefp.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/arch/m68k/include/ieeefp.h diff -u src/sys/arch/m68k/include/ieeefp.h:1.8 src/sys/arch/m68k/include/ieeefp.h:1.9 --- src/sys/arch/m68k/include/ieeefp.h:1.8 Fri Dec 25 06:03:06 2015 +++ src/sys/arch/m68k/include/ieeefp.h Mon Feb 27 06:47:58 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ieeefp.h,v 1.8 2015/12/25 06:03:06 christos Exp $ */ +/* $NetBSD: ieeefp.h,v 1.9 2017/02/27 06:47:58 chs Exp $ */ /* * Written by J.T. Conklin, Apr 6, 1995 @@ -19,17 +19,21 @@ typedef int fp_except; -#define FP_X_IMP FE_INEXACT /* imprecise (loss of precision) */ -#define FP_X_DZ FE_DIVBYZERO /* divide-by-zero exception */ -#define FP_X_UFL FE_UNDERFLOW /* underflow exception */ -#define FP_X_OFL FE_OVERFLOW /* overflow exception */ -#define FP_X_INV FE_INVALID /* invalid operation exception */ +/* adjust for FP_* and FE_* value differences */ +#define __FPE(x) ((x) >> 3) +#define __FPR(x) ((x) >> 4) + +#define FP_X_IMP __FPE(FE_INEXACT) /* imprecise (loss of precision) */ +#define FP_X_DZ __FPE(FE_DIVBYZERO) /* divide-by-zero exception */ +#define FP_X_UFL __FPE(FE_UNDERFLOW) /* underflow exception */ +#define FP_X_OFL __FPE(FE_OVERFLOW) /* overflow exception */ +#define FP_X_INV __FPE(FE_INVALID) /* invalid operation exception */ typedef enum { -FP_RN=FE_TONEAREST, /* round to nearest representable number */ -FP_RZ=FE_TOWARDZERO, /* round to zero (truncate) */ -FP_RM=FE_DOWNWARD, /* round toward negative infinity */ -FP_RP=FE_UPWARD /* round toward positive infinity */ +FP_RN=__FPR(FE_TONEAREST), /* round to nearest representable number */ +FP_RZ=__FPR(FE_TOWARDZERO), /* round to zero (truncate) */ +FP_RM=__FPR(FE_DOWNWARD), /* round toward negative infinity */ +FP_RP=__FPR(FE_UPWARD) /* round toward positive infinity */ } fp_rnd; typedef enum {
CVS commit: src/sys/arch/m68k/include
Module Name:src Committed By: chs Date: Mon Feb 27 06:47:30 UTC 2017 Modified Files: src/sys/arch/m68k/include: fenv.h Log Message: use FPCR instead of FPSR to manipulate the exception mask. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/m68k/include/fenv.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/arch/m68k/include/fenv.h diff -u src/sys/arch/m68k/include/fenv.h:1.4 src/sys/arch/m68k/include/fenv.h:1.5 --- src/sys/arch/m68k/include/fenv.h:1.4 Tue Jan 5 00:47:08 2016 +++ src/sys/arch/m68k/include/fenv.h Mon Feb 27 06:47:30 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fenv.h,v 1.4 2016/01/05 00:47:08 ozaki-r Exp $ */ +/* $NetBSD: fenv.h,v 1.5 2017/02/27 06:47:30 chs Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -50,7 +50,7 @@ #define FE_ALL_EXCEPT \ (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) -/* Rounding modes, from FPSR */ +/* Rounding modes, from FPCR */ #define FE_TONEAREST FPCR_NEAR #define FE_TOWARDZERO FPCR_ZERO #define FE_DOWNWARD FPCR_MINF @@ -266,12 +266,12 @@ feupdateenv(const fenv_t *__envp) static inline int feenableexcept(int __mask) { - fexcept_t __fpsr, __oldmask; + fexcept_t __fpcr, __oldmask; - __get_fpsr(__fpsr); - __oldmask = __fpsr & FE_ALL_EXCEPT; - __fpsr |= __mask & FE_ALL_EXCEPT; - __set_fpsr(__fpsr); + __get_fpcr(__fpcr); + __oldmask = (__fpcr >> 6) & FE_ALL_EXCEPT; + __fpcr |= (__mask & FE_ALL_EXCEPT) << 6; + __set_fpcr(__fpcr); return __oldmask; } @@ -279,12 +279,12 @@ feenableexcept(int __mask) static inline int fedisableexcept(int __mask) { - fexcept_t __fpsr, __oldmask; + fexcept_t __fpcr, __oldmask; - __get_fpsr(__fpsr); - __oldmask = __fpsr & FE_ALL_EXCEPT; - __fpsr &= ~(__mask & FE_ALL_EXCEPT); - __set_fpsr(__fpsr); + __get_fpcr(__fpcr); + __oldmask = (__fpcr >> 6) & FE_ALL_EXCEPT; + __fpcr &= ~((__mask & FE_ALL_EXCEPT) << 6); + __set_fpcr(__fpcr); return __oldmask; } @@ -292,11 +292,11 @@ fedisableexcept(int __mask) static inline int fegetexcept(void) { - fexcept_t __fpsr; + fexcept_t __fpcr; - __get_fpsr(__fpsr); + __get_fpcr(__fpcr); - return __fpsr & FE_ALL_EXCEPT; + return (__fpcr >> 6) & FE_ALL_EXCEPT; } #endif /* _NETBSD_SOURCE || _GNU_SOURCE */
CVS commit: src
Module Name:src Committed By: chs Date: Mon Feb 27 06:47:00 UTC 2017 Modified Files: src/external/cddl/osnet/dev/dtrace/amd64: dtrace_asm.S dtrace_isa.c dtrace_subr.c src/external/cddl/osnet/dev/dtrace/arm: dtrace_subr.c src/external/cddl/osnet/dev/dtrace/i386: dtrace_asm.S dtrace_isa.c dtrace_subr.c src/external/cddl/osnet/dev/fbt: fbt.c src/external/cddl/osnet/dist/uts/common/sys: dtrace.h src/sys/arch/arm/arm: undefined.c src/sys/arch/i386/i386: i386_trap.S Log Message: apply changes equivalent to freebsd r256822, r267759 and r298171: fix the dtrace "args" variable to return correct values. simplify the invop handlers a bit by changing the second argument from a pointer into the stack to a pointer to the trapframe. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/external/cddl/osnet/dev/dtrace/amd64/dtrace_asm.S cvs rdiff -u -r1.5 -r1.6 \ src/external/cddl/osnet/dev/dtrace/amd64/dtrace_isa.c cvs rdiff -u -r1.7 -r1.8 \ src/external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c cvs rdiff -u -r1.2 -r1.3 src/external/cddl/osnet/dev/dtrace/arm/dtrace_subr.c cvs rdiff -u -r1.5 -r1.6 src/external/cddl/osnet/dev/dtrace/i386/dtrace_asm.S cvs rdiff -u -r1.4 -r1.5 src/external/cddl/osnet/dev/dtrace/i386/dtrace_isa.c cvs rdiff -u -r1.7 -r1.8 \ src/external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c cvs rdiff -u -r1.21 -r1.22 src/external/cddl/osnet/dev/fbt/fbt.c cvs rdiff -u -r1.14 -r1.15 \ src/external/cddl/osnet/dist/uts/common/sys/dtrace.h cvs rdiff -u -r1.57 -r1.58 src/sys/arch/arm/arm/undefined.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/i386/i386/i386_trap.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dev/dtrace/amd64/dtrace_asm.S diff -u src/external/cddl/osnet/dev/dtrace/amd64/dtrace_asm.S:1.6 src/external/cddl/osnet/dev/dtrace/amd64/dtrace_asm.S:1.7 --- src/external/cddl/osnet/dev/dtrace/amd64/dtrace_asm.S:1.6 Thu Jun 23 04:35:35 2016 +++ src/external/cddl/osnet/dev/dtrace/amd64/dtrace_asm.S Mon Feb 27 06:46:59 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: dtrace_asm.S,v 1.6 2016/06/23 04:35:35 pgoyette Exp $ */ +/* $NetBSD: dtrace_asm.S,v 1.7 2017/02/27 06:46:59 chs Exp $ */ /* * CDDL HEADER START @@ -72,13 +72,10 @@ */ movq TF_RIP(%rsp), %rdi decq %rdi - movq TF_RSP(%rsp), %rsi - movq TF_RAX(%rsp), %rdx - pushq (%rsi) movq %rsp, %rsi + movq TF_RAX(%rsp), %rdx call dtrace_invop ALTENTRY(dtrace_invop_callsite) - addq $8, %rsp cmpl $DTRACE_INVOP_PUSHL_EBP, %eax je bp_push cmpl $DTRACE_INVOP_LEAVE, %eax Index: src/external/cddl/osnet/dev/dtrace/amd64/dtrace_isa.c diff -u src/external/cddl/osnet/dev/dtrace/amd64/dtrace_isa.c:1.5 src/external/cddl/osnet/dev/dtrace/amd64/dtrace_isa.c:1.6 --- src/external/cddl/osnet/dev/dtrace/amd64/dtrace_isa.c:1.5 Sat May 14 21:19:05 2016 +++ src/external/cddl/osnet/dev/dtrace/amd64/dtrace_isa.c Mon Feb 27 06:46:59 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: dtrace_isa.c,v 1.5 2016/05/14 21:19:05 chs Exp $ */ +/* $NetBSD: dtrace_isa.c,v 1.6 2017/02/27 06:46:59 chs Exp $ */ /* * CDDL HEADER START @@ -47,10 +47,9 @@ uintptr_t kernelbase = (uintptr_t)KERN_B #define INKERNEL(va) ((intptr_t)(va) < 0) -struct amd64_frame { +struct amd64_frame { struct amd64_frame *f_frame; - uintptr_t f_retaddr; - uintptr_t f_arg0; + uintptr_t f_retaddr; }; typedef unsigned long vm_offset_t; @@ -355,7 +354,8 @@ dtrace_getarg(int arg, int aframes) for (i = 1; i <= aframes; i++) { fp = fp->f_frame; - if (fp->f_retaddr == (long)dtrace_invop_callsite) { + if (P2ROUNDUP(fp->f_retaddr, 16) == + (long)dtrace_invop_callsite) { /* * In the case of amd64, we will use the pointer to the * regs structure that was pushed when we took the @@ -369,13 +369,36 @@ dtrace_getarg(int arg, int aframes) * we're seeking is passed in registers, we can just * load it directly. */ - struct reg *rp = (struct reg *)((uintptr_t)[1] + - sizeof (uintptr_t)); + struct trapframe *tf = (struct trapframe *)[1]; if (arg <= inreg) { -stack = (uintptr_t *)>regs[_REG_RDI]; +switch (arg) { +case 0: + stack = (uintptr_t *)>tf_rdi; + break; +case 1: + stack = (uintptr_t *)>tf_rsi; + break; +case 2: + stack = (uintptr_t *)>tf_rdx; + break; +case 3: + stack = (uintptr_t *)>tf_rcx; + break; +case 4: + stack = (uintptr_t *)>tf_r8; + break; +case 5: + stack = (uintptr_t *)>tf_r9; + break; +default: + KASSERT(0); + stack = NULL; + break; +} +arg = 0; } else { -stack = (uintptr_t *)(rp->regs[_REG_RSP]); +stack = (uintptr_t *)(tf->tf_rsp); arg -= inreg; } goto load; Index: src/external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c diff -u src/external/cddl/osnet/dev/dtrace/amd64/dtrace_subr.c:1.7
CVS commit: src/usr.sbin/rtadvd
Module Name:src Committed By: ozaki-r Date: Mon Feb 27 05:41:37 UTC 2017 Modified Files: src/usr.sbin/rtadvd: config.c rtadvd.h Log Message: Fix the default value of rltime According to rtadvd.conf(5), the default value of rltime is 1800 seconds. PR bin/51994 To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/usr.sbin/rtadvd/config.c cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/rtadvd/rtadvd.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.sbin/rtadvd/config.c diff -u src/usr.sbin/rtadvd/config.c:1.35 src/usr.sbin/rtadvd/config.c:1.36 --- src/usr.sbin/rtadvd/config.c:1.35 Wed Nov 11 07:48:41 2015 +++ src/usr.sbin/rtadvd/config.c Mon Feb 27 05:41:36 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: config.c,v 1.35 2015/11/11 07:48:41 ozaki-r Exp $ */ +/* $NetBSD: config.c,v 1.36 2017/02/27 05:41:36 ozaki-r Exp $ */ /* $KAME: config.c,v 1.93 2005/10/17 14:40:02 suz Exp $ */ /* @@ -305,7 +305,7 @@ getconfig(const char *intface, int exith goto errexit; } - MAYHAVE(val, "rltime", tmp->maxinterval * 3); + MAYHAVE(val, "rltime", DEF_ADVROUTERLIFETIME); if (val && (val < tmp->maxinterval || val > MAXROUTERLIFETIME)) { syslog(LOG_ERR, "<%s> router lifetime (%d) on %s is invalid " Index: src/usr.sbin/rtadvd/rtadvd.h diff -u src/usr.sbin/rtadvd/rtadvd.h:1.14 src/usr.sbin/rtadvd/rtadvd.h:1.15 --- src/usr.sbin/rtadvd/rtadvd.h:1.14 Fri Jun 5 14:09:20 2015 +++ src/usr.sbin/rtadvd/rtadvd.h Mon Feb 27 05:41:36 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: rtadvd.h,v 1.14 2015/06/05 14:09:20 roy Exp $ */ +/* $NetBSD: rtadvd.h,v 1.15 2017/02/27 05:41:36 ozaki-r Exp $ */ /* $KAME: rtadvd.h,v 1.30 2005/10/17 14:40:02 suz Exp $ */ /* @@ -52,6 +52,7 @@ extern struct sockaddr_in6 sin6_siteloca #define DEF_ADVCURHOPLIMIT 64 #define DEF_ADVVALIDLIFETIME 2592000 #define DEF_ADVPREFERREDLIFETIME 604800 +#define DEF_ADVROUTERLIFETIME 1800 #define MAXROUTERLIFETIME 9000 #define MIN_MAXINTERVAL 4
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Mon Feb 27 01:33:21 UTC 2017 Modified Files: src/sys/dev/pci: pcidevs Log Message: Add some NVIDIA devices. To generate a diff of this commit: cvs rdiff -u -r1.1279 -r1.1280 src/sys/dev/pci/pcidevs 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/pci/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1279 src/sys/dev/pci/pcidevs:1.1280 --- src/sys/dev/pci/pcidevs:1.1279 Mon Jan 16 04:44:38 2017 +++ src/sys/dev/pci/pcidevs Mon Feb 27 01:33:21 2017 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1279 2017/01/16 04:44:38 msaitoh Exp $ +$NetBSD: pcidevs,v 1.1280 2017/02/27 01:33:21 msaitoh Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -5462,6 +5462,7 @@ product NVIDIA GEFORCE_8800_GT 0x0611 Ge product NVIDIA GEFORCE_9800_GT 0x0614 GeForce 9800 GT product NVIDIA GEFORCE_9600_GT 0x0622 GeForce 9600 GT product NVIDIA GEFORCE_9500_GT 0x0640 GeForce 9500 GT +product NVIDIA TESLA_M2050 0x06de GF100GL (Tesla M2050) product NVIDIA GEFORCE_9300_GE_1 0x06e0 GeForce 9300 GE product NVIDIA GEFORCE8400GS 0x06e4 GeForce 8400 GS product NVIDIA GEFORCE9300M_GS 0x06e9 GeForce 9300M GS @@ -5527,6 +5528,9 @@ product NVIDIA MCP77_AHCI_10 0x0ad9 nFor product NVIDIA MCP77_AHCI_11 0x0ada nForce MCP77 AHCI Controller product NVIDIA MCP77_AHCI_12 0x0adb nForce MCP77 AHCI Controller product NVIDIA GEFORCE_210_HDA 0x0be3 GeForce 210 High Definition Audio Controller +product NVIDIA GF100_HDA 0x0be5 GF100 HD Audio +product NVIDIA GF108_HDA 0x0bea GF108 HD Audio +product NVIDIA GF116_HDA 0x0bee GF116 HD Audio product NVIDIA GF_GT640M 0x0fd2 GeForce GT 640M product NVIDIA GT520 0x1040 GeForce GT 520 product NVIDIA GEFORCE_510 0x1042 GeForce 510
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jdolecek Date: Sun Feb 26 23:30:14 UTC 2017 Modified Files: src/sys/dev/ic: bha.c bhareg.h Log Message: got 'bad mbi comp_stat 5' during DIOCGCACHE under Parallels, according to linux driver it's possible status when controller thinks the CCB is invalid; handle same as BHA_MBI_ABORT/BHA_MBI_UNKNOWN i.e. just clear the CCB anyway To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/sys/dev/ic/bha.c cvs rdiff -u -r1.20 -r1.21 src/sys/dev/ic/bhareg.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/ic/bha.c diff -u src/sys/dev/ic/bha.c:1.76 src/sys/dev/ic/bha.c:1.77 --- src/sys/dev/ic/bha.c:1.76 Thu Jul 14 04:19:27 2016 +++ src/sys/dev/ic/bha.c Sun Feb 26 23:30:14 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: bha.c,v 1.76 2016/07/14 04:19:27 msaitoh Exp $ */ +/* $NetBSD: bha.c,v 1.77 2017/02/26 23:30:14 jdolecek Exp $ */ /*- * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bha.c,v 1.76 2016/07/14 04:19:27 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bha.c,v 1.77 2017/02/26 23:30:14 jdolecek Exp $"); #include "opt_ddb.h" @@ -1574,6 +1574,7 @@ bha_finish_ccbs(struct bha_softc *sc) case BHA_MBI_ABORT: case BHA_MBI_UNKNOWN: + case BHA_MBI_BADCCB: /* * Even if the CCB wasn't found, we clear it anyway. * See preceding comment. Index: src/sys/dev/ic/bhareg.h diff -u src/sys/dev/ic/bhareg.h:1.20 src/sys/dev/ic/bhareg.h:1.21 --- src/sys/dev/ic/bhareg.h:1.20 Mon Apr 28 20:23:49 2008 +++ src/sys/dev/ic/bhareg.h Sun Feb 26 23:30:14 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: bhareg.h,v 1.20 2008/04/28 20:23:49 martin Exp $ */ +/* $NetBSD: bhareg.h,v 1.21 2017/02/26 23:30:14 jdolecek Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -166,6 +166,7 @@ struct bha_mbx_in { #define BHA_MBI_ABORT 0x2 /* aborted ccb */ #define BHA_MBI_UNKNOWN 0x3 /* Tried to abort invalid CCB */ #define BHA_MBI_ERROR 0x4 /* Completed with error */ +#define BHA_MBI_BADCCB 0x5 /* invalid CCB */ #if defined(BIG_DMA) WARNING...THIS WON'T WORK(won't fit on 1 page)
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jdolecek Date: Sun Feb 26 23:06:36 UTC 2017 Modified Files: src/sys/dev/ic: ld_icp.c Log Message: mark local functions static, similar to other ld(4) attachments To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/dev/ic/ld_icp.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/ic/ld_icp.c diff -u src/sys/dev/ic/ld_icp.c:1.29 src/sys/dev/ic/ld_icp.c:1.30 --- src/sys/dev/ic/ld_icp.c:1.29 Tue Sep 27 03:33:32 2016 +++ src/sys/dev/ic/ld_icp.c Sun Feb 26 23:06:36 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ld_icp.c,v 1.29 2016/09/27 03:33:32 pgoyette Exp $ */ +/* $NetBSD: ld_icp.c,v 1.30 2017/02/26 23:06:36 jdolecek Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ld_icp.c,v 1.29 2016/09/27 03:33:32 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ld_icp.c,v 1.30 2017/02/26 23:06:36 jdolecek Exp $"); #include #include @@ -60,17 +60,17 @@ struct ld_icp_softc { int sc_hwunit; }; -void ld_icp_attach(device_t, device_t, void *); -int ld_icp_detach(device_t, int); -int ld_icp_dobio(struct ld_icp_softc *, void *, int, int, int, +static void ld_icp_attach(device_t, device_t, void *); +static int ld_icp_detach(device_t, int); +static int ld_icp_dobio(struct ld_icp_softc *, void *, int, int, int, struct buf *); -int ld_icp_dump(struct ld_softc *, void *, int, int); -int ld_icp_flush(struct ld_softc *, int); -void ld_icp_intr(struct icp_ccb *); -int ld_icp_match(device_t, cfdata_t, void *); -int ld_icp_start(struct ld_softc *, struct buf *); +static int ld_icp_dump(struct ld_softc *, void *, int, int); +static int ld_icp_flush(struct ld_softc *, int); +static void ld_icp_intr(struct icp_ccb *); +static int ld_icp_match(device_t, cfdata_t, void *); +static int ld_icp_start(struct ld_softc *, struct buf *); -void ld_icp_adjqparam(device_t, int); +static void ld_icp_adjqparam(device_t, int); CFATTACH_DECL_NEW(ld_icp, sizeof(struct ld_icp_softc), ld_icp_match, ld_icp_attach, ld_icp_detach, NULL); @@ -79,7 +79,7 @@ static const struct icp_servicecb ld_icp ld_icp_adjqparam, }; -int +static int ld_icp_match(device_t parent, cfdata_t match, void *aux) { struct icp_attach_args *icpa; @@ -89,7 +89,7 @@ ld_icp_match(device_t parent, cfdata_t m return (icpa->icpa_unit < ICPA_UNIT_SCSI); } -void +static void ld_icp_attach(device_t parent, device_t self, void *aux) { struct icp_attach_args *icpa = aux; @@ -163,7 +163,7 @@ ld_icp_attach(device_t parent, device_t ldattach(ld, BUFQ_DISK_DEFAULT_STRAT); } -int +static int ld_icp_detach(device_t dv, int flags) { int rv; @@ -175,7 +175,7 @@ ld_icp_detach(device_t dv, int flags) return (0); } -int +static int ld_icp_dobio(struct ld_icp_softc *sc, void *data, int datasize, int blkno, int dowrite, struct buf *bp) { @@ -238,7 +238,7 @@ ld_icp_dobio(struct ld_icp_softc *sc, vo return (rv); } -int +static int ld_icp_start(struct ld_softc *ld, struct buf *bp) { @@ -246,7 +246,7 @@ ld_icp_start(struct ld_softc *ld, struct bp->b_bcount, bp->b_rawblkno, (bp->b_flags & B_READ) == 0, bp)); } -int +static int ld_icp_dump(struct ld_softc *ld, void *data, int blkno, int blkcnt) { @@ -254,7 +254,7 @@ ld_icp_dump(struct ld_softc *ld, void *d blkcnt * ld->sc_secsize, blkno, 1, NULL)); } -int +static int ld_icp_flush(struct ld_softc *ld, int flags) { struct ld_icp_softc *sc; @@ -285,7 +285,7 @@ ld_icp_flush(struct ld_softc *ld, int fl return (rv); } -void +static void ld_icp_intr(struct icp_ccb *ic) { struct buf *bp; @@ -321,7 +321,7 @@ ld_icp_intr(struct icp_ccb *ic) lddone(>sc_ld, bp); } -void +static void ld_icp_adjqparam(device_t dv, int openings) {
CVS commit: src/usr.sbin/wakeonlan
Module Name:src Committed By: wiz Date: Sun Feb 26 22:18:58 UTC 2017 Modified Files: src/usr.sbin/wakeonlan: wakeonlan.8 Log Message: Fix Dd argument. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/wakeonlan/wakeonlan.8 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/wakeonlan/wakeonlan.8 diff -u src/usr.sbin/wakeonlan/wakeonlan.8:1.2 src/usr.sbin/wakeonlan/wakeonlan.8:1.3 --- src/usr.sbin/wakeonlan/wakeonlan.8:1.2 Sun Feb 26 19:58:38 2017 +++ src/usr.sbin/wakeonlan/wakeonlan.8 Sun Feb 26 22:18:58 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: wakeonlan.8,v 1.2 2017/02/26 19:58:38 mbalmer Exp $ +.\" $NetBSD: wakeonlan.8,v 1.3 2017/02/26 22:18:58 wiz Exp $ .\" .\" Copyright (c) 2009 - 2017 Marc Balmer.\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd Feb 26, 2017 +.Dd February 26, 2017 .Dt WAKEONLAN 8 .Os .Sh NAME
CVS commit: src/usr.sbin/wakeonlan
Module Name:src Committed By: mbalmer Date: Sun Feb 26 19:58:38 UTC 2017 Modified Files: src/usr.sbin/wakeonlan: wakeonlan.8 Log Message: shorten hardware address wording To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/wakeonlan/wakeonlan.8 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/wakeonlan/wakeonlan.8 diff -u src/usr.sbin/wakeonlan/wakeonlan.8:1.1 src/usr.sbin/wakeonlan/wakeonlan.8:1.2 --- src/usr.sbin/wakeonlan/wakeonlan.8:1.1 Sat May 26 01:58:20 2012 +++ src/usr.sbin/wakeonlan/wakeonlan.8 Sun Feb 26 19:58:38 2017 @@ -1,6 +1,6 @@ -.\" $NetBSD: wakeonlan.8,v 1.1 2012/05/26 01:58:20 uebayasi Exp $ +.\" $NetBSD: wakeonlan.8,v 1.2 2017/02/26 19:58:38 mbalmer Exp $ .\" -.\" Copyright (c) 2009, 2010 Marc Balmer+.\" Copyright (c) 2009 - 2017 Marc Balmer .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd May 25, 2012 +.Dd Feb 26, 2017 .Dt WAKEONLAN 8 .Os .Sh NAME @@ -43,8 +43,7 @@ If there is only one Ethernet device ava argument can be omitted. .Ar lladdr is the link layer address of the remote machine. -This can be specified as the actual hardware address -(six hexadecimal numbers separated by colons) +This can be specified as a hardware address or as a hostname entry in .Pa /etc/ethers . .Nm
CVS commit: src/sys/dev
Module Name:src Committed By: riastradh Date: Sun Feb 26 16:22:55 UTC 2017 Modified Files: src/sys/dev: audio.c Log Message: Paranoia: parenthesize macro operands. Should be no functional change, based on how these macros are used in this file. To generate a diff of this commit: cvs rdiff -u -r1.311 -r1.312 src/sys/dev/audio.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/audio.c diff -u src/sys/dev/audio.c:1.311 src/sys/dev/audio.c:1.312 --- src/sys/dev/audio.c:1.311 Fri Feb 24 16:53:24 2017 +++ src/sys/dev/audio.c Sun Feb 26 16:22:55 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: audio.c,v 1.311 2017/02/24 16:53:24 nat Exp $ */ +/* $NetBSD: audio.c,v 1.312 2017/02/26 16:22:55 riastradh Exp $ */ /*- * Copyright (c) 2016 Nathanial Sloss@@ -148,7 +148,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.311 2017/02/24 16:53:24 nat Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.312 2017/02/26 16:22:55 riastradh Exp $"); #include "audio.h" #if NAUDIO > 0 @@ -197,19 +197,19 @@ int audiodebug = AUDIO_DEBUG; #define DPRINTFN(n,x) #endif -#define ROUNDSIZE(x) x &= -16 /* round to nice boundary */ -#define SPECIFIED(x) (x != ~0) -#define SPECIFIED_CH(x) (x != (u_char)~0) +#define ROUNDSIZE(x) (x) &= -16 /* round to nice boundary */ +#define SPECIFIED(x) ((x) != ~0) +#define SPECIFIED_CH(x) ((x) != (u_char)~0) /* #define AUDIO_PM_IDLE */ #ifdef AUDIO_PM_IDLE int audio_idle_timeout = 30; #endif -#define HW_LOCK(x) if (x == SIMPLEQ_FIRST(>sc_audiochan)->vc) \ +#define HW_LOCK(x) if ((x) == SIMPLEQ_FIRST(>sc_audiochan)->vc) \ mutex_enter(sc->sc_intr_lock); -#define HW_UNLOCK(x) if (x == SIMPLEQ_FIRST(>sc_audiochan)->vc) \ +#define HW_UNLOCK(x) if ((x) == SIMPLEQ_FIRST(>sc_audiochan)->vc) \ mutex_exit(sc->sc_intr_lock); int audio_blk_ms = AUDIO_BLK_MS;
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Sun Feb 26 15:44:16 UTC 2017 Modified Files: src/share/man/man9: kauth.9 Log Message: Clarify that kauth_cred_get doesn't modify with reference count. To generate a diff of this commit: cvs rdiff -u -r1.105 -r1.106 src/share/man/man9/kauth.9 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/man9/kauth.9 diff -u src/share/man/man9/kauth.9:1.105 src/share/man/man9/kauth.9:1.106 --- src/share/man/man9/kauth.9:1.105 Tue Mar 18 18:20:40 2014 +++ src/share/man/man9/kauth.9 Sun Feb 26 15:44:15 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: kauth.9,v 1.105 2014/03/18 18:20:40 riastradh Exp $ +.\" $NetBSD: kauth.9,v 1.106 2017/02/26 15:44:15 riastradh Exp $ .\" .\" Copyright (c) 2005, 2006 Elad Efrat.\" All rights reserved. @@ -1879,6 +1879,9 @@ for will be done. .It Ft kauth_cred_t Fn kauth_cred_get "void" Return the credentials associated with the current LWP. +This does not change the reference count of the resulting +.Ft kauth_cred_t +object. .El .Ss Scope Management .Nm
CVS commit: src/sys/arch
Module Name:src Committed By: rin Date: Sun Feb 26 12:41:50 UTC 2017 Modified Files: src/sys/arch/amd64/conf: GENERIC XEN3_DOM0 XEN3_DOMU src/sys/arch/i386/conf: GENERIC XEN3_DOM0 XEN3_DOMU Log Message: Comment out DISKLABEL_RDB as it is too specific for general usage. (Also add commented out that entry for GENERIC on amd64; I forgot it) To generate a diff of this commit: cvs rdiff -u -r1.453 -r1.454 src/sys/arch/amd64/conf/GENERIC cvs rdiff -u -r1.131 -r1.132 src/sys/arch/amd64/conf/XEN3_DOM0 cvs rdiff -u -r1.72 -r1.73 src/sys/arch/amd64/conf/XEN3_DOMU cvs rdiff -u -r1.1151 -r1.1152 src/sys/arch/i386/conf/GENERIC cvs rdiff -u -r1.109 -r1.110 src/sys/arch/i386/conf/XEN3_DOM0 cvs rdiff -u -r1.75 -r1.76 src/sys/arch/i386/conf/XEN3_DOMU 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/conf/GENERIC diff -u src/sys/arch/amd64/conf/GENERIC:1.453 src/sys/arch/amd64/conf/GENERIC:1.454 --- src/sys/arch/amd64/conf/GENERIC:1.453 Sun Feb 26 12:21:14 2017 +++ src/sys/arch/amd64/conf/GENERIC Sun Feb 26 12:41:50 2017 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.453 2017/02/26 12:21:14 maya Exp $ +# $NetBSD: GENERIC,v 1.454 2017/02/26 12:41:50 rin Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/amd64/conf/std.amd64" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.453 $" +#ident "GENERIC-$Revision: 1.454 $" maxusers 64 # estimated number of users @@ -143,6 +143,7 @@ options DKWEDGE_METHOD_GPT # Supports G #options DKWEDGE_METHOD_BSDLABEL # Support disklabel entries as wedges #options DKWEDGE_METHOD_MBR # Support MBR partitions as wedges options DKWEDGE_METHOD_APPLE # Support Apple partitions as wedges +#options DKWEDGE_METHOD_RDB # Support RDB partitions as wedges # File systems file-system FFS # UFS Index: src/sys/arch/amd64/conf/XEN3_DOM0 diff -u src/sys/arch/amd64/conf/XEN3_DOM0:1.131 src/sys/arch/amd64/conf/XEN3_DOM0:1.132 --- src/sys/arch/amd64/conf/XEN3_DOM0:1.131 Sun Feb 26 12:21:14 2017 +++ src/sys/arch/amd64/conf/XEN3_DOM0 Sun Feb 26 12:41:50 2017 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOM0,v 1.131 2017/02/26 12:21:14 maya Exp $ +# $NetBSD: XEN3_DOM0,v 1.132 2017/02/26 12:41:50 rin Exp $ include "arch/amd64/conf/std.xen" @@ -86,7 +86,7 @@ options DKWEDGE_METHOD_GPT # Supports G #options DKWEDGE_METHOD_BSDLABEL # Support disklabel entries as wedges #options DKWEDGE_METHOD_MBR # Support MBR partitions as wedges options DKWEDGE_METHOD_APPLE # Support Apple partitions as wedges -options DKWEDGE_METHOD_RDB # Support RDB partitions as wedges +#options DKWEDGE_METHOD_RDB # Support RDB partitions as wedges # File systems file-system FFS # UFS Index: src/sys/arch/amd64/conf/XEN3_DOMU diff -u src/sys/arch/amd64/conf/XEN3_DOMU:1.72 src/sys/arch/amd64/conf/XEN3_DOMU:1.73 --- src/sys/arch/amd64/conf/XEN3_DOMU:1.72 Sun Feb 26 12:21:14 2017 +++ src/sys/arch/amd64/conf/XEN3_DOMU Sun Feb 26 12:41:50 2017 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOMU,v 1.72 2017/02/26 12:21:14 maya Exp $ +# $NetBSD: XEN3_DOMU,v 1.73 2017/02/26 12:41:50 rin Exp $ include "arch/amd64/conf/std.xen" @@ -78,7 +78,7 @@ options DKWEDGE_METHOD_GPT # Supports G #options DKWEDGE_METHOD_BSDLABEL # Support disklabel entries as wedges #options DKWEDGE_METHOD_MBR # Support MBR partitions as wedges options DKWEDGE_METHOD_APPLE # Support Apple partitions as wedges -options DKWEDGE_METHOD_RDB # Support RDB partitions as wedges +#options DKWEDGE_METHOD_RDB # Support RDB partitions as wedges # File systems file-system FFS # UFS Index: src/sys/arch/i386/conf/GENERIC diff -u src/sys/arch/i386/conf/GENERIC:1.1151 src/sys/arch/i386/conf/GENERIC:1.1152 --- src/sys/arch/i386/conf/GENERIC:1.1151 Sun Feb 26 12:21:15 2017 +++ src/sys/arch/i386/conf/GENERIC Sun Feb 26 12:41:50 2017 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.1151 2017/02/26 12:21:15 maya Exp $ +# $NetBSD: GENERIC,v 1.1152 2017/02/26 12:41:50 rin Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/i386/conf/std.i386" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.1151 $" +#ident "GENERIC-$Revision: 1.1152 $" maxusers 64 # estimated number of users @@ -157,7 +157,7 @@ options DKWEDGE_METHOD_GPT # Supports G #options DKWEDGE_METHOD_BSDLABEL # Support disklabel entries as wedges #options DKWEDGE_METHOD_MBR # Support MBR partitions as wedges options DKWEDGE_METHOD_APPLE # Support Apple partitions as wedges -options DKWEDGE_METHOD_RDB # Support RDB partitions as wedges +#options DKWEDGE_METHOD_RDB # Support RDB partitions as wedges file-system FFS # UFS file-system NFS # Network File System client Index: src/sys/arch/i386/conf/XEN3_DOM0 diff -u src/sys/arch/i386/conf/XEN3_DOM0:1.109 src/sys/arch/i386/conf/XEN3_DOM0:1.110 ---
CVS commit: src/sys/arch
Module Name:src Committed By: maya Date: Sun Feb 26 12:21:15 UTC 2017 Modified Files: src/sys/arch/amd64/conf: GENERIC XEN3_DOM0 XEN3_DOMU src/sys/arch/i386/conf: GENERIC GENERIC_PS2TINY GENERIC_TINY INSTALL_FLOPPY INSTALL_TINY NET4501 XEN3_DOM0 XEN3_DOMU src/sys/arch/riscv/conf: GENERIC Log Message: Remove commented DISKLABEL_EI for strictly little endian architectures It will never be useful. To generate a diff of this commit: cvs rdiff -u -r1.452 -r1.453 src/sys/arch/amd64/conf/GENERIC cvs rdiff -u -r1.130 -r1.131 src/sys/arch/amd64/conf/XEN3_DOM0 cvs rdiff -u -r1.71 -r1.72 src/sys/arch/amd64/conf/XEN3_DOMU cvs rdiff -u -r1.1150 -r1.1151 src/sys/arch/i386/conf/GENERIC cvs rdiff -u -r1.76 -r1.77 src/sys/arch/i386/conf/GENERIC_PS2TINY cvs rdiff -u -r1.148 -r1.149 src/sys/arch/i386/conf/GENERIC_TINY cvs rdiff -u -r1.36 -r1.37 src/sys/arch/i386/conf/INSTALL_FLOPPY cvs rdiff -u -r1.149 -r1.150 src/sys/arch/i386/conf/INSTALL_TINY cvs rdiff -u -r1.91 -r1.92 src/sys/arch/i386/conf/NET4501 cvs rdiff -u -r1.108 -r1.109 src/sys/arch/i386/conf/XEN3_DOM0 cvs rdiff -u -r1.74 -r1.75 src/sys/arch/i386/conf/XEN3_DOMU cvs rdiff -u -r1.5 -r1.6 src/sys/arch/riscv/conf/GENERIC 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/conf/GENERIC diff -u src/sys/arch/amd64/conf/GENERIC:1.452 src/sys/arch/amd64/conf/GENERIC:1.453 --- src/sys/arch/amd64/conf/GENERIC:1.452 Sun Feb 19 07:46:59 2017 +++ src/sys/arch/amd64/conf/GENERIC Sun Feb 26 12:21:14 2017 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.452 2017/02/19 07:46:59 rin Exp $ +# $NetBSD: GENERIC,v 1.453 2017/02/26 12:21:14 maya Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/amd64/conf/std.amd64" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.452 $" +#ident "GENERIC-$Revision: 1.453 $" maxusers 64 # estimated number of users @@ -172,7 +172,6 @@ file-system PTYFS # /dev/ptm support # File system options options QUOTA # legacy UFS quotas options QUOTA2 # new, in-filesystem UFS quotas -#options DISKLABEL_EI # disklabel Endian Independent support options FFS_EI # FFS Endian Independent support options WAPBL # File system journaling support # Note that UFS_DIRHASH is suspected of causing kernel memory corruption. Index: src/sys/arch/amd64/conf/XEN3_DOM0 diff -u src/sys/arch/amd64/conf/XEN3_DOM0:1.130 src/sys/arch/amd64/conf/XEN3_DOM0:1.131 --- src/sys/arch/amd64/conf/XEN3_DOM0:1.130 Sun Feb 26 12:03:14 2017 +++ src/sys/arch/amd64/conf/XEN3_DOM0 Sun Feb 26 12:21:14 2017 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOM0,v 1.130 2017/02/26 12:03:14 rin Exp $ +# $NetBSD: XEN3_DOM0,v 1.131 2017/02/26 12:21:14 maya Exp $ include "arch/amd64/conf/std.xen" @@ -113,7 +113,6 @@ file-system TMPFS # Efficient memory fi # File system options options QUOTA # legacy UFS quotas options QUOTA2 # new, in-filesystem UFS quotas -#options DISKLABEL_EI # disklabel Endian Independent support #options FFS_EI # FFS Endian Independent support options WAPBL # File system journaling support #options UFS_DIRHASH # UFS Large Directory Hashing - Experimental Index: src/sys/arch/amd64/conf/XEN3_DOMU diff -u src/sys/arch/amd64/conf/XEN3_DOMU:1.71 src/sys/arch/amd64/conf/XEN3_DOMU:1.72 --- src/sys/arch/amd64/conf/XEN3_DOMU:1.71 Sun Feb 26 12:03:14 2017 +++ src/sys/arch/amd64/conf/XEN3_DOMU Sun Feb 26 12:21:14 2017 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOMU,v 1.71 2017/02/26 12:03:14 rin Exp $ +# $NetBSD: XEN3_DOMU,v 1.72 2017/02/26 12:21:14 maya Exp $ include "arch/amd64/conf/std.xen" @@ -105,7 +105,6 @@ file-system TMPFS # Efficient memory fi # File system options options QUOTA # legacy UFS quotas options QUOTA2 # new, in-filesystem UFS quotas -#options DISKLABEL_EI # disklabel Endian Independent support #options FFS_EI # FFS Endian Independent support options WAPBL # File system journaling support #options UFS_DIRHASH # UFS Large Directory Hashing - Experimental Index: src/sys/arch/i386/conf/GENERIC diff -u src/sys/arch/i386/conf/GENERIC:1.1150 src/sys/arch/i386/conf/GENERIC:1.1151 --- src/sys/arch/i386/conf/GENERIC:1.1150 Sun Feb 26 12:03:14 2017 +++ src/sys/arch/i386/conf/GENERIC Sun Feb 26 12:21:15 2017 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.1150 2017/02/26 12:03:14 rin Exp $ +# $NetBSD: GENERIC,v 1.1151 2017/02/26 12:21:15 maya Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/i386/conf/std.i386" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.1150 $" +#ident "GENERIC-$Revision: 1.1151 $" maxusers 64 # estimated number of users @@ -187,7 +187,6 @@ file-system TMPFS # Efficient memory fi # File system options options QUOTA # legacy UFS quotas options QUOTA2 # new, in-filesystem UFS quotas -#options DISKLABEL_EI #
CVS commit: src/doc
Module Name:src Committed By: rin Date: Sun Feb 26 12:06:40 UTC 2017 Modified Files: src/doc: CHANGES Log Message: add DKWEDGE_METHOD_RDB To generate a diff of this commit: cvs rdiff -u -r1.2256 -r1.2257 src/doc/CHANGES 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 diff -u src/doc/CHANGES:1.2256 src/doc/CHANGES:1.2257 --- src/doc/CHANGES:1.2256 Sun Feb 19 07:48:07 2017 +++ src/doc/CHANGES Sun Feb 26 12:06:40 2017 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2256 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2257 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -476,3 +476,5 @@ Changes from NetBSD 7.0 to NetBSD 8.0: disklabel(5): Add DISKLABEL_EI (``Endian-Independent'' disklabel) kernel option to machines that support Master Boot Record (MBR). [rin 20170219] + dk(4): Add DKWEDGE_METHOD_RDB option to enable Amiga Rigid Disk Block + (RDB) partitioning detection method. [rin 20170226]
CVS commit: src/sys/arch
Module Name:src Committed By: rin Date: Sun Feb 26 12:03:15 UTC 2017 Modified Files: src/sys/arch/amd64/conf: ALL XEN3_DOM0 XEN3_DOMU src/sys/arch/evbarm/conf: ARMADILLO-IOT-G3 src/sys/arch/i386/conf: ALL GENERIC XEN3_DOM0 XEN3_DOMU src/sys/arch/macppc/conf: GENERIC GENERIC_601 src/sys/arch/ofppc/conf: GENERIC src/sys/arch/riscv/conf: GENERIC src/sys/arch/sandpoint/conf: GENERIC src/sys/arch/zaurus/conf: GENERIC Log Message: Add DKWEDGE_METHOD_RDB option, which is enabled for x86, commented out for other platforms by default. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/arch/amd64/conf/ALL cvs rdiff -u -r1.129 -r1.130 src/sys/arch/amd64/conf/XEN3_DOM0 cvs rdiff -u -r1.70 -r1.71 src/sys/arch/amd64/conf/XEN3_DOMU cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbarm/conf/ARMADILLO-IOT-G3 cvs rdiff -u -r1.413 -r1.414 src/sys/arch/i386/conf/ALL cvs rdiff -u -r1.1149 -r1.1150 src/sys/arch/i386/conf/GENERIC cvs rdiff -u -r1.107 -r1.108 src/sys/arch/i386/conf/XEN3_DOM0 cvs rdiff -u -r1.73 -r1.74 src/sys/arch/i386/conf/XEN3_DOMU cvs rdiff -u -r1.327 -r1.328 src/sys/arch/macppc/conf/GENERIC cvs rdiff -u -r1.11 -r1.12 src/sys/arch/macppc/conf/GENERIC_601 cvs rdiff -u -r1.161 -r1.162 src/sys/arch/ofppc/conf/GENERIC cvs rdiff -u -r1.4 -r1.5 src/sys/arch/riscv/conf/GENERIC cvs rdiff -u -r1.92 -r1.93 src/sys/arch/sandpoint/conf/GENERIC cvs rdiff -u -r1.71 -r1.72 src/sys/arch/zaurus/conf/GENERIC 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/conf/ALL diff -u src/sys/arch/amd64/conf/ALL:1.52 src/sys/arch/amd64/conf/ALL:1.53 --- src/sys/arch/amd64/conf/ALL:1.52 Sun Feb 19 07:46:59 2017 +++ src/sys/arch/amd64/conf/ALL Sun Feb 26 12:03:14 2017 @@ -1,4 +1,4 @@ -# $NetBSD: ALL,v 1.52 2017/02/19 07:46:59 rin Exp $ +# $NetBSD: ALL,v 1.53 2017/02/26 12:03:14 rin Exp $ # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp # # ALL machine description file @@ -17,7 +17,7 @@ include "arch/amd64/conf/std.amd64" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "ALL-$Revision: 1.52 $" +#ident "ALL-$Revision: 1.53 $" maxusers 64 # estimated number of users @@ -163,6 +163,7 @@ options DKWEDGE_METHOD_GPT # Supports G #options DKWEDGE_METHOD_BSDLABEL # Support disklabel entries as wedges #options DKWEDGE_METHOD_MBR # Support MBR partitions as wedges options DKWEDGE_METHOD_APPLE # Support Apple partitions as wedges +options DKWEDGE_METHOD_RDB # Support RDB partitions as wedges # File systems file-system FFS # UFS Index: src/sys/arch/amd64/conf/XEN3_DOM0 diff -u src/sys/arch/amd64/conf/XEN3_DOM0:1.129 src/sys/arch/amd64/conf/XEN3_DOM0:1.130 --- src/sys/arch/amd64/conf/XEN3_DOM0:1.129 Sun Feb 19 07:46:59 2017 +++ src/sys/arch/amd64/conf/XEN3_DOM0 Sun Feb 26 12:03:14 2017 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOM0,v 1.129 2017/02/19 07:46:59 rin Exp $ +# $NetBSD: XEN3_DOM0,v 1.130 2017/02/26 12:03:14 rin Exp $ include "arch/amd64/conf/std.xen" @@ -86,6 +86,7 @@ options DKWEDGE_METHOD_GPT # Supports G #options DKWEDGE_METHOD_BSDLABEL # Support disklabel entries as wedges #options DKWEDGE_METHOD_MBR # Support MBR partitions as wedges options DKWEDGE_METHOD_APPLE # Support Apple partitions as wedges +options DKWEDGE_METHOD_RDB # Support RDB partitions as wedges # File systems file-system FFS # UFS Index: src/sys/arch/amd64/conf/XEN3_DOMU diff -u src/sys/arch/amd64/conf/XEN3_DOMU:1.70 src/sys/arch/amd64/conf/XEN3_DOMU:1.71 --- src/sys/arch/amd64/conf/XEN3_DOMU:1.70 Sun Feb 19 07:46:59 2017 +++ src/sys/arch/amd64/conf/XEN3_DOMU Sun Feb 26 12:03:14 2017 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOMU,v 1.70 2017/02/19 07:46:59 rin Exp $ +# $NetBSD: XEN3_DOMU,v 1.71 2017/02/26 12:03:14 rin Exp $ include "arch/amd64/conf/std.xen" @@ -78,6 +78,7 @@ options DKWEDGE_METHOD_GPT # Supports G #options DKWEDGE_METHOD_BSDLABEL # Support disklabel entries as wedges #options DKWEDGE_METHOD_MBR # Support MBR partitions as wedges options DKWEDGE_METHOD_APPLE # Support Apple partitions as wedges +options DKWEDGE_METHOD_RDB # Support RDB partitions as wedges # File systems file-system FFS # UFS Index: src/sys/arch/evbarm/conf/ARMADILLO-IOT-G3 diff -u src/sys/arch/evbarm/conf/ARMADILLO-IOT-G3:1.5 src/sys/arch/evbarm/conf/ARMADILLO-IOT-G3:1.6 --- src/sys/arch/evbarm/conf/ARMADILLO-IOT-G3:1.5 Sun Feb 19 07:47:00 2017 +++ src/sys/arch/evbarm/conf/ARMADILLO-IOT-G3 Sun Feb 26 12:03:14 2017 @@ -1,4 +1,4 @@ -# $NetBSD: ARMADILLO-IOT-G3,v 1.5 2017/02/19 07:47:00 rin Exp $ +# $NetBSD: ARMADILLO-IOT-G3,v 1.6 2017/02/26 12:03:14 rin Exp $ # # ARMADILLO-IOT-G3 -- Atmark Techno, Armadillo-IoT G3 # @@ -103,6 +103,7 @@ options DKWEDGE_METHOD_GPT # Supports G #options DKWEDGE_METHOD_BSDLABEL # Support disklabel entries as wedges #options DKWEDGE_METHOD_MBR # Support MBR partitions
CVS commit: src
Module Name:src Committed By: rin Date: Sun Feb 26 11:56:49 UTC 2017 Modified Files: src/share/man/man4: dk.4 src/sys/conf: files src/sys/dev: files.dev Added Files: src/sys/dev/dkwedge: dkwedge_rdb.c Log Message: Add DKWEDGE_METHOD_RDB option, which is Amiga Rigid Disk Block (RDB) partitioning detection method for dk(4). To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/share/man/man4/dk.4 cvs rdiff -u -r1.1170 -r1.1171 src/sys/conf/files cvs rdiff -u -r1.2 -r1.3 src/sys/dev/files.dev cvs rdiff -u -r0 -r1.1 src/sys/dev/dkwedge/dkwedge_rdb.c 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/man4/dk.4 diff -u src/share/man/man4/dk.4:1.6 src/share/man/man4/dk.4:1.7 --- src/share/man/man4/dk.4:1.6 Fri Jul 13 22:58:45 2012 +++ src/share/man/man4/dk.4 Sun Feb 26 11:56:49 2017 @@ -1,4 +1,4 @@ -.\" $NetBSD: dk.4,v 1.6 2012/07/13 22:58:45 abs Exp $ +.\" $NetBSD: dk.4,v 1.7 2017/02/26 11:56:49 rin Exp $ .\" .\" Copyright (c) 2006 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -29,7 +29,7 @@ .\" .\" Jonathan A. Kollasch used vnd(4) as the template for this man page. .\" -.Dd May 19, 2010 +.Dd February 26, 2017 .Dt DK 4 .Os .Sh NAME @@ -42,6 +42,7 @@ driver .Cd "options DKWEDGE_METHOD_BSDLABEL" .Cd "options DKWEDGE_METHOD_GPT" .Cd "options DKWEDGE_METHOD_MBR" +.Cd "options DKWEDGE_METHOD_RDB" .Sh DESCRIPTION The .Nm @@ -63,6 +64,8 @@ Extensible Firmware Interface Globally U .It Dv DKWEDGE_METHOD_MBR IBM PC-compatible Master Boot Record (MBR) partitioning detection method, with support for Extended MBRs. +.It Dv DKWEDGE_METHOD_RDB +Amiga Rigid Disk Block (RDB) partitioning detection method. .El .Sh FILES .Bl -tag -width /dev/XXrXdkX -compact Index: src/sys/conf/files diff -u src/sys/conf/files:1.1170 src/sys/conf/files:1.1171 --- src/sys/conf/files:1.1170 Thu Feb 16 08:12:43 2017 +++ src/sys/conf/files Sun Feb 26 11:56:49 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files,v 1.1170 2017/02/16 08:12:43 knakahara Exp $ +# $NetBSD: files,v 1.1171 2017/02/26 11:56:49 rin Exp $ # @(#)files.newconf 7.5 (Berkeley) 5/10/93 version 20150846 @@ -90,6 +90,7 @@ defflag opt_dkwedge.h DKWEDGE_AUTODISCO DKWEDGE_METHOD_GPT DKWEDGE_METHOD_MBR DKWEDGE_METHOD_APPLE +DKWEDGE_METHOD_RDB defflag opt_veriexec.h VERIFIED_EXEC_FP_SHA1 VERIFIED_EXEC_FP_SHA256 Index: src/sys/dev/files.dev diff -u src/sys/dev/files.dev:1.2 src/sys/dev/files.dev:1.3 --- src/sys/dev/files.dev:1.2 Sat Dec 10 10:26:38 2016 +++ src/sys/dev/files.dev Sun Feb 26 11:56:49 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files.dev,v 1.2 2016/12/10 10:26:38 mlelstv Exp $ +# $NetBSD: files.dev,v 1.3 2017/02/26 11:56:49 rin Exp $ file dev/bio.c bio needs-flag file dev/ccd.c ccd @@ -12,6 +12,7 @@ file dev/dkwedge/dkwedge_apple.c dkwedge file dev/dkwedge/dkwedge_bsdlabel.c dkwedge_method_bsdlabel file dev/dkwedge/dkwedge_gpt.c dkwedge_method_gpt file dev/dkwedge/dkwedge_mbr.c dkwedge_method_mbr +file dev/dkwedge/dkwedge_rdb.c dkwedge_method_rdb file dev/firmload.c firmload file dev/fss.c fss file dev/keylock.c keylock Added files: Index: src/sys/dev/dkwedge/dkwedge_rdb.c diff -u /dev/null src/sys/dev/dkwedge/dkwedge_rdb.c:1.1 --- /dev/null Sun Feb 26 11:56:49 2017 +++ src/sys/dev/dkwedge/dkwedge_rdb.c Sun Feb 26 11:56:49 2017 @@ -0,0 +1,373 @@ +/* $NetBSD: dkwedge_rdb.c,v 1.1 2017/02/26 11:56:49 rin Exp $ */ + +/* + * Adapted from arch/amiga/amiga/disksubr.c: + * + * Copyright (c) 1982, 1986, 1988 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + *may be used to endorse or promote products derived from this software + *without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
CVS commit: src/sys/sys
Module Name:src Committed By: rin Date: Sun Feb 26 11:51:38 UTC 2017 Modified Files: src/sys/sys: disklabel_rdb.h Log Message: s/u_char/unsigned char/ To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/sys/disklabel_rdb.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/disklabel_rdb.h diff -u src/sys/sys/disklabel_rdb.h:1.3 src/sys/sys/disklabel_rdb.h:1.4 --- src/sys/sys/disklabel_rdb.h:1.3 Sun Feb 26 11:48:55 2017 +++ src/sys/sys/disklabel_rdb.h Sun Feb 26 11:51:38 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: disklabel_rdb.h,v 1.3 2017/02/26 11:48:55 rin Exp $ */ +/* $NetBSD: disklabel_rdb.h,v 1.4 2017/02/26 11:51:38 rin Exp $ */ /* * Copyright (c) 1994 Christian E. Hopps @@ -128,7 +128,7 @@ struct partblock { uint32_t next; /* next in chain */ uint32_t flags; /* see below */ uint32_t resv1[3]; - u_char partname[32]; /* (BCPL) part name (may not be unique) */ + unsigned char partname[32]; /* (BCPL) part name (may not be unique) */ uint32_t resv2[15]; struct ados_environ e; #if never_use_secsize @@ -211,8 +211,8 @@ struct lsegblock { #define DOST_SFS 0x53465300 /* 'SFSx' Smart fs partition */ struct adostype { - u_char archtype; /* see ADT_xxx below */ - u_char fstype; /* byte 3 from amiga dostype */ + unsigned char archtype; /* see ADT_xxx below */ + unsigned char fstype; /* byte 3 from amiga dostype */ }; /* archtypes */
CVS commit: src/sys/sys
Module Name:src Committed By: rin Date: Sun Feb 26 11:48:55 UTC 2017 Modified Files: src/sys/sys: disklabel_rdb.h Log Message: Include and replace u_long with uint32_t in preparation to be used from LP64 environments. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/sys/disklabel_rdb.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/disklabel_rdb.h diff -u src/sys/sys/disklabel_rdb.h:1.2 src/sys/sys/disklabel_rdb.h:1.3 --- src/sys/sys/disklabel_rdb.h:1.2 Sat Jun 19 08:45:25 2010 +++ src/sys/sys/disklabel_rdb.h Sun Feb 26 11:48:55 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: disklabel_rdb.h,v 1.2 2010/06/19 08:45:25 kiyohara Exp $ */ +/* $NetBSD: disklabel_rdb.h,v 1.3 2017/02/26 11:48:55 rin Exp $ */ /* * Copyright (c) 1994 Christian E. Hopps @@ -32,11 +32,13 @@ #ifndef _SYS_DISKLABEL_RDB_H_ #define _SYS_DISKLABEL_RDB_H_ +#include + /* * describes ados Rigid Disk Blocks * which are used to partition a drive */ -#define RDBNULL ((u_long)0x) +#define RDBNULL ((uint32_t)0x) /* * you will find rdblock somewhere in [0, RDBMAXBLOCKS) @@ -44,34 +46,34 @@ #define RDB_MAXBLOCKS 16 struct rdblock { - u_long id; /* 'RDSK' */ - u_long nsumlong; /* number of longs in check sum */ - u_long chksum; /* simple additive with wrap checksum */ - u_long hostid; /* scsi target of host */ - u_long nbytes; /* size of disk blocks */ - u_long flags; - u_long badbhead; /* linked list of badblocks */ - u_long partbhead; /* linked list of partblocks */ - u_long fsbhead; /* " " of fsblocks */ - u_long driveinit; - u_long resv1[6]; /* RDBNULL */ - u_long ncylinders; /* number of cylinders on drive */ - u_long nsectors; /* number of sectors per track */ - u_long nheads; /* number of tracks per cylinder */ - u_long interleave; - u_long park; /* only used with st506 i.e. not */ - u_long resv2[3]; - u_long wprecomp; /* start cyl for write precomp */ - u_long reducedwrite; /* start cyl for reduced write current */ - u_long steprate; /* driver step rate in ?s */ - u_long resv3[5]; - u_long rdblowb; /* lowblock of range for rdb's */ - u_long rdbhighb; /* high block of range for rdb's */ - u_long lowcyl; /* low cylinder of partition area */ - u_long highcyl; /* upper cylinder of partition area */ - u_long secpercyl; /* number of sectors per cylinder */ - u_long parkseconds; /* zero if no park needed */ - u_long resv4[2]; + uint32_t id; /* 'RDSK' */ + uint32_t nsumlong; /* number of long words in check sum */ + uint32_t chksum; /* simple additive with wrap checksum */ + uint32_t hostid; /* scsi target of host */ + uint32_t nbytes; /* size of disk blocks */ + uint32_t flags; + uint32_t badbhead; /* linked list of badblocks */ + uint32_t partbhead; /* linked list of partblocks */ + uint32_t fsbhead; /* " " of fsblocks */ + uint32_t driveinit; + uint32_t resv1[6]; /* RDBNULL */ + uint32_t ncylinders; /* number of cylinders on drive */ + uint32_t nsectors; /* number of sectors per track */ + uint32_t nheads; /* number of tracks per cylinder */ + uint32_t interleave; + uint32_t park; /* only used with st506 i.e. not */ + uint32_t resv2[3]; + uint32_t wprecomp; /* start cyl for write precomp */ + uint32_t reducedwrite; /* start cyl for reduced write current */ + uint32_t steprate; /* driver step rate in ?s */ + uint32_t resv3[5]; + uint32_t rdblowb; /* lowblock of range for rdb's */ + uint32_t rdbhighb; /* high block of range for rdb's */ + uint32_t lowcyl; /* low cylinder of partition area */ + uint32_t highcyl; /* upper cylinder of partition area */ + uint32_t secpercyl; /* number of sectors per cylinder */ + uint32_t parkseconds; /* zero if no park needed */ + uint32_t resv4[2]; char diskvendor[8]; /* inquiry stuff */ char diskproduct[16]; /* inquiry stuff */ char diskrevision[4]; /* inquiry stuff */ @@ -79,7 +81,7 @@ struct rdblock { char contproduct[16]; /* inquiry stuff */ char contrevision[4]; /* inquiry stuff */ #if never_use_secsize - u_long resv5[0]; + uint32_t resv5[0]; #endif }; @@ -93,44 +95,44 @@ struct rdblock { #define RDBF_SYNC 0x40 /* drive supports SCSI synchronous mode */ struct ados_environ { - u_long tabsize; /* 0: environ table size */ - u_long sizeblock; /* 1: n long words in a block */ - u_long secorg; /* 2: not used must be zero */ - u_long numheads; /* 3: number of surfaces */ - u_long secperblk; /* 4: must be 1 */ - u_long secpertrk; /* 5: blocks per track */ - u_long resvblocks; /* 6: reserved blocks at start */ - u_long prefac; /* 7: must be 0 */ - u_long interleave; /* 8: normally 1 */ - u_long lowcyl; /* 9: low cylinder of partition */ - u_long highcyl; /* 10: upper cylinder of partition */ - u_long numbufs; /* 11: ados: number of buffers */ - u_long membuftype; /* 12: ados: type of bufmem */ - u_long maxtrans; /* 13: maxtrans the ctrlr supports */ - u_long mask; /* 14: mask for
CVS commit: src/sys/dev/scsipi
Module Name:src Committed By: maya Date: Sun Feb 26 10:58:47 UTC 2017 Modified Files: src/sys/dev/scsipi: scsipi_base.h Log Message: Add a DEBUG assert for the problem noted in PR kern/51731 of some drivers not sufficiently locking. The relevant drivers might not work, but if someone gets around to them then the problem could be visible. sd doesn't trip the assert. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/dev/scsipi/scsipi_base.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/scsipi/scsipi_base.h diff -u src/sys/dev/scsipi/scsipi_base.h:1.23 src/sys/dev/scsipi/scsipi_base.h:1.24 --- src/sys/dev/scsipi/scsipi_base.h:1.23 Sun Nov 20 15:37:19 2016 +++ src/sys/dev/scsipi/scsipi_base.h Sun Feb 26 10:58:47 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: scsipi_base.h,v 1.23 2016/11/20 15:37:19 mlelstv Exp $ */ +/* $NetBSD: scsipi_base.h,v 1.24 2017/02/26 10:58:47 maya Exp $ */ /*- * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc. @@ -96,6 +96,7 @@ scsipi_make_xs_locked(struct scsipi_peri struct buf *bp, int flags) { + KDASSERT(mutex_owned(chan_mtx(periph->periph_channel))); return scsipi_make_xs_internal(periph, cmd, cmdlen, data_addr, datalen, retries, timeout, bp, flags | XS_CTL_NOSLEEP); }
CVS commit: src/sys/arch/i386/pnpbios
Module Name:src Committed By: maya Date: Sun Feb 26 10:49:25 UTC 2017 Modified Files: src/sys/arch/i386/pnpbios: pnpbios.c Log Message: catch up with i386 rename of gdt to gdtstore fixes i386 ALL kernel build (pnpbios is disabled in GENERIC) To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73 src/sys/arch/i386/pnpbios/pnpbios.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/pnpbios/pnpbios.c diff -u src/sys/arch/i386/pnpbios/pnpbios.c:1.72 src/sys/arch/i386/pnpbios/pnpbios.c:1.73 --- src/sys/arch/i386/pnpbios/pnpbios.c:1.72 Sun Oct 13 06:55:34 2013 +++ src/sys/arch/i386/pnpbios/pnpbios.c Sun Feb 26 10:49:25 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pnpbios.c,v 1.72 2013/10/13 06:55:34 riz Exp $ */ +/* $NetBSD: pnpbios.c,v 1.73 2017/02/26 10:49:25 maya Exp $ */ /* * Copyright (c) 2000 Jason R. Thorpe. All rights reserved. @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pnpbios.c,v 1.72 2013/10/13 06:55:34 riz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pnpbios.c,v 1.73 2017/02/26 10:49:25 maya Exp $"); #include #include @@ -332,14 +332,14 @@ pnpbios_attach(device_t parent, device_t } pnpbios_scratchbuf = malloc(PNPBIOS_BUFSIZE, M_DEVBUF, M_NOWAIT); - setsegment([GPNPBIOSCODE_SEL].sd, codeva, 0x, + setsegment([GPNPBIOSCODE_SEL].sd, codeva, 0x, SDT_MEMERA, SEL_KPL, 0, 0); - setsegment([GPNPBIOSDATA_SEL].sd, datava, 0x, + setsegment([GPNPBIOSDATA_SEL].sd, datava, 0x, SDT_MEMRWA, SEL_KPL, 0, 0); - setsegment([GPNPBIOSSCRATCH_SEL].sd, + setsegment([GPNPBIOSSCRATCH_SEL].sd, pnpbios_scratchbuf, PNPBIOS_BUFSIZE - 1, SDT_MEMRWA, SEL_KPL, 0, 0); - setsegment([GPNPBIOSTRAMP_SEL].sd, + setsegment([GPNPBIOSTRAMP_SEL].sd, pnpbiostramp, epnpbiostramp - pnpbiostramp - 1, SDT_MEMERA, SEL_KPL, 1, 0);
CVS commit: src/sys/compat/netbsd32
Module Name:src Committed By: njoly Date: Sun Feb 26 10:26:19 UTC 2017 Modified Files: src/sys/compat/netbsd32: netbsd32_time.c Log Message: Apply fix from natuve clock_nanosleep(2) to not copyout remaining time struct if TIMER_ABSTIME flag is set. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/compat/netbsd32/netbsd32_time.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/netbsd32/netbsd32_time.c diff -u src/sys/compat/netbsd32/netbsd32_time.c:1.48 src/sys/compat/netbsd32/netbsd32_time.c:1.49 --- src/sys/compat/netbsd32/netbsd32_time.c:1.48 Fri Sep 23 14:16:32 2016 +++ src/sys/compat/netbsd32/netbsd32_time.c Sun Feb 26 10:26:19 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_time.c,v 1.48 2016/09/23 14:16:32 skrll Exp $ */ +/* $NetBSD: netbsd32_time.c,v 1.49 2017/02/26 10:26:19 njoly Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_time.c,v 1.48 2016/09/23 14:16:32 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_time.c,v 1.49 2017/02/26 10:26:19 njoly Exp $"); #if defined(_KERNEL_OPT) #include "opt_ntp.h" @@ -453,7 +453,8 @@ netbsd32_clock_nanosleep(struct lwp *l, goto out; netbsd32_from_timespec(, ); - if ((error1 = copyout(, SCARG_P32(uap, rmtp), sizeof(ts32))) != 0) + if ((SCARG(uap, flags) & TIMER_ABSTIME) == 0 && + (error1 = copyout(, SCARG_P32(uap, rmtp), sizeof(ts32))) != 0) error = error1; out: *retval = error;
CVS commit: src/sys/dev/sun
Module Name:src Committed By: martin Date: Sun Feb 26 09:49:40 UTC 2017 Modified Files: src/sys/dev/sun: disksubr.c Log Message: Disks without a disk label happen in normal operation (both as USB stick or with GPT), so do not cause an error message when opening them. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/dev/sun/disksubr.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/sun/disksubr.c diff -u src/sys/dev/sun/disksubr.c:1.14 src/sys/dev/sun/disksubr.c:1.15 --- src/sys/dev/sun/disksubr.c:1.14 Tue Mar 23 20:01:09 2010 +++ src/sys/dev/sun/disksubr.c Sun Feb 26 09:49:40 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: disksubr.c,v 1.14 2010/03/23 20:01:09 martin Exp $ */ +/* $NetBSD: disksubr.c,v 1.15 2017/02/26 09:49:40 martin Exp $ */ /* * Copyright (c) 1982, 1986, 1988 Regents of the University of California. @@ -55,7 +55,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.14 2010/03/23 20:01:09 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.15 2017/02/26 09:49:40 martin Exp $"); #include #include @@ -160,7 +160,7 @@ readdisklabel(dev_t dev, void (*strat)(s } memset(clp->cd_block, 0, sizeof(clp->cd_block)); - return ("no disk label"); + return NULL; } /*
CVS commit: src/sys/arch/arm/marvell
Module Name:src Committed By: skrll Date: Sun Feb 26 09:33:27 UTC 2017 Modified Files: src/sys/arch/arm/marvell: armadaxp.c Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/marvell/armadaxp.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/arm/marvell/armadaxp.c diff -u src/sys/arch/arm/marvell/armadaxp.c:1.20 src/sys/arch/arm/marvell/armadaxp.c:1.21 --- src/sys/arch/arm/marvell/armadaxp.c:1.20 Sun Feb 26 09:29:08 2017 +++ src/sys/arch/arm/marvell/armadaxp.c Sun Feb 26 09:33:27 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: armadaxp.c,v 1.20 2017/02/26 09:29:08 skrll Exp $ */ +/* $NetBSD: armadaxp.c,v 1.21 2017/02/26 09:33:27 skrll Exp $ */ /*** Copyright (C) Marvell International Ltd. and its affiliates @@ -37,7 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI ***/ #include -__KERNEL_RCSID(0, "$NetBSD: armadaxp.c,v 1.20 2017/02/26 09:29:08 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: armadaxp.c,v 1.21 2017/02/26 09:33:27 skrll Exp $"); #define _INTR_PRIVATE @@ -398,7 +398,7 @@ static struct mbus_table_def { 14, 0xd400, 0x0400, ARMADAXP_UNITID_DEVBUS, ARMADAXP_ATTR_DEVBUS_SPI0_CS0 }, - { + { /* Security Accelerator SRAM, Engine 1, no data swap */ /* MODIFIED (added, 0xd030-0xd030) */ 15, 0xd030, 0x0001,
CVS commit: src/sys/arch/arm/marvell
Module Name:src Committed By: skrll Date: Sun Feb 26 09:29:08 UTC 2017 Modified Files: src/sys/arch/arm/marvell: armadaxp.c Log Message: Use PEX numbers consistently. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/arm/marvell/armadaxp.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/arm/marvell/armadaxp.c diff -u src/sys/arch/arm/marvell/armadaxp.c:1.19 src/sys/arch/arm/marvell/armadaxp.c:1.20 --- src/sys/arch/arm/marvell/armadaxp.c:1.19 Thu Feb 23 22:33:31 2017 +++ src/sys/arch/arm/marvell/armadaxp.c Sun Feb 26 09:29:08 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: armadaxp.c,v 1.19 2017/02/23 22:33:31 skrll Exp $ */ +/* $NetBSD: armadaxp.c,v 1.20 2017/02/26 09:29:08 skrll Exp $ */ /*** Copyright (C) Marvell International Ltd. and its affiliates @@ -37,7 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI ***/ #include -__KERNEL_RCSID(0, "$NetBSD: armadaxp.c,v 1.19 2017/02/23 22:33:31 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: armadaxp.c,v 1.20 2017/02/26 09:29:08 skrll Exp $"); #define _INTR_PRIVATE @@ -251,7 +251,7 @@ static struct mbus_description { "PEX0(Lane2, Memory)" }, { ARMADAXP_UNITID_PEX0, ARMADAXP_ATTR_PEXx3_MEM, "PEX0(Lane3, Memory)" }, - { ARMADAXP_UNITID_PEX0, ARMADAXP_ATTR_PEX2_MEM, + { ARMADAXP_UNITID_PEX2, ARMADAXP_ATTR_PEX2_MEM, "PEX2(Lane0, Memory)" }, { ARMADAXP_UNITID_PEX1, ARMADAXP_ATTR_PEXx0_MEM, "PEX1(Lane0, Memory)" }, @@ -261,7 +261,7 @@ static struct mbus_description { "PEX1(Lane2, Memory)" }, { ARMADAXP_UNITID_PEX1, ARMADAXP_ATTR_PEXx3_MEM, "PEX1(Lane3, Memory)" }, - { ARMADAXP_UNITID_PEX1, ARMADAXP_ATTR_PEX2_MEM, + { ARMADAXP_UNITID_PEX3, ARMADAXP_ATTR_PEX3_MEM, "PEX3(Lane0, Memory)" }, { ARMADAXP_UNITID_PEX0, ARMADAXP_ATTR_PEXx0_IO, "PEX0(Lane0, I/O)" }, @@ -271,7 +271,7 @@ static struct mbus_description { "PEX0(Lane2, I/O)" }, { ARMADAXP_UNITID_PEX0, ARMADAXP_ATTR_PEXx3_IO, "PEX0(Lane3, I/O)" }, - { ARMADAXP_UNITID_PEX0, ARMADAXP_ATTR_PEX2_IO, + { ARMADAXP_UNITID_PEX2, ARMADAXP_ATTR_PEX2_IO, "PEX2(Lane0, I/O)" }, { ARMADAXP_UNITID_PEX1, ARMADAXP_ATTR_PEXx0_IO, "PEX1(Lane0, I/O)" }, @@ -281,7 +281,7 @@ static struct mbus_description { "PEX1(Lane2, I/O)" }, { ARMADAXP_UNITID_PEX1, ARMADAXP_ATTR_PEXx3_IO, "PEX1(Lane3, I/O)" }, - { ARMADAXP_UNITID_PEX1, ARMADAXP_ATTR_PEX2_IO, + { ARMADAXP_UNITID_PEX3, ARMADAXP_ATTR_PEX3_IO, "PEX3(Lane0, I/O)" }, /* CRYPT */