svn commit: r295653 - in head: share/misc usr.bin/calendar/calendars
Author: olivier (ports committer) Date: Tue Feb 16 10:33:45 2016 New Revision: 295653 URL: https://svnweb.freebsd.org/changeset/base/295653 Log: Add myself as ports committer (including calendar) Approved by: jadawin Differential Revision:https://reviews.freebsd.org/D5295 Modified: head/share/misc/committers-ports.dot head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/share/misc/committers-ports.dot == --- head/share/misc/committers-ports.dotTue Feb 16 03:50:56 2016 (r295652) +++ head/share/misc/committers-ports.dotTue Feb 16 10:33:45 2016 (r295653) @@ -175,6 +175,7 @@ nork [label="Norikatsu Shigemura\nnork@F novel [label="Roman Bogorodskiy\nno...@freebsd.org\n2005/03/07"] nox [label="Juergen Lock\n...@freebsd.org\n2006/12/22"] obrien [label="David E. O'Brien\nobr...@freebsd.org\n1996/10/29"] +olivier [label="Olivier Cochard-Labbe\noliv...@freebsd.org\n2016/02/02"] olivierd [label="Olivier Duchateau\nolivi...@freebsd.org\n2012/05/29"] osa [label="Sergey A. Osokin\n...@freebsd.org\n2003/06/04"] pat [label="Patrick Li\n...@freebsd.org\n2001/11/14"] @@ -400,6 +401,7 @@ itetcu -> sylvio jadawin -> bapt jadawin -> flo +jadawin -> olivier jadawin -> riggs jadawin -> sbz jadawin -> wen Modified: head/usr.bin/calendar/calendars/calendar.freebsd == --- head/usr.bin/calendar/calendars/calendar.freebsdTue Feb 16 03:50:56 2016(r295652) +++ head/usr.bin/calendar/calendars/calendar.freebsdTue Feb 16 10:33:45 2016(r295653) @@ -224,6 +224,7 @@ 07/02 Vasil Venelinov Dimov born in Shumen, Bulgaria, 1982 07/04 Motoyuki Konno born in Musashino, Tokyo, Japan, 1969 07/04 Florent Thoumie born in Montmorency, Val d'Oise, France, 1982 +07/05 Olivier Cochard-Labbe born in Brest, France, 1977 07/05 Sergey Kandaurov born in Gubkin, Russian Federation, 1985 07/07 Andrew Thompson born in Lower Hutt, Wellington, New Zealand, 1979 07/07 Maxime Henrion born in Metz, France, 1981 ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r295647 - head/usr.sbin/amd/include
On Tue, 16 Feb 2016 02:14:19 + (UTC) Bryan Drewery wrote: > Author: bdrewery > Date: Tue Feb 16 02:14:18 2016 > New Revision: 295647 > URL: https://svnweb.freebsd.org/changeset/base/295647 > > Log: > Add missing dependency on sys/conf/newvers.sh. > > Sponsored by: EMC / Isilon Storage Division > > Modified: > head/usr.sbin/amd/include/Makefile > > Modified: head/usr.sbin/amd/include/Makefile > == > --- head/usr.sbin/amd/include/MakefileTue Feb 16 02:14:15 > 2016 (r295646) +++ head/usr.sbin/amd/include/Makefile > Tue Feb 16 02:14:18 2016 (r295647) @@ -17,9 +17,9 @@ > CLEANFILES= ${SRCS} > all depend: ${SRCS} > > -config_local.h: newvers.sh > +config_local.h: newvers.sh ${.CURDIR}/../../../sys/conf/newvers.sh > @rm -f ${.TARGET} > - sh ${.ALLSRC} ${.CURDIR}/../../../sys/conf/newvers.sh > > ${.TARGET} > + sh ${.ALLSRC} > ${.TARGET} > > localconfig.h: > @rm -f ${.TARGET} > ___ > svn-src-...@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org" ... --- .depend --- rm -f .depend CC='/usr/local/libexec/ccache/world/cc -target x86_64-unknown-freebsd11.0 --sysroot=/media/da0s1/obj/usr/src/tmp -B/media/da0s1/obj/usr/src/tmp/usr/bin' mkdep -f .depend -a -I/usr/src/usr.bin/clang/llc/../../../contrib/llvm/include -I/usr/src/usr.bin/clang/llc/../../../contrib/llvm/tools/clang/include -I/usr/src/usr.bin/clang/llc/../../../contrib/llvm/tools/llc -I. -I/usr/src/usr.bin/clang/llc/../../../contrib/llvm/../../lib/clang/include -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DCLANG_ENABLE_ARCMT -DCLANG_ENABLE_STATIC_ANALYZER -DLLVM_DEFAULT_TARGET_TRIPLE=\"x86_64-unknown-freebsd11.0\" -DLLVM_HOST_TRIPLE=\"x86_64-unknown-freebsd11.0\" -DDEFAULT_SYSROOT=\"\" -std=c++11 -stdlib=libc++ /usr/src/usr.bin/clang/llc/../../../contrib/llvm/tools/llc/llc.cpp --- depend_subdir_usr.sbin --- --- xdr_func_%undef.c --- unifdef -DHAVE_XDR_ATTRSTAT -DHAVE_XDR_CREATEARGS -DHAVE_XDR_DIRLIST -DHAVE_XDR_DIROPARGS -DHAVE_XDR_DIROPOKRES -DHAVE_XDR_DIROPRES -DHAVE_XDR_DIRPATH -DHAVE_XDR_ENTRY -DHAVE_XDR_EXPORTNODE -DHAVE_XDR_EXPORTS -DHAVE_XDR_FATTR -DHAVE_XDR_FHANDLE -DHAVE_XDR_FHSTATUS -DHAVE_XDR_FILENAME -DHAVE_XDR_FTYPE -DHAVE_XDR_GROUPNODE -DHAVE_XDR_GROUPS -DHAVE_XDR_LINKARGS -DHAVE_XDR_MOUNTBODY -DHAVE_XDR_MOUNTLIST -DHAVE_XDR_NAME -DHAVE_XDR_NFS_FH -DHAVE_XDR_NFSCOOKIE -DHAVE_XDR_NFSPATH -DHAVE_XDR_NFSSTAT -DHAVE_XDR_NFSTIME -DHAVE_XDR_POINTER -DHAVE_XDR_READARGS -DHAVE_XDR_READDIRARGS -DHAVE_XDR_READDIRRES -DHAVE_XDR_READLINKRES -DHAVE_XDR_READOKRES -DHAVE_XDR_READRES -DHAVE_XDR_RENAMEARGS -DHAVE_XDR_SATTR -DHAVE_XDR_SATTRARGS -DHAVE_XDR_STATFSOKRES -DHAVE_XDR_STATFSRES -DHAVE_XDR_SYMLINKARGS -DHAVE_XDR_WRITEARGS < /usr/src/usr.sbin/amd/libamu/../../../contrib/amd/libamu/xdr_func.c > xdr_func_%undef.c --- .depend --- rm -f .depend CC='/usr/local/libexec/ccache/world/cc -target x86_64-unknown-freebsd11.0 --sysroot=/media/da0s1/obj/usr/src/tmp -B/media/da0s1/obj/usr/src/tmp/usr/bin' mkdep -f .depend -a -I/usr/src/usr.sbin/amd/libamu/../../../contrib/amd/libamu -I/media/da0s1/obj/usr/src/tmp/usr/include/rpcsvc -I. -I/usr/src/usr.sbin/amd/libamu -I/usr/src/usr.sbin/amd/libamu/../include -I/media/da0s1/obj/usr/src/usr.sbin/amd/libamu/../include -I/usr/src/usr.sbin/amd/libamu/../../../contrib/amd/include -I/usr/src/usr.sbin/amd/libamu/../../../contrib/amd -DHAVE_CONFIG_H -DHOST_CPU=\"amd64\" -DHOST_ARCH=\"amd64\" -std=gnu99 /usr/src/usr.sbin/amd/libamu/../../../contrib/amd/libamu/hasmntopt.c /usr/src/usr.sbin/amd/libamu/../../../contrib/amd/libamu/misc_rpc.c /usr/src/usr.sbin/amd/libamu/../../../contrib/amd/libamu/mount_fs.c /usr/src/usr.sbin/amd/libamu/../../../contrib/amd/libamu/mtab.c /usr/src/usr.sbin/amd/libamu/../../../contrib/amd/libamu/nfs_prot_xdr.c /usr/src/usr.sbin/amd/libamu/../../../contrib/amd/li bamu/strutil.c /usr/src/usr.sbin/amd/libamu/../../../contrib/amd/libamu/wire.c /usr/src/usr.sbin/amd/libamu/../../../contrib/amd/libamu/xutil.c /usr/src/usr.sbin/amd/libamu/../../../contrib/amd/conf/transp/transp_sockets.c /usr/src/usr.sbin/amd/libamu/../../../contrib/amd/conf/mtab/mtab_bsd.c /usr/src/usr.sbin/amd/libamu/../../../contrib/amd/conf/umount/umount_bsd44.c nfs_prot_x.c xdr_func_%undef.c In file included from /usr/src/usr.sbin/amd/libamu/../../../contrib/amd/libamu/hasmntopt.c:45: /usr/src/usr.sbin/amd/libamu/../include/config.h:12:10: fatal error: 'config_local.h' file not found #include "config_local.h" ^ 1 error generated. In file included from /usr/src/usr.sbin/amd/libamu/../../../contrib/amd/libamu/misc_rpc.c:49: /usr/src/usr.sbin/amd/libamu/../include/config.h:12:10: fatal error: 'config_local.h' file not found #include "config_local.h"
svn commit: r295654 - head/sys/arm/allwinner
Author: andrew Date: Tue Feb 16 11:03:21 2016 New Revision: 295654 URL: https://svnweb.freebsd.org/changeset/base/295654 Log: Only read the power state register when we will be using its value. While here remove magic shifts, and cleanup pwr_name. Sponsored by: ABT Systems Ltd Modified: head/sys/arm/allwinner/axp209.c Modified: head/sys/arm/allwinner/axp209.c == --- head/sys/arm/allwinner/axp209.c Tue Feb 16 10:33:45 2016 (r295653) +++ head/sys/arm/allwinner/axp209.c Tue Feb 16 11:03:21 2016 (r295654) @@ -54,7 +54,9 @@ __FBSDID("$FreeBSD$"); /* Power State Register */ #defineAXP209_PSR 0x00 #defineAXP209_PSR_ACIN 0x80 +#defineAXP209_PSR_ACIN_SHIFT 7 #defineAXP209_PSR_VBUS 0x20 +#defineAXP209_PSR_VBUS_SHIFT 5 /* Shutdown and battery control */ #defineAXP209_SHUTBAT 0x32 @@ -136,26 +138,27 @@ static int axp209_attach(device_t dev) { struct axp209_softc *sc; + const char *pwr_name[] = {"Battery", "AC", "USB", "AC and USB"}; uint8_t data; uint8_t pwr_src; - char pwr_name[4][11] = {"Battery", "AC", "USB", "AC and USB"}; sc = device_get_softc(dev); sc->addr = iicbus_get_addr(dev); - /* -* Read the Power State register -* bit 7 is AC presence, bit 5 is VBUS presence. -* If none are set then we are running from battery (obviously). -*/ - axp209_read(dev, AXP209_PSR, &data, 1); - pwr_src = ((data & AXP209_PSR_ACIN) >> 7) | - ((data & AXP209_PSR_VBUS) >> 4); + if (bootverbose) { + /* +* Read the Power State register. +* Shift the AC presence into bit 0. +* Shift the Battery presence into bit 1. +*/ + axp209_read(dev, AXP209_PSR, &data, 1); + pwr_src = ((data & AXP209_PSR_ACIN) >> AXP209_PSR_ACIN_SHIFT) | + ((data & AXP209_PSR_VBUS) >> (AXP209_PSR_VBUS_SHIFT - 1)); - if (bootverbose) device_printf(dev, "AXP209 Powered by %s\n", pwr_name[pwr_src]); + } EVENTHANDLER_REGISTER(shutdown_final, axp209_shutdown, dev, SHUTDOWN_PRI_LAST); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r295655 - head/sys/boot/fdt/dts/arm
Author: skra Date: Tue Feb 16 11:38:38 2016 New Revision: 295655 URL: https://svnweb.freebsd.org/changeset/base/295655 Log: Temporary overwrite bad definition of elm interrupt property in Linux dts files. It may be removed once it will be fixed upstream. This is done just to supresses a warning during dtb evaluation as there is no elm driver in tree at present. Modified: head/sys/boot/fdt/dts/arm/pandaboard-common.dtsi Modified: head/sys/boot/fdt/dts/arm/pandaboard-common.dtsi == --- head/sys/boot/fdt/dts/arm/pandaboard-common.dtsiTue Feb 16 11:03:21 2016(r295654) +++ head/sys/boot/fdt/dts/arm/pandaboard-common.dtsiTue Feb 16 11:38:38 2016(r295655) @@ -41,6 +41,10 @@ reg = <0x48240200 0x20>; interrupts = ; }; + + elm: elm@48078000 { + interrupts = ; + }; }; chosen { stdin = "serial2"; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r295656 - in head/sys: arm64/cavium conf
Author: zbb Date: Tue Feb 16 11:43:57 2016 New Revision: 295656 URL: https://svnweb.freebsd.org/changeset/base/295656 Log: Support PEM that is not a PCI endpoint on ThunderX Some chip revisions don't have their external PCIe buses behind the internal bridge. Add support for FDT-configurable PEMs but keep ability for PCIe enumeration. Reviewed by: andrew, wma Obtained from: Semihalf Sponsored by: Cavium Differential Revision: https://reviews.freebsd.org/D5285 Added: head/sys/arm64/cavium/thunder_pcie_pem.h (contents, props changed) head/sys/arm64/cavium/thunder_pcie_pem_fdt.c (contents, props changed) Modified: head/sys/arm64/cavium/thunder_pcie_common.h head/sys/arm64/cavium/thunder_pcie_pem.c head/sys/conf/files.arm64 Modified: head/sys/arm64/cavium/thunder_pcie_common.h == --- head/sys/arm64/cavium/thunder_pcie_common.h Tue Feb 16 11:38:38 2016 (r295655) +++ head/sys/arm64/cavium/thunder_pcie_common.h Tue Feb 16 11:43:57 2016 (r295656) @@ -33,6 +33,7 @@ #defineRANGES_TUPLES_INVALID (RANGES_TUPLES_MAX + 1) DECLARE_CLASS(thunder_pcie_driver); +DECLARE_CLASS(thunder_pem_driver); MALLOC_DECLARE(M_THUNDER_PCIE); Modified: head/sys/arm64/cavium/thunder_pcie_pem.c == --- head/sys/arm64/cavium/thunder_pcie_pem.cTue Feb 16 11:38:38 2016 (r295655) +++ head/sys/arm64/cavium/thunder_pcie_pem.cTue Feb 16 11:43:57 2016 (r295656) @@ -49,12 +49,12 @@ __FBSDID("$FreeBSD$"); #include #include -#include "thunder_pcie_common.h" +#include +#include #include "pcib_if.h" #defineTHUNDER_PEM_DEVICE_ID 0xa020 #defineTHUNDER_PEM_VENDOR_ID 0x177d -#defineTHUNDER_PEM_DESC"ThunderX PEM" /* ThunderX specific defines */ #defineTHUNDER_PEMn_REG_BASE(unit) (0x87e0c000UL | ((unit) << 24)) @@ -109,21 +109,7 @@ __FBSDID("$FreeBSD$"); #definePCI_MEMORY_BASE PCI_IO_SIZE #definePCI_MEMORY_SIZE 0xFFF0UL -struct thunder_pem_softc { - device_tdev; - struct resource *reg; - bus_space_tag_t reg_bst; - bus_space_handle_t reg_bsh; - struct pcie_range ranges[RANGES_TUPLES_MAX]; - struct rman mem_rman; - struct rman io_rman; - bus_space_handle_t pem_sli_base; - uint32_tnode; - uint32_tid; - uint32_tsli; - uint32_tsli_group; - uint64_tsli_window_base; -}; +#defineRID_PEM_SPACE 1 static struct resource * thunder_pem_alloc_resource(device_t, device_t, int, int *, rman_res_t, rman_res_t, rman_res_t, u_int); @@ -174,11 +160,13 @@ static device_method_t thunder_pem_metho DEVMETHOD_END }; -static driver_t thunder_pem_driver = { - "pcib", - thunder_pem_methods, - sizeof(struct thunder_pem_softc), -}; +DEFINE_CLASS_0(pcib, thunder_pem_driver, thunder_pem_methods, +sizeof(struct thunder_pem_softc)); + +static devclass_t thunder_pem_devclass; + +DRIVER_MODULE(thunder_pem, pci, thunder_pem_driver, thunder_pem_devclass, 0, 0); +MODULE_DEPEND(thunder_pem, pci, 1, 1, 1); static int thunder_pem_maxslots(device_t dev) @@ -526,6 +514,8 @@ thunder_pem_probe(device_t dev) static int thunder_pem_attach(device_t dev) { + devclass_t pci_class; + device_t parent; struct thunder_pem_softc *sc; int error; int rid; @@ -533,8 +523,14 @@ thunder_pem_attach(device_t dev) sc = device_get_softc(dev); sc->dev = dev; - /* Allocate memory for BAR(0) */ - rid = PCIR_BAR(0); + /* Allocate memory for resource */ + pci_class = devclass_find("pci"); + parent = device_get_parent(dev); + if (device_get_devclass(parent) == pci_class) + rid = PCIR_BAR(0); + else + rid = RID_PEM_SPACE; + sc->reg = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (sc->reg == NULL) { @@ -583,6 +579,13 @@ thunder_pem_attach(device_t dev) goto fail_mem; } + /* +* We ignore the values that may have been provided in FDT +* and configure ranges according to the below formula +* for all types of devices. This is because some DTBs provided +* by EFI do not have proper ranges property or don't have them +* at all. +*/ /* Fill memory window */ sc->ranges[0].pci_base = PCI_MEMORY_BASE; sc->ranges[0].size = PCI_MEMORY_SIZE; @@ -639,8 +642,3 @@ thunder_pem_detach(device_t dev) return (0); } - -static devclass_t thunder_pem_devclass; - -DRIVER_MODULE(thunder_pem, pci, thunder_pem_
svn commit: r295657 - in head/sys: arm/allwinner arm/conf boot/fdt/dts/arm
Author: andrew Date: Tue Feb 16 11:45:46 2016 New Revision: 295657 URL: https://svnweb.freebsd.org/changeset/base/295657 Log: Add an analog audio driver for the audio codec found on the Allwinner A10/A20 SoC. Based loosely on the submitters NetBSD driver, tested on Cubieboard 2. Playback and capture are supported. Submitted by: Jared McNeill Differential Revision:https://reviews.freebsd.org/D5202 Added: head/sys/arm/allwinner/a10_codec.c (contents, props changed) Modified: head/sys/arm/allwinner/files.allwinner head/sys/arm/conf/A20 head/sys/boot/fdt/dts/arm/sun7i-a20.dtsi Added: head/sys/arm/allwinner/a10_codec.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/allwinner/a10_codec.c Tue Feb 16 11:45:46 2016 (r295657) @@ -0,0 +1,850 @@ +/*- + * Copyright (c) 2014-2016 Jared D. McNeill + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * Allwinner A10/A20 Audio Codec + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include + +#include + +#include "sunxi_dma_if.h" +#include "mixer_if.h" +#include "gpio_if.h" + +#defineTX_TRIG_LEVEL 0xf +#defineRX_TRIG_LEVEL 0x7 +#defineDRQ_CLR_CNT 0x3 + +#defineAC_DAC_DPC 0x00 +#define DAC_DPC_EN_DA 0x8000 +#defineAC_DAC_FIFOC0x04 +#define DAC_FIFOC_FS_SHIFT 29 +#define DAC_FIFOC_FS_MASK (7U << DAC_FIFOC_FS_SHIFT) +#define DAC_FS_48KHZ 0 +#define DAC_FS_32KHZ 1 +#define DAC_FS_24KHZ 2 +#define DAC_FS_16KHZ 3 +#define DAC_FS_12KHZ 4 +#define DAC_FS_8KHZ 5 +#define DAC_FS_192KHZ 6 +#define DAC_FS_96KHZ 7 +#define DAC_FIFOC_FIFO_MODE_SHIFT 24 +#define DAC_FIFOC_FIFO_MODE_MASK (3U << DAC_FIFOC_FIFO_MODE_SHIFT) +#define FIFO_MODE_24_31_8 0 +#define FIFO_MODE_16_31_160 +#define FIFO_MODE_16_15_0 1 +#define DAC_FIFOC_DRQ_CLR_CNT_SHIFT21 +#define DAC_FIFOC_DRQ_CLR_CNT_MASK (3U << DAC_FIFOC_DRQ_CLR_CNT_SHIFT) +#define DAC_FIFOC_TX_TRIG_LEVEL_SHIFT 8 +#define DAC_FIFOC_TX_TRIG_LEVEL_MASK (0x7f << DAC_FIFOC_TX_TRIG_LEVEL_SHIFT) +#define DAC_FIFOC_MONO_EN (1U << 6) +#define DAC_FIFOC_TX_BITS (1U << 5) +#define DAC_FIFOC_DRQ_EN (1U << 4) +#define DAC_FIFOC_FIFO_FLUSH (1U << 0) +#defineAC_DAC_FIFOS0x08 +#defineAC_DAC_TXDATA 0x0c +#defineAC_DAC_ACTL 0x10 +#define DAC_ACTL_DACAREN (1U << 31) +#define DAC_ACTL_DACALEN (1U << 30) +#define DAC_ACTL_MIXEN (1U << 29) +#define DAC_ACTL_DACPAS(1U << 8) +#define DAC_ACTL_PAMUTE(1U << 6) +#define DAC_ACTL_PAVOL_SHIFT 0 +#define DAC_ACTL_PAVOL_MASK(0x3f << DAC_ACTL_PAVOL_SHIFT) +#defineAC_ADC_FIFOC0x1c +#define ADC_FIFOC_FS_SHIFT 29 +#define ADC_FIFOC_FS_MASK (7U << ADC_FIFOC_FS_SHIFT) +#define ADC_FS_48KHZ 0 +#define ADC_FIFOC_EN_AD(1U << 28) +#define ADC_FIFOC_RX_FIFO_MODE
svn commit: r295658 - head/sys/arm/allwinner
Author: andrew Date: Tue Feb 16 11:51:54 2016 New Revision: 295658 URL: https://svnweb.freebsd.org/changeset/base/295658 Log: Add a sysctl to read the internal temperature of the AXP209 Power Management IC. Submitted by: Jared McNeill Differential Revision:https://reviews.freebsd.org/D5298 Modified: head/sys/arm/allwinner/axp209.c Modified: head/sys/arm/allwinner/axp209.c == --- head/sys/arm/allwinner/axp209.c Tue Feb 16 11:45:46 2016 (r295657) +++ head/sys/arm/allwinner/axp209.c Tue Feb 16 11:51:54 2016 (r295658) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -62,11 +63,23 @@ __FBSDID("$FreeBSD$"); #defineAXP209_SHUTBAT 0x32 #defineAXP209_SHUTBAT_SHUTDOWN 0x80 +/* Temperature monitor */ +#defineAXP209_TEMPMON 0x5e +#defineAXP209_TEMPMON_H(a) ((a) << 4) +#defineAXP209_TEMPMON_L(a) ((a) & 0xf) +#defineAXP209_TEMPMON_MIN 1447/* -144.7C */ + +#defineAXP209_0C_TO_K 2732 + struct axp209_softc { uint32_taddr; struct intr_config_hook enum_hook; }; +enum axp209_sensor { + AXP209_TEMP +}; + static int axp209_read(device_t dev, uint8_t reg, uint8_t *data, uint8_t size) { @@ -104,6 +117,28 @@ axp209_write(device_t dev, uint8_t reg, return (iicbus_transfer(dev, &msg, 1)); } +static int +axp209_sysctl(SYSCTL_HANDLER_ARGS) +{ + device_t dev = arg1; + enum axp209_sensor sensor = arg2; + uint8_t data[2]; + int val, error; + + if (sensor != AXP209_TEMP) + return (ENOENT); + + error = axp209_read(dev, AXP209_TEMPMON, data, 2); + if (error != 0) + return (error); + + /* Temperature is between -144.7C and 264.8C, step +0.1C */ + val = (AXP209_TEMPMON_H(data[0]) | AXP209_TEMPMON_L(data[1])) - + AXP209_TEMPMON_MIN + AXP209_0C_TO_K; + + return sysctl_handle_opaque(oidp, &val, sizeof(val), req); +} + static void axp209_shutdown(void *devp, int howto) { @@ -163,6 +198,12 @@ axp209_attach(device_t dev) EVENTHANDLER_REGISTER(shutdown_final, axp209_shutdown, dev, SHUTDOWN_PRI_LAST); + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "temp", + CTLTYPE_INT | CTLFLAG_RD, + dev, AXP209_TEMP, axp209_sysctl, "IK", "Internal temperature"); + return (0); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r295659 - head/sys/arm/broadcom/bcm2835
Author: skra Date: Tue Feb 16 12:19:06 2016 New Revision: 295659 URL: https://svnweb.freebsd.org/changeset/base/295659 Log: Do not use DMA channels used by GPU. (1) The channel mask is get from "brcm,dma-channel-mask" property of dma node, and if not provided, from "broadcom,channels" property. (2) Consequently, sdhci driver does not allocate any specific channel. (3) Use CS_RESET bit for initial channel reset. Differential Revision:https://reviews.freebsd.org/D4303 Modified: head/sys/arm/broadcom/bcm2835/bcm2835_dma.c head/sys/arm/broadcom/bcm2835/bcm2835_dma.h head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_dma.c == --- head/sys/arm/broadcom/bcm2835/bcm2835_dma.c Tue Feb 16 11:51:54 2016 (r295658) +++ head/sys/arm/broadcom/bcm2835/bcm2835_dma.c Tue Feb 16 12:19:06 2016 (r295659) @@ -104,6 +104,15 @@ __FBSDID("$FreeBSD$"); /* relative offset from BCM_VC_DMA0_BASE (p.39) */ #defineBCM_DMA_CH(n) (0x100*(n)) +/* channels used by GPU */ +#defineBCM_DMA_CH_BULK 0 +#defineBCM_DMA_CH_FAST12 +#defineBCM_DMA_CH_FAST23 + +#defineBCM_DMA_CH_GPU_MASK ((1 << BCM_DMA_CH_BULK) | \ +(1 << BCM_DMA_CH_FAST1) | \ +(1 << BCM_DMA_CH_FAST2)) + /* DMA Control Block - 256bit aligned (p.40) */ struct bcm_dma_cb { uint32_t info; /* Transfer Information */ @@ -143,6 +152,7 @@ struct bcm_dma_softc { }; static struct bcm_dma_softc *bcm_dma_sc = NULL; +static uint32_t bcm_dma_channel_mask; static void bcm_dmamap_cb(void *arg, bus_dma_segment_t *segs, @@ -205,16 +215,32 @@ static int bcm_dma_init(device_t dev) { struct bcm_dma_softc *sc = device_get_softc(dev); - uint32_t mask; + uint32_t reg; struct bcm_dma_ch *ch; void *cb_virt; vm_paddr_t cb_phys; int err; int i; - /* disable and clear interrupt status */ - bus_write_4(sc->sc_mem, BCM_DMA_ENABLE, 0); - bus_write_4(sc->sc_mem, BCM_DMA_INT_STATUS, 0); + /* +* Only channels set in bcm_dma_channel_mask can be controlled by us. +* The others are out of our control as well as the corresponding bits +* in both BCM_DMA_ENABLE and BCM_DMA_INT_STATUS global registers. As +* these registers are RW ones, there is no safe way how to write only +* the bits which can be controlled by us. +* +* Fortunately, after reset, all channels are enabled in BCM_DMA_ENABLE +* register and all statuses are cleared in BCM_DMA_INT_STATUS one. +* Not touching these registers is a trade off between correct +* initialization which does not count on anything and not messing up +* something we have no control over. +*/ + reg = bus_read_4(sc->sc_mem, BCM_DMA_ENABLE); + if ((reg & bcm_dma_channel_mask) != bcm_dma_channel_mask) + device_printf(dev, "channels are not enabled\n"); + reg = bus_read_4(sc->sc_mem, BCM_DMA_INT_STATUS); + if ((reg & bcm_dma_channel_mask) != 0) + device_printf(dev, "statuses are not cleared\n"); /* Allocate DMA chunks control blocks */ /* p.40 of spec - control block should be 32-bit aligned */ @@ -227,7 +253,7 @@ bcm_dma_init(device_t dev) &sc->sc_dma_tag); if (err) { - device_printf(dev, "failed allocate DMA tag"); + device_printf(dev, "failed allocate DMA tag\n"); return (err); } @@ -235,6 +261,13 @@ bcm_dma_init(device_t dev) for (i = 0; i < BCM_DMA_CH_MAX; i++) { ch = &sc->sc_dma_ch[i]; + bzero(ch, sizeof(struct bcm_dma_ch)); + ch->ch = i; + ch->flags = BCM_DMA_CH_UNMAP; + + if ((bcm_dma_channel_mask & (1 << i)) == 0) + continue; + err = bus_dmamem_alloc(sc->sc_dma_tag, &cb_virt, BUS_DMA_WAITOK | BUS_DMA_COHERENT | BUS_DMA_ZERO, &ch->dma_map); @@ -263,33 +296,15 @@ bcm_dma_init(device_t dev) break; } - bzero(ch, sizeof(struct bcm_dma_ch)); - ch->ch = i; ch->cb = cb_virt; ch->vc_cb = cb_phys; - ch->intr_func = NULL; - ch->intr_arg = NULL; - ch->flags = BCM_DMA_CH_UNMAP; - + ch->flags = BCM_DMA_CH_FREE; ch->cb->info = INFO_WAIT_RESP; /* reset DMA engine */ - bcm_dma_reset(dev, i); + bus_write_4(sc->sc_mem, BCM_DMA_CS(i), CS_RESET); } - /* now use DMA2/DMA3 only */ - sc->sc_dma_ch[2].flags = BCM_DMA_CH_FREE; - sc->sc_d
svn commit: r295660 - head/sys/arm/ti
Author: skra Date: Tue Feb 16 13:40:23 2016 New Revision: 295660 URL: https://svnweb.freebsd.org/changeset/base/295660 Log: Use EARLY_DRIVER_MODULE() for ti_scm driver to be attached before am335x_prcm driver which uses it. Used BUS_PASS_BUS is a quick pick for now and may be revised when other drivers start using multipass feature. This is needed after an update of Linux dts files done in r295436. Modified: head/sys/arm/ti/ti_scm.c Modified: head/sys/arm/ti/ti_scm.c == --- head/sys/arm/ti/ti_scm.cTue Feb 16 12:19:06 2016(r295659) +++ head/sys/arm/ti/ti_scm.cTue Feb 16 13:40:23 2016(r295660) @@ -170,4 +170,5 @@ static driver_t ti_scm_driver = { static devclass_t ti_scm_devclass; -DRIVER_MODULE(ti_scm, simplebus, ti_scm_driver, ti_scm_devclass, 0, 0); +EARLY_DRIVER_MODULE(ti_scm, simplebus, ti_scm_driver, ti_scm_devclass, 0, 0, +BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r295661 - head/contrib/elftoolchain/elfcopy
Author: emaste Date: Tue Feb 16 14:03:25 2016 New Revision: 295661 URL: https://svnweb.freebsd.org/changeset/base/295661 Log: Allow elfcopy to convert between two non-ELF formats If the output object is not an ELF file, choose an arbitrary ELF format for the intermediate file. srec, ihex and binary formats are independent of class, endianness and machine type so these choices do not affect the output. ELF Tool Chain ticket #517 Reviewed by: kai Obtained from:ELF Tool Chain r3411 Modified: head/contrib/elftoolchain/elfcopy/main.c Modified: head/contrib/elftoolchain/elfcopy/main.c == --- head/contrib/elftoolchain/elfcopy/main.cTue Feb 16 13:40:23 2016 (r295660) +++ head/contrib/elftoolchain/elfcopy/main.cTue Feb 16 14:03:25 2016 (r295661) @@ -641,6 +641,18 @@ create_file(struct elfcopy *ecp, const c * ELF object before processing. */ if (ecp->itf != ETF_ELF) { + /* +* If the output object is not an ELF file, choose an arbitrary +* ELF format for the intermediate file. srec, ihex and binary +* formats are independent of class, endianness and machine +* type so these choices do not affect the output. +*/ + if (ecp->otf != ETF_ELF) { + if (ecp->oec == ELFCLASSNONE) + ecp->oec = ELFCLASS64; + if (ecp->oed == ELFDATANONE) + ecp->oed = ELFDATA2LSB; + } create_tempfile(&elftemp, &efd); if ((ecp->eout = elf_begin(efd, ELF_C_WRITE, NULL)) == NULL) errx(EXIT_FAILURE, "elf_begin() failed: %s", ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r295557 - head/sys/dev/uart
On Tue, 2016-02-16 at 12:46 +1100, Bruce Evans wrote: > On Mon, 15 Feb 2016, Ian Lepore wrote: > > > On Tue, 2016-02-16 at 11:01 +1100, Bruce Evans wrote: > >> On Mon, 15 Feb 2016, Ian Lepore wrote: > >> > >>> On Tue, 2016-02-16 at 09:28 +1100, Bruce Evans wrote: > On Mon, 15 Feb 2016, Michal Meloun wrote: > > > [...] > > Please note that ARM architecture does not have vectored interrupts, > > CPU must read actual interrupt source from external interrupt > > controller (GIC) register. This register contain predefined value if > > none of interrupts are active. > > > > 1 - CPU1: enters ns8250_bus_transmit() and sets IER_ETXRDY. > > 2 - HW: UART interrupt is asserted, processed by GIC and signaled > >to CPU2. > > 3 - CPU2: enters interrupt service. > > It is blocked by uart_lock(), right? > > > 4 - CPU1: writes character to into REG_DATA register. > > 5 - HW: UART clear its interrupt request > > 6 - CPU2: reads interrupt source register. No active interrupt is > >found, spurious interrupt is signaled, and CPU leaves interrupted > >state. > > 7 - CPU1: executes uart_barrier(). This function is not empty on ARM, > >and can be slow in some cases. > > It is not empty even on x86, although it probably should be. > > BTW, if arm needs the barrier, then how does it work with > bus_space_barrier() referenced in just 25 files in all of /sys/dev? > >>> > >>> With a hack, of course. In the arm interrupt-controller drivers we > >>> always call bus_space_barrier() right before doing an EOI. It's not a > >>> 100% solution, but in practice it seems to work pretty well. > >> > >> I thought about the x86 behaviour a bit more and now see that it does > >> need barriers but not the ones given by bus_space_barrier(). All (?) > >> interrupt handlers use mutexes (if not driver ones, then higher-level > >> ones). These might give stronger or different ordering than given by > >> bus_space_barrier(). On x86, they use the same memory bus lock as > >> the bus_space_barrier(). This is needed to give ordering across > >> CPUs. But for accessing a single device, you only need program order > >> for a single CPU. This is automatic on x86 provided a mutex is used > >> to prevent other CPUs accessing the same device. And if you don't use > >> a mutex, then bus_space_barrier() cannot give the necessary ordering > >> since if cannot prevent other CPUs interfering. > >> > >> So how does bus_space_barrier() before EOI make much difference? It > >> doesn't affect the order for a bunch of accesses on a single CPU. > >> It must do more than a mutex to do something good across CPUs. > >> Arguably, it is a bug in mutexes is they don't gives synchronization > >> for device memory. > >>> ... > >>> The hack code does a drain-write-buffer which doesn't g'tee that the > >>> slow peripheral write has made it all the way to the device, but it > >>> does at least g'tee that the write to the bus the perhiperal is on has > >>> been posted and ack'd by any bus<->bus bridge, and that seems to be > >>> good enough in practice. (If there were multiple bridged busses > >>> downstream it probably wouldn't be, but so far things aren't that > >>> complicated inside the socs we support.) > >> > >> Hmm, so there is some automatic strong ordering but mutexes don't > >> work for device memory? > > > > I guess you keep mentioning mutexes because on x86 their implementation > > uses some of the same instructions that are involved in bus_space > > barriers on x86? Otherwise I can't see what they have to do with > > anything related to the spurious interrupts that happen on arm. (You > > also mentioned multiple CPUs, which is not a requirement for this > > trouble on arm, it'll happen with a single core.) > > Partly. I wasn't worrying about this "spurious" interrupt but locking > in general. Now I don't see how mutexes can work unless they order > device accesses in exactly the same way as ordinary memory accesses. > Mutexes on arm are implemented with entirely different instructions, which do not cause any of this buffer draining or influence the ordering of surrouding accesses to non-mutex data. When a mutex is used to prevent concurrent hardware access between the interrupt and non-interrupt parts of a driver, or multiple cores accessing the hardware, a bus_space_barrier() is required after writing to the hardware and before releasing the mutex. Of course, such barriers don't exist in most drivers, especially ones not written for soc-specific hardware, and to the degree those drivers work, it's by accident. ::sigh:: There's no easy way to slip in a "mostly fixes all drivers" hack like the EOI hack, short of doing a barrier at the end of every bus_space access, and that's too expensive. > > The piece of info you're missing might be the fact that memory-mapped > > device registers on arm are mapped with the Device at
svn commit: r295662 - in head/sys: arm/arm arm64/arm64 dev/ofw dev/tsec dev/uart dev/vt/hw/ofwfb mips/mips powerpc/ofw
Author: andrew Date: Tue Feb 16 15:18:12 2016 New Revision: 295662 URL: https://svnweb.freebsd.org/changeset/base/295662 Log: Allow callers of OF_decode_addr to get the size of the found mapping. This will allow for code that uses the old fdt_get_range and fdt_regsize functions to find a range, map it, access, then unmap to replace this, up to and including the map, with a call to OF_decode_addr. As this function should only be used in the early boot code the unmap is mostly do document we no longer need the mapping as it's a no-op, at least on arm. Reviewed by: jhibbits Sponsored by: ABT Systems Ltd Differential Revision:https://reviews.freebsd.org/D5258 Modified: head/sys/arm/arm/ofw_machdep.c head/sys/arm64/arm64/ofw_machdep.c head/sys/dev/ofw/openfirm.h head/sys/dev/tsec/if_tsec_fdt.c head/sys/dev/uart/uart_cpu_fdt.c head/sys/dev/uart/uart_cpu_powerpc.c head/sys/dev/vt/hw/ofwfb/ofwfb.c head/sys/mips/mips/ofw_machdep.c head/sys/powerpc/ofw/ofw_machdep.c head/sys/powerpc/ofw/ofw_syscons.c Modified: head/sys/arm/arm/ofw_machdep.c == --- head/sys/arm/arm/ofw_machdep.c Tue Feb 16 14:03:25 2016 (r295661) +++ head/sys/arm/arm/ofw_machdep.c Tue Feb 16 15:18:12 2016 (r295662) @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); int OF_decode_addr(phandle_t dev, int regno, bus_space_tag_t *tag, -bus_space_handle_t *handle) +bus_space_handle_t *handle, bus_size_t *sz) { bus_addr_t addr; bus_size_t size; @@ -66,6 +66,10 @@ OF_decode_addr(phandle_t dev, int regno, *tag = fdtbus_bs_tag; flags = 0; #endif + + if (sz != NULL) + *sz = size; + return (bus_space_map(*tag, addr, size, flags, handle)); } Modified: head/sys/arm64/arm64/ofw_machdep.c == --- head/sys/arm64/arm64/ofw_machdep.c Tue Feb 16 14:03:25 2016 (r295661) +++ head/sys/arm64/arm64/ofw_machdep.c Tue Feb 16 15:18:12 2016 (r295662) @@ -39,7 +39,7 @@ extern struct bus_space memmap_bus; int OF_decode_addr(phandle_t dev, int regno, bus_space_tag_t *tag, -bus_space_handle_t *handle) +bus_space_handle_t *handle, bus_size_t *sz) { bus_addr_t addr; bus_size_t size; @@ -50,5 +50,9 @@ OF_decode_addr(phandle_t dev, int regno, return (err); *tag = &memmap_bus; + + if (sz != NULL) + *sz = size; + return (bus_space_map(*tag, addr, size, 0, handle)); } Modified: head/sys/dev/ofw/openfirm.h == --- head/sys/dev/ofw/openfirm.h Tue Feb 16 14:03:25 2016(r295661) +++ head/sys/dev/ofw/openfirm.h Tue Feb 16 15:18:12 2016(r295662) @@ -176,7 +176,7 @@ int OF_interpret(const char *cmd, int n */ #ifndef __sparc64__ intOF_decode_addr(phandle_t dev, int regno, bus_space_tag_t *ptag, - bus_space_handle_t *phandle); + bus_space_handle_t *phandle, bus_size_t *sz); #endif #endif /* _KERNEL */ Modified: head/sys/dev/tsec/if_tsec_fdt.c == --- head/sys/dev/tsec/if_tsec_fdt.c Tue Feb 16 14:03:25 2016 (r295661) +++ head/sys/dev/tsec/if_tsec_fdt.c Tue Feb 16 15:18:12 2016 (r295662) @@ -167,7 +167,7 @@ tsec_fdt_attach(device_t dev) } phy = OF_node_from_xref(phy); - OF_decode_addr(OF_parent(phy), 0, &sc->phy_bst, &sc->phy_bsh); + OF_decode_addr(OF_parent(phy), 0, &sc->phy_bst, &sc->phy_bsh, NULL); OF_getencprop(phy, "reg", &sc->phyaddr, sizeof(sc->phyaddr)); /* Init timer */ Modified: head/sys/dev/uart/uart_cpu_fdt.c == --- head/sys/dev/uart/uart_cpu_fdt.cTue Feb 16 14:03:25 2016 (r295661) +++ head/sys/dev/uart/uart_cpu_fdt.cTue Feb 16 15:18:12 2016 (r295662) @@ -212,5 +212,5 @@ uart_cpu_getdev(int devtype, struct uart di->stopbits = 1; di->parity = UART_PARITY_NONE; - return (OF_decode_addr(node, 0, &di->bas.bst, &di->bas.bsh)); + return (OF_decode_addr(node, 0, &di->bas.bst, &di->bas.bsh, NULL)); } Modified: head/sys/dev/uart/uart_cpu_powerpc.c == --- head/sys/dev/uart/uart_cpu_powerpc.cTue Feb 16 14:03:25 2016 (r295661) +++ head/sys/dev/uart/uart_cpu_powerpc.cTue Feb 16 15:18:12 2016 (r295662) @@ -180,7 +180,7 @@ uart_cpu_getdev(int devtype, struct uart if (class == NULL) return (ENXIO); - error = OF_decode_addr(input, 0, &di->bas.bst, &di->bas.bsh); + error = OF_decode_addr(input, 0, &di->bas.bst, &di->bas.bsh, NULL);
svn commit: r295663 - head/usr.sbin/amd/include
Author: bdrewery Date: Tue Feb 16 16:07:12 2016 New Revision: 295663 URL: https://svnweb.freebsd.org/changeset/base/295663 Log: Revert r295648 for now. This builds fine with FAST_DEPEND but the mkdep method requires that include/ generates the headers during 'make depend' so the subsequent directories can find them when running mkdep. Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/amd/include/Makefile Modified: head/usr.sbin/amd/include/Makefile == --- head/usr.sbin/amd/include/Makefile Tue Feb 16 15:18:12 2016 (r295662) +++ head/usr.sbin/amd/include/Makefile Tue Feb 16 16:07:12 2016 (r295663) @@ -9,13 +9,13 @@ .include -HDRS= config_local.h +SRCS= config_local.h .if ${MK_NIS} == "no" -HDRS+= localconfig.h +SRCS+= localconfig.h .endif -CLEANFILES=${HDRS} +CLEANFILES=${SRCS} -all: ${HDRS} +all depend: ${SRCS} config_local.h: newvers.sh ${.CURDIR}/../../../sys/conf/newvers.sh @rm -f ${.TARGET} ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r295664 - in head/sys/dev: ata/chipsets pci
Author: jhibbits Date: Tue Feb 16 17:55:10 2016 New Revision: 295664 URL: https://svnweb.freebsd.org/changeset/base/295664 Log: Convert a few more long -> rman_res_t. Modified: head/sys/dev/ata/chipsets/ata-promise.c head/sys/dev/pci/pci_pci.c Modified: head/sys/dev/ata/chipsets/ata-promise.c == --- head/sys/dev/ata/chipsets/ata-promise.c Tue Feb 16 16:07:12 2016 (r295663) +++ head/sys/dev/ata/chipsets/ata-promise.c Tue Feb 16 17:55:10 2016 (r295664) @@ -191,7 +191,7 @@ ata_promise_probe(device_t dev) !BUS_READ_IVAR(device_get_parent(GRANDPARENT(dev)), GRANDPARENT(dev), PCI_IVAR_DEVID, &devid) && ((devid == ATA_DEC_21150) || (devid == ATA_DEC_21150_1))) { - static long start = 0, end = 0; + static rman_res_t start = 0, end = 0; if (pci_get_slot(dev) == 1) { bus_get_resource(dev, SYS_RES_IRQ, 0, &start, &end); Modified: head/sys/dev/pci/pci_pci.c == --- head/sys/dev/pci/pci_pci.c Tue Feb 16 16:07:12 2016(r295663) +++ head/sys/dev/pci/pci_pci.c Tue Feb 16 17:55:10 2016(r295664) @@ -388,7 +388,7 @@ pcib_alloc_window(struct pcib_softc *sc, char buf[64]; int error, rid; - if (max_address != (u_long)max_address) + if (max_address != (rman_res_t)max_address) max_address = ~0ul; w->rman.rm_start = 0; w->rman.rm_end = max_address; @@ -1247,14 +1247,14 @@ pcib_alloc_new_window(struct pcib_softc return (ENOSPC); } - wmask = (1ul << w->step) - 1; + wmask = ((rman_res_t)1 << w->step) - 1; if (RF_ALIGNMENT(flags) < w->step) { flags &= ~RF_ALIGNMENT_MASK; flags |= RF_ALIGNMENT_LOG2(w->step); } start &= ~wmask; end |= wmask; - count = roundup2(count, 1ul << w->step); + count = roundup2(count, (rman_res_t)1 << w->step); rid = w->reg; res = bus_alloc_resource(sc->dev, type, &rid, start, end, count, flags & ~RF_ACTIVE); @@ -1389,7 +1389,7 @@ pcib_grow_window(struct pcib_softc *sc, end = w->rman.rm_end; if (start + count - 1 > end || start + count < start) return (EINVAL); - wmask = (1ul << w->step) - 1; + wmask = ((rman_res_t)1 << w->step) - 1; /* * If there is no resource at all, just try to allocate enough @@ -1435,7 +1435,7 @@ pcib_grow_window(struct pcib_softc *sc, device_printf(sc->dev, "attempting to grow %s window for (%#lx-%#lx,%#lx)\n", w->name, start, end, count); - align = 1ul << RF_ALIGNMENT(flags); + align = (rman_res_t)1 << RF_ALIGNMENT(flags); if (start < w->base) { if (rman_first_free_region(&w->rman, &start_free, &end_free) != 0 || start_free != w->base) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r295665 - head/share/mk
Author: bdrewery Date: Tue Feb 16 19:00:22 2016 New Revision: 295665 URL: https://svnweb.freebsd.org/changeset/base/295665 Log: Remove temporary hack from r294370 for SSH upgrades. MFC after:1 week Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk == --- head/share/mk/bsd.dep.mkTue Feb 16 17:55:10 2016(r295664) +++ head/share/mk/bsd.dep.mkTue Feb 16 19:00:22 2016(r295665) @@ -205,14 +205,6 @@ depend: beforedepend ${DEPENDFILE} after # This could be simpler with bmake :tW but needs to support fmake for MFC. _CFLAGS_INCLUDES= ${CFLAGS:Q:S/\\ /,/g:C/-include,/-include%/g:C/,/ /g:M-include*:C/%/ /g} _CXXFLAGS_INCLUDES= ${CXXFLAGS:Q:S/\\ /,/g:C/-include,/-include%/g:C/,/ /g:M-include*:C/%/ /g} -# XXX: Temporary hack to workaround .depend files not tracking -include -_hdrincludes=${_CFLAGS_INCLUDES:M*.h} ${_CXXFLAGS_INCLUDES:M*.h} -.for _hdr in ${_hdrincludes:O:u} -.if exists(${_hdr}) -${OBJS} ${POBJS} ${SOBJS}: ${_hdr} -.endif -.endfor -.undef _hdrincludes # Different types of sources are compiled with slightly different flags. # Split up the sources, and filter out headers and non-applicable flags. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r295666 - head/share/mk
Author: bdrewery Date: Tue Feb 16 19:02:04 2016 New Revision: 295666 URL: https://svnweb.freebsd.org/changeset/base/295666 Log: Always remove .depend.* regardless of WITH_FAST_DEPEND in case of changing which is used. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk == --- head/share/mk/bsd.dep.mkTue Feb 16 19:00:22 2016(r295665) +++ head/share/mk/bsd.dep.mkTue Feb 16 19:02:04 2016(r295666) @@ -59,7 +59,7 @@ DEPENDFILE?= .depend .if ${MK_DIRDEPS_BUILD} == "no" .MAKE.DEPENDFILE= ${DEPENDFILE} .endif -DEPENDFILES= ${DEPENDFILE} +DEPENDFILES= ${DEPENDFILE} ${DEPENDFILE}.* # Keep `tags' here, before SRCS are mangled below for `depend'. .if !target(tags) && defined(SRCS) && !defined(NO_TAGS) @@ -156,7 +156,6 @@ ${_D}.po: ${_DSRC} ${POBJS:S/^${_D}.po$/ .if ${MK_FAST_DEPEND} == "yes" && \ (${.MAKE.MODE:Mmeta} == "" || ${.MAKE.MODE:Mnofilemon} != "") -DEPENDFILES+= ${DEPENDFILE}.* DEPEND_MP?=-MP # Handle OBJS=../somefile.o hacks. Just replace '/' rather than use :T to # avoid collisions. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r295667 - head/share/mk
Author: bdrewery Date: Tue Feb 16 19:11:17 2016 New Revision: 295667 URL: https://svnweb.freebsd.org/changeset/base/295667 Log: Add CLEANDEPEND[FILES|DIRS] and simplify the tags cleanup to use it. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.dep.mk Modified: head/share/mk/bsd.dep.mk == --- head/share/mk/bsd.dep.mkTue Feb 16 19:02:04 2016(r295666) +++ head/share/mk/bsd.dep.mkTue Feb 16 19:11:17 2016(r295667) @@ -5,6 +5,11 @@ # # +++ variables +++ # +# CLEANDEPENDDIRS Additional directories to remove for the cleandepend +# target. +# +# CLEANDEPENDFILES Additional files to remove for the cleandepend target. +# # CTAGSA tags file generation program [gtags] # # CTAGSFLAGS Options for ctags(1) [not set] @@ -27,7 +32,8 @@ # +++ targets +++ # # cleandepend: -# Remove depend and tags file +# remove ${CLEANDEPENDFILES}; remove ${CLEANDEPENDDIRS} and all +# contents. # # depend: # Make the dependencies for the source files, and store @@ -59,7 +65,7 @@ DEPENDFILE?= .depend .if ${MK_DIRDEPS_BUILD} == "no" .MAKE.DEPENDFILE= ${DEPENDFILE} .endif -DEPENDFILES= ${DEPENDFILE} ${DEPENDFILE}.* +CLEANDEPENDFILES= ${DEPENDFILE} ${DEPENDFILE}.* # Keep `tags' here, before SRCS are mangled below for `depend'. .if !target(tags) && defined(SRCS) && !defined(NO_TAGS) @@ -252,16 +258,20 @@ afterdepend: .endif .endif -.if !target(cleandepend) -cleandepend: -.if defined(SRCS) .if ${CTAGS:T} == "gtags" - rm -f ${DEPENDFILES} GPATH GRTAGS GSYMS GTAGS +CLEANDEPENDFILES+= GPATH GRTAGS GSYMS GTAGS .if defined(HTML) - rm -rf HTML +CLEANDEPENDDIRS+= HTML .endif .else - rm -f ${DEPENDFILES} tags +CLEANDEPENDFILES+= tags +.endif +.if !target(cleandepend) +cleandepend: +.if defined(SRCS) + rm -f ${CLEANDEPENDFILES} +.if !empty(CLEANDEPENDDIRS) + rm -rf ${CLEANDEPENDDIRS} .endif .endif .endif ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r295668 - head/sys/netinet
Author: tuexen Date: Tue Feb 16 19:36:25 2016 New Revision: 295668 URL: https://svnweb.freebsd.org/changeset/base/295668 Log: Improve the teardown of the SCTP stack. Obtained from:bz@ MFC after: 1 week Modified: head/sys/netinet/sctp_asconf.c head/sys/netinet/sctp_bsd_addr.c head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_pcb.h head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_asconf.c == --- head/sys/netinet/sctp_asconf.c Tue Feb 16 19:11:17 2016 (r295667) +++ head/sys/netinet/sctp_asconf.c Tue Feb 16 19:36:25 2016 (r295668) @@ -3248,6 +3248,7 @@ sctp_addr_mgmt_ep_sa(struct sctp_inpcb * } else { struct sctp_asconf_iterator *asc; struct sctp_laddr *wi; + int ret; SCTP_MALLOC(asc, struct sctp_asconf_iterator *, sizeof(struct sctp_asconf_iterator), @@ -3269,7 +3270,7 @@ sctp_addr_mgmt_ep_sa(struct sctp_inpcb * wi->action = type; atomic_add_int(&ifa->refcount, 1); LIST_INSERT_HEAD(&asc->list_of_work, wi, sctp_nxt_addr); - (void)sctp_initiate_iterator(sctp_asconf_iterator_ep, + ret = sctp_initiate_iterator(sctp_asconf_iterator_ep, sctp_asconf_iterator_stcb, sctp_asconf_iterator_ep_end, SCTP_PCB_ANY_FLAGS, @@ -3277,6 +3278,12 @@ sctp_addr_mgmt_ep_sa(struct sctp_inpcb * SCTP_ASOC_ANY_STATE, (void *)asc, 0, sctp_asconf_iterator_end, inp, 0); + if (ret) { + SCTP_PRINTF("Failed to initiate iterator for addr_mgmt_ep_sa\n"); + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_ASCONF, EFAULT); + sctp_asconf_iterator_end(asc, 0); + return (EFAULT); + } } return (0); } else { Modified: head/sys/netinet/sctp_bsd_addr.c == --- head/sys/netinet/sctp_bsd_addr.cTue Feb 16 19:11:17 2016 (r295667) +++ head/sys/netinet/sctp_bsd_addr.cTue Feb 16 19:36:25 2016 (r295668) @@ -293,6 +293,10 @@ sctp_addr_change(struct ifaddr *ifa, int { uint32_t ifa_flags = 0; + if (SCTP_BASE_VAR(sctp_pcb_initialized) == 0) { + return; + } + /* * BSD only has one VRF, if this changes we will need to hook in the * right things here to get the id to pass to the address managment Modified: head/sys/netinet/sctp_pcb.c == --- head/sys/netinet/sctp_pcb.c Tue Feb 16 19:11:17 2016(r295667) +++ head/sys/netinet/sctp_pcb.c Tue Feb 16 19:36:25 2016(r295668) @@ -2781,8 +2781,45 @@ sctp_move_pcb_and_assoc(struct sctp_inpc SCTP_INP_WUNLOCK(old_inp); } +/* + * insert an laddr entry with the given ifa for the desired list + */ +static int +sctp_insert_laddr(struct sctpladdr *list, struct sctp_ifa *ifa, uint32_t act) +{ + struct sctp_laddr *laddr; + laddr = SCTP_ZONE_GET(SCTP_BASE_INFO(ipi_zone_laddr), struct sctp_laddr); + if (laddr == NULL) { + /* out of memory? */ + SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_PCB, EINVAL); + return (EINVAL); + } + SCTP_INCR_LADDR_COUNT(); + bzero(laddr, sizeof(*laddr)); + (void)SCTP_GETTIME_TIMEVAL(&laddr->start_time); + laddr->ifa = ifa; + laddr->action = act; + atomic_add_int(&ifa->refcount, 1); + /* insert it */ + LIST_INSERT_HEAD(list, laddr, sctp_nxt_addr); + return (0); +} + +/* + * Remove an laddr entry from the local address list (on an assoc) + */ +static void +sctp_remove_laddr(struct sctp_laddr *laddr) +{ + + /* remove from the list */ + LIST_REMOVE(laddr, sctp_nxt_addr); + sctp_free_ifa(laddr->ifa); + SCTP_ZONE_FREE(SCTP_BASE_INFO(ipi_zone_laddr), laddr); + SCTP_DECR_LADDR_COUNT(); +} /* sctp_ifap is used to bypass normal local address validation checks */ int @@ -5509,46 +5546,6 @@ sctp_add_local_addr_restricted(struct sc } /* - * insert an laddr entry with the given ifa for the desired list - */ -int -sctp_insert_laddr(struct sctpladdr *list, struct sctp_ifa *ifa, uint32_t act) -{ - struct sctp_laddr *laddr; - - laddr = SCTP_ZONE_GET(SCTP_BASE_INFO(ipi_zone_laddr), struct sctp_laddr); - if (laddr == NULL) { - /* out of memory? */ - SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FR
svn commit: r295670 - head/sys/netinet
Author: tuexen Date: Tue Feb 16 20:33:18 2016 New Revision: 295670 URL: https://svnweb.freebsd.org/changeset/base/295670 Log: Whitespace changes. Modified: head/sys/netinet/sctp_asconf.c head/sys/netinet/sctp_bsd_addr.c head/sys/netinet/sctp_pcb.c head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctp_asconf.c == --- head/sys/netinet/sctp_asconf.c Tue Feb 16 20:11:00 2016 (r295669) +++ head/sys/netinet/sctp_asconf.c Tue Feb 16 20:33:18 2016 (r295670) @@ -3278,7 +3278,7 @@ sctp_addr_mgmt_ep_sa(struct sctp_inpcb * SCTP_ASOC_ANY_STATE, (void *)asc, 0, sctp_asconf_iterator_end, inp, 0); - if (ret) { + if (ret) { SCTP_PRINTF("Failed to initiate iterator for addr_mgmt_ep_sa\n"); SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_ASCONF, EFAULT); sctp_asconf_iterator_end(asc, 0); Modified: head/sys/netinet/sctp_bsd_addr.c == --- head/sys/netinet/sctp_bsd_addr.cTue Feb 16 20:11:00 2016 (r295669) +++ head/sys/netinet/sctp_bsd_addr.cTue Feb 16 20:33:18 2016 (r295670) @@ -296,7 +296,6 @@ sctp_addr_change(struct ifaddr *ifa, int if (SCTP_BASE_VAR(sctp_pcb_initialized) == 0) { return; } - /* * BSD only has one VRF, if this changes we will need to hook in the * right things here to get the id to pass to the address managment Modified: head/sys/netinet/sctp_pcb.c == --- head/sys/netinet/sctp_pcb.c Tue Feb 16 20:11:00 2016(r295669) +++ head/sys/netinet/sctp_pcb.c Tue Feb 16 20:33:18 2016(r295670) @@ -2821,6 +2821,8 @@ sctp_remove_laddr(struct sctp_laddr *lad SCTP_DECR_LADDR_COUNT(); } + + /* sctp_ifap is used to bypass normal local address validation checks */ int sctp_inpcb_bind(struct socket *so, struct sockaddr *addr, @@ -5920,7 +5922,6 @@ sctp_pcb_finish(void) return; } SCTP_BASE_VAR(sctp_pcb_initialized) = 0; - /* * In FreeBSD the iterator thread never exits but we do clean up. * The only way FreeBSD reaches here is if we have VRF's but we @@ -6043,7 +6044,6 @@ retry: SCTP_ZONE_DESTROY(SCTP_BASE_INFO(ipi_zone_strmoq)); SCTP_ZONE_DESTROY(SCTP_BASE_INFO(ipi_zone_asconf)); SCTP_ZONE_DESTROY(SCTP_BASE_INFO(ipi_zone_asconf_ack)); - #if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT) SCTP_FREE(SCTP_BASE_STATS, SCTP_M_MCORE); #endif @@ -7057,7 +7057,6 @@ sctp_initiate_iterator(inp_func inpf, SCTP_FREE(it, SCTP_M_ITER); return (-1); } - TAILQ_INSERT_TAIL(&sctp_it_ctl.iteratorhead, it, sctp_nxt_itr); if (sctp_it_ctl.iterator_running == 0) { sctp_wakeup_iterator(); Modified: head/sys/netinet/sctputil.c == --- head/sys/netinet/sctputil.c Tue Feb 16 20:11:00 2016(r295669) +++ head/sys/netinet/sctputil.c Tue Feb 16 20:33:18 2016(r295670) @@ -1482,7 +1482,10 @@ sctp_handle_addr_wq(void) sctp_asconf_iterator_end, NULL, 0); if (ret) { SCTP_PRINTF("Failed to initiate iterator for handle_addr_wq\n"); - /* Freeing if we are stopping or put back on the addr_wq. */ + /* +* Freeing if we are stopping or put back on the +* addr_wq. +*/ if (SCTP_BASE_VAR(sctp_pcb_initialized) == 0) { sctp_asconf_iterator_end(asc, 0); } else { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r295671 - head/usr.sbin/cron/cron
Author: pfg Date: Tue Feb 16 20:59:49 2016 New Revision: 295671 URL: https://svnweb.freebsd.org/changeset/base/295671 Log: cron: use (char *)NULL instead of (char *)0 in execle. Obtained from:OpenBSD (CVS Rev 1.25) Modified: head/usr.sbin/cron/cron/do_command.c Modified: head/usr.sbin/cron/cron/do_command.c == --- head/usr.sbin/cron/cron/do_command.cTue Feb 16 20:33:18 2016 (r295670) +++ head/usr.sbin/cron/cron/do_command.cTue Feb 16 20:59:49 2016 (r295671) @@ -337,8 +337,9 @@ child_process(e, u) _exit(OK_EXIT); } # endif /*DEBUGGING*/ - execle(shell, shell, "-c", e->cmd, (char *)0, e->envp); - warn("execl: couldn't exec `%s'", shell); + execle(shell, shell, "-c", e->cmd, (char *)NULL, + e->envp); + warn("execle: couldn't exec `%s'", shell); _exit(ERROR_EXIT); } break; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r295672 - head/usr.sbin/cron/crontab
Author: pfg Date: Tue Feb 16 21:19:39 2016 New Revision: 295672 URL: https://svnweb.freebsd.org/changeset/base/295672 Log: crontab: ftruncate() with ftello() instead of ftell(). Obtained from:OpenBSD (CVS rev. 1.47) Modified: head/usr.sbin/cron/crontab/crontab.c Modified: head/usr.sbin/cron/crontab/crontab.c == --- head/usr.sbin/cron/crontab/crontab.cTue Feb 16 20:59:49 2016 (r295671) +++ head/usr.sbin/cron/crontab/crontab.cTue Feb 16 21:19:39 2016 (r295672) @@ -532,7 +532,7 @@ replace_cmd() { Set_LineNum(1) while (EOF != (ch = get_char(NewCrontab))) putc(ch, tmp); - ftruncate(fileno(tmp), ftell(tmp)); + ftruncate(fileno(tmp), ftello(tmp)); fflush(tmp); rewind(tmp); if (ferror(tmp)) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r295673 - head/sys/powerpc/ps3
Author: jhibbits Date: Tue Feb 16 21:30:55 2016 New Revision: 295673 URL: https://svnweb.freebsd.org/changeset/base/295673 Log: Another conversion u_long -> rman_res_t Modified: head/sys/powerpc/ps3/ps3bus.c Modified: head/sys/powerpc/ps3/ps3bus.c == --- head/sys/powerpc/ps3/ps3bus.c Tue Feb 16 21:19:39 2016 (r295672) +++ head/sys/powerpc/ps3/ps3bus.c Tue Feb 16 21:30:55 2016 (r295673) @@ -58,8 +58,8 @@ static intps3bus_print_child(device_t d static int ps3bus_read_ivar(device_t bus, device_t child, int which, uintptr_t *result); static struct resource *ps3bus_alloc_resource(device_t bus, device_t child, - int type, int *rid, u_long start, u_long end, - u_long count, u_int flags); + int type, int *rid, rman_res_t start, rman_res_t end, + rman_res_t count, u_int flags); static int ps3bus_activate_resource(device_t bus, device_t child, int type, int rid, struct resource *res); static bus_dma_tag_t ps3bus_get_dma_tag(device_t dev, device_t child); @@ -523,14 +523,14 @@ ps3bus_read_ivar(device_t bus, device_t static struct resource * ps3bus_alloc_resource(device_t bus, device_t child, int type, int *rid, -u_long start, u_long end, u_long count, u_int flags) +rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct ps3bus_devinfo *dinfo; struct ps3bus_softc *sc; int needactivate; struct resource *rv; struct rman *rm; -u_long adjstart, adjend, adjcount; +rman_res_t adjstart, adjend, adjcount; struct resource_list_entry *rle; sc = device_get_softc(bus); @@ -628,7 +628,7 @@ ps3bus_activate_resource(device_t bus, d return (ENOMEM); rman_set_virtual(res, p); rman_set_bustag(res, &bs_be_tag); - rman_set_bushandle(res, (u_long)p); + rman_set_bushandle(res, (rman_res_t)p); } return (rman_activate_resource(res)); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r295675 - head/usr.bin/mail
Author: pfg Date: Tue Feb 16 21:39:19 2016 New Revision: 295675 URL: https://svnweb.freebsd.org/changeset/base/295675 Log: Fix naive use of ftell(3). Secure coding practices, FIO19-C. Modified: head/usr.bin/mail/def.h Modified: head/usr.bin/mail/def.h == --- head/usr.bin/mail/def.h Tue Feb 16 21:36:48 2016(r295674) +++ head/usr.bin/mail/def.h Tue Feb 16 21:39:19 2016(r295675) @@ -270,5 +270,5 @@ struct ignoretab { */ #define trunc(stream) { \ (void)fflush(stream); \ - (void)ftruncate(fileno(stream), (off_t)ftell(stream)); \ + (void)ftruncate(fileno(stream), ftello(stream));\ } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r295676 - head/sys/sys
Author: jhb Date: Tue Feb 16 21:42:53 2016 New Revision: 295676 URL: https://svnweb.freebsd.org/changeset/base/295676 Log: The locking annotations for struct sockbuf originally used the key from struct socket. When sockbuf.h was moved out of socketvar.h, the locking key was no longer nearby. Instead, add a new key for sockbuf and use a single item for the socket buffer lock instead of separate entries for receive vs send buffers. Reviewed by: adrian Sponsored by: Chelsio Communications Differential Revision:https://reviews.freebsd.org/D4901 Modified: head/sys/sys/sockbuf.h head/sys/sys/socketvar.h Modified: head/sys/sys/sockbuf.h == --- head/sys/sys/sockbuf.h Tue Feb 16 21:39:19 2016(r295675) +++ head/sys/sys/sockbuf.h Tue Feb 16 21:42:53 2016(r295676) @@ -77,33 +77,36 @@ struct xsockbuf { /* * Variables for socket buffering. + * + * Locking key to struct sockbuf: + * (a) locked by SOCKBUF_LOCK(). */ struct sockbuf { struct selinfo sb_sel; /* process selecting read/write */ struct mtx sb_mtx; /* sockbuf lock */ struct sx sb_sx; /* prevent I/O interlacing */ - short sb_state; /* (c/d) socket state on sockbuf */ + short sb_state; /* (a) socket state on sockbuf */ #definesb_startzerosb_mb - struct mbuf *sb_mb;/* (c/d) the mbuf chain */ - struct mbuf *sb_mbtail; /* (c/d) the last mbuf in the chain */ - struct mbuf *sb_lastrecord;/* (c/d) first mbuf of last + struct mbuf *sb_mb;/* (a) the mbuf chain */ + struct mbuf *sb_mbtail; /* (a) the last mbuf in the chain */ + struct mbuf *sb_lastrecord;/* (a) first mbuf of last * record in socket buffer */ - struct mbuf *sb_sndptr; /* (c/d) pointer into mbuf chain */ - struct mbuf *sb_fnrdy; /* (c/d) pointer to first not ready buffer */ - u_int sb_sndptroff; /* (c/d) byte offset of ptr into chain */ - u_int sb_acc; /* (c/d) available chars in buffer */ - u_int sb_ccc; /* (c/d) claimed chars in buffer */ - u_int sb_hiwat; /* (c/d) max actual char count */ - u_int sb_mbcnt; /* (c/d) chars of mbufs used */ - u_int sb_mcnt;/* (c/d) number of mbufs in buffer */ - u_int sb_ccnt;/* (c/d) number of clusters in buffer */ - u_int sb_mbmax; /* (c/d) max chars of mbufs to use */ - u_int sb_ctl; /* (c/d) non-data chars in buffer */ - int sb_lowat; /* (c/d) low water mark */ - sbintime_t sb_timeo; /* (c/d) timeout for read/write */ - short sb_flags; /* (c/d) flags, see below */ - int (*sb_upcall)(struct socket *, void *, int); /* (c/d) */ - void*sb_upcallarg; /* (c/d) */ + struct mbuf *sb_sndptr; /* (a) pointer into mbuf chain */ + struct mbuf *sb_fnrdy; /* (a) pointer to first not ready buffer */ + u_int sb_sndptroff; /* (a) byte offset of ptr into chain */ + u_int sb_acc; /* (a) available chars in buffer */ + u_int sb_ccc; /* (a) claimed chars in buffer */ + u_int sb_hiwat; /* (a) max actual char count */ + u_int sb_mbcnt; /* (a) chars of mbufs used */ + u_int sb_mcnt;/* (a) number of mbufs in buffer */ + u_int sb_ccnt;/* (a) number of clusters in buffer */ + u_int sb_mbmax; /* (a) max chars of mbufs to use */ + u_int sb_ctl; /* (a) non-data chars in buffer */ + int sb_lowat; /* (a) low water mark */ + sbintime_t sb_timeo; /* (a) timeout for read/write */ + short sb_flags; /* (a) flags, see below */ + int (*sb_upcall)(struct socket *, void *, int); /* (a) */ + void*sb_upcallarg; /* (a) */ }; #ifdef _KERNEL Modified: head/sys/sys/socketvar.h == --- head/sys/sys/socketvar.hTue Feb 16 21:39:19 2016(r295675) +++ head/sys/sys/socketvar.hTue Feb 16 21:42:53 2016(r295676) @@ -64,7 +64,6 @@ struct socket; * (a) constant after allocation, no locking required. * (b) locked by SOCK_LOCK(so). * (c) locked by SOCKBUF_LOCK(&so->so_rcv). - * (d) locked by SOCKBUF_LOCK(&so->so_snd). * (e) locked by ACCEPT_LOCK(). * (f) not locked since integer reads/writes are atomic. * (g) used only as a sleep/wakeup address, no value. ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r295677 - head/usr.bin/truss
Author: jhb Date: Tue Feb 16 22:00:01 2016 New Revision: 295677 URL: https://svnweb.freebsd.org/changeset/base/295677 Log: Fetch the current thread and it's syscall state from the trussinfo object instead of passing some of that state as arguments to print_syscall() and print_syscallret(). This just makes the calls of these functions shorter and easier to read. Modified: head/usr.bin/truss/setup.c head/usr.bin/truss/syscall.h head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/setup.c == --- head/usr.bin/truss/setup.c Tue Feb 16 21:42:53 2016(r295676) +++ head/usr.bin/truss/setup.c Tue Feb 16 22:00:01 2016(r295677) @@ -422,8 +422,7 @@ exit_syscall(struct trussinfo *info, str } } - print_syscall_ret(info, t->cs.name, t->cs.nargs, t->cs.s_args, - errorp, retval, sc); + print_syscall_ret(info, errorp, retval); free_syscall(t); /* Modified: head/usr.bin/truss/syscall.h == --- head/usr.bin/truss/syscall.hTue Feb 16 21:42:53 2016 (r295676) +++ head/usr.bin/truss/syscall.hTue Feb 16 22:00:01 2016 (r295677) @@ -118,7 +118,6 @@ struct linux_socketcall_args { }; void init_syscalls(void); -void print_syscall(struct trussinfo *, const char *, int, char **); -void print_syscall_ret(struct trussinfo *, const char *, int, char **, int, -long *, struct syscall *); +void print_syscall(struct trussinfo *); +void print_syscall_ret(struct trussinfo *, int, long *); void print_summary(struct trussinfo *trussinfo); Modified: head/usr.bin/truss/syscalls.c == --- head/usr.bin/truss/syscalls.c Tue Feb 16 21:42:53 2016 (r295676) +++ head/usr.bin/truss/syscalls.c Tue Feb 16 22:00:01 2016 (r295677) @@ -2000,37 +2000,39 @@ print_arg(struct syscall_args *sc, unsig } /* - * Print (to outfile) the system call and its arguments. Note that - * nargs is the number of arguments (not the number of words; this is - * potentially confusing, I know). + * Print (to outfile) the system call and its arguments. */ void -print_syscall(struct trussinfo *trussinfo, const char *name, int nargs, -char **s_args) +print_syscall(struct trussinfo *trussinfo) { struct timespec timediff; - int i, len; + struct threadinfo *t; + const char *name; + char **s_args; + int i, len, nargs; len = 0; + t = trussinfo->curthread; if (trussinfo->flags & FOLLOWFORKS) len += fprintf(trussinfo->outfile, "%5d: ", - trussinfo->curthread->proc->pid); + t->proc->pid); + name = t->cs.name; + nargs = t->cs.nargs; + s_args = t->cs.s_args; if (name != NULL && (strcmp(name, "execve") == 0 || strcmp(name, "exit") == 0)) { - clock_gettime(CLOCK_REALTIME, &trussinfo->curthread->after); + clock_gettime(CLOCK_REALTIME, &t->after); } if (trussinfo->flags & ABSOLUTETIMESTAMPS) { - timespecsubt(&trussinfo->curthread->after, - &trussinfo->start_time, &timediff); + timespecsubt(&t->after, &trussinfo->start_time, &timediff); len += fprintf(trussinfo->outfile, "%jd.%09ld ", (intmax_t)timediff.tv_sec, timediff.tv_nsec); } if (trussinfo->flags & RELATIVETIMESTAMPS) { - timespecsubt(&trussinfo->curthread->after, - &trussinfo->curthread->before, &timediff); + timespecsubt(&t->after, &t->before, &timediff); len += fprintf(trussinfo->outfile, "%jd.%09ld ", (intmax_t)timediff.tv_sec, timediff.tv_nsec); } @@ -2038,7 +2040,7 @@ print_syscall(struct trussinfo *trussinf len += fprintf(trussinfo->outfile, "%s(", name); for (i = 0; i < nargs; i++) { - if (s_args[i]) + if (s_args[i] != NULL) len += fprintf(trussinfo->outfile, "%s", s_args[i]); else len += fprintf(trussinfo->outfile, @@ -2052,15 +2054,18 @@ print_syscall(struct trussinfo *trussinf } void -print_syscall_ret(struct trussinfo *trussinfo, const char *name, int nargs, -char **s_args, int errorp, long *retval, struct syscall *sc) +print_syscall_ret(struct trussinfo *trussinfo, int errorp, long *retval) { struct timespec timediff; + struct threadinfo *t; + struct syscall *sc; + int error; + t = trussinfo->curthread; + sc = t->cs.sc; if (trussinfo->flags & COUNTONLY) { - clock_gettime(CLOCK_REALTIME, &trussinfo->curthread->after); - timespecsubt(&trussinfo->curthrea
svn commit: r295678 - head/usr.bin/truss
Author: jhb Date: Tue Feb 16 22:13:25 2016 New Revision: 295678 URL: https://svnweb.freebsd.org/changeset/base/295678 Log: Remove an unused variable that snuck into the previous revision. Modified: head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/syscalls.c == --- head/usr.bin/truss/syscalls.c Tue Feb 16 22:00:01 2016 (r295677) +++ head/usr.bin/truss/syscalls.c Tue Feb 16 22:13:25 2016 (r295678) @@ -2059,7 +2059,6 @@ print_syscall_ret(struct trussinfo *trus struct timespec timediff; struct threadinfo *t; struct syscall *sc; - int error; t = trussinfo->curthread; sc = t->cs.sc; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r295681 - in head: lib/clang/libllvmdebuginfodwarf lib/clang/libllvmdebuginfopdb lib/clang/libllvmlibdriver lib/clang/libllvmlto lib/clang/libllvmmirparser lib/clang/libllvmorcjit lib/c...
Author: bdrewery Date: Tue Feb 16 23:11:09 2016 New Revision: 295681 URL: https://svnweb.freebsd.org/changeset/base/295681 Log: DIRDEPS_BUILD: Hookup CLANG_EXTRAS. Sponsored by: EMC / Isilon Storage Division Added: head/lib/clang/libllvmdebuginfodwarf/Makefile.depend (contents, props changed) head/lib/clang/libllvmdebuginfopdb/Makefile.depend (contents, props changed) head/lib/clang/libllvmlibdriver/Makefile.depend (contents, props changed) head/lib/clang/libllvmlto/Makefile.depend (contents, props changed) head/lib/clang/libllvmmirparser/Makefile.depend (contents, props changed) head/lib/clang/libllvmorcjit/Makefile.depend (contents, props changed) head/lib/clang/libllvmpasses/Makefile.depend (contents, props changed) head/usr.bin/clang/bugpoint/Makefile.depend (contents, props changed) head/usr.bin/clang/llc/Makefile.depend (contents, props changed) head/usr.bin/clang/lli/Makefile.depend (contents, props changed) head/usr.bin/clang/llvm-ar/Makefile.depend (contents, props changed) head/usr.bin/clang/llvm-as/Makefile.depend (contents, props changed) head/usr.bin/clang/llvm-bcanalyzer/Makefile.depend (contents, props changed) head/usr.bin/clang/llvm-cov/Makefile.depend (contents, props changed) head/usr.bin/clang/llvm-cxxdump/Makefile.depend (contents, props changed) head/usr.bin/clang/llvm-diff/Makefile.depend (contents, props changed) head/usr.bin/clang/llvm-dis/Makefile.depend (contents, props changed) head/usr.bin/clang/llvm-dwarfdump/Makefile.depend (contents, props changed) head/usr.bin/clang/llvm-extract/Makefile.depend (contents, props changed) head/usr.bin/clang/llvm-link/Makefile.depend (contents, props changed) head/usr.bin/clang/llvm-lto/Makefile.depend (contents, props changed) head/usr.bin/clang/llvm-mc/Makefile.depend (contents, props changed) head/usr.bin/clang/llvm-nm/Makefile.depend (contents, props changed) head/usr.bin/clang/llvm-objdump/Makefile.depend (contents, props changed) head/usr.bin/clang/llvm-pdbdump/Makefile.depend (contents, props changed) head/usr.bin/clang/llvm-profdata/Makefile.depend (contents, props changed) head/usr.bin/clang/llvm-rtdyld/Makefile.depend (contents, props changed) head/usr.bin/clang/llvm-symbolizer/Makefile.depend (contents, props changed) head/usr.bin/clang/macho-dump/Makefile.depend (contents, props changed) head/usr.bin/clang/opt/Makefile.depend (contents, props changed) Modified: head/targets/pseudo/clang/Makefile.depend Added: head/lib/clang/libllvmdebuginfodwarf/Makefile.depend == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/libllvmdebuginfodwarf/Makefile.dependTue Feb 16 23:11:09 2016(r295681) @@ -0,0 +1,15 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + include \ + include/xlocale \ + lib/libc++ \ + lib/msun \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/lib/clang/libllvmdebuginfopdb/Makefile.depend == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/libllvmdebuginfopdb/Makefile.depend Tue Feb 16 23:11:09 2016(r295681) @@ -0,0 +1,15 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + include \ + include/xlocale \ + lib/libc++ \ + lib/msun \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif Added: head/lib/clang/libllvmlibdriver/Makefile.depend == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/libllvmlibdriver/Makefile.depend Tue Feb 16 23:11:09 2016(r295681) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + include \ + include/xlocale \ + lib/libc++ \ + lib/msun \ + usr.bin/clang/tblgen.host \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +LibDriver.o: Options.inc.h +LibDriver.po: Options.inc.h +.endif Added: head/lib/clang/libllvmlto/Makefile.depend == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/clang/libllvmlto/Makefile.depend Tue Feb 16 23:11:09 2016 (r295681) @@ -0,0 +1,18 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + include \ + include/xlocale \ + lib/libc++ \ + lib/msun \ + usr.bin/clang/tblgen.host \ + + +.include + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +LTOCode
svn commit: r295682 - head/sys/sys
Author: jhibbits Date: Tue Feb 16 23:47:52 2016 New Revision: 295682 URL: https://svnweb.freebsd.org/changeset/base/295682 Log: Bump __FreeBSD_Version for u_long -> rman_res_t change (r294883). Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h == --- head/sys/sys/param.hTue Feb 16 23:11:09 2016(r295681) +++ head/sys/sys/param.hTue Feb 16 23:47:52 2016(r295682) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100097 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100098 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r295683 - head/libexec/rtld-elf/tests
Author: bdrewery Date: Wed Feb 17 00:30:28 2016 New Revision: 295683 URL: https://svnweb.freebsd.org/changeset/base/295683 Log: Fix build race after r295643. Sponsored by: EMC / Isilon Storage Division Modified: head/libexec/rtld-elf/tests/Makefile Modified: head/libexec/rtld-elf/tests/Makefile == --- head/libexec/rtld-elf/tests/MakefileTue Feb 16 23:47:52 2016 (r295682) +++ head/libexec/rtld-elf/tests/MakefileWed Feb 17 00:30:28 2016 (r295683) @@ -4,6 +4,7 @@ SUBDIR+= libpythagoras target +SUBDIR_DEPEND_target= libpythagoras ATF_TESTS_C= ld_library_pathfds .include ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r295683 - head/libexec/rtld-elf/tests
On Wed, Feb 17, 2016 at 12:30:28AM +, Bryan Drewery wrote: > Author: bdrewery > Date: Wed Feb 17 00:30:28 2016 > New Revision: 295683 > URL: https://svnweb.freebsd.org/changeset/base/295683 > > Log: > Fix build race after r295643. > Thank you. Glen signature.asc Description: PGP signature