CVS commit: src/sys/arch/arm/samsung
Module Name:src Committed By: reinoud Date: Thu Sep 4 13:06:49 UTC 2014 Modified Files: src/sys/arch/arm/samsung: exynos4_reg.h exynos5_loc.c exynos5_reg.h exynos_reg.h Log Message: 1st stage of USB support for Exynos5 chips: the register definitions To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/samsung/exynos4_reg.h cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/samsung/exynos5_loc.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/samsung/exynos5_reg.h cvs rdiff -u -r1.8 -r1.9 src/sys/arch/arm/samsung/exynos_reg.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/arm/samsung/exynos4_reg.h diff -u src/sys/arch/arm/samsung/exynos4_reg.h:1.11 src/sys/arch/arm/samsung/exynos4_reg.h:1.12 --- src/sys/arch/arm/samsung/exynos4_reg.h:1.11 Tue Sep 2 13:47:57 2014 +++ src/sys/arch/arm/samsung/exynos4_reg.h Thu Sep 4 13:06:49 2014 @@ -211,8 +211,9 @@ #define EXYNOS4_SROMC_OFFSET 0x0257 #define EXYNOS4_USB2HOST_OFFSET 0x0258 -#define EXYNOS4_USBHOST0_OFFSET 0x0258 /* USB EHCI */ -#define EXYNOS4_USBHOST1_OFFSET 0x0259 /* USB OHCI companion to EHCI (paired) */ +#define EXYNOS4_USB2_HOST_EHCI_OFFSET 0x0258 +#define EXYNOS4_USB2_HOST_OHCI_OFFSET 0x0259 +#define EXYNOS4_USB2_HOST_PHYCTRL_OFFSET 0x025B #define EXYNOS4_USBOTG1_OFFSET 0x025B /* USB On The Go interface */ #define EXYNOS4_PDMA0_OFFSET 0x0268 /* Peripheral DMA */ @@ -273,6 +274,26 @@ #define EXYNOS4_GPIO_I2S0_OFFSET (EXYNOS4_AUDIOCORE_OFFSET + 0x0006) +/* used Exynos4 USB PHY registers */ +#define USB_PHYPWR 0x00 +#define PHYPWR_FORCE_SUSPEND __BIT(1) +#define PHYPWR_ANALOG_POWERDOWN __BIT(3) +#define PHYPWR_OTG_DISABLE __BIT(4) +#define PHYPWR_SLEEP_PHY0 __BIT(5) +#define PHYPWR_NORMAL_MASK 0x19 +#define PHYPWR_NORMAL_MASK_PHY0 (__BITS(3,3) | 1) +#define PHYPWR_NORMAL_MASK_PHY1 __BITS(6,3) +#define PHYPWR_NORMAL_MASK_HSIC0 __BITS(9,3) +#define PHYPWR_NORMAL_MASK_HSIC1 __BITS(12,3) +#define USB_PHYCLK 0x04 /* holds FSEL_CLKSEL_ */ +#define USB_RSTCON 0x08 +#define RSTCON_SWRST __BIT(0) +#define RSTCON_HLINK_RWRST __BIT(1) +#define RSTCON_DEVPHYLINK_SWRST __BIT(2) +#define RSTCON_DEVPHY_SWRST __BITS(0,3) +#define RSTCON_HOSTPHY_SWRST __BITS(3,4) +#define RSTCON_HOSTPHYLINK_SWRST __BITS(7,4) -#endif /* _ARM_SAMSUNG_EXYNOS5_REG_H_ */ + +#endif /* _ARM_SAMSUNG_EXYNOS4_REG_H_ */ Index: src/sys/arch/arm/samsung/exynos5_loc.c diff -u src/sys/arch/arm/samsung/exynos5_loc.c:1.10 src/sys/arch/arm/samsung/exynos5_loc.c:1.11 --- src/sys/arch/arm/samsung/exynos5_loc.c:1.10 Tue Sep 2 16:10:58 2014 +++ src/sys/arch/arm/samsung/exynos5_loc.c Thu Sep 4 13:06:49 2014 @@ -220,6 +220,7 @@ static const struct exyo_locators exynos { "sscom", OFFANDSIZE(,UART1), 1, IRQ_UART1, 0 }, { "sscom", OFFANDSIZE(,UART2), 2, IRQ_UART2, 0 }, { "sscom", OFFANDSIZE(,UART3), 3, IRQ_UART3, 0 }, + { "exyousb", OFFANDSIZE(,USB2HOST), NOPORT, IRQ_USB_HOST20, 0 }, }; const struct exyo_locinfo exynos5_locinfo = { Index: src/sys/arch/arm/samsung/exynos5_reg.h diff -u src/sys/arch/arm/samsung/exynos5_reg.h:1.13 src/sys/arch/arm/samsung/exynos5_reg.h:1.14 --- src/sys/arch/arm/samsung/exynos5_reg.h:1.13 Thu Aug 28 17:59:46 2014 +++ src/sys/arch/arm/samsung/exynos5_reg.h Thu Sep 4 13:06:49 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: exynos5_reg.h,v 1.13 2014/08/28 17:59:46 reinoud Exp $ */ +/* $NetBSD: exynos5_reg.h,v 1.14 2014/09/04 13:06:49 reinoud Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -55,17 +55,18 @@ #define EXYNOS5_CORE_SIZE 0x0f00 #define EXYNOS5_SDRAM_PBASE 0x4000 -#define EXYNOS5_CMU_COREPART_OFFSET 0x0001 +#define EXYNOS5_CMU_CORE_PART_OFFSET 0x0001 #define EXYNOS5_CMU_APLL 0x0001 /* ARM core clock */ #define EXYNOS5_CMU_MPLL 0x00014000 /* MEM cntr. clock */ -#define EXYNOS5_CMU_TOPPART_OFFSET 0x0002 +#define EXYNOS5_CMU_TOP_PART_OFFSET 0x0002 #define EXYNOS5_CMU_CPLL 0x00020020 /* Video hardware codec clock */ #define EXYNOS5_CMU_EPLL 0x00020030 /* Audio and ext. interf. clock */ #define EXYNOS5_CMU_VPLL 0x00020040 /* Dither PLL (EMI reduction) clock */ #define EXYNOS5_CMU_GPLL 0x00020050 /* Graphic 3D proc. clock */ -#define EXYNOS5_CMU_MEMPART_OFFSET 0x0003 +#define EXYNOS5_CMU_MEM_PART_OFFSET 0x0003 #define EXYNOS5_CMU_BPLL 0x00030010 #define EXYNOS5_ALIVE_OFFSET 0x0004 +#define EXYNOS5_PMU_OFFSET 0x0004 /* alias */ #define EXYNOS5_SYSREG_OFFSET 0x0005 #define EXYNOS5_TMU_OFFSET 0x0006 #define EXYNOS5_MONOTONIC_CNT_OFFSET 0x000C @@ -135,7 +136,7 @@ #define EXYNOS5_USB2HOST_OFFSET 0x0211 #define EXYNOS5_USB2_HOST_EHCI_OFFSET 0x0211 #define EXYNOS5_USB2_HOST_OHCI_OFFSET 0x0212 -#define EXYNOS5_USB2_HOST_CTRL_OFFSET 0x0213 +#define EXYNOS5_U
CVS commit: src/sys/arch/arm/samsung
Module Name:src Committed By: reinoud Date: Thu Sep 4 13:18:28 UTC 2014 Modified Files: src/sys/arch/arm/samsung: exynos_usb.c Log Message: Fix usb attachment and add an usb2 phy enable for exynos5410. There is still an issue with ohci To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arm/samsung/exynos_usb.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/samsung/exynos_usb.c diff -u src/sys/arch/arm/samsung/exynos_usb.c:1.7 src/sys/arch/arm/samsung/exynos_usb.c:1.8 --- src/sys/arch/arm/samsung/exynos_usb.c:1.7 Sat Jun 21 09:11:04 2014 +++ src/sys/arch/arm/samsung/exynos_usb.c Thu Sep 4 13:18:28 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: exynos_usb.c,v 1.7 2014/06/21 09:11:04 skrll Exp $ */ +/* $NetBSD: exynos_usb.c,v 1.8 2014/09/04 13:18:28 reinoud Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: exynos_usb.c,v 1.7 2014/06/21 09:11:04 skrll Exp $"); +__KERNEL_RCSID(1, "$NetBSD: exynos_usb.c,v 1.8 2014/09/04 13:18:28 reinoud Exp $"); #include #include @@ -67,11 +67,6 @@ __KERNEL_RCSID(1, "$NetBSD: exynos_usb.c #include #include -#define EHCI_OFFSET (0) -#define OHCI_OFFSET (1*EXYNOS_BLOCK_SIZE) -#define DEVLINK_OFFSET (2*EXYNOS_BLOCK_SIZE) /* Exynos5 */ -#define USB2PHY_OFFSET (3*EXYNOS_BLOCK_SIZE) - struct exynos_usb_softc { device_t sc_self; @@ -96,6 +91,7 @@ struct exynos_usb_attach_args { const char *name; }; + static struct exynos_gpio_pinset uhost_pwr_pinset = { .pinset_group = "ETC6", .pinset_func = 0, @@ -133,7 +129,7 @@ exynos_usb_attach(device_t parent, devic struct exyo_locators *loc = &exyoaa->exyo_loc; struct exynos_gpio_pindata XuhostOVERCUR; struct exynos_gpio_pindata XuhostPWREN; - bus_size_t pmu_offset; + bus_size_t ehci_offset, ohci_offset, usb2phy_offset, pmu_offset; /* no locators expected */ KASSERT(loc->loc_port == EXYOCF_PORT_DEFAULT); @@ -148,26 +144,34 @@ exynos_usb_attach(device_t parent, devic sc->sc_dmat = exyoaa->exyo_dmat; // sc->sc_dmat = exyoaa->exyo_coherent_dmat; +#ifdef EXYNOS4 + if (IS_EXYNOS4_P()) { + ehci_offset= EXYNOS4_USB2_HOST_EHCI_OFFSET; + ohci_offset= EXYNOS4_USB2_HOST_OHCI_OFFSET; + usb2phy_offset = EXYNOS4_USB2_HOST_PHYCTRL_OFFSET; + pmu_offset = EXYNOS4_PMU_OFFSET; + } +#endif +#ifdef EXYNOS5 + if (IS_EXYNOS5_P()) { + ehci_offset= EXYNOS5_USB2_HOST_EHCI_OFFSET; + ohci_offset= EXYNOS5_USB2_HOST_OHCI_OFFSET; + usb2phy_offset = EXYNOS5_USB2_HOST_PHYCTRL_OFFSET; + pmu_offset = EXYNOS5_PMU_OFFSET; + } +#endif + KASSERT(ehci_offset); + bus_space_subregion(sc->sc_bst, exyoaa->exyo_core_bsh, - loc->loc_offset + EHCI_OFFSET, EXYNOS_BLOCK_SIZE, + ehci_offset, EXYNOS_BLOCK_SIZE, &sc->sc_ehci_bsh); bus_space_subregion(sc->sc_bst, exyoaa->exyo_core_bsh, - loc->loc_offset + OHCI_OFFSET, EXYNOS_BLOCK_SIZE, + ohci_offset, EXYNOS_BLOCK_SIZE, &sc->sc_ohci_bsh); bus_space_subregion(sc->sc_bst, exyoaa->exyo_core_bsh, - loc->loc_offset + USB2PHY_OFFSET, EXYNOS_BLOCK_SIZE, + usb2phy_offset, EXYNOS_BLOCK_SIZE, &sc->sc_usb2phy_bsh); -#ifdef EXYNOS4 - if (IS_EXYNOS4_P()) - pmu_offset = EXYNOS4_PMU_OFFSET; -#endif -#ifdef EXYNOS5 - if (IS_EXYNOS5_P()) - pmu_offset = EXYNOS5_ALIVE_OFFSET; -#endif - - KASSERT(pmu_offset); bus_space_subregion(sc->sc_bst, exyoaa->exyo_core_bsh, pmu_offset, EXYNOS_BLOCK_SIZE, &sc->sc_pmuregs_bsh); @@ -376,6 +380,7 @@ exynos_usb2_set_isolation(struct exynos_ { int val; + /* XXX 5422 not handled XXX*/ val = on ? PMU_PHY_DISABLE : PMU_PHY_ENABLE; if (IS_EXYNOS4X12_P()) { bus_space_write_4(sc->sc_bst, sc->sc_pmuregs_bsh, @@ -403,7 +408,7 @@ exynos4_usb2phy_enable(struct exynos_usb exynos_usb2_set_isolation(sc, false); /* write clock value */ - clkreg = 5; /* 24 Mhz */ + clkreg = FSEL_CLKSEL_24M; bus_space_write_4(sc->sc_bst, sc->sc_usb2phy_bsh, USB_PHYCLK, clkreg); @@ -459,7 +464,102 @@ exynos4_usb2phy_enable(struct exynos_usb #ifdef EXYNOS5 static void -exynos5_usb2phy_enable(struct exynos_usb_softc *sc) +exynos5410_usb2phy_enable(struct exynos_usb_softc *sc) +{ + uint32_t phyhost, phyotg, phyhsic, ehcictrl, ohcictrl; + + /* disable phy isolation */ + exynos_usb2_set_isolation(sc, false); + + /* host configuration: */ + phyhost = bus_space_read_4(sc->sc_bst, sc->sc_usb2phy_bsh, + USB_PHY_HOST_CTRL0); + + /* host phy reference clock; assumption its 24 MHz now */ + phyhost &= ~HOST_CTRL0_FSEL_MASK; + phyhost |= __SHIFTIN(HOST_CTRL0_FSEL_MASK, FSEL_CLKSEL_24M); + + /* enable normal mode of operation */ + phyhost &= ~(HOST_CTRL0_FORCESUSPEND | HOST_CTRL0_FORCESLEEP); + + /* host phy reset */ + phyhost &= ~(HOST_CTRL0_PHY_SWRST | HOST_CTRL0_SIDDQ); + + /* host link reset */ + phyhost |= HOST_CTRL0_LINK_SWRST | HOST_CTRL0_UTMI_SWRST | + HOST_CTRL0_COMMONON_N; + + /* do the reset */ + bus_space_w
CVS commit: src/sys/miscfs/fdesc
Module Name:src Committed By: christos Date: Thu Sep 4 13:28:54 UTC 2014 Modified Files: src/sys/miscfs/fdesc: fdesc_vnops.c Log Message: Well, nasty thing happen if you set /dev/tty to VNON too. Disable for now. To generate a diff of this commit: cvs rdiff -u -r1.121 -r1.122 src/sys/miscfs/fdesc/fdesc_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/miscfs/fdesc/fdesc_vnops.c diff -u src/sys/miscfs/fdesc/fdesc_vnops.c:1.121 src/sys/miscfs/fdesc/fdesc_vnops.c:1.122 --- src/sys/miscfs/fdesc/fdesc_vnops.c:1.121 Fri Jul 25 04:20:52 2014 +++ src/sys/miscfs/fdesc/fdesc_vnops.c Thu Sep 4 09:28:54 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: fdesc_vnops.c,v 1.121 2014/07/25 08:20:52 dholland Exp $ */ +/* $NetBSD: fdesc_vnops.c,v 1.122 2014/09/04 13:28:54 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fdesc_vnops.c,v 1.121 2014/07/25 08:20:52 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdesc_vnops.c,v 1.122 2014/09/04 13:28:54 christos Exp $"); #include #include @@ -295,6 +295,7 @@ bad: good: KASSERT(ix != -1); error = vcache_get(dvp->v_mount, &ix, sizeof(ix), vpp); +printf("%s, %d: %d %d %p\n", __FILE__, __LINE__, error, ix, vpp); return error; } @@ -354,6 +355,7 @@ fdesc_attr(int fd, struct vattr *vap, ka */ vap->va_mode &= ~(S_IXUSR|S_IXGRP|S_IXOTH); } +printf("%s, %d: %d %d\n", __FILE__, __LINE__, error, vap->va_type); break; default: @@ -390,6 +392,7 @@ fdesc_attr(int fd, struct vattr *vap, ka vap->va_flags = stb.st_flags; vap->va_rdev = stb.st_rdev; vap->va_bytes = stb.st_blocks * stb.st_blksize; +printf("%s, %d: %d %lld\n", __FILE__, __LINE__, error, (long long)vap->va_rdev); break; } @@ -764,10 +767,12 @@ fdesc_ioctl(void *v) } */ *ap = v; int error = EOPNOTSUPP; +printf("%s, %d: ioctl %d\n", __FILE__, __LINE__, VTOFDESC(ap->a_vp)->fd_type); switch (VTOFDESC(ap->a_vp)->fd_type) { case Fctty: error = cdev_ioctl(devctty, ap->a_command, ap->a_data, ap->a_fflag, curlwp); +printf("%s, %d: ioctl error %d\n", __FILE__, __LINE__, error); break; default: @@ -838,6 +843,7 @@ fdesc_inactive(void *v) struct vnode *a_vp; } */ *ap = v; struct vnode *vp = ap->a_vp; +#if 0 struct fdescnode *fd = VTOFDESC(vp); /* @@ -846,6 +852,7 @@ fdesc_inactive(void *v) */ if (fd->fd_type == Fctty || fd->fd_type == Fdesc) vp->v_type = VNON; +#endif VOP_UNLOCK(vp); return (0); }
CVS commit: src/sys/miscfs/fdesc
Module Name:src Committed By: christos Date: Thu Sep 4 13:29:50 UTC 2014 Modified Files: src/sys/miscfs/fdesc: fdesc_vnops.c Log Message: remove debugging. To generate a diff of this commit: cvs rdiff -u -r1.122 -r1.123 src/sys/miscfs/fdesc/fdesc_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/miscfs/fdesc/fdesc_vnops.c diff -u src/sys/miscfs/fdesc/fdesc_vnops.c:1.122 src/sys/miscfs/fdesc/fdesc_vnops.c:1.123 --- src/sys/miscfs/fdesc/fdesc_vnops.c:1.122 Thu Sep 4 09:28:54 2014 +++ src/sys/miscfs/fdesc/fdesc_vnops.c Thu Sep 4 09:29:50 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: fdesc_vnops.c,v 1.122 2014/09/04 13:28:54 christos Exp $ */ +/* $NetBSD: fdesc_vnops.c,v 1.123 2014/09/04 13:29:50 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fdesc_vnops.c,v 1.122 2014/09/04 13:28:54 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fdesc_vnops.c,v 1.123 2014/09/04 13:29:50 christos Exp $"); #include #include @@ -295,7 +295,6 @@ bad: good: KASSERT(ix != -1); error = vcache_get(dvp->v_mount, &ix, sizeof(ix), vpp); -printf("%s, %d: %d %d %p\n", __FILE__, __LINE__, error, ix, vpp); return error; } @@ -355,7 +354,6 @@ fdesc_attr(int fd, struct vattr *vap, ka */ vap->va_mode &= ~(S_IXUSR|S_IXGRP|S_IXOTH); } -printf("%s, %d: %d %d\n", __FILE__, __LINE__, error, vap->va_type); break; default: @@ -392,7 +390,6 @@ printf("%s, %d: %d %d\n", __FILE__, __LI vap->va_flags = stb.st_flags; vap->va_rdev = stb.st_rdev; vap->va_bytes = stb.st_blocks * stb.st_blksize; -printf("%s, %d: %d %lld\n", __FILE__, __LINE__, error, (long long)vap->va_rdev); break; } @@ -767,12 +764,10 @@ fdesc_ioctl(void *v) } */ *ap = v; int error = EOPNOTSUPP; -printf("%s, %d: ioctl %d\n", __FILE__, __LINE__, VTOFDESC(ap->a_vp)->fd_type); switch (VTOFDESC(ap->a_vp)->fd_type) { case Fctty: error = cdev_ioctl(devctty, ap->a_command, ap->a_data, ap->a_fflag, curlwp); -printf("%s, %d: ioctl error %d\n", __FILE__, __LINE__, error); break; default:
CVS commit: src/sys/arch/sparc64
Module Name:src Committed By: palle Date: Thu Sep 4 18:48:29 UTC 2014 Modified Files: src/sys/arch/sparc64/include: cpu.h pmap.h src/sys/arch/sparc64/sparc64: genassym.cf locore.s pmap.c Log Message: sun4v: All cpus must be setup with a TSB descriptor, so pmap_setup_tsb_sun4v() must take a pointer to the TSB descriptor To generate a diff of this commit: cvs rdiff -u -r1.111 -r1.112 src/sys/arch/sparc64/include/cpu.h cvs rdiff -u -r1.58 -r1.59 src/sys/arch/sparc64/include/pmap.h cvs rdiff -u -r1.73 -r1.74 src/sys/arch/sparc64/sparc64/genassym.cf cvs rdiff -u -r1.371 -r1.372 src/sys/arch/sparc64/sparc64/locore.s cvs rdiff -u -r1.289 -r1.290 src/sys/arch/sparc64/sparc64/pmap.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/sparc64/include/cpu.h diff -u src/sys/arch/sparc64/include/cpu.h:1.111 src/sys/arch/sparc64/include/cpu.h:1.112 --- src/sys/arch/sparc64/include/cpu.h:1.111 Sun Jun 8 17:33:24 2014 +++ src/sys/arch/sparc64/include/cpu.h Thu Sep 4 18:48:29 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.111 2014/06/08 17:33:24 palle Exp $ */ +/* $NetBSD: cpu.h,v 1.112 2014/09/04 18:48:29 palle Exp $ */ /* * Copyright (c) 1992, 1993 @@ -71,6 +71,9 @@ #include #include #endif +#ifdef SUN4V +#include +#endif #include #include @@ -174,6 +177,9 @@ struct cpu_info { pte_t *ci_tsb_dmmu; pte_t *ci_tsb_immu; + /* TSB description (sun4v). */ + struct tsb_desc *ci_tsb_desc; + /* MMU Fault Status Area (sun4v). * Will be initialized to the physical address of the bottom of * the interrupt stack. Index: src/sys/arch/sparc64/include/pmap.h diff -u src/sys/arch/sparc64/include/pmap.h:1.58 src/sys/arch/sparc64/include/pmap.h:1.59 --- src/sys/arch/sparc64/include/pmap.h:1.58 Mon Apr 14 10:54:08 2014 +++ src/sys/arch/sparc64/include/pmap.h Thu Sep 4 18:48:29 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.58 2014/04/14 10:54:08 martin Exp $ */ +/* $NetBSD: pmap.h,v 1.59 2014/09/04 18:48:29 palle Exp $ */ /*- * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -40,6 +40,9 @@ #include #ifdef _KERNEL #include +#ifdef SUN4V +#include +#endif #endif #endif @@ -234,7 +237,7 @@ void pmap_zero_page_phys(paddr_t); #ifdef SUN4V /* sun4v specific */ void pmap_setup_intstack_sun4v(paddr_t); -void pmap_setup_tsb_sun4v(void); +void pmap_setup_tsb_sun4v(struct tsb_desc*); #endif /* Installed physical memory, as discovered during bootstrap. */ Index: src/sys/arch/sparc64/sparc64/genassym.cf diff -u src/sys/arch/sparc64/sparc64/genassym.cf:1.73 src/sys/arch/sparc64/sparc64/genassym.cf:1.74 --- src/sys/arch/sparc64/sparc64/genassym.cf:1.73 Fri Feb 21 18:00:09 2014 +++ src/sys/arch/sparc64/sparc64/genassym.cf Thu Sep 4 18:48:29 2014 @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.73 2014/02/21 18:00:09 palle Exp $ +# $NetBSD: genassym.cf,v 1.74 2014/09/04 18:48:29 palle Exp $ # # Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -168,6 +168,7 @@ define CI_CTXBUSY offsetof(struct cpu_in define CI_TSB_DMMU offsetof(struct cpu_info, ci_tsb_dmmu) define CI_TSB_IMMU offsetof(struct cpu_info, ci_tsb_immu) define CI_MMFSA offsetof(struct cpu_info, ci_mmfsa) +define CI_TSB_DESC offsetof(struct cpu_info, ci_tsb_desc) ifdef MULTIPROCESSOR define CI_IPIEVC offsetof(struct cpu_info, ci_ipi_evcnt[0].ev_count) endif Index: src/sys/arch/sparc64/sparc64/locore.s diff -u src/sys/arch/sparc64/sparc64/locore.s:1.371 src/sys/arch/sparc64/sparc64/locore.s:1.372 --- src/sys/arch/sparc64/sparc64/locore.s:1.371 Sun Aug 31 18:49:42 2014 +++ src/sys/arch/sparc64/sparc64/locore.s Thu Sep 4 18:48:29 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.371 2014/08/31 18:49:42 palle Exp $ */ +/* $NetBSD: locore.s,v 1.372 2014/09/04 18:48:29 palle Exp $ */ /* * Copyright (c) 2006-2010 Matthew R. Green @@ -4521,6 +4521,7 @@ ENTRY_NOPROFILE(cpu_initialize) /* for c nop /* sun4v */ + LDPTR [%l7 + CI_TSB_DESC], %o0 call _C_LABEL(pmap_setup_tsb_sun4v) nop ba 1f Index: src/sys/arch/sparc64/sparc64/pmap.c diff -u src/sys/arch/sparc64/sparc64/pmap.c:1.289 src/sys/arch/sparc64/sparc64/pmap.c:1.290 --- src/sys/arch/sparc64/sparc64/pmap.c:1.289 Thu Jul 10 06:24:02 2014 +++ src/sys/arch/sparc64/sparc64/pmap.c Thu Sep 4 18:48:29 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.289 2014/07/10 06:24:02 jdc Exp $ */ +/* $NetBSD: pmap.c,v 1.290 2014/09/04 18:48:29 palle Exp $ */ /* * * Copyright (C) 1996-1999 Eduardo Horvath. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.289 2014/07/10 06:24:02 jdc Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.290 2014/09/04 18:48:29 palle Exp $"); #undef NO_VCACHE /* Don't forget the locked TLB in dostart */ #define HWREF @@ -149,10 +149,6 @@ int tsbsize; /* tsbents = 512 * 2^^tsbs #define TSBENTS (512ci_paddr = cpu0paddr; #ifdef
CVS commit: src/sys/arch/sparc64/doc
Module Name:src Committed By: palle Date: Thu Sep 4 18:55:03 UTC 2014 Modified Files: src/sys/arch/sparc64/doc: TODO Log Message: sun4v: update TODO list To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sparc64/doc/TODO 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/sparc64/doc/TODO diff -u src/sys/arch/sparc64/doc/TODO:1.6 src/sys/arch/sparc64/doc/TODO:1.7 --- src/sys/arch/sparc64/doc/TODO:1.6 Sun Jul 27 17:46:43 2014 +++ src/sys/arch/sparc64/doc/TODO Thu Sep 4 18:55:03 2014 @@ -1,4 +1,4 @@ - /* $NetBSD: TODO,v 1.6 2014/07/27 17:46:43 palle Exp $ */ + /* $NetBSD: TODO,v 1.7 2014/09/04 18:55:03 palle Exp $ */ Things to be done: @@ -19,6 +19,7 @@ sun4v: - check build without SUN4V defined - replace relevant references til %ver with GET_MAXCWP - pmap_mp_init(): sun4v missing handling -- cpu_pmap_prepare: sun4v multi??? - replace constructs like "wrpr %g0, PSTATE_KERN, %pstate" with NORMAL_GLOBALS - replace constructs line "wrpr %g0, PSTATE_INTR, %pstate" with ALTERNATE_GOBALS +- sun4v tsb no need to lock... per cpu... anyway... +- ci_tsb_desc->td_ctxidx: -1 or 1?
CVS commit: src/usr.bin/make
Module Name:src Committed By: christos Date: Thu Sep 4 19:07:47 UTC 2014 Modified Files: src/usr.bin/make: make.1 Log Message: document commented out .INVISIBLE and .JOIN. To generate a diff of this commit: cvs rdiff -u -r1.234 -r1.235 src/usr.bin/make/make.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/make.1 diff -u src/usr.bin/make/make.1:1.234 src/usr.bin/make/make.1:1.235 --- src/usr.bin/make/make.1:1.234 Thu Aug 28 15:55:00 2014 +++ src/usr.bin/make/make.1 Thu Sep 4 15:07:47 2014 @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.234 2014/08/28 19:55:00 sjg Exp $ +.\" $NetBSD: make.1,v 1.235 2014/09/04 19:07:47 christos Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd August 28, 2014 +.Dd September 4, 2014 .Dt MAKE 1 .Os .Sh NAME @@ -1996,10 +1996,12 @@ Target is never out of date, but always Ignore any errors from the commands associated with this target, exactly as if they all were preceded by a dash .Pq Ql \- . -.\" .It Ic .INVISIBLE -.\" XXX -.\" .It Ic .JOIN -.\" XXX +.It Ic .INVISIBLE +Target is not eligible to be added to the list of implicit sources for suffix +rules, or as a child dependency for a target. +.It Ic .JOIN +Target is a fake node which is considered out of date only if any of its +children ar out of date. .It Ic .MADE Mark all sources of this target as being up-to-date. .It Ic .MAKE
CVS commit: src/common/lib/libprop
Module Name:src Committed By: matt Date: Fri Sep 5 05:19:24 UTC 2014 Modified Files: src/common/lib/libprop: prop_ingest.c prop_number.c Log Message: Eliminate use of C++ keywords and don't nest struct definitions. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/common/lib/libprop/prop_ingest.c cvs rdiff -u -r1.26 -r1.27 src/common/lib/libprop/prop_number.c 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/libprop/prop_ingest.c diff -u src/common/lib/libprop/prop_ingest.c:1.4 src/common/lib/libprop/prop_ingest.c:1.5 --- src/common/lib/libprop/prop_ingest.c:1.4 Fri Jul 27 09:10:59 2012 +++ src/common/lib/libprop/prop_ingest.c Fri Sep 5 05:19:24 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: prop_ingest.c,v 1.4 2012/07/27 09:10:59 pooka Exp $ */ +/* $NetBSD: prop_ingest.c,v 1.5 2014/09/05 05:19:24 matt Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -44,7 +44,7 @@ struct _prop_ingest_context { * Allocate and initialize an ingest context. */ prop_ingest_context_t -prop_ingest_context_alloc(void *private) +prop_ingest_context_alloc(void *xprivate) { prop_ingest_context_t ctx; @@ -53,7 +53,7 @@ prop_ingest_context_alloc(void *private) ctx->pic_error = PROP_INGEST_ERROR_NO_ERROR; ctx->pic_type = PROP_TYPE_UNKNOWN; ctx->pic_key = NULL; - ctx->pic_private = private; + ctx->pic_private = xprivate; } return (ctx); } Index: src/common/lib/libprop/prop_number.c diff -u src/common/lib/libprop/prop_number.c:1.26 src/common/lib/libprop/prop_number.c:1.27 --- src/common/lib/libprop/prop_number.c:1.26 Wed Mar 26 18:12:46 2014 +++ src/common/lib/libprop/prop_number.c Fri Sep 5 05:19:24 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: prop_number.c,v 1.26 2014/03/26 18:12:46 christos Exp $ */ +/* $NetBSD: prop_number.c,v 1.27 2014/09/05 05:19:24 matt Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -43,19 +43,21 @@ #include #endif +struct _prop_number_value { + union { + int64_t pnu_signed; + uint64_t pnu_unsigned; + } pnv_un; +#define pnv_signed pnv_un.pnu_signed +#define pnv_unsigned pnv_un.pnu_unsigned + unsigned int pnv_is_unsigned :1, + :31; +}; + struct _prop_number { struct _prop_object pn_obj; struct rb_node pn_link; - struct _prop_number_value { - union { - int64_t pnu_signed; - uint64_t pnu_unsigned; - } pnv_un; -#define pnv_signed pnv_un.pnu_signed -#define pnv_unsigned pnv_un.pnu_unsigned - unsigned int pnv_is_unsigned :1, - :31; - } pn_value; + struct _prop_number_value pn_value; }; _PROP_POOL_INIT(_prop_number_pool, sizeof(struct _prop_number), "propnmbr")
CVS commit: src/sys/arch/arm/arm
Module Name:src Committed By: matt Date: Fri Sep 5 05:24:53 UTC 2014 Modified Files: src/sys/arch/arm/arm: bootconfig.c Log Message: Don't use not as a variable since it's reserved in C++. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/arm/bootconfig.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/arm/bootconfig.c diff -u src/sys/arch/arm/arm/bootconfig.c:1.6 src/sys/arch/arm/arm/bootconfig.c:1.7 --- src/sys/arch/arm/arm/bootconfig.c:1.6 Sun Aug 2 11:32:05 2009 +++ src/sys/arch/arm/arm/bootconfig.c Fri Sep 5 05:24:53 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: bootconfig.c,v 1.6 2009/08/02 11:32:05 gavan Exp $ */ +/* $NetBSD: bootconfig.c,v 1.7 2014/09/05 05:24:53 matt Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -38,7 +38,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: bootconfig.c,v 1.6 2009/08/02 11:32:05 gavan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bootconfig.c,v 1.7 2014/09/05 05:24:53 matt Exp $"); #include @@ -56,7 +56,7 @@ get_bootconf_option(char *opts, const ch { char *ptr; char *optstart; - int not; + bool neg; ptr = opts; @@ -68,12 +68,12 @@ get_bootconf_option(char *opts, const ch if (*ptr == 0) break; - not = 0; + neg = false; /* Is it a negate option */ if ((type & BOOTOPT_TYPE_MASK) == BOOTOPT_TYPE_BOOLEAN && *ptr == '!') { - not = 1; + neg = true; ++ptr; } @@ -99,7 +99,7 @@ get_bootconf_option(char *opts, const ch ((u_int)strtoul(ptr, NULL, 10) != 0); else - *((int *)result) = !not; + *((int *)result) = !neg; break; case BOOTOPT_TYPE_STRING : *((char **)result) = ptr;
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: matt Date: Fri Sep 5 05:25:28 UTC 2014 Modified Files: src/sys/arch/arm/arm32: pmap.c Log Message: Don't nest structure definitions. To generate a diff of this commit: cvs rdiff -u -r1.298 -r1.299 src/sys/arch/arm/arm32/pmap.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/arm32/pmap.c diff -u src/sys/arch/arm/arm32/pmap.c:1.298 src/sys/arch/arm/arm32/pmap.c:1.299 --- src/sys/arch/arm/arm32/pmap.c:1.298 Sat Aug 30 13:02:01 2014 +++ src/sys/arch/arm/arm32/pmap.c Fri Sep 5 05:25:28 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.298 2014/08/30 13:02:01 kiyohara Exp $ */ +/* $NetBSD: pmap.c,v 1.299 2014/09/05 05:25:28 matt Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -216,7 +216,7 @@ #include //#include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.298 2014/08/30 13:02:01 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.299 2014/09/05 05:25:28 matt Exp $"); //#define PMAP_DEBUG #ifdef PMAP_DEBUG @@ -620,17 +620,19 @@ static SLIST_HEAD(, l1_ttable) l1_list; * Reference counts are maintained for L2 descriptors so they can be * freed when empty. */ +struct l2_bucket { + pt_entry_t *l2b_kva; /* KVA of L2 Descriptor Table */ + paddr_t l2b_pa; /* Physical address of same */ + u_short l2b_l1slot; /* This L2 table's L1 index */ + u_short l2b_occupancy; /* How many active descriptors */ +}; + struct l2_dtable { /* The number of L2 page descriptors allocated to this l2_dtable */ u_int l2_occupancy; /* List of L2 page descriptors */ - struct l2_bucket { - pt_entry_t *l2b_kva; /* KVA of L2 Descriptor Table */ - paddr_t l2b_pa; /* Physical address of same */ - u_short l2b_l1slot; /* This L2 table's L1 index */ - u_short l2b_occupancy; /* How many active descriptors */ - } l2_bucket[L2_BUCKET_SIZE]; + struct l2_bucket l2_bucket[L2_BUCKET_SIZE]; }; /*
CVS commit: src/sys/compat/netbsd32
Module Name:src Committed By: matt Date: Fri Sep 5 05:26:26 UTC 2014 Modified Files: src/sys/compat/netbsd32: netbsd32_compat_50.c netbsd32_event.c Log Message: Don't use private as a variable name since it's reserved in C++ To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/compat/netbsd32/netbsd32_compat_50.c cvs rdiff -u -r1.11 -r1.12 src/sys/compat/netbsd32/netbsd32_event.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/netbsd32/netbsd32_compat_50.c diff -u src/sys/compat/netbsd32/netbsd32_compat_50.c:1.25 src/sys/compat/netbsd32/netbsd32_compat_50.c:1.26 --- src/sys/compat/netbsd32/netbsd32_compat_50.c:1.25 Thu Aug 21 06:40:35 2014 +++ src/sys/compat/netbsd32/netbsd32_compat_50.c Fri Sep 5 05:26:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_compat_50.c,v 1.25 2014/08/21 06:40:35 maxv Exp $ */ +/* $NetBSD: netbsd32_compat_50.c,v 1.26 2014/09/05 05:26:26 matt Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_50.c,v 1.25 2014/08/21 06:40:35 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_50.c,v 1.26 2014/09/05 05:26:26 matt Exp $"); #if defined(_KERNEL_OPT) #include "opt_sysv.h" @@ -580,12 +580,12 @@ netbsd32_kevent_fetch_timeout(const void } static int -netbsd32_kevent_fetch_changes(void *private, const struct kevent *changelist, +netbsd32_kevent_fetch_changes(void *ctx, const struct kevent *changelist, struct kevent *changes, size_t index, int n) { const struct netbsd32_kevent *src = (const struct netbsd32_kevent *)changelist; - struct netbsd32_kevent *kev32, *changes32 = private; + struct netbsd32_kevent *kev32, *changes32 = ctx; int error, i; error = copyin(src + index, changes32, n * sizeof(*changes32)); @@ -597,10 +597,10 @@ netbsd32_kevent_fetch_changes(void *priv } static int -netbsd32_kevent_put_events(void *private, struct kevent *events, +netbsd32_kevent_put_events(void *ctx, struct kevent *events, struct kevent *eventlist, size_t index, int n) { - struct netbsd32_kevent *kev32, *events32 = private; + struct netbsd32_kevent *kev32, *events32 = ctx; int i; for (i = 0, kev32 = events32; i < n; i++, kev32++, events++) Index: src/sys/compat/netbsd32/netbsd32_event.c diff -u src/sys/compat/netbsd32/netbsd32_event.c:1.11 src/sys/compat/netbsd32/netbsd32_event.c:1.12 --- src/sys/compat/netbsd32/netbsd32_event.c:1.11 Tue Jun 24 14:33:57 2014 +++ src/sys/compat/netbsd32/netbsd32_event.c Fri Sep 5 05:26:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_event.c,v 1.11 2014/06/24 14:33:57 maxv Exp $ */ +/* $NetBSD: netbsd32_event.c,v 1.12 2014/09/05 05:26:26 matt Exp $ */ /* * Copyright (c) 2005 The NetBSD Foundation. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_event.c,v 1.11 2014/06/24 14:33:57 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_event.c,v 1.12 2014/09/05 05:26:26 matt Exp $"); #include #include @@ -61,12 +61,12 @@ netbsd32_kevent_fetch_timeout(const void } static int -netbsd32_kevent_fetch_changes(void *private, const struct kevent *changelist, +netbsd32_kevent_fetch_changes(void *ctx, const struct kevent *changelist, struct kevent *changes, size_t index, int n) { const struct netbsd32_kevent *src = (const struct netbsd32_kevent *)changelist; - struct netbsd32_kevent *kev32, *changes32 = private; + struct netbsd32_kevent *kev32, *changes32 = ctx; int error, i; error = copyin(src + index, changes32, n * sizeof(*changes32)); @@ -78,10 +78,10 @@ netbsd32_kevent_fetch_changes(void *priv } static int -netbsd32_kevent_put_events(void *private, struct kevent *events, +netbsd32_kevent_put_events(void *ctx, struct kevent *events, struct kevent *eventlist, size_t index, int n) { - struct netbsd32_kevent *kev32, *events32 = private; + struct netbsd32_kevent *kev32, *events32 = ctx; int i; for (i = 0, kev32 = events32; i < n; i++, kev32++, events++)
CVS commit: src/sys/dev
Module Name:src Committed By: matt Date: Fri Sep 5 05:27:23 UTC 2014 Modified Files: src/sys/dev: ld.c Log Message: Don't use new as a variable name. To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 src/sys/dev/ld.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/ld.c diff -u src/sys/dev/ld.c:1.75 src/sys/dev/ld.c:1.76 --- src/sys/dev/ld.c:1.75 Sun Aug 10 16:44:35 2014 +++ src/sys/dev/ld.c Fri Sep 5 05:27:23 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ld.c,v 1.75 2014/08/10 16:44:35 tls Exp $ */ +/* $NetBSD: ld.c,v 1.76 2014/09/05 05:27:23 matt Exp $ */ /*- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.75 2014/08/10 16:44:35 tls Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.76 2014/09/05 05:27:23 matt Exp $"); #include #include @@ -570,7 +570,7 @@ ldioctl(dev_t dev, u_long cmd, void *add case DIOCSSTRATEGY: { struct disk_strategy *dks = (void *)addr; - struct bufq_state *new, *old; + struct bufq_state *new_bufq, *old_bufq; if ((flag & FWRITE) == 0) return EPERM; @@ -579,17 +579,17 @@ ldioctl(dev_t dev, u_long cmd, void *add return EINVAL; dks->dks_name[sizeof(dks->dks_name) - 1] = 0; /* ensure term */ - error = bufq_alloc(&new, dks->dks_name, + error = bufq_alloc(&new_bufq, dks->dks_name, BUFQ_EXACT|BUFQ_SORT_RAWBLOCK); if (error) return error; mutex_enter(&sc->sc_mutex); - old = sc->sc_bufq; - bufq_move(new, old); - sc->sc_bufq = new; + old_bufq = sc->sc_bufq; + bufq_move(new_bufq, old_bufq); + sc->sc_bufq = new_bufq; mutex_exit(&sc->sc_mutex); - bufq_free(old); + bufq_free(old_bufq); return 0; }
CVS commit: src/sys/dev/pci
Module Name:src Committed By: matt Date: Fri Sep 5 05:29:16 UTC 2014 Modified Files: src/sys/dev/pci: pci.c pci_subr.c pciconf.c Log Message: Don't use class or typename as a variable name. To generate a diff of this commit: cvs rdiff -u -r1.144 -r1.145 src/sys/dev/pci/pci.c cvs rdiff -u -r1.124 -r1.125 src/sys/dev/pci/pci_subr.c cvs rdiff -u -r1.36 -r1.37 src/sys/dev/pci/pciconf.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/pci/pci.c diff -u src/sys/dev/pci/pci.c:1.144 src/sys/dev/pci/pci.c:1.145 --- src/sys/dev/pci/pci.c:1.144 Sun Sep 15 09:19:52 2013 +++ src/sys/dev/pci/pci.c Fri Sep 5 05:29:16 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pci.c,v 1.144 2013/09/15 09:19:52 martin Exp $ */ +/* $NetBSD: pci.c,v 1.145 2014/09/05 05:29:16 matt Exp $ */ /* * Copyright (c) 1995, 1996, 1997, 1998 @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci.c,v 1.144 2013/09/15 09:19:52 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci.c,v 1.145 2014/09/05 05:29:16 matt Exp $"); #include "opt_pci.h" @@ -274,7 +274,7 @@ pci_probe_device(struct pci_softc *sc, p { pci_chipset_tag_t pc = sc->sc_pc; struct pci_attach_args pa; - pcireg_t id, /* csr, */ class, intr, bhlcr, bar, endbar; + pcireg_t id, /* csr, */ pciclass, intr, bhlcr, bar, endbar; int ret, pin, bus, device, function, i, width; int locs[PCICF_NLOCS]; @@ -290,7 +290,7 @@ pci_probe_device(struct pci_softc *sc, p id = pci_conf_read(pc, tag, PCI_ID_REG); /* csr = pci_conf_read(pc, tag, PCI_COMMAND_STATUS_REG); */ - class = pci_conf_read(pc, tag, PCI_CLASS_REG); + pciclass = pci_conf_read(pc, tag, PCI_CLASS_REG); /* Invalid vendor ID value? */ if (PCI_VENDOR(id) == PCI_VENDOR_INVALID) @@ -364,7 +364,7 @@ pci_probe_device(struct pci_softc *sc, p pa.pa_function = function; pa.pa_tag = tag; pa.pa_id = id; - pa.pa_class = class; + pa.pa_class = pciclass; /* * Set up memory, I/O enable, and PCI command flags Index: src/sys/dev/pci/pci_subr.c diff -u src/sys/dev/pci/pci_subr.c:1.124 src/sys/dev/pci/pci_subr.c:1.125 --- src/sys/dev/pci/pci_subr.c:1.124 Mon Jun 9 11:08:05 2014 +++ src/sys/dev/pci/pci_subr.c Fri Sep 5 05:29:16 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_subr.c,v 1.124 2014/06/09 11:08:05 msaitoh Exp $ */ +/* $NetBSD: pci_subr.c,v 1.125 2014/09/05 05:29:16 matt Exp $ */ /* * Copyright (c) 1997 Zubin D. Dittia. All rights reserved. @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.124 2014/06/09 11:08:05 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.125 2014/09/05 05:29:16 matt Exp $"); #ifdef _KERNEL_OPT #include "opt_pci.h" @@ -603,7 +603,7 @@ pci_devinfo(pcireg_t id_reg, pcireg_t cl { pci_vendor_id_t vendor; pci_product_id_t product; - pci_class_t class; + pci_class_t pciclass; pci_subclass_t subclass; pci_interface_t interface; pci_revision_t revision; @@ -617,7 +617,7 @@ pci_devinfo(pcireg_t id_reg, pcireg_t cl vendor = PCI_VENDOR(id_reg); product = PCI_PRODUCT(id_reg); - class = PCI_CLASS(class_reg); + pciclass = PCI_CLASS(class_reg); subclass = PCI_SUBCLASS(class_reg); interface = PCI_INTERFACE(class_reg); revision = PCI_REVISION(class_reg); @@ -627,7 +627,7 @@ pci_devinfo(pcireg_t id_reg, pcireg_t cl classp = pci_class; while (classp->name != NULL) { - if (class == classp->val) + if (pciclass == classp->val) break; classp++; } @@ -660,7 +660,7 @@ pci_devinfo(pcireg_t id_reg, pcireg_t cl cp += snprintf(cp, ep - cp, " ("); if (classp->name == NULL) cp += snprintf(cp, ep - cp, - "class 0x%02x, subclass 0x%02x", class, subclass); + "class 0x%02x, subclass 0x%02x", pciclass, subclass); else { if (subclassp == NULL || subclassp->name == NULL) cp += snprintf(cp, ep - cp, @@ -2375,13 +2375,13 @@ pci_conf_print( { pcireg_t regs[o2i(256)]; int off, capoff, endoff, hdrtype; - const char *typename; + const char *type_name; #ifdef _KERNEL - void (*typeprintfn)(pci_chipset_tag_t, pcitag_t, const pcireg_t *, + void (*type_printfn)(pci_chipset_tag_t, pcitag_t, const pcireg_t *, int); int sizebars; #else - void (*typeprintfn)(const pcireg_t *); + void (*type_printfn)(const pcireg_t *); #endif printf("PCI configuration registers:\n"); @@ -2420,43 +2420,43 @@ pci_conf_print( switch (hdrtype) { /* XXX make a table, eventually */ case 0: /* Standard device header */ - typename = "\"normal\" device"; - typeprintfn = &pci_conf_print_type0; + type_name = "\"normal\" device"; + type_printfn = &pci_conf_print_type0; capoff = PCI_CAPLISTPTR_REG; endoff = 64; break; case 1: /* PCI-PCI bridge header */ - typename = "PCI-PCI bridge"; - typeprintfn = &pci_conf_print_type1; + type_name = "PCI-PCI bridge"; + type_printfn = &pci_conf_print_type1; capoff = PCI_CAPLISTPTR_REG; endoff = 64; break; case 2: /* PCI-CardBus b
CVS commit: src/sys/dev/scsipi
Module Name:src Committed By: matt Date: Fri Sep 5 05:30:42 UTC 2014 Modified Files: src/sys/dev/scsipi: sd.c Log Message: Don't use new as a variable name. To generate a diff of this commit: cvs rdiff -u -r1.308 -r1.309 src/sys/dev/scsipi/sd.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/scsipi/sd.c diff -u src/sys/dev/scsipi/sd.c:1.308 src/sys/dev/scsipi/sd.c:1.309 --- src/sys/dev/scsipi/sd.c:1.308 Sun Aug 10 16:44:36 2014 +++ src/sys/dev/scsipi/sd.c Fri Sep 5 05:30:42 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: sd.c,v 1.308 2014/08/10 16:44:36 tls Exp $ */ +/* $NetBSD: sd.c,v 1.309 2014/09/05 05:30:42 matt Exp $ */ /*- * Copyright (c) 1998, 2003, 2004 The NetBSD Foundation, Inc. @@ -47,7 +47,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.308 2014/08/10 16:44:36 tls Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.309 2014/09/05 05:30:42 matt Exp $"); #include "opt_scsi.h" @@ -1272,8 +1272,8 @@ sdioctl(dev_t dev, u_long cmd, void *add case DIOCSSTRATEGY: { struct disk_strategy *dks = addr; - struct bufq_state *new; - struct bufq_state *old; + struct bufq_state *new_bufq; + struct bufq_state *old_bufq; if ((flag & FWRITE) == 0) { return EBADF; @@ -1283,17 +1283,17 @@ sdioctl(dev_t dev, u_long cmd, void *add return EINVAL; } dks->dks_name[sizeof(dks->dks_name) - 1] = 0; /* ensure term */ - error = bufq_alloc(&new, dks->dks_name, + error = bufq_alloc(&new_bufq, dks->dks_name, BUFQ_EXACT|BUFQ_SORT_RAWBLOCK); if (error) { return error; } s = splbio(); - old = sd->buf_queue; - bufq_move(new, old); - sd->buf_queue = new; + old_bufq = sd->buf_queue; + bufq_move(new_bufq, old_bufq); + sd->buf_queue = new_bufq; splx(s); - bufq_free(old); + bufq_free(old_bufq); return 0; }
CVS commit: src/sys/dev/scsipi
Module Name:src Committed By: matt Date: Fri Sep 5 05:30:23 UTC 2014 Modified Files: src/sys/dev/scsipi: sdvar.h Log Message: Don't nest structure definitions. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/dev/scsipi/sdvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/scsipi/sdvar.h diff -u src/sys/dev/scsipi/sdvar.h:1.34 src/sys/dev/scsipi/sdvar.h:1.35 --- src/sys/dev/scsipi/sdvar.h:1.34 Thu Feb 2 19:43:06 2012 +++ src/sys/dev/scsipi/sdvar.h Fri Sep 5 05:30:23 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: sdvar.h,v 1.34 2012/02/02 19:43:06 tls Exp $ */ +/* $NetBSD: sdvar.h,v 1.35 2014/09/05 05:30:23 matt Exp $ */ /*- * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc. @@ -61,6 +61,16 @@ #define SD_IO_TIMEOUT (60 * 1000) #endif +struct disk_parms { + u_long heads; /* number of heads */ + u_long cyls; /* number of cylinders */ + u_long sectors; /* number of sectors/track */ + u_long blksize; /* number of bytes/sector */ + u_long rot_rate; /* rotational rate, in RPM */ + u_int64_t disksize; /* total number sectors */ + u_int64_t disksize512; /* total number sectors */ +}; + struct sd_softc { device_t sc_dev; struct disk sc_dk; @@ -74,15 +84,7 @@ struct sd_softc { struct scsipi_periph *sc_periph;/* contains our targ, lun, etc. */ - struct disk_parms { - u_long heads; /* number of heads */ - u_long cyls; /* number of cylinders */ - u_long sectors; /* number of sectors/track */ - u_long blksize; /* number of bytes/sector */ - u_long rot_rate; /* rotational rate, in RPM */ - u_int64_t disksize; /* total number sectors */ - u_int64_t disksize512; /* total number sectors */ - } params; + struct disk_parms params; struct bufq_state *buf_queue; callout_t sc_callout;
CVS commit: src/sys/dev/usb
Module Name:src Committed By: matt Date: Fri Sep 5 05:31:15 UTC 2014 Modified Files: src/sys/dev/usb: ugen.c Log Message: Don't nest structure definitions. To generate a diff of this commit: cvs rdiff -u -r1.124 -r1.125 src/sys/dev/usb/ugen.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/ugen.c diff -u src/sys/dev/usb/ugen.c:1.124 src/sys/dev/usb/ugen.c:1.125 --- src/sys/dev/usb/ugen.c:1.124 Fri Jul 25 08:10:39 2014 +++ src/sys/dev/usb/ugen.c Fri Sep 5 05:31:15 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ugen.c,v 1.124 2014/07/25 08:10:39 dholland Exp $ */ +/* $NetBSD: ugen.c,v 1.125 2014/09/05 05:31:15 matt Exp $ */ /* * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.124 2014/07/25 08:10:39 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.125 2014/09/05 05:31:15 matt Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -81,6 +81,13 @@ int ugendebug = 0; #define UGEN_BULK_RA_WB_BUFSIZE 16384 /* default buffer size */ #define UGEN_BULK_RA_WB_BUFMAX (1 << 20) /* maximum allowed buffer */ +struct isoreq { + struct ugen_endpoint *sce; + usbd_xfer_handle xfer; + void *dmabuf; + u_int16_t sizes[UGEN_NISORFRMS]; +}; + struct ugen_endpoint { struct ugen_softc *sc; usb_endpoint_descriptor_t *edesc; @@ -103,12 +110,7 @@ struct ugen_endpoint { u_int32_t ra_wb_used; /* how much is in buffer */ u_int32_t ra_wb_xferlen; /* current xfer length for RA/WB */ usbd_xfer_handle ra_wb_xfer; - struct isoreq { - struct ugen_endpoint *sce; - usbd_xfer_handle xfer; - void *dmabuf; - u_int16_t sizes[UGEN_NISORFRMS]; - } isoreqs[UGEN_NISOREQS]; + struct isoreq isoreqs[UGEN_NISOREQS]; /* Keep these last; we don't overwrite them in ugen_set_config() */ #define UGEN_ENDPOINT_NONZERO_CRUFT offsetof(struct ugen_endpoint, rsel) struct selinfo rsel;
CVS commit: src/sys/net
Module Name:src Committed By: matt Date: Fri Sep 5 05:32:07 UTC 2014 Modified Files: src/sys/net: if_llc.h Log Message: Don't use class as a structure member. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/net/if_llc.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/net/if_llc.h diff -u src/sys/net/if_llc.h:1.20 src/sys/net/if_llc.h:1.21 --- src/sys/net/if_llc.h:1.20 Mon Sep 8 23:36:55 2008 +++ src/sys/net/if_llc.h Fri Sep 5 05:32:07 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_llc.h,v 1.20 2008/09/08 23:36:55 gmcgarry Exp $ */ +/* $NetBSD: if_llc.h,v 1.21 2014/09/05 05:32:07 matt Exp $ */ /* * Copyright (c) 1988, 1993 @@ -49,7 +49,7 @@ struct llc { struct { uint8_t control; uint8_t format_id; - uint8_t class; + uint8_t class_u; uint8_t window_x2; } type_u /* XXX __packed ??? */; struct { @@ -95,7 +95,7 @@ struct frmrinfo { #define llc_control llc_un.type_u.control #define llc_control_ext llc_un.type_raw.control_ext #define llc_fid llc_un.type_u.format_id -#define llc_class llc_un.type_u.class +#define llc_class llc_un.type_u.class_u #define llc_window llc_un.type_u.window_x2 #define llc_frmrinfo llc_un.type_frmr.frmr_rej_pdu0 #define llc_frmr_pdu0 llc_un.type_frmr.frmr_rej_pdu0
CVS commit: src/sys/netinet6
Module Name:src Committed By: matt Date: Fri Sep 5 05:33:06 UTC 2014 Modified Files: src/sys/netinet6: frag6.c Log Message: Don't use new as a variable name. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/sys/netinet6/frag6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/frag6.c diff -u src/sys/netinet6/frag6.c:1.55 src/sys/netinet6/frag6.c:1.56 --- src/sys/netinet6/frag6.c:1.55 Fri Aug 30 07:42:08 2013 +++ src/sys/netinet6/frag6.c Fri Sep 5 05:33:06 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: frag6.c,v 1.55 2013/08/30 07:42:08 christos Exp $ */ +/* $NetBSD: frag6.c,v 1.56 2014/09/05 05:33:06 matt Exp $ */ /* $KAME: frag6.c,v 1.40 2002/05/27 21:40:31 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: frag6.c,v 1.55 2013/08/30 07:42:08 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: frag6.c,v 1.56 2014/09/05 05:33:06 matt Exp $"); #include #include @@ -568,15 +568,15 @@ frag6_deq(struct ip6asfrag *af6) } void -frag6_insque(struct ip6q *new, struct ip6q *old) +frag6_insque(struct ip6q *newq, struct ip6q *oldq) { KASSERT(mutex_owned(&frag6_lock)); - new->ip6q_prev = old; - new->ip6q_next = old->ip6q_next; - old->ip6q_next->ip6q_prev= new; - old->ip6q_next = new; + newq->ip6q_prev = oldq; + newq->ip6q_next = oldq->ip6q_next; + oldq->ip6q_next->ip6q_prev= newq; + oldq->ip6q_next = newq; } void
CVS commit: src/sys/kern
Module Name:src Committed By: matt Date: Fri Sep 5 05:33:39 UTC 2014 Modified Files: src/sys/kern: tty.c Log Message: Don't use catch as a varible name. To generate a diff of this commit: cvs rdiff -u -r1.261 -r1.262 src/sys/kern/tty.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/kern/tty.c diff -u src/sys/kern/tty.c:1.261 src/sys/kern/tty.c:1.262 --- src/sys/kern/tty.c:1.261 Thu May 22 16:31:19 2014 +++ src/sys/kern/tty.c Fri Sep 5 05:33:39 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: tty.c,v 1.261 2014/05/22 16:31:19 dholland Exp $ */ +/* $NetBSD: tty.c,v 1.262 2014/09/05 05:33:39 matt Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -63,7 +63,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.261 2014/05/22 16:31:19 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.262 2014/09/05 05:33:39 matt Exp $"); #include "opt_compat_netbsd.h" @@ -2669,7 +2669,7 @@ out: * Must be called with the tty lock held. */ int -ttysleep(struct tty *tp, kcondvar_t *cv, bool catch, int timo) +ttysleep(struct tty *tp, kcondvar_t *cv, bool catch_p, int timo) { int error; short gen; @@ -2678,8 +2678,8 @@ ttysleep(struct tty *tp, kcondvar_t *cv, gen = tp->t_gen; if (cv == NULL) - error = kpause("ttypause", catch, timo, &tty_lock); - else if (catch) + error = kpause("ttypause", catch_p, timo, &tty_lock); + else if (catch_p) error = cv_timedwait_sig(cv, &tty_lock, timo); else error = cv_timedwait(cv, &tty_lock, timo); @@ -2917,7 +2917,7 @@ ttysigintr(void *cookie) mutex_spin_enter(&tty_lock); while ((tp = TAILQ_FIRST(&tty_sigqueue)) != NULL) { KASSERT(tp->t_sigcount > 0); - for (st = 0; st < TTYSIG_COUNT; st++) { + for (st = TTYSIG_PG1; st < TTYSIG_COUNT; st++) { if ((sig = firstsig(&tp->t_sigs[st])) != 0) break; }
CVS commit: src/sys/nfs
Module Name:src Committed By: matt Date: Fri Sep 5 05:34:41 UTC 2014 Modified Files: src/sys/nfs: nfsrtt.h Log Message: Don't nest structure definitions. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/nfs/nfsrtt.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/nfs/nfsrtt.h diff -u src/sys/nfs/nfsrtt.h:1.9 src/sys/nfs/nfsrtt.h:1.10 --- src/sys/nfs/nfsrtt.h:1.9 Thu Dec 28 00:39:03 2006 +++ src/sys/nfs/nfsrtt.h Fri Sep 5 05:34:41 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: nfsrtt.h,v 1.9 2006/12/28 00:39:03 yamt Exp $ */ +/* $NetBSD: nfsrtt.h,v 1.10 2014/09/05 05:34:41 matt Exp $ */ /* * Copyright (c) 1992, 1993 @@ -52,19 +52,21 @@ * list goes from nfsrtt.rttl[pos] --> nfsrtt.rttl[pos - 1] in * chronological order of completion. */ +struct rttl { + u_int32_t proc; /* NFS procedure number */ + int rtt; /* Measured round trip time */ + int rto; /* Round Trip Timeout */ + int sent; /* # rpcs in progress */ + int cwnd; /* Send window */ + int srtt; /* Ave Round Trip Time */ + int sdrtt; /* Ave mean deviation of RTT */ + fsid_t fsid; /* Fsid for mount point */ + struct timeval tstamp; /* Timestamp of log entry */ +}; + struct nfsrtt { int pos; /* Position in array for next entry */ - struct rttl { - u_int32_t proc; /* NFS procedure number */ - int rtt; /* Measured round trip time */ - int rto; /* Round Trip Timeout */ - int sent; /* # rpcs in progress */ - int cwnd; /* Send window */ - int srtt; /* Ave Round Trip Time */ - int sdrtt; /* Ave mean deviation of RTT */ - fsid_t fsid; /* Fsid for mount point */ - struct timeval tstamp; /* Timestamp of log entry */ - } rttl[NFSRTTLOGSIZ]; + struct rttl rttl[NFSRTTLOGSIZ]; }; /*
CVS commit: src/sys/nfs
Module Name:src Committed By: matt Date: Fri Sep 5 05:34:57 UTC 2014 Modified Files: src/sys/nfs: nfs_bio.c nfs_clntsocket.c nfs_socket.c Log Message: Don't use catch as a variable name. To generate a diff of this commit: cvs rdiff -u -r1.189 -r1.190 src/sys/nfs/nfs_bio.c cvs rdiff -u -r1.1 -r1.2 src/sys/nfs/nfs_clntsocket.c cvs rdiff -u -r1.192 -r1.193 src/sys/nfs/nfs_socket.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/nfs/nfs_bio.c diff -u src/sys/nfs/nfs_bio.c:1.189 src/sys/nfs/nfs_bio.c:1.190 --- src/sys/nfs/nfs_bio.c:1.189 Mon Aug 12 17:46:38 2013 +++ src/sys/nfs/nfs_bio.c Fri Sep 5 05:34:57 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_bio.c,v 1.189 2013/08/12 17:46:38 hannken Exp $ */ +/* $NetBSD: nfs_bio.c,v 1.190 2014/09/05 05:34:57 matt Exp $ */ /* * Copyright (c) 1989, 1993 @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nfs_bio.c,v 1.189 2013/08/12 17:46:38 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nfs_bio.c,v 1.190 2014/09/05 05:34:57 matt Exp $"); #ifdef _KERNEL_OPT #include "opt_nfs.h" @@ -615,15 +615,15 @@ nfs_vinvalbuf(struct vnode *vp, int flag struct nfsnode *np = VTONFS(vp); struct nfsmount *nmp = VFSTONFS(vp->v_mount); int error = 0, allerror = 0, slptimeo; - bool catch; + bool catch_p; if ((nmp->nm_flag & NFSMNT_INT) == 0) intrflg = 0; if (intrflg) { - catch = true; + catch_p = true; slptimeo = 2 * hz; } else { - catch = false; + catch_p = false; slptimeo = 0; } /* @@ -645,7 +645,7 @@ nfs_vinvalbuf(struct vnode *vp, int flag */ np->n_flag |= NFLUSHINPROG; mutex_exit(vp->v_interlock); - error = vinvalbuf(vp, flags, cred, l, catch, 0); + error = vinvalbuf(vp, flags, cred, l, catch_p, 0); while (error) { if (allerror == 0) allerror = error; @@ -737,7 +737,7 @@ nfs_asyncio(struct buf *bp) struct nfs_iod *iod; struct nfsmount *nmp; int slptimeo = 0, error; - bool catch = false; + bool catch_p = false; if (nfs_numasync == 0) return (EIO); @@ -745,7 +745,7 @@ nfs_asyncio(struct buf *bp) nmp = VFSTONFS(bp->b_vp->v_mount); again: if (nmp->nm_flag & NFSMNT_INT) - catch = true; + catch_p = true; /* * Find a free iod to process this request. @@ -796,7 +796,7 @@ again: if (curlwp == uvm.pagedaemon_lwp) { /* Enque for later, to avoid free-page deadlock */ } else while (nmp->nm_bufqlen >= 2 * nmp->nm_bufqiods) { - if (catch) { + if (catch_p) { error = cv_timedwait_sig(&nmp->nm_aiocv, &nmp->nm_lock, slptimeo); } else { @@ -808,8 +808,8 @@ again: mutex_exit(&nmp->nm_lock); return (EINTR); } -if (catch) { - catch = false; +if (catch_p) { + catch_p = false; slptimeo = 2 * hz; } } Index: src/sys/nfs/nfs_clntsocket.c diff -u src/sys/nfs/nfs_clntsocket.c:1.1 src/sys/nfs/nfs_clntsocket.c:1.2 --- src/sys/nfs/nfs_clntsocket.c:1.1 Tue Mar 2 23:19:09 2010 +++ src/sys/nfs/nfs_clntsocket.c Fri Sep 5 05:34:57 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_clntsocket.c,v 1.1 2010/03/02 23:19:09 pooka Exp $ */ +/* $NetBSD: nfs_clntsocket.c,v 1.2 2014/09/05 05:34:57 matt Exp $ */ /* * Copyright (c) 1989, 1991, 1993, 1995 @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nfs_clntsocket.c,v 1.1 2010/03/02 23:19:09 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nfs_clntsocket.c,v 1.2 2014/09/05 05:34:57 matt Exp $"); #ifdef _KERNEL_OPT #include "opt_nfs.h" @@ -964,13 +964,13 @@ nfs_sndlock(struct nfsmount *nmp, struct { struct lwp *l; int timeo = 0; - bool catch = false; + bool catch_p = false; int error = 0; if (rep) { l = rep->r_lwp; if (rep->r_nmp->nm_flag & NFSMNT_INT) - catch = true; + catch_p = true; } else l = NULL; mutex_enter(&nmp->nm_lock); @@ -979,13 +979,13 @@ nfs_sndlock(struct nfsmount *nmp, struct error = EINTR; goto quit; } - if (catch) { + if (catch_p) { cv_timedwait_sig(&nmp->nm_sndcv, &nmp->nm_lock, timeo); } else { cv_timedwait(&nmp->nm_sndcv, &nmp->nm_lock, timeo); } - if (catch) { - catch = false; + if (catch_p) { + catch_p = false; timeo = 2 * hz; } } Index: src/sys/nfs/nfs_socket.c diff -u src/sys/nfs/nfs_socket.c:1.192 src/sys/nfs/nfs_socket.c:1.193 --- src/sys/nfs/nfs_socket.c:1.192 Tue Aug 5 07:55:32 2014 +++ src/sys/nfs/nfs_socket.c Fri Sep 5 05:34:57 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: nfs_socket.c,v 1.192 2014/08/05 07:55:32 rtr Exp $ */ +/* $NetBSD: nfs_socket.c,v 1.193 2014/09/05 05:34:57 matt Exp $ */ /* * Copyright (c) 1989, 1991, 1993, 1995 @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nfs_socket.c,v 1.192 2014/08/05 07:55:32 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nfs_socket.c,v 1.193 2014/09/05 05:34:57 matt Exp $"); #ifdef _KERNEL_OPT #include "opt_nfs.h" @@ -889,12 +889,12 @@ nfs_rcvlock(struct nfsmount *nmp, struct { int *flagp = &nmp->nm_iflag; int slptimeo
CVS commit: src/sys/uvm
Module Name:src Committed By: matt Date: Fri Sep 5 05:36:21 UTC 2014 Modified Files: src/sys/uvm: uvm_page.c uvm_pglist.c Log Message: Don't use C++ try keyword as a variable name. To generate a diff of this commit: cvs rdiff -u -r1.185 -r1.186 src/sys/uvm/uvm_page.c cvs rdiff -u -r1.65 -r1.66 src/sys/uvm/uvm_pglist.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/uvm/uvm_page.c diff -u src/sys/uvm/uvm_page.c:1.185 src/sys/uvm/uvm_page.c:1.186 --- src/sys/uvm/uvm_page.c:1.185 Sun Aug 10 16:44:37 2014 +++ src/sys/uvm/uvm_page.c Fri Sep 5 05:36:21 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_page.c,v 1.185 2014/08/10 16:44:37 tls Exp $ */ +/* $NetBSD: uvm_page.c,v 1.186 2014/09/05 05:36:21 matt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.185 2014/08/10 16:44:37 tls Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_page.c,v 1.186 2014/09/05 05:36:21 matt Exp $"); #include "opt_ddb.h" #include "opt_uvmhist.h" @@ -886,7 +886,7 @@ static inline int vm_physseg_find_bsearch(struct vm_physseg *segs, int nsegs, paddr_t pframe, int *offp) { /* binary search for it */ - u_int start, len, try; + u_int start, len, guess; /* * if try is too large (thus target is less than try) we reduce @@ -902,17 +902,17 @@ vm_physseg_find_bsearch(struct vm_physse */ for (start = 0, len = nsegs ; len != 0 ; len = len / 2) { - try = start + (len / 2); /* try in the middle */ + guess = start + (len / 2); /* try in the middle */ /* start past our try? */ - if (pframe >= segs[try].start) { + if (pframe >= segs[guess].start) { /* was try correct? */ - if (pframe < segs[try].end) { + if (pframe < segs[guess].end) { if (offp) - *offp = pframe - segs[try].start; -return(try);/* got it */ + *offp = pframe - segs[guess].start; +return guess;/* got it */ } - start = try + 1; /* next time, start here */ + start = guess + 1; /* next time, start here */ len--; /* "adjust" */ } else { /* Index: src/sys/uvm/uvm_pglist.c diff -u src/sys/uvm/uvm_pglist.c:1.65 src/sys/uvm/uvm_pglist.c:1.66 --- src/sys/uvm/uvm_pglist.c:1.65 Mon May 19 05:48:14 2014 +++ src/sys/uvm/uvm_pglist.c Fri Sep 5 05:36:21 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_pglist.c,v 1.65 2014/05/19 05:48:14 riastradh Exp $ */ +/* $NetBSD: uvm_pglist.c,v 1.66 2014/09/05 05:36:21 matt Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.65 2014/05/19 05:48:14 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.66 2014/09/05 05:36:21 matt Exp $"); #include #include @@ -119,7 +119,7 @@ static int uvm_pglistalloc_c_ps(struct vm_physseg *ps, int num, paddr_t low, paddr_t high, paddr_t alignment, paddr_t boundary, struct pglist *rlist) { - signed int try, limit, tryidx, end, idx, skip; + signed int candidate, limit, candidateidx, end, idx, skip; struct vm_page *pgs; int pagemask; bool second_pass; @@ -147,7 +147,7 @@ uvm_pglistalloc_c_ps(struct vm_physseg * * We start our search at the just after where the last allocation * succeeded. */ - try = roundup2(max(low, ps->avail_start + ps->start_hint), alignment); + candidate = roundup2(max(low, ps->avail_start + ps->start_hint), alignment); limit = min(high, ps->avail_end); pagemask = ~((boundary >> PAGE_SHIFT) - 1); skip = 0; @@ -158,7 +158,7 @@ uvm_pglistalloc_c_ps(struct vm_physseg * bool ok = true; signed int cnt; - if (try + num > limit) { + if (candidate + num > limit) { if (ps->start_hint == 0 || second_pass) { /* * We've run past the allowable range. @@ -171,19 +171,19 @@ uvm_pglistalloc_c_ps(struct vm_physseg * * is were we started. */ second_pass = true; - try = roundup2(max(low, ps->avail_start), alignment); + candidate = roundup2(max(low, ps->avail_start), alignment); limit = min(limit, ps->avail_start + ps->start_hint); skip = 0; continue; } if (boundary != 0 && - ((try ^ (try + num - 1)) & pagemask) != 0) { + ((candidate ^ (candidate + num - 1)) & pagemask) != 0) { /* * Region crosses boundary. Jump to the boundary * just crossed and ensure alignment. */ - try = (try + num - 1) & pagemask; - try = roundup2(try, alignment); + candidate = (candidate + num - 1) & pagemask; + candidate = roundup2(candidate, alignment); skip = 0; continue; } @@ -192,24 +192,24 @@ uvm_pglistalloc_c_ps(struct vm_physseg * * Make sure this is a managed physical page. */ - if (vm_physseg_find(try, &cidx) != ps - vm_physmem) + if (vm_physseg_find(candidate, &cidx) != ps - vm_physmem) panic("pgalloc contig: botch1"); - if (cidx != try - ps->start) + if (cidx != candidate -
CVS commit: src/sys/uvm
Module Name:src Committed By: matt Date: Fri Sep 5 05:36:49 UTC 2014 Modified Files: src/sys/uvm: uvm_unix.c Log Message: Don't use C++ new keyword as a variable name. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/uvm/uvm_unix.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/uvm_unix.c diff -u src/sys/uvm/uvm_unix.c:1.44 src/sys/uvm/uvm_unix.c:1.45 --- src/sys/uvm/uvm_unix.c:1.44 Wed Feb 2 20:07:25 2011 +++ src/sys/uvm/uvm_unix.c Fri Sep 5 05:36:49 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_unix.c,v 1.44 2011/02/02 20:07:25 chuck Exp $ */ +/* $NetBSD: uvm_unix.c,v 1.45 2014/09/05 05:36:49 matt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -45,7 +45,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_unix.c,v 1.44 2011/02/02 20:07:25 chuck Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_unix.c,v 1.45 2014/09/05 05:36:49 matt Exp $"); #include "opt_pax.h" @@ -75,21 +75,22 @@ sys_obreak(struct lwp *l, const struct s } */ struct proc *p = l->l_proc; struct vmspace *vm = p->p_vmspace; - vaddr_t new, old; + vaddr_t nbreak, obreak; int error; mutex_enter(&p->p_auxlock); - old = (vaddr_t)vm->vm_daddr; - new = round_page((vaddr_t)SCARG(uap, nsize)); - if (new == 0 || - ((new - old) > p->p_rlimit[RLIMIT_DATA].rlim_cur && new > old)) { + obreak = (vaddr_t)vm->vm_daddr; + nbreak = round_page((vaddr_t)SCARG(uap, nsize)); + if (nbreak == 0 + || ((nbreak - obreak) > p->p_rlimit[RLIMIT_DATA].rlim_cur + && nbreak > obreak)) { mutex_exit(&p->p_auxlock); return (ENOMEM); } - old = round_page(old + ptoa(vm->vm_dsize)); + obreak = round_page(obreak + ptoa(vm->vm_dsize)); - if (new == old) { + if (nbreak == obreak) { mutex_exit(&p->p_auxlock); return (0); } @@ -98,7 +99,7 @@ sys_obreak(struct lwp *l, const struct s * grow or shrink? */ - if (new > old) { + if (nbreak > obreak) { vm_prot_t prot = UVM_PROT_READ | UVM_PROT_WRITE; vm_prot_t maxprot = UVM_PROT_ALL; @@ -106,7 +107,7 @@ sys_obreak(struct lwp *l, const struct s pax_mprotect(l, &prot, &maxprot); #endif /* PAX_MPROTECT */ - error = uvm_map(&vm->vm_map, &old, new - old, NULL, + error = uvm_map(&vm->vm_map, &obreak, nbreak - obreak, NULL, UVM_UNKNOWN_OFFSET, 0, UVM_MAPFLAG(prot, maxprot, UVM_INH_COPY, @@ -115,15 +116,15 @@ sys_obreak(struct lwp *l, const struct s if (error) { #ifdef DEBUG uprintf("sbrk: grow %#"PRIxVADDR" failed, error = %d\n", - new - old, error); + nbreak - obreak, error); #endif mutex_exit(&p->p_auxlock); return (error); } - vm->vm_dsize += atop(new - old); + vm->vm_dsize += atop(nbreak - obreak); } else { - uvm_deallocate(&vm->vm_map, new, old - new); - vm->vm_dsize -= atop(old - new); + uvm_deallocate(&vm->vm_map, nbreak, obreak - nbreak); + vm->vm_dsize -= atop(obreak - nbreak); } mutex_exit(&p->p_auxlock);
CVS commit: src/sys/sys
Module Name:src Committed By: matt Date: Fri Sep 5 05:37:37 UTC 2014 Modified Files: src/sys/sys: socketvar.h Log Message: Don't nest structure definitions. To generate a diff of this commit: cvs rdiff -u -r1.134 -r1.135 src/sys/sys/socketvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/socketvar.h diff -u src/sys/sys/socketvar.h:1.134 src/sys/sys/socketvar.h:1.135 --- src/sys/sys/socketvar.h:1.134 Wed Jul 9 04:54:04 2014 +++ src/sys/sys/socketvar.h Fri Sep 5 05:37:37 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: socketvar.h,v 1.134 2014/07/09 04:54:04 rtr Exp $ */ +/* $NetBSD: socketvar.h,v 1.135 2014/09/05 05:37:37 matt Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -121,6 +121,12 @@ struct sockbuf { * handle on protocol and pointer to protocol * private data and error information. */ +struct so_accf { + struct accept_filter *so_accept_filter; + void *so_accept_filter_arg; /* saved filter args */ + char *so_accept_filter_str; /* saved user args */ +}; + struct socket { kmutex_t * volatile so_lock; /* pointer to lock on structure */ kcondvar_t so_cv; /* notifier */ @@ -172,11 +178,7 @@ struct socket { struct uidinfo *so_uidinfo; /* who opened the socket */ gid_t so_egid; /* creator effective gid */ pid_t so_cpid; /* creator pid */ - struct so_accf { - struct accept_filter *so_accept_filter; - void *so_accept_filter_arg; /* saved filter args */ - char *so_accept_filter_str; /* saved user args */ - } *so_accf; + struct so_accf *so_accf; kauth_cred_t so_cred; /* socket credentials */ };
CVS commit: src/sys/fs/puffs
Module Name:src Committed By: matt Date: Fri Sep 5 05:39:52 UTC 2014 Modified Files: src/sys/fs/puffs: puffs_msgif.c Log Message: Don't use C++ class and this keywords as variables. To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 src/sys/fs/puffs/puffs_msgif.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/fs/puffs/puffs_msgif.c diff -u src/sys/fs/puffs/puffs_msgif.c:1.95 src/sys/fs/puffs/puffs_msgif.c:1.96 --- src/sys/fs/puffs/puffs_msgif.c:1.95 Thu Aug 28 08:29:50 2014 +++ src/sys/fs/puffs/puffs_msgif.c Fri Sep 5 05:39:52 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: puffs_msgif.c,v 1.95 2014/08/28 08:29:50 hannken Exp $ */ +/* $NetBSD: puffs_msgif.c,v 1.96 2014/09/05 05:39:52 matt Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: puffs_msgif.c,v 1.95 2014/08/28 08:29:50 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: puffs_msgif.c,v 1.96 2014/09/05 05:39:52 matt Exp $"); #include #include @@ -290,11 +290,11 @@ puffs_msg_setdelta(struct puffs_msgpark } void -puffs_msg_setinfo(struct puffs_msgpark *park, int class, int type, +puffs_msg_setinfo(struct puffs_msgpark *park, int opclass, int type, puffs_cookie_t ck) { - park->park_preq->preq_opclass = PUFFSOP_OPCLASS(class); + park->park_preq->preq_opclass = PUFFSOP_OPCLASS(opclass); park->park_preq->preq_optype = type; park->park_preq->preq_cookie = ck; } @@ -605,10 +605,10 @@ puffs_msg_sendresp(struct puffs_mount *p * should block while waiting for input. Handles all locking internally. */ int -puffs_msgif_getout(void *this, size_t maxsize, int nonblock, +puffs_msgif_getout(void *ctx, size_t maxsize, int nonblock, uint8_t **data, size_t *dlen, void **parkptr) { - struct puffs_mount *pmp = this; + struct puffs_mount *pmp = ctx; struct puffs_msgpark *park = NULL; struct puffs_req *preq = NULL; int error; @@ -712,9 +712,9 @@ puffs_msgif_getout(void *this, size_t ma * or the death chamber. */ void -puffs_msgif_releaseout(void *this, void *parkptr, int status) +puffs_msgif_releaseout(void *ctx, void *parkptr, int status) { - struct puffs_mount *pmp = this; + struct puffs_mount *pmp = ctx; struct puffs_msgpark *park = parkptr; DPRINTF(("puffs_releaseout: returning park %p, errno %d: " , @@ -742,9 +742,9 @@ puffs_msgif_releaseout(void *this, void } size_t -puffs_msgif_waitcount(void *this) +puffs_msgif_waitcount(void *ctx) { - struct puffs_mount *pmp = this; + struct puffs_mount *pmp = ctx; size_t rv; mutex_enter(&pmp->pmp_lock); @@ -758,9 +758,9 @@ puffs_msgif_waitcount(void *this) * XXX: locking with this one? */ static void -puffsop_msg(void *this, struct puffs_req *preq) +puffsop_msg(void *ctx, struct puffs_req *preq) { - struct puffs_mount *pmp = this; + struct puffs_mount *pmp = ctx; struct putter_hdr *pth = &preq->preq_pth; struct puffs_msgpark *park; int wgone; @@ -950,9 +950,9 @@ puffsop_flush(struct puffs_mount *pmp, s } int -puffs_msgif_dispatch(void *this, struct putter_hdr *pth) +puffs_msgif_dispatch(void *ctx, struct putter_hdr *pth) { - struct puffs_mount *pmp = this; + struct puffs_mount *pmp = ctx; struct puffs_req *preq = (struct puffs_req *)pth; struct puffs_sopreq *psopr; @@ -1024,7 +1024,7 @@ puffs_msgif_dispatch(void *this, struct } default: - DPRINTF(("dispatch: invalid class 0x%x\n", preq->preq_opclass)); + DPRINTF(("dispatch: invalid opclass 0x%x\n", preq->preq_opclass)); puffs_msg_sendresp(pmp, preq, EOPNOTSUPP); break; } @@ -1147,9 +1147,9 @@ puffs_sop_thread(void *arg) } int -puffs_msgif_close(void *this) +puffs_msgif_close(void *ctx) { - struct puffs_mount *pmp = this; + struct puffs_mount *pmp = ctx; struct mount *mp = PMPTOMP(pmp); mutex_enter(&pmp->pmp_lock);
CVS commit: src/sys/sys
Module Name:src Committed By: matt Date: Fri Sep 5 05:42:50 UTC 2014 Modified Files: src/sys/sys: exec.h file.h namei.h pool.h sysctl.h wapbl.h Log Message: Don't nest structure definitions. To generate a diff of this commit: cvs rdiff -u -r1.145 -r1.146 src/sys/sys/exec.h cvs rdiff -u -r1.75 -r1.76 src/sys/sys/file.h cvs rdiff -u -r1.89 -r1.90 src/sys/sys/namei.h cvs rdiff -u -r1.76 -r1.77 src/sys/sys/pool.h cvs rdiff -u -r1.213 -r1.214 src/sys/sys/sysctl.h cvs rdiff -u -r1.15 -r1.16 src/sys/sys/wapbl.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/exec.h diff -u src/sys/sys/exec.h:1.145 src/sys/sys/exec.h:1.146 --- src/sys/sys/exec.h:1.145 Thu Mar 6 09:30:37 2014 +++ src/sys/sys/exec.h Fri Sep 5 05:42:50 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: exec.h,v 1.145 2014/03/06 09:30:37 matt Exp $ */ +/* $NetBSD: exec.h,v 1.146 2014/09/05 05:42:50 matt Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -181,6 +181,10 @@ struct exec_vmcmd_set { }; #define EXEC_DEFAULT_VMCMD_SETSIZE 9 /* # of cmds in set to start */ +struct exec_fakearg { + char *fa_arg; + size_t fa_len; +}; struct exec_package { const char *ep_name; /* file's name */ @@ -205,10 +209,7 @@ struct exec_package { vaddr_t ep_vm_maxaddr; /* top of process address space */ u_int ep_flags; /* flags; see below. */ size_t ep_fa_len; /* byte size of ep_fa */ - struct exec_fakearg { - char *fa_arg; - size_t fa_len; - } *ep_fa; /* a fake args vector for scripts */ + struct exec_fakearg *ep_fa; /* a fake args vector for scripts */ int ep_fd; /* a file descriptor we're holding */ void *ep_emul_arg; /* emulation argument */ const struct execsw *ep_esch;/* execsw entry */ Index: src/sys/sys/file.h diff -u src/sys/sys/file.h:1.75 src/sys/sys/file.h:1.76 --- src/sys/sys/file.h:1.75 Wed Jan 2 19:35:43 2013 +++ src/sys/sys/file.h Fri Sep 5 05:42:50 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: file.h,v 1.75 2013/01/02 19:35:43 dsl Exp $ */ +/* $NetBSD: file.h,v 1.76 2014/09/05 05:42:50 matt Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -78,6 +78,22 @@ struct iovec; struct stat; struct knote; +struct fileops { + int (*fo_read) (struct file *, off_t *, struct uio *, +kauth_cred_t, int); + int (*fo_write) (struct file *, off_t *, struct uio *, +kauth_cred_t, int); + int (*fo_ioctl) (struct file *, u_long, void *); + int (*fo_fcntl) (struct file *, u_int, void *); + int (*fo_poll) (struct file *, int); + int (*fo_stat) (struct file *, struct stat *); + int (*fo_close) (struct file *); + int (*fo_kqfilter) (struct file *, struct knote *); + void (*fo_restart) (struct file *); + void (*fo_spare1) (void); + void (*fo_spare2) (void); +}; + /* * Kernel file descriptor. One entry for each open kernel vnode and * socket. @@ -88,21 +104,7 @@ struct knote; struct file { off_t f_offset; /* first, is 64-bit */ kauth_cred_t f_cred; /* creds associated with descriptor */ - const struct fileops { - int (*fo_read) (struct file *, off_t *, struct uio *, - kauth_cred_t, int); - int (*fo_write) (struct file *, off_t *, struct uio *, - kauth_cred_t, int); - int (*fo_ioctl) (struct file *, u_long, void *); - int (*fo_fcntl) (struct file *, u_int, void *); - int (*fo_poll) (struct file *, int); - int (*fo_stat) (struct file *, struct stat *); - int (*fo_close) (struct file *); - int (*fo_kqfilter) (struct file *, struct knote *); - void (*fo_restart) (struct file *); - void (*fo_spare1) (void); - void (*fo_spare2) (void); - } *f_ops; + const struct fileops *f_ops; void *f_data; /* descriptor data, e.g. vnode/socket */ LIST_ENTRY(file) f_list; /* list of active files */ kmutex_t f_lock; /* lock on structure */ Index: src/sys/sys/namei.h diff -u src/sys/sys/namei.h:1.89 src/sys/sys/namei.h:1.90 --- src/sys/sys/namei.h:1.89 Tue Jun 3 21:16:37 2014 +++ src/sys/sys/namei.h Fri Sep 5 05:42:50 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: namei.h,v 1.89 2014/06/03 21:16:37 joerg Exp $ */ +/* $NetBSD: namei.h,v 1.90 2014/09/05 05:42:50 matt Exp $ */ /* @@ -85,6 +85,26 @@ void pathbuf_stringcopy_put(struct pathb int pathbuf_maybe_copyin(const char *userpath, enum uio_seg seg, struct pathbuf **ret); /* + * Lookup parameters: this structure describes the subset of + * information from the nameidata structure that is passed + * through the VOP interface. + */ +struct componentname { + /* + * Arguments to lookup. + */ + uint32_t cn_nameiop; /* namei operation */ + uint32_t cn_flags; /* flags to namei */ + kauth_cred_t cn_cred; /* credentials */ + /* + * Shared between lookup and commit routines. + */ + const char *cn_nameptr; /* pointer to looked up name */ + size_t cn_namelen; /* length of looked up comp */ + size_t cn_consume; /* chars to consume in lookup */ +}; + +/* * Encapsulation of namei parameters. */ struct nameidata { @@ -115,20 +135,7 @@ struct
CVS commit: src/sys/sys
Module Name:src Committed By: matt Date: Fri Sep 5 05:44:50 UTC 2014 Modified Files: src/sys/sys: cdefs.h Log Message: Don't use or in __RENAME because it triggers -Wc++-compat To generate a diff of this commit: cvs rdiff -u -r1.121 -r1.122 src/sys/sys/cdefs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/cdefs.h diff -u src/sys/sys/cdefs.h:1.121 src/sys/sys/cdefs.h:1.122 --- src/sys/sys/cdefs.h:1.121 Fri Aug 8 19:43:49 2014 +++ src/sys/sys/cdefs.h Fri Sep 5 05:44:50 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: cdefs.h,v 1.121 2014/08/08 19:43:49 joerg Exp $ */ +/* $NetBSD: cdefs.h,v 1.122 2014/09/05 05:44:50 matt Exp $ */ /* * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. @@ -415,7 +415,7 @@ #error "No function renaming possible" #endif /* __GNUC__ */ #else /* _STANDALONE || _KERNEL */ -#define __RENAME(x) no renaming in kernel or standalone environment +#define __RENAME(x) no renaming in kernel/standalone environment #endif /*
CVS commit: src/sys/sys
Module Name:src Committed By: matt Date: Fri Sep 5 05:45:34 UTC 2014 Modified Files: src/sys/sys: cpu_data.h Log Message: Change type of cpu_uvm to struct uvm_cpu * To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/sys/cpu_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/cpu_data.h diff -u src/sys/sys/cpu_data.h:1.37 src/sys/sys/cpu_data.h:1.38 --- src/sys/sys/cpu_data.h:1.37 Sun May 25 15:34:19 2014 +++ src/sys/sys/cpu_data.h Fri Sep 5 05:45:34 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_data.h,v 1.37 2014/05/25 15:34:19 rmind Exp $ */ +/* $NetBSD: cpu_data.h,v 1.38 2014/09/05 05:45:34 matt Exp $ */ /*- * Copyright (c) 2004, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -98,7 +98,7 @@ struct cpu_data { uint64_t cpu_nintr; /* interrupt count */ uint64_t cpu_nsoft; /* soft interrupt count */ uint64_t cpu_nfault; /* pagefault counter */ - void *cpu_uvm; /* uvm per-cpu data */ + struct uvm_cpu *cpu_uvm; /* uvm per-cpu data */ void *cpu_softcpu; /* soft interrupt table */ TAILQ_HEAD(,buf) cpu_biodone; /* finished block xfers */ percpu_cpu_t cpu_percpu; /* per-cpu data */
CVS commit: src/sys/sys
Module Name:src Committed By: matt Date: Fri Sep 5 05:46:15 UTC 2014 Modified Files: src/sys/sys: hash.h Log Message: Add explicit casts for (const uint8_t *) To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/sys/hash.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/hash.h diff -u src/sys/sys/hash.h:1.7 src/sys/sys/hash.h:1.8 --- src/sys/sys/hash.h:1.7 Sun Jul 8 01:24:08 2012 +++ src/sys/sys/hash.h Fri Sep 5 05:46:15 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: hash.h,v 1.7 2012/07/08 01:24:08 rmind Exp $ */ +/* $NetBSD: hash.h,v 1.8 2014/09/05 05:46:15 matt Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -51,7 +51,7 @@ static __inline uint32_t hash32_buf(const void *bf, size_t len, uint32_t hash) { - const uint8_t *s = bf; + const uint8_t *s = (const uint8_t *)bf; while (len-- != 0) /* "nemesi": k=257, r=r*257 */ hash = hash * 257 + *s++; @@ -72,7 +72,7 @@ hash32_buf(const void *bf, size_t len, u static __inline uint32_t hash32_str(const void *bf, uint32_t hash) { - const uint8_t *s = bf; + const uint8_t *s = (const uint8_t *)bf; uint8_t c; while ((c = *s++) != 0) @@ -90,7 +90,7 @@ hash32_str(const void *bf, uint32_t hash static __inline uint32_t hash32_strn(const void *bf, size_t len, uint32_t hash) { - const uint8_t *s = bf; + const uint8_t *s = (const uint8_t *)bf; uint8_t c; while ((c = *s++) != 0 && len-- != 0)
CVS commit: src/sys/sys
Module Name:src Committed By: matt Date: Fri Sep 5 05:46:54 UTC 2014 Modified Files: src/sys/sys: spawn.h Log Message: Don't nest enum in structures. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/sys/spawn.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/spawn.h diff -u src/sys/sys/spawn.h:1.4 src/sys/sys/spawn.h:1.5 --- src/sys/sys/spawn.h:1.4 Sat Apr 27 21:35:25 2013 +++ src/sys/sys/spawn.h Fri Sep 5 05:46:54 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: spawn.h,v 1.4 2013/04/27 21:35:25 joerg Exp $ */ +/* $NetBSD: spawn.h,v 1.5 2014/09/05 05:46:54 matt Exp $ */ /*- * Copyright (c) 2008 Ed Schouten @@ -47,8 +47,9 @@ struct posix_spawnattr { sigset_t sa_sigmask; }; +enum fae_action { FAE_OPEN, FAE_DUP2, FAE_CLOSE }; typedef struct posix_spawn_file_actions_entry { - enum { FAE_OPEN, FAE_DUP2, FAE_CLOSE } fae_action; + enum fae_action fae_action; int fae_fildes; union {
CVS commit: src/sys/sys
Module Name:src Committed By: matt Date: Fri Sep 5 05:47:40 UTC 2014 Modified Files: src/sys/sys: device.h disklabel.h resourcevar.h Log Message: Don't nest structure definitions. To generate a diff of this commit: cvs rdiff -u -r1.144 -r1.145 src/sys/sys/device.h cvs rdiff -u -r1.116 -r1.117 src/sys/sys/disklabel.h cvs rdiff -u -r1.54 -r1.55 src/sys/sys/resourcevar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/device.h diff -u src/sys/sys/device.h:1.144 src/sys/sys/device.h:1.145 --- src/sys/sys/device.h:1.144 Sat Oct 12 16:49:01 2013 +++ src/sys/sys/device.h Fri Sep 5 05:47:40 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: device.h,v 1.144 2013/10/12 16:49:01 christos Exp $ */ +/* $NetBSD: device.h,v 1.145 2014/09/05 05:47:40 matt Exp $ */ /* * Copyright (c) 1996, 2000 Christopher G. Demetriou @@ -138,6 +138,11 @@ struct device_suspensor { #define DEVICE_SUSPENSORS_MAX 16 +struct device_garbage { + device_t *dg_devs; + int dg_ndevs; +}; + struct device { devclass_t dv_class; /* this device's classification */ TAILQ_ENTRY(device) dv_list; /* entry on list of all devices */ @@ -182,10 +187,7 @@ struct device { *dv_bus_suspensors[DEVICE_SUSPENSORS_MAX], *dv_driver_suspensors[DEVICE_SUSPENSORS_MAX], *dv_class_suspensors[DEVICE_SUSPENSORS_MAX]; - struct device_garbage { - device_t *dg_devs; - int dg_ndevs; - } dv_garbage; + struct device_garbage dv_garbage; }; /* dv_flags */ Index: src/sys/sys/disklabel.h diff -u src/sys/sys/disklabel.h:1.116 src/sys/sys/disklabel.h:1.117 --- src/sys/sys/disklabel.h:1.116 Tue Nov 5 00:36:02 2013 +++ src/sys/sys/disklabel.h Fri Sep 5 05:47:40 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: disklabel.h,v 1.116 2013/11/05 00:36:02 msaitoh Exp $ */ +/* $NetBSD: disklabel.h,v 1.117 2014/09/05 05:47:40 matt Exp $ */ /* * Copyright (c) 1987, 1988, 1993 @@ -98,6 +98,24 @@ #define DISKMAGIC ((uint32_t)0x82564557) /* The disk magic number */ #ifndef _LOCORE +struct partition { /* the partition table */ + uint32_t p_size; /* number of sectors in partition */ + uint32_t p_offset; /* starting sector */ + union { + uint32_t fsize; /* FFS, ADOS: filesystem basic fragment size */ + uint32_t cdsession; /* ISO9660: session offset */ + } __partition_u2; +#define p_fsize __partition_u2.fsize +#define p_cdsession __partition_u2.cdsession + uint8_t p_fstype; /* filesystem type, see below */ + uint8_t p_frag; /* filesystem fragments per block */ + union { + uint16_t cpg; /* UFS: FS cylinders per group */ + uint16_t sgs; /* LFS: FS segment shift */ + } __partition_u1; +#define p_cpg __partition_u1.cpg +#define p_sgs __partition_u1.sgs +}; struct disklabel { uint32_t d_magic; /* the magic number */ uint16_t d_type; /* drive type */ @@ -181,25 +199,8 @@ struct disklabel { uint16_t d_npartitions; /* number of partitions in following */ uint32_t d_bbsize; /* size of boot area at sn0, bytes */ uint32_t d_sbsize; /* max size of fs superblock, bytes */ - struct partition { /* the partition table */ - uint32_t p_size; /* number of sectors in partition */ - uint32_t p_offset; /* starting sector */ - union { - uint32_t fsize; /* FFS, ADOS: - filesystem basic fragment size */ - uint32_t cdsession; /* ISO9660: session offset */ - } __partition_u2; -#define p_fsize __partition_u2.fsize -#define p_cdsession __partition_u2.cdsession - uint8_t p_fstype; /* filesystem type, see below */ - uint8_t p_frag; /* filesystem fragments per block */ - union { - uint16_t cpg; /* UFS: FS cylinders per group */ - uint16_t sgs; /* LFS: FS segment shift */ - } __partition_u1; -#define p_cpg __partition_u1.cpg -#define p_sgs __partition_u1.sgs - } d_partitions[MAXPARTITIONS]; /* actually may be more */ + struct partition d_partitions[MAXPARTITIONS]; + /* the partition table, actually may be more */ }; #if defined(__HAVE_OLD_DISKLABEL) && !HAVE_NBTOOL_CONFIG_H Index: src/sys/sys/resourcevar.h diff -u src/sys/sys/resourcevar.h:1.54 src/sys/sys/resourcevar.h:1.55 --- src/sys/sys/resourcevar.h:1.54 Sat Nov 3 23:22:22 2012 +++ src/sys/sys/resourcevar.h Fri Sep 5 05:47:40 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: resourcevar.h,v 1.54 2012/11/03 23:22:22 njoly Exp $ */ +/* $NetBSD: resourcevar.h,v 1.55 2014/09/05 05:47:40 matt Exp $ */ /* * Copyright (c) 1991, 1993 @@ -43,6 +43,15 @@ /* * Kernel per-process accounting / statistics */ +struct uprof {/* profile arguments */ + char * pr_base; /* buffer base */ + size_t pr_size; /* buffer size */ + u_long pr_off; /* pc offset */ + u_int pr_scale; /* pc scaling */ + u_long pr_addr; /* temp storage for addr until AST */ + u_long pr_ticks; /* temp storage for ticks until AST */ +}; + struct pstats { #define pstat_startzero p_ru struct rusage p_ru; /* stats for this proc */ @@ -51,15 +60,7 @@ struct pstats { #define pstat_startcopy p_timer struct itimerspe
CVS commit: src/sys/sys
Module Name:src Committed By: matt Date: Fri Sep 5 05:48:59 UTC 2014 Modified Files: src/sys/sys: mbuf.h Log Message: const mbuftypes explicitly cast assignments to ext_buf To generate a diff of this commit: cvs rdiff -u -r1.155 -r1.156 src/sys/sys/mbuf.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/mbuf.h diff -u src/sys/sys/mbuf.h:1.155 src/sys/sys/mbuf.h:1.156 --- src/sys/sys/mbuf.h:1.155 Sat May 17 23:27:59 2014 +++ src/sys/sys/mbuf.h Fri Sep 5 05:48:59 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: mbuf.h,v 1.155 2014/05/17 23:27:59 rmind Exp $ */ +/* $NetBSD: mbuf.h,v 1.156 2014/09/05 05:48:59 matt Exp $ */ /*- * Copyright (c) 1996, 1997, 1999, 2001, 2007 The NetBSD Foundation, Inc. @@ -379,7 +379,7 @@ MBUF_DEFINE(mbuf, MHLEN, MLEN); #define MT_OOBDATA 7 /* expedited data */ #ifdef MBUFTYPES -static const char *mbuftypes[] = { +static const char * const mbuftypes[] = { "mbfree", "mbdata", "mbheader", @@ -482,7 +482,7 @@ do { \ #define _MCLGET(m, pool_cache, size, how)\ do { \ - (m)->m_ext_storage.ext_buf = \ + (m)->m_ext_storage.ext_buf = (char *)\ pool_cache_get_paddr((pool_cache),\ (how) == M_WAIT ? (PR_WAITOK|PR_LIMITFAIL) : 0, \ &(m)->m_ext_storage.ext_paddr);\ @@ -507,7 +507,7 @@ do { \ #define MEXTMALLOC(m, size, how) \ do { \ - (m)->m_ext_storage.ext_buf = \ + (m)->m_ext_storage.ext_buf = (char *)\ malloc((size), mbtypes[(m)->m_type], (how)); \ if ((m)->m_ext_storage.ext_buf != NULL) { \ MCLINITREFERENCE(m); \ @@ -525,7 +525,7 @@ do { \ #define MEXTADD(m, buf, size, type, free, arg)\ do { \ MCLINITREFERENCE(m); \ - (m)->m_data = (m)->m_ext.ext_buf = (void *)(buf); \ + (m)->m_data = (m)->m_ext.ext_buf = (char *)(buf); \ (m)->m_flags = ((m)->m_flags & ~M_EXTCOPYFLAGS) | M_EXT; \ (m)->m_ext.ext_flags = 0; \ (m)->m_ext.ext_size = (size); \
CVS commit: src/sys/sys
Module Name:src Committed By: matt Date: Fri Sep 5 05:52:27 UTC 2014 Modified Files: src/sys/sys: rnd.h Log Message: Change rndsource_setcb to use void (*)(size_t, void *) for cb. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/sys/rnd.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/rnd.h diff -u src/sys/sys/rnd.h:1.41 src/sys/sys/rnd.h:1.42 --- src/sys/sys/rnd.h:1.41 Sun Aug 10 16:44:36 2014 +++ src/sys/sys/rnd.h Fri Sep 5 05:52:27 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rnd.h,v 1.41 2014/08/10 16:44:36 tls Exp $ */ +/* $NetBSD: rnd.h,v 1.42 2014/09/05 05:52:27 matt Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -154,7 +154,8 @@ typedef struct krndsource { } krndsource_t; static inline void -rndsource_setcb(struct krndsource *const rs, void *const cb, void *const arg) +rndsource_setcb(struct krndsource *const rs, void (*const cb)(size_t, void *), +void *const arg) { rs->get = cb; rs->getarg = arg;
CVS commit: src/sys
Module Name:src Committed By: matt Date: Fri Sep 5 05:54:48 UTC 2014 Modified Files: src/sys/kern: sysv_sem.c src/sys/sys: sem.h Log Message: Don't nest struct undo and change it to sem_undo_entry To generate a diff of this commit: cvs rdiff -u -r1.90 -r1.91 src/sys/kern/sysv_sem.c cvs rdiff -u -r1.29 -r1.30 src/sys/sys/sem.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/sysv_sem.c diff -u src/sys/kern/sysv_sem.c:1.90 src/sys/kern/sysv_sem.c:1.91 --- src/sys/kern/sysv_sem.c:1.90 Tue Feb 25 18:30:11 2014 +++ src/sys/kern/sysv_sem.c Fri Sep 5 05:54:48 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: sysv_sem.c,v 1.90 2014/02/25 18:30:11 pooka Exp $ */ +/* $NetBSD: sysv_sem.c,v 1.91 2014/09/05 05:54:48 matt Exp $ */ /*- * Copyright (c) 1999, 2007 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sysv_sem.c,v 1.90 2014/02/25 18:30:11 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysv_sem.c,v 1.91 2014/09/05 05:54:48 matt Exp $"); #define SYSVSEM @@ -344,7 +344,7 @@ semundo_adjust(struct proc *p, struct se int adjval) { struct sem_undo *suptr; - struct undo *sunptr; + struct sem_undo_entry *sunptr; int i; KASSERT(mutex_owned(&semlock)); @@ -402,7 +402,7 @@ void semundo_clear(int semid, int semnum) { struct sem_undo *suptr; - struct undo *sunptr, *sunend; + struct sem_undo_entry *sunptr, *sunend; KASSERT(mutex_owned(&semlock)); Index: src/sys/sys/sem.h diff -u src/sys/sys/sem.h:1.29 src/sys/sys/sem.h:1.30 --- src/sys/sys/sem.h:1.29 Mon Jan 19 19:39:41 2009 +++ src/sys/sys/sem.h Fri Sep 5 05:54:48 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: sem.h,v 1.29 2009/01/19 19:39:41 christos Exp $ */ +/* $NetBSD: sem.h,v 1.30 2014/09/05 05:54:48 matt Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -102,15 +102,17 @@ struct sembuf { /* * Undo structure (one per process) */ +struct sem_undo_entry { + short un_adjval; /* adjust on exit values */ + short un_num; /* semaphore # */ + int un_id; /* semid */ +}; + struct sem_undo { struct sem_undo *un_next; /* ptr to next active undo structure */ struct proc *un_proc; /* owner of this structure */ short un_cnt; /* # of active entries */ - struct undo { - short un_adjval; /* adjust on exit values */ - short un_num; /* semaphore # */ - int un_id; /* semid */ - } un_ent[1]; /* undo entries */ + struct sem_undo_entry un_ent[1];/* undo entries */ }; #endif /* _KERNEL */ @@ -183,7 +185,7 @@ struct sem_sysctl_info { #endif /* actual size of an undo structure */ -#define SEMUSZ (sizeof(struct sem_undo)+sizeof(struct undo)*SEMUME) +#define SEMUSZ (sizeof(struct sem_undo)+sizeof(struct sem_undo_entry)*SEMUME) /* * Structures allocated in machdep.c
CVS commit: src/sys/kern
Module Name:src Committed By: matt Date: Fri Sep 5 05:57:21 UTC 2014 Modified Files: src/sys/kern: kern_descrip.c kern_event.c kern_lwp.c kern_module.c kern_mutex.c kern_rndsink.c kern_rwlock.c kern_sleepq.c subr_autoconf.c subr_devsw.c sys_descrip.c sys_pipe.c uipc_sem.c uipc_socket2.c uipc_usrreq.c vfs_bio.c vfs_dirhash.c vfs_subr.c vfs_trans.c vfs_vnode.c vfs_wapbl.c vfs_xattr.c Log Message: Don't next structure and enum definitions. Don't use C++ keywords new, try, class, private, etc. To generate a diff of this commit: cvs rdiff -u -r1.225 -r1.226 src/sys/kern/kern_descrip.c cvs rdiff -u -r1.80 -r1.81 src/sys/kern/kern_event.c cvs rdiff -u -r1.177 -r1.178 src/sys/kern/kern_lwp.c cvs rdiff -u -r1.99 -r1.100 src/sys/kern/kern_module.c cvs rdiff -u -r1.58 -r1.59 src/sys/kern/kern_mutex.c cvs rdiff -u -r1.8 -r1.9 src/sys/kern/kern_rndsink.c cvs rdiff -u -r1.43 -r1.44 src/sys/kern/kern_rwlock.c cvs rdiff -u -r1.49 -r1.50 src/sys/kern/kern_sleepq.c cvs rdiff -u -r1.231 -r1.232 src/sys/kern/subr_autoconf.c cvs rdiff -u -r1.32 -r1.33 src/sys/kern/subr_devsw.c cvs rdiff -u -r1.28 -r1.29 src/sys/kern/sys_descrip.c cvs rdiff -u -r1.138 -r1.139 src/sys/kern/sys_pipe.c cvs rdiff -u -r1.40 -r1.41 src/sys/kern/uipc_sem.c cvs rdiff -u -r1.120 -r1.121 src/sys/kern/uipc_socket2.c cvs rdiff -u -r1.169 -r1.170 src/sys/kern/uipc_usrreq.c cvs rdiff -u -r1.250 -r1.251 src/sys/kern/vfs_bio.c cvs rdiff -u -r1.11 -r1.12 src/sys/kern/vfs_dirhash.c cvs rdiff -u -r1.444 -r1.445 src/sys/kern/vfs_subr.c cvs rdiff -u -r1.30 -r1.31 src/sys/kern/vfs_trans.c cvs rdiff -u -r1.37 -r1.38 src/sys/kern/vfs_vnode.c cvs rdiff -u -r1.59 -r1.60 src/sys/kern/vfs_wapbl.c cvs rdiff -u -r1.31 -r1.32 src/sys/kern/vfs_xattr.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/kern/kern_descrip.c diff -u src/sys/kern/kern_descrip.c:1.225 src/sys/kern/kern_descrip.c:1.226 --- src/sys/kern/kern_descrip.c:1.225 Fri Jul 25 08:10:40 2014 +++ src/sys/kern/kern_descrip.c Fri Sep 5 05:57:21 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_descrip.c,v 1.225 2014/07/25 08:10:40 dholland Exp $ */ +/* $NetBSD: kern_descrip.c,v 1.226 2014/09/05 05:57:21 matt Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_descrip.c,v 1.225 2014/07/25 08:10:40 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_descrip.c,v 1.226 2014/09/05 05:57:21 matt Exp $"); #include #include @@ -741,7 +741,7 @@ fd_dup(file_t *fp, int minfd, int *newp, * dup2 operation. */ int -fd_dup2(file_t *fp, unsigned new, int flags) +fd_dup2(file_t *fp, unsigned newfd, int flags) { filedesc_t *fdp = curlwp->l_fd; fdfile_t *ff; @@ -753,7 +753,7 @@ fd_dup2(file_t *fp, unsigned new, int fl * Ensure there are enough slots in the descriptor table, * and allocate an fdfile_t up front in case we need it. */ - while (new >= fdp->fd_dt->dt_nfiles) { + while (newfd >= fdp->fd_dt->dt_nfiles) { fd_tryexpand(curproc); } ff = pool_cache_get(fdfile_cache, PR_WAITOK); @@ -764,10 +764,10 @@ fd_dup2(file_t *fp, unsigned new, int fl * XXX Potential for deadlock here? */ mutex_enter(&fdp->fd_lock); - while (fd_isused(fdp, new)) { + while (fd_isused(fdp, newfd)) { mutex_exit(&fdp->fd_lock); - if (fd_getfile(new) != NULL) { - (void)fd_close(new); + if (fd_getfile(newfd) != NULL) { + (void)fd_close(newfd); } else { /* * Crummy, but unlikely to happen. @@ -779,18 +779,18 @@ fd_dup2(file_t *fp, unsigned new, int fl mutex_enter(&fdp->fd_lock); } dt = fdp->fd_dt; - if (dt->dt_ff[new] == NULL) { - KASSERT(new >= NDFDFILE); - dt->dt_ff[new] = ff; + if (dt->dt_ff[newfd] == NULL) { + KASSERT(newfd >= NDFDFILE); + dt->dt_ff[newfd] = ff; ff = NULL; } - fd_used(fdp, new); + fd_used(fdp, newfd); mutex_exit(&fdp->fd_lock); - dt->dt_ff[new]->ff_exclose = (flags & O_CLOEXEC) != 0; + dt->dt_ff[newfd]->ff_exclose = (flags & O_CLOEXEC) != 0; fp->f_flag |= flags & FNONBLOCK; /* Slot is now allocated. Insert copy of the file. */ - fd_affix(curproc, fp, new); + fd_affix(curproc, fp, newfd); if (ff != NULL) { pool_cache_put(fdfile_cache, ff); } @@ -846,8 +846,8 @@ int fd_alloc(proc_t *p, int want, int *result) { filedesc_t *fdp = p->p_fd; - int i, lim, last, error; - u_int off, new; + int i, lim, last, error, hi; + u_int off; fdtab_t *dt; KASSERT(p == curproc || p == &proc0); @@ -866,21 +866,21 @@ fd_alloc(proc_t *p, int want, int *resul if ((i = want) < fdp->fd_freefile) i = fdp->fd_freefile; off = i >> NDENTRYSHIFT; - new = fd_next_zero(fdp, fdp->fd_himap, off, + hi = fd_next_zero(fdp, fdp->fd_himap, off, (last + NDENTRIES - 1) >> NDENTRYSHIFT); - if (new == -1) + if (hi == -1) break; - i = fd_next_zero(fdp, &fdp->fd_lomap[new], - new > off ? 0 : i & NDENTRYMASK,
CVS commit: src/sys/net
Module Name:src Committed By: matt Date: Fri Sep 5 06:00:05 UTC 2014 Modified Files: src/sys/net: rtsock.c Log Message: Don't use C++ new keyword To generate a diff of this commit: cvs rdiff -u -r1.163 -r1.164 src/sys/net/rtsock.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/net/rtsock.c diff -u src/sys/net/rtsock.c:1.163 src/sys/net/rtsock.c:1.164 --- src/sys/net/rtsock.c:1.163 Sat Aug 9 05:33:01 2014 +++ src/sys/net/rtsock.c Fri Sep 5 06:00:05 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: rtsock.c,v 1.163 2014/08/09 05:33:01 rtr Exp $ */ +/* $NetBSD: rtsock.c,v 1.164 2014/09/05 06:00:05 matt Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.163 2014/08/09 05:33:01 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.164 2014/09/05 06:00:05 matt Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1379,7 +1379,6 @@ sysctl_rtable(SYSCTLFN_ARGS) { void *where = oldp; size_t *given = oldlenp; - const void *new = newp; int i, s, error = EINVAL; u_char af; struct rt_walkarg w; @@ -1387,7 +1386,7 @@ sysctl_rtable(SYSCTLFN_ARGS) if (namelen == 1 && name[0] == CTL_QUERY) return sysctl_query(SYSCTLFN_CALL(rnode)); - if (new) + if (newp) return EPERM; if (namelen != 3) return EINVAL;
CVS commit: src/sys/net
Module Name:src Committed By: matt Date: Fri Sep 5 06:01:24 UTC 2014 Modified Files: src/sys/net: net_stats.h Log Message: Cast return value of _NET_STAT_GETREF To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/net/net_stats.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/net/net_stats.h diff -u src/sys/net/net_stats.h:1.3 src/sys/net/net_stats.h:1.4 --- src/sys/net/net_stats.h:1.3 Sun May 4 07:22:14 2008 +++ src/sys/net/net_stats.h Fri Sep 5 06:01:24 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: net_stats.h,v 1.3 2008/05/04 07:22:14 thorpej Exp $ */ +/* $NetBSD: net_stats.h,v 1.4 2014/09/05 06:01:24 matt Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #ifdef _KERNEL #include -#define _NET_STAT_GETREF(stat) percpu_getref((stat)) +#define _NET_STAT_GETREF(stat) ((uint64_t *)percpu_getref((stat))) #define _NET_STAT_PUTREF(stat) percpu_putref((stat)) #define _NET_STATINC(stat, x) \
CVS commit: src/sys/netinet
Module Name:src Committed By: matt Date: Fri Sep 5 06:02:11 UTC 2014 Modified Files: src/sys/netinet: if_arp.c Log Message: Deanonymize structure for llinfo_arp. To generate a diff of this commit: cvs rdiff -u -r1.158 -r1.159 src/sys/netinet/if_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/sys/netinet/if_arp.c diff -u src/sys/netinet/if_arp.c:1.158 src/sys/netinet/if_arp.c:1.159 --- src/sys/netinet/if_arp.c:1.158 Tue Jun 3 01:24:32 2014 +++ src/sys/netinet/if_arp.c Fri Sep 5 06:02:11 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_arp.c,v 1.158 2014/06/03 01:24:32 ozaki-r Exp $ */ +/* $NetBSD: if_arp.c,v 1.159 2014/09/05 06:02:11 matt Exp $ */ /*- * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc. @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.158 2014/06/03 01:24:32 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.159 2014/09/05 06:02:11 matt Exp $"); #include "opt_ddb.h" #include "opt_inet.h" @@ -153,7 +153,7 @@ static struct llinfo_arp *arplookup(stru static void in_arpinput(struct mbuf *); static void arp_drainstub(void); -LIST_HEAD(, llinfo_arp) llinfo_arp; +LIST_HEAD(llinfo_arpq, llinfo_arp) llinfo_arp; struct ifqueue arpintrq = { .ifq_head = NULL, .ifq_tail = NULL,
CVS commit: src/sys/netinet
Module Name:src Committed By: matt Date: Fri Sep 5 06:03:51 UTC 2014 Modified Files: src/sys/netinet: tcp_vtw.c Log Message: Don't use C++ keywords (class, template) as variables To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/netinet/tcp_vtw.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/netinet/tcp_vtw.c diff -u src/sys/netinet/tcp_vtw.c:1.10 src/sys/netinet/tcp_vtw.c:1.11 --- src/sys/netinet/tcp_vtw.c:1.10 Sun Sep 15 14:47:40 2013 +++ src/sys/netinet/tcp_vtw.c Fri Sep 5 06:03:51 2014 @@ -124,7 +124,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: tcp_vtw.c,v 1.10 2013/09/15 14:47:40 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tcp_vtw.c,v 1.11 2014/09/05 06:03:51 matt Exp $"); #define db_trace(__a, __b) do { } while (/*CONSTCOND*/0) @@ -1342,9 +1342,9 @@ vtw_init(fatp_ctl_t *fat, vtw_ctl_t *ctl /*!\brief map class to TCP MSL */ static inline uint32_t -class_to_msl(int class) +class_to_msl(int msl_class) { - switch (class) { + switch (msl_class) { case 0: case 1: return tcp_msl_remote ? tcp_msl_remote : (TCPTV_MSL >> 0); @@ -1875,7 +1875,7 @@ vtw_control(int af, uint32_t msl) { fatp_ctl_t *fat; vtw_ctl_t *ctl; - int class = msl_to_class(msl); + int msl_class = msl_to_class(msl); if (!vtw_select(af, &fat, &ctl)) return NULL; @@ -1893,7 +1893,7 @@ vtw_control(int af, uint32_t msl) tcbtable.vestige = &tcp_hooks; } - return ctl + class; + return ctl + msl_class; } /*!\brief add TCP pcb to vestigial timewait @@ -2249,12 +2249,12 @@ vtw_earlyinit(void) /*!\brief add lalp, fafp entries for debug */ int -vtw_debug_add(int af, sin_either_t *la, sin_either_t *fa, int msl, int class) +vtw_debug_add(int af, sin_either_t *la, sin_either_t *fa, int msl, int msl_class) { vtw_ctl_t *ctl; vtw_t *vtw; - ctl = vtw_control(af, msl ? msl : class_to_msl(class)); + ctl = vtw_control(af, msl ? msl : class_to_msl(msl_class)); if (!ctl) return 0;
CVS commit: src/sys/netinet
Module Name:src Committed By: matt Date: Fri Sep 5 06:04:43 UTC 2014 Modified Files: src/sys/netinet: tcp_subr.c Log Message: Don't use C++ keyword (template) as variable. To generate a diff of this commit: cvs rdiff -u -r1.255 -r1.256 src/sys/netinet/tcp_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/netinet/tcp_subr.c diff -u src/sys/netinet/tcp_subr.c:1.255 src/sys/netinet/tcp_subr.c:1.256 --- src/sys/netinet/tcp_subr.c:1.255 Sun Mar 16 05:20:30 2014 +++ src/sys/netinet/tcp_subr.c Fri Sep 5 06:04:43 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_subr.c,v 1.255 2014/03/16 05:20:30 dholland Exp $ */ +/* $NetBSD: tcp_subr.c,v 1.256 2014/09/05 06:04:43 matt Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -91,7 +91,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tcp_subr.c,v 1.255 2014/03/16 05:20:30 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tcp_subr.c,v 1.256 2014/09/05 06:04:43 matt Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -635,7 +635,7 @@ tcp_template(struct tcpcb *tp) * segment are as specified by the parameters. */ int -tcp_respond(struct tcpcb *tp, struct mbuf *template, struct mbuf *m, +tcp_respond(struct tcpcb *tp, struct mbuf *mtemplate, struct mbuf *m, struct tcphdr *th0, tcp_seq ack, tcp_seq seq, int flags) { #ifdef INET6 @@ -673,11 +673,11 @@ tcp_respond(struct tcpcb *tp, struct mbu ip6 = NULL; #endif if (m == 0) { - if (!template) + if (!mtemplate) return EINVAL; /* get family information from template */ - switch (mtod(template, struct ip *)->ip_v) { + switch (mtod(mtemplate, struct ip *)->ip_v) { case 4: family = AF_INET; hlen = sizeof(struct ip); @@ -710,8 +710,8 @@ tcp_respond(struct tcpcb *tp, struct mbu tlen = 0; m->m_data += max_linkhdr; - bcopy(mtod(template, void *), mtod(m, void *), - template->m_len); + bcopy(mtod(mtemplate, void *), mtod(m, void *), + mtemplate->m_len); switch (family) { case AF_INET: ip = mtod(m, struct ip *);
CVS commit: src/sys/netinet6
Module Name:src Committed By: matt Date: Fri Sep 5 06:06:31 UTC 2014 Modified Files: src/sys/netinet6: in6_var.h Log Message: Don't nest structure definitions. To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/sys/netinet6/in6_var.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/netinet6/in6_var.h diff -u src/sys/netinet6/in6_var.h:1.70 src/sys/netinet6/in6_var.h:1.71 --- src/sys/netinet6/in6_var.h:1.70 Tue Jul 1 05:49:19 2014 +++ src/sys/netinet6/in6_var.h Fri Sep 5 06:06:31 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: in6_var.h,v 1.70 2014/07/01 05:49:19 rtr Exp $ */ +/* $NetBSD: in6_var.h,v 1.71 2014/09/05 06:06:31 matt Exp $ */ /* $KAME: in6_var.h,v 1.81 2002/06/08 11:16:51 itojun Exp $ */ /* @@ -98,6 +98,7 @@ struct in6_ifextra { int ndefrouters; }; +LIST_HEAD(in6_multihead, in6_multi); struct in6_ifaddr { struct ifaddr ia_ifa; /* protocol-independent info */ #define ia_ifp ia_ifa.ifa_ifp @@ -108,7 +109,7 @@ struct in6_ifaddr { struct sockaddr_in6 ia_prefixmask; /* prefix mask */ u_int32_t ia_plen; /* prefix length */ struct in6_ifaddr *ia_next; /* next in6 list of IP6 addresses */ - LIST_HEAD(in6_multihead, in6_multi) ia6_multiaddrs; + struct in6_multihead ia6_multiaddrs; /* list of multicast addresses */ int ia6_flags;
CVS commit: src/sys/netinet6
Module Name:src Committed By: matt Date: Fri Sep 5 06:08:15 UTC 2014 Modified Files: src/sys/netinet6: in6.c in6_ifattach.c in6_src.c nd6.h nd6_rtr.c Log Message: Don't use C++ keyword as variable. Use different prefix for nd6_prefixctl members than for nd6_prefix members. To generate a diff of this commit: cvs rdiff -u -r1.174 -r1.175 src/sys/netinet6/in6.c cvs rdiff -u -r1.91 -r1.92 src/sys/netinet6/in6_ifattach.c cvs rdiff -u -r1.54 -r1.55 src/sys/netinet6/in6_src.c cvs rdiff -u -r1.59 -r1.60 src/sys/netinet6/nd6.h cvs rdiff -u -r1.93 -r1.94 src/sys/netinet6/nd6_rtr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/in6.c diff -u src/sys/netinet6/in6.c:1.174 src/sys/netinet6/in6.c:1.175 --- src/sys/netinet6/in6.c:1.174 Tue Jul 1 23:01:54 2014 +++ src/sys/netinet6/in6.c Fri Sep 5 06:08:15 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: in6.c,v 1.174 2014/07/01 23:01:54 justin Exp $ */ +/* $NetBSD: in6.c,v 1.175 2014/09/05 06:08:15 matt Exp $ */ /* $KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.174 2014/07/01 23:01:54 justin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.175 2014/09/05 06:08:15 matt Exp $"); #include "opt_inet.h" #include "opt_compat_netbsd.h" @@ -643,7 +643,7 @@ in6_control1(struct socket *so, u_long c case SIOCAIFADDR_IN6: { int i; - struct nd_prefixctl pr0; + struct nd_prefixctl prc0; struct nd_prefix *pr; /* reject read-only flags */ @@ -679,17 +679,17 @@ in6_control1(struct socket *so, u_long c * convert mask to prefix length (prefixmask has already * been validated in in6_update_ifa(). */ - memset(&pr0, 0, sizeof(pr0)); - pr0.ndpr_ifp = ifp; - pr0.ndpr_plen = in6_mask2len(&ifra->ifra_prefixmask.sin6_addr, + memset(&prc0, 0, sizeof(prc0)); + prc0.ndprc_ifp = ifp; + prc0.ndprc_plen = in6_mask2len(&ifra->ifra_prefixmask.sin6_addr, NULL); - if (pr0.ndpr_plen == 128) { + if (prc0.ndprc_plen == 128) { break; /* we don't need to install a host route. */ } - pr0.ndpr_prefix = ifra->ifra_addr; + prc0.ndprc_prefix = ifra->ifra_addr; /* apply the mask for safety. */ for (i = 0; i < 4; i++) { - pr0.ndpr_prefix.sin6_addr.s6_addr32[i] &= + prc0.ndprc_prefix.sin6_addr.s6_addr32[i] &= ifra->ifra_prefixmask.sin6_addr.s6_addr32[i]; } /* @@ -699,19 +699,19 @@ in6_control1(struct socket *so, u_long c * later advertised RAs (when accept_rtadv is non 0), which is * an intended behavior. */ - pr0.ndpr_raf_onlink = 1; /* should be configurable? */ - pr0.ndpr_raf_auto = + prc0.ndprc_raf_onlink = 1; /* should be configurable? */ + prc0.ndprc_raf_auto = ((ifra->ifra_flags & IN6_IFF_AUTOCONF) != 0); - pr0.ndpr_vltime = ifra->ifra_lifetime.ia6t_vltime; - pr0.ndpr_pltime = ifra->ifra_lifetime.ia6t_pltime; + prc0.ndprc_vltime = ifra->ifra_lifetime.ia6t_vltime; + prc0.ndprc_pltime = ifra->ifra_lifetime.ia6t_pltime; /* add the prefix if not yet. */ - if ((pr = nd6_prefix_lookup(&pr0)) == NULL) { + if ((pr = nd6_prefix_lookup(&prc0)) == NULL) { /* * nd6_prelist_add will install the corresponding * interface route. */ - if ((error = nd6_prelist_add(&pr0, NULL, &pr)) != 0) + if ((error = nd6_prelist_add(&prc0, NULL, &pr)) != 0) return error; if (pr == NULL) { log(LOG_ERR, "nd6_prelist_add succeeded but " Index: src/sys/netinet6/in6_ifattach.c diff -u src/sys/netinet6/in6_ifattach.c:1.91 src/sys/netinet6/in6_ifattach.c:1.92 --- src/sys/netinet6/in6_ifattach.c:1.91 Thu Jun 5 16:06:49 2014 +++ src/sys/netinet6/in6_ifattach.c Fri Sep 5 06:08:15 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: in6_ifattach.c,v 1.91 2014/06/05 16:06:49 roy Exp $ */ +/* $NetBSD: in6_ifattach.c,v 1.92 2014/09/05 06:08:15 matt Exp $ */ /* $KAME: in6_ifattach.c,v 1.124 2001/07/18 08:32:51 jinmei Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in6_ifattach.c,v 1.91 2014/06/05 16:06:49 roy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in6_ifattach.c,v 1.92 2014/09/05 06:08:15 matt Exp $"); #include #include @@ -529,7 +529,7 @@ in6_ifattach_linklocal(struct ifnet *ifp { struct in6_ifaddr *ia __diagused; struct in6_aliasreq ifra; - struct nd_prefixctl pr0; + struct nd_prefixctl prc0; int i, error; /* @@ -597,24 +597,24 @@ in6_ifattach_linklocal(struct ifnet *ifp * and add it to the prefix list as a never-expire prefix. * XXX: this change might affect some existing code base... */ - memset(&pr0, 0, sizeof(pr0)); - pr0.ndpr_ifp = ifp; + memset(&prc0, 0, sizeof(prc0)); + prc0.ndprc_ifp = ifp; /* this should be 64 at this moment. */ - pr0.ndpr_plen = in6_mask2len(&ifra.ifra_prefixmask.sin6_addr, NULL); - pr0.ndpr_prefix = ifra.ifra_addr; + prc0.ndprc_plen = in6_mask2len(&ifra.ifra_prefixmask.sin6_addr, NULL); + prc0.ndprc_prefix = ifra.ifra_addr; /*
CVS commit: src/sys/ufs/ffs
Module Name:src Committed By: matt Date: Fri Sep 5 06:10:08 UTC 2014 Modified Files: src/sys/ufs/ffs: ffs_snapshot.c Log Message: Don't nest structure definitions. To generate a diff of this commit: cvs rdiff -u -r1.136 -r1.137 src/sys/ufs/ffs/ffs_snapshot.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/ffs/ffs_snapshot.c diff -u src/sys/ufs/ffs/ffs_snapshot.c:1.136 src/sys/ufs/ffs/ffs_snapshot.c:1.137 --- src/sys/ufs/ffs/ffs_snapshot.c:1.136 Thu Jul 10 06:02:40 2014 +++ src/sys/ufs/ffs/ffs_snapshot.c Fri Sep 5 06:10:07 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ffs_snapshot.c,v 1.136 2014/07/10 06:02:40 dholland Exp $ */ +/* $NetBSD: ffs_snapshot.c,v 1.137 2014/09/05 06:10:07 matt Exp $ */ /* * Copyright 2000 Marshall Kirk McKusick. All Rights Reserved. @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ffs_snapshot.c,v 1.136 2014/07/10 06:02:40 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ffs_snapshot.c,v 1.137 2014/09/05 06:10:07 matt Exp $"); #if defined(_KERNEL_OPT) #include "opt_ffs.h" @@ -77,11 +77,13 @@ __KERNEL_RCSID(0, "$NetBSD: ffs_snapshot #include +TAILQ_HEAD(inodelst, inode); /* List of active snapshots */ + struct snap_info { kmutex_t si_lock; /* Lock this snapinfo */ kmutex_t si_snaplock; /* Snapshot vnode common lock */ lwp_t *si_owner; /* Sanplock owner */ - TAILQ_HEAD(inodelst, inode) si_snapshots; /* List of active snapshots */ + struct inodelst si_snapshots; /* List of active snapshots */ daddr_t *si_snapblklist; /* Snapshot block hints list */ uint32_t si_gen; /* Incremented on change */ };
CVS commit: src/sys/kern
Module Name:src Committed By: matt Date: Fri Sep 5 06:50:58 UTC 2014 Modified Files: src/sys/kern: kern_module.c Log Message: Missed a C++ keyword (DEBUG case) To generate a diff of this commit: cvs rdiff -u -r1.100 -r1.101 src/sys/kern/kern_module.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/kern/kern_module.c diff -u src/sys/kern/kern_module.c:1.100 src/sys/kern/kern_module.c:1.101 --- src/sys/kern/kern_module.c:1.100 Fri Sep 5 05:57:21 2014 +++ src/sys/kern/kern_module.c Fri Sep 5 06:50:58 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_module.c,v 1.100 2014/09/05 05:57:21 matt Exp $ */ +/* $NetBSD: kern_module.c,v 1.101 2014/09/05 06:50:58 matt Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.100 2014/09/05 05:57:21 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.101 2014/09/05 06:50:58 matt Exp $"); #define _MODULE_INTERNAL @@ -967,7 +967,7 @@ module_do_load(const char *name, bool is * available for each architecture, so we don't * print an error if they are missing. */ - if (class != MODULE_CLASS_EXEC || error != ENOENT) + if (modclass != MODULE_CLASS_EXEC || error != ENOENT) module_error("vfs load failed for `%s', " "error %d", name, error); #endif
CVS commit: src/sys/conf
Module Name:src Committed By: matt Date: Fri Sep 5 06:52:12 UTC 2014 Modified Files: src/sys/conf: Makefile.kern.inc Log Message: Add a commented out CWARNFLAGS to enable -Wc++-compat but don't treat them as errors. To generate a diff of this commit: cvs rdiff -u -r1.172 -r1.173 src/sys/conf/Makefile.kern.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/conf/Makefile.kern.inc diff -u src/sys/conf/Makefile.kern.inc:1.172 src/sys/conf/Makefile.kern.inc:1.173 --- src/sys/conf/Makefile.kern.inc:1.172 Thu Aug 21 07:57:25 2014 +++ src/sys/conf/Makefile.kern.inc Fri Sep 5 06:52:12 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.172 2014/08/21 07:57:25 skrll Exp $ +# $NetBSD: Makefile.kern.inc,v 1.173 2014/09/05 06:52:12 matt Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -75,6 +75,7 @@ CWARNFLAGS+= -Wold-style-definition CWARNFLAGS+= -Wswitch -Wshadow CWARNFLAGS+= -Wcast-qual -Wwrite-strings CWARNFLAGS+= -Wno-unreachable-code +#CWARNFLAGS+= -Wc++-compat -Wno-error=c++-compat CWARNFLAGS+= -Wno-pointer-sign -Wno-attributes . if ${MACHINE} == "i386" || ${MACHINE_ARCH} == "x86_64" || \ ${MACHINE_ARCH} == "sparc64" || ${MACHINE} == "prep"
CVS commit: src/usr.bin/make
Module Name:src Committed By: wiz Date: Fri Sep 5 06:57:20 UTC 2014 Modified Files: src/usr.bin/make: make.1 Log Message: Reduce pirate slang. To generate a diff of this commit: cvs rdiff -u -r1.235 -r1.236 src/usr.bin/make/make.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/make/make.1 diff -u src/usr.bin/make/make.1:1.235 src/usr.bin/make/make.1:1.236 --- src/usr.bin/make/make.1:1.235 Thu Sep 4 19:07:47 2014 +++ src/usr.bin/make/make.1 Fri Sep 5 06:57:20 2014 @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.235 2014/09/04 19:07:47 christos Exp $ +.\" $NetBSD: make.1,v 1.236 2014/09/05 06:57:20 wiz Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -2001,7 +2001,7 @@ Target is not eligible to be added to th rules, or as a child dependency for a target. .It Ic .JOIN Target is a fake node which is considered out of date only if any of its -children ar out of date. +children are out of date. .It Ic .MADE Mark all sources of this target as being up-to-date. .It Ic .MAKE