svn commit: r344690 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: pjd Date: Fri Mar 1 05:54:13 2019 New Revision: 344690 URL: https://svnweb.freebsd.org/changeset/base/344690 Log: Improve readability of the code by making it explicit where the 'c' variable starts. It is also more consistent with similar code in this file. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.cFri Mar 1 05:04:29 2019(r344689) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.cFri Mar 1 05:54:13 2019(r344690) @@ -568,7 +568,7 @@ vdev_raidz_map_alloc(abd_t *abd, uint64_t size, uint64 abd_alloc_linear(rm->rm_col[c].rc_size, B_TRUE); } - for (off = 0; c < acols; c++) { + for (off = 0, c = rm->rm_firstdatacol; c < acols; c++) { rm->rm_col[c].rc_abd = abd_get_offset(abd, off); off += rm->rm_col[c].rc_size; } ___ 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: r344687 - in head/sys: conf powerpc/powernv
Author: jhibbits Date: Fri Mar 1 04:36:55 2019 New Revision: 344687 URL: https://svnweb.freebsd.org/changeset/base/344687 Log: powerpc/powernv: Add OPAL flash device driver Firmware needed by petitboot, for example, GPU firmware, can be installed to a partition in the flash filesystem. This driver exposes the full flash given by the device tree, letting the user manage firmware, etc, from FreeBSD. To use the partitions provided by the flash module, the fdt_slicer module is needed, but the module isn't needed for raw access, so there's no direct dependency link in here. MFC after:2 weeks Added: head/sys/powerpc/powernv/opal_flash.c (contents, props changed) Modified: head/sys/conf/files.powerpc head/sys/powerpc/powernv/opal.h Modified: head/sys/conf/files.powerpc == --- head/sys/conf/files.powerpc Fri Mar 1 04:17:43 2019(r344686) +++ head/sys/conf/files.powerpc Fri Mar 1 04:36:55 2019(r344687) @@ -192,6 +192,7 @@ powerpc/powernv/opal.c optionalpowernv powerpc/powernv/opal_async.c optionalpowernv powerpc/powernv/opal_console.c optionalpowernv powerpc/powernv/opal_dev.c optionalpowernv +powerpc/powernv/opal_flash.c optionalpowernv powerpc/powernv/opal_i2c.c optionaliicbus fdt powernv powerpc/powernv/opal_i2cm.coptionaliicbus fdt powernv powerpc/powernv/opal_pci.c optionalpowernv pci Modified: head/sys/powerpc/powernv/opal.h == --- head/sys/powerpc/powernv/opal.h Fri Mar 1 04:17:43 2019 (r344686) +++ head/sys/powerpc/powernv/opal.h Fri Mar 1 04:36:55 2019 (r344687) @@ -76,6 +76,9 @@ int opal_call(uint64_t token, ...); #defineOPAL_IPMI_SEND 107 #defineOPAL_IPMI_RECV 108 #defineOPAL_I2C_REQUEST109 +#defineOPAL_FLASH_READ 110 +#defineOPAL_FLASH_WRITE111 +#defineOPAL_FLASH_ERASE111 #defineOPAL_INT_GET_XIRR 122 #defineOPAL_INT_SET_CPPR 123 #defineOPAL_INT_EOI124 Added: head/sys/powerpc/powernv/opal_flash.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/powernv/opal_flash.c Fri Mar 1 04:36:55 2019 (r344687) @@ -0,0 +1,372 @@ +/*- + * Copyright (c) 2019 Justin Hibbits + * + * 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 AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include "opal.h" + +/* + * OPAL System flash driver, using OPAL firmware calls to access the device. + * + * This just presents the base block interface. The fdt_slicer can be used on + * top to present the partitions listed in the fdt. + * + * There are three OPAL methods used: OPAL_FLASH_READ, OPAL_FLASH_WRITE, and + * OPAL_FLASH_ERASE. At the firmware layer, READ and WRITE can be on arbitrary + * boundaries, but ERASE is only at flash-block-size block alignments and sizes. + * To account for this, the following restrictions are in place: + * + * - Reads are on a 512-byte block boundary and size + * - Writes and Erases are aligned and sized on flash-block-size bytes. + * + * In order to support the fdt_slicer we present a type attribute of + * NAND::device. + */
svn commit: r344686 - head/sys/modules/fdt/fdt_slicer
Author: ian Date: Fri Mar 1 04:17:43 2019 New Revision: 344686 URL: https://svnweb.freebsd.org/changeset/base/344686 Log: Add another required header file. For some reason this seems to be required on aarch64, but I can build armv7 from clean without needing this in the list. (The file does get included, so the mystery is why armv7 works.) Modified: head/sys/modules/fdt/fdt_slicer/Makefile Modified: head/sys/modules/fdt/fdt_slicer/Makefile == --- head/sys/modules/fdt/fdt_slicer/MakefileFri Mar 1 03:09:43 2019 (r344685) +++ head/sys/modules/fdt/fdt_slicer/MakefileFri Mar 1 04:17:43 2019 (r344686) @@ -7,6 +7,7 @@ SRCS= fdt_slicer.c # Generated files... SRCS+= \ + bus_if.h \ device_if.h \ ofw_bus_if.h \ opt_platform.h \ ___ 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: r344487 - in head/sys: conf gnu/gcov
On Thu, Feb 28, 2019 at 6:40 PM Matthew Macy wrote: > > to config add: > options LINDEBUGFS > options GCOV > > compile kernel with gcc (otherwise it will be a no-op) > > sysctl debug.gcov.enable=1 > > mount -t debugfs debugfs /sys/kernel/debug > > (or wherever) and the output artifacts will appear under gcov/ build path> - you need to be root to see the artifacts > > gcov can then generate the results as it would normally from the > profiling and the build time artifacts > > bug reports welcome > > > -M Here's a bug report: I rebuilt the kernel but boot fails with this error. Do I need to rebuild world too? Mounting local filesystems:kldload: fdescfs.ko: lost base for reltab linker_load_file: /boot/kernel/fdescfs.ko - unsupported file type mount: fdescfs: Operation not supported by device Mounting /etc/fstab filesystems failed, will retry after root mount hold release kldload: fdescfs.ko: lost base for reltab linker_load_file: /boot/kernel/fdescfs.ko - unsupported file type mount: fdescfs: Operation not supported by device . Mounting /etc/fstab filesystems failed, startup aborted ___ 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: r344685 - head/sys/modules/fdt/fdt_slicer
Author: ian Date: Fri Mar 1 03:09:43 2019 New Revision: 344685 URL: https://svnweb.freebsd.org/changeset/base/344685 Log: Add required header file to SRCS. Modified: head/sys/modules/fdt/fdt_slicer/Makefile Modified: head/sys/modules/fdt/fdt_slicer/Makefile == --- head/sys/modules/fdt/fdt_slicer/MakefileFri Mar 1 02:53:54 2019 (r344684) +++ head/sys/modules/fdt/fdt_slicer/MakefileFri Mar 1 03:09:43 2019 (r344685) @@ -7,6 +7,7 @@ SRCS= fdt_slicer.c # Generated files... SRCS+= \ + device_if.h \ ofw_bus_if.h \ opt_platform.h \ ___ 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: r344684 - head/sys/modules
Author: ian Date: Fri Mar 1 02:53:54 2019 New Revision: 344684 URL: https://svnweb.freebsd.org/changeset/base/344684 Log: Undo accidental part of r344681. I think I must have accidentally mouse-click pasted while scrolling and didn't notice it. Reported by: jhibbits@ Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Fri Mar 1 02:49:47 2019(r344683) +++ head/sys/modules/Makefile Fri Mar 1 02:53:54 2019(r344684) @@ -542,7 +542,7 @@ SUBDIR+=zfs .if (${MACHINE_CPUARCH} == "mips" && ${MACHINE_ARCH:Mmips64} == "") _hwpmc_mips24k=hwpmc_mips24k -_hwpmc_mips74k=hwpmc_mips74kwheel +_hwpmc_mips74k=hwpmc_mips74k .endif .if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "arm" && \ ___ 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: r344683 - in head/sys: conf powerpc/powernv
Author: jhibbits Date: Fri Mar 1 02:49:47 2019 New Revision: 344683 URL: https://svnweb.freebsd.org/changeset/base/344683 Log: powerpc/powernv: Add asynchronous token management for powernv The OPAL firmware only supports a finite number of in-flight asynchronous operations. Rather than have each subsystem try to manage its own, use a central management service to hand out tokens. More work can be done to improve asynchronous behavior, such as funneling things through a future OPAL heartbeat handler, but capabilities will be added as needed. Augment the existing consumers (i2c and sensors) to use this new API. MFC after:4 weeks Added: head/sys/powerpc/powernv/opal_async.c (contents, props changed) Modified: head/sys/conf/files.powerpc head/sys/powerpc/powernv/opal.h head/sys/powerpc/powernv/opal_dev.c head/sys/powerpc/powernv/opal_i2c.c head/sys/powerpc/powernv/opal_sensor.c Modified: head/sys/conf/files.powerpc == --- head/sys/conf/files.powerpc Fri Mar 1 02:43:30 2019(r344682) +++ head/sys/conf/files.powerpc Fri Mar 1 02:49:47 2019(r344683) @@ -189,6 +189,7 @@ powerpc/powermac/uninorth.c optionalpowermac powerpc/powermac/uninorthpci.c optionalpowermac pci powerpc/powermac/vcoregpio.c optionalpowermac powerpc/powernv/opal.c optionalpowernv +powerpc/powernv/opal_async.c optionalpowernv powerpc/powernv/opal_console.c optionalpowernv powerpc/powernv/opal_dev.c optionalpowernv powerpc/powernv/opal_i2c.c optionaliicbus fdt powernv Modified: head/sys/powerpc/powernv/opal.h == --- head/sys/powerpc/powernv/opal.h Fri Mar 1 02:43:30 2019 (r344682) +++ head/sys/powerpc/powernv/opal.h Fri Mar 1 02:49:47 2019 (r344683) @@ -168,4 +168,9 @@ struct opal_ipmi_msg { uint8_t data[]; }; +intopal_init_async_tokens(int); +intopal_alloc_async_token(void); +void opal_free_async_token(int); +intopal_wait_completion(void *, uint64_t, uint64_t); + #endif Added: head/sys/powerpc/powernv/opal_async.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/powernv/opal_async.c Fri Mar 1 02:49:47 2019 (r344683) @@ -0,0 +1,94 @@ +/*- + * Copyright (C) 2019 Justin Hibbits + * + * 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 TOOLS GMBH 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$ + */ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include "opal.h" + +/* + * Manage asynchronous tokens for the OPAL abstraction layer. + * + * Only a finite number of in-flight tokens are supported by OPAL, so we must be + * careful managing this. The basic design uses the vmem subsystem as a general + * purpose allocator, with wrappers to manage expected behaviors and + * requirements. + */ +static vmem_t *async_token_pool; + +/* Setup the token pool. */ +int +opal_init_async_tokens(int count) +{ + /* Only allow one initialization */ + if (async_token_pool != NULL) + return (EINVAL); + + async_token_pool = vmem_create("OPAL Async", 0, count, 1, 1, + M_WAITOK | M_FIRSTFIT); + + return (0); +} + +int +opal_alloc_async_token(void) +{ + vmem_addr_t token; + + vmem_alloc(async_token_pool, 1, M_FIRSTFIT | M_WAITOK, ); + + return (token); +} + +void +opal_free_async_token(int token) +{ + + vmem_free(async_token_pool, token, 1); +} + +/* + * Wait for the operation watched by the token to complete.
svn commit: r344682 - head/sys/dev/cxgbe
Author: np Date: Fri Mar 1 02:43:30 2019 New Revision: 344682 URL: https://svnweb.freebsd.org/changeset/base/344682 Log: cxgbe(4): Don't forget to report link state to the kernel if the link is already up at attach. Reported by: Fabrice Bruel @ Orange Business Service MFC after:1 week Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c == --- head/sys/dev/cxgbe/t4_main.cFri Mar 1 02:31:43 2019 (r344681) +++ head/sys/dev/cxgbe/t4_main.cFri Mar 1 02:43:30 2019 (r344682) @@ -5074,6 +5074,8 @@ cxgbe_init_synchronized(struct vi_info *vi) callout_reset(>tick, hz, vi_tick, vi); else callout_reset(>tick, hz, cxgbe_tick, pi); + if (pi->link_cfg.link_ok) + t4_os_link_changed(pi); PORT_UNLOCK(pi); done: if (rc != 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: r344681 - head/sys/modules
Author: ian Date: Fri Mar 1 02:31:43 2019 New Revision: 344681 URL: https://svnweb.freebsd.org/changeset/base/344681 Log: Build fdt support modules on systems that use fdt data. kern.opts.mk sets make var OPT_FDT to a non-empty value if platform.h contains OPT_FDT. Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Fri Mar 1 02:16:37 2019(r344680) +++ head/sys/modules/Makefile Fri Mar 1 02:31:43 2019(r344681) @@ -474,6 +474,10 @@ SUBDIR+= iscsi SUBDIR+= iscsi_initiator .endif +.if !empty(OPT_FDT) +SUBDIR+= fdt +.endif + .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ ${MACHINE_CPUARCH} == "i386" SUBDIR+= linprocfs @@ -538,7 +542,7 @@ SUBDIR+=zfs .if (${MACHINE_CPUARCH} == "mips" && ${MACHINE_ARCH:Mmips64} == "") _hwpmc_mips24k=hwpmc_mips24k -_hwpmc_mips74k=hwpmc_mips74k +_hwpmc_mips74k=hwpmc_mips74kwheel .endif .if ${MACHINE_CPUARCH} != "aarch64" && ${MACHINE_CPUARCH} != "arm" && \ ___ 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: r344487 - in head/sys: conf gnu/gcov
> On Feb 28, 2019, at 5:39 PM, Matthew Macy wrote: > > to config add: > options LINDEBUGFS > options GCOV > > compile kernel with gcc (otherwise it will be a no-op) > > sysctl debug.gcov.enable=1 > > mount -t debugfs debugfs /sys/kernel/debug > > (or wherever) and the output artifacts will appear under gcov/ build path> - you need to be root to see the artifacts > > gcov can then generate the results as it would normally from the > profiling and the build time artifacts > > bug reports welcome Shouldn’t this be documented on the wiki? Thanks! -Enji ___ 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: r344679 - head/sys/modules/geom/geom_flashmap
Author: jhibbits Date: Fri Mar 1 02:08:12 2019 New Revision: 344679 URL: https://svnweb.freebsd.org/changeset/base/344679 Log: Revert r344675 It's an incorrect approach to solve the problem. We already have a fdt/fdt_slicer module, it just needs to be wired into the build. Modified: head/sys/modules/geom/geom_flashmap/Makefile Modified: head/sys/modules/geom/geom_flashmap/Makefile == --- head/sys/modules/geom/geom_flashmap/MakefileFri Mar 1 01:57:22 2019(r344678) +++ head/sys/modules/geom/geom_flashmap/MakefileFri Mar 1 02:08:12 2019(r344679) @@ -5,9 +5,4 @@ KMOD= geom_flashmap SRCS= geom_flashmap.c -.if !empty(OPT_FDT) -.PATH: ${SRCTOP}/sys/dev/fdt -SRCS+= fdt_slicer.c -.endif - .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"
svn commit: r344678 - head/sys/dev/cxgb
Author: cem Date: Fri Mar 1 01:57:22 2019 New Revision: 344678 URL: https://svnweb.freebsd.org/changeset/base/344678 Log: cxgb(4): Netdump: only reference allocated qsets SGE_QSETS is an upper bound -- fewer qsets may be allocated depending on the number of CPUs. Reviewed by: markj, np, vangyzen X-MFC-With: r333288 Sponsored by: Dell EMC Isilon Differential Revision:https://reviews.freebsd.org/D17274 Modified: head/sys/dev/cxgb/cxgb_adapter.h head/sys/dev/cxgb/cxgb_main.c Modified: head/sys/dev/cxgb/cxgb_adapter.h == --- head/sys/dev/cxgb/cxgb_adapter.hFri Mar 1 01:20:21 2019 (r344677) +++ head/sys/dev/cxgb/cxgb_adapter.hFri Mar 1 01:57:22 2019 (r344678) @@ -363,6 +363,7 @@ struct adapter { unsigned int slow_intr_mask; unsigned long irq_stats[IRQ_NUM_STATS]; + unsignednqsets; struct sge sge; struct mc7 pmrx; struct mc7 pmtx; Modified: head/sys/dev/cxgb/cxgb_main.c == --- head/sys/dev/cxgb/cxgb_main.c Fri Mar 1 01:20:21 2019 (r344677) +++ head/sys/dev/cxgb/cxgb_main.c Fri Mar 1 01:57:22 2019 (r344678) @@ -853,6 +853,8 @@ setup_sge_qsets(adapter_t *sc) } } + sc->nqsets = qset_idx; + return (0); } @@ -3598,7 +3600,7 @@ cxgb_netdump_init(struct ifnet *ifp, int *nrxr, int *n pi = if_getsoftc(ifp); adap = pi->adapter; ADAPTER_LOCK(adap); - *nrxr = SGE_QSETS; + *nrxr = adap->nqsets; *ncl = adap->sge.qs[0].fl[1].size; *clsize = adap->sge.qs[0].fl[1].buf_size; ADAPTER_UNLOCK(adap); @@ -3613,7 +3615,7 @@ cxgb_netdump_event(struct ifnet *ifp, enum netdump_ev pi = if_getsoftc(ifp); if (event == NETDUMP_START) - for (i = 0; i < SGE_QSETS; i++) { + for (i = 0; i < pi->adapter->nqsets; i++) { qs = >adapter->sge.qs[i]; /* Need to reinit after netdump_mbuf_dump(). */ @@ -3650,7 +3652,7 @@ cxgb_netdump_poll(struct ifnet *ifp, int count) return (ENOENT); adap = pi->adapter; - for (i = 0; i < SGE_QSETS; i++) + for (i = 0; i < adap->nqsets; i++) (void)cxgb_netdump_poll_rx(adap, >sge.qs[i]); (void)cxgb_netdump_poll_tx(>sge.qs[pi->first_qset]); 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"
Re: svn commit: r344487 - in head/sys: conf gnu/gcov
to config add: options LINDEBUGFS options GCOV compile kernel with gcc (otherwise it will be a no-op) sysctl debug.gcov.enable=1 mount -t debugfs debugfs /sys/kernel/debug (or wherever) and the output artifacts will appear under gcov/ - you need to be root to see the artifacts gcov can then generate the results as it would normally from the profiling and the build time artifacts bug reports welcome -M On Thu, Feb 28, 2019 at 2:50 PM Alan Somers wrote: > > On Sat, Feb 23, 2019 at 2:14 PM Matt Macy wrote: > > > > Author: mmacy > > Date: Sat Feb 23 21:14:00 2019 > > New Revision: 344487 > > URL: https://svnweb.freebsd.org/changeset/base/344487 > > > > Log: > > gcov support > > > > add gcov support and export results as files in debugfs > > > > Reviewed by: hps@ > > MFC after:1 week > > Sponsored by: iX Systems > > Differential Revision:https://reviews.freebsd.org/D19260 > > > > Added: > > head/sys/gnu/gcov/ > > head/sys/gnu/gcov/gcc_4_7.c (contents, props changed) > > head/sys/gnu/gcov/gcov.h (contents, props changed) > > head/sys/gnu/gcov/gcov_fs.c (contents, props changed) > > head/sys/gnu/gcov/gcov_subr.c (contents, props changed) > > Modified: > > head/sys/conf/files > > head/sys/conf/kern.mk > > head/sys/conf/kern.post.mk > > head/sys/conf/kern.pre.mk > > head/sys/conf/kmod.mk > > head/sys/conf/options > > On a more practical note, how does one use this new feature? It looks > like it could be quite useful. > -Alan ___ 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: r344677 - head/usr.bin/patch
Author: kevans Date: Fri Mar 1 01:20:21 2019 New Revision: 344677 URL: https://svnweb.freebsd.org/changeset/base/344677 Log: patch(1): Exit successfully if we're fed a 0-length patch This change is made in the name of GNU patch compatibility. If GNU patch is fed a zero-length patch, it will exit successfully with no output. This is used in at least one port to date (comms/wsjtx), and we break on this usage. It seems unlikely that anyone relies on patch(1) calling their completely empty patch garbage and failing, and GNU compatibility is a plus if it helps with porting, so make the switch. Reported by: db MFC after:2 weeks Modified: head/usr.bin/patch/common.h head/usr.bin/patch/patch.c head/usr.bin/patch/pch.c Modified: head/usr.bin/patch/common.h == --- head/usr.bin/patch/common.h Fri Mar 1 01:18:39 2019(r344676) +++ head/usr.bin/patch/common.h Fri Mar 1 01:20:21 2019(r344677) @@ -64,6 +64,7 @@ extern size_t buf_size; /* size of general purpose buf extern boolusing_plan_a; /* try to keep everything in memory */ extern boolout_of_mem; /* ran out of memory in plan a */ +extern boolnonempty_patchf_seen; /* seen a non-zero-length patch file? */ #defineMAXFILEC 2 Modified: head/usr.bin/patch/patch.c == --- head/usr.bin/patch/patch.c Fri Mar 1 01:18:39 2019(r344676) +++ head/usr.bin/patch/patch.c Fri Mar 1 01:20:21 2019(r344677) @@ -53,6 +53,7 @@ size_tbuf_size; /* size of the general purpose buff bool using_plan_a = true;/* try to keep everything in memory */ bool out_of_mem = false; /* ran out of memory in plan a */ +bool nonempty_patchf_seen = false; /* seen nonempty patch file? */ #define MAXFILEC 2 @@ -419,7 +420,7 @@ main(int argc, char *argv[]) set_signals(1); } - if (!patch_seen) + if (!patch_seen && nonempty_patchf_seen) error = 2; my_exit(error); Modified: head/usr.bin/patch/pch.c == --- head/usr.bin/patch/pch.cFri Mar 1 01:18:39 2019(r344676) +++ head/usr.bin/patch/pch.cFri Mar 1 01:20:21 2019(r344677) @@ -179,6 +179,9 @@ there_is_another_patch(void) say("done\n"); return false; } + if (p_filesize == 0) + return false; + nonempty_patchf_seen = true; if (verbose) say("Hmm..."); diff_type = intuit_diff_type(); ___ 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: r344676 - head/sys/kern
Author: mw Date: Fri Mar 1 01:18:39 2019 New Revision: 344676 URL: https://svnweb.freebsd.org/changeset/base/344676 Log: Prevent detaching driver if the attach is not finished When the device is in attaching state, detach should return EBUSY instead of success. In other case, there could be race between attach and detach during the driver unloading. If driver goes sleep and releases GIANT lock during attaching, unloading module could start. In such case when attach continues after module unload, page fault "supervisor read instruction, page not present" occurred. This patch works around the real issue, which is a locking deficiency of the busses. Submitted by: Rafal Kozik Reviewed by: imp Obtained from: Semihalf MFC after: 2 weeks Sponsored by: Amazon, Inc. Differential Revision: https://reviews.freebsd.org/D19375 Modified: head/sys/kern/subr_bus.c Modified: head/sys/kern/subr_bus.c == --- head/sys/kern/subr_bus.cThu Feb 28 23:00:47 2019(r344675) +++ head/sys/kern/subr_bus.cFri Mar 1 01:18:39 2019(r344676) @@ -3004,6 +3004,10 @@ device_detach(device_t dev) PDEBUG(("%s", DEVICENAME(dev))); if (dev->state == DS_BUSY) return (EBUSY); + if (dev->state == DS_ATTACHING) { + device_printf(dev, "device in attaching state! Deferring detach.\n"); + return (EBUSY); + } if (dev->state != DS_ATTACHED) 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: r344675 - head/sys/modules/geom/geom_flashmap
Author: jhibbits Date: Thu Feb 28 23:00:47 2019 New Revision: 344675 URL: https://svnweb.freebsd.org/changeset/base/344675 Log: GEOM: Add fdt_slicer to the GEOM flashmap module for fdt-based platforms geom_flashmap depends on a slicer being available in order to do any work. On fdt platforms this is provided by fdt_slicer, but this needs to be available. Often it's compiled into the kernel for platforms that boot from the relevant media, but this is not always the case. Add the file to the geom_flashmap module so that it can be used on platforms which don't always need this functionality available. Modified: head/sys/modules/geom/geom_flashmap/Makefile Modified: head/sys/modules/geom/geom_flashmap/Makefile == --- head/sys/modules/geom/geom_flashmap/MakefileThu Feb 28 22:57:09 2019(r344674) +++ head/sys/modules/geom/geom_flashmap/MakefileThu Feb 28 23:00:47 2019(r344675) @@ -5,4 +5,9 @@ KMOD= geom_flashmap SRCS= geom_flashmap.c +.if !empty(OPT_FDT) +.PATH: ${SRCTOP}/sys/dev/fdt +SRCS+= fdt_slicer.c +.endif + .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: r344487 - in head/sys: conf gnu/gcov
On Sat, Feb 23, 2019 at 2:14 PM Matt Macy wrote: > > Author: mmacy > Date: Sat Feb 23 21:14:00 2019 > New Revision: 344487 > URL: https://svnweb.freebsd.org/changeset/base/344487 > > Log: > gcov support > > add gcov support and export results as files in debugfs > > Reviewed by: hps@ > MFC after:1 week > Sponsored by: iX Systems > Differential Revision:https://reviews.freebsd.org/D19260 > > Added: > head/sys/gnu/gcov/ > head/sys/gnu/gcov/gcc_4_7.c (contents, props changed) > head/sys/gnu/gcov/gcov.h (contents, props changed) > head/sys/gnu/gcov/gcov_fs.c (contents, props changed) > head/sys/gnu/gcov/gcov_subr.c (contents, props changed) > Modified: > head/sys/conf/files > head/sys/conf/kern.mk > head/sys/conf/kern.post.mk > head/sys/conf/kern.pre.mk > head/sys/conf/kmod.mk > head/sys/conf/options On a more practical note, how does one use this new feature? It looks like it could be quite useful. -Alan ___ 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: r344671 - head/sys/dev/cxgbe
Author: jhb Date: Thu Feb 28 22:10:19 2019 New Revision: 344671 URL: https://svnweb.freebsd.org/changeset/base/344671 Log: Don't assume all children of a nexus are ports. Specifically, ccr(4) devices are also children of cxgbe nexus devices. Rather than making assumptions about the child device's softc, walk the list of ports from the nexus' softc to determine if a child is a port in t4_child_location_str(). This fixes a panic when detaching a ccr device. Reviewed by: np MFC after:1 week Sponsored by: Chelsio Communications Differential Revision:https://reviews.freebsd.org/D19399 Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c == --- head/sys/dev/cxgbe/t4_main.cThu Feb 28 22:00:36 2019 (r344670) +++ head/sys/dev/cxgbe/t4_main.cThu Feb 28 22:10:19 2019 (r344671) @@ -1372,10 +1372,19 @@ done: static int t4_child_location_str(device_t bus, device_t dev, char *buf, size_t buflen) { + struct adapter *sc; struct port_info *pi; + int i; - pi = device_get_softc(dev); - snprintf(buf, buflen, "port=%d", pi->port_id); + sc = device_get_softc(bus); + buf[0] = '\0'; + for_each_port(sc, i) { + pi = sc->port[i]; + if (pi != NULL && pi->dev == dev) { + snprintf(buf, buflen, "port=%d", pi->port_id); + break; + } + } 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: r344670 - head/sys/kern
Author: markj Date: Thu Feb 28 22:00:36 2019 New Revision: 344670 URL: https://svnweb.freebsd.org/changeset/base/344670 Log: Allow FIONBIO and FIOASYNC ioctls on POSIX shm descriptors. They have no effect, as with filesystem file descriptors. This improves compatibility with some existing userspace code. Submitted by: Greg V Reviewed by: kib MFC after:1 week Differential Revision:https://reviews.freebsd.org/D19330 Modified: head/sys/kern/uipc_shm.c Modified: head/sys/kern/uipc_shm.c == --- head/sys/kern/uipc_shm.cThu Feb 28 21:07:16 2019(r344669) +++ head/sys/kern/uipc_shm.cThu Feb 28 22:00:36 2019(r344670) @@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -126,6 +127,7 @@ static int shm_remove(char *path, Fnv32_t fnv, struct static fo_rdwr_t shm_read; static fo_rdwr_t shm_write; static fo_truncate_t shm_truncate; +static fo_ioctl_t shm_ioctl; static fo_stat_t shm_stat; static fo_close_t shm_close; static fo_chmod_t shm_chmod; @@ -139,7 +141,7 @@ struct fileops shm_ops = { .fo_read = shm_read, .fo_write = shm_write, .fo_truncate = shm_truncate, - .fo_ioctl = invfo_ioctl, + .fo_ioctl = shm_ioctl, .fo_poll = invfo_poll, .fo_kqfilter = invfo_kqfilter, .fo_stat = shm_stat, @@ -361,6 +363,24 @@ shm_truncate(struct file *fp, off_t length, struct ucr return (error); #endif return (shm_dotruncate(shmfd, length)); +} + +int +shm_ioctl(struct file *fp, u_long com, void *data, struct ucred *active_cred, +struct thread *td) +{ + + switch (com) { + case FIONBIO: + case FIOASYNC: + /* +* Allow fcntl(fd, F_SETFL, O_NONBLOCK) to work, +* just like it would on an unlinked regular file +*/ + return (0); + default: + return (ENOTTY); + } } static int ___ 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: r344666 - head/tools/build/mk
> On Feb 28, 2019, at 1:47 PM, Kyle Evans wrote: > > On Thu, Feb 28, 2019 at 3:44 PM Enji Cooper wrote: >> >> >>> On Feb 28, 2019, at 12:48 PM, Bryan Drewery wrote: >>> >>> Author: bdrewery >>> Date: Thu Feb 28 20:48:18 2019 >>> New Revision: 344666 >>> URL: https://svnweb.freebsd.org/changeset/base/344666 >>> >>> Log: >>> bsd.nls.mk isn't optional. >>> >>> It is protected by MK_NLS. If it should really be optional then ^^ To paraphrase Faith No More’s - Epic: “what is ‘It’?" ^^^ > If we actually conditionally installed it, sure- it was only removed > because of r335011, so it would go through an install/remove dance > between installworld and delete-old on WITHOUT_NLS systems. Oh… you’re right. The commit message mislead me to think that it was conditionally installed, but it’s actually always installed. > If we're going to make it conditional on MK_NLS, it needs to actually > be conditional on MK_NLS the proper way along with an > s/.include/.sinclude/. This is what I was implying ;)… Cheers, -Enji ___ 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: r344666 - head/tools/build/mk
On Thu, Feb 28, 2019 at 3:44 PM Enji Cooper wrote: > > > > On Feb 28, 2019, at 12:48 PM, Bryan Drewery wrote: > > > > Author: bdrewery > > Date: Thu Feb 28 20:48:18 2019 > > New Revision: 344666 > > URL: https://svnweb.freebsd.org/changeset/base/344666 > > > > Log: > > bsd.nls.mk isn't optional. > > > > It is protected by MK_NLS. If it should really be optional then > > it needs to be documented as such in share/mk/bsd.README and > > .sinclude used where needed. > > > > This fixes a regression from r335011. > > > > PR: 232527 > > Submitted by:jar...@downtools.com.au > > Reported by: ktulla...@gmail.com > > MFC after: 3 days > > Should bsd.{lib,prog}.mk instead be taught to ignore errors when > including this file? > Thanks! > -Enji If we actually conditionally installed it, sure- it was only removed because of r335011, so it would go through an install/remove dance between installworld and delete-old on WITHOUT_NLS systems. If we're going to make it conditional on MK_NLS, it needs to actually be conditional on MK_NLS the proper way along with an s/.include/.sinclude/. ___ 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: r344666 - head/tools/build/mk
> On Feb 28, 2019, at 12:48 PM, Bryan Drewery wrote: > > Author: bdrewery > Date: Thu Feb 28 20:48:18 2019 > New Revision: 344666 > URL: https://svnweb.freebsd.org/changeset/base/344666 > > Log: > bsd.nls.mk isn't optional. > > It is protected by MK_NLS. If it should really be optional then > it needs to be documented as such in share/mk/bsd.README and > .sinclude used where needed. > > This fixes a regression from r335011. > > PR: 232527 > Submitted by:jar...@downtools.com.au > Reported by: ktulla...@gmail.com > MFC after: 3 days Should bsd.{lib,prog}.mk instead be taught to ignore errors when including this file? Thanks! -Enji ___ 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: r344669 - head/sys/dev/isp
Author: mav Date: Thu Feb 28 21:07:16 2019 New Revision: 344669 URL: https://svnweb.freebsd.org/changeset/base/344669 Log: Limit 24xx adapters to only MSI interrupts by default. This was actually the known good configuration we used before. Single MSI-X configuration doesn't even work there on my tests, just due to lack of documentation not sure whether by design or I am doing something wrong. PR: 233654 MFC after:1 week Modified: head/sys/dev/isp/isp_pci.c Modified: head/sys/dev/isp/isp_pci.c == --- head/sys/dev/isp/isp_pci.c Thu Feb 28 20:57:41 2019(r344668) +++ head/sys/dev/isp/isp_pci.c Thu Feb 28 21:07:16 2019(r344669) @@ -1910,7 +1910,7 @@ isp_pci_irqsetup(ispsoftc_t *isp) ISP_UNLOCK(isp); if (ISP_CAP_MSIX(isp)) { - max_irq = IS_26XX(isp) ? 3 : (IS_25XX(isp) ? 2 : 1); + max_irq = IS_26XX(isp) ? 3 : (IS_25XX(isp) ? 2 : 0); resource_int_value(device_get_name(dev), device_get_unit(dev), "msix", _irq); max_irq = imin(ISP_MAX_IRQS, max_irq); ___ 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: r344666 - head/tools/build/mk
Author: bdrewery Date: Thu Feb 28 20:48:18 2019 New Revision: 344666 URL: https://svnweb.freebsd.org/changeset/base/344666 Log: bsd.nls.mk isn't optional. It is protected by MK_NLS. If it should really be optional then it needs to be documented as such in share/mk/bsd.README and .sinclude used where needed. This fixes a regression from r335011. PR: 232527 Submitted by: jar...@downtools.com.au Reported by: ktulla...@gmail.com MFC after:3 days Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc == --- head/tools/build/mk/OptionalObsoleteFiles.inc Thu Feb 28 20:43:03 2019(r344665) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Thu Feb 28 20:48:18 2019(r344666) @@ -6603,7 +6603,6 @@ OLD_DIRS+=var/yp .if ${MK_NLS} == no OLD_DIRS+=usr/share/nls/ OLD_DIRS+=usr/share/nls/C -OLD_FILES+=usr/share/mk/bsd.nls.mk OLD_FILES+=usr/share/nls/C/ee.cat OLD_DIRS+=usr/share/nls/af_ZA.ISO8859-1 OLD_DIRS+=usr/share/nls/af_ZA.ISO8859-15 ___ 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: r344665 - head/sbin/ipfw
Author: trhodes (doc committer) Date: Thu Feb 28 20:43:03 2019 New Revision: 344665 URL: https://svnweb.freebsd.org/changeset/base/344665 Log: Grammar tweaks in ipfw manual page. Modified: head/sbin/ipfw/ipfw.8 Modified: head/sbin/ipfw/ipfw.8 == --- head/sbin/ipfw/ipfw.8 Thu Feb 28 19:27:54 2019(r344664) +++ head/sbin/ipfw/ipfw.8 Thu Feb 28 20:43:03 2019(r344665) @@ -233,7 +233,7 @@ or .Cm limit rule, and are typically used to open the firewall on-demand to legitimate traffic only. -Please, note, that +Please note, that .Cm keep-state amd .Cm limit @@ -684,8 +684,8 @@ is set to 0 (default), one can use attached to the .Li ipfw0 pseudo interface. -This pseudo interface can be created after a boot -manually by using the following command: +This pseudo interface can be created manually after a system +boot by using the following command: .Bd -literal -offset indent # ifconfig ipfw0 create .Ed @@ -698,7 +698,7 @@ file: firewall_logif="YES" .Ed .Pp -There is no overhead if no +There is zero overhead when no .Xr bpf 4 is attached to the pseudo interface. .Pp ___ 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: r344663 - head/sys/i386/i386
Author: kib Date: Thu Feb 28 19:19:02 2019 New Revision: 344663 URL: https://svnweb.freebsd.org/changeset/base/344663 Log: Invalidate cache for the PDPTE page when using PAE paging but PAT is not supported. According to SDM rev. 69 vol. 3, for PDPTE registers loads: - when PAT is not supported, access to the PDPTE page is performed as UC, see 4.9.1; - when PAT is supported, the access is WB, see 4.9.2. So potentially CPU might load stale memory as PDPTEs if both PAT and self-snoop are not implemented. To be safe, add total local cache flush to pmap_cold() before initial load of cr3, and flush PDPTE page in pmap_pinit(), if PAT is not implemented. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after:2 weeks Differential revision:https://reviews.freebsd.org/D19365 Modified: head/sys/i386/i386/pmap.c Modified: head/sys/i386/i386/pmap.c == --- head/sys/i386/i386/pmap.c Thu Feb 28 18:12:14 2019(r344662) +++ head/sys/i386/i386/pmap.c Thu Feb 28 19:19:02 2019(r344663) @@ -564,6 +564,8 @@ __CONCAT(PMTYPE, cold)(void) /* Now enable paging */ #ifdef PMAP_PAE_COMP cr3 = (u_int)IdlePDPT; + if ((cpu_feature & CPUID_PAT) == 0) + wbinvd(); #else cr3 = (u_int)IdlePTD; #endif @@ -2040,6 +2042,14 @@ __CONCAT(PMTYPE, pinit)(pmap_t pmap) } pmap_qenter((vm_offset_t)pmap->pm_pdir, pmap->pm_ptdpg, NPGPTD); +#ifdef PMAP_PAE_COMP + if ((cpu_feature & CPUID_PAT) == 0) { + pmap_invalidate_cache_range( + trunc_page((vm_offset_t)pmap->pm_pdpt), + round_page((vm_offset_t)pmap->pm_pdpt + + NPGPTD * sizeof(pdpt_entry_t))); + } +#endif for (i = 0; i < NPGPTD; i++) if ((pmap->pm_ptdpg[i]->flags & PG_ZERO) == 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: r344662 - in head: share/man/man4 sys/sys
Author: ngie Date: Thu Feb 28 18:12:14 2019 New Revision: 344662 URL: https://svnweb.freebsd.org/changeset/base/344662 Log: Remove references to pdwait4(2) and `CAP_PDWAIT` from rights(4) @cem removed references to pdwait4(2) (a nonexistent syscall) in r320058. This change removes references to pdwait4(2) and `CAP_PDWAIT` in rights(4) to not mislead the user into thinking that pdwait4(2)/`CAP_PDWAIT` is actually implemented in the stock FreeBSD kernel. The goal of this functionality was to simplify monitoring/manipulating processes started with `pdfork`, et al, and avoid races with waiting on pids. The syscall was never completed though--just discussed on the capsicum mailing list back in 2015: https://lists.cam.ac.uk/pipermail/cl-capsicum-discuss/2015-May/msg00012.html . That being said, there are members of the project (@rwatson, etc) who have longterm goals to implement this syscall to better secure pdfork(2) calls. PR: 235871 Reviewed by: emaste Discussed with: rwatson Approved by: emaste (mentor) MFC after:1 week Differential Revision: https://reviews.freebsd.org/D18950 Modified: head/share/man/man4/rights.4 head/sys/sys/capsicum.h Modified: head/share/man/man4/rights.4 == --- head/share/man/man4/rights.4Thu Feb 28 15:36:03 2019 (r344661) +++ head/share/man/man4/rights.4Thu Feb 28 18:12:14 2019 (r344662) @@ -32,7 +32,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 30, 2018 +.Dd February 28, 2019 .Dt RIGHTS 4 .Os .Sh NAME @@ -467,9 +467,6 @@ Permit .It Dv CAP_PDKILL Permit .Xr pdkill 2 . -.It Dv CAP_PDWAIT -Permit -.Xr pdwait4 2 . .It Dv CAP_PEELOFF Permit .Xr sctp_peeloff 2 . Modified: head/sys/sys/capsicum.h == --- head/sys/sys/capsicum.h Thu Feb 28 15:36:03 2019(r344661) +++ head/sys/sys/capsicum.h Thu Feb 28 18:12:14 2019(r344662) @@ -246,7 +246,12 @@ /* Process management via process descriptors. */ /* Allows for pdgetpid(2). */ #defineCAP_PDGETPIDCAPRIGHT(1, 0x0200ULL) -/* Allows for pdwait4(2). */ +/* + * Allows for pdwait4(2). + * + * XXX: this constant was imported unused, but is targeted to be implemented + * in the future (bug 235871). + */ #defineCAP_PDWAIT CAPRIGHT(1, 0x0400ULL) /* Allows for pdkill(2). */ #defineCAP_PDKILL CAPRIGHT(1, 0x0800ULL) ___ 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"
Foundation staff ... do not need to include the "All rights reserved."
> On Tue, 26 Feb 2019 at 13:03, Rodney W. Grimes > wrote: > > > > I thought the foundation updated all its templates and contracts > > such that the All rights reserved was no longer needed? > > Foundation contract templates etc. have been updated to remove the > "All rights reserved." text, but it may still exist in existing > contracts. > > In any case I'll be explicit: Foundation staff, contractors, and grant > recipients do not need to include the "All rights reserved." statement > in new files they create. > Thank you for clarity on that. I have re-subjected my reply to make this more visible rather than looking like a reply to a commit. -- Rod Grimes rgri...@freebsd.org ___ 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: r344661 - head/sys/dev/isp
Author: mav Date: Thu Feb 28 15:36:03 2019 New Revision: 344661 URL: https://svnweb.freebsd.org/changeset/base/344661 Log: Limit 24xx adapters to only one MSI-X interrupt by default. These are 4Gb/s and pretty old and slow now, so I see no reason to fight for their performance over stability. PR: 233654 MFC after:1 week Sponsored by: iXsystems, Inc. Modified: head/sys/dev/isp/isp_pci.c Modified: head/sys/dev/isp/isp_pci.c == --- head/sys/dev/isp/isp_pci.c Thu Feb 28 15:24:00 2019(r344660) +++ head/sys/dev/isp/isp_pci.c Thu Feb 28 15:36:03 2019(r344661) @@ -1910,7 +1910,7 @@ isp_pci_irqsetup(ispsoftc_t *isp) ISP_UNLOCK(isp); if (ISP_CAP_MSIX(isp)) { - max_irq = IS_26XX(isp) ? 3 : 2; + max_irq = IS_26XX(isp) ? 3 : (IS_25XX(isp) ? 2 : 1); resource_int_value(device_get_name(dev), device_get_unit(dev), "msix", _irq); max_irq = imin(ISP_MAX_IRQS, max_irq); ___ 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: r344660 - in head: share/man/man4 sys/dev/isp
Author: mav Date: Thu Feb 28 15:24:00 2019 New Revision: 344660 URL: https://svnweb.freebsd.org/changeset/base/344660 Log: Add to isp(4) tunables to limit MSI/MSI-X usage. There are some problem reports possibly related to the new driver use of multiple interrupts on older cards. Hopefully this allow to workaround them. MFC after:1 week Sponsored by: iXsystems, Inc. Modified: head/share/man/man4/isp.4 head/sys/dev/isp/isp_pci.c Modified: head/share/man/man4/isp.4 == --- head/share/man/man4/isp.4 Thu Feb 28 14:40:43 2019(r344659) +++ head/share/man/man4/isp.4 Thu Feb 28 15:24:00 2019(r344660) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 27, 2018 +.Dd February 28, 2019 .Dt ISP 4 .Os .Sh NAME @@ -163,15 +163,19 @@ The following options are switchable by setting values .Pp They are: .Bl -tag -width indent -.It Va hint.isp.0.fwload_disable +.It Va hint.isp. Ns Ar N Ns Va .msi +Limit on number of Message Signaled Interrupts (MSI) to be used. +.It Va hint.isp. Ns Ar N Ns Va .msix +Limit on number of Extended Message Signaled Interrupts (MSI-X) to be used. +.It Va hint.isp. Ns Ar N Ns Va .fwload_disable A hint value to disable loading of firmware .Xr ispfw 4 . -.It Va hint.isp.0.ignore_nvram +.It Va hint.isp. Ns Ar N Ns Va .ignore_nvram A hint value to ignore board NVRAM settings for. Otherwise use NVRAM settings. -.It Va hint.isp.0.fullduplex +.It Va hint.isp. Ns Ar N Ns Va .fullduplex A hint value to set full duplex mode. -.It Va hint.isp.0.topology +.It Va hint.isp. Ns Ar N Ns Va .topology A hint value to select topology of connection. Supported values are: .Pp @@ -185,48 +189,48 @@ Loopback only. .It Li nport-only Point to point only. .El -.It Va hint.isp.0.portwwn +.It Va hint.isp. Ns Ar N Ns Va .portwwn This should be the full 64 bit World Wide Port Name you would like to use, overriding the value in NVRAM for the card. -.It Va hint.isp.0.nodewwn +.It Va hint.isp. Ns Ar N Ns Va .nodewwn This should be the full 64 bit World Wide Node Name you would like to use, overriding the value in NVRAM for the card. -.It Va hint.isp.0.iid +.It Va hint.isp. Ns Ar N Ns Va .iid A hint to override or set the Initiator ID or Loop ID. For Fibre Channel cards in Local Loop topologies it is .Ar strongly recommended that you set this value to non-zero. -.It Va hint.isp.0.role +.It Va hint.isp. Ns Ar N Ns Va .role A hint to define default role for isp instance (0 -- none, 1 -- target, 2 -- initiator, 3 -- both). -.It Va hint.isp.0.debug +.It Va hint.isp. Ns Ar N Ns Va .debug A hint value for a driver debug level (see the file .Pa /usr/src/sys/dev/isp/ispvar.h for the values. -.It Va hint.isp.0.vports +.It Va hint.isp. Ns Ar N Ns Va .vports A hint to create specified number of additional virtual ports. -.It Va hint.isp.0.nofctape +.It Va hint.isp. Ns Ar N Ns Va .nofctape Set this to 1 to disable FC-Tape operation on the given isp instance. -.It Va hint.isp.0.fctape +.It Va hint.isp. Ns Ar N Ns Va .fctape Set this to 1 to enable FC-Tape operation on the given isp instance for targets that support it. .El .Sh SYSCTL OPTIONS .Bl -tag -width indent -.It Va dev.isp.N.loop_down_limit +.It Va dev.isp. Ns Ar N Ns Va .loop_down_limit This value says how long to wait in seconds after loop has gone down before giving up and expiring all of the devices that were visible. The default is 300 seconds (5 minutes). A separate (nonadjustable) timeout is used when booting to not stop booting on lack of FC connectivity. -.It Va dev.isp.N.gone_device_time +.It Va dev.isp. Ns Ar N Ns Va .gone_device_time This value says how long to wait for devices to reappear if they (temporarily) disappear due to loop or fabric events. While this timeout is running, I/O to those devices will simply be held. -.It Va dev.isp.N.use_gff_id -.It Va dev.isp.N.use_gft_id +.It Va dev.isp. Ns Ar N Ns Va .use_gff_id +.It Va dev.isp. Ns Ar N Ns Va .use_gft_id Setting those options to 0 allows to disable use of GFF_ID and GFT_ID SNS requests during FC fabric scan. It may be useful if switch does not implement them correctly, @@ -234,9 +238,9 @@ preventing some devices from being found. Disabling them may cause unneeded logins to ports not supporting target role or even FCP at all. The default is 1 (enabled). -.It Va dev.isp.N.wwnn +.It Va dev.isp. Ns Ar N Ns Va .wwnn This is the readonly World Wide Node Name value for this port. -.It Va dev.isp.N.wwpn +.It Va dev.isp. Ns Ar N Ns Va .wwpn This is the readonly World Wide Port Name value for this port. .El .Sh SEE ALSO Modified: head/sys/dev/isp/isp_pci.c == --- head/sys/dev/isp/isp_pci.c Thu Feb 28 14:40:43 2019(r344659) +++ head/sys/dev/isp/isp_pci.c Thu Feb 28 15:24:00 2019(r344660) @@ -1910,14 +1910,21 @@ isp_pci_irqsetup(ispsoftc_t *isp)
Re: svn commit: r344594 - head/usr.bin/proccontrol
On Tue, 26 Feb 2019 at 13:03, Rodney W. Grimes wrote: > > I thought the foundation updated all its templates and contracts > such that the All rights reserved was no longer needed? Foundation contract templates etc. have been updated to remove the "All rights reserved." text, but it may still exist in existing contracts. In any case I'll be explicit: Foundation staff, contractors, and grant recipients do not need to include the "All rights reserved." statement in new files they create. ___ 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: r344659 - head/sys/arm64/arm64
Author: andrew Date: Thu Feb 28 14:40:43 2019 New Revision: 344659 URL: https://svnweb.freebsd.org/changeset/base/344659 Log: Add the hw.ncpu tunable to arm64. This allows us to limit the number of CPUs to use, e.g. to debug problems seen when enabling multiple clusters. Reviewed by: manu Sponsored by: DARPA, AFRL Differential Revision:https://reviews.freebsd.org/D19404 Modified: head/sys/arm64/arm64/mp_machdep.c Modified: head/sys/arm64/arm64/mp_machdep.c == --- head/sys/arm64/arm64/mp_machdep.c Thu Feb 28 09:42:03 2019 (r344658) +++ head/sys/arm64/arm64/mp_machdep.c Thu Feb 28 14:40:43 2019 (r344659) @@ -638,10 +638,11 @@ cpu_find_cpu0_fdt(u_int id, phandle_t node, u_int addr void cpu_mp_setmaxid(void) { -#if defined(DEV_ACPI) || defined(FDT) int cores; -#endif + mp_ncpus = 1; + mp_maxid = 0; + switch(arm64_bus_method) { #ifdef DEV_ACPI case ARM64_BUS_ACPI: @@ -653,7 +654,6 @@ cpu_mp_setmaxid(void) cores); mp_ncpus = cores; mp_maxid = cores - 1; - return; } break; #endif @@ -667,18 +667,21 @@ cpu_mp_setmaxid(void) cores); mp_ncpus = cores; mp_maxid = cores - 1; - return; } break; #endif default: + if (bootverbose) + printf("No CPU data, limiting to 1 core\n"); break; } - if (bootverbose) - printf("No CPU data, limiting to 1 core\n"); - mp_ncpus = 1; - mp_maxid = 0; + if (TUNABLE_INT_FETCH("hw.ncpu", )) { + if (cores > 0 && cores < mp_ncpus) { + mp_ncpus = cores; + mp_maxid = cores - 1; + } + } } /* ___ 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: r344656 - head/usr.bin/truss
Author: tmunro Date: Thu Feb 28 09:13:41 2019 New Revision: 344656 URL: https://svnweb.freebsd.org/changeset/base/344656 Log: truss: Add support for fsync(2) and fdatasync(2). The default handling showed the argument as hex. Add explicit handling so we can show it as decimal, since that's how we show file descriptors everywhere else. Approved by: mjg (mentor) MFC after:2 weeks Differential Revision:https://reviews.freebsd.org/D19295 Modified: head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/syscalls.c == --- head/usr.bin/truss/syscalls.c Thu Feb 28 06:53:18 2019 (r344655) +++ head/usr.bin/truss/syscalls.c Thu Feb 28 09:13:41 2019 (r344656) @@ -231,6 +231,8 @@ static struct syscall decoded_syscalls[] = { { Atflags, 4 } } }, { .name = "fcntl", .ret_type = 1, .nargs = 3, .args = { { Int, 0 }, { Fcntl, 1 }, { Fcntlflag, 2 } } }, + { .name = "fdatasync", .ret_type = 1, .nargs = 1, + .args = { { Int, 0 } } }, { .name = "flock", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { Flockop, 1 } } }, { .name = "fstat", .ret_type = 1, .nargs = 2, @@ -240,6 +242,8 @@ static struct syscall decoded_syscalls[] = { { Atflags, 3 } } }, { .name = "fstatfs", .ret_type = 1, .nargs = 2, .args = { { Int, 0 }, { StatFs | OUT, 1 } } }, + { .name = "fsync", .ret_type = 1, .nargs = 1, + .args = { { Int, 0 } } }, { .name = "ftruncate", .ret_type = 1, .nargs = 2, .args = { { Int | IN, 0 }, { QuadHex | IN, 1 } } }, { .name = "futimens", .ret_type = 1, .nargs = 2, ___ 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"