CVS commit: src/sys/dev/pci/ixgbe
Module Name:src Committed By: msaitoh Date: Fri Mar 27 06:04:42 UTC 2015 Added Files: src/sys/dev/pci/ixgbe: ixgbe_82598.h ixgbe_82599.h ixgbe_x540.c ixgbe_x540.h Log Message: Add some forgotten files in last commit. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/dev/pci/ixgbe/ixgbe_82598.h \ src/sys/dev/pci/ixgbe/ixgbe_82599.h src/sys/dev/pci/ixgbe/ixgbe_x540.c \ src/sys/dev/pci/ixgbe/ixgbe_x540.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/dev/pci/ixgbe/ixgbe_82598.h diff -u /dev/null src/sys/dev/pci/ixgbe/ixgbe_82598.h:1.1 --- /dev/null Fri Mar 27 06:04:42 2015 +++ src/sys/dev/pci/ixgbe/ixgbe_82598.h Fri Mar 27 06:04:42 2015 @@ -0,0 +1,52 @@ +/** + + Copyright (c) 2001-2012, Intel Corporation + 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 Intel Corporation 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +**/ +/*$FreeBSD$*/ + +#ifndef _IXGBE_82598_H_ +#define _IXGBE_82598_H_ + +u32 ixgbe_get_pcie_msix_count_82598(struct ixgbe_hw *hw); +s32 ixgbe_fc_enable_82598(struct ixgbe_hw *hw, s32 packetbuf_num); +s32 ixgbe_start_hw_82598(struct ixgbe_hw *hw); +void ixgbe_enable_relaxed_ordering_82598(struct ixgbe_hw *hw); +s32 ixgbe_set_vmdq_82598(struct ixgbe_hw *hw, u32 rar, u32 vmdq); +s32 ixgbe_set_vfta_82598(struct ixgbe_hw *hw, u32 vlan, u32 vind, bool vlan_on); +s32 ixgbe_read_analog_reg8_82598(struct ixgbe_hw *hw, u32 reg, u8 *val); +s32 ixgbe_write_analog_reg8_82598(struct ixgbe_hw *hw, u32 reg, u8 val); +s32 ixgbe_read_i2c_eeprom_82598(struct ixgbe_hw *hw, u8 byte_offset, +u8 *eeprom_data); +u32 ixgbe_get_supported_physical_layer_82598(struct ixgbe_hw *hw); +s32 ixgbe_init_phy_ops_82598(struct ixgbe_hw *hw); +void ixgbe_set_lan_id_multi_port_pcie_82598(struct ixgbe_hw *hw); +void ixgbe_set_pcie_completion_timeout(struct ixgbe_hw *hw); +#endif /* _IXGBE_82598_H_ */ Index: src/sys/dev/pci/ixgbe/ixgbe_82599.h diff -u /dev/null src/sys/dev/pci/ixgbe/ixgbe_82599.h:1.1 --- /dev/null Fri Mar 27 06:04:42 2015 +++ src/sys/dev/pci/ixgbe/ixgbe_82599.h Fri Mar 27 06:04:42 2015 @@ -0,0 +1,65 @@ +/** + + Copyright (c) 2001-2012, Intel Corporation + 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 Intel Corporation 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER OR
CVS commit: src/lib/libc/arch/riscv
Module Name:src Committed By: matt Date: Fri Mar 27 06:44:28 UTC 2015 Modified Files: src/lib/libc/arch/riscv: SYS.h src/lib/libc/arch/riscv/gen: __setjmp14.S _setjmp.S swapcontext.S src/lib/libc/arch/riscv/sys: __clone.S __sigtramp2.S __syscall.S __vfork14.S brk.S cerror.S fork.S pipe.S ptrace.S sbrk.S Log Message: Switch to new ABI (return values now in a0/a1; v0/v1 are no more) To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/riscv/SYS.h cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/riscv/gen/__setjmp14.S \ src/lib/libc/arch/riscv/gen/_setjmp.S \ src/lib/libc/arch/riscv/gen/swapcontext.S cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/riscv/sys/__clone.S \ src/lib/libc/arch/riscv/sys/__sigtramp2.S \ src/lib/libc/arch/riscv/sys/__syscall.S \ src/lib/libc/arch/riscv/sys/__vfork14.S src/lib/libc/arch/riscv/sys/brk.S \ src/lib/libc/arch/riscv/sys/cerror.S src/lib/libc/arch/riscv/sys/fork.S \ src/lib/libc/arch/riscv/sys/pipe.S src/lib/libc/arch/riscv/sys/ptrace.S \ src/lib/libc/arch/riscv/sys/sbrk.S 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/riscv/SYS.h diff -u src/lib/libc/arch/riscv/SYS.h:1.1 src/lib/libc/arch/riscv/SYS.h:1.2 --- src/lib/libc/arch/riscv/SYS.h:1.1 Fri Sep 19 17:36:25 2014 +++ src/lib/libc/arch/riscv/SYS.h Fri Mar 27 06:44:28 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: SYS.h,v 1.1 2014/09/19 17:36:25 matt Exp $ */ +/* $NetBSD: SYS.h,v 1.2 2015/03/27 06:44:28 matt Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include sys/syscall.h #include machine/asm.h -#define SYSTRAP(x) li v0,SYS_ ## x; scall +#define SYSTRAP(x) li t6,SYS_ ## x; scall #define JUMP_TO_CERROR() j _C_LABEL(__cerror) /* Index: src/lib/libc/arch/riscv/gen/__setjmp14.S diff -u src/lib/libc/arch/riscv/gen/__setjmp14.S:1.1 src/lib/libc/arch/riscv/gen/__setjmp14.S:1.2 --- src/lib/libc/arch/riscv/gen/__setjmp14.S:1.1 Fri Sep 19 17:36:25 2014 +++ src/lib/libc/arch/riscv/gen/__setjmp14.S Fri Mar 27 06:44:28 2015 @@ -1,10 +1,10 @@ -/* $NetBSD: __setjmp14.S,v 1.1 2014/09/19 17:36:25 matt Exp $ */ +/* $NetBSD: __setjmp14.S,v 1.2 2015/03/27 06:44:28 matt Exp $ */ #include SYS.h #include assym.h #if defined(LIBC_SCCS) -__RCSID($NetBSD: __setjmp14.S,v 1.1 2014/09/19 17:36:25 matt Exp $) +__RCSID($NetBSD: __setjmp14.S,v 1.2 2015/03/27 06:44:28 matt Exp $) #endif /* @@ -21,6 +21,9 @@ ENTRY(__setjmp14) li a1, 1 REG_S a1, JB_MAGIC(a0) /* indicate sigmask */ REG_S ra, JB_RA(a0) /* save return address */ + REG_S sp, JB_SP(a0) /* save stack pointer */ + REG_S gp, JB_GP(a0) /* save global pointer */ + REG_S tp, JB_TP(a0) /* save thread pointer */ REG_S s0, JB_S0(a0) /* save callee saved register */ REG_S s1, JB_S1(a0) /* save callee saved register */ REG_S s2, JB_S2(a0) /* save callee saved register */ @@ -33,40 +36,36 @@ ENTRY(__setjmp14) REG_S s9, JB_S9(a0) /* save callee saved register */ REG_S s10, JB_S10(a0) /* save callee saved register */ REG_S s11, JB_S11(a0) /* save callee saved register */ - REG_S sp, JB_SP(a0) /* save stack pointer */ - REG_S tp, JB_TP(a0) /* save thread pointer */ - REG_S gp, JB_GP(a0) /* save global pointer */ #ifndef _SOFT_FLOAT frcsr t2 /* get FSCR */ REG_S t2, JB_FCSR(a0) /* save it */ - fsd fs0, JB_F0(a0) /* save callee saved register */ - fsd fs1, JB_F1(a0) /* save callee saved register */ - fsd fs2, JB_F2(a0) /* save callee saved register */ - fsd fs3, JB_F3(a0) /* save callee saved register */ - fsd fs4, JB_F4(a0) /* save callee saved register */ - fsd fs5, JB_F5(a0) /* save callee saved register */ - fsd fs6, JB_F6(a0) /* save callee saved register */ - fsd fs7, JB_F7(a0) /* save callee saved register */ - fsd fs8, JB_F8(a0) /* save callee saved register */ - fsd fs9, JB_F9(a0) /* save callee saved register */ - fsd fs10, JB_F10(a0) /* save callee saved register */ - fsd fs11, JB_F11(a0) /* save callee saved register */ - fsd fs12, JB_F12(a0) /* save callee saved register */ - fsd fs13, JB_F13(a0) /* save callee saved register */ - fsd fs14, JB_F14(a0) /* save callee saved register */ - fsd fs15, JB_F15(a0) /* save callee saved register */ + fsd fs0, JB_FS0(a0) /* save callee saved register */ + fsd fs1, JB_FS1(a0) /* save callee saved register */ + fsd fs2, JB_FS2(a0) /* save callee saved register */ + fsd fs3, JB_FS3(a0) /* save callee saved register */ + fsd fs4, JB_FS4(a0) /* save callee saved register */ + fsd fs5, JB_FS5(a0) /* save callee saved register */ + fsd fs6, JB_FS6(a0) /* save callee saved register */ + fsd fs7, JB_FS7(a0) /* save callee saved register */ + fsd fs8, JB_FS8(a0) /* save callee saved register */ + fsd fs9, JB_FS9(a0) /* save callee saved register */ + fsd fs10, JB_FS10(a0) /* save callee saved register */ + fsd fs11, JB_FS11(a0) /* save callee saved
CVS commit: src/common/lib/libc/arch/riscv/atomic
Module Name:src Committed By: matt Date: Fri Mar 27 06:42:37 UTC 2015 Modified Files: src/common/lib/libc/arch/riscv/atomic: atomic_add_32.S atomic_add_64.S atomic_and_32.S atomic_and_64.S atomic_cas_32.S atomic_cas_64.S atomic_nand_32.S atomic_nand_64.S atomic_or_32.S atomic_or_64.S atomic_sub_32.S atomic_sub_64.S atomic_swap_32.S atomic_swap_64.S atomic_xor_32.S atomic_xor_64.S Log Message: Switch to new ABI (a0/a1 replace v0/v1) To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/common/lib/libc/arch/riscv/atomic/atomic_add_32.S \ src/common/lib/libc/arch/riscv/atomic/atomic_add_64.S \ src/common/lib/libc/arch/riscv/atomic/atomic_and_32.S \ src/common/lib/libc/arch/riscv/atomic/atomic_and_64.S \ src/common/lib/libc/arch/riscv/atomic/atomic_cas_32.S \ src/common/lib/libc/arch/riscv/atomic/atomic_cas_64.S \ src/common/lib/libc/arch/riscv/atomic/atomic_nand_32.S \ src/common/lib/libc/arch/riscv/atomic/atomic_nand_64.S \ src/common/lib/libc/arch/riscv/atomic/atomic_or_32.S \ src/common/lib/libc/arch/riscv/atomic/atomic_or_64.S \ src/common/lib/libc/arch/riscv/atomic/atomic_sub_32.S \ src/common/lib/libc/arch/riscv/atomic/atomic_sub_64.S \ src/common/lib/libc/arch/riscv/atomic/atomic_swap_32.S \ src/common/lib/libc/arch/riscv/atomic/atomic_swap_64.S \ src/common/lib/libc/arch/riscv/atomic/atomic_xor_32.S \ src/common/lib/libc/arch/riscv/atomic/atomic_xor_64.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libc/arch/riscv/atomic/atomic_add_32.S diff -u src/common/lib/libc/arch/riscv/atomic/atomic_add_32.S:1.1 src/common/lib/libc/arch/riscv/atomic/atomic_add_32.S:1.2 --- src/common/lib/libc/arch/riscv/atomic/atomic_add_32.S:1.1 Fri Sep 19 17:36:24 2014 +++ src/common/lib/libc/arch/riscv/atomic/atomic_add_32.S Fri Mar 27 06:42:37 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: atomic_add_32.S,v 1.1 2014/09/19 17:36:24 matt Exp $ */ +/* $NetBSD: atomic_add_32.S,v 1.2 2015/03/27 06:42:37 matt Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ ENTRY_NP(_atomic_inc_32) li a1, 1 ENTRY_NP(_atomic_add_32) - amoadd.w.aq v0, a1, 0(a0) + amoadd.w.aq a0, a1, 0(a0) ret END(_atomic_add_32) END(_atomic_inc_32) @@ -64,8 +64,8 @@ STRONG_ALIAS(_atomic_inc_ptr,_atomic_inc ENTRY_NP(_atomic_inc_32_nv) li a1, 1 ENTRY_NP(_atomic_add_32_nv) - amoadd.w.aq v0, a1, 0(a0) /* update memory and get old value */ - INT_ADD v0, v0, a1 /* turn into new value */ + amoadd.w.aq t0, a1, 0(a0) /* update memory and get old value */ + INT_ADD a0, t0, a1 /* turn into new value */ ret END(_atomic_add_32_nv) END(_atomic_inc_32_nv) Index: src/common/lib/libc/arch/riscv/atomic/atomic_add_64.S diff -u src/common/lib/libc/arch/riscv/atomic/atomic_add_64.S:1.1 src/common/lib/libc/arch/riscv/atomic/atomic_add_64.S:1.2 --- src/common/lib/libc/arch/riscv/atomic/atomic_add_64.S:1.1 Fri Sep 19 17:36:24 2014 +++ src/common/lib/libc/arch/riscv/atomic/atomic_add_64.S Fri Mar 27 06:42:37 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: atomic_add_64.S,v 1.1 2014/09/19 17:36:24 matt Exp $ */ +/* $NetBSD: atomic_add_64.S,v 1.2 2015/03/27 06:42:37 matt Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ ENTRY_NP(_atomic_inc_64) li a1, 1 ENTRY_NP(_atomic_add_64) - amoadd.d.aq v0, a1, 0(a0) + amoadd.d.aq a0, a1, 0(a0) ret END(_atomic_add_64) END(_atomic_inc_64) @@ -56,8 +56,8 @@ STRONG_ALIAS(_atomic_inc_ptr,_atomic_inc ENTRY_NP(_atomic_inc_64_nv) li a1, 1 ENTRY_NP(_atomic_add_64_nv) - amoadd.d.aq v0, a1, 0(a0) /* update memory and get old value */ - LONG_ADD v0, v0, a1 /* turn into new value */ + amoadd.d.aq t0, a1, 0(a0) /* update memory and get old value */ + LONG_ADD a0, t0, a1 /* turn into new value */ ret END(_atomic_add_64_nv) END(_atomic_inc_64_nv) Index: src/common/lib/libc/arch/riscv/atomic/atomic_and_32.S diff -u src/common/lib/libc/arch/riscv/atomic/atomic_and_32.S:1.1 src/common/lib/libc/arch/riscv/atomic/atomic_and_32.S:1.2 --- src/common/lib/libc/arch/riscv/atomic/atomic_and_32.S:1.1 Fri Sep 19 17:36:24 2014 +++ src/common/lib/libc/arch/riscv/atomic/atomic_and_32.S Fri Mar 27 06:42:37 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: atomic_and_32.S,v 1.1 2014/09/19 17:36:24 matt Exp $ */ +/* $NetBSD: atomic_and_32.S,v 1.2 2015/03/27 06:42:37 matt Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include atomic_op_asm.h ENTRY_NP(_atomic_and_32) - amoand.w.aq v0, a1, 0(a0) + amoand.w.aq a0, a1, 0(a0) ret END(_atomic_and_32) @@ -47,8 +47,8 @@ CRT_ALIAS(__sync_fetch_and_and_4,_atomic CRT_ALIAS(__atomic_fetch_and_4,_atomic_and_32) ENTRY_NP(_atomic_and_32_nv) - amoand.w.aq v0, a1, 0(a0) /* update memory and get old value */ - and v0, v0, a1 /* turn into new value */ + amoand.w.aq t0, a1, 0(a0) /*
CVS commit: src/sys/arch/sparc
Module Name:src Committed By: nakayama Date: Fri Mar 27 06:10:25 UTC 2015 Modified Files: src/sys/arch/sparc/include: openfirm.h src/sys/arch/sparc/sparc: openfirm.c Log Message: Sync sparc64 kernel's OF_seek with ofwboot's one, but sparc version is not changed. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sparc/include/openfirm.h cvs rdiff -u -r1.19 -r1.20 src/sys/arch/sparc/sparc/openfirm.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/sparc/include/openfirm.h diff -u src/sys/arch/sparc/include/openfirm.h:1.7 src/sys/arch/sparc/include/openfirm.h:1.8 --- src/sys/arch/sparc/include/openfirm.h:1.7 Mon May 18 11:39:30 2009 +++ src/sys/arch/sparc/include/openfirm.h Fri Mar 27 06:10:25 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: openfirm.h,v 1.7 2009/05/18 11:39:30 nakayama Exp $ */ +/* $NetBSD: openfirm.h,v 1.8 2015/03/27 06:10:25 nakayama Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -57,6 +57,8 @@ typedef uint64_t cell_t; typedef uint32_t cell_t; #define HDL2CELL(x) (cell_t)(x) #define ADR2CELL(x) (cell_t)(x) +#define HDQ2CELL_HI(x) (cell_t)((x) 32) +#define HDQ2CELL_LO(x) (cell_t)(x) #endif /* SUN4U */ int OF_test(const char *); Index: src/sys/arch/sparc/sparc/openfirm.c diff -u src/sys/arch/sparc/sparc/openfirm.c:1.19 src/sys/arch/sparc/sparc/openfirm.c:1.20 --- src/sys/arch/sparc/sparc/openfirm.c:1.19 Sun Nov 23 02:15:52 2014 +++ src/sys/arch/sparc/sparc/openfirm.c Fri Mar 27 06:10:25 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: openfirm.c,v 1.19 2014/11/23 02:15:52 christos Exp $ */ +/* $NetBSD: openfirm.c,v 1.20 2015/03/27 06:10:25 nakayama Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: openfirm.c,v 1.19 2014/11/23 02:15:52 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: openfirm.c,v 1.20 2015/03/27 06:10:25 nakayama Exp $); #include sys/param.h #include sys/systm.h @@ -546,8 +546,8 @@ OF_seek(int handle, u_quad_t pos) args.nargs = 3; args.nreturns = 1; args.handle = HDL2CELL(handle); - args.poshi = HDL2CELL(pos 32); - args.poslo = HDL2CELL(pos); + args.poshi = HDQ2CELL_HI(pos); + args.poslo = HDQ2CELL_LO(pos); if (openfirmware(args) == -1) return -1; return args.status;
CVS commit: src/sys/arch/sparc/stand/ofwboot
Module Name:src Committed By: nakayama Date: Fri Mar 27 06:07:33 UTC 2015 Modified Files: src/sys/arch/sparc/stand/ofwboot: Locore.c Log Message: Fix kernel loading failures from partitions started from over first 4GB of disks on sparc64. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/sparc/stand/ofwboot/Locore.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/sparc/stand/ofwboot/Locore.c diff -u src/sys/arch/sparc/stand/ofwboot/Locore.c:1.13 src/sys/arch/sparc/stand/ofwboot/Locore.c:1.14 --- src/sys/arch/sparc/stand/ofwboot/Locore.c:1.13 Wed Dec 18 10:09:56 2013 +++ src/sys/arch/sparc/stand/ofwboot/Locore.c Fri Mar 27 06:07:33 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: Locore.c,v 1.13 2013/12/18 10:09:56 martin Exp $ */ +/* $NetBSD: Locore.c,v 1.14 2015/03/27 06:07:33 nakayama Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -302,8 +302,8 @@ OF_seek(int handle, u_quad_t pos) args.nargs = 3; args.nreturns = 1; args.handle = HDL2CELL(handle); - args.poshi = HDL2CELL(pos 32); - args.poslo = HDL2CELL(pos); + args.poshi = HDQ2CELL_HI(pos); + args.poslo = HDQ2CELL_LO(pos); if (openfirmware(args) == -1) { return -1; }
CVS commit: src/sys/arch/riscv/include
Module Name:src Committed By: matt Date: Fri Mar 27 06:57:21 UTC 2015 Modified Files: src/sys/arch/riscv/include: asm.h elf_machdep.h mcontext.h reg.h setjmp.h Log Message: Switch to new ABI (return values now in a0/a1; v0/v1 are no more) To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/riscv/include/asm.h \ src/sys/arch/riscv/include/elf_machdep.h src/sys/arch/riscv/include/reg.h \ src/sys/arch/riscv/include/setjmp.h cvs rdiff -u -r1.2 -r1.3 src/sys/arch/riscv/include/mcontext.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/riscv/include/asm.h diff -u src/sys/arch/riscv/include/asm.h:1.1 src/sys/arch/riscv/include/asm.h:1.2 --- src/sys/arch/riscv/include/asm.h:1.1 Fri Sep 19 17:36:26 2014 +++ src/sys/arch/riscv/include/asm.h Fri Mar 27 06:57:21 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: asm.h,v 1.1 2014/09/19 17:36:26 matt Exp $ */ +/* $NetBSD: asm.h,v 1.2 2015/03/27 06:57:21 matt Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -119,9 +119,9 @@ #define RCSID(name) __RCSID(name) #if defined(_LP64) -#define SZREG 4 -#else #define SZREG 8 +#else +#define SZREG 4 #endif #define ALSK 15 /* stack alignment */ Index: src/sys/arch/riscv/include/elf_machdep.h diff -u src/sys/arch/riscv/include/elf_machdep.h:1.1 src/sys/arch/riscv/include/elf_machdep.h:1.2 --- src/sys/arch/riscv/include/elf_machdep.h:1.1 Fri Sep 19 17:36:26 2014 +++ src/sys/arch/riscv/include/elf_machdep.h Fri Mar 27 06:57:21 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: elf_machdep.h,v 1.1 2014/09/19 17:36:26 matt Exp $ */ +/* $NetBSD: elf_machdep.h,v 1.2 2015/03/27 06:57:21 matt Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -56,59 +56,55 @@ /* Processor specific relocation types */ #define R_RISCV_NONE 0 -#define R_RISCV_32 2 // A -#define R_RISCV_REL32 3 // A 0x -#define R_RISCV_JAL 4 // A 0xff -#define R_RISCV_HI20 5 // A 0x -#define R_RISCV_LO12_I 6 // (A 16) 0x -#define R_RISCV_LO12_S 7 // (S + A - P) 2 -#define R_RISCV_PCREL_LO12_I 8 -#define R_RISCV_PCREL_LO12_S 9 -#define R_RISCV_BRANCH 10 // (A - P) 0x -#define R_RISCV_CALL 11 // (A - P) 0xff -#define R_RISCV_PCREL_HI20 12 -#define R_RISCV_CALL_PLT 13 -#define R_RISCV_64 18 -#define R_RISCV_GOT_HI20 22 -#define R_RISCV_GOT_LO12 23 -#define R_RISCV_COPY 24 -#define R_RISCV_JMP_SLOT 25 -/* TLS relocations. */ -#define R_RISCV_TLS_IE_HI20 29 -#define R_RISCV_TLS_IE_LO12 30 -#define R_RISCV_TLS_IE_ADD 31 -#define R_RISCV_TLS_IE_LO12_I 32 -#define R_RISCV_TLS_IE_LO12_S 33 -#define R_RISCV_TPREL_HI20 34 -#define R_RISCV_TLREL_LO12_I 35 -#define R_RISCV_TLREL_LO12_S 36 -#define R_RISCV_TLREL_ADD 37 - -#define R_RISCV_TLS_DTPMOD32 38 -#define R_RISCV_TLS_DTPREL32 39 -#define R_RISCV_TLS_DTPMOD64 40 -#define R_RISCV_TLS_DTPREL64 41 -#define R_RISCV_TLS_DTPREL_HI16 44 -#define R_RISCV_TLS_DTPREL_LO16 45 -#define R_RISCV_TLS_PCREL_LO12 50 -#define R_RISCV_TLS_GOT_HI20 51 -#define R_RISCV_TLS_GOT_LO20 52 -#define R_RISCV_TLS_GD_HI20 53 -#define R_RISCV_TLS_GD_LO20 54 - -#define R_RISCV_GLOB_DAT 57 -#define R_RISCV_ADD32 58 -#define R_RISCV_SUB32 59 -#define R_RISCV_ADD64 60 -#define R_RISCV_SUB64 61 +#define R_RISCV_32 1 // A +#define R_RISCV_64 2 +#define R_RISCV_RELATIVE 3 +#define R_RISCV_COPY 4 +#define R_RISCV_JMP_SLOT 5 +#define R_RISCV_TLS_DTPMOD32 6 +#define R_RISCV_TLS_DTPREL32 7 +#define R_RISCV_TLS_DTPMOD64 8 +#define R_RISCV_TLS_DTPREL64 9 +#define R_RISCV_TLS_TPREL32 10 +#define R_RISCV_TLS_DTPREL64 11 + +/* The rest are not used by the dynamic linker */ +#define R_RISCV_BRANCH 16 // (A - P) 0x +#define R_RISCV_JAL 17 // A 0xff +#define R_RISCV_CALL 18 // (A - P) 0xff +#define R_RISCV_CALL_PLT 19 +#define R_RISCV_GOT_HI20 20 +#define R_RISCV_TLS_GOT_HI20 21 +#define R_RISCV_TLS_GD_HI20 22 +#define R_RISCV_PCREL_HI20 23 +#define R_RISCV_PCREL_LO12_I 24 +#define R_RISCV_PCREL_LO12_S 25 +#define R_RISCV_HI20 26 // A 0x +#define R_RISCV_LO12_I 27 // (A 16) 0x +#define R_RISCV_LO12_S 28 // (S + A - P) 2 +#define R_RISCV_TPREL_HI20 29 +#define R_RISCV_TLREL_LO12_I 30 +#define R_RISCV_TLREL_LO12_S 31 +#define R_RISCV_TLREL_ADD 32 +#define R_RISCV_ADD8 33 +#define R_RISCV_ADD16 34 +#define R_RISCV_ADD32 35 +#define R_RISCV_ADD64 36 +#define R_RISCV_SUB8 37 +#define R_RISCV_SUB16 38 +#define R_RISCV_SUB32 39 +#define R_RISCV_SUB64 40 +#define R_RISCV_GNU_VTINHERIT 41 // A 0x +#define R_RISCV_GNU_VTENTRY 42 +#define R_RISCV_ALIGN 43 + #define R_TYPE(name) R_RISCV_ ## name +#if ELFSIZE == 32 +#define R_TLS_TYPE(name) R_RISCV_ ## name ## 32 +#else #define R_TLS_TYPE(name) R_RISCV_ ## name ## 64 - -#define DT_RISCV_LOCAL_GOTNO (DT_LOPROC + 0) -#define DT_RISCV_SYMTABNO (DT_LOPROC + 1) -#define DT_RISCV_GOTSYM (DT_LOPROC + 2) -#define DT_RISCV_PLTGOT (DT_LOPROC + 3) +#endif #ifdef _KERNEL #ifdef
CVS commit: src/sys
Module Name:src Committed By: hikaru Date: Fri Mar 27 07:18:11 UTC 2015 Modified Files: src/sys/kern: subr_tftproot.c src/sys/nfs: krpc_subr.c nfs_boot.c nfs_bootdhcp.c nfsdiskless.h Log Message: m_pullup() is called in rcvproc callback functions, so nfs_boot_sendrecv() should keep track of the head of mbuf chain. fixes kern/48746 To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/kern/subr_tftproot.c cvs rdiff -u -r1.38 -r1.39 src/sys/nfs/krpc_subr.c cvs rdiff -u -r1.81 -r1.82 src/sys/nfs/nfs_boot.c cvs rdiff -u -r1.52 -r1.53 src/sys/nfs/nfs_bootdhcp.c cvs rdiff -u -r1.30 -r1.31 src/sys/nfs/nfsdiskless.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/kern/subr_tftproot.c diff -u src/sys/kern/subr_tftproot.c:1.13 src/sys/kern/subr_tftproot.c:1.14 --- src/sys/kern/subr_tftproot.c:1.13 Tue Aug 26 09:38:54 2014 +++ src/sys/kern/subr_tftproot.c Fri Mar 27 07:18:11 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_tftproot.c,v 1.13 2014/08/26 09:38:54 manu Exp $ */ +/* $NetBSD: subr_tftproot.c,v 1.14 2015/03/27 07:18:11 hikaru Exp $ */ /*- * Copyright (c) 2007 Emmanuel Dreyfus, all rights reserved. @@ -39,7 +39,7 @@ #include opt_md.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: subr_tftproot.c,v 1.13 2014/08/26 09:38:54 manu Exp $); +__KERNEL_RCSID(0, $NetBSD: subr_tftproot.c,v 1.14 2015/03/27 07:18:11 hikaru Exp $); #include sys/param.h #include sys/types.h @@ -118,7 +118,7 @@ struct tftproot_handle { int tftproot_dhcpboot(device_t); static int tftproot_getfile(struct tftproot_handle *, struct lwp *); -static int tftproot_recv(struct mbuf *, void *); +static int tftproot_recv(struct mbuf **, void *); int tftproot_dhcpboot(device_t bootdv) @@ -350,10 +350,11 @@ out: } static int -tftproot_recv(struct mbuf *m, void *ctx) +tftproot_recv(struct mbuf **mp, void *ctx) { struct tftproot_handle *trh = ctx; struct tftphdr *tftp; + struct mbuf *m = *mp; size_t newlen; size_t hdrlen = sizeof(*tftp) - sizeof(tftp-th_data); @@ -380,7 +381,7 @@ tftproot_recv(struct mbuf *m, void *ctx) * Examine the TFTP header */ if (m-m_len sizeof(*tftp)) { - if ((m = m_pullup(m, sizeof(*tftp))) == NULL) { + if ((m = *mp = m_pullup(m, sizeof(*tftp))) == NULL) { DPRINTF((%s():%d m_pullup failed\n, __func__, __LINE__)); return -1; Index: src/sys/nfs/krpc_subr.c diff -u src/sys/nfs/krpc_subr.c:1.38 src/sys/nfs/krpc_subr.c:1.39 --- src/sys/nfs/krpc_subr.c:1.38 Fri Mar 6 19:03:30 2015 +++ src/sys/nfs/krpc_subr.c Fri Mar 27 07:18:11 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: krpc_subr.c,v 1.38 2015/03/06 19:03:30 maxv Exp $ */ +/* $NetBSD: krpc_subr.c,v 1.39 2015/03/27 07:18:11 hikaru Exp $ */ /* * Copyright (c) 1995 Gordon Ross, Adam Glass @@ -43,7 +43,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: krpc_subr.c,v 1.38 2015/03/06 19:03:30 maxv Exp $); +__KERNEL_RCSID(0, $NetBSD: krpc_subr.c,v 1.39 2015/03/27 07:18:11 hikaru Exp $); #include sys/param.h #include sys/systm.h @@ -124,7 +124,7 @@ struct rpc_reply { #define MIN_REPLY_HDR 16 /* xid, dir, astat, errno */ -static int krpccheck(struct mbuf*, void*); +static int krpccheck(struct mbuf**, void*); /* * Call portmap to lookup a port number for a particular rpc program @@ -183,15 +183,16 @@ krpc_portmap(struct sockaddr_in *sin, u_ return 0; } -static int krpccheck(struct mbuf *m, void *context) +static int krpccheck(struct mbuf **mp, void *context) { struct rpc_reply *reply; + struct mbuf *m = *mp; /* Does the reply contain at least a header? */ if (m-m_pkthdr.len MIN_REPLY_HDR) return(-1); if (m-m_len sizeof(struct rpc_reply)) { - m = m_pullup(m, sizeof(struct rpc_reply)); + m = *mp = m_pullup(m, sizeof(struct rpc_reply)); if (m == NULL) return(-1); } Index: src/sys/nfs/nfs_boot.c diff -u src/sys/nfs/nfs_boot.c:1.81 src/sys/nfs/nfs_boot.c:1.82 --- src/sys/nfs/nfs_boot.c:1.81 Fri Oct 25 20:46:29 2013 +++ src/sys/nfs/nfs_boot.c Fri Mar 27 07:18:11 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_boot.c,v 1.81 2013/10/25 20:46:29 martin Exp $ */ +/* $NetBSD: nfs_boot.c,v 1.82 2015/03/27 07:18:11 hikaru Exp $ */ /*- * Copyright (c) 1995, 1997 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: nfs_boot.c,v 1.81 2013/10/25 20:46:29 martin Exp $); +__KERNEL_RCSID(0, $NetBSD: nfs_boot.c,v 1.82 2015/03/27 07:18:11 hikaru Exp $); #ifdef _KERNEL_OPT #include opt_nfs.h @@ -432,7 +432,7 @@ int nfs_boot_sendrecv(struct socket *so, struct mbuf *nam, int (*sndproc)(struct mbuf *, void *, int), struct mbuf *snd, - int (*rcvproc)(struct mbuf *, void *), + int (*rcvproc)(struct mbuf **, void *), struct mbuf **rcv, struct mbuf **from_p, void *context, struct lwp *lwp) { @@ -510,7 +510,7 @@ send_again: panic(nfs_boot_sendrecv: return size); #endif - if ((*rcvproc)(m, context))
CVS commit: src/sys/dev/usb
Module Name:src Committed By: skrll Date: Fri Mar 27 07:28:56 UTC 2015 Modified Files: src/sys/dev/usb: usb_subr.c Log Message: Remove '\n' in panic message. To generate a diff of this commit: cvs rdiff -u -r1.198 -r1.199 src/sys/dev/usb/usb_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/usb_subr.c diff -u src/sys/dev/usb/usb_subr.c:1.198 src/sys/dev/usb/usb_subr.c:1.199 --- src/sys/dev/usb/usb_subr.c:1.198 Sun Sep 21 14:30:22 2014 +++ src/sys/dev/usb/usb_subr.c Fri Mar 27 07:28:56 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: usb_subr.c,v 1.198 2014/09/21 14:30:22 christos Exp $ */ +/* $NetBSD: usb_subr.c,v 1.199 2015/03/27 07:28:56 skrll Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */ /* @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: usb_subr.c,v 1.198 2014/09/21 14:30:22 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: usb_subr.c,v 1.199 2015/03/27 07:28:56 skrll Exp $); #ifdef _KERNEL_OPT #include opt_compat_netbsd.h @@ -1126,7 +1126,7 @@ usbd_new_device(device_t parent, usbd_bu goto found; } } - panic(usbd_new_device: cannot find HS port\n); + panic(usbd_new_device: cannot find HS port); found: DPRINTFN(1,(usbd_new_device: high speed port %d\n, p)); } else {
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Fri Mar 27 11:29:09 UTC 2015 Modified Files: src/doc [netbsd-7]: CHANGES-7.0 Log Message: Ticket #646 To generate a diff of this commit: cvs rdiff -u -r1.1.2.244 -r1.1.2.245 src/doc/CHANGES-7.0 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-7.0 diff -u src/doc/CHANGES-7.0:1.1.2.244 src/doc/CHANGES-7.0:1.1.2.245 --- src/doc/CHANGES-7.0:1.1.2.244 Thu Mar 26 16:15:38 2015 +++ src/doc/CHANGES-7.0 Fri Mar 27 11:29:09 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0,v 1.1.2.244 2015/03/26 16:15:38 martin Exp $ +# $NetBSD: CHANGES-7.0,v 1.1.2.245 2015/03/27 11:29:09 martin Exp $ A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014 until the 7.0 release: @@ -19383,3 +19383,11 @@ sys/arch/zaurus/include/bootconfig.h 1. Merge common information. [skrll, ticket #645] +sys/arch/arm/arm32/cpuswitch.S 1.86-1.89 +sys/arch/arm/arm32/genassym.cf 1.70 + + Only set vfp tpid registers and do ras lookups if new lwp is + not LW_SYSTEM. + [skrll, ticket #646] + +
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Fri Mar 27 11:32:00 UTC 2015 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv24078 Log Message: Import dhcpcd-6.8.1 with the following changes: * Fixed memory issues with static routes in dhcpcd.conf * Fix syslog(3) corruption when quiet mode is enabled * Fix detecting host routes Status: Vendor Tag: roy Release Tags: dhcpcd-6-8-1 C src/external/bsd/dhcpcd/dist/common.c U src/external/bsd/dhcpcd/dist/control.c U src/external/bsd/dhcpcd/dist/dhcpcd.c U src/external/bsd/dhcpcd/dist/duid.c U src/external/bsd/dhcpcd/dist/eloop.c U src/external/bsd/dhcpcd/dist/if.c C src/external/bsd/dhcpcd/dist/if-options.c U src/external/bsd/dhcpcd/dist/script.c U src/external/bsd/dhcpcd/dist/dhcp-common.c U src/external/bsd/dhcpcd/dist/dhcpcd-embedded.c U src/external/bsd/dhcpcd/dist/if-bsd.c U src/external/bsd/dhcpcd/dist/arp.c U src/external/bsd/dhcpcd/dist/dhcp.c C src/external/bsd/dhcpcd/dist/ipv4.c U src/external/bsd/dhcpcd/dist/ipv4ll.c C src/external/bsd/dhcpcd/dist/ipv6.c U src/external/bsd/dhcpcd/dist/ipv6nd.c U src/external/bsd/dhcpcd/dist/dhcp6.c U src/external/bsd/dhcpcd/dist/auth.c U src/external/bsd/dhcpcd/dist/dhcpcd.conf U src/external/bsd/dhcpcd/dist/dhcpcd-definitions.conf U src/external/bsd/dhcpcd/dist/dhcpcd-embedded.c.in U src/external/bsd/dhcpcd/dist/dhcpcd-embedded.h.in U src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in U src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in U src/external/bsd/dhcpcd/dist/dhcpcd.8.in U src/external/bsd/dhcpcd/dist/dhcpcd.conf.5.in U src/external/bsd/dhcpcd/dist/arp.h U src/external/bsd/dhcpcd/dist/auth.h U src/external/bsd/dhcpcd/dist/bpf-filter.h U src/external/bsd/dhcpcd/dist/common.h U src/external/bsd/dhcpcd/dist/config.h U src/external/bsd/dhcpcd/dist/control.h C src/external/bsd/dhcpcd/dist/defs.h U src/external/bsd/dhcpcd/dist/dev.h U src/external/bsd/dhcpcd/dist/dhcp-common.h U src/external/bsd/dhcpcd/dist/dhcp.h U src/external/bsd/dhcpcd/dist/dhcp6.h U src/external/bsd/dhcpcd/dist/dhcpcd-embedded.h U src/external/bsd/dhcpcd/dist/dhcpcd.h U src/external/bsd/dhcpcd/dist/duid.h U src/external/bsd/dhcpcd/dist/eloop.h U src/external/bsd/dhcpcd/dist/if-options.h U src/external/bsd/dhcpcd/dist/if.h U src/external/bsd/dhcpcd/dist/ipv4.h U src/external/bsd/dhcpcd/dist/ipv4ll.h U src/external/bsd/dhcpcd/dist/ipv6.h U src/external/bsd/dhcpcd/dist/ipv6nd.h U src/external/bsd/dhcpcd/dist/script.h C src/external/bsd/dhcpcd/dist/crypt/hmac_md5.c U src/external/bsd/dhcpcd/dist/crypt/crypt.h U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/01-test U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/02-dump U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/10-mtu U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/10-wpa_supplicant U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/15-timezone U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/29-lookup-hostname U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/30-hostname U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/50-ntp.conf U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/50-ypbind 6 conflicts created by this import. Use the following command to help the merge: cvs checkout -jroy:yesterday -jroy src/external/bsd/dhcpcd/dist
CVS commit: src/sys/arch/arm/cortex
Module Name:src Committed By: skrll Date: Fri Mar 27 11:12:08 UTC 2015 Modified Files: src/sys/arch/arm/cortex: gtmr.c Log Message: Whitespace To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/cortex/gtmr.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/cortex/gtmr.c diff -u src/sys/arch/arm/cortex/gtmr.c:1.13 src/sys/arch/arm/cortex/gtmr.c:1.14 --- src/sys/arch/arm/cortex/gtmr.c:1.13 Thu Mar 26 22:01:42 2015 +++ src/sys/arch/arm/cortex/gtmr.c Fri Mar 27 11:12:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: gtmr.c,v 1.13 2015/03/26 22:01:42 skrll Exp $ */ +/* $NetBSD: gtmr.c,v 1.14 2015/03/27 11:12:08 skrll Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: gtmr.c,v 1.13 2015/03/26 22:01:42 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: gtmr.c,v 1.14 2015/03/27 11:12:08 skrll Exp $); #include sys/param.h #include sys/bus.h @@ -96,7 +96,7 @@ static void gtmr_attach(device_t parent, device_t self, void *aux) { struct mpcore_attach_args * const mpcaa = aux; -struct gtmr_softc *sc = gtmr_sc; + struct gtmr_softc *sc = gtmr_sc; prop_dictionary_t dict = device_properties(self); char freqbuf[sizeof(X.XXX SHz)];
CVS commit: [netbsd-7] src/sys/arch/arm/arm32
Module Name:src Committed By: martin Date: Fri Mar 27 11:27:40 UTC 2015 Modified Files: src/sys/arch/arm/arm32 [netbsd-7]: cpuswitch.S genassym.cf Log Message: Pull up following revision(s) (requested by skrll in ticket #646): sys/arch/arm/arm32/genassym.cf: revision 1.70 sys/arch/arm/arm32/cpuswitch.S: revision 1.86-1.89 Only set vfp tpid registers and do ras lookups if new lwp is not LW_SYSTEM. To generate a diff of this commit: cvs rdiff -u -r1.84 -r1.84.2.1 src/sys/arch/arm/arm32/cpuswitch.S cvs rdiff -u -r1.69 -r1.69.2.1 src/sys/arch/arm/arm32/genassym.cf 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/arm32/cpuswitch.S diff -u src/sys/arch/arm/arm32/cpuswitch.S:1.84 src/sys/arch/arm/arm32/cpuswitch.S:1.84.2.1 --- src/sys/arch/arm/arm32/cpuswitch.S:1.84 Sun Jun 15 02:27:15 2014 +++ src/sys/arch/arm/arm32/cpuswitch.S Fri Mar 27 11:27:39 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: cpuswitch.S,v 1.84 2014/06/15 02:27:15 ozaki-r Exp $ */ +/* $NetBSD: cpuswitch.S,v 1.84.2.1 2015/03/27 11:27:39 martin Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -87,7 +87,7 @@ #include arm/asm.h #include arm/locore.h - RCSID($NetBSD: cpuswitch.S,v 1.84 2014/06/15 02:27:15 ozaki-r Exp $) + RCSID($NetBSD: cpuswitch.S,v 1.84.2.1 2015/03/27 11:27:39 martin Exp $) /* LINTSTUB: include sys/param.h */ @@ -137,18 +137,18 @@ ENTRY(cpu_switchto) mov r4, r0 #ifdef TPIDRPRW_IS_CURCPU - GET_CURCPU(r3) + GET_CURCPU(r5) #elif defined(TPIDRPRW_IS_CURLWP) mrc p15, 0, r0, c13, c0, 4 /* get old lwp (r4 maybe 0) */ - ldr r3, [r0, #(L_CPU)] /* get cpu from old lwp */ + ldr r5, [r0, #(L_CPU)] /* get cpu from old lwp */ #elif !defined(MULTIPROCESSOR) - ldr r3, [r6, #L_CPU] /* get cpu from new lwp */ + ldr r5, [r6, #L_CPU] /* get cpu from new lwp */ #else #error curcpu() method not defined #endif - /* rem: r3 = curcpu() */ /* rem: r4 = old lwp */ + /* rem: r5 = curcpu() */ /* rem: r6 = new lwp */ #ifndef __HAVE_UNNESTED_INTRS @@ -156,7 +156,7 @@ ENTRY(cpu_switchto) #endif #ifdef MULTIPROCESSOR - str r3, [r6, #(L_CPU)] + str r5, [r6, #(L_CPU)] #else /* l-l_cpu initialized in fork1() for single-processor */ #endif @@ -165,20 +165,16 @@ ENTRY(cpu_switchto) mcr p15, 0, r6, c13, c0, 4 /* set current lwp */ #endif /* We have a new curlwp now so make a note it */ - str r6, [r3, #(CI_CURLWP)] - - /* Get the new pcb */ - ldr r7, [r6, #(L_PCB)] + str r6, [r5, #(CI_CURLWP)] /* At this point we can allow IRQ's again. */ #ifndef __HAVE_UNNESTED_INTRS IRQenable #endif - /* rem: r3 = curcpu() */ /* rem: r4 = old lwp */ + /* rem: r5 = curcpu() */ /* rem: r6 = new lwp */ - /* rem: r7 = new pcb */ /* rem: interrupts are enabled */ /* @@ -190,24 +186,23 @@ ENTRY(cpu_switchto) teq r4, #0 beq .Ldo_switch - /* rem: r3 = curcpu() */ /* rem: r4 = old lwp */ + /* rem: r5 = curcpu() */ /* rem: r6 = new lwp */ - /* rem: r7 = new pcb */ /* rem: interrupts are enabled */ /* Save old context */ /* Get the user structure for the old lwp. */ - ldr r5, [r4, #(L_PCB)] + ldr r7, [r4, #(L_PCB)] /* Save all the registers in the old lwp's pcb */ #if defined(_ARM_ARCH_DWORD_OK) - strd r8, r9, [r5, #(PCB_R8)] - strd r10, r11, [r5, #(PCB_R10)] - strd r12, r13, [r5, #(PCB_R12)] + strd r8, r9, [r7, #(PCB_R8)] + strd r10, r11, [r7, #(PCB_R10)] + strd r12, r13, [r7, #(PCB_R12)] #else - add r0, r5, #(PCB_R8) + add r0, r7, #(PCB_R8) stmia r0, {r8-r13} #endif @@ -216,29 +211,38 @@ ENTRY(cpu_switchto) * Save user read/write thread/process id register */ mrc p15, 0, r0, c13, c0, 2 - str r0, [r5, #(PCB_USER_PID_RW)] + str r0, [r7, #(PCB_USER_PID_RW)] #endif /* * NOTE: We can now use r8-r13 until it is time to restore * them for the new process. */ - /* rem: r3 = curcpu() */ /* rem: r4 = old lwp */ - /* rem: r5 = old pcb */ + /* rem: r5 = curcpu() */ /* rem: r6 = new lwp */ - /* rem: r7 = new pcb */ /* rem: interrupts are enabled */ /* Restore saved context */ .Ldo_switch: - /* rem: r3 = curcpu() */ + /* Get the new pcb */ + ldr r7, [r6, #(L_PCB)] + /* rem: r4 = old lwp */ + /* rem: r5 = curcpu() */ /* rem: r6 = new lwp */ /* rem: r7 = new pcb */ /* rem: interrupts are enabled */ + /* + * If we are switching to a system lwp, don't bother restoring + * thread or vfp registers and skip the ras check. + */ + ldr r0, [r6, #(L_FLAG)] + tst r0, #(LW_SYSTEM) + bne .Lswitch_do_restore + #ifdef _ARM_ARCH_6 /* * Restore user thread/process id registers @@ -253,14 +257,34 @@ ENTRY(cpu_switchto) /* * If we have a VFP, we need to load FPEXC. */ - ldr r0, [r3, #(CI_VFP_ID)] + ldr r0, [r5, #(CI_VFP_ID)] cmp r0, #0 ldrne r0, [r7, #(PCB_VFP_FPEXC)] vmsrne fpexc, r0 #endif - ldr r5, [r6, #(L_PROC)] /* fetch the proc for below */ + /* + * Check for restartable atomic sequences (RAS). + */ +
CVS commit: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Fri Mar 27 11:33:47 UTC 2015 Modified Files: src/external/bsd/dhcpcd/dist: common.c defs.h if-options.c ipv4.c ipv6.c src/external/bsd/dhcpcd/dist/crypt: hmac_md5.c Log Message: Sync To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/external/bsd/dhcpcd/dist/common.c \ src/external/bsd/dhcpcd/dist/ipv6.c cvs rdiff -u -r1.15 -r1.16 src/external/bsd/dhcpcd/dist/defs.h cvs rdiff -u -r1.21 -r1.22 src/external/bsd/dhcpcd/dist/if-options.c cvs rdiff -u -r1.12 -r1.13 src/external/bsd/dhcpcd/dist/ipv4.c cvs rdiff -u -r1.6 -r1.7 src/external/bsd/dhcpcd/dist/crypt/hmac_md5.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/dist/common.c diff -u src/external/bsd/dhcpcd/dist/common.c:1.9 src/external/bsd/dhcpcd/dist/common.c:1.10 --- src/external/bsd/dhcpcd/dist/common.c:1.9 Thu Mar 26 10:26:37 2015 +++ src/external/bsd/dhcpcd/dist/common.c Fri Mar 27 11:33:46 2015 @@ -1,5 +1,5 @@ #include sys/cdefs.h - __RCSID($NetBSD: common.c,v 1.9 2015/03/26 10:26:37 roy Exp $); + __RCSID($NetBSD: common.c,v 1.10 2015/03/27 11:33:46 roy Exp $); /* * dhcpcd - DHCP client daemon @@ -231,9 +231,9 @@ logger(struct dhcpcd_ctx *ctx, int pri, break; } *fp++ = '\0'; + fmt = fmt_cpy; } - fmt = fmt_cpy; #endif if (ctx == NULL || !(ctx-options DHCPCD_QUIET)) { Index: src/external/bsd/dhcpcd/dist/ipv6.c diff -u src/external/bsd/dhcpcd/dist/ipv6.c:1.9 src/external/bsd/dhcpcd/dist/ipv6.c:1.10 --- src/external/bsd/dhcpcd/dist/ipv6.c:1.9 Thu Mar 26 10:26:37 2015 +++ src/external/bsd/dhcpcd/dist/ipv6.c Fri Mar 27 11:33:46 2015 @@ -1,5 +1,5 @@ #include sys/cdefs.h - __RCSID($NetBSD: ipv6.c,v 1.9 2015/03/26 10:26:37 roy Exp $); + __RCSID($NetBSD: ipv6.c,v 1.10 2015/03/27 11:33:46 roy Exp $); /* * dhcpcd - DHCP client daemon @@ -1822,9 +1822,6 @@ ipv6_handlert(struct dhcpcd_ctx *ctx, in static int nc_route(struct rt6 *ort, struct rt6 *nrt) { -#ifdef HAVE_ROUTE_METRIC - int retval; -#endif /* Don't set default routes if not asked to */ if (IN6_IS_ADDR_UNSPECIFIED(nrt-dest) @@ -1849,22 +1846,30 @@ nc_route(struct rt6 *ort, struct rt6 *nr #ifdef HAVE_ROUTE_METRIC /* With route metrics, we can safely add the new route before * deleting the old route. */ - if ((retval = if_route6(RTM_ADD, nrt)) == -1) - logger(nrt-iface-ctx, LOG_ERR, if_route6 (ADD): %m); - if (ort if_route6(RTM_DELETE, ort) == -1 - errno != ESRCH) - logger(nrt-iface-ctx, LOG_ERR, if_route6 (DEL): %m); - return retval; -#else + if (if_route6(RTM_ADD, nrt) == 0) { + if (ort if_route6(RTM_DELETE, ort) == -1 + errno != ESRCH) + logger(nrt-iface-ctx, LOG_ERR, if_route6 (DEL): %m); + return 0; + } + + /* If the kernel claims the route exists we need to rip out the + * old one first. */ + if (errno != EEXIST || ort == NULL) + goto logerr; +#endif + /* No route metrics, we need to delete the old route before * adding the new one. */ if (ort if_route6(RTM_DELETE, ort) == -1 errno != ESRCH) logger(nrt-iface-ctx, LOG_ERR, if_route6: %m); if (if_route6(RTM_ADD, nrt) == 0) return 0; +#ifdef HAVE_ROUTE_METRIC +logerr: +#endif logger(nrt-iface-ctx, LOG_ERR, if_route6 (ADD): %m); return -1; -#endif } static int Index: src/external/bsd/dhcpcd/dist/defs.h diff -u src/external/bsd/dhcpcd/dist/defs.h:1.15 src/external/bsd/dhcpcd/dist/defs.h:1.16 --- src/external/bsd/dhcpcd/dist/defs.h:1.15 Thu Mar 26 10:26:37 2015 +++ src/external/bsd/dhcpcd/dist/defs.h Fri Mar 27 11:33:46 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: defs.h,v 1.15 2015/03/26 10:26:37 roy Exp $ */ +/* $NetBSD: defs.h,v 1.16 2015/03/27 11:33:46 roy Exp $ */ /* * dhcpcd - DHCP client daemon @@ -30,7 +30,7 @@ #define CONFIG_H #define PACKAGE dhcpcd -#define VERSION 6.8.0 +#define VERSION 6.8.1 #ifndef CONFIG # define CONFIG SYSCONFDIR / PACKAGE .conf Index: src/external/bsd/dhcpcd/dist/if-options.c diff -u src/external/bsd/dhcpcd/dist/if-options.c:1.21 src/external/bsd/dhcpcd/dist/if-options.c:1.22 --- src/external/bsd/dhcpcd/dist/if-options.c:1.21 Thu Mar 26 10:26:37 2015 +++ src/external/bsd/dhcpcd/dist/if-options.c Fri Mar 27 11:33:46 2015 @@ -1,5 +1,5 @@ #include sys/cdefs.h - __RCSID($NetBSD: if-options.c,v 1.21 2015/03/26 10:26:37 roy Exp $); + __RCSID($NetBSD: if-options.c,v 1.22 2015/03/27 11:33:46 roy Exp $); /* * dhcpcd - DHCP client daemon @@ -53,6 +53,7 @@ #include dhcp.h #include dhcp6.h #include dhcpcd-embedded.h +#include if.h #include if-options.h #include ipv4.h @@ -1041,7 +1042,7 @@ parse_option(struct dhcpcd_ctx *ctx, con } TAILQ_INIT(ifo-routes); } - rt = malloc(sizeof(*rt)); + rt = calloc(1, sizeof(*rt)); if (rt == NULL) { logger(ctx, LOG_ERR, %s: %m, __func__); *fp = ' '; @@ -1066,7 +1067,7 @@ parse_option(struct dhcpcd_ctx *ctx, con }
CVS commit: src/doc
Module Name:src Committed By: roy Date: Fri Mar 27 11:35:43 UTC 2015 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note import of dhcpcd-6.8.1 To generate a diff of this commit: cvs rdiff -u -r1.1213 -r1.1214 src/doc/3RDPARTY cvs rdiff -u -r1.2059 -r1.2060 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/3RDPARTY diff -u src/doc/3RDPARTY:1.1213 src/doc/3RDPARTY:1.1214 --- src/doc/3RDPARTY:1.1213 Thu Mar 26 10:37:06 2015 +++ src/doc/3RDPARTY Fri Mar 27 11:35:43 2015 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1213 2015/03/26 10:37:06 roy Exp $ +# $NetBSD: 3RDPARTY,v 1.1214 2015/03/27 11:35:43 roy Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -305,8 +305,8 @@ Notes: Use the dhcp2netbsd script. Package: dhcpcd -Version: 6.8.0 -Current Vers: 6.8.0 +Version: 6.8.1 +Current Vers: 6.8.1 Maintainer: roy Archive Site: ftp://roy.marples.name/pub/dhcpcd/ Home Page: http://roy.marples.name/projects/dhcpcd/ Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2059 src/doc/CHANGES:1.2060 --- src/doc/CHANGES:1.2059 Thu Mar 26 10:37:06 2015 +++ src/doc/CHANGES Fri Mar 27 11:35:43 2015 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.2059 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.2060 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -143,4 +143,4 @@ Changes from NetBSD 7.0 to NetBSD 8.0: service(8): Import adapted script from FreeBSD [ast 20150322] openssl: Import openssl 1.0.1m [spz 20150323] libc: Update to tzcode2015b. [christos 20150324] - dhcpcd(8): Import dhcpcd-6.8.0. [roy 20150326] + dhcpcd(8): Import dhcpcd-6.8.1. [roy 20150327]
CVS commit: src/external/bsd/dhcpcd/sbin/dhcpcd
Module Name:src Committed By: roy Date: Fri Mar 27 11:35:02 UTC 2015 Modified Files: src/external/bsd/dhcpcd/sbin/dhcpcd: Makefile Log Message: Crank up the warnings. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile diff -u src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.23 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.24 --- src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.23 Fri Dec 19 10:59:06 2014 +++ src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile Fri Mar 27 11:35:02 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.23 2014/12/19 10:59:06 roy Exp $ +# $NetBSD: Makefile,v 1.24 2015/03/27 11:35:02 roy Exp $ # PROG= dhcpcd @@ -7,7 +7,7 @@ SRCS+= if.c if-options.c script.c SRCS+= dhcp-common.c dhcpcd-embedded.c SRCS+= if-bsd.c -WARNS?= 5 +WARNS?= 6 USE_FORT?= yes # network client (local server) .include bsd.own.mk
CVS commit: src/sys/netipsec
Module Name:src Committed By: ozaki-r Date: Fri Mar 27 07:47:11 UTC 2015 Modified Files: src/sys/netipsec: xform_ipip.c Log Message: Remove unnecessary ifdef IPSEC To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/netipsec/xform_ipip.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/netipsec/xform_ipip.c diff -u src/sys/netipsec/xform_ipip.c:1.31 src/sys/netipsec/xform_ipip.c:1.32 --- src/sys/netipsec/xform_ipip.c:1.31 Thu Jun 5 23:48:17 2014 +++ src/sys/netipsec/xform_ipip.c Fri Mar 27 07:47:10 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: xform_ipip.c,v 1.31 2014/06/05 23:48:17 rmind Exp $ */ +/* $NetBSD: xform_ipip.c,v 1.32 2015/03/27 07:47:10 ozaki-r Exp $ */ /* $FreeBSD: src/sys/netipsec/xform_ipip.c,v 1.3.2.1 2003/01/24 05:11:36 sam Exp $ */ /* $OpenBSD: ip_ipip.c,v 1.25 2002/06/10 18:04:55 itojun Exp $ */ @@ -39,7 +39,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: xform_ipip.c,v 1.31 2014/06/05 23:48:17 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: xform_ipip.c,v 1.32 2015/03/27 07:47:10 ozaki-r Exp $); /* * IP-inside-IP processing @@ -646,7 +646,6 @@ bad: return (error); } -#ifdef IPSEC static int ipe4_init(struct secasvar *sav, const struct xformsw *xsp) { @@ -725,8 +724,6 @@ static struct ip6protosw ipe4_protosw6 = }; #endif -#endif /* IPSEC */ - /* * Check the encapsulated packet to see if we want it */
CVS commit: src/sys/arch/evbarm/rpi
Module Name:src Committed By: skrll Date: Fri Mar 27 11:42:28 UTC 2015 Modified Files: src/sys/arch/evbarm/rpi: rpi_start.S Log Message: Trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/evbarm/rpi/rpi_start.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/evbarm/rpi/rpi_start.S diff -u src/sys/arch/evbarm/rpi/rpi_start.S:1.13 src/sys/arch/evbarm/rpi/rpi_start.S:1.14 --- src/sys/arch/evbarm/rpi/rpi_start.S:1.13 Sat Feb 28 09:34:34 2015 +++ src/sys/arch/evbarm/rpi/rpi_start.S Fri Mar 27 11:42:28 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: rpi_start.S,v 1.13 2015/02/28 09:34:34 skrll Exp $ */ +/* $NetBSD: rpi_start.S,v 1.14 2015/03/27 11:42:28 skrll Exp $ */ /* * Copyright (c) 2002, 2003 Genetec Corporation. All rights reserved. @@ -94,7 +94,7 @@ #include arm/armreg.h #include assym.h -RCSID($NetBSD: rpi_start.S,v 1.13 2015/02/28 09:34:34 skrll Exp $) +RCSID($NetBSD: rpi_start.S,v 1.14 2015/03/27 11:42:28 skrll Exp $) /* * Workaround Erratum 411920 @@ -223,15 +223,15 @@ _C_LABEL(rpi_start): // When using split TTBRs, we need to set both since the physical // addresses we were/are using might be in either. mcr p15, 0, r0, c2, c0, 1 /* TTBR1 write */ -#endif +#endif #if defined(ARM_MMU_EXTENDED) mov r1, #TTBCR_S_N_1/* make sure TTBCR_S_N is 1 */ -#else +#else mov r1, #0 /* make sure TTBCR is 0 */ #endif mcr p15, 0, r1, c2, c0, 2 /* TTBCR write */ - + mov r0, #0 mcr p15, 0, r0, c8, c7, 0 /* Invalidate TLBs */
CVS commit: src/sys/dev/usb
Module Name:src Committed By: skrll Date: Fri Mar 27 12:46:51 UTC 2015 Modified Files: src/sys/dev/usb: usbdi_util.c usbdi_util.h Log Message: Add usbd_get_bos_desc{,_full} from Takahiro HAYASHI To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/sys/dev/usb/usbdi_util.c cvs rdiff -u -r1.45 -r1.46 src/sys/dev/usb/usbdi_util.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/usb/usbdi_util.c diff -u src/sys/dev/usb/usbdi_util.c:1.63 src/sys/dev/usb/usbdi_util.c:1.64 --- src/sys/dev/usb/usbdi_util.c:1.63 Fri Sep 12 16:40:38 2014 +++ src/sys/dev/usb/usbdi_util.c Fri Mar 27 12:46:51 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi_util.c,v 1.63 2014/09/12 16:40:38 skrll Exp $ */ +/* $NetBSD: usbdi_util.c,v 1.64 2015/03/27 12:46:51 skrll Exp $ */ /* * Copyright (c) 1998, 2012 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: usbdi_util.c,v 1.63 2014/09/12 16:40:38 skrll Exp $); +__KERNEL_RCSID(0, $NetBSD: usbdi_util.c,v 1.64 2015/03/27 12:46:51 skrll Exp $); #ifdef _KERNEL_OPT #include opt_usb.h @@ -105,6 +105,33 @@ usbd_get_config_desc_full(usbd_device_ha } usbd_status +usbd_get_bos_desc(usbd_device_handle dev, int confidx, + usb_bos_descriptor_t *d) +{ + usbd_status err; + + DPRINTFN(3,(usbd_get_bos_desc: confidx=%d\n, confidx)); + err = usbd_get_desc(dev, UDESC_BOS, confidx, + USB_BOS_DESCRIPTOR_SIZE, d); + if (err) + return (err); + if (d-bDescriptorType != UDESC_BOS) { + DPRINTFN(-1,(usbd_get_bos_desc: confidx=%d, bad desc + len=%d type=%d\n, + confidx, d-bLength, d-bDescriptorType)); + return (USBD_INVAL); + } + return (USBD_NORMAL_COMPLETION); +} + +usbd_status +usbd_get_bos_desc_full(usbd_device_handle dev, int conf, void *d, int size) +{ + DPRINTFN(3,(usbd_get_bos_desc_full: conf=%d\n, conf)); + return (usbd_get_desc(dev, UDESC_BOS, conf, size, d)); +} + +usbd_status usbd_get_device_desc(usbd_device_handle dev, usb_device_descriptor_t *d) { DPRINTFN(3,(usbd_get_device_desc:\n)); Index: src/sys/dev/usb/usbdi_util.h diff -u src/sys/dev/usb/usbdi_util.h:1.45 src/sys/dev/usb/usbdi_util.h:1.46 --- src/sys/dev/usb/usbdi_util.h:1.45 Thu Sep 26 07:25:31 2013 +++ src/sys/dev/usb/usbdi_util.h Fri Mar 27 12:46:51 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi_util.h,v 1.45 2013/09/26 07:25:31 skrll Exp $ */ +/* $NetBSD: usbdi_util.h,v 1.46 2015/03/27 12:46:51 skrll Exp $ */ /* * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc. @@ -40,6 +40,9 @@ usbd_status usbd_get_desc(usbd_device_ha usbd_status usbd_get_config_desc(usbd_device_handle, int, usb_config_descriptor_t *); usbd_status usbd_get_config_desc_full(usbd_device_handle, int, void *, int); +usbd_status usbd_get_bos_desc(usbd_device_handle, int, + usb_bos_descriptor_t *); +usbd_status usbd_get_bos_desc_full(usbd_device_handle, int, void *, int); usbd_status usbd_get_device_desc(usbd_device_handle dev, usb_device_descriptor_t *d); usbd_status usbd_set_address(usbd_device_handle dev, int addr);
CVS commit: src/doc
Module Name:src Committed By: msaitoh Date: Fri Mar 27 12:45:00 UTC 2015 Modified Files: src/doc: CHANGES Log Message: wm(4): Add X540 support. To generate a diff of this commit: cvs rdiff -u -r1.2060 -r1.2061 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.2060 src/doc/CHANGES:1.2061 --- src/doc/CHANGES:1.2060 Fri Mar 27 11:35:43 2015 +++ src/doc/CHANGES Fri Mar 27 12:45:00 2015 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.2060 $ +# LIST OF CHANGES FROM LAST RELEASE: $Revision: 1.2061 $ # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -144,3 +144,4 @@ Changes from NetBSD 7.0 to NetBSD 8.0: openssl: Import openssl 1.0.1m [spz 20150323] libc: Update to tzcode2015b. [christos 20150324] dhcpcd(8): Import dhcpcd-6.8.1. [roy 20150327] + wm(4): Add X540 support [msaitoh 20150327]
CVS commit: src/sys/ufs
Module Name:src Committed By: riastradh Date: Fri Mar 27 17:27:56 UTC 2015 Modified Files: src/sys/ufs/chfs: chfs_vnops.c src/sys/ufs/ext2fs: ext2fs_extern.h ext2fs_lookup.c ext2fs_readwrite.c ext2fs_rename.c ext2fs_vfsops.c ext2fs_vnops.c src/sys/ufs/ffs: ffs_extern.h ffs_vfsops.c src/sys/ufs/lfs: lfs_extern.h lfs_rename.c lfs_vnops.c ulfs_extern.h ulfs_lookup.c ulfs_readwrite.c ulfs_vnops.c src/sys/ufs/ufs: ufs_extern.h ufs_lookup.c ufs_readwrite.c ufs_rename.c ufs_vnops.c ufsmount.h Log Message: Disentangle buffer-cached I/O from page-cached I/O in UFS. Page-cached I/O is used for regular files, and is initiated by VFS users such as userland and NFS. Buffer-cached I/O is used for directories and symlinks, and is issued only internally by UFS. New UFS routine ufs_bufio replaces vn_rdwr for internal use. ufs_bufio is implemented by new UFS operations uo_bufrd/uo_bufwr, which sit in ufs_readwrite.c alongside the VOP_READ/VOP_WRITE implementations. I preserved the code as much as possible and will leave further simplification for future commits. I kept the ulfs_readwrite.c copypasta close to ufs_readwrite.c in case we ever want to merge them back; likewise ext2fs_readwrite.c. No externally visible semantic change. All atf fs tests still pass. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/ufs/chfs/chfs_vnops.c cvs rdiff -u -r1.47 -r1.48 src/sys/ufs/ext2fs/ext2fs_extern.h cvs rdiff -u -r1.77 -r1.78 src/sys/ufs/ext2fs/ext2fs_lookup.c cvs rdiff -u -r1.66 -r1.67 src/sys/ufs/ext2fs/ext2fs_readwrite.c cvs rdiff -u -r1.7 -r1.8 src/sys/ufs/ext2fs/ext2fs_rename.c cvs rdiff -u -r1.191 -r1.192 src/sys/ufs/ext2fs/ext2fs_vfsops.c cvs rdiff -u -r1.115 -r1.116 src/sys/ufs/ext2fs/ext2fs_vnops.c cvs rdiff -u -r1.81 -r1.82 src/sys/ufs/ffs/ffs_extern.h cvs rdiff -u -r1.325 -r1.326 src/sys/ufs/ffs/ffs_vfsops.c cvs rdiff -u -r1.101 -r1.102 src/sys/ufs/lfs/lfs_extern.h cvs rdiff -u -r1.7 -r1.8 src/sys/ufs/lfs/lfs_rename.c \ src/sys/ufs/lfs/ulfs_readwrite.c cvs rdiff -u -r1.269 -r1.270 src/sys/ufs/lfs/lfs_vnops.c cvs rdiff -u -r1.13 -r1.14 src/sys/ufs/lfs/ulfs_extern.h cvs rdiff -u -r1.21 -r1.22 src/sys/ufs/lfs/ulfs_lookup.c \ src/sys/ufs/lfs/ulfs_vnops.c cvs rdiff -u -r1.78 -r1.79 src/sys/ufs/ufs/ufs_extern.h cvs rdiff -u -r1.132 -r1.133 src/sys/ufs/ufs/ufs_lookup.c cvs rdiff -u -r1.107 -r1.108 src/sys/ufs/ufs/ufs_readwrite.c cvs rdiff -u -r1.11 -r1.12 src/sys/ufs/ufs/ufs_rename.c cvs rdiff -u -r1.225 -r1.226 src/sys/ufs/ufs/ufs_vnops.c cvs rdiff -u -r1.42 -r1.43 src/sys/ufs/ufs/ufsmount.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/ufs/chfs/chfs_vnops.c diff -u src/sys/ufs/chfs/chfs_vnops.c:1.24 src/sys/ufs/chfs/chfs_vnops.c:1.25 --- src/sys/ufs/chfs/chfs_vnops.c:1.24 Sun Jan 11 17:29:57 2015 +++ src/sys/ufs/chfs/chfs_vnops.c Fri Mar 27 17:27:55 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: chfs_vnops.c,v 1.24 2015/01/11 17:29:57 hannken Exp $ */ +/* $NetBSD: chfs_vnops.c,v 1.25 2015/03/27 17:27:55 riastradh Exp $ */ /*- * Copyright (c) 2010 Department of Software Engineering, @@ -1310,9 +1310,8 @@ chfs_symlink(void *v) uvm_vnp_setsize(vp, len); } else { - err = vn_rdwr(UIO_WRITE, vp, target, len, (off_t)0, - UIO_SYSSPACE, IO_NODELOCKED, cnp-cn_cred, - (size_t *)0, NULL); + err = ufs_bufio(UIO_WRITE, vp, target, len, (off_t)0, + IO_NODELOCKED, cnp-cn_cred, (size_t *)0, NULL); } out: @@ -1454,7 +1453,7 @@ chfs_readlink(void *v) return (0); } - return (VOP_READ(vp, uio, 0, cred)); + return (UFS_BUFRD(vp, uio, 0, cred)); } /* - */ Index: src/sys/ufs/ext2fs/ext2fs_extern.h diff -u src/sys/ufs/ext2fs/ext2fs_extern.h:1.47 src/sys/ufs/ext2fs/ext2fs_extern.h:1.48 --- src/sys/ufs/ext2fs/ext2fs_extern.h:1.47 Sun May 25 14:07:19 2014 +++ src/sys/ufs/ext2fs/ext2fs_extern.h Fri Mar 27 17:27:56 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ext2fs_extern.h,v 1.47 2014/05/25 14:07:19 hannken Exp $ */ +/* $NetBSD: ext2fs_extern.h,v 1.48 2015/03/27 17:27:56 riastradh Exp $ */ /*- * Copyright (c) 1991, 1993, 1994 @@ -147,6 +147,8 @@ void ext2fs_set_inode_guid(struct inode /* ext2fs_readwrite.c */ int ext2fs_read(void *); int ext2fs_write(void *); +int ext2fs_bufrd(struct vnode *, struct uio *, int, kauth_cred_t); +int ext2fs_bufwr(struct vnode *, struct uio *, int, kauth_cred_t); /* ext2fs_vnops.c */ int ext2fs_create(void *); Index: src/sys/ufs/ext2fs/ext2fs_lookup.c diff -u src/sys/ufs/ext2fs/ext2fs_lookup.c:1.77 src/sys/ufs/ext2fs/ext2fs_lookup.c:1.78 --- src/sys/ufs/ext2fs/ext2fs_lookup.c:1.77 Tue Jun 3 19:30:29 2014 +++ src/sys/ufs/ext2fs/ext2fs_lookup.c Fri Mar 27 17:27:56 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ext2fs_lookup.c,v 1.77 2014/06/03 19:30:29 joerg Exp $ */ +/* $NetBSD: ext2fs_lookup.c,v 1.78
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Fri Mar 27 17:56:16 UTC 2015 Modified Files: src/share/man/man9: wapbl.9 Log Message: Fix typo: VFS_UNMOUNT, not VFS_MOUNT, should call wapbl_stop. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man9/wapbl.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/wapbl.9 diff -u src/share/man/man9/wapbl.9:1.2 src/share/man/man9/wapbl.9:1.3 --- src/share/man/man9/wapbl.9:1.2 Thu Mar 26 22:04:38 2015 +++ src/share/man/man9/wapbl.9 Fri Mar 27 17:56:16 2015 @@ -1,4 +1,4 @@ -.\ $NetBSD: wapbl.9,v 1.2 2015/03/26 22:04:38 wiz Exp $ +.\ $NetBSD: wapbl.9,v 1.3 2015/03/27 17:56:16 riastradh Exp $ .\ .\ Copyright (c) 2015 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -149,7 +149,7 @@ and then, if the mount is read/write, in for the mount by calling .Fn wapbl_start . The -.Xr VFS_MOUNT 9 +.Xr VFS_UNMOUNT 9 method should call .Fn wapbl_stop . .Pp
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Fri Mar 27 19:48:37 UTC 2015 Modified Files: src/share/man/man9: wapbl.9 Log Message: Note that the wapbl transaction lock is nonrecursive. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/share/man/man9/wapbl.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/wapbl.9 diff -u src/share/man/man9/wapbl.9:1.3 src/share/man/man9/wapbl.9:1.4 --- src/share/man/man9/wapbl.9:1.3 Fri Mar 27 17:56:16 2015 +++ src/share/man/man9/wapbl.9 Fri Mar 27 19:48:37 2015 @@ -1,4 +1,4 @@ -.\ $NetBSD: wapbl.9,v 1.3 2015/03/27 17:56:16 riastradh Exp $ +.\ $NetBSD: wapbl.9,v 1.4 2015/03/27 19:48:37 riastradh Exp $ .\ .\ Copyright (c) 2015 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -317,6 +317,11 @@ The lock is not exclusive: other threads However, if there is not enough space, another thread will obtain an exclusive lock in order to flush the transaction. .Pp +The lock is not recursive: a thread may not acquire it again without +calling +.Fa wapbl_end +first. +.Pp May sleep. .Pp .Fa file
CVS commit: src/sys/ufs
Module Name:src Committed By: riastradh Date: Fri Mar 27 19:47:14 UTC 2015 Modified Files: src/sys/ufs/lfs: ulfs_readwrite.c ulfs_vnops.c src/sys/ufs/ufs: ufs_readwrite.c ufs_vnops.c Log Message: Tighten some kasserts in ufs_bufio code paths. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/ufs/lfs/ulfs_readwrite.c cvs rdiff -u -r1.22 -r1.23 src/sys/ufs/lfs/ulfs_vnops.c cvs rdiff -u -r1.108 -r1.109 src/sys/ufs/ufs/ufs_readwrite.c cvs rdiff -u -r1.226 -r1.227 src/sys/ufs/ufs/ufs_vnops.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/ufs/lfs/ulfs_readwrite.c diff -u src/sys/ufs/lfs/ulfs_readwrite.c:1.8 src/sys/ufs/lfs/ulfs_readwrite.c:1.9 --- src/sys/ufs/lfs/ulfs_readwrite.c:1.8 Fri Mar 27 17:27:56 2015 +++ src/sys/ufs/lfs/ulfs_readwrite.c Fri Mar 27 19:47:14 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ulfs_readwrite.c,v 1.8 2015/03/27 17:27:56 riastradh Exp $ */ +/* $NetBSD: ulfs_readwrite.c,v 1.9 2015/03/27 19:47:14 riastradh Exp $ */ /* from NetBSD: ufs_readwrite.c,v 1.105 2013/01/22 09:39:18 dholland Exp */ /*- @@ -33,7 +33,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: ulfs_readwrite.c,v 1.8 2015/03/27 17:27:56 riastradh Exp $); +__KERNEL_RCSID(1, $NetBSD: ulfs_readwrite.c,v 1.9 2015/03/27 19:47:14 riastradh Exp $); #ifdef LFS_READWRITE #define FS struct lfs @@ -510,6 +510,7 @@ BUFWR(struct vnode *vp, struct uio *uio, bool need_unreserve = false; #endif + KASSERT(ISSET(ioflag, IO_NODELOCKED)); KASSERT(VOP_ISLOCKED(vp) == LK_EXCLUSIVE); KASSERT(vp-v_type == VDIR || vp-v_type == VLNK); KASSERT(vp-v_type != VDIR || ISSET(ioflag, IO_SYNC)); Index: src/sys/ufs/lfs/ulfs_vnops.c diff -u src/sys/ufs/lfs/ulfs_vnops.c:1.22 src/sys/ufs/lfs/ulfs_vnops.c:1.23 --- src/sys/ufs/lfs/ulfs_vnops.c:1.22 Fri Mar 27 17:27:56 2015 +++ src/sys/ufs/lfs/ulfs_vnops.c Fri Mar 27 19:47:14 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ulfs_vnops.c,v 1.22 2015/03/27 17:27:56 riastradh Exp $ */ +/* $NetBSD: ulfs_vnops.c,v 1.23 2015/03/27 19:47:14 riastradh Exp $ */ /* from NetBSD: ufs_vnops.c,v 1.213 2013/06/08 05:47:02 kardel Exp */ /*- @@ -67,7 +67,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ulfs_vnops.c,v 1.22 2015/03/27 17:27:56 riastradh Exp $); +__KERNEL_RCSID(0, $NetBSD: ulfs_vnops.c,v 1.23 2015/03/27 19:47:14 riastradh Exp $); #if defined(_KERNEL_OPT) #include opt_lfs.h @@ -1329,13 +1329,9 @@ ulfs_bufio(enum uio_rw rw, struct vnode struct uio uio; int error; - /* XXX Remove me -- all callers should be locked. */ - if (!ISSET(ioflg, IO_NODELOCKED)) { - if (rw == UIO_READ) - vn_lock(vp, LK_SHARED | LK_RETRY); - else /* UIO_WRITE */ - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - } + KASSERT(ISSET(ioflg, IO_NODELOCKED)); + KASSERT(VOP_ISLOCKED(vp)); + KASSERT(rw != UIO_WRITE || VOP_ISLOCKED(vp) == LK_EXCLUSIVE); iov.iov_base = buf; iov.iov_len = len; @@ -1362,7 +1358,7 @@ ulfs_bufio(enum uio_rw rw, struct vnode else if (uio.uio_resid error == 0) error = EIO; - if (!ISSET(ioflg, IO_NODELOCKED)) - VOP_UNLOCK(vp); + KASSERT(VOP_ISLOCKED(vp)); + KASSERT(rw != UIO_WRITE || VOP_ISLOCKED(vp) == LK_EXCLUSIVE); return error; } Index: src/sys/ufs/ufs/ufs_readwrite.c diff -u src/sys/ufs/ufs/ufs_readwrite.c:1.108 src/sys/ufs/ufs/ufs_readwrite.c:1.109 --- src/sys/ufs/ufs/ufs_readwrite.c:1.108 Fri Mar 27 17:27:56 2015 +++ src/sys/ufs/ufs/ufs_readwrite.c Fri Mar 27 19:47:14 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ufs_readwrite.c,v 1.108 2015/03/27 17:27:56 riastradh Exp $ */ +/* $NetBSD: ufs_readwrite.c,v 1.109 2015/03/27 19:47:14 riastradh Exp $ */ /*- * Copyright (c) 1993 @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: ufs_readwrite.c,v 1.108 2015/03/27 17:27:56 riastradh Exp $); +__KERNEL_RCSID(1, $NetBSD: ufs_readwrite.c,v 1.109 2015/03/27 19:47:14 riastradh Exp $); #ifdef LFS_READWRITE #define FS struct lfs @@ -543,10 +543,13 @@ BUFWR(struct vnode *vp, struct uio *uio, bool need_unreserve = false; #endif + KASSERT(ISSET(ioflag, IO_NODELOCKED)); KASSERT(VOP_ISLOCKED(vp) == LK_EXCLUSIVE); KASSERT(vp-v_type == VDIR || vp-v_type == VLNK); KASSERT(vp-v_type != VDIR || ISSET(ioflag, IO_SYNC)); KASSERT(uio-uio_rw == UIO_WRITE); + KASSERT(ISSET(ioflag, IO_JOURNALLOCKED)); + UFS_WAPBL_JLOCK_ASSERT(vp-v_mount); ip = VTOI(vp); ump = ip-i_ump; @@ -573,8 +576,6 @@ BUFWR(struct vnode *vp, struct uio *uio, error = 0; KASSERT(vp-v_type != VREG); - KASSERT(ISSET(ioflag, IO_JOURNALLOCKED)); - UFS_WAPBL_JLOCK_ASSERT(vp-v_mount); #ifdef LFS_READWRITE lfs_availwait(fs, btofsb(fs, uio-uio_resid)); Index: src/sys/ufs/ufs/ufs_vnops.c diff -u src/sys/ufs/ufs/ufs_vnops.c:1.226 src/sys/ufs/ufs/ufs_vnops.c:1.227 --- src/sys/ufs/ufs/ufs_vnops.c:1.226 Fri Mar 27 17:27:56 2015 +++ src/sys/ufs/ufs/ufs_vnops.c Fri Mar 27 19:47:14 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ufs_vnops.c,v 1.226
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Fri Mar 27 19:58:58 UTC 2015 Modified Files: src/share/man/man9: wapbl.9 Log Message: Explain wapbl's relation to the garbage-appendage bug. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/share/man/man9/wapbl.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/wapbl.9 diff -u src/share/man/man9/wapbl.9:1.4 src/share/man/man9/wapbl.9:1.5 --- src/share/man/man9/wapbl.9:1.4 Fri Mar 27 19:48:37 2015 +++ src/share/man/man9/wapbl.9 Fri Mar 27 19:58:58 2015 @@ -1,4 +1,4 @@ -.\ $NetBSD: wapbl.9,v 1.4 2015/03/27 19:48:37 riastradh Exp $ +.\ $NetBSD: wapbl.9,v 1.5 2015/03/27 19:58:58 riastradh Exp $ .\ .\ Copyright (c) 2015 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -426,6 +426,26 @@ and .Xr ubc_uiomove 9 , which is normally used for file data. .Pp +Not only is +.Nm +unable to log writes via the page cache, it is also unable to defer +.Xr buffercache 9 +writes until cached pages have been written. +This manifests as the well-known garbage-data-appended-after-crash bug +in FFS: when appending to a file, the pages containing new data may not +reach the disk before the inode update reporting its new size. +After a crash, the inode update will be on disk, but the new data will +not be -- instead, whatever garbage data in the free space will appear +to have been appended to the file. +.Nm +exacerbates the problem by increasing the throughput of metadata +writes, because it can issue many metadata writes asynchronously that +FFS without +.Nm +would need to issue synchronously in order for +.Xr fsck 8 +to work. +.Pp There is only one .Nm transaction for each file system at any given time, and only one
CVS commit: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: christos Date: Fri Mar 27 18:51:08 UTC 2015 Modified Files: src/external/bsd/dhcpcd/dist: if-bsd.c Log Message: cast htons() args. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/external/bsd/dhcpcd/dist/if-bsd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/dist/if-bsd.c diff -u src/external/bsd/dhcpcd/dist/if-bsd.c:1.18 src/external/bsd/dhcpcd/dist/if-bsd.c:1.19 --- src/external/bsd/dhcpcd/dist/if-bsd.c:1.18 Thu Mar 26 06:26:37 2015 +++ src/external/bsd/dhcpcd/dist/if-bsd.c Fri Mar 27 14:51:08 2015 @@ -1,5 +1,5 @@ #include sys/cdefs.h - __RCSID($NetBSD: if-bsd.c,v 1.18 2015/03/26 10:26:37 roy Exp $); + __RCSID($NetBSD: if-bsd.c,v 1.19 2015/03/27 18:51:08 christos Exp $); /* * dhcpcd - DHCP client daemon @@ -388,7 +388,7 @@ if_sendrawpacket(const struct interface memset(hw, 0, ETHER_HDR_LEN); memset(hw.ether_dhost, 0xff, ETHER_ADDR_LEN); - hw.ether_type = htons(protocol); + hw.ether_type = htons((uint16_t)protocol); iov[0].iov_base = hw; iov[0].iov_len = ETHER_HDR_LEN; iov[1].iov_base = UNCONST(data); @@ -728,7 +728,7 @@ ifa_scope(struct sockaddr_in6 *sin, unsi /* KAME based systems want to store the scope inside the sin6_addr * for link local addreses */ if (IN6_IS_ADDR_LINKLOCAL(sin-sin6_addr)) { - uint16_t scope = htons(ifindex); + uint16_t scope = htons((uint16_t)ifindex); memcpy(sin-sin6_addr.s6_addr[2], scope, sizeof(scope)); }
CVS commit: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: christos Date: Fri Mar 27 18:53:15 UTC 2015 Modified Files: src/external/bsd/dhcpcd/dist: arp.c Log Message: cast htons To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/external/bsd/dhcpcd/dist/arp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/dist/arp.c diff -u src/external/bsd/dhcpcd/dist/arp.c:1.10 src/external/bsd/dhcpcd/dist/arp.c:1.11 --- src/external/bsd/dhcpcd/dist/arp.c:1.10 Thu Mar 26 06:26:37 2015 +++ src/external/bsd/dhcpcd/dist/arp.c Fri Mar 27 14:53:15 2015 @@ -1,5 +1,5 @@ #include sys/cdefs.h - __RCSID($NetBSD: arp.c,v 1.10 2015/03/26 10:26:37 roy Exp $); + __RCSID($NetBSD: arp.c,v 1.11 2015/03/27 18:53:15 christos Exp $); /* * dhcpcd - DHCP client daemon @@ -68,7 +68,7 @@ arp_send(const struct interface *ifp, in ar.ar_pro = htons(ETHERTYPE_IP); ar.ar_hln = ifp-hwlen; ar.ar_pln = sizeof(sip); - ar.ar_op = htons(op); + ar.ar_op = htons((uint16_t)op); p = arp_buffer; len = 0;
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Fri Mar 27 21:41:32 UTC 2015 Modified Files: src/share/man/man9: wapbl.9 Log Message: Make wording about who calls wapbl_*_buf consistent. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/share/man/man9/wapbl.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/wapbl.9 diff -u src/share/man/man9/wapbl.9:1.5 src/share/man/man9/wapbl.9:1.6 --- src/share/man/man9/wapbl.9:1.5 Fri Mar 27 19:58:58 2015 +++ src/share/man/man9/wapbl.9 Fri Mar 27 21:41:32 2015 @@ -1,4 +1,4 @@ -.\ $NetBSD: wapbl.9,v 1.5 2015/03/27 19:58:58 riastradh Exp $ +.\ $NetBSD: wapbl.9,v 1.6 2015/03/27 21:41:32 riastradh Exp $ .\ .\ Copyright (c) 2015 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -345,10 +345,8 @@ Add the buffer to the current transaction, which must be locked, because someone has asked to write it. .Pp -This is meant to be called by -.Xr bwrite 9 -or -.Xr bdwrite 9 , +This is meant to be called from within +.Xr buffercache 9 , not by file systems directly. .It Fn wapbl_remove_buf wl bp Remove the buffer
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Fri Mar 27 21:50:39 UTC 2015 Modified Files: src/share/man/man9: wapbl.9 Log Message: Explain resource estimation bug in wapbl(9). To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/share/man/man9/wapbl.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/wapbl.9 diff -u src/share/man/man9/wapbl.9:1.6 src/share/man/man9/wapbl.9:1.7 --- src/share/man/man9/wapbl.9:1.6 Fri Mar 27 21:41:32 2015 +++ src/share/man/man9/wapbl.9 Fri Mar 27 21:50:39 2015 @@ -1,4 +1,4 @@ -.\ $NetBSD: wapbl.9,v 1.6 2015/03/27 21:41:32 riastradh Exp $ +.\ $NetBSD: wapbl.9,v 1.7 2015/03/27 21:50:39 riastradh Exp $ .\ .\ Copyright (c) 2015 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -444,6 +444,15 @@ would need to issue synchronously in ord .Xr fsck 8 to work. .Pp +The criteria for when the transaction must be flushed to disk before +.Fn wapbl_begin +returns are heuristic, i.e. wrong. +There is no way for a file system to communicate to +.Fn wapbl_begin +how many buffers, inodes, and deallocations it will issue via +.Nm +in the transaction. +.Pp There is only one .Nm transaction for each file system at any given time, and only one
CVS commit: src/share/man/man9
Module Name:src Committed By: riastradh Date: Fri Mar 27 21:53:51 UTC 2015 Modified Files: src/share/man/man9: wapbl.9 Log Message: Whatever the original intent was, it works only for buffer cache../wapbl.9 To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/share/man/man9/wapbl.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/wapbl.9 diff -u src/share/man/man9/wapbl.9:1.7 src/share/man/man9/wapbl.9:1.8 --- src/share/man/man9/wapbl.9:1.7 Fri Mar 27 21:50:39 2015 +++ src/share/man/man9/wapbl.9 Fri Mar 27 21:53:50 2015 @@ -1,4 +1,4 @@ -.\ $NetBSD: wapbl.9,v 1.7 2015/03/27 21:50:39 riastradh Exp $ +.\ $NetBSD: wapbl.9,v 1.8 2015/03/27 21:53:50 riastradh Exp $ .\ .\ Copyright (c) 2015 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -415,7 +415,7 @@ with hooks in .Xr wapbl_replay 9 .Sh BUGS .Nm -is intended only for file system metadata managed via the +works only for file system metadata managed via the .Xr buffercache 9 , and provides no way to log writes via the page cache, as in .Xr VOP_GETPAGES 9 ,
CVS commit: src/libexec/ld.elf_so/arch/riscv
Module Name:src Committed By: matt Date: Fri Mar 27 23:14:53 UTC 2015 Modified Files: src/libexec/ld.elf_so/arch/riscv: mdreloc.c rtld_start.S Log Message: Update RISCV to use the ELF relocations and new ABI. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/libexec/ld.elf_so/arch/riscv/mdreloc.c \ src/libexec/ld.elf_so/arch/riscv/rtld_start.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/arch/riscv/mdreloc.c diff -u src/libexec/ld.elf_so/arch/riscv/mdreloc.c:1.1 src/libexec/ld.elf_so/arch/riscv/mdreloc.c:1.2 --- src/libexec/ld.elf_so/arch/riscv/mdreloc.c:1.1 Fri Sep 19 17:36:25 2014 +++ src/libexec/ld.elf_so/arch/riscv/mdreloc.c Fri Mar 27 23:14:53 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mdreloc.c,v 1.1 2014/09/19 17:36:25 matt Exp $ */ +/* $NetBSD: mdreloc.c,v 1.2 2015/03/27 23:14:53 matt Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: mdreloc.c,v 1.1 2014/09/19 17:36:25 matt Exp $); +__RCSID($NetBSD: mdreloc.c,v 1.2 2015/03/27 23:14:53 matt Exp $); #endif /* not lint */ #include sys/types.h @@ -48,12 +48,6 @@ void _rtld_bind_start(void); void _rtld_relocate_nonplt_self(Elf_Dyn *, Elf_Addr); void *_rtld_bind(const Obj_Entry *, Elf_Word); -#if ELFSIZE == 64 -#define Elf_Sxword Elf64_Sxword -#else -#define Elf_Sxword Elf32_Sword -#endif - void _rtld_setup_pltgot(const Obj_Entry *obj) { @@ -64,77 +58,31 @@ _rtld_setup_pltgot(const Obj_Entry *obj) void _rtld_relocate_nonplt_self(Elf_Dyn *dynp, Elf_Addr relocbase) { - const Elf_Rel *rel = 0, *rellim; - Elf_Addr relsz = 0; - Elf_Sxword *where; - const Elf_Sym *symtab = NULL, *sym; - Elf_Addr *got = NULL; - Elf_Word local_gotno = 0, symtabno = 0, gotsym = 0; - size_t i; + const Elf_Rela *rela = NULL, *relalim; + Elf_Addr relasz = 0; for (; dynp-d_tag != DT_NULL; dynp++) { switch (dynp-d_tag) { - case DT_REL: - rel = (const Elf_Rel *)(relocbase + dynp-d_un.d_ptr); - break; - case DT_RELSZ: - relsz = dynp-d_un.d_val; - break; - case DT_SYMTAB: - symtab = (const Elf_Sym *)(relocbase + dynp-d_un.d_ptr); - break; - case DT_PLTGOT: - got = (Elf_Addr *)(relocbase + dynp-d_un.d_ptr); + case DT_RELA: + rela = (const Elf_Rela *)(relocbase + dynp-d_un.d_ptr); break; - case DT_RISCV_LOCAL_GOTNO: - local_gotno = dynp-d_un.d_val; - break; - case DT_RISCV_SYMTABNO: - symtabno = dynp-d_un.d_val; - break; - case DT_RISCV_GOTSYM: - gotsym = dynp-d_un.d_val; + case DT_RELASZ: + relasz = dynp-d_un.d_val; break; } } - i = (got[1] 0x8000) ? 2 : 1; - /* Relocate the local GOT entries */ - got += i; - for (; i local_gotno; i++) - *got++ += relocbase; - sym = symtab + gotsym; - /* Now do the global GOT entries */ - for (i = gotsym; i symtabno; i++) { - *got = sym-st_value + relocbase; - ++sym; - ++got; - } + relalim = (const Elf_Rela *)((uintptr_t)rela + relasz); + for (; rela relalim; rela++) { + Elf_Word r_type = ELF_R_TYPE(rela-r_info); + Elf_Addr *where = (Elf_Addr *)(relocbase + rela-r_offset); - rellim = (const Elf_Rel *)((uintptr_t)rel + relsz); - for (; rel rellim; rel++) { - Elf_Word r_symndx, r_type; - - where = (Elf_Sxword *)(relocbase + rel-r_offset); - - r_symndx = ELF_R_SYM(rel-r_info); - r_type = ELF_R_TYPE(rel-r_info); - - switch (r_type 0xff) { - case R_TYPE(REL32): { - Elf_Sxword old = *where; - Elf_Sxword val = old; -#if ELFSIZE == 64 - assert(r_type == R_TYPE(REL32) - || r_type == (R_TYPE(REL32)|(R_TYPE(64) 8))); -#endif - assert(r_symndx gotsym); - sym = symtab + r_symndx; - assert(ELF_ST_BIND(sym-st_info) == STB_LOCAL); - val += relocbase; - *(Elf_Sword *)where = val; - rdbg((REL32/L(%p) %p - %p in self, - where, (void *)old, (void *)val)); + switch (r_type) { + case R_TYPE(RELATIVE): { + Elf_Addr val = relocbase + rela-r_addend; + *where = val; + rdbg((RELATIVE/L(%p) - %p in self, + where, (void *)val)); break; } @@ -150,122 +98,62 @@ _rtld_relocate_nonplt_self(Elf_Dyn *dynp int _rtld_relocate_nonplt_objects(Obj_Entry *obj) { - const Elf_Rel *rel; - Elf_Addr *got = obj-pltgot; - const Elf_Sym *sym, *def; + const Elf_Rela *rela; + const Elf_Sym *def; const Obj_Entry *defobj; - Elf_Word i; - - i = 2; - /* Relocate the local GOT entries */ - got += i; - for (; i obj-local_gotno; i++) - *got++ += (Elf_Addr)obj-relocbase; - - sym = obj-symtab + obj-gotsym; - /* Now do the global GOT entries */ - for (i = obj-gotsym; i obj-symtabno; i++) { - rdbg(( doing got %d sym %p (%s, %lx), i - obj-gotsym, sym, - sym-st_name + obj-strtab, (u_long) *got)); - - if (ELF_ST_TYPE(sym-st_info) == STT_FUNC - sym-st_value != 0 sym-st_shndx == SHN_UNDEF) { - /* - * If there are non-PLT references to the function, - * st_value should be 0, forcing us to resolve the
CVS commit: src/lib/libc/arch/riscv
Module Name:src Committed By: matt Date: Fri Mar 27 23:22:20 UTC 2015 Modified Files: src/lib/libc/arch/riscv: genassym.cf Log Message: Adapt to the jmpbuf changes. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/riscv/genassym.cf 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/riscv/genassym.cf diff -u src/lib/libc/arch/riscv/genassym.cf:1.1 src/lib/libc/arch/riscv/genassym.cf:1.2 --- src/lib/libc/arch/riscv/genassym.cf:1.1 Fri Sep 19 17:36:25 2014 +++ src/lib/libc/arch/riscv/genassym.cf Fri Mar 27 23:22:20 2015 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.1 2014/09/19 17:36:25 matt Exp $ +# $NetBSD: genassym.cf,v 1.2 2015/03/27 23:22:20 matt Exp $ # # Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -65,21 +65,17 @@ define JB_TP _JB_TP * sizeof(_BSD_JBSLO define JB_GP _JB_GP * sizeof(_BSD_JBSLOT_T_) define JB_FCSR _JB_FCSR * sizeof(_BSD_JBSLOT_T_) -define JB_F0 _JB_F0 * sizeof(_BSD_JBSLOT_T_) -define JB_F1 _JB_F1 * sizeof(_BSD_JBSLOT_T_) -define JB_F2 _JB_F2 * sizeof(_BSD_JBSLOT_T_) -define JB_F3 _JB_F3 * sizeof(_BSD_JBSLOT_T_) -define JB_F4 _JB_F4 * sizeof(_BSD_JBSLOT_T_) -define JB_F5 _JB_F5 * sizeof(_BSD_JBSLOT_T_) -define JB_F6 _JB_F6 * sizeof(_BSD_JBSLOT_T_) -define JB_F7 _JB_F7 * sizeof(_BSD_JBSLOT_T_) -define JB_F8 _JB_F8 * sizeof(_BSD_JBSLOT_T_) -define JB_F9 _JB_F9 * sizeof(_BSD_JBSLOT_T_) -define JB_F10 _JB_F10 * sizeof(_BSD_JBSLOT_T_) -define JB_F11 _JB_F11 * sizeof(_BSD_JBSLOT_T_) -define JB_F12 _JB_F12 * sizeof(_BSD_JBSLOT_T_) -define JB_F13 _JB_F13 * sizeof(_BSD_JBSLOT_T_) -define JB_F14 _JB_F14 * sizeof(_BSD_JBSLOT_T_) -define JB_F15 _JB_F15 * sizeof(_BSD_JBSLOT_T_) +define JB_FS0 _JB_FS0 * sizeof(_BSD_JBSLOT_T_) +define JB_FS1 _JB_FS1 * sizeof(_BSD_JBSLOT_T_) +define JB_FS2 _JB_FS2 * sizeof(_BSD_JBSLOT_T_) +define JB_FS3 _JB_FS3 * sizeof(_BSD_JBSLOT_T_) +define JB_FS4 _JB_FS4 * sizeof(_BSD_JBSLOT_T_) +define JB_FS5 _JB_FS5 * sizeof(_BSD_JBSLOT_T_) +define JB_FS6 _JB_FS6 * sizeof(_BSD_JBSLOT_T_) +define JB_FS7 _JB_FS7 * sizeof(_BSD_JBSLOT_T_) +define JB_FS8 _JB_FS8 * sizeof(_BSD_JBSLOT_T_) +define JB_FS9 _JB_FS9 * sizeof(_BSD_JBSLOT_T_) +define JB_FS10 _JB_FS10 * sizeof(_BSD_JBSLOT_T_) +define JB_FS11 _JB_FS11 * sizeof(_BSD_JBSLOT_T_) define JB_SIGMASK _JB_SIGMASK * sizeof(_BSD_JBSLOT_T_)
CVS commit: src/lib/libc/arch/riscv
Module Name:src Committed By: matt Date: Fri Mar 27 23:23:14 UTC 2015 Modified Files: src/lib/libc/arch/riscv/gen: __sigsetjmp14.S swapcontext.S src/lib/libc/arch/riscv/sys: __clone.S brk.S cerror.S sbrk.S Log Message: Adapt to new assembler. jump-tail[call] auipc/lo12 changes. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/arch/riscv/gen/__sigsetjmp14.S cvs rdiff -u -r1.2 -r1.3 src/lib/libc/arch/riscv/gen/swapcontext.S cvs rdiff -u -r1.2 -r1.3 src/lib/libc/arch/riscv/sys/__clone.S \ src/lib/libc/arch/riscv/sys/brk.S src/lib/libc/arch/riscv/sys/cerror.S \ src/lib/libc/arch/riscv/sys/sbrk.S 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/riscv/gen/__sigsetjmp14.S diff -u src/lib/libc/arch/riscv/gen/__sigsetjmp14.S:1.1 src/lib/libc/arch/riscv/gen/__sigsetjmp14.S:1.2 --- src/lib/libc/arch/riscv/gen/__sigsetjmp14.S:1.1 Fri Sep 19 17:36:25 2014 +++ src/lib/libc/arch/riscv/gen/__sigsetjmp14.S Fri Mar 27 23:23:14 2015 @@ -1,21 +1,21 @@ -/* $NetBSD: __sigsetjmp14.S,v 1.1 2014/09/19 17:36:25 matt Exp $ */ +/* $NetBSD: __sigsetjmp14.S,v 1.2 2015/03/27 23:23:14 matt Exp $ */ #include SYS.h #include assym.h #if defined(LIBC_SCCS) -__RCSID($NetBSD: __sigsetjmp14.S,v 1.1 2014/09/19 17:36:25 matt Exp $) +__RCSID($NetBSD: __sigsetjmp14.S,v 1.2 2015/03/27 23:23:14 matt Exp $) #endif ENTRY(__sigsetjmp14) bnez a1, 1f - jump PLT(_C_LABEL(_setjmp)) -1: jump PLT(_C_LABEL(__setjmp14)) + tail PLT(_C_LABEL(_setjmp)) +1: tail PLT(_C_LABEL(__setjmp14)) END(__sigsetjmp14) ENTRY(__siglongjmp14) REG_L a2, JB_MAGIC(a0) bnez a2, 1f - jump PLT(_C_LABEL(_longjmp)) -1: jump PLT(_C_LABEL(__longjmp14)) + tail PLT(_C_LABEL(_longjmp)) +1: tail PLT(_C_LABEL(__longjmp14)) END(__siglongjmp14) Index: src/lib/libc/arch/riscv/gen/swapcontext.S diff -u src/lib/libc/arch/riscv/gen/swapcontext.S:1.2 src/lib/libc/arch/riscv/gen/swapcontext.S:1.3 --- src/lib/libc/arch/riscv/gen/swapcontext.S:1.2 Fri Mar 27 06:44:28 2015 +++ src/lib/libc/arch/riscv/gen/swapcontext.S Fri Mar 27 23:23:14 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: swapcontext.S,v 1.2 2015/03/27 06:44:28 matt Exp $ */ +/* $NetBSD: swapcontext.S,v 1.3 2015/03/27 23:23:14 matt Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include SYS.h #include assym.h -__RCSID($NetBSD: swapcontext.S,v 1.2 2015/03/27 06:44:28 matt Exp $) +__RCSID($NetBSD: swapcontext.S,v 1.3 2015/03/27 23:23:14 matt Exp $) #define CALLFRAME_UCP CALLFRAME_S1 #define CALLFRAME_OUCP CALLFRAME_S0 @@ -56,7 +56,7 @@ ENTRY(swapcontext) REG_S ra, UC_GREGS_PC(a1) # pc - ra REG_S sp, UC_GREGS_SP(a1) # adjust sp - jump PLT(_C_LABEL(setcontext)) # setcontext(ucp) + tail PLT(_C_LABEL(setcontext)) # setcontext(ucp) 1: ret # simply return END(swapcontext) Index: src/lib/libc/arch/riscv/sys/__clone.S diff -u src/lib/libc/arch/riscv/sys/__clone.S:1.2 src/lib/libc/arch/riscv/sys/__clone.S:1.3 --- src/lib/libc/arch/riscv/sys/__clone.S:1.2 Fri Mar 27 06:44:28 2015 +++ src/lib/libc/arch/riscv/sys/__clone.S Fri Mar 27 23:23:14 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: __clone.S,v 1.2 2015/03/27 06:44:28 matt Exp $ */ +/* $NetBSD: __clone.S,v 1.3 2015/03/27 23:23:14 matt Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ #include SYS.h #if defined(SYSLIBC_SCCS) !defined(lint) - RCSID($NetBSD: __clone.S,v 1.2 2015/03/27 06:44:28 matt Exp $); + RCSID($NetBSD: __clone.S,v 1.3 2015/03/27 23:23:14 matt Exp $); #endif /* SYSLIBC_SCCS and not lint */ #ifdef WEAK_ALIAS @@ -92,7 +92,7 @@ ENTRY(__clone) jalr t0 /* Pass the return value to _exit. */ - jump _C_LABEL(_exit) + tail _C_LABEL(_exit) /* NOTREACHED */ END(__clone) Index: src/lib/libc/arch/riscv/sys/brk.S diff -u src/lib/libc/arch/riscv/sys/brk.S:1.2 src/lib/libc/arch/riscv/sys/brk.S:1.3 --- src/lib/libc/arch/riscv/sys/brk.S:1.2 Fri Mar 27 06:44:28 2015 +++ src/lib/libc/arch/riscv/sys/brk.S Fri Mar 27 23:23:14 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: brk.S,v 1.2 2015/03/27 06:44:28 matt Exp $ */ +/* $NetBSD: brk.S,v 1.3 2015/03/27 23:23:14 matt Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include SYS.h #if defined(LIBC_SCCS) !defined(lint) - RCSID($NetBSD: brk.S,v 1.2 2015/03/27 06:44:28 matt Exp $) + RCSID($NetBSD: brk.S,v 1.3 2015/03/27 23:23:14 matt Exp $) #endif /* LIBC_SCCS and not lint */ .hidden _C_LABEL(__minbrk) @@ -55,8 +55,8 @@ _C_LABEL(__curbrk): .text ENTRY(_brk) - auipc t1, %pcrel_hi(_C_LABEL(__minbrk)) - addi t1, t1, %pcrel_lo(_C_LABEL(__minbrk)) +.L0: auipc t1, %pcrel_hi(_C_LABEL(__minbrk)) + addi t1, t1, %pcrel_lo(.L0) PTR_L t5, 0(t1) bgeu a0, t5, 1f move a0, t5 # dont allow break minbrk Index: src/lib/libc/arch/riscv/sys/cerror.S diff -u src/lib/libc/arch/riscv/sys/cerror.S:1.2 src/lib/libc/arch/riscv/sys/cerror.S:1.3 ---
CVS commit: src/usr.sbin/service
Module Name:src Committed By: ast Date: Fri Mar 27 23:25:42 UTC 2015 Modified Files: src/usr.sbin/service: service Log Message: Integrate some feedback gleened from tech-userle...@netbsd.org: Avoid ls -P so that script can also run pre-netbsd-7. Make sure /etc/rc.conf.d configurations are supported. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/service/service 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/service/service diff -u src/usr.sbin/service/service:1.4 src/usr.sbin/service/service:1.5 --- src/usr.sbin/service/service:1.4 Mon Mar 23 23:28:55 2015 +++ src/usr.sbin/service/service Fri Mar 27 23:25:42 2015 @@ -1,5 +1,5 @@ #!/bin/sh -#$NetBSD: service,v 1.4 2015/03/23 23:28:55 ast Exp $ +#$NetBSD: service,v 1.5 2015/03/27 23:25:42 ast Exp $ #service -- run or list system services # # Taken from FreeBSD: releng/10.1/usr.sbin/service/service.sh 268098 @@ -44,11 +44,15 @@ usage () exit 1 } -rc_files() +# list all files in rc_directories with absolute pathnames +# written to be compatible with ls(1) from pre netbsd-7 +_rc_files() { -local dir -for dir in ${rc_directories}; do -[ -d ${dir} ] ls -P1 ${dir} 2/dev/null +local _d _f +for _d in ${rc_directories}; do +if [ -d $_d ]; then +for _f in $_d/*; do [ -f $_f -a -x $_f ] echo $_f; done +fi done | xargs rcorder -s nostart ${rc_rcorder_flags} 2/dev/null return 0 } @@ -75,12 +79,15 @@ if [ -n ${ENABLED} ]; then then flt=$( echo $* | sed -e 's; ;|;g' -e 's;^;egrep /(;' -e 's;$;)$;' ) fi -rc_files | $flt | while read file +_rc_files | $flt | while read file do if grep -q ^rcvar $file; then eval $( grep ^name= $file ) eval $( grep ^rcvar $file ) -checkyesno ${rcvar} 2/dev/null echo ${file} +if [ -n ${rcvar} ]; then +load_rc_config ${rcvar} +checkyesno ${rcvar} 2/dev/null echo ${file} +fi fi done exit 0 @@ -88,7 +95,7 @@ fi if [ -n ${LIST} ]; then [ -n ${VERBOSE} ] echo rc_directories is ${rc_directories} 2 -rc_files +_rc_files exit 0 fi
CVS commit: src/sys/arch/riscv/include
Module Name:src Committed By: matt Date: Fri Mar 27 23:26:14 UTC 2015 Modified Files: src/sys/arch/riscv/include: elf_machdep.h Log Message: Fix one error and make life for ld.elf_so a little easier. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/riscv/include/elf_machdep.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/riscv/include/elf_machdep.h diff -u src/sys/arch/riscv/include/elf_machdep.h:1.2 src/sys/arch/riscv/include/elf_machdep.h:1.3 --- src/sys/arch/riscv/include/elf_machdep.h:1.2 Fri Mar 27 06:57:21 2015 +++ src/sys/arch/riscv/include/elf_machdep.h Fri Mar 27 23:26:14 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: elf_machdep.h,v 1.2 2015/03/27 06:57:21 matt Exp $ */ +/* $NetBSD: elf_machdep.h,v 1.3 2015/03/27 23:26:14 matt Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ #define R_RISCV_TLS_DTPMOD64 8 #define R_RISCV_TLS_DTPREL64 9 #define R_RISCV_TLS_TPREL32 10 -#define R_RISCV_TLS_DTPREL64 11 +#define R_RISCV_TLS_TPREL64 11 /* The rest are not used by the dynamic linker */ #define R_RISCV_BRANCH 16 // (A - P) 0x @@ -98,12 +98,15 @@ #define R_RISCV_GNU_VTENTRY 42 #define R_RISCV_ALIGN 43 +/* These are aliases we can use R_TYPESZ */ +#define R_RISCV_ADDR32 R_RISCV_32 +#define R_RISCV_ADDR64 R_RISCV_64 #define R_TYPE(name) R_RISCV_ ## name #if ELFSIZE == 32 -#define R_TLS_TYPE(name) R_RISCV_ ## name ## 32 +#define R_TYPESZ(name) R_RISCV_ ## name ## 32 #else -#define R_TLS_TYPE(name) R_RISCV_ ## name ## 64 +#define R_TYPESZ(name) R_RISCV_ ## name ## 64 #endif #ifdef _KERNEL
CVS commit: src/lib/libm/arch/riscv
Module Name:src Committed By: matt Date: Fri Mar 27 23:35:40 UTC 2015 Modified Files: src/lib/libm/arch/riscv: e_sqrt.S e_sqrtf.S lrint.S lrintf.S s_copysign.S s_copysignf.S s_fabs.S s_fabsf.S s_fma.S s_fmaf.S s_fmax.S s_fmaxf.S s_fmin.S s_fminf.S Log Message: Update to new RISCV ABI To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libm/arch/riscv/e_sqrt.S \ src/lib/libm/arch/riscv/e_sqrtf.S src/lib/libm/arch/riscv/lrint.S \ src/lib/libm/arch/riscv/lrintf.S src/lib/libm/arch/riscv/s_copysignf.S \ src/lib/libm/arch/riscv/s_fabs.S src/lib/libm/arch/riscv/s_fabsf.S \ src/lib/libm/arch/riscv/s_fma.S src/lib/libm/arch/riscv/s_fmaf.S \ src/lib/libm/arch/riscv/s_fmax.S src/lib/libm/arch/riscv/s_fmaxf.S \ src/lib/libm/arch/riscv/s_fmin.S src/lib/libm/arch/riscv/s_fminf.S cvs rdiff -u -r1.3 -r1.4 src/lib/libm/arch/riscv/s_copysign.S 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/arch/riscv/e_sqrt.S diff -u src/lib/libm/arch/riscv/e_sqrt.S:1.1 src/lib/libm/arch/riscv/e_sqrt.S:1.2 --- src/lib/libm/arch/riscv/e_sqrt.S:1.1 Fri Sep 19 17:36:25 2014 +++ src/lib/libm/arch/riscv/e_sqrt.S Fri Mar 27 23:35:40 2015 @@ -1,10 +1,10 @@ -/* $NetBSD: e_sqrt.S,v 1.1 2014/09/19 17:36:25 matt Exp $ */ +/* $NetBSD: e_sqrt.S,v 1.2 2015/03/27 23:35:40 matt Exp $ */ /* The contents of this file are in the public domain. */ #include machine/asm.h ENTRY(__ieee754_sqrt) - fsqrt.d fv0, fa0 + fsqrt.d fa0, fa0 ret END(__ieee754_sqrt) Index: src/lib/libm/arch/riscv/e_sqrtf.S diff -u src/lib/libm/arch/riscv/e_sqrtf.S:1.1 src/lib/libm/arch/riscv/e_sqrtf.S:1.2 --- src/lib/libm/arch/riscv/e_sqrtf.S:1.1 Fri Sep 19 17:36:25 2014 +++ src/lib/libm/arch/riscv/e_sqrtf.S Fri Mar 27 23:35:40 2015 @@ -1,10 +1,10 @@ -/* $NetBSD: e_sqrtf.S,v 1.1 2014/09/19 17:36:25 matt Exp $ */ +/* $NetBSD: e_sqrtf.S,v 1.2 2015/03/27 23:35:40 matt Exp $ */ /* The contents of this file are in the public domain. */ #include machine/asm.h ENTRY(__ieee754_sqrtf) - fsqrt.s fv0, fa0 + fsqrt.s fa0, fa0 ret END(__ieee754_sqrtf) Index: src/lib/libm/arch/riscv/lrint.S diff -u src/lib/libm/arch/riscv/lrint.S:1.1 src/lib/libm/arch/riscv/lrint.S:1.2 --- src/lib/libm/arch/riscv/lrint.S:1.1 Fri Sep 19 17:36:25 2014 +++ src/lib/libm/arch/riscv/lrint.S Fri Mar 27 23:35:40 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: lrint.S,v 1.1 2014/09/19 17:36:25 matt Exp $ */ +/* $NetBSD: lrint.S,v 1.2 2015/03/27 23:35:40 matt Exp $ */ /* The contents of this file are in the public domain. */ @@ -10,9 +10,9 @@ STRONG_ALIAS(llrint,lrint) ENTRY(lrint) #ifdef _LP64 - fcvt.l.d v0, fa0 + fcvt.l.d a0, fa0 #else - fcvt.w.d v0, fa0 + fcvt.w.d a0, fa0 #endif ret END(lrint) Index: src/lib/libm/arch/riscv/lrintf.S diff -u src/lib/libm/arch/riscv/lrintf.S:1.1 src/lib/libm/arch/riscv/lrintf.S:1.2 --- src/lib/libm/arch/riscv/lrintf.S:1.1 Fri Sep 19 17:36:25 2014 +++ src/lib/libm/arch/riscv/lrintf.S Fri Mar 27 23:35:40 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: lrintf.S,v 1.1 2014/09/19 17:36:25 matt Exp $ */ +/* $NetBSD: lrintf.S,v 1.2 2015/03/27 23:35:40 matt Exp $ */ /* The contents of this file are in the public domain. */ @@ -10,9 +10,9 @@ STRONG_ALIAS(llrintf,lrintf) ENTRY(lrintf) #ifdef _LP64 - fcvt.l.s v0, fa0 + fcvt.l.s a0, fa0 #else - fcvt.w.s v0, fa0 + fcvt.w.s a0, fa0 #endif ret END(lrintf) Index: src/lib/libm/arch/riscv/s_copysignf.S diff -u src/lib/libm/arch/riscv/s_copysignf.S:1.1 src/lib/libm/arch/riscv/s_copysignf.S:1.2 --- src/lib/libm/arch/riscv/s_copysignf.S:1.1 Fri Sep 19 17:36:25 2014 +++ src/lib/libm/arch/riscv/s_copysignf.S Fri Mar 27 23:35:40 2015 @@ -1,10 +1,10 @@ -/* $NetBSD: s_copysignf.S,v 1.1 2014/09/19 17:36:25 matt Exp $ */ +/* $NetBSD: s_copysignf.S,v 1.2 2015/03/27 23:35:40 matt Exp $ */ /* The contents of this file are in the public domain. */ #include machine/asm.h ENTRY(copysignf) - fsgnj.s fv0, fa0, fa1 + fsgnj.s fa0, fa0, fa1 ret END(copysignf) Index: src/lib/libm/arch/riscv/s_fabs.S diff -u src/lib/libm/arch/riscv/s_fabs.S:1.1 src/lib/libm/arch/riscv/s_fabs.S:1.2 --- src/lib/libm/arch/riscv/s_fabs.S:1.1 Fri Sep 19 17:36:25 2014 +++ src/lib/libm/arch/riscv/s_fabs.S Fri Mar 27 23:35:40 2015 @@ -1,10 +1,10 @@ -/* $NetBSD: s_fabs.S,v 1.1 2014/09/19 17:36:25 matt Exp $ */ +/* $NetBSD: s_fabs.S,v 1.2 2015/03/27 23:35:40 matt Exp $ */ /* The contents of this file are in the public domain. */ #include machine/asm.h ENTRY(fabs) - fabs.d fv0, fa0 + fabs.d fa0, fa0 ret END(fabs) Index: src/lib/libm/arch/riscv/s_fabsf.S diff -u src/lib/libm/arch/riscv/s_fabsf.S:1.1 src/lib/libm/arch/riscv/s_fabsf.S:1.2 --- src/lib/libm/arch/riscv/s_fabsf.S:1.1 Fri Sep 19 17:36:25 2014 +++ src/lib/libm/arch/riscv/s_fabsf.S Fri Mar 27 23:35:40 2015 @@ -1,10 +1,10 @@ -/* $NetBSD: s_fabsf.S,v 1.1 2014/09/19 17:36:25 matt Exp $ */ +/* $NetBSD: s_fabsf.S,v 1.2
CVS commit: src/sys/ufs/ext2fs
Module Name:src Committed By: riastradh Date: Sat Mar 28 03:49:41 UTC 2015 Modified Files: src/sys/ufs/ext2fs: ext2fs_readwrite.c Log Message: Missed another spot, in ext2fs_write. To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/sys/ufs/ext2fs/ext2fs_readwrite.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/ufs/ext2fs/ext2fs_readwrite.c diff -u src/sys/ufs/ext2fs/ext2fs_readwrite.c:1.68 src/sys/ufs/ext2fs/ext2fs_readwrite.c:1.69 --- src/sys/ufs/ext2fs/ext2fs_readwrite.c:1.68 Sat Mar 28 03:46:51 2015 +++ src/sys/ufs/ext2fs/ext2fs_readwrite.c Sat Mar 28 03:49:41 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ext2fs_readwrite.c,v 1.68 2015/03/28 03:46:51 riastradh Exp $ */ +/* $NetBSD: ext2fs_readwrite.c,v 1.69 2015/03/28 03:49:41 riastradh Exp $ */ /*- * Copyright (c) 1993 @@ -60,7 +60,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ext2fs_readwrite.c,v 1.68 2015/03/28 03:46:51 riastradh Exp $); +__KERNEL_RCSID(0, $NetBSD: ext2fs_readwrite.c,v 1.69 2015/03/28 03:49:41 riastradh Exp $); #include sys/param.h #include sys/systm.h @@ -284,12 +284,6 @@ ext2fs_write(void *v) if ((ip-i_e2fs_flags EXT2_APPEND) uio-uio_offset != ext2fs_size(ip)) return (EPERM); - /* FALLTHROUGH */ - case VLNK: - break; - case VDIR: - if ((ioflag IO_SYNC) == 0) - panic(%s: nonsync dir write, ext2fs_write); break; default: panic(%s: type, ext2fs_write);
CVS commit: src/external/gpl3/gcc/dist/gcc
Module Name:src Committed By: matt Date: Sat Mar 28 00:47:18 UTC 2015 Modified Files: src/external/gpl3/gcc/dist/gcc/common/config/riscv: riscv-common.c src/external/gpl3/gcc/dist/gcc/config/riscv: netbsd.h riscv.h Log Message: Make sure the RISCV compiler defaults to FDIV enabled. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/gpl3/gcc/dist/gcc/common/config/riscv/riscv-common.c cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/dist/gcc/config/riscv/netbsd.h cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gcc/dist/gcc/config/riscv/riscv.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/gcc/common/config/riscv/riscv-common.c diff -u src/external/gpl3/gcc/dist/gcc/common/config/riscv/riscv-common.c:1.2 src/external/gpl3/gcc/dist/gcc/common/config/riscv/riscv-common.c:1.3 --- src/external/gpl3/gcc/dist/gcc/common/config/riscv/riscv-common.c:1.2 Fri Mar 27 01:51:34 2015 +++ src/external/gpl3/gcc/dist/gcc/common/config/riscv/riscv-common.c Sat Mar 28 00:47:17 2015 @@ -119,7 +119,8 @@ static const struct default_options risc #undef TARGET_DEFAULT_TARGET_FLAGS #define TARGET_DEFAULT_TARGET_FLAGS\ - (riscv_flags_from_arch_string (RISCV_ARCH_STRING_DEFAULT) \ + (TARGET_DEFAULT \ + | riscv_flags_from_arch_string (RISCV_ARCH_STRING_DEFAULT) \ | (TARGET_64BIT_DEFAULT ? 0 : MASK_32BIT)) #undef TARGET_HANDLE_OPTION Index: src/external/gpl3/gcc/dist/gcc/config/riscv/netbsd.h diff -u src/external/gpl3/gcc/dist/gcc/config/riscv/netbsd.h:1.1 src/external/gpl3/gcc/dist/gcc/config/riscv/netbsd.h:1.2 --- src/external/gpl3/gcc/dist/gcc/config/riscv/netbsd.h:1.1 Fri Sep 19 17:20:29 2014 +++ src/external/gpl3/gcc/dist/gcc/config/riscv/netbsd.h Sat Mar 28 00:47:17 2015 @@ -27,7 +27,7 @@ Boston, MA 02111-1307, USA. */ #define DRIVER_SELF_SPECS #undef TARGET_DEFAULT -#define TARGET_DEFAULT MASK_FDIV +#define TARGET_DEFAULT (MASK_ATOMIC | MASK_FDIV) #define TARGET_OS_CPP_BUILTINS()\ do {\ Index: src/external/gpl3/gcc/dist/gcc/config/riscv/riscv.h diff -u src/external/gpl3/gcc/dist/gcc/config/riscv/riscv.h:1.2 src/external/gpl3/gcc/dist/gcc/config/riscv/riscv.h:1.3 --- src/external/gpl3/gcc/dist/gcc/config/riscv/riscv.h:1.2 Fri Mar 27 01:51:34 2015 +++ src/external/gpl3/gcc/dist/gcc/config/riscv/riscv.h Sat Mar 28 00:47:17 2015 @@ -104,7 +104,7 @@ along with GCC; see the file COPYING3. /* Default target_flags if no switches are specified */ #ifndef TARGET_DEFAULT -#define TARGET_DEFAULT (TARGET_ATOMIC | +#define TARGET_DEFAULT (MASK_ATOMIC) #endif #ifndef RISCV_ARCH_STRING_DEFAULT
CVS commit: src/sys/ufs
Module Name:src Committed By: riastradh Date: Sat Mar 28 03:53:36 UTC 2015 Modified Files: src/sys/ufs/ext2fs: ext2fs_readwrite.c src/sys/ufs/lfs: ulfs_readwrite.c src/sys/ufs/ufs: ufs_readwrite.c Log Message: Turn some `#if DIAGNOSTIC' into KASSERT. To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/sys/ufs/ext2fs/ext2fs_readwrite.c cvs rdiff -u -r1.9 -r1.10 src/sys/ufs/lfs/ulfs_readwrite.c cvs rdiff -u -r1.109 -r1.110 src/sys/ufs/ufs/ufs_readwrite.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/ufs/ext2fs/ext2fs_readwrite.c diff -u src/sys/ufs/ext2fs/ext2fs_readwrite.c:1.69 src/sys/ufs/ext2fs/ext2fs_readwrite.c:1.70 --- src/sys/ufs/ext2fs/ext2fs_readwrite.c:1.69 Sat Mar 28 03:49:41 2015 +++ src/sys/ufs/ext2fs/ext2fs_readwrite.c Sat Mar 28 03:53:36 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ext2fs_readwrite.c,v 1.69 2015/03/28 03:49:41 riastradh Exp $ */ +/* $NetBSD: ext2fs_readwrite.c,v 1.70 2015/03/28 03:53:36 riastradh Exp $ */ /*- * Copyright (c) 1993 @@ -60,7 +60,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ext2fs_readwrite.c,v 1.69 2015/03/28 03:49:41 riastradh Exp $); +__KERNEL_RCSID(0, $NetBSD: ext2fs_readwrite.c,v 1.70 2015/03/28 03:53:36 riastradh Exp $); #include sys/param.h #include sys/systm.h @@ -108,13 +108,9 @@ ext2fs_read(void *v) uio = ap-a_uio; error = 0; -#ifdef DIAGNOSTIC - if (uio-uio_rw != UIO_READ) - panic(%s: mode, ext2fs_read); - - if (vp-v_type != VREG vp-v_type != VDIR) - panic(%s: type %d, ext2fs_read, vp-v_type); -#endif + KASSERT(uio-uio_rw == UIO_READ); + KASSERT(vp-v_type == VREG || vp-v_type == VDIR); + /* XXX Eliminate me by refusing directory reads from userland. */ if (vp-v_type == VDIR) return ext2fs_bufrd(vp, uio, ap-a_ioflag, ap-a_cred); @@ -272,22 +268,14 @@ ext2fs_write(void *v) ump = ip-i_ump; error = 0; -#ifdef DIAGNOSTIC - if (uio-uio_rw != UIO_WRITE) - panic(%s: mode, ext2fs_write); -#endif - - switch (vp-v_type) { - case VREG: - if (ioflag IO_APPEND) - uio-uio_offset = ext2fs_size(ip); - if ((ip-i_e2fs_flags EXT2_APPEND) - uio-uio_offset != ext2fs_size(ip)) - return (EPERM); - break; - default: - panic(%s: type, ext2fs_write); - } + KASSERT(uio-uio_rw == UIO_WRITE); + KASSERT(vp-v_type == VREG); + + if (ioflag IO_APPEND) + uio-uio_offset = ext2fs_size(ip); + if ((ip-i_e2fs_flags EXT2_APPEND) + uio-uio_offset != ext2fs_size(ip)) + return (EPERM); fs = ip-i_e2fs; if (uio-uio_offset 0 || Index: src/sys/ufs/lfs/ulfs_readwrite.c diff -u src/sys/ufs/lfs/ulfs_readwrite.c:1.9 src/sys/ufs/lfs/ulfs_readwrite.c:1.10 --- src/sys/ufs/lfs/ulfs_readwrite.c:1.9 Fri Mar 27 19:47:14 2015 +++ src/sys/ufs/lfs/ulfs_readwrite.c Sat Mar 28 03:53:36 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ulfs_readwrite.c,v 1.9 2015/03/27 19:47:14 riastradh Exp $ */ +/* $NetBSD: ulfs_readwrite.c,v 1.10 2015/03/28 03:53:36 riastradh Exp $ */ /* from NetBSD: ufs_readwrite.c,v 1.105 2013/01/22 09:39:18 dholland Exp */ /*- @@ -33,7 +33,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: ulfs_readwrite.c,v 1.9 2015/03/27 19:47:14 riastradh Exp $); +__KERNEL_RCSID(1, $NetBSD: ulfs_readwrite.c,v 1.10 2015/03/28 03:53:36 riastradh Exp $); #ifdef LFS_READWRITE #define FS struct lfs @@ -84,13 +84,9 @@ READ(void *v) ioflag = ap-a_ioflag; error = 0; -#ifdef DIAGNOSTIC - if (uio-uio_rw != UIO_READ) - panic(%s: mode, READ_S); + KASSERT(uio-uio_rw == UIO_READ); + KASSERT(vp-v_type == VREG || vp-v_type == VDIR); - if (vp-v_type != VREG vp-v_type != VDIR) - panic(%s: type %d, READ_S, vp-v_type); -#endif /* XXX Eliminate me by refusing directory reads from userland. */ if (vp-v_type == VDIR) return BUFRD(vp, uio, ioflag, ap-a_cred); @@ -269,21 +265,13 @@ WRITE(void *v) ip = VTOI(vp); KASSERT(vp-v_size == ip-i_size); -#ifdef DIAGNOSTIC - if (uio-uio_rw != UIO_WRITE) - panic(%s: mode, WRITE_S); -#endif + KASSERT(uio-uio_rw == UIO_WRITE); + KASSERT(vp-v_type == VREG); - switch (vp-v_type) { - case VREG: - if (ioflag IO_APPEND) - uio-uio_offset = ip-i_size; - if ((ip-i_flags APPEND) uio-uio_offset != ip-i_size) - return (EPERM); - break; - default: - panic(%s: type, WRITE_S); - } + if (ioflag IO_APPEND) + uio-uio_offset = ip-i_size; + if ((ip-i_flags APPEND) uio-uio_offset != ip-i_size) + return (EPERM); fs = ip-I_FS; if (uio-uio_offset 0 || Index: src/sys/ufs/ufs/ufs_readwrite.c diff -u src/sys/ufs/ufs/ufs_readwrite.c:1.109 src/sys/ufs/ufs/ufs_readwrite.c:1.110 --- src/sys/ufs/ufs/ufs_readwrite.c:1.109 Fri Mar 27 19:47:14 2015 +++ src/sys/ufs/ufs/ufs_readwrite.c Sat Mar 28 03:53:36 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ufs_readwrite.c,v 1.109 2015/03/27 19:47:14 riastradh Exp $ */ +/* $NetBSD: ufs_readwrite.c,v 1.110 2015/03/28 03:53:36 riastradh Exp $ */ /*- * Copyright (c) 1993 @@ -32,7 +32,7 @@ */ #include
CVS commit: src/sys/ufs/ufs
Module Name:src Committed By: riastradh Date: Sat Mar 28 04:13:26 UTC 2015 Modified Files: src/sys/ufs/ufs: ufs_readwrite.c Log Message: VOP_WRITE never has IO_JOURNALLOCKED. To generate a diff of this commit: cvs rdiff -u -r1.110 -r1.111 src/sys/ufs/ufs/ufs_readwrite.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/ufs/ufs/ufs_readwrite.c diff -u src/sys/ufs/ufs/ufs_readwrite.c:1.110 src/sys/ufs/ufs/ufs_readwrite.c:1.111 --- src/sys/ufs/ufs/ufs_readwrite.c:1.110 Sat Mar 28 03:53:36 2015 +++ src/sys/ufs/ufs/ufs_readwrite.c Sat Mar 28 04:13:25 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ufs_readwrite.c,v 1.110 2015/03/28 03:53:36 riastradh Exp $ */ +/* $NetBSD: ufs_readwrite.c,v 1.111 2015/03/28 04:13:25 riastradh Exp $ */ /*- * Copyright (c) 1993 @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: ufs_readwrite.c,v 1.110 2015/03/28 03:53:36 riastradh Exp $); +__KERNEL_RCSID(1, $NetBSD: ufs_readwrite.c,v 1.111 2015/03/28 04:13:25 riastradh Exp $); #ifdef LFS_READWRITE #define FS struct lfs @@ -292,6 +292,8 @@ WRITE(void *v) KASSERT(vp-v_size == ip-i_size); KASSERT(uio-uio_rw == UIO_WRITE); KASSERT(vp-v_type == VREG); + KASSERT(!ISSET(ioflag, IO_JOURNALLOCKED)); + UFS_WAPBL_JUNLOCK_ASSERT(vp-v_mount); if (ioflag IO_APPEND) uio-uio_offset = ip-i_size; @@ -322,12 +324,10 @@ WRITE(void *v) KASSERT(vp-v_type == VREG); - if ((ioflag IO_JOURNALLOCKED) == 0) { - error = UFS_WAPBL_BEGIN(vp-v_mount); - if (error) { - fstrans_done(vp-v_mount); - return error; - } + error = UFS_WAPBL_BEGIN(vp-v_mount); + if (error) { + fstrans_done(vp-v_mount); + return error; } #ifdef LFS_READWRITE @@ -504,8 +504,7 @@ out: else UFS_WAPBL_UPDATE(vp, NULL, NULL, 0); KASSERT(vp-v_size == ip-i_size); - if ((ioflag IO_JOURNALLOCKED) == 0) - UFS_WAPBL_END(vp-v_mount); + UFS_WAPBL_END(vp-v_mount); fstrans_done(vp-v_mount); return (error);
CVS commit: src/sys/ufs/ext2fs
Module Name:src Committed By: riastradh Date: Sat Mar 28 03:46:51 UTC 2015 Modified Files: src/sys/ufs/ext2fs: ext2fs_readwrite.c Log Message: Missed a spot in ext2fs_read To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/sys/ufs/ext2fs/ext2fs_readwrite.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/ufs/ext2fs/ext2fs_readwrite.c diff -u src/sys/ufs/ext2fs/ext2fs_readwrite.c:1.67 src/sys/ufs/ext2fs/ext2fs_readwrite.c:1.68 --- src/sys/ufs/ext2fs/ext2fs_readwrite.c:1.67 Fri Mar 27 17:27:56 2015 +++ src/sys/ufs/ext2fs/ext2fs_readwrite.c Sat Mar 28 03:46:51 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ext2fs_readwrite.c,v 1.67 2015/03/27 17:27:56 riastradh Exp $ */ +/* $NetBSD: ext2fs_readwrite.c,v 1.68 2015/03/28 03:46:51 riastradh Exp $ */ /*- * Copyright (c) 1993 @@ -60,7 +60,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ext2fs_readwrite.c,v 1.67 2015/03/27 17:27:56 riastradh Exp $); +__KERNEL_RCSID(0, $NetBSD: ext2fs_readwrite.c,v 1.68 2015/03/28 03:46:51 riastradh Exp $); #include sys/param.h #include sys/systm.h @@ -112,11 +112,7 @@ ext2fs_read(void *v) if (uio-uio_rw != UIO_READ) panic(%s: mode, ext2fs_read); - if (vp-v_type == VLNK) { - if (ext2fs_size(ip) ump-um_maxsymlinklen || - (ump-um_maxsymlinklen == 0 ext2fs_nblock(ip) == 0)) - panic(%s: short symlink, ext2fs_read); - } else if (vp-v_type != VREG vp-v_type != VDIR) + if (vp-v_type != VREG vp-v_type != VDIR) panic(%s: type %d, ext2fs_read, vp-v_type); #endif /* XXX Eliminate me by refusing directory reads from userland. */