diff options
91 files changed, 2777 insertions, 1094 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1 index 0d0aea4..8ecd7a6 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1634,7 +1634,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} \ ${_lib_libcapsicum} \ lib/ncurses/ncurses lib/ncurses/ncursesw \ lib/libopie lib/libpam ${_lib_libthr} \ - lib/libradius lib/libsbuf lib/libtacplus \ + ${_lib_libradius} lib/libsbuf lib/libtacplus \ lib/libgeom \ ${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \ ${_cddl_lib_libuutil} \ @@ -1657,6 +1657,10 @@ lib/libgeom__L: lib/libexpat__L _lib_libthr= lib/libthr .endif +.if ${MK_RADIUS_SUPPORT} != "no" +_lib_libradius= lib/libradius +.endif + .if ${MK_OFED} != "no" _ofed_lib= contrib/ofed/usr.lib/ .endif diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PDESC_ZERO.badlib.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PDESC_ZERO.badlib.exe index 595db1d..e360d25 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PDESC_ZERO.badlib.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PDESC_ZERO.badlib.exe @@ -1,4 +1,4 @@ -#!/bin/ksh +#!/usr/bin/env ksh # # CDDL HEADER START # diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_FUNC.badfunc.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_FUNC.badfunc.exe index 595db1d..e360d25 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_FUNC.badfunc.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_FUNC.badfunc.exe @@ -1,4 +1,4 @@ -#!/bin/ksh +#!/usr/bin/env ksh # # CDDL HEADER START # diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_LIB.libdash.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_LIB.libdash.exe index 595db1d..e360d25 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_LIB.libdash.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_LIB.libdash.exe @@ -1,4 +1,4 @@ -#!/bin/ksh +#!/usr/bin/env ksh # # CDDL HEADER START # diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.alldash.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.alldash.exe index 595db1d..e360d25 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.alldash.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.alldash.exe @@ -1,4 +1,4 @@ -#!/bin/ksh +#!/usr/bin/env ksh # # CDDL HEADER START # diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.badname.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.badname.exe index 595db1d..e360d25 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.badname.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.badname.exe @@ -1,4 +1,4 @@ -#!/bin/ksh +#!/usr/bin/env ksh # # CDDL HEADER START # diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.globdash.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.globdash.exe index 595db1d..e360d25 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.globdash.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_NAME.globdash.exe @@ -1,4 +1,4 @@ -#!/bin/ksh +#!/usr/bin/env ksh # # CDDL HEADER START # diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_OFF.toobig.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_OFF.toobig.exe index 595db1d..e360d25 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_OFF.toobig.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/err.D_PROC_OFF.toobig.exe @@ -1,4 +1,4 @@ -#!/bin/ksh +#!/usr/bin/env ksh # # CDDL HEADER START # diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.coverage.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.coverage.exe index 07e8458..ddd0f60 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.coverage.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.coverage.exe @@ -1,4 +1,4 @@ -#!/usr/bin/ksh +#!/usr/bin/env ksh # # CDDL HEADER START # diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.emptystack.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.emptystack.exe index a8bc8cb..6369bc5 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.emptystack.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pid/tst.emptystack.exe @@ -1,4 +1,4 @@ -#!/usr/bin/ksh +#!/usr/bin/env ksh # # CDDL HEADER START # diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/plockstat/tst.available.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/plockstat/tst.available.exe index 221e8b1..c767848 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/plockstat/tst.available.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/plockstat/tst.available.exe @@ -1,4 +1,4 @@ -#!/usr/bin/ksh +#!/usr/bin/env ksh # # CDDL HEADER START # diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/plockstat/tst.libmap.exe b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/plockstat/tst.libmap.exe index 221e8b1..c767848 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/plockstat/tst.libmap.exe +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/plockstat/tst.libmap.exe @@ -1,4 +1,4 @@ -#!/usr/bin/ksh +#!/usr/bin/env ksh # # CDDL HEADER START # diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c index 7eae398..da804ee 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c @@ -382,6 +382,9 @@ dt_stddev(uint64_t *data, uint64_t normal) int64_t norm_avg; uint64_t diff[2]; + if (data[0] == 0) + return (0); + /* * The standard approximation for standard deviation is * sqrt(average(x**2) - average(x)**2), i.e. the square root diff --git a/etc/Makefile b/etc/Makefile index b27542a..4a13abe 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -21,13 +21,11 @@ BIN1= crontab \ dhclient.conf \ disktab \ fbtab \ - ftpusers \ gettytab \ group \ hosts \ hosts.allow \ hosts.equiv \ - inetd.conf \ libalias.conf \ libmap.conf \ login.access \ @@ -101,6 +99,14 @@ BIN1+= snmpd.config BIN1+= freebsd-update.conf .endif +.if ${MK_FTP} != "no" +BIN1+= ftpusers +.endif + +.if ${MK_INETD} != "no" +BIN1+= inetd.conf +.endif + .if ${MK_LOCATE} != "no" BIN1+= ${.CURDIR}/../usr.bin/locate/locate/locate.rc .endif diff --git a/include/Makefile b/include/Makefile index e7da89b..46b24f5 100644 --- a/include/Makefile +++ b/include/Makefile @@ -44,7 +44,7 @@ LSUBDIRS= cam/ata cam/scsi \ dev/hwpmc \ dev/ic dev/iicbus dev/io dev/lmc dev/mfi dev/nvme \ dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/smbus \ - dev/speaker dev/usb dev/utopia dev/vkbd dev/wi \ + dev/speaker dev/utopia dev/vkbd dev/wi \ fs/devfs fs/fdescfs fs/msdosfs fs/nandfs fs/nfs fs/nullfs \ fs/procfs fs/smbfs fs/udf fs/unionfs \ geom/cache geom/concat geom/eli geom/gate geom/journal geom/label \ @@ -58,12 +58,12 @@ LSUBDIRS= cam/ata cam/scsi \ LSUBSUBDIRS= dev/mpt/mpilib -.if ${MK_CUSE} != "no" -LSUBDIRS+= fs/cuse +.if ${MK_BLUETOOTH} != "no" +LSUBSUBDIRS+= netgraph/bluetooth/include .endif -.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" -_dev_powermac_nvram= dev/powermac_nvram +.if ${MK_CUSE} != "no" +LSUBDIRS+= fs/cuse .endif .if ${MK_GSSAPI} != "no" @@ -75,15 +75,18 @@ INCS+= gssapi.h INCS+= hesiod.h .endif -.if ${MK_BLUETOOTH} != "no" -LSUBSUBDIRS+= netgraph/bluetooth/include -.endif - # Handle the #define aliases for libiconv .if ${MK_ICONV} == "yes" INCS+= iconv.h .endif - + +.if ${MK_USB} != "no" +LSUBDIRS+= dev/usb +.endif + +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" +_dev_powermac_nvram= dev/powermac_nvram +.endif # Define SHARED to indicate whether you want symbolic links to the system # source (``symlinks''), or a separate copy (``copies''). ``symlinks'' is diff --git a/lib/Makefile b/lib/Makefile index 90e217e..c00af75 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -63,7 +63,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ libkvm \ ${_libldns} \ liblzma \ - libmagic \ + ${_libmagic} \ libmandoc \ libmemstat \ libmd \ @@ -82,7 +82,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ ${_libpmc} \ ${_libproc} \ libprocstat \ - libradius \ + ${_libradius} \ librpcsvc \ librt \ ${_librtld_db} \ @@ -142,7 +142,7 @@ SUBDIR_DEPEND_liblibrpcsec_gss= libgssapi SUBDIR_DEPEND_libmagic= libz SUBDIR_DEPEND_libmemstat= libkvm SUBDIR_DEPEND_libopie= libmd -SUBDIR_DEPEND_libpam= libcrypt libopie libradius librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err} +SUBDIR_DEPEND_libpam= libcrypt libopie ${_libradius} librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err} SUBDIR_DEPEND_libpjdlog= libutil SUBDIR_DEPEND_libprocstat= libkvm libutil SUBDIR_DEPEND_libradius= libmd @@ -195,6 +195,10 @@ _cuse= libcuse _libelftc= libelftc .endif +.if ${MK_FILE} != "no" +_libmagic= libmagic +.endif + .if ${MK_GPIO} != "no" _libgpio= libgpio .endif @@ -286,6 +290,10 @@ _libmp= libmp _libpmc= libpmc .endif +.if ${MK_RADIUS_SUPPORT} != "no" +_libradius= libradius +.endif + .if ${MK_SENDMAIL} != "no" _libmilter= libmilter _libsm= libsm diff --git a/lib/clang/clang.build.mk b/lib/clang/clang.build.mk index 5437bf7..d58d3ae 100644 --- a/lib/clang/clang.build.mk +++ b/lib/clang/clang.build.mk @@ -34,7 +34,7 @@ BUILD_TRIPLE?= ${BUILD_ARCH:C/amd64/x86_64/:C/armv6hf/armv6/:C/arm64/aarch64/}-u CFLAGS+= -DLLVM_DEFAULT_TARGET_TRIPLE=\"${TARGET_TRIPLE}\" \ -DLLVM_HOST_TRIPLE=\"${BUILD_TRIPLE}\" \ -DDEFAULT_SYSROOT=\"${TOOLS_PREFIX}\" -CXXFLAGS+= -std=c++11 -fno-exceptions -fno-rtti +CXXFLAGS+= -std=c++11 -stdlib=libc++ -fno-exceptions -fno-rtti .PATH: ${LLVM_SRCS}/${SRCDIR} diff --git a/lib/libpam/modules/modules.inc b/lib/libpam/modules/modules.inc index 66fc63c..02debf7 100644 --- a/lib/libpam/modules/modules.inc +++ b/lib/libpam/modules/modules.inc @@ -21,7 +21,9 @@ MODULES += pam_opie MODULES += pam_opieaccess MODULES += pam_passwdqc MODULES += pam_permit +.if ${MK_RADIUS_SUPPORT} != "no" MODULES += pam_radius +.endif MODULES += pam_rhosts MODULES += pam_rootok MODULES += pam_securetty diff --git a/lib/msun/src/s_scalbln.c b/lib/msun/src/s_scalbln.c index 2aa6900..dcf2c78 100644 --- a/lib/msun/src/s_scalbln.c +++ b/lib/msun/src/s_scalbln.c @@ -35,7 +35,9 @@ scalbln (double x, long n) { int in; - in = (n > INT_MAX) ? INT_MAX : (n < INT_MIN) ? INT_MIN : n; + in = (int)n; + if (in != n) + in = (n > 0) ? INT_MAX: INT_MIN; return (scalbn(x, in)); } @@ -44,7 +46,9 @@ scalblnf (float x, long n) { int in; - in = (n > INT_MAX) ? INT_MAX : (n < INT_MIN) ? INT_MIN : n; + in = (int)n; + if (in != n) + in = (n > 0) ? INT_MAX: INT_MIN; return (scalbnf(x, in)); } @@ -53,6 +57,8 @@ scalblnl (long double x, long n) { int in; - in = (n > INT_MAX) ? INT_MAX : (n < INT_MIN) ? INT_MIN : n; + in = (int)n; + if (in != n) + in = (n > 0) ? INT_MAX: INT_MIN; return (scalbnl(x, in)); } diff --git a/libexec/Makefile b/libexec/Makefile index c8b5386..27d245e 100644 --- a/libexec/Makefile +++ b/libexec/Makefile @@ -5,18 +5,14 @@ SUBDIR= ${_atf} \ ${_atrun} \ - bootpd \ ${_casper} \ ${_comsat} \ ${_dma} \ ${_dma-mbox-create} \ - fingerd \ - ftpd \ getty \ ${_mail.local} \ ${_mknetid} \ ${_pppoed} \ - rbootd \ revnetgroup \ ${_rlogind} \ rpc.rquotad \ @@ -28,10 +24,8 @@ SUBDIR= ${_atf} \ ${_rtld-elf} \ save-entropy \ ${_smrsh} \ - tcpd \ ${_telnetd} \ ${_tests} \ - tftpd \ ${_tftp-proxy} \ ulog-helper \ ${_ypxfr} @@ -40,10 +34,22 @@ SUBDIR= ${_atf} \ _atrun= atrun .endif +.if ${MK_BOOTPD} != "no" +SUBDIR+= bootpd +.endif + .if ${MK_CASPER} != "no" _casper= casper .endif +.if ${MK_FINGER} != "no" +SUBDIR+= fingerd +.endif + +.if ${MK_FTP} != "no" +SUBDIR+= ftpd +.endif + .if ${MK_MAIL} != "no" _comsat= comsat .endif @@ -70,6 +76,10 @@ _tftp-proxy= tftp-proxy _rtld-elf= rtld-elf .endif +.if ${MK_RBOOTD} != "no" +SUBDIR+= rbootd +.endif + .if ${MK_RCMDS} != "no" _rlogind= rlogind _rshd= rshd @@ -84,10 +94,18 @@ _smrsh= smrsh SUBDIR+= talkd .endif +.if ${MK_TCP_WRAPPERS} != "no" +SUBDIR+= tcpd +.endif + .if ${MK_TELNET} != "no" _telnetd= telnetd .endif +.if ${MK_TFTP} != "no" +SUBDIR+= tftpd +.endif + .if ${MK_TESTS} != "no" _atf= atf _tests= tests diff --git a/release/doc/en_US.ISO8859-1/relnotes/article.xml b/release/doc/en_US.ISO8859-1/relnotes/article.xml index e0625f3..f0992e0 100644 --- a/release/doc/en_US.ISO8859-1/relnotes/article.xml +++ b/release/doc/en_US.ISO8859-1/relnotes/article.xml @@ -90,12 +90,8 @@ information on known bugs, security advisories, and corrections to documentation. An up-to-date copy of the errata for &os; &release.current; can be found on the &os; Web site.</para> - </sect1> - - <sect1 xml:id="new"> - <title>What's New</title> - <para>This section describes the most user-visible new or changed + <para>This document describes the most user-visible new or changed features in &os; since &release.prev;. In general, changes described here are unique to the &release.branch; branch unless specifically marked as &merged; features.</para> @@ -109,397 +105,78 @@ between releases; this document focuses primarily on security advisories, user-visible changes, and major architectural improvements.</para> + </sect1> - <sect2 xml:id="security"> - <title>Security Advisories</title> - - <para>No advisories.</para> - - </sect2> - - <sect2 xml:id="kernel"> - <title>Kernel Changes</title> - - <para revision="260903">Support for GPS ports has been added to - &man.uhso.4;.</para> - - <para revision="264601" contrib="sponsor" - sponsor="&darpa_afrl;">The <literal>if_nf10bmac(4)</literal> - device has been added, providing support for NetFPGA-10G - Embedded CPU Ethernet Core.</para> - - <note> - <para>The <literal>if_nf10bmac(4)</literal> driver operates on - the FPGA, and is not suited for the PCI host - interface.</para> - </note> + <sect1 xml:id="upgrade"> + <title>Upgrading from Previous Releases of &os;</title> - <para revision="265132">The &man.full.4; device has been added, - and the <literal>lindev(4)</literal> device has been removed. - Prior to this change, <literal>lindev(4)</literal> provided - only the <filename>/dev/full</filename> character device, - returning <literal>ENOSPC</literal> on write attempts. As - this device is not specific to &linux;, a native &os; version - has been added.</para> + <para arch="amd64,i386">Binary upgrades between RELEASE versions + (and snapshots of the various security branches) are supported + using the &man.freebsd-update.8; utility. The binary upgrade + procedure will update unmodified userland utilities, as well as + unmodified GENERIC kernels distributed as a part of an official + &os; release. The &man.freebsd-update.8; utility requires that + the host being upgraded have Internet connectivity.</para> - <para revision="265236" contrib="sponsor" - sponsor="&lsi;, &spectralogic;" sponsorurl="">The &man.mpr.4; - device has been added, providing support for LSI Fusion-MPT - 3 12Gb SCSI/SATA controllers.</para> + <para>Source-based upgrades (those based on recompiling the &os; + base system from source code) from previous versions are + supported, according to the instructions in + <filename>/usr/src/UPDATING</filename>.</para> - <para revision="265555" contrib="sponsor" - sponsor="&lsi;">The &man.mrsas.4; driver has been added, - providing support for LSI MegaRAID SAS controllers. The - &man.mfi.4; driver will attach to the controller, by default. - To enable &man.mrsas.4; add - <literal>hw.mfi.mrsas_enable=1</literal> to - <filename>/boot/loader.conf</filename>, which turns off - &man.mfi.4; device probing.</para> + <important> + <para>Upgrading &os; should only be attempted after backing up + <emphasis>all</emphasis> data and configuration files.</para> + </important> + </sect1> - <note> - <para>At this time, the &man.mfiutil.8; utility and the &os; - version of <application>MegaCLI</application> and - <application>StorCli</application> do not work with - &man.mrsas.4;.</para> - </note> + <sect1 xml:id="security-errata"> + <title>Security and Errata</title> - <para revision="265876">A kernel bug that inhibited proper - functionality of the <literal>dev.cpu.0.freq</literal> - &man.sysctl.8; on &intel; processors with Turbo - Boost ™ enabled has been fixed.</para> + <para>This section lists the various Security Advisories and + Errata Notices since &release.prev;.</para> - <para revision="266531">The <literal>IMAGACT_BINMISC</literal> - kernel configuration option has been enabled by default, - which enables application execution through emulators, such - as <application>Qemu</application>.</para> - - <para revision="266757" contrib="sponsor" - sponsor="&chelsio;">Support for the &man.cxgbe.4; Terminator - 5 (T5) 10G/40G cards has been added to &man.netmap.4;.</para> + <sect2 xml:id="security"> + <title>Security Advisories</title> - <para revision="268045">The <literal>VT</literal> kernel - configuration file has been removed, and the &man.vt.4; - driver is included in the <literal>GENERIC</literal> kernel. - To enable &man.vt.4;, enter <literal>set kern.vty=vt</literal> - at the &man.loader.8; prompt during boot, or add - <literal>kern.vty=vt</literal> to &man.loader.conf.5; and - reboot the system.</para> + <para>No advisories.</para> - <para revision="271697" arch="powerpc">Support for - &man.dtrace.1; stack tracing has been fixed for - &os;/&arch.powerpc;, using the <literal>trapexit()</literal> - and <literal>asttrapexit()</literal> functions instead of - checking within addressed kernel space.</para> + </sect2> - <para revision="271705">Hardware context support has been - added to the <literal>drm/i915</literal> driver, adding - support for <application>Mesa</application> 9.2 and - later.</para> + <sect2 xml:id="errata"> + <title>Errata Notices</title> - <para revision="273178">The &man.vt.4; driver has been updated, - replacing the bitmapped <literal>kern.vt.spclkeys</literal> - &man.sysctl.8; with individual - <literal>kern.vt.kbd_*</literal> variants.</para> + <para>No errata notices.</para> - <para revision="273598">The &man.hpet.4; driver has been updated - to create a - <filename>/dev/hpet<replaceable>N</replaceable></filename> - device, providing access to <acronym>HPET</acronym> from - userspace.</para> + </sect2> + </sect1> - <para revision="274085">The &man.vt.4; driver has been made the - default system console driver. The &man.syscons.4; driver is - still available, and can be enabled by adding - <literal>kern.vty=sc</literal> in &man.loader.conf.5;. - Alternatively, &man.syscons.4; can be enabled at boot time by - entering <literal>set kern.vty=sc</literal> at the - &man.loader.8; prompt.</para> + <sect1 xml:id="userland"> + <title>Userland</title> - <para revision="274386">An issue that could cause a system to - hang when entering <acronym>ACPI</acronym> - <literal>S3</literal> state (suspend to - <acronym>RAM</acronym>) has been corrected in the &man.acpi.4; - and &man.pci.4; drivers.</para> + <para>This section covers changes and additions to userland + applications, contributed software, and system utilities.</para> - <para revision="274733" arch="powerpc">The power management unit - subsystem has been updated to support power button events on - certain &arch.powerpc; hardware, such as aluminum - PowerBook ®.</para> + <sect2 xml:id="userland-config"> + <title>Userland Configuration Changes</title> - <para revision="275171,275190" arch="powerpc">The &man.hwpmc.4; - driver has been updated to correct performance counter - sampling on G4 (MPC74xxx) and G5 class processors.</para> + <para revision="266463">The default &man.newsyslog.conf.5; now + includes files in the + <filename>/etc/newsyslog.conf.d/</filename> and + <filename>/usr/local/etc/newsyslog.conf.d/</filename> + directories by default for &man.newsyslog.8;.</para> - <para revision="275732" contrib="sponsor" - sponsor="&ff;,&netgate;">The - <application>OpenCrypto</application> framework has been - updated to include <literal>AES-ICM</literal> and - <literal>AES-GCM</literal> modes, both of which have also been - added to the &man.aesni.4; driver.</para> + <para revision="270675">The &man.mailwrapper.8; utility has been + updated to use &man.mailer.conf.5; from the + <literal>LOCALBASE</literal> environment variable, which + defaults to <filename class="directory">/usr/local</filename> + if unset.</para> - <sect3 xml:id="kernel-virtualization"> - <title>Virtualization Support</title> - - <para revision="260410">Support for the <quote>Virtual - Interrupt Delivery</quote> feature of &intel; VT-x is - enabled if supported by the CPU. This feature can be - disabled by running <literal>sysctl - hw.vmm.vmx.use_apic_vid=0</literal>. Additionally, to - persist this setting across reboots, add - <literal>hw.vmm.vmx.use_apic_vid=0</literal> to - <filename>/etc/sysctl.conf</filename>.</para> - - <para revision="260532">Support for <quote>Posted Interrupt - Processing</quote> is enabled if supported by the CPU. - This feature can be disabled by running <literal>sysctl - hw.vmm.vmx.use_apic_pir=0</literal>. Additionally, to - persist this setting across reboots, add - <literal>hw.vmm.vmx.use_apic_pir=0</literal> to - <filename>/etc/sysctl.conf</filename>.</para> - - <para revision="260582">Unmapped IO support has been added to - &man.virtio_blk.4;.</para> - - <para revision="260583">Unmapped IO support has been added to - &man.virtio_scsi.4;.</para> - - <para revision="260847">The &man.virtio_random.4; driver has - been added to harvest entropy from the host system.</para> - - <para revision="267536" contrib="sponsor" - sponsor="&citrix.rd;">Support for running - a &os;/&arch.amd64; <application>Xen</application> guest - instance as <acronym>PVH</acronym> guest has been added. - <acronym>PVH</acronym> mode, short for - <quote>Para-Virtualized Hardware</quote>, uses - para-virtualized drivers for boot and I/O, and uses hardware - virtualization extensions for all other tasks, without the - need for emulation.</para> - - <para revision="273515">The &man.virtio.console.4; driver has - been added, which provides an interface to VirtIO console - devices through a &man.tty.4; device.</para> - </sect3> - - <sect3 xml:id="kernel-arm"> - <title>ARM Support</title> - - <para revision="260921">The &man.nand.4; device is enabled for - ARM devices by default.</para> - - <para revision="273264" arch="armv6">An issue that could cause - instability when detecting <acronym>SD</acronym> cards on - the Raspberry Pi <acronym>SOC</acronym> has been - fixed.</para> - - <para revision="275963">The <literal>bcm2835_cpufreq</literal> - driver has been added, which supports <acronym>CPU</acronym> - frequency and voltage control on the Raspberry Pi - <acronym>SOC</acronym>.</para> - </sect3> - - <sect3 xml:id="boot"> - <title>Boot Loader Changes</title> - - <para> </para> - </sect3> - - <sect3 xml:id="proc"> - <title>Hardware Support</title> - - <para revision="268303">The &man.asmc.4; driver has been - updated to support the &apple; MacMini 3,1.</para> - - <para revision="268351">Support for &os;/ia64 has been dropped - as of &os; 11.</para> - - <sect4 xml:id="mm"> - <title>Multimedia Support</title> - - <para> </para> - </sect4> - - <sect4 xml:id="net-if"> - <title>Network Interface Support</title> - - <para revision="258830">Support for Broadcom chipsets - BCM57764, BCM57767, BCM57782, BCM57786 and BCM57787 has - been added to &man.bge.4;.</para> - - <para revision="260448">Support for the &intel; - Centrino™ Wireless-N 135 chipset has been - added.</para> - - <para revision="260552">Firmware for &intel; Centrino™ - Wireless-N 105 devices has been added to the base - system.</para> - - <para revision="261975">The deprecated nve(4) driver has - been removed. Users of NVIDIA nForce MCP network adapters - are advised to use the &man.nfe.4; driver instead, which - has been the default driver for this hardware since - &os; 7.0.</para> - - <para revision="265348" contrib="sponsor" - sponsor="&netgate;">The &man.ath.hal.4; driver has been - updated to support the Atheros AR1111 chipset.</para> - - <para revision="266770">Support for the &intel; - Centrino™ Wireless-N 105 chipset has been - added.</para> - - <para revision="272089">A bug in &man.ipfw.4; that could - potentially lead to a kernel panic when using - &man.dummynet.4; at layer 2 has been fixed.</para> - - <para revision="272730">The &man.alc.4; driver has been - updated to support AR816x and AR817x ethernet - controllers.</para> - - <para revision="273331">The &man.vxlan.4; driver has been - added, which creates a virtual Layer 2 (Ethernet) network - overlaid in a Layer 3 (IP/UDP) network. The &man.vxlan.4; - driver is analogous to &man.vlan.4;, but is designed to be - better suited for large, multiple-tenant datacenter - environments.</para> - - <para revision="274246" contrib="sponsor" - sponsor="&yandex;">The &man.gre.4; driver has been - significantly overhauled, and has been split into two - separate modules, &man.gre.4; and &man.me.4;.</para> - </sect4> - </sect3> - - <sect3 xml:id="net-proto"> - <title>Network Protocols</title> - - <para revision="263140">Support for the IPX network transport - protocol has been removed, and will not be supported in - &os; 11 and later releases.</para> - - <para revision="272720" contrib="sponsor" - sponsor="&limelight;">Support for <acronym>PLPMTUD</acronym> - blackhole detection (<acronym>RFC</acronym> 4821) has been - added to the &man.tcp.4; stack, disabled by default. New - control tunables have been added:</para> - - <informaltable frame="none" pgwide="0"> - <tgroup cols="2"> - <colspec colwidth="1*"/> - <colspec colwidth="1*"/> - <thead> - <row> - <entry>Tunable</entry> - <entry>Description</entry> - </row> - </thead> - - <tbody> - <row> - <entry><literal>net.inet.tcp.pmtud_blackhole_detection</literal></entry> - <entry>Enables or disables <acronym>PLPMTUD</acronym> - blackhole detection</entry> - </row> - - <row> - <entry><literal>net.inet.tcp.pmtud_blackhole_mss</literal></entry> - <entry><acronym>MSS</acronym> to try for IPv4</entry> - </row> - - <row> - <entry><literal>net.inet.tcp.v6pmtud_blackhole_mss</literal></entry> - <entry><acronym>MSS to try for IPv6</acronym></entry> - </row> - </tbody> - </tgroup> - </informaltable> - - <para>New monitoring &man.sysctl.8;s haven been added:</para> - - <informaltable frame="none" pgwide="0"> - <tgroup cols="2"> - <colspec colwidth="1*"/> - <colspec colwidth="1*"/> - <thead> - <row> - <entry>Tunable</entry> - <entry>Description</entry> - </row> - </thead> - - <tbody> - <row> - <entry><literal>net.inet.tcp.pmtud_blackhole_activated</literal></entry> - <entry>Number of times the code was activated to - attempt downshifting the - <acronym>MSS</acronym></entry> - </row> - - <row> - <entry><literal>net.inet.tcp.pmtud_blackhole_min_activated</literal></entry> - <entry>Number of times the blackhole - <acronym>MSS</acronym> was used in an attempt to - downshift</entry> - </row> - - <row> - <entry><literal>net.inet.tcp.pmtud_blackhole_failed</literal></entry> - <entry>Number of times that the blackhole failed to - connect after downshifting the - <acronym>MSS</acronym></entry> - </row> - </tbody> - </tgroup> - </informaltable> - </sect3> - - <sect3 xml:id="disks"> - <title>Disks and Storage</title> - - <para revision="267359">Support for the - <literal>disklabel64</literal> partitioning scheme has been - added to &man.gpart.8;.</para> - - <para revision="276526">The <literal>asr(4)</literal> driver - has been removed, and is no longer supported.</para> - - <para revision="275461" contrib="sponsor" sponsor="&ix;">The - &man.ctl.4; subsystem has been updated, increasing the ports - limit from <literal>128</literal> to <literal>256</literal>, - and <acronym>LUN</acronym> limit from <literal>256</literal> - to <literal>1024</literal>.</para> - </sect3> - - <sect3 xml:id="fs"> - <title>File Systems</title> - - <para revision="270096" contrib="sponsor" sponsor="&ff;">The - new filesystem automount facility, &man.autofs.5;, has been - added. The new &man.autofs.5; facility is similar to that - found in other &unix;-like operating systems, such as - OS X™ and Solaris™. The &man.autofs.5; - facility uses a &sun;-compatible &man.auto.master.5; - configuration file, and is administered with the - &man.automount.8; userland utility, and the - &man.automountd.8; and &man.autounmountd.8; daemons.</para> - - <sect4 xml:id="fs-zfs"> - <title>ZFS</title> - - <para revision="275748">The - <literal>arc_meta_limit</literal> statistics are now - visible through the <literal>kstat</literal> - &man.sysctl.8;. As a result of this change, the - <literal>vfs.zfs.arc_meta_used</literal> &man.sysctl.8; - has been removed, and replaced with the - <literal>kstat.zfs.misc.arcstats.arc_meta_used</literal> - &man.sysctl.8;.</para> - </sect4> - </sect3> + <para revision="272350">The <literal>MK_ARM_EABI</literal> + &man.src.conf.5; option has been removed.</para> </sect2> - <sect2 xml:id="userland"> - <title>Userland Changes</title> + <sect2 xml:id="userland-programs"> + <title>Userland Application Changes</title> <para revision="258838" contrib="sponsor" sponsor="&ff;, &google;" sponsorurl="">The &man.casperd.8; daemon has been @@ -532,9 +209,6 @@ network packets using the Capsicum framework to drop privileges.</para> - <para revision="261504">&os;/&arch.i386; guests can be run under - bhyve.</para> - <para revision="265229">The &man.ps.1; utility has been updated to include the <literal>-J</literal> flag, used to filter output by matching &man.jail.8; IDs and names. @@ -555,23 +229,6 @@ ends event collection after the specified number of seconds.</para> - <para revision="266463">The default &man.newsyslog.conf.5; now - includes files in the - <filename>/etc/newsyslog.conf.d/</filename> and - <filename>/usr/local/etc/newsyslog.conf.d/</filename> - directories by default for &man.newsyslog.8;.</para> - - <para revision="268461">The &man.readline.3; library is now - statically linked in software within the base system, and the - shared library is no longer installed, allowing the Ports - Collection to use a modern version of the library.</para> - - <para revision="270675">The &man.mailwrapper.8; utility has been - updated to use &man.mailer.conf.5; from the - <literal>LOCALBASE</literal> environment variable, which - defaults to <filename class="directory">/usr/local</filename> - if unset.</para> - <para revision="270745">The &man.ps.1; utility has been updated to include a new keyword, <quote>tracer</quote>, which displays the <acronym>PID</acronym> of the tracing @@ -580,10 +237,6 @@ <para revision="271482">Support for adding empty partitions has been added to the &man.mkimg.1; utility.</para> - <para revision="271539">The &man.bsdinstall.8; partition editor - and &man.sade.8; utility have been updated to include native - <acronym>ZFS</acronym> support.</para> - <para revision="272166">The &man.primes.6; utility has been updated to correctly enumerate prime numbers between <literal>4295098369</literal> and @@ -628,65 +281,20 @@ </tgroup> </informaltable> - <para revision="272273">The &man.strptime.3; library has been - updated to add support for <acronym>POSIX</acronym>-2001 - features <literal>%U</literal> and - <literal>%W</literal>.</para> - - <para revision="272274">The &os; installation utility, - &man.bsdinstall.8;, has been updated to set the - <literal>canmount</literal> &man.zfs.8; property to - <literal>off</literal> for the <filename - class="directory">/var</filename> dataset, preventing the - contents of directories within <filename - class="directory">/var</filename> from conflicting when - using multiple boot environments, such as that provided by - <filename role="package">sysutils/beadm</filename>.</para> - - <para revision="272350">The <literal>MK_ARM_EABI</literal> - &man.src.conf.5; option has been removed.</para> - <para revision="272488">Userland &man.ctf.5; support in &man.dtrace.1; has been added. With this change, &man.dtrace.1; is able to resolve type info for function and <acronym>USDT</acronym> probe arguments, and function return values.</para> - <para revision="272842,272848" contrib="sponsor" - sponsor="&ff;">The &man.dl.iterate.phdr.3; library has been - changed to always return the path name of the - <acronym>ELF</acronym> object in the - <literal>dlpi_name</literal> structure member.</para> - - <para revision="273806" contrib="sponsor" sponsor="&chelsio;">A - userland library for Chelsio Terminator 5 based iWARP cards - has been added, allowing userland <acronym>RDMA</acronym> - applications to work over compatible - <acronym>NIC</acronym>s.</para> - - <para revision="274394">The &man.bsdconfig.8; utility has been - updated to skip the initial &man.tzsetup.8; - <acronym>UTC</acronym> versus wall-clock time prompt when run - in a virtual machine, determined when the - <literal>kern.vm_guest</literal> &man.sysctl.8; is set to - <literal>1</literal>.</para> - <para revision="274960">The &man.elfdump.1; utility has been updated to support capability mode provided by &man.capsicum.4;.</para> - <para revision="274987">The &man.gpio.3; library has been added, - providing a wrapper around the &man.gpio.4; kernel - interface.</para> - <para revision="275680" contrib="sponsor" sponsor="&ff;">The &man.fstyp.8; utility has been added, which is used to determine the filesystem on a specified device.</para> - <para revision="275874">The &man.bsdinstall.8; utility has been - updated to use the new &man.dpv.3; library to display progress - when extracting the &os; distributions.</para> - <para revision="276881">The <literal>libedit</literal> library has been updated to support <acronym>UTF</acronym>-8, which additionally provides unicode support to &man.sh.1;.</para> @@ -694,44 +302,9 @@ <para revision="277166" arch="powerpc">The &man.ptrace.2; system call has been updated include support for Altivec registers on &os;/&arch.powerpc;.</para> - - <sect3 xml:id="abi-compat"> - <title><acronym>ABI</acronym> Compatibility</title> - - <para revision="271982">The &linux; compatibility version has - been updated to <literal>2.6.18</literal>. The - <literal>compat.linux.osrelease</literal> &man.sysctl.8; is - evaluated when building the <filename - role="package">emulators/linux-c6</filename> and related - ports.</para> - </sect3> - - <sect3 xml:id="rc-scripts"> - <title><filename>/etc/rc.d</filename> Scripts</title> - - <para revision="270676">The &man.rc.8; subsystem has been - updated to allow configuring services in <filename - class="directory">${LOCALBASE}/etc/rc.conf.d/</filename>. - If <literal>LOCALBASE</literal> is unset, it defaults to - <filename class="directory">/usr/local</filename>.</para> - - <para revision="275299">The <filename>mrouted</filename> - &man.rc.8; script has been removed from the base system. An - equivalent script is available from the <filename - role="package">net/mrouted</filename> port.</para> - </sect3> - - <sect3 xml:id="periodic-scripts"> - <title><filename>/etc/periodic</filename> Scripts</title> - - <para revision="271321">The daily &man.periodic.8; script - <filename>110.clean-tmps</filename> has been updated to - avoid crossing filesystem mount boundaries when cleaning - files in <filename class="directory">/tmp</filename>.</para> - </sect3> </sect2> - <sect2 xml:id="contrib"> + <sect2 xml:id="userland-contrib"> <title>Contributed Software</title> <para revision="258884" contrib="sponsor" @@ -804,47 +377,591 @@ been updated to version 1.0.1l.</para> </sect2> - <sect2 xml:id="ports"> - <title>Ports/Packages Collection Infrastructure</title> + <sect2 xml:id="userland-installer"> + <title>Installation and Configuration Tools</title> + + <para revision="271539">The &man.bsdinstall.8; partition editor + and &man.sade.8; utility have been updated to include native + <acronym>ZFS</acronym> support.</para> + + <para revision="272274">The &os; installation utility, + &man.bsdinstall.8;, has been updated to set the + <literal>canmount</literal> &man.zfs.8; property to + <literal>off</literal> for the <filename + class="directory">/var</filename> dataset, preventing the + contents of directories within <filename + class="directory">/var</filename> from conflicting when + using multiple boot environments, such as that provided by + <filename role="package">sysutils/beadm</filename>.</para> + + <para revision="274394">The &man.bsdconfig.8; utility has been + updated to skip the initial &man.tzsetup.8; + <acronym>UTC</acronym> versus wall-clock time prompt when run + in a virtual machine, determined when the + <literal>kern.vm_guest</literal> &man.sysctl.8; is set to + <literal>1</literal>.</para> + + <para revision="275874">The &man.bsdinstall.8; utility has been + updated to use the new &man.dpv.3; library to display progress + when extracting the &os; distributions.</para> + </sect2> + + <sect2 xml:id="userland-rc"> + <title><filename class="directory">/etc/rc.d</filename> + Scripts</title> + + <para revision="270676">The &man.rc.8; subsystem has been + updated to allow configuring services in <filename + class="directory">${LOCALBASE}/etc/rc.conf.d/</filename>. + If <literal>LOCALBASE</literal> is unset, it defaults to + <filename class="directory">/usr/local</filename>.</para> + + <para revision="275299">The <filename>mrouted</filename> + &man.rc.8; script has been removed from the base system. An + equivalent script is available from the <filename + role="package">net/mrouted</filename> port.</para> + </sect2> + + <sect2 xml:id="userland-periodic"> + <title><filename class="directory">/etc/periodic</filename> + Scripts</title> + + <para revision="271321">The daily &man.periodic.8; script + <filename>110.clean-tmps</filename> has been updated to avoid + crossing filesystem mount boundaries when cleaning files in + <filename class="directory">/tmp</filename>.</para> + </sect2> + + <sect2 xml:id="userland-libraries"> + <title>Runtime Libraries and API</title> + + <para revision="268461">The &man.readline.3; library is now + statically linked in software within the base system, and the + shared library is no longer installed, allowing the Ports + Collection to use a modern version of the library.</para> + + <para revision="272273">The &man.strptime.3; library has been + updated to add support for <acronym>POSIX</acronym>-2001 + features <literal>%U</literal> and + <literal>%W</literal>.</para> + + <para revision="272842,272848" contrib="sponsor" + sponsor="&ff;">The &man.dl.iterate.phdr.3; library has been + changed to always return the path name of the + <acronym>ELF</acronym> object in the + <literal>dlpi_name</literal> structure member.</para> + + <para revision="273806" contrib="sponsor" sponsor="&chelsio;">A + userland library for Chelsio Terminator 5 based iWARP cards + has been added, allowing userland <acronym>RDMA</acronym> + applications to work over compatible + <acronym>NIC</acronym>s.</para> + + <para revision="274987">The &man.gpio.3; library has been added, + providing a wrapper around the &man.gpio.4; kernel + interface.</para> + </sect2> + + <sect2 xml:id="userland-abi"> + <title>ABI Compatibility</title> + + <para revision="271982">The &linux; compatibility version has + been updated to <literal>2.6.18</literal>. The + <literal>compat.linux.osrelease</literal> &man.sysctl.8; is + evaluated when building the <filename + role="package">emulators/linux-c6</filename> and related + ports.</para> + </sect2> + </sect1> + + <sect1 xml:id="kernel"> + <title>Kernel</title> + + <para>This section covers changes to kernel configurations, system + tuning, and system control parameters that are not otherwise + categorized.</para> + + <sect2 xml:id="kernel-bugfix"> + <title>Kernel Bug Fixes</title> + + <para revision="265876">A kernel bug that inhibited proper + functionality of the <literal>dev.cpu.0.freq</literal> + &man.sysctl.8; on &intel; processors with Turbo + Boost ™ enabled has been fixed.</para> + + <para revision="271697" arch="powerpc">Support for + &man.dtrace.1; stack tracing has been fixed for + &os;/&arch.powerpc;, using the <literal>trapexit()</literal> + and <literal>asttrapexit()</literal> functions instead of + checking within addressed kernel space.</para> + + <para revision="272089">A bug in &man.ipfw.4; that could + potentially lead to a kernel panic when using &man.dummynet.4; + at layer 2 has been fixed.</para> + </sect2> + + <sect2 xml:id="kernel-config"> + <title>Kernel Configuration</title> + + <para revision="266531">The <literal>IMAGACT_BINMISC</literal> + kernel configuration option has been enabled by default, + which enables application execution through emulators, such + as <application>Qemu</application>.</para> + + <para revision="268045">The <literal>VT</literal> kernel + configuration file has been removed, and the &man.vt.4; + driver is included in the <literal>GENERIC</literal> kernel. + To enable &man.vt.4;, enter <literal>set kern.vty=vt</literal> + at the &man.loader.8; prompt during boot, or add + <literal>kern.vty=vt</literal> to &man.loader.conf.5; and + reboot the system.</para> + </sect2> + + <sect2 xml:id="kernel-sysctl"> + <title>System Tuning and Controls</title> <para> </para> </sect2> + </sect1> - <sect2 xml:id="releng"> - <title>Release Engineering and Integration</title> + <sect1 xml:id="drivers"> + <title>Devices and Drivers</title> - <para revision="277458" contrib="sponsor" sponsor="&ff;">The - Release Engineering build tools have been updated to include - support for producing virtual machine disk images for various - cloud hosting providers.</para> + <para>This section covers changes and additions to devices and + device drivers since &release.prev;.</para> + + <sect2 xml:id="drivers-device"> + <title>Device Drivers</title> + + <para revision="260903">Support for GPS ports has been added to + &man.uhso.4;.</para> + + <para revision="265132">The &man.full.4; device has been added, + and the <literal>lindev(4)</literal> device has been removed. + Prior to this change, <literal>lindev(4)</literal> provided + only the <filename>/dev/full</filename> character device, + returning <literal>ENOSPC</literal> on write attempts. As + this device is not specific to &linux;, a native &os; version + has been added.</para> + + <para revision="271705">Hardware context support has been + added to the <literal>drm/i915</literal> driver, adding + support for <application>Mesa</application> 9.2 and + later.</para> + + <para revision="273178">The &man.vt.4; driver has been updated, + replacing the bitmapped <literal>kern.vt.spclkeys</literal> + &man.sysctl.8; with individual + <literal>kern.vt.kbd_*</literal> variants.</para> + + <para revision="273598">The &man.hpet.4; driver has been updated + to create a + <filename>/dev/hpet<replaceable>N</replaceable></filename> + device, providing access to <acronym>HPET</acronym> from + userspace.</para> + </sect2> + + <sect2 xml:id="drivers-storage"> + <title>Storage Drivers</title> + + <para revision="265236" contrib="sponsor" + sponsor="&lsi;, &spectralogic;" sponsorurl="">The &man.mpr.4; + device has been added, providing support for LSI Fusion-MPT + 3 12Gb SCSI/SATA controllers.</para> + + <para revision="265555" contrib="sponsor" + sponsor="&lsi;">The &man.mrsas.4; driver has been added, + providing support for LSI MegaRAID SAS controllers. The + &man.mfi.4; driver will attach to the controller, by default. + To enable &man.mrsas.4; add + <literal>hw.mfi.mrsas_enable=1</literal> to + <filename>/boot/loader.conf</filename>, which turns off + &man.mfi.4; device probing.</para> + + <note> + <para>At this time, the &man.mfiutil.8; utility and the &os; + version of <application>MegaCLI</application> and + <application>StorCli</application> do not work with + &man.mrsas.4;.</para> + </note> + + <para revision="275461" contrib="sponsor" sponsor="&ix;">The + &man.ctl.4; subsystem has been updated, increasing the ports + limit from <literal>128</literal> to <literal>256</literal>, + and <acronym>LUN</acronym> limit from <literal>256</literal> + to <literal>1024</literal>.</para> + + <para revision="276526">The <literal>asr(4)</literal> driver has + been removed, and is no longer supported.</para> + </sect2> + + <sect2 xml:id="drivers-network"> + <title>Network Drivers</title> + + <para revision="258830">Support for Broadcom chipsets BCM57764, + BCM57767, BCM57782, BCM57786 and BCM57787 has been added to + &man.bge.4;.</para> + + <para revision="260448">Support for the &intel; Centrino™ + Wireless-N 135 chipset has been added.</para> + + <para revision="260552">Firmware for &intel; Centrino™ + Wireless-N 105 devices has been added to the base + system.</para> + + <para revision="261975">The deprecated nve(4) driver has been + removed. Users of NVIDIA nForce MCP network adapters are + advised to use the &man.nfe.4; driver instead, which has been + the default driver for this hardware since + &os; 7.0.</para> + + <para revision="264601" contrib="sponsor" + sponsor="&darpa_afrl;">The <literal>if_nf10bmac(4)</literal> + device has been added, providing support for NetFPGA-10G + Embedded CPU Ethernet Core.</para> + + <note> + <para>The <literal>if_nf10bmac(4)</literal> driver operates on + the FPGA, and is not suited for the PCI host + interface.</para> + </note> + + <para revision="265348" contrib="sponsor" + sponsor="&netgate;">The &man.ath.hal.4; driver has been + updated to support the Atheros AR1111 chipset.</para> + + <para revision="266770">Support for the &intel; Centrino™ + Wireless-N 105 chipset has been added.</para> + + <para revision="266757" contrib="sponsor" + sponsor="&chelsio;">Support for the &man.cxgbe.4; Terminator + 5 (T5) 10G/40G cards has been added to &man.netmap.4;.</para> + + <para revision="272730">The &man.alc.4; driver has been updated + to support AR816x and AR817x ethernet controllers.</para> + + <para revision="273331">The &man.vxlan.4; driver has been added, + which creates a virtual Layer 2 (Ethernet) network overlaid in + a Layer 3 (IP/UDP) network. The &man.vxlan.4; driver is + analogous to &man.vlan.4;, but is designed to be better suited + for large, multiple-tenant datacenter environments.</para> + + <para revision="274246" contrib="sponsor" sponsor="&yandex;">The + &man.gre.4; driver has been significantly overhauled, and has + been split into two separate modules, &man.gre.4; and + &man.me.4;.</para> + </sect2> + </sect1> + + <sect1 xml:id="hardware"> + <title>Hardware Support</title> + + <para>This section covers general hardware support for physical + machines, hypervisors, and virtualization environments, as well + as hardware changes and updates that do not otherwise fit in + other sections of this document.</para> + + <sect2 xml:id="hardware-support"> + <title>Hardware Support</title> + + <para revision="268303">The &man.asmc.4; driver has been + updated to support the &apple; MacMini 3,1.</para> + + <para revision="268351">Support for &os;/ia64 has been dropped + as of &os; 11.</para> + + <para revision="274386">An issue that could cause a system to + hang when entering <acronym>ACPI</acronym> + <literal>S3</literal> state (suspend to + <acronym>RAM</acronym>) has been corrected in the &man.acpi.4; + and &man.pci.4; drivers.</para> + + <para revision="274733" arch="powerpc">The power management unit + subsystem has been updated to support power button events on + certain &arch.powerpc; hardware, such as aluminum + PowerBook ®.</para> + + <para revision="275171,275190" arch="powerpc">The &man.hwpmc.4; + driver has been updated to correct performance counter + sampling on G4 (MPC74xxx) and G5 class processors.</para> + + <para revision="275732" contrib="sponsor" + sponsor="&ff;,&netgate;">The + <application>OpenCrypto</application> framework has been + updated to include <literal>AES-ICM</literal> and + <literal>AES-GCM</literal> modes, both of which have also been + added to the &man.aesni.4; driver.</para> + </sect2> + + <sect2 xml:id="hardware-virtualization"> + <title>Virtualization Support</title> + + <para revision="260410">Support for the <quote>Virtual Interrupt + Delivery</quote> feature of &intel; VT-x is enabled if + supported by the CPU. This feature can be disabled by running + <literal>sysctl hw.vmm.vmx.use_apic_vid=0</literal>. + Additionally, to persist this setting across reboots, add + <literal>hw.vmm.vmx.use_apic_vid=0</literal> to + <filename>/etc/sysctl.conf</filename>.</para> + + <para revision="260532">Support for <quote>Posted Interrupt + Processing</quote> is enabled if supported by the CPU. This + feature can be disabled by running <literal>sysctl + hw.vmm.vmx.use_apic_pir=0</literal>. Additionally, to + persist this setting across reboots, add + <literal>hw.vmm.vmx.use_apic_pir=0</literal> to + <filename>/etc/sysctl.conf</filename>.</para> + + <para revision="260582">Unmapped IO support has been added to + &man.virtio_blk.4;.</para> + + <para revision="260583">Unmapped IO support has been added to + &man.virtio_scsi.4;.</para> + + <para revision="260847">The &man.virtio_random.4; driver has + been added to harvest entropy from the host system.</para> + + <para revision="261504">&os;/&arch.i386; guests can be run under + bhyve.</para> + + <para revision="267536" contrib="sponsor" + sponsor="&citrix.rd;">Support for running a &os;/&arch.amd64; + <application>Xen</application> guest instance as + <acronym>PVH</acronym> guest has been added. + <acronym>PVH</acronym> mode, short for <quote>Para-Virtualized + Hardware</quote>, uses para-virtualized drivers for boot and + I/O, and uses hardware virtualization extensions for all other + tasks, without the need for emulation.</para> + + <para revision="273515">The &man.virtio.console.4; driver has + been added, which provides an interface to VirtIO console + devices through a &man.tty.4; device.</para> + </sect2> + + <sect2 xml:id="hardware-arm"> + <title>ARM Support</title> + + <para revision="260921">The &man.nand.4; device is enabled for + ARM devices by default.</para> + + <para revision="273264" arch="armv6">An issue that could cause + instability when detecting <acronym>SD</acronym> cards on the + Raspberry Pi <acronym>SOC</acronym> has been fixed.</para> + + <para revision="275963">The <literal>bcm2835_cpufreq</literal> + driver has been added, which supports <acronym>CPU</acronym> + frequency and voltage control on the Raspberry Pi + <acronym>SOC</acronym>.</para> + </sect2> + </sect1> + + <sect1 xml:id="storage"> + <title>Storage</title> + + <para>This section covers changes and additions to file systems + and other storage subsystems, both local and networked.</para> + + <sect2 xml:id="storage-net"> + <title>Networked Storage</title> + + <para revision="270096" contrib="sponsor" sponsor="&ff;">The new + filesystem automount facility, &man.autofs.5;, has been added. + The new &man.autofs.5; facility is similar to that found in + other &unix;-like operating systems, such as OS X™ + and Solaris™. The &man.autofs.5; facility uses + a &sun;-compatible &man.auto.master.5; configuration file, and + is administered with the &man.automount.8; userland utility, + and the &man.automountd.8; and &man.autounmountd.8; + daemons.</para> + </sect2> + + <sect2 xml:id="storage-zfs"> + <title>ZFS</title> + + <para revision="275748">The <literal>arc_meta_limit</literal> + statistics are now visible through the + <literal>kstat</literal> &man.sysctl.8;. As a result of this + change, the <literal>vfs.zfs.arc_meta_used</literal> + &man.sysctl.8; has been removed, and replaced with the + <literal>kstat.zfs.misc.arcstats.arc_meta_used</literal> + &man.sysctl.8;.</para> </sect2> - <sect2 xml:id="doc"> - <title>Documentation</title> + <sect2 xml:id="storage-geom"> + <title>&man.geom.4;</title> + + <para revision="267359">Support for the + <literal>disklabel64</literal> partitioning scheme has been + added to &man.gpart.8;.</para> + </sect2> + </sect1> + + <sect1 xml:id="boot"> + <title>Boot Loader Changes</title> + + <para>This section covers the boot loader, boot menu, and other + boot-related changes.</para> + + <sect2 xml:id="boot-loader"> + <title>Boot Loader Changes</title> + + <para revision="274085">The &man.vt.4; driver has been made the + default system console driver. The &man.syscons.4; driver is + still available, and can be enabled by adding + <literal>kern.vty=sc</literal> in &man.loader.conf.5;. + Alternatively, &man.syscons.4; can be enabled at boot time by + entering <literal>set kern.vty=sc</literal> at the + &man.loader.8; prompt.</para> + </sect2> + + <sect2 xml:id="boot-menu"> + <title>Boot Menu Changes</title> <para> </para> </sect2> </sect1> - <sect1 xml:id="upgrade"> - <title>Upgrading from Previous Releases of &os;</title> + <sect1 xml:id="network"> + <title>Networking</title> - <para arch="amd64,i386">Binary upgrades between RELEASE versions - (and snapshots of the various security branches) are supported - using the &man.freebsd-update.8; utility. The binary upgrade - procedure will update unmodified userland utilities, as well as - unmodified GENERIC kernels distributed as a part of an official - &os; release. The &man.freebsd-update.8; utility requires that - the host being upgraded have Internet connectivity.</para> + <para>This section describes changes that affect networking in + &os;.</para> - <para>Source-based upgrades (those based on recompiling the &os; - base system from source code) from previous versions are - supported, according to the instructions in - <filename>/usr/src/UPDATING</filename>.</para> + <sect2 xml:id="network-protocols"> + <title>Network Procols</title> - <important> - <para>Upgrading &os; should only be attempted after backing up - <emphasis>all</emphasis> data and configuration files.</para> - </important> + <para revision="263140">Support for the IPX network transport + protocol has been removed, and will not be supported in + &os; 11 and later releases.</para> + + <para revision="272720" contrib="sponsor" + sponsor="&limelight;">Support for <acronym>PLPMTUD</acronym> + blackhole detection (<acronym>RFC</acronym> 4821) has been + added to the &man.tcp.4; stack, disabled by default. New + control tunables have been added:</para> + + <informaltable frame="none" pgwide="0"> + <tgroup cols="2"> + <colspec colwidth="1*"/> + <colspec colwidth="1*"/> + <thead> + <row> + <entry>Tunable</entry> + <entry>Description</entry> + </row> + </thead> + + <tbody> + <row> + <entry><literal>net.inet.tcp.pmtud_blackhole_detection</literal></entry> + <entry>Enables or disables <acronym>PLPMTUD</acronym> + blackhole detection</entry> + </row> + + <row> + <entry><literal>net.inet.tcp.pmtud_blackhole_mss</literal></entry> + <entry><acronym>MSS</acronym> to try for IPv4</entry> + </row> + + <row> + <entry><literal>net.inet.tcp.v6pmtud_blackhole_mss</literal></entry> + <entry><acronym>MSS to try for IPv6</acronym></entry> + </row> + </tbody> + </tgroup> + </informaltable> + + <para>New monitoring &man.sysctl.8;s haven been added:</para> + + <informaltable frame="none" pgwide="0"> + <tgroup cols="2"> + <colspec colwidth="1*"/> + <colspec colwidth="1*"/> + <thead> + <row> + <entry>Tunable</entry> + <entry>Description</entry> + </row> + </thead> + + <tbody> + <row> + <entry><literal>net.inet.tcp.pmtud_blackhole_activated</literal></entry> + <entry>Number of times the code was activated to attempt + downshifting the <acronym>MSS</acronym></entry> + </row> + + <row> + <entry><literal>net.inet.tcp.pmtud_blackhole_min_activated</literal></entry> + <entry>Number of times the blackhole + <acronym>MSS</acronym> was used in an attempt to + downshift</entry> + </row> + + <row> + <entry><literal>net.inet.tcp.pmtud_blackhole_failed</literal></entry> + <entry>Number of times that the blackhole failed to + connect after downshifting the + <acronym>MSS</acronym></entry> + </row> + </tbody> + </tgroup> + </informaltable> + </sect2> + </sect1> + + <sect1 xml:id="ports"> + <title>Ports Collection and Package Infrastructure</title> + + <para>This section covers changes to the &os; Ports + Collection, package infrastructure, and package maintenance and + installation tools.</para> + + <sect2 xml:id="ports-infrastructure"> + <title>Infrastructure Changes</title> + + <para> </para> + </sect2> + + <sect2 xml:id="ports-packages "> + <title>Packaging Changes</title> + + <para> </para> + </sect2> + </sect1> + + <sect1 xml:id="doc"> + <title>Documentation</title> + + <para>This section covers changes to the &os; Documentation + Project sources and toolchain.</para> + + <sect2 xml:id="doc-sources"> + <title>Documentation Source Changes</title> + + <para> </para> + </sect2> + + <sect2 xml:id="doc-toolchain"> + <title>Documentation Toolchain Changes</title> + + <para> </para> + </sect2> + </sect1> + + <sect1 xml:id="releng"> + <title>Release Engineering and Integration</title> + + <para>This section convers changes that are specific to the + &os; Release Engineering processes.</para> + + <sect2 xml:id="releng-changes"> + <title>Integration Changes</title> + + <para revision="277458" contrib="sponsor" sponsor="&ff;">The + Release Engineering build tools have been updated to include + support for producing virtual machine disk images for various + cloud hosting providers.</para> + </sect2> </sect1> </article> diff --git a/release/release.sh b/release/release.sh index 616ae96..01a1727 100755 --- a/release/release.sh +++ b/release/release.sh @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2013, 2014 The FreeBSD Foundation +# Copyright (c) 2013-2015 The FreeBSD Foundation # Copyright (c) 2013 Glen Barber # Copyright (c) 2011 Nathan Whitehorn # All rights reserved. diff --git a/release/tools/gce.conf b/release/tools/gce.conf index 216a419..c8af650 100644 --- a/release/tools/gce.conf +++ b/release/tools/gce.conf @@ -9,7 +9,8 @@ export VM_EXTRA_PACKAGES="firstboot-freebsd-update firstboot-pkgs \ google-startup-scripts" # Set to a list of third-party software to enable in rc.conf(5). -export VM_RC_LIST="google_accounts_manager ntpd" +export VM_RC_LIST="google_accounts_manager ntpd sshd firstboot_growfs \ + firstboot_pkgs google_startup" vm_extra_install_base() { echo 'search google.internal' > ${DESTDIR}/etc/resolv.conf @@ -20,19 +21,18 @@ vm_extra_install_base() { vm_extra_pre_umount() { cat << EOF >> ${DESTDIR}/etc/rc.conf dumpdev="AUTO" -ifconfig_vtnet0="SYNCDHCP mtu 1460" +ifconfig_DEFAULT="SYNCDHCP mtu 1460" ntpd_sync_on_start="YES" -ntpd_enable="YES" -sshd_enable="YES" -google_accounts_manager_enable="YES" -#disabled until I can figure out why the reboot for updates is hanging -#firstboot_freebsd_update_enable="YES" -#firstboot_pkgs_enable="YES" +case \$(uname -r) in + *-BETA*|*-RC*|*-RELEASE*) + firstboot_freebsd_update_enable="YES" + ;; + *) + ;; +esac # need to fill in something here #firstboot_pkgs_list="" panicmail_autosubmit="YES" -firstboot_growfs_enable="YES" -google_startup_enable="YES" EOF cat << EOF >> ${DESTDIR}/boot/loader.conf diff --git a/share/examples/Makefile b/share/examples/Makefile index 7e0576c..29d3dca 100644 --- a/share/examples/Makefile +++ b/share/examples/Makefile @@ -18,7 +18,6 @@ LDIRS= BSD_daemon \ ipfw \ jails \ kld \ - libusb20 \ libvgl \ mdoc \ netgraph \ @@ -92,12 +91,6 @@ XFILES= BSD_daemon/FreeBSD.pfa \ kld/syscall/module/syscall.c \ kld/syscall/test/Makefile \ kld/syscall/test/call.c \ - libusb20/Makefile \ - libusb20/README \ - libusb20/util.c \ - libusb20/util.h \ - libusb20/bulk.c \ - libusb20/control.c \ libvgl/Makefile \ libvgl/demo.c \ mdoc/POSIX-copyright \ @@ -203,6 +196,16 @@ XFILES+= hast/ucarp.sh \ hast/vip-up.sh .endif +.if ${MK_USB} != "no" +LDIRS+= libusb20 +XFILES+= libusb20/Makefile \ + libusb20/README \ + libusb20/util.c \ + libusb20/util.h \ + libusb20/bulk.c \ + libusb20/control.c +.endif + .if ${MACHINE_CPUARCH} == "amd64" .if ${MK_BHYVE} != "no" LDIRS+= bhyve diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index afdd16e..e6f21ba 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -503,56 +503,6 @@ MAN= aac.4 \ tws.4 \ tx.4 \ txp.4 \ - u3g.4 \ - uark.4 \ - uart.4 \ - uath.4 \ - ubsa.4 \ - ubsec.4 \ - ubser.4 \ - ubtbcmfw.4 \ - uchcom.4 \ - ucom.4 \ - ucycom.4 \ - udav.4 \ - udbp.4 \ - udp.4 \ - udplite.4 \ - uep.4 \ - ufm.4 \ - ufoma.4 \ - uftdi.4 \ - ugen.4 \ - uhci.4 \ - uhid.4 \ - uhso.4 \ - uipaq.4 \ - ukbd.4 \ - uled.4 \ - ulpt.4 \ - umass.4 \ - umcs.4 \ - umct.4 \ - umodem.4 \ - umoscom.4 \ - ums.4 \ - unix.4 \ - upgt.4 \ - uplcom.4 \ - ural.4 \ - urio.4 \ - urndis.4 \ - ${_urtw.4} \ - urtwn.4 \ - urtwnfw.4 \ - usb.4 \ - usb_template.4 \ - usb_quirk.4 \ - uslcom.4 \ - usfs.4 \ - utopia.4 \ - uvisor.4 \ - uvscom.4 \ vale.4 \ vga.4 \ vge.4 \ @@ -735,13 +685,6 @@ MLINKS+=tl.4 if_tl.4 MLINKS+=tun.4 if_tun.4 MLINKS+=tx.4 if_tx.4 MLINKS+=txp.4 if_txp.4 -MLINKS+=u3g.4 u3gstub.4 -MLINKS+=uath.4 if_uath.4 -MLINKS+=udav.4 if_udav.4 -MLINKS+=upgt.4 if_upgt.4 -MLINKS+=ural.4 if_ural.4 -MLINKS+=urndis.4 if_urndis.4 -MLINKS+=${_urtw.4} ${_if_urtw.4} MLINKS+=vge.4 if_vge.4 MLINKS+=vlan.4 if_vlan.4 MLINKS+=vxlan.4 if_vxlan.4 @@ -883,4 +826,66 @@ _pflog.4= pflog.4 _pfsync.4= pfsync.4 .endif +.if ${MK_USB} != "no" +MAN+= \ + u3g.4 \ + uark.4 \ + uart.4 \ + uath.4 \ + ubsa.4 \ + ubsec.4 \ + ubser.4 \ + ubtbcmfw.4 \ + uchcom.4 \ + ucom.4 \ + ucycom.4 \ + udav.4 \ + udbp.4 \ + udp.4 \ + udplite.4 \ + uep.4 \ + ufm.4 \ + ufoma.4 \ + uftdi.4 \ + ugen.4 \ + uhci.4 \ + uhid.4 \ + uhso.4 \ + uipaq.4 \ + ukbd.4 \ + uled.4 \ + ulpt.4 \ + umass.4 \ + umcs.4 \ + umct.4 \ + umodem.4 \ + umoscom.4 \ + ums.4 \ + unix.4 \ + upgt.4 \ + uplcom.4 \ + ural.4 \ + urio.4 \ + urndis.4 \ + ${_urtw.4} \ + urtwn.4 \ + urtwnfw.4 \ + usb.4 \ + usb_quirk.4 \ + usb_template.4 \ + usfs.4 \ + uslcom.4 \ + utopia.4 \ + uvisor.4 \ + uvscom.4 \ + +MLINKS+=u3g.4 u3gstub.4 +MLINKS+=uath.4 if_uath.4 +MLINKS+=udav.4 if_udav.4 +MLINKS+=upgt.4 if_upgt.4 +MLINKS+=ural.4 if_ural.4 +MLINKS+=urndis.4 if_urndis.4 +MLINKS+=${_urtw.4} ${_if_urtw.4} +.endif + .include <bsd.prog.mk> diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 4795fe1..0d1014c 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des .\" $FreeBSD$ -.Dd January 25, 2015 +.Dd February 4, 2015 .Dt SRC.CONF 5 .Os .Sh NAME @@ -154,6 +154,14 @@ Set to not build Bluetooth related kernel modules, programs and libraries. .It Va WITHOUT_BOOT .\" from FreeBSD: head/tools/build/options/WITHOUT_BOOT 156932 2006-03-21 07:50:50Z ru Set to not build the boot blocks and loader. +.It Va WITHOUT_BOOTPARAMD +.\" from FreeBSD: head/tools/build/options/WITHOUT_BOOTPARAMD 278192 2015-02-04 10:19:32Z ngie +Set to not build or install +.Xr bootparamd 8 . +.It Va WITHOUT_BOOTPD +.\" from FreeBSD: head/tools/build/options/WITHOUT_BOOTPD 278192 2015-02-04 10:19:32Z ngie +Set to not build or install +.Xr bootpd 8 . .It Va WITHOUT_BSDINSTALL .\" from FreeBSD: head/tools/build/options/WITHOUT_BSDINSTALL 277677 2015-01-25 04:43:13Z ngie Set to not build @@ -430,6 +438,17 @@ Set to avoid installing examples to .\" from FreeBSD: head/tools/build/options/WITHOUT_FDT 221539 2011-05-06 19:10:27Z ru Set to not build Flattened Device Tree support as part of the base system. This includes the device tree compiler (dtc) and libfdt support library. +.It Va WITHOUT_FILE +.\" from FreeBSD: head/tools/build/options/WITHOUT_FILE 278193 2015-02-04 10:24:40Z ngie +Set to not build +.Xr file 1 +and related programs. +.It Va WITHOUT_FINGER +.\" from FreeBSD: head/tools/build/options/WITHOUT_FINGER 278192 2015-02-04 10:19:32Z ngie +Set to not build or install +.Xr finger 1 +and +.Xr fingerd 8 . .It Va WITHOUT_FLOPPY .\" from FreeBSD: head/tools/build/options/WITHOUT_FLOPPY 221540 2011-05-06 19:13:03Z ru Set to not build or install programs @@ -461,6 +480,12 @@ without floating-point support. .\" from FreeBSD: head/tools/build/options/WITHOUT_FREEBSD_UPDATE 183242 2008-09-21 22:02:26Z sam Set to not build .Xr freebsd-update 8 . +.It Va WITHOUT_FTP +.\" from FreeBSD: head/tools/build/options/WITHOUT_FTP 278192 2015-02-04 10:19:32Z ngie +Set to not build or install +.Xr ftp 1 +and +.Xr ftpd 8 . .It Va WITHOUT_GAMES .\" from FreeBSD: head/tools/build/options/WITHOUT_GAMES 156932 2006-03-21 07:50:50Z ru Set to not build games. @@ -602,6 +627,10 @@ When set, it also enforces the following options: .It Va WITHOUT_INET6_SUPPORT .\" from FreeBSD: head/tools/build/options/WITHOUT_INET6_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build libraries, programs, and kernel modules without IPv6 support. +.It Va WITHOUT_INETD +.\" from FreeBSD: head/tools/build/options/WITHOUT_INETD 278192 2015-02-04 10:19:32Z ngie +Set to not build +.Xr inetd 8 . .It Va WITHOUT_INET_SUPPORT .\" from FreeBSD: head/tools/build/options/WITHOUT_INET_SUPPORT 221266 2011-04-30 17:58:28Z bz Set to build libraries, programs, and kernel modules without IPv4 support. @@ -977,6 +1006,16 @@ Set to avoid compiling profiled libraries. Set to not build .Xr quota 8 and related programs. +.It Va WITHOUT_RADIUS_SUPPORT +.\" from FreeBSD: head/tools/build/options/WITHOUT_RADIUS_SUPPORT 278182 2015-02-04 06:53:45Z ngie +Set to not build radius support into various applications, like +.Xr pam_radius 8 +and +.Xr ppp 8 . +.It Va WITHOUT_RBOOTD +.\" from FreeBSD: head/tools/build/options/WITHOUT_RBOOTD 278192 2015-02-04 10:19:32Z ngie +Set to not build or install +.Xr rbootd 8 . .It Va WITHOUT_RCMDS .\" from FreeBSD: head/tools/build/options/WITHOUT_RCMDS 156932 2006-03-21 07:50:50Z ru Disable building of the @@ -1080,6 +1119,11 @@ Set to not build or install .Xr talk 1 and .Xr talkd 8 . +.It Va WITHOUT_TCP_WRAPPERS +.\" from FreeBSD: head/tools/build/options/WITHOUT_TCP_WRAPPERS 278192 2015-02-04 10:19:32Z ngie +Set to not build or install +.Xr tcpd 8 , +and related utilities. .It Va WITHOUT_TCSH .\" from FreeBSD: head/tools/build/options/WITHOUT_TCSH 156932 2006-03-21 07:50:50Z ru Set to not build and install @@ -1120,6 +1164,16 @@ When set, it also enforces the following options: .It .Va WITHOUT_GROFF .El +.It Va WITHOUT_TFTP +.\" from FreeBSD: head/tools/build/options/WITHOUT_TFTP 278192 2015-02-04 10:19:32Z ngie +Set to not build or install +.Xr tftp 1 +and +.Xr tftpd 8 . +.It Va WITHOUT_TIMED +.\" from FreeBSD: head/tools/build/options/WITHOUT_TIMED 278192 2015-02-04 10:19:32Z ngie +Set to not build or install +.Xr timed 8 . .It Va WITHOUT_TOOLCHAIN .\" from FreeBSD: head/tools/build/options/WITHOUT_TOOLCHAIN 273172 2014-10-16 15:55:13Z brooks Set to not install header or diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index ddd46aa..e841290 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1,5 +1,7 @@ # $FreeBSD$ +.include <src.opts.mk> + MAN= accept_filter.9 \ accf_data.9 \ accf_dns.9 \ @@ -271,7 +273,6 @@ MAN= accept_filter.9 \ uidinfo.9 \ uio.9 \ unr.9 \ - usbdi.9 \ utopia.9 \ vaccess.9 \ vaccess_acl_nfs4.9 \ @@ -1593,6 +1594,9 @@ MLINKS+=uidinfo.9 uifind.9 \ uidinfo.9 uihold.9 MLINKS+=uio.9 uiomove.9 \ uio.9 uiomove_nofault.9 + +.if ${MK_USB} != "no" +MAN+= usbdi.9 MLINKS+=usbdi.9 usbd_do_request.9 \ usbdi.9 usbd_do_request_flags.9 \ usbdi.9 usbd_errstr.9 \ @@ -1644,6 +1648,7 @@ MLINKS+=usbdi.9 usbd_do_request.9 \ usbdi.9 usb_fifo_reset.9 \ usbdi.9 usb_fifo_softc.9 \ usbdi.9 usb_fifo_wakeup.9 +.endif MLINKS+=vcount.9 count_dev.9 MLINKS+=vfsconf.9 vfs_modevent.9 \ vfsconf.9 vfs_register.9 \ diff --git a/share/misc/Makefile b/share/misc/Makefile index 3e2afc4..16f803c 100644 --- a/share/misc/Makefile +++ b/share/misc/Makefile @@ -1,15 +1,22 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/8/93 # $FreeBSD$ +.include <src.opts.mk> + .PATH: ${.CURDIR}/../../sys/dev/usb FILES= ascii birthtoken bsd-family-tree committers-doc.dot committers-ports.dot \ committers-src.dot eqnchar flowers init.ee \ iso3166 iso639 latin1 man.template mdoc.template operator pci_vendors \ - scsi_modes usb_hid_usages usbdevs \ + scsi_modes \ organization.dot NO_OBJ= FILESDIR= ${BINDIR}/misc +.if ${MK_USB} != "no" +FILES+= usb_hid_usages +FILES+= usbdevs +.endif + .include <bsd.prog.mk> diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 0609a9e..fca992b 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -58,6 +58,8 @@ __DEFAULT_YES_OPTIONS = \ BINUTILS_BOOTSTRAP \ BLUETOOTH \ BOOT \ + BOOTPARAMD \ + BOOTPD \ BSD_CPIO \ BSDINSTALL \ BSNMP \ @@ -81,11 +83,14 @@ __DEFAULT_YES_OPTIONS = \ ELFTOOLCHAIN_TOOLS \ EXAMPLES \ FDT \ + FILE \ + FINGER \ FLOPPY \ FMTREE \ FORTH \ FP_LIBC \ FREEBSD_UPDATE \ + FTP \ GAMES \ GCOV \ GDB \ @@ -100,6 +105,7 @@ __DEFAULT_YES_OPTIONS = \ ICONV \ INET \ INET6 \ + INETD \ IPFILTER \ IPFW \ ISCSI \ @@ -135,7 +141,9 @@ __DEFAULT_YES_OPTIONS = \ PORTSNAP \ PPP \ QUOTAS \ + RADIUS_SUPPORT \ RCMDS \ + RBOOTD \ RCS \ RESCUE \ ROUTED \ @@ -150,10 +158,13 @@ __DEFAULT_YES_OPTIONS = \ SYSCONS \ SYSINSTALL \ TALK \ + TCP_WRAPPERS \ TCSH \ TELNET \ TESTS \ TEXTPROC \ + TFTP \ + TIMED \ UNBOUND \ USB \ UTMPX \ diff --git a/sys/amd64/include/pvclock.h b/sys/amd64/include/pvclock.h new file mode 100644 index 0000000..f01fac6 --- /dev/null +++ b/sys/amd64/include/pvclock.h @@ -0,0 +1,6 @@ +/*- + * This file is in the public domain. + */ +/* $FreeBSD$ */ + +#include <x86/pvclock.h> diff --git a/sys/arm/broadcom/bcm2835/bcm2835_gpio.c b/sys/arm/broadcom/bcm2835/bcm2835_gpio.c index 2a3cebd..97256f7 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_gpio.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_gpio.c @@ -31,26 +31,19 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/systm.h> #include <sys/bus.h> - +#include <sys/gpio.h> +#include <sys/interrupt.h> #include <sys/kernel.h> -#include <sys/module.h> -#include <sys/rman.h> #include <sys/lock.h> +#include <sys/module.h> #include <sys/mutex.h> -#include <sys/gpio.h> +#include <sys/rman.h> #include <sys/sysctl.h> #include <machine/bus.h> -#include <machine/cpu.h> -#include <machine/cpufunc.h> -#include <machine/resource.h> -#include <machine/fdt.h> -#include <machine/intr.h> -#include <dev/fdt/fdt_common.h> #include <dev/gpio/gpiobusvar.h> #include <dev/ofw/ofw_bus.h> -#include <dev/ofw/ofw_bus_subr.h> #include <arm/broadcom/bcm2835/bcm2835_gpio.h> @@ -65,6 +58,7 @@ __FBSDID("$FreeBSD$"); #define BCM_GPIO_IRQS 4 #define BCM_GPIO_PINS 54 +#define BCM_GPIO_PINS_PER_BANK 32 #define BCM_GPIO_DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT | \ GPIO_PIN_PULLUP | GPIO_PIN_PULLDOWN) @@ -89,12 +83,15 @@ struct bcm_gpio_softc { struct resource * sc_res[BCM_GPIO_IRQS + 1]; bus_space_tag_t sc_bst; bus_space_handle_t sc_bsh; - void * sc_intrhand; + void * sc_intrhand[BCM_GPIO_IRQS]; int sc_gpio_npins; int sc_ro_npins; int sc_ro_pins[BCM_GPIO_PINS]; struct gpio_pin sc_gpio_pins[BCM_GPIO_PINS]; + struct intr_event * sc_events[BCM_GPIO_PINS]; struct bcm_gpio_sysctl sc_sysctl[BCM_GPIO_PINS]; + enum intr_trigger sc_irq_trigger[BCM_GPIO_PINS]; + enum intr_polarity sc_irq_polarity[BCM_GPIO_PINS]; }; enum bcm_gpio_pud { @@ -103,21 +100,35 @@ enum bcm_gpio_pud { BCM_GPIO_PULLUP, }; -#define BCM_GPIO_LOCK(_sc) mtx_lock(&_sc->sc_mtx) -#define BCM_GPIO_UNLOCK(_sc) mtx_unlock(&_sc->sc_mtx) -#define BCM_GPIO_LOCK_ASSERT(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED) - -#define BCM_GPIO_GPFSEL(_bank) 0x00 + _bank * 4 -#define BCM_GPIO_GPSET(_bank) 0x1c + _bank * 4 -#define BCM_GPIO_GPCLR(_bank) 0x28 + _bank * 4 -#define BCM_GPIO_GPLEV(_bank) 0x34 + _bank * 4 -#define BCM_GPIO_GPPUD(_bank) 0x94 -#define BCM_GPIO_GPPUDCLK(_bank) 0x98 + _bank * 4 - +#define BCM_GPIO_LOCK(_sc) mtx_lock_spin(&(_sc)->sc_mtx) +#define BCM_GPIO_UNLOCK(_sc) mtx_unlock_spin(&(_sc)->sc_mtx) +#define BCM_GPIO_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED) #define BCM_GPIO_WRITE(_sc, _off, _val) \ - bus_space_write_4(_sc->sc_bst, _sc->sc_bsh, _off, _val) + bus_space_write_4((_sc)->sc_bst, (_sc)->sc_bsh, _off, _val) #define BCM_GPIO_READ(_sc, _off) \ - bus_space_read_4(_sc->sc_bst, _sc->sc_bsh, _off) + bus_space_read_4((_sc)->sc_bst, (_sc)->sc_bsh, _off) +#define BCM_GPIO_CLEAR_BITS(_sc, _off, _bits) \ + BCM_GPIO_WRITE(_sc, _off, BCM_GPIO_READ(_sc, _off) & ~(_bits)) +#define BCM_GPIO_SET_BITS(_sc, _off, _bits) \ + BCM_GPIO_WRITE(_sc, _off, BCM_GPIO_READ(_sc, _off) | _bits) +#define BCM_GPIO_BANK(a) (a / BCM_GPIO_PINS_PER_BANK) +#define BCM_GPIO_MASK(a) (1U << (a % BCM_GPIO_PINS_PER_BANK)) + +#define BCM_GPIO_GPFSEL(_bank) (0x00 + _bank * 4) /* Function Select */ +#define BCM_GPIO_GPSET(_bank) (0x1c + _bank * 4) /* Pin Out Set */ +#define BCM_GPIO_GPCLR(_bank) (0x28 + _bank * 4) /* Pin Out Clear */ +#define BCM_GPIO_GPLEV(_bank) (0x34 + _bank * 4) /* Pin Level */ +#define BCM_GPIO_GPEDS(_bank) (0x40 + _bank * 4) /* Event Status */ +#define BCM_GPIO_GPREN(_bank) (0x4c + _bank * 4) /* Rising Edge irq */ +#define BCM_GPIO_GPFEN(_bank) (0x58 + _bank * 4) /* Falling Edge irq */ +#define BCM_GPIO_GPHEN(_bank) (0x64 + _bank * 4) /* High Level irq */ +#define BCM_GPIO_GPLEN(_bank) (0x70 + _bank * 4) /* Low Level irq */ +#define BCM_GPIO_GPAREN(_bank) (0x7c + _bank * 4) /* Async Rising Edge */ +#define BCM_GPIO_GPAFEN(_bank) (0x88 + _bank * 4) /* Async Falling Egde */ +#define BCM_GPIO_GPPUD(_bank) (0x94) /* Pin Pull up/down */ +#define BCM_GPIO_GPPUDCLK(_bank) (0x98 + _bank * 4) /* Pin Pull up clock */ + +static struct bcm_gpio_softc *bcm_gpio_sc = NULL; static int bcm_gpio_pin_is_ro(struct bcm_gpio_softc *sc, int pin) @@ -665,6 +676,40 @@ bcm_gpio_get_reserved_pins(struct bcm_gpio_softc *sc) } static int +bcm_gpio_intr(void *arg) +{ + int bank_last, irq; + struct bcm_gpio_softc *sc; + struct intr_event *event; + uint32_t bank, mask, reg; + + sc = (struct bcm_gpio_softc *)arg; + reg = 0; + bank_last = -1; + for (irq = 0; irq < BCM_GPIO_PINS; irq++) { + bank = BCM_GPIO_BANK(irq); + mask = BCM_GPIO_MASK(irq); + if (bank != bank_last) { + reg = BCM_GPIO_READ(sc, BCM_GPIO_GPEDS(bank)); + bank_last = bank; + } + if (reg & mask) { + event = sc->sc_events[irq]; + if (event != NULL && !TAILQ_EMPTY(&event->ie_handlers)) + intr_event_handle(event, NULL); + else { + device_printf(sc->sc_dev, "Stray IRQ %d\n", + irq); + } + /* Clear the Status bit by writing '1' to it. */ + BCM_GPIO_WRITE(sc, BCM_GPIO_GPEDS(bank), mask); + } + } + + return (FILTER_HANDLED); +} + +static int bcm_gpio_probe(device_t dev) { @@ -679,6 +724,39 @@ bcm_gpio_probe(device_t dev) } static int +bcm_gpio_intr_attach(device_t dev) +{ + struct bcm_gpio_softc *sc; + int i; + + sc = device_get_softc(dev); + for (i = 0; i < BCM_GPIO_IRQS; i++) { + if (bus_setup_intr(dev, sc->sc_res[i + 1], + INTR_TYPE_MISC | INTR_MPSAFE, bcm_gpio_intr, + NULL, sc, &sc->sc_intrhand[i]) != 0) { + return (-1); + } + } + + return (0); +} + +static void +bcm_gpio_intr_detach(device_t dev) +{ + struct bcm_gpio_softc *sc; + int i; + + sc = device_get_softc(dev); + for (i = 0; i < BCM_GPIO_IRQS; i++) { + if (sc->sc_intrhand[i]) { + bus_teardown_intr(dev, sc->sc_res[i + 1], + sc->sc_intrhand[i]); + } + } +} + +static int bcm_gpio_attach(device_t dev) { int i, j; @@ -686,30 +764,34 @@ bcm_gpio_attach(device_t dev) struct bcm_gpio_softc *sc; uint32_t func; - sc = device_get_softc(dev); - sc->sc_dev = dev; - mtx_init(&sc->sc_mtx, "bcm gpio", "gpio", MTX_DEF); + if (bcm_gpio_sc != NULL) + return (ENXIO); + + bcm_gpio_sc = sc = device_get_softc(dev); + sc->sc_dev = dev; + mtx_init(&sc->sc_mtx, "bcm gpio", "gpio", MTX_SPIN); if (bus_alloc_resources(dev, bcm_gpio_res_spec, sc->sc_res) != 0) { device_printf(dev, "cannot allocate resources\n"); goto fail; } sc->sc_bst = rman_get_bustag(sc->sc_res[0]); sc->sc_bsh = rman_get_bushandle(sc->sc_res[0]); - + /* Setup the GPIO interrupt handler. */ + if (bcm_gpio_intr_attach(dev)) { + device_printf(dev, "unable to setup the gpio irq handler\n"); + goto fail; + } /* Find our node. */ gpio = ofw_bus_get_node(sc->sc_dev); - if (!OF_hasprop(gpio, "gpio-controller")) /* Node is not a GPIO controller. */ goto fail; - /* * Find the read-only pins. These are pins we never touch or bad * things could happen. */ if (bcm_gpio_get_reserved_pins(sc) == -1) goto fail; - /* Initialize the software controlled pins. */ for (i = 0, j = 0; j < BCM_GPIO_PINS; j++) { snprintf(sc->sc_gpio_pins[i].gp_name, GPIOMAXNAME, @@ -718,6 +800,9 @@ bcm_gpio_attach(device_t dev) sc->sc_gpio_pins[i].gp_pin = j; sc->sc_gpio_pins[i].gp_caps = BCM_GPIO_DEFAULT_CAPS; sc->sc_gpio_pins[i].gp_flags = bcm_gpio_func_flag(func); + /* The default is active-low interrupts. */ + sc->sc_irq_trigger[i] = INTR_TRIGGER_LEVEL; + sc->sc_irq_polarity[i] = INTR_POLARITY_LOW; i++; } sc->sc_gpio_npins = i; @@ -729,6 +814,7 @@ bcm_gpio_attach(device_t dev) return (0); fail: + bcm_gpio_intr_detach(dev); bus_release_resources(dev, bcm_gpio_res_spec, sc->sc_res); mtx_destroy(&sc->sc_mtx); @@ -742,6 +828,177 @@ bcm_gpio_detach(device_t dev) return (EBUSY); } +static uint32_t +bcm_gpio_intr_reg(struct bcm_gpio_softc *sc, unsigned int irq, uint32_t bank) +{ + + if (irq > BCM_GPIO_PINS) + return (0); + if (sc->sc_irq_trigger[irq] == INTR_TRIGGER_LEVEL) { + if (sc->sc_irq_polarity[irq] == INTR_POLARITY_LOW) + return (BCM_GPIO_GPLEN(bank)); + else if (sc->sc_irq_polarity[irq] == INTR_POLARITY_HIGH) + return (BCM_GPIO_GPHEN(bank)); + } else if (sc->sc_irq_trigger[irq] == INTR_TRIGGER_EDGE) { + if (sc->sc_irq_polarity[irq] == INTR_POLARITY_LOW) + return (BCM_GPIO_GPFEN(bank)); + else if (sc->sc_irq_polarity[irq] == INTR_POLARITY_HIGH) + return (BCM_GPIO_GPREN(bank)); + } + + return (0); +} + +static void +bcm_gpio_mask_irq(void *source) +{ + uint32_t bank, mask, reg; + unsigned int irq; + + irq = (unsigned int)source; + if (irq > BCM_GPIO_PINS) + return; + if (bcm_gpio_pin_is_ro(bcm_gpio_sc, irq)) + return; + bank = BCM_GPIO_BANK(irq); + mask = BCM_GPIO_MASK(irq); + BCM_GPIO_LOCK(bcm_gpio_sc); + reg = bcm_gpio_intr_reg(bcm_gpio_sc, irq, bank); + if (reg != 0) + BCM_GPIO_CLEAR_BITS(bcm_gpio_sc, reg, mask); + BCM_GPIO_UNLOCK(bcm_gpio_sc); +} + +static void +bcm_gpio_unmask_irq(void *source) +{ + uint32_t bank, mask, reg; + unsigned int irq; + + irq = (unsigned int)source; + if (irq > BCM_GPIO_PINS) + return; + if (bcm_gpio_pin_is_ro(bcm_gpio_sc, irq)) + return; + bank = BCM_GPIO_BANK(irq); + mask = BCM_GPIO_MASK(irq); + BCM_GPIO_LOCK(bcm_gpio_sc); + reg = bcm_gpio_intr_reg(bcm_gpio_sc, irq, bank); + if (reg != 0) + BCM_GPIO_SET_BITS(bcm_gpio_sc, reg, mask); + BCM_GPIO_UNLOCK(bcm_gpio_sc); +} + +static int +bcm_gpio_activate_resource(device_t bus, device_t child, int type, int rid, + struct resource *res) +{ + int pin; + + if (type != SYS_RES_IRQ) + return (ENXIO); + /* Unmask the interrupt. */ + pin = rman_get_start(res); + bcm_gpio_unmask_irq((void *)pin); + + return (0); +} + +static int +bcm_gpio_deactivate_resource(device_t bus, device_t child, int type, int rid, + struct resource *res) +{ + int pin; + + if (type != SYS_RES_IRQ) + return (ENXIO); + /* Mask the interrupt. */ + pin = rman_get_start(res); + bcm_gpio_mask_irq((void *)pin); + + return (0); +} + +static int +bcm_gpio_config_intr(device_t dev, int irq, enum intr_trigger trig, + enum intr_polarity pol) +{ + int bank; + struct bcm_gpio_softc *sc; + uint32_t mask, oldreg, reg; + + if (irq > BCM_GPIO_PINS) + return (EINVAL); + /* There is no standard trigger or polarity. */ + if (trig == INTR_TRIGGER_CONFORM || pol == INTR_POLARITY_CONFORM) + return (EINVAL); + sc = device_get_softc(dev); + if (bcm_gpio_pin_is_ro(sc, irq)) + return (EINVAL); + bank = BCM_GPIO_BANK(irq); + mask = BCM_GPIO_MASK(irq); + BCM_GPIO_LOCK(sc); + oldreg = bcm_gpio_intr_reg(sc, irq, bank); + sc->sc_irq_trigger[irq] = trig; + sc->sc_irq_polarity[irq] = pol; + reg = bcm_gpio_intr_reg(sc, irq, bank); + if (reg != 0) + BCM_GPIO_SET_BITS(sc, reg, mask); + if (reg != oldreg && oldreg != 0) + BCM_GPIO_CLEAR_BITS(sc, oldreg, mask); + BCM_GPIO_UNLOCK(sc); + + return (0); +} + +static int +bcm_gpio_setup_intr(device_t bus, device_t child, struct resource *ires, + int flags, driver_filter_t *filt, driver_intr_t *handler, + void *arg, void **cookiep) +{ + struct bcm_gpio_softc *sc; + struct intr_event *event; + int pin, error; + + sc = device_get_softc(bus); + pin = rman_get_start(ires); + if (pin > BCM_GPIO_PINS) + panic("%s: bad pin %d", __func__, pin); + event = sc->sc_events[pin]; + if (event == NULL) { + error = intr_event_create(&event, (void *)pin, 0, pin, + bcm_gpio_mask_irq, bcm_gpio_unmask_irq, NULL, NULL, + "gpio%d pin%d:", device_get_unit(bus), pin); + if (error != 0) + return (error); + sc->sc_events[pin] = event; + } + intr_event_add_handler(event, device_get_nameunit(child), filt, + handler, arg, intr_priority(flags), flags, cookiep); + + return (0); +} + +static int +bcm_gpio_teardown_intr(device_t dev, device_t child, struct resource *ires, + void *cookie) +{ + struct bcm_gpio_softc *sc; + int pin, err; + + sc = device_get_softc(dev); + pin = rman_get_start(ires); + if (pin > BCM_GPIO_PINS) + panic("%s: bad pin %d", __func__, pin); + if (sc->sc_events[pin] == NULL) + panic("Trying to teardown unoccupied IRQ"); + err = intr_event_remove_handler(cookie); + if (!err) + sc->sc_events[pin] = NULL; + + return (err); +} + static phandle_t bcm_gpio_get_node(device_t bus, device_t dev) { @@ -767,6 +1024,13 @@ static device_method_t bcm_gpio_methods[] = { DEVMETHOD(gpio_pin_set, bcm_gpio_pin_set), DEVMETHOD(gpio_pin_toggle, bcm_gpio_pin_toggle), + /* Bus interface */ + DEVMETHOD(bus_activate_resource, bcm_gpio_activate_resource), + DEVMETHOD(bus_deactivate_resource, bcm_gpio_deactivate_resource), + DEVMETHOD(bus_config_intr, bcm_gpio_config_intr), + DEVMETHOD(bus_setup_intr, bcm_gpio_setup_intr), + DEVMETHOD(bus_teardown_intr, bcm_gpio_teardown_intr), + /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_node, bcm_gpio_get_node), diff --git a/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c b/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c index 5f31478..11cf3bc 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c @@ -29,32 +29,17 @@ __FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/systm.h> -#include <sys/bio.h> #include <sys/bus.h> -#include <sys/conf.h> -#include <sys/endian.h> #include <sys/kernel.h> -#include <sys/kthread.h> #include <sys/lock.h> #include <sys/malloc.h> #include <sys/module.h> #include <sys/mutex.h> -#include <sys/queue.h> -#include <sys/resource.h> #include <sys/rman.h> #include <sys/sysctl.h> #include <sys/taskqueue.h> -#include <sys/time.h> -#include <sys/timetc.h> -#include <sys/watchdog.h> - -#include <sys/kdb.h> #include <machine/bus.h> -#include <machine/cpu.h> -#include <machine/cpufunc.h> -#include <machine/resource.h> -#include <machine/intr.h> #include <dev/fdt/fdt_common.h> #include <dev/ofw/ofw_bus.h> @@ -82,19 +67,9 @@ __FBSDID("$FreeBSD$"); #define dprintf(fmt, args...) #endif -/* - * Arasan HC seems to have problem with Data CRC on lower frequencies. - * Use this tunable to cap initialization sequence frequency at higher - * value. Default is standard 400kHz. - * HS mode brings too many problems for most of cards, so disable HS mode - * until a better fix comes up. - * HS mode still can be enabled with the tunable. - */ -static int bcm2835_sdhci_min_freq = 400000; static int bcm2835_sdhci_hs = 1; static int bcm2835_sdhci_pio_mode = 0; -TUNABLE_INT("hw.bcm2835.sdhci.min_freq", &bcm2835_sdhci_min_freq); TUNABLE_INT("hw.bcm2835.sdhci.hs", &bcm2835_sdhci_hs); TUNABLE_INT("hw.bcm2835.sdhci.pio_mode", &bcm2835_sdhci_pio_mode); @@ -211,16 +186,12 @@ bcm_sdhci_attach(device_t dev) RF_ACTIVE); if (!sc->sc_irq_res) { device_printf(dev, "cannot allocate interrupt\n"); - bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); err = ENXIO; goto fail; } if (bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, - NULL, bcm_sdhci_intr, sc, &sc->sc_intrhand)) - { - bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); - bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_irq_res); + NULL, bcm_sdhci_intr, sc, &sc->sc_intrhand)) { device_printf(dev, "cannot setup interrupt handler\n"); err = ENXIO; goto fail; @@ -286,6 +257,7 @@ fail: bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_irq_res); if (sc->sc_mem_res) bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); + mtx_destroy(&sc->sc_mtx); return (err); } @@ -422,13 +394,6 @@ bcm_sdhci_write_multi_4(device_t dev, struct sdhci_slot *slot, bus_size_t off, bus_space_write_multi_4(sc->sc_bst, sc->sc_bsh, off, data, count); } -static uint32_t -bcm_sdhci_min_freq(device_t dev, struct sdhci_slot *slot) -{ - - return bcm2835_sdhci_min_freq; -} - static void bcm_sdhci_start_dma_seg(struct bcm_sdhci_softc *sc) { @@ -681,7 +646,6 @@ static device_method_t bcm_sdhci_methods[] = { DEVMETHOD(mmcbr_acquire_host, sdhci_generic_acquire_host), DEVMETHOD(mmcbr_release_host, sdhci_generic_release_host), - DEVMETHOD(sdhci_min_freq, bcm_sdhci_min_freq), /* Platform transfer methods */ DEVMETHOD(sdhci_platform_will_handle, bcm_sdhci_will_handle_transfer), DEVMETHOD(sdhci_platform_start_transfer, bcm_sdhci_start_transfer), diff --git a/sys/arm/ti/ti_gpio.c b/sys/arm/ti/ti_gpio.c index 63680c6..d0ce918 100644 --- a/sys/arm/ti/ti_gpio.c +++ b/sys/arm/ti/ti_gpio.c @@ -1004,7 +1004,7 @@ ti_gpio_config_intr(device_t dev, int irq, enum intr_trigger trig, val |= TI_GPIO_MASK(irq); ti_gpio_write_4(sc, TI_GPIO_BANK(irq), reg, val); } - if (oldreg != 0) { + if (reg != oldreg && oldreg != 0) { /* Remove the old settings. */ val = ti_gpio_read_4(sc, TI_GPIO_BANK(irq), oldreg); val &= ~TI_GPIO_MASK(irq); diff --git a/sys/cam/cam.h b/sys/cam/cam.h index 302504f..e08524b 100644 --- a/sys/cam/cam.h +++ b/sys/cam/cam.h @@ -121,7 +121,8 @@ enum { SF_QUIET_IR = 0x04, /* Be quiet about Illegal Request reponses */ SF_PRINT_ALWAYS = 0x08, /* Always print error status. */ SF_NO_RECOVERY = 0x10, /* Don't do active error recovery. */ - SF_NO_RETRY = 0x20 /* Don't do any retries. */ + SF_NO_RETRY = 0x20, /* Don't do any retries. */ + SF_RETRY_BUSY = 0x40 /* Retry BUSY status. */ }; /* CAM Status field values */ diff --git a/sys/cam/cam_periph.c b/sys/cam/cam_periph.c index 2e23996..87c1bdd 100644 --- a/sys/cam/cam_periph.c +++ b/sys/cam/cam_periph.c @@ -1359,8 +1359,8 @@ camperiphscsistatuserror(union ccb *ccb, union ccb **orig_ccb, * Restart the queue after either another * command completes or a 1 second timeout. */ - if (ccb->ccb_h.retry_count > 0) { - ccb->ccb_h.retry_count--; + if ((sense_flags & SF_RETRY_BUSY) != 0 || + (ccb->ccb_h.retry_count--) > 0) { error = ERESTART; *relsim_flags = RELSIM_RELEASE_AFTER_TIMEOUT | RELSIM_RELEASE_AFTER_CMDCMPLT; diff --git a/sys/cam/ctl/ctl_frontend_iscsi.c b/sys/cam/ctl/ctl_frontend_iscsi.c index a922d5b..817f9ff 100644 --- a/sys/cam/ctl/ctl_frontend_iscsi.c +++ b/sys/cam/ctl/ctl_frontend_iscsi.c @@ -165,9 +165,10 @@ static void cfiscsi_pdu_handle_data_out(struct icl_pdu *request); static void cfiscsi_pdu_handle_logout_request(struct icl_pdu *request); static void cfiscsi_session_terminate(struct cfiscsi_session *cs); static struct cfiscsi_target *cfiscsi_target_find(struct cfiscsi_softc - *softc, const char *name); + *softc, const char *name, uint16_t tag); static struct cfiscsi_target *cfiscsi_target_find_or_create( - struct cfiscsi_softc *softc, const char *name, const char *alias); + struct cfiscsi_softc *softc, const char *name, const char *alias, + uint16_t tag); static void cfiscsi_target_release(struct cfiscsi_target *ct); static void cfiscsi_session_delete(struct cfiscsi_session *cs); @@ -1434,7 +1435,8 @@ cfiscsi_ioctl_handoff(struct ctl_iscsi *ci) cihp->initiator_name, cihp->initiator_addr, cihp->target_name); - ct = cfiscsi_target_find(softc, cihp->target_name); + ct = cfiscsi_target_find(softc, cihp->target_name, + cihp->portal_group_tag); if (ct == NULL) { ci->status = CTL_ISCSI_ERROR; snprintf(ci->error_str, sizeof(ci->error_str), @@ -1484,7 +1486,6 @@ cfiscsi_ioctl_handoff(struct ctl_iscsi *ci) * PDU from the Login Phase received from the initiator. Thus, * the -1 below. */ - cs->cs_portal_group_tag = cihp->portal_group_tag; cs->cs_cmdsn = cihp->cmdsn; cs->cs_statsn = cihp->statsn; cs->cs_max_data_segment_length = cihp->max_recv_data_segment_length; @@ -1529,7 +1530,6 @@ restart: TAILQ_FOREACH(cs2, &softc->sessions, cs_next) { if (cs2 != cs && cs2->cs_tasks_aborted == false && cs->cs_target == cs2->cs_target && - cs->cs_portal_group_tag == cs2->cs_portal_group_tag && strcmp(cs->cs_initiator_id, cs2->cs_initiator_id) == 0) { cfiscsi_session_terminate(cs2); mtx_unlock(&softc->lock); @@ -1614,6 +1614,7 @@ cfiscsi_ioctl_list(struct ctl_iscsi *ci) "<initiator_alias>%s</initiator_alias>" "<target>%s</target>" "<target_alias>%s</target_alias>" + "<target_portal_group_tag>%u</target_portal_group_tag>" "<header_digest>%s</header_digest>" "<data_digest>%s</data_digest>" "<max_data_segment_length>%zd</max_data_segment_length>" @@ -1623,6 +1624,7 @@ cfiscsi_ioctl_list(struct ctl_iscsi *ci) cs->cs_id, cs->cs_initiator_name, cs->cs_initiator_addr, cs->cs_initiator_alias, cs->cs_target->ct_name, cs->cs_target->ct_alias, + cs->cs_target->ct_tag, cs->cs_conn->ic_header_crc32c ? "CRC32C" : "None", cs->cs_conn->ic_data_crc32c ? "CRC32C" : "None", cs->cs_max_data_segment_length, @@ -1980,23 +1982,25 @@ cfiscsi_ioctl_port_create(struct ctl_req *req) { struct cfiscsi_target *ct; struct ctl_port *port; - const char *target, *alias, *tag; + const char *target, *alias, *tags; struct scsi_vpd_id_descriptor *desc; ctl_options_t opts; int retval, len, idlen; + uint16_t tag; ctl_init_opts(&opts, req->num_args, req->kern_args); target = ctl_get_opt(&opts, "cfiscsi_target"); alias = ctl_get_opt(&opts, "cfiscsi_target_alias"); - tag = ctl_get_opt(&opts, "cfiscsi_portal_group_tag"); - if (target == NULL || tag == NULL) { + tags = ctl_get_opt(&opts, "cfiscsi_portal_group_tag"); + if (target == NULL || tags == NULL) { req->status = CTL_LUN_ERROR; snprintf(req->error_str, sizeof(req->error_str), "Missing required argument"); ctl_free_opts(&opts); return; } - ct = cfiscsi_target_find_or_create(&cfiscsi_softc, target, alias); + tag = strtol(tags, (char **)NULL, 10); + ct = cfiscsi_target_find_or_create(&cfiscsi_softc, target, alias, tag); if (ct == NULL) { req->status = CTL_LUN_ERROR; snprintf(req->error_str, sizeof(req->error_str), @@ -2022,7 +2026,7 @@ cfiscsi_ioctl_port_create(struct ctl_req *req) /* XXX KDM what should the real number be here? */ port->num_requested_ctl_io = 4096; port->port_name = "iscsi"; - port->physical_port = strtoul(tag, NULL, 0); + port->physical_port = tag; port->virtual_port = ct->ct_target_id; port->port_online = cfiscsi_online; port->port_offline = cfiscsi_offline; @@ -2054,8 +2058,7 @@ cfiscsi_ioctl_port_create(struct ctl_req *req) desc->id_type = SVPD_ID_PIV | SVPD_ID_ASSOC_PORT | SVPD_ID_TYPE_SCSI_NAME; desc->length = idlen; - snprintf(desc->identifier, idlen, "%s,t,0x%4.4x", - target, port->physical_port); + snprintf(desc->identifier, idlen, "%s,t,0x%4.4x", target, tag); /* Generate Target ID. */ idlen = strlen(target) + 1; @@ -2093,19 +2096,22 @@ static void cfiscsi_ioctl_port_remove(struct ctl_req *req) { struct cfiscsi_target *ct; - const char *target; + const char *target, *tags; ctl_options_t opts; + uint16_t tag; ctl_init_opts(&opts, req->num_args, req->kern_args); target = ctl_get_opt(&opts, "cfiscsi_target"); - if (target == NULL) { + tags = ctl_get_opt(&opts, "cfiscsi_portal_group_tag"); + if (target == NULL || tags == NULL) { ctl_free_opts(&opts); req->status = CTL_LUN_ERROR; snprintf(req->error_str, sizeof(req->error_str), "Missing required argument"); return; } - ct = cfiscsi_target_find(&cfiscsi_softc, target); + tag = strtol(tags, (char **)NULL, 10); + ct = cfiscsi_target_find(&cfiscsi_softc, target, tag); if (ct == NULL) { ctl_free_opts(&opts); req->status = CTL_LUN_ERROR; @@ -2126,6 +2132,7 @@ cfiscsi_ioctl_port_remove(struct ctl_req *req) ctl_port_offline(&ct->ct_port); cfiscsi_target_release(ct); cfiscsi_target_release(ct); + req->status = CTL_LUN_OK; } static int @@ -2234,13 +2241,14 @@ cfiscsi_target_release(struct cfiscsi_target *ct) } static struct cfiscsi_target * -cfiscsi_target_find(struct cfiscsi_softc *softc, const char *name) +cfiscsi_target_find(struct cfiscsi_softc *softc, const char *name, uint16_t tag) { struct cfiscsi_target *ct; mtx_lock(&softc->lock); TAILQ_FOREACH(ct, &softc->targets, ct_next) { - if (strcmp(name, ct->ct_name) != 0 || + if (ct->ct_tag != tag || + strcmp(name, ct->ct_name) != 0 || ct->ct_state != CFISCSI_TARGET_STATE_ACTIVE) continue; cfiscsi_target_hold(ct); @@ -2254,7 +2262,7 @@ cfiscsi_target_find(struct cfiscsi_softc *softc, const char *name) static struct cfiscsi_target * cfiscsi_target_find_or_create(struct cfiscsi_softc *softc, const char *name, - const char *alias) + const char *alias, uint16_t tag) { struct cfiscsi_target *ct, *newct; @@ -2265,7 +2273,8 @@ cfiscsi_target_find_or_create(struct cfiscsi_softc *softc, const char *name, mtx_lock(&softc->lock); TAILQ_FOREACH(ct, &softc->targets, ct_next) { - if (strcmp(name, ct->ct_name) != 0 || + if (ct->ct_tag != tag || + strcmp(name, ct->ct_name) != 0 || ct->ct_state == CFISCSI_TARGET_STATE_INVALID) continue; cfiscsi_target_hold(ct); @@ -2277,6 +2286,7 @@ cfiscsi_target_find_or_create(struct cfiscsi_softc *softc, const char *name, strlcpy(newct->ct_name, name, sizeof(newct->ct_name)); if (alias != NULL) strlcpy(newct->ct_alias, alias, sizeof(newct->ct_alias)); + newct->ct_tag = tag; refcount_init(&newct->ct_refcount, 1); newct->ct_softc = softc; if (TAILQ_EMPTY(&softc->targets)) diff --git a/sys/cam/ctl/ctl_frontend_iscsi.h b/sys/cam/ctl/ctl_frontend_iscsi.h index 02fd34e..e1a0949 100644 --- a/sys/cam/ctl/ctl_frontend_iscsi.h +++ b/sys/cam/ctl/ctl_frontend_iscsi.h @@ -42,6 +42,7 @@ struct cfiscsi_target { volatile u_int ct_refcount; char ct_name[CTL_ISCSI_NAME_LEN]; char ct_alias[CTL_ISCSI_ALIAS_LEN]; + uint16_t ct_tag; int ct_state; int ct_online; int ct_target_id; @@ -79,7 +80,6 @@ struct cfiscsi_session { struct cfiscsi_target *cs_target; struct callout cs_callout; int cs_timeout; - int cs_portal_group_tag; struct cv cs_maintenance_cv; bool cs_terminating; bool cs_tasks_aborted; diff --git a/sys/cam/scsi/scsi_cd.c b/sys/cam/scsi/scsi_cd.c index 47a5a43..f252b86 100644 --- a/sys/cam/scsi/scsi_cd.c +++ b/sys/cam/scsi/scsi_cd.c @@ -87,14 +87,16 @@ typedef enum { CD_Q_NONE = 0x00, CD_Q_NO_TOUCH = 0x01, CD_Q_BCD_TRACKS = 0x02, - CD_Q_10_BYTE_ONLY = 0x10 + CD_Q_10_BYTE_ONLY = 0x10, + CD_Q_RETRY_BUSY = 0x40 } cd_quirks; #define CD_Q_BIT_STRING \ "\020" \ "\001NO_TOUCH" \ "\002BCD_TRACKS" \ - "\00510_BYTE_ONLY" + "\00510_BYTE_ONLY" \ + "\007RETRY_BUSY" typedef enum { CD_FLAG_INVALID = 0x0001, @@ -189,6 +191,14 @@ static struct cd_quirk_entry cd_quirk_table[] = { { T_CDROM, SIP_MEDIA_REMOVABLE, "CHINON", "CD-ROM CDS-535","*"}, /* quirks */ CD_Q_BCD_TRACKS + }, + { + /* + * VMware returns BUSY status when storage has transient + * connectivity problems, so better wait. + */ + {T_CDROM, SIP_MEDIA_REMOVABLE, "NECVMWar", "VMware IDE CDR10", "*"}, + /*quirks*/ CD_Q_RETRY_BUSY } }; @@ -2581,6 +2591,9 @@ cderror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags) * don't treat UAs as errors. */ sense_flags |= SF_RETRY_UA; + + if (softc->quirks & CD_Q_RETRY_BUSY) + sense_flags |= SF_RETRY_BUSY; return (cam_periph_error(ccb, cam_flags, sense_flags, &softc->saved_ccb)); } diff --git a/sys/cam/scsi/scsi_da.c b/sys/cam/scsi/scsi_da.c index a65d2dc..9b50d7a 100644 --- a/sys/cam/scsi/scsi_da.c +++ b/sys/cam/scsi/scsi_da.c @@ -101,7 +101,8 @@ typedef enum { DA_Q_NO_PREVENT = 0x04, DA_Q_4K = 0x08, DA_Q_NO_RC16 = 0x10, - DA_Q_NO_UNMAP = 0x20 + DA_Q_NO_UNMAP = 0x20, + DA_Q_RETRY_BUSY = 0x40 } da_quirks; #define DA_Q_BIT_STRING \ @@ -110,7 +111,9 @@ typedef enum { "\002NO_6_BYTE" \ "\003NO_PREVENT" \ "\0044K" \ - "\005NO_RC16" + "\005NO_RC16" \ + "\006NO_UNMAP" \ + "\007RETRY_BUSY" typedef enum { DA_CCB_PROBE_RC = 0x01, @@ -359,6 +362,14 @@ static struct da_quirk_entry da_quirk_table[] = {T_DIRECT, SIP_MEDIA_FIXED, "STEC", "*", "*"}, /*quirks*/ DA_Q_NO_UNMAP }, + { + /* + * VMware returns BUSY status when storage has transient + * connectivity problems, so better wait. + */ + {T_DIRECT, SIP_MEDIA_FIXED, "VMware", "Virtual disk", "*"}, + /*quirks*/ DA_Q_RETRY_BUSY + }, /* USB mass storage devices supported by umass(4) */ { /* @@ -3630,6 +3641,9 @@ daerror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags) * don't treat UAs as errors. */ sense_flags |= SF_RETRY_UA; + + if (softc->quirks & DA_Q_RETRY_BUSY) + sense_flags |= SF_RETRY_BUSY; return(cam_periph_error(ccb, cam_flags, sense_flags, &softc->saved_ccb)); } diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c index f5a5b63..68e8161 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c +++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c @@ -24,7 +24,7 @@ /* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2012, 2014 by Delphix. All rights reserved. */ /* @@ -351,17 +351,22 @@ dtrace_id_t dtrace_probeid_error; /* special ERROR probe */ /* * DTrace Helper Tracing Variables + * + * These variables should be set dynamically to enable helper tracing. The + * only variables that should be set are dtrace_helptrace_enable (which should + * be set to a non-zero value to allocate helper tracing buffers on the next + * open of /dev/dtrace) and dtrace_helptrace_disable (which should be set to a + * non-zero value to deallocate helper tracing buffers on the next close of + * /dev/dtrace). When (and only when) helper tracing is disabled, the + * buffer size may also be set via dtrace_helptrace_bufsize. */ -uint32_t dtrace_helptrace_next = 0; -uint32_t dtrace_helptrace_nlocals; -char *dtrace_helptrace_buffer; -int dtrace_helptrace_bufsize = 512 * 1024; - -#ifdef DEBUG -int dtrace_helptrace_enabled = 1; -#else -int dtrace_helptrace_enabled = 0; -#endif +int dtrace_helptrace_enable = 0; +int dtrace_helptrace_disable = 0; +int dtrace_helptrace_bufsize = 16 * 1024 * 1024; +uint32_t dtrace_helptrace_nlocals; +static dtrace_helptrace_t *dtrace_helptrace_buffer; +static uint32_t dtrace_helptrace_next = 0; +static int dtrace_helptrace_wrapped = 0; /* * DTrace Error Hashing @@ -7078,7 +7083,8 @@ dtrace_probe(dtrace_id_t id, uintptr_t arg0, uintptr_t arg1, return; } - now = dtrace_gethrtime(); + now = mstate.dtms_timestamp = dtrace_gethrtime(); + mstate.dtms_present |= DTRACE_MSTATE_TIMESTAMP; vtime = dtrace_vtime_references != 0; if (vtime && curthread->t_dtrace_start) @@ -14174,7 +14180,7 @@ dtrace_state_create(struct cdev *dev) if (dev != NULL) { cr = dev->si_cred; m = dev2unit(dev); - } + } /* Allocate memory for the state. */ state = kmem_zalloc(sizeof(dtrace_state_t), KM_SLEEP); @@ -15199,10 +15205,10 @@ dtrace_helper_trace(dtrace_helper_action_t *helper, dtrace_mstate_t *mstate, dtrace_vstate_t *vstate, int where) { uint32_t size, next, nnext, i; - dtrace_helptrace_t *ent; + dtrace_helptrace_t *ent, *buffer; uint16_t flags = cpu_core[curcpu].cpuc_dtrace_flags; - if (!dtrace_helptrace_enabled) + if ((buffer = dtrace_helptrace_buffer) == NULL) return; ASSERT(vstate->dtvs_nlocals <= dtrace_helptrace_nlocals); @@ -15230,10 +15236,12 @@ dtrace_helper_trace(dtrace_helper_action_t *helper, /* * We have our slot; fill it in. */ - if (nnext == size) + if (nnext == size) { + dtrace_helptrace_wrapped++; next = 0; + } - ent = (dtrace_helptrace_t *)&dtrace_helptrace_buffer[next]; + ent = (dtrace_helptrace_t *)((uintptr_t)buffer + next); ent->dtht_helper = helper; ent->dtht_where = where; ent->dtht_nlocals = vstate->dtvs_nlocals; @@ -15267,7 +15275,7 @@ dtrace_helper(int which, dtrace_mstate_t *mstate, dtrace_helper_action_t *helper; dtrace_vstate_t *vstate; dtrace_difo_t *pred; - int i, trace = dtrace_helptrace_enabled; + int i, trace = dtrace_helptrace_buffer != NULL; ASSERT(which >= 0 && which < DTRACE_NHELPER_ACTIONS); @@ -16670,17 +16678,6 @@ dtrace_attach(dev_info_t *devi, ddi_attach_cmd_t cmd) mutex_exit(&cpu_lock); /* - * If DTrace helper tracing is enabled, we need to allocate the - * trace buffer and initialize the values. - */ - if (dtrace_helptrace_enabled) { - ASSERT(dtrace_helptrace_buffer == NULL); - dtrace_helptrace_buffer = - kmem_zalloc(dtrace_helptrace_bufsize, KM_SLEEP); - dtrace_helptrace_next = 0; - } - - /* * If there are already providers, we must ask them to provide their * probes, and then match any anonymous enabling against them. Note * that there should be no other retained enablings at this time: @@ -16793,6 +16790,18 @@ dtrace_open(struct cdev *dev, int oflags, int devtype, struct thread *td) return (EBUSY); } + if (dtrace_helptrace_enable && dtrace_helptrace_buffer == NULL) { + /* + * If DTrace helper tracing is enabled, we need to allocate the + * trace buffer and initialize the values. + */ + dtrace_helptrace_buffer = + kmem_zalloc(dtrace_helptrace_bufsize, KM_SLEEP); + dtrace_helptrace_next = 0; + dtrace_helptrace_wrapped = 0; + dtrace_helptrace_enable = 0; + } + state = dtrace_state_create(devp, cred_p); #else state = dtrace_state_create(dev); @@ -16829,7 +16838,10 @@ dtrace_dtr(void *data) #ifdef illumos minor_t minor = getminor(dev); dtrace_state_t *state; +#endif + dtrace_helptrace_t *buf = NULL; +#ifdef illumos if (minor == DTRACEMNRN_HELPER) return (0); @@ -16841,23 +16853,41 @@ dtrace_dtr(void *data) mutex_enter(&cpu_lock); mutex_enter(&dtrace_lock); - if (state != NULL) { - if (state->dts_anon) { - /* - * There is anonymous state. Destroy that first. - */ - ASSERT(dtrace_anon.dta_state == NULL); - dtrace_state_destroy(state->dts_anon); - } +#ifdef illumos + if (state->dts_anon) +#else + if (state != NULL && state->dts_anon) +#endif + { + /* + * There is anonymous state. Destroy that first. + */ + ASSERT(dtrace_anon.dta_state == NULL); + dtrace_state_destroy(state->dts_anon); + } - dtrace_state_destroy(state); + if (dtrace_helptrace_disable) { + /* + * If we have been told to disable helper tracing, set the + * buffer to NULL before calling into dtrace_state_destroy(); + * we take advantage of its dtrace_sync() to know that no + * CPU is in probe context with enabled helper tracing + * after it returns. + */ + buf = dtrace_helptrace_buffer; + dtrace_helptrace_buffer = NULL; + } -#ifndef illumos +#ifdef illumos + dtrace_state_destroy(state); +#else + if (state == NULL) { + dtrace_state_destroy(state); kmem_free(state, 0); -#endif } - +#endif ASSERT(dtrace_opens > 0); + #ifdef illumos /* * Only relinquish control of the kernel debugger interface when there @@ -16869,6 +16899,11 @@ dtrace_dtr(void *data) --dtrace_opens; #endif + if (buf != NULL) { + kmem_free(buf, dtrace_helptrace_bufsize); + dtrace_helptrace_disable = 0; + } + mutex_exit(&dtrace_lock); mutex_exit(&cpu_lock); @@ -17766,11 +17801,6 @@ dtrace_detach(dev_info_t *dip, ddi_detach_cmd_t cmd) mutex_exit(&cpu_lock); - if (dtrace_helptrace_enabled) { - kmem_free(dtrace_helptrace_buffer, dtrace_helptrace_bufsize); - dtrace_helptrace_buffer = NULL; - } - kmem_free(dtrace_probes, dtrace_nprobes * sizeof (dtrace_probe_t *)); dtrace_probes = NULL; dtrace_nprobes = 0; diff --git a/sys/cddl/dev/dtrace/dtrace_load.c b/sys/cddl/dev/dtrace/dtrace_load.c index 8a622c7..c49de55 100644 --- a/sys/cddl/dev/dtrace/dtrace_load.c +++ b/sys/cddl/dev/dtrace/dtrace_load.c @@ -137,17 +137,6 @@ dtrace_load(void *dummy) mutex_exit(&cpu_lock); - /* - * If DTrace helper tracing is enabled, we need to allocate the - * trace buffer and initialize the values. - */ - if (dtrace_helptrace_enabled) { - ASSERT(dtrace_helptrace_buffer == NULL); - dtrace_helptrace_buffer = - kmem_zalloc(dtrace_helptrace_bufsize, KM_SLEEP); - dtrace_helptrace_next = 0; - } - mutex_exit(&dtrace_lock); mutex_exit(&dtrace_provider_lock); diff --git a/sys/cddl/dev/dtrace/dtrace_unload.c b/sys/cddl/dev/dtrace/dtrace_unload.c index da58b8db..b0d22e6 100644 --- a/sys/cddl/dev/dtrace/dtrace_unload.c +++ b/sys/cddl/dev/dtrace/dtrace_unload.c @@ -69,11 +69,6 @@ dtrace_unload() mutex_exit(&cpu_lock); - if (dtrace_helptrace_enabled) { - kmem_free(dtrace_helptrace_buffer, 0); - dtrace_helptrace_buffer = NULL; - } - if (dtrace_probes != NULL) { kmem_free(dtrace_probes, 0); dtrace_probes = NULL; diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index 996a0cf..1584869 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -569,6 +569,7 @@ x86/x86/mptable.c optional mptable x86/x86/mptable_pci.c optional mptable pci x86/x86/msi.c optional pci x86/x86/nexus.c standard +x86/x86/pvclock.c standard x86/x86/tsc.c standard x86/x86/delay.c standard x86/xen/hvm.c optional xenhvm diff --git a/sys/conf/files.i386 b/sys/conf/files.i386 index 96879b8..3253341 100644 --- a/sys/conf/files.i386 +++ b/sys/conf/files.i386 @@ -588,6 +588,7 @@ x86/x86/mptable_pci.c optional apic native pci x86/x86/msi.c optional apic pci x86/x86/nexus.c standard x86/x86/tsc.c standard +x86/x86/pvclock.c standard x86/x86/delay.c standard x86/xen/hvm.c optional xenhvm x86/xen/xen_intr.c optional xen | xenhvm diff --git a/sys/dev/drm2/i915/i915_drv.c b/sys/dev/drm2/i915/i915_drv.c index b5a43a5..ef6a151 100644 --- a/sys/dev/drm2/i915/i915_drv.c +++ b/sys/dev/drm2/i915/i915_drv.c @@ -208,6 +208,7 @@ static const struct intel_device_info intel_haswell_d_info = { .has_blt_ring = 1, .has_llc = 1, .has_pch_split = 1, + .not_supported = 1, }; static const struct intel_device_info intel_haswell_m_info = { @@ -217,6 +218,7 @@ static const struct intel_device_info intel_haswell_m_info = { .has_blt_ring = 1, .has_llc = 1, .has_pch_split = 1, + .not_supported = 1, }; #define INTEL_VGA_DEVICE(id, info_) { \ @@ -282,6 +284,8 @@ static const struct intel_gfx_device_id { {0, 0} }; +static int i915_enable_unsupported; + static int i915_drm_freeze(struct drm_device *dev) { struct drm_i915_private *dev_priv; @@ -413,8 +417,16 @@ i915_resume(device_t kdev) static int i915_probe(device_t kdev) { + const struct intel_device_info *info; + int error; - return drm_probe(kdev, i915_pciidlist); + error = drm_probe(kdev, i915_pciidlist); + if (error != 0) + return (error); + info = i915_get_device_id(pci_get_device(kdev)); + if (info == NULL) + return (ENXIO); + return (0); } int i915_modeset; @@ -458,6 +470,8 @@ i915_get_device_id(int device) for (did = &pciidlist[0]; did->device != 0; did++) { if (did->device != device) continue; + if (did->info->not_supported && !i915_enable_unsupported) + return (NULL); return (did->info); } return (NULL); @@ -527,6 +541,7 @@ int i915_enable_ppgtt = -1; TUNABLE_INT("drm.i915.enable_ppgtt", &i915_enable_ppgtt); int i915_enable_hangcheck = 1; TUNABLE_INT("drm.i915.enable_hangcheck", &i915_enable_hangcheck); +TUNABLE_INT("drm.i915.enable_unsupported", &i915_enable_unsupported); #define PCI_VENDOR_INTEL 0x8086 #define INTEL_PCH_DEVICE_ID_MASK 0xff00 diff --git a/sys/dev/drm2/i915/i915_drv.h b/sys/dev/drm2/i915/i915_drv.h index c5f85d6..a51282c 100644 --- a/sys/dev/drm2/i915/i915_drv.h +++ b/sys/dev/drm2/i915/i915_drv.h @@ -166,6 +166,7 @@ struct drm_i915_display_funcs { struct intel_device_info { u8 gen; + u8 not_supported:1; u8 is_mobile:1; u8 is_i85x:1; u8 is_i915g:1; @@ -1350,7 +1351,6 @@ extern void intel_modeset_init(struct drm_device *dev); extern void intel_modeset_gem_init(struct drm_device *dev); extern void intel_modeset_cleanup(struct drm_device *dev); extern int intel_modeset_vga_set_state(struct drm_device *dev, bool state); -extern bool intel_fbc_enabled(struct drm_device *dev); extern void intel_disable_fbc(struct drm_device *dev); extern bool ironlake_set_drps(struct drm_device *dev, u8 val); extern void ironlake_init_pch_refclk(struct drm_device *dev); diff --git a/sys/dev/drm2/i915/intel_dp.c b/sys/dev/drm2/i915/intel_dp.c index 6382387..e9674b0 100644 --- a/sys/dev/drm2/i915/intel_dp.c +++ b/sys/dev/drm2/i915/intel_dp.c @@ -609,7 +609,7 @@ intel_dp_i2c_aux_ch(device_t idev, int mode, uint8_t write_byte, reply, reply_bytes); if (ret < 0) { DRM_DEBUG_KMS("aux_ch failed %d\n", ret); - return (-ret); + return (ret); } switch (reply[0] & AUX_NATIVE_REPLY_MASK) { @@ -620,14 +620,14 @@ intel_dp_i2c_aux_ch(device_t idev, int mode, uint8_t write_byte, break; case AUX_NATIVE_REPLY_NACK: DRM_DEBUG_KMS("aux_ch native nack\n"); - return (EREMOTEIO); + return (-EREMOTEIO); case AUX_NATIVE_REPLY_DEFER: DELAY(100); continue; default: DRM_ERROR("aux_ch invalid native reply 0x%02x\n", reply[0]); - return (EREMOTEIO); + return (-EREMOTEIO); } switch (reply[0] & AUX_I2C_REPLY_MASK) { @@ -638,19 +638,19 @@ intel_dp_i2c_aux_ch(device_t idev, int mode, uint8_t write_byte, return (0/*reply_bytes - 1*/); case AUX_I2C_REPLY_NACK: DRM_DEBUG_KMS("aux_i2c nack\n"); - return (EREMOTEIO); + return (-EREMOTEIO); case AUX_I2C_REPLY_DEFER: DRM_DEBUG_KMS("aux_i2c defer\n"); DELAY(100); break; default: DRM_ERROR("aux_i2c invalid reply 0x%02x\n", reply[0]); - return (EREMOTEIO); + return (-EREMOTEIO); } } DRM_ERROR("too many retries, giving up\n"); - return (EREMOTEIO); + return (-EREMOTEIO); } static void ironlake_edp_panel_vdd_on(struct intel_dp *intel_dp); diff --git a/sys/dev/drm2/i915/intel_iic.c b/sys/dev/drm2/i915/intel_iic.c index fdd59e5..aa12a78 100644 --- a/sys/dev/drm2/i915/intel_iic.c +++ b/sys/dev/drm2/i915/intel_iic.c @@ -556,7 +556,9 @@ intel_gmbus_attach(device_t idev) pin = device_get_unit(idev); port = pin + 1; - snprintf(sc->name, sizeof(sc->name), "gmbus %s", gmbus_ports[pin].name); + snprintf(sc->name, sizeof(sc->name), "gmbus %s", + intel_gmbus_is_port_valid(port) ? gmbus_ports[pin].name : + "reserved"); device_set_desc(idev, sc->name); /* By default use a conservative clock rate */ @@ -613,17 +615,21 @@ intel_iicbb_attach(device_t idev) { struct intel_iic_softc *sc; struct drm_i915_private *dev_priv; - int pin; + int pin, port; sc = device_get_softc(idev); sc->drm_dev = device_get_softc(device_get_parent(idev)); dev_priv = sc->drm_dev->dev_private; pin = device_get_unit(idev); + port = pin + 1; snprintf(sc->name, sizeof(sc->name), "i915 iicbb %s", - gmbus_ports[pin].name); + intel_gmbus_is_port_valid(port) ? gmbus_ports[pin].name : + "reserved"); device_set_desc(idev, sc->name); + if (!intel_gmbus_is_port_valid(port)) + pin = 1 ; /* GPIOA, VGA */ sc->reg0 = pin | GMBUS_RATE_100KHZ; sc->reg = dev_priv->gpio_mmio_base + gmbus_ports[pin].reg; diff --git a/sys/dev/drm2/ttm/ttm_bo.c b/sys/dev/drm2/ttm/ttm_bo.c index d87940c..748c969 100644 --- a/sys/dev/drm2/ttm/ttm_bo.c +++ b/sys/dev/drm2/ttm/ttm_bo.c @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include <dev/drm2/ttm/ttm_module.h> #include <dev/drm2/ttm/ttm_bo_driver.h> #include <dev/drm2/ttm/ttm_placement.h> +#include <vm/vm_pageout.h> #define TTM_ASSERT_LOCKED(param) #define TTM_DEBUG(fmt, arg...) @@ -1489,15 +1490,23 @@ int ttm_bo_global_init(struct drm_global_reference *ref) container_of(ref, struct ttm_bo_global_ref, ref); struct ttm_bo_global *glob = ref->object; int ret; + int tries; sx_init(&glob->device_list_mutex, "ttmdlm"); mtx_init(&glob->lru_lock, "ttmlru", NULL, MTX_DEF); glob->mem_glob = bo_ref->mem_glob; + tries = 0; +retry: glob->dummy_read_page = vm_page_alloc_contig(NULL, 0, VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ, 1, 0, VM_MAX_ADDRESS, PAGE_SIZE, 0, VM_MEMATTR_UNCACHEABLE); if (unlikely(glob->dummy_read_page == NULL)) { + if (tries < 1) { + vm_pageout_grow_cache(tries, 0, VM_MAX_ADDRESS); + tries++; + goto retry; + } ret = -ENOMEM; goto out_no_drp; } diff --git a/sys/dev/drm2/ttm/ttm_page_alloc.c b/sys/dev/drm2/ttm/ttm_page_alloc.c index 2dcecd1..246afdf 100644 --- a/sys/dev/drm2/ttm/ttm_page_alloc.c +++ b/sys/dev/drm2/ttm/ttm_page_alloc.c @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include <dev/drm2/drmP.h> #include <dev/drm2/ttm/ttm_bo_driver.h> #include <dev/drm2/ttm/ttm_page_alloc.h> +#include <vm/vm_pageout.h> #define NUM_PAGES_TO_ALLOC (PAGE_SIZE/sizeof(vm_page_t)) #define SMALL_ALLOCATION 16 @@ -460,6 +461,14 @@ static void ttm_handle_caching_state_failure(struct pglist *pages, } } +static vm_paddr_t +ttm_alloc_high_bound(int ttm_alloc_flags) +{ + + return ((ttm_alloc_flags & TTM_PAGE_FLAG_DMA32) ? 0xffffffff : + VM_MAX_ADDRESS); +} + /** * Allocate new pages with correct caching. * @@ -475,6 +484,7 @@ static int ttm_alloc_new_pages(struct pglist *pages, int ttm_alloc_flags, unsigned i, cpages, aflags; unsigned max_cpages = min(count, (unsigned)(PAGE_SIZE/sizeof(vm_page_t))); + int tries; aflags = VM_ALLOC_NORMAL | VM_ALLOC_WIRED | VM_ALLOC_NOOBJ | ((ttm_alloc_flags & TTM_PAGE_FLAG_ZERO_ALLOC) != 0 ? @@ -485,11 +495,18 @@ static int ttm_alloc_new_pages(struct pglist *pages, int ttm_alloc_flags, M_WAITOK | M_ZERO); for (i = 0, cpages = 0; i < count; ++i) { + tries = 0; +retry: p = vm_page_alloc_contig(NULL, 0, aflags, 1, 0, - (ttm_alloc_flags & TTM_PAGE_FLAG_DMA32) ? 0xffffffff : - VM_MAX_ADDRESS, PAGE_SIZE, 0, - ttm_caching_state_to_vm(cstate)); + ttm_alloc_high_bound(ttm_alloc_flags), + PAGE_SIZE, 0, ttm_caching_state_to_vm(cstate)); if (!p) { + if (tries < 3) { + vm_pageout_grow_cache(tries, 0, + ttm_alloc_high_bound(ttm_alloc_flags)); + tries++; + goto retry; + } printf("[TTM] Unable to get page %u\n", i); /* store already allocated pages in the pool after @@ -691,6 +708,7 @@ static int ttm_get_pages(vm_page_t *pages, unsigned npages, int flags, int gfp_flags, aflags; unsigned count; int r; + int tries; aflags = VM_ALLOC_NORMAL | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | ((flags & TTM_PAGE_FLAG_ZERO_ALLOC) != 0 ? VM_ALLOC_ZERO : 0); @@ -698,11 +716,18 @@ static int ttm_get_pages(vm_page_t *pages, unsigned npages, int flags, /* No pool for cached pages */ if (pool == NULL) { for (r = 0; r < npages; ++r) { + tries = 0; +retry: p = vm_page_alloc_contig(NULL, 0, aflags, 1, 0, - (flags & TTM_PAGE_FLAG_DMA32) ? 0xffffffff : - VM_MAX_ADDRESS, PAGE_SIZE, + ttm_alloc_high_bound(flags), PAGE_SIZE, 0, ttm_caching_state_to_vm(cstate)); if (!p) { + if (tries < 3) { + vm_pageout_grow_cache(tries, 0, + ttm_alloc_high_bound(flags)); + tries++; + goto retry; + } printf("[TTM] Unable to allocate page\n"); return -ENOMEM; } diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c index be9d274..00e785d 100644 --- a/sys/dev/ed/if_ed.c +++ b/sys/dev/ed/if_ed.c @@ -976,8 +976,10 @@ edintr(void *arg) /* * loop until there are no more new interrupts. When the card goes * away, the hardware will read back 0xff. Looking at the interrupts, - * it would appear that 0xff is impossible, or at least extremely - * unlikely. + * it would appear that 0xff is impossible as ED_ISR_RST is normally + * clear. ED_ISR_RDC is also normally clear and only set while + * we're transferring memory to the card and we're holding the + * ED_LOCK (so we can't get into here). */ while ((isr = ed_nic_inb(sc, ED_P0_ISR)) != 0 && isr != 0xff) { diff --git a/sys/dev/fe/if_fe_isa.c b/sys/dev/fe/if_fe_isa.c index 1770434..53046e9 100644 --- a/sys/dev/fe/if_fe_isa.c +++ b/sys/dev/fe/if_fe_isa.c @@ -133,10 +133,21 @@ static int fe_isa_attach(device_t dev) { struct fe_softc *sc = device_get_softc(dev); + int error = 0; - if (sc->port_used) - fe_alloc_port(dev, sc->port_used); - fe_alloc_irq(dev, 0); + /* + * Note: these routines aren't expected to fail since we also call + * them in the probe routine. But coverity complains, so we'll honor + * that complaint since the intention here was never to ignore them.. + */ + if (sc->port_used) { + error = fe_alloc_port(dev, sc->port_used); + if (error != 0) + return (error); + } + error = fe_alloc_irq(dev, 0); + if (error != 0) + return (error); return fe_attach(dev); } diff --git a/sys/dev/sfxge/common/efsys.h b/sys/dev/sfxge/common/efsys.h index c91de29..0bfd9c4 100644 --- a/sys/dev/sfxge/common/efsys.h +++ b/sys/dev/sfxge/common/efsys.h @@ -517,6 +517,15 @@ typedef struct efsys_bar_s { struct resource *esb_res; } efsys_bar_t; +#define SFXGE_BAR_LOCK_INIT(_esbp, _name) \ + mtx_init(&(_esbp)->esb_lock, (_name), NULL, MTX_DEF) +#define SFXGE_BAR_LOCK_DESTROY(_esbp) \ + mtx_destroy(&(_esbp)->esb_lock) +#define SFXGE_BAR_LOCK(_esbp) \ + mtx_lock(&(_esbp)->esb_lock) +#define SFXGE_BAR_UNLOCK(_esbp) \ + mtx_unlock(&(_esbp)->esb_lock) + #define EFSYS_BAR_READD(_esbp, _offset, _edp, _lock) \ do { \ _NOTE(CONSTANTCONDITION) \ @@ -525,7 +534,7 @@ typedef struct efsys_bar_s { \ _NOTE(CONSTANTCONDITION) \ if (_lock) \ - mtx_lock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_LOCK(_esbp); \ \ (_edp)->ed_u32[0] = bus_space_read_4((_esbp)->esb_tag, \ (_esbp)->esb_handle, (_offset)); \ @@ -535,7 +544,7 @@ typedef struct efsys_bar_s { \ _NOTE(CONSTANTCONDITION) \ if (_lock) \ - mtx_unlock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_UNLOCK(_esbp); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) @@ -545,7 +554,7 @@ typedef struct efsys_bar_s { KASSERT(IS_P2ALIGNED(_offset, sizeof (efx_qword_t)), \ ("not power of 2 aligned")); \ \ - mtx_lock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_LOCK(_esbp); \ \ (_eqp)->eq_u32[0] = bus_space_read_4((_esbp)->esb_tag, \ (_esbp)->esb_handle, (_offset)); \ @@ -556,7 +565,7 @@ typedef struct efsys_bar_s { uint32_t, (_eqp)->eq_u32[1], \ uint32_t, (_eqp)->eq_u32[0]); \ \ - mtx_unlock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_UNLOCK(_esbp); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) @@ -568,7 +577,7 @@ typedef struct efsys_bar_s { \ _NOTE(CONSTANTCONDITION) \ if (_lock) \ - mtx_lock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_LOCK(_esbp); \ \ (_eop)->eo_u32[0] = bus_space_read_4((_esbp)->esb_tag, \ (_esbp)->esb_handle, (_offset)); \ @@ -587,7 +596,7 @@ typedef struct efsys_bar_s { \ _NOTE(CONSTANTCONDITION) \ if (_lock) \ - mtx_unlock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_UNLOCK(_esbp); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) @@ -599,7 +608,7 @@ typedef struct efsys_bar_s { \ _NOTE(CONSTANTCONDITION) \ if (_lock) \ - mtx_lock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_LOCK(_esbp); \ \ EFSYS_PROBE2(bar_writed, unsigned int, (_offset), \ uint32_t, (_edp)->ed_u32[0]); \ @@ -609,7 +618,7 @@ typedef struct efsys_bar_s { \ _NOTE(CONSTANTCONDITION) \ if (_lock) \ - mtx_unlock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_UNLOCK(_esbp); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) @@ -619,7 +628,7 @@ typedef struct efsys_bar_s { KASSERT(IS_P2ALIGNED(_offset, sizeof (efx_qword_t)), \ ("not power of 2 aligned")); \ \ - mtx_lock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_LOCK(_esbp); \ \ EFSYS_PROBE3(bar_writeq, unsigned int, (_offset), \ uint32_t, (_eqp)->eq_u32[1], \ @@ -630,7 +639,7 @@ typedef struct efsys_bar_s { bus_space_write_4((_esbp)->esb_tag, (_esbp)->esb_handle,\ (_offset+4), (_eqp)->eq_u32[1]); \ \ - mtx_unlock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_UNLOCK(_esbp); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) @@ -642,7 +651,7 @@ typedef struct efsys_bar_s { \ _NOTE(CONSTANTCONDITION) \ if (_lock) \ - mtx_lock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_LOCK(_esbp); \ \ EFSYS_PROBE5(bar_writeo, unsigned int, (_offset), \ uint32_t, (_eop)->eo_u32[3], \ @@ -661,7 +670,7 @@ typedef struct efsys_bar_s { \ _NOTE(CONSTANTCONDITION) \ if (_lock) \ - mtx_unlock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_UNLOCK(_esbp); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) @@ -677,8 +686,7 @@ typedef struct efsys_bar_s { /* BARRIERS */ -/* Strict ordering guaranteed by devacc.devacc_attr_dataorder */ -#define EFSYS_MEM_READ_BARRIER() +#define EFSYS_MEM_READ_BARRIER() rmb() #define EFSYS_PIO_WRITE_BARRIER() /* TIMESTAMP */ diff --git a/sys/dev/sfxge/sfxge.c b/sys/dev/sfxge/sfxge.c index 7ecc6b4..85ac0b4 100644 --- a/sys/dev/sfxge/sfxge.c +++ b/sys/dev/sfxge/sfxge.c @@ -95,7 +95,7 @@ sfxge_start(struct sfxge_softc *sc) { int rc; - sx_assert(&sc->softc_lock, LA_XLOCKED); + SFXGE_ADAPTER_LOCK_ASSERT_OWNED(sc); if (sc->init_state == SFXGE_STARTED) return (0); @@ -164,15 +164,15 @@ sfxge_if_init(void *arg) sc = (struct sfxge_softc *)arg; - sx_xlock(&sc->softc_lock); + SFXGE_ADAPTER_LOCK(sc); (void)sfxge_start(sc); - sx_xunlock(&sc->softc_lock); + SFXGE_ADAPTER_UNLOCK(sc); } static void sfxge_stop(struct sfxge_softc *sc) { - sx_assert(&sc->softc_lock, LA_XLOCKED); + SFXGE_ADAPTER_LOCK_ASSERT_OWNED(sc); if (sc->init_state != SFXGE_STARTED) return; @@ -212,7 +212,7 @@ sfxge_if_ioctl(struct ifnet *ifp, unsigned long command, caddr_t data) switch (command) { case SIOCSIFFLAGS: - sx_xlock(&sc->softc_lock); + SFXGE_ADAPTER_LOCK(sc); if (ifp->if_flags & IFF_UP) { if (ifp->if_drv_flags & IFF_DRV_RUNNING) { if ((ifp->if_flags ^ sc->if_flags) & @@ -225,7 +225,7 @@ sfxge_if_ioctl(struct ifnet *ifp, unsigned long command, caddr_t data) if (ifp->if_drv_flags & IFF_DRV_RUNNING) sfxge_stop(sc); sc->if_flags = ifp->if_flags; - sx_xunlock(&sc->softc_lock); + SFXGE_ADAPTER_UNLOCK(sc); break; case SIOCSIFMTU: if (ifr->ifr_mtu == ifp->if_mtu) { @@ -238,11 +238,11 @@ sfxge_if_ioctl(struct ifnet *ifp, unsigned long command, caddr_t data) error = 0; } else { /* Restart required */ - sx_xlock(&sc->softc_lock); + SFXGE_ADAPTER_LOCK(sc); sfxge_stop(sc); ifp->if_mtu = ifr->ifr_mtu; error = sfxge_start(sc); - sx_xunlock(&sc->softc_lock); + SFXGE_ADAPTER_UNLOCK(sc); if (error != 0) { ifp->if_flags &= ~IFF_UP; ifp->if_drv_flags &= ~IFF_DRV_RUNNING; @@ -256,7 +256,7 @@ sfxge_if_ioctl(struct ifnet *ifp, unsigned long command, caddr_t data) sfxge_mac_filter_set(sc); break; case SIOCSIFCAP: - sx_xlock(&sc->softc_lock); + SFXGE_ADAPTER_LOCK(sc); /* * The networking core already rejects attempts to @@ -266,7 +266,7 @@ sfxge_if_ioctl(struct ifnet *ifp, unsigned long command, caddr_t data) */ if (~ifr->ifr_reqcap & SFXGE_CAP_FIXED) { error = EINVAL; - sx_xunlock(&sc->softc_lock); + SFXGE_ADAPTER_UNLOCK(sc); break; } @@ -280,7 +280,7 @@ sfxge_if_ioctl(struct ifnet *ifp, unsigned long command, caddr_t data) else ifp->if_hwassist &= ~CSUM_TSO; - sx_xunlock(&sc->softc_lock); + SFXGE_ADAPTER_UNLOCK(sc); break; case SIOCSIFMEDIA: case SIOCGIFMEDIA: @@ -298,9 +298,9 @@ sfxge_ifnet_fini(struct ifnet *ifp) { struct sfxge_softc *sc = ifp->if_softc; - sx_xlock(&sc->softc_lock); + SFXGE_ADAPTER_LOCK(sc); sfxge_stop(sc); - sx_xunlock(&sc->softc_lock); + SFXGE_ADAPTER_UNLOCK(sc); ifmedia_removeall(&sc->media); ether_ifdetach(ifp); @@ -376,7 +376,7 @@ sfxge_bar_init(struct sfxge_softc *sc) } esbp->esb_tag = rman_get_bustag(esbp->esb_res); esbp->esb_handle = rman_get_bushandle(esbp->esb_res); - mtx_init(&esbp->esb_lock, "sfxge_efsys_bar", NULL, MTX_DEF); + SFXGE_BAR_LOCK_INIT(esbp, "sfxge_efsys_bar"); return (0); } @@ -388,7 +388,7 @@ sfxge_bar_fini(struct sfxge_softc *sc) bus_release_resource(sc->dev, SYS_RES_MEMORY, esbp->esb_rid, esbp->esb_res); - mtx_destroy(&esbp->esb_lock); + SFXGE_BAR_LOCK_DESTROY(esbp); } static int @@ -401,7 +401,7 @@ sfxge_create(struct sfxge_softc *sc) dev = sc->dev; - sx_init(&sc->softc_lock, "sfxge_softc"); + SFXGE_ADAPTER_LOCK_INIT(sc, "sfxge_softc"); sc->max_rss_channels = 0; snprintf(rss_param_name, sizeof(rss_param_name), @@ -545,7 +545,7 @@ fail3: fail: sc->dev = NULL; - sx_destroy(&sc->softc_lock); + SFXGE_ADAPTER_LOCK_DESTROY(sc); return (error); } @@ -594,7 +594,7 @@ sfxge_destroy(struct sfxge_softc *sc) taskqueue_drain(taskqueue_thread, &sc->task_reset); /* Destroy the softc lock. */ - sx_destroy(&sc->softc_lock); + SFXGE_ADAPTER_LOCK_DESTROY(sc); } static int @@ -696,7 +696,7 @@ sfxge_reset(void *arg, int npending) sc = (struct sfxge_softc *)arg; - sx_xlock(&sc->softc_lock); + SFXGE_ADAPTER_LOCK(sc); if (sc->init_state != SFXGE_STARTED) goto done; @@ -709,7 +709,7 @@ sfxge_reset(void *arg, int npending) rc); done: - sx_xunlock(&sc->softc_lock); + SFXGE_ADAPTER_UNLOCK(sc); } void diff --git a/sys/dev/sfxge/sfxge.h b/sys/dev/sfxge/sfxge.h index 6157b23..5edc06a 100644 --- a/sys/dev/sfxge/sfxge.h +++ b/sys/dev/sfxge/sfxge.h @@ -314,4 +314,48 @@ extern int sfxge_port_ifmedia_init(struct sfxge_softc *sc); #define SFXGE_MAX_MTU (9 * 1024) +#define SFXGE_ADAPTER_LOCK_INIT(_sc, _name) \ + sx_init(&(_sc)->softc_lock, (_name)) +#define SFXGE_ADAPTER_LOCK_DESTROY(_sc) \ + sx_destroy(&(_sc)->softc_lock) +#define SFXGE_ADAPTER_LOCK(_sc) \ + sx_xlock(&(_sc)->softc_lock) +#define SFXGE_ADAPTER_UNLOCK(_sc) \ + sx_xunlock(&(_sc)->softc_lock) +#define SFXGE_ADAPTER_LOCK_ASSERT_OWNED(_sc) \ + sx_assert(&(_sc)->softc_lock, LA_XLOCKED) + +#define SFXGE_PORT_LOCK_INIT(_port, _name) \ + mtx_init(&(_port)->lock, (_name), NULL, MTX_DEF) +#define SFXGE_PORT_LOCK_DESTROY(_port) \ + mtx_destroy(&(_port)->lock) +#define SFXGE_PORT_LOCK(_port) \ + mtx_lock(&(_port)->lock) +#define SFXGE_PORT_UNLOCK(_port) \ + mtx_unlock(&(_port)->lock) +#define SFXGE_PORT_LOCK_ASSERT_OWNED(_port) \ + mtx_assert(&(_port)->lock, MA_OWNED) + +#define SFXGE_MCDI_LOCK_INIT(_mcdi, _name) \ + mtx_init(&(_mcdi)->lock, (_name), NULL, MTX_DEF) +#define SFXGE_MCDI_LOCK_DESTROY(_mcdi) \ + mtx_destroy(&(_mcdi)->lock) +#define SFXGE_MCDI_LOCK(_mcdi) \ + mtx_lock(&(_mcdi)->lock) +#define SFXGE_MCDI_UNLOCK(_mcdi) \ + mtx_unlock(&(_mcdi)->lock) +#define SFXGE_MCDI_LOCK_ASSERT_OWNED(_mcdi) \ + mtx_assert(&(_mcdi)->lock, MA_OWNED) + +#define SFXGE_EVQ_LOCK_INIT(_evq, _name) \ + mtx_init(&(_evq)->lock, (_name), NULL, MTX_DEF) +#define SFXGE_EVQ_LOCK_DESTROY(_evq) \ + mtx_destroy(&(_evq)->lock) +#define SFXGE_EVQ_LOCK(_evq) \ + mtx_lock(&(_evq)->lock) +#define SFXGE_EVQ_UNLOCK(_evq) \ + mtx_unlock(&(_evq)->lock) +#define SFXGE_EVQ_LOCK_ASSERT_OWNED(_evq) \ + mtx_assert(&(_evq)->lock, MA_OWNED) + #endif /* _SFXGE_H */ diff --git a/sys/dev/sfxge/sfxge_ev.c b/sys/dev/sfxge/sfxge_ev.c index c3e359b..c7a6cae 100644 --- a/sys/dev/sfxge/sfxge_ev.c +++ b/sys/dev/sfxge/sfxge_ev.c @@ -415,7 +415,7 @@ sfxge_ev_stat_update(struct sfxge_softc *sc) unsigned int index; clock_t now; - sx_xlock(&sc->softc_lock); + SFXGE_ADAPTER_LOCK(sc); if (sc->evq[0]->init_state != SFXGE_EVQ_STARTED) goto out; @@ -429,12 +429,12 @@ sfxge_ev_stat_update(struct sfxge_softc *sc) /* Add event counts from each event queue in turn */ for (index = 0; index < sc->intr.n_alloc; index++) { evq = sc->evq[index]; - mtx_lock(&evq->lock); + SFXGE_EVQ_LOCK(evq); efx_ev_qstats_update(evq->common, sc->ev_stats); - mtx_unlock(&evq->lock); + SFXGE_EVQ_UNLOCK(evq); } out: - sx_xunlock(&sc->softc_lock); + SFXGE_ADAPTER_UNLOCK(sc); } static int @@ -495,7 +495,7 @@ sfxge_int_mod_handler(SYSCTL_HANDLER_ARGS) int error; int index; - sx_xlock(&sc->softc_lock); + SFXGE_ADAPTER_LOCK(sc); if (req->newptr != NULL) { if ((error = SYSCTL_IN(req, &moderation, sizeof(moderation))) @@ -522,7 +522,7 @@ sfxge_int_mod_handler(SYSCTL_HANDLER_ARGS) } out: - sx_xunlock(&sc->softc_lock); + SFXGE_ADAPTER_UNLOCK(sc); return (error); } @@ -577,7 +577,7 @@ sfxge_ev_qpoll(struct sfxge_evq *evq) { int rc; - mtx_lock(&evq->lock); + SFXGE_EVQ_LOCK(evq); if (evq->init_state != SFXGE_EVQ_STARTING && evq->init_state != SFXGE_EVQ_STARTED) { @@ -607,12 +607,12 @@ sfxge_ev_qpoll(struct sfxge_evq *evq) if ((rc = efx_ev_qprime(evq->common, evq->read_ptr)) != 0) goto fail; - mtx_unlock(&evq->lock); + SFXGE_EVQ_UNLOCK(evq); return (0); fail: - mtx_unlock(&(evq->lock)); + SFXGE_EVQ_UNLOCK(evq); return (rc); } @@ -626,7 +626,7 @@ sfxge_ev_qstop(struct sfxge_softc *sc, unsigned int index) KASSERT(evq->init_state == SFXGE_EVQ_STARTED, ("evq->init_state != SFXGE_EVQ_STARTED")); - mtx_lock(&evq->lock); + SFXGE_EVQ_LOCK(evq); evq->init_state = SFXGE_EVQ_INITIALIZED; evq->read_ptr = 0; evq->exception = B_FALSE; @@ -639,7 +639,7 @@ sfxge_ev_qstop(struct sfxge_softc *sc, unsigned int index) efx_ev_qdestroy(evq->common); efx_sram_buf_tbl_clear(sc->enp, evq->buf_base_id, EFX_EVQ_NBUFS(evq->entries)); - mtx_unlock(&evq->lock); + SFXGE_EVQ_UNLOCK(evq); } static int @@ -669,7 +669,7 @@ sfxge_ev_qstart(struct sfxge_softc *sc, unsigned int index) evq->buf_base_id, &evq->common)) != 0) goto fail; - mtx_lock(&evq->lock); + SFXGE_EVQ_LOCK(evq); /* Set the default moderation */ (void)efx_ev_qmoderate(evq->common, sc->ev_moderation); @@ -680,7 +680,7 @@ sfxge_ev_qstart(struct sfxge_softc *sc, unsigned int index) evq->init_state = SFXGE_EVQ_STARTING; - mtx_unlock(&evq->lock); + SFXGE_EVQ_UNLOCK(evq); /* Wait for the initialization event */ count = 0; @@ -701,10 +701,10 @@ done: return (0); fail3: - mtx_lock(&evq->lock); + SFXGE_EVQ_LOCK(evq); evq->init_state = SFXGE_EVQ_INITIALIZED; fail2: - mtx_unlock(&evq->lock); + SFXGE_EVQ_UNLOCK(evq); efx_ev_qdestroy(evq->common); fail: efx_sram_buf_tbl_clear(sc->enp, evq->buf_base_id, @@ -785,7 +785,7 @@ sfxge_ev_qfini(struct sfxge_softc *sc, unsigned int index) sc->evq[index] = NULL; - mtx_destroy(&evq->lock); + SFXGE_EVQ_LOCK_DESTROY(evq); free(evq, M_SFXGE); } @@ -832,7 +832,7 @@ sfxge_ev_qinit(struct sfxge_softc *sc, unsigned int index) sfxge_sram_buf_tbl_alloc(sc, EFX_EVQ_NBUFS(evq->entries), &evq->buf_base_id); - mtx_init(&evq->lock, "evq", NULL, MTX_DEF); + SFXGE_EVQ_LOCK_INIT(evq, "evq"); evq->init_state = SFXGE_EVQ_INITIALIZED; diff --git a/sys/dev/sfxge/sfxge_mcdi.c b/sys/dev/sfxge/sfxge_mcdi.c index 6368ab4..04a38fe 100644 --- a/sys/dev/sfxge/sfxge_mcdi.c +++ b/sys/dev/sfxge/sfxge_mcdi.c @@ -52,8 +52,7 @@ __FBSDID("$FreeBSD$"); static void sfxge_mcdi_acquire(struct sfxge_mcdi *mcdi) { - - mtx_lock(&mcdi->lock); + SFXGE_MCDI_LOCK(mcdi); KASSERT(mcdi->state != SFXGE_MCDI_UNINITIALIZED, ("MCDI not initialized")); @@ -61,15 +60,14 @@ sfxge_mcdi_acquire(struct sfxge_mcdi *mcdi) (void)cv_wait_sig(&mcdi->cv, &mcdi->lock); mcdi->state = SFXGE_MCDI_BUSY; - mtx_unlock(&mcdi->lock); + SFXGE_MCDI_UNLOCK(mcdi); } /* Release ownership of MCDI on request completion. */ static void sfxge_mcdi_release(struct sfxge_mcdi *mcdi) { - - mtx_lock(&mcdi->lock); + SFXGE_MCDI_LOCK(mcdi); KASSERT((mcdi->state == SFXGE_MCDI_BUSY || mcdi->state == SFXGE_MCDI_COMPLETED), ("MCDI not busy or task not completed")); @@ -77,7 +75,7 @@ sfxge_mcdi_release(struct sfxge_mcdi *mcdi) mcdi->state = SFXGE_MCDI_INITIALIZED; cv_broadcast(&mcdi->cv); - mtx_unlock(&mcdi->lock); + SFXGE_MCDI_UNLOCK(mcdi); } static void @@ -160,11 +158,11 @@ sfxge_mcdi_ev_cpl(void *arg) sc = (struct sfxge_softc *)arg; mcdi = &sc->mcdi; - mtx_lock(&mcdi->lock); + SFXGE_MCDI_LOCK(mcdi); KASSERT(mcdi->state == SFXGE_MCDI_BUSY, ("MCDI not busy")); mcdi->state = SFXGE_MCDI_COMPLETED; cv_broadcast(&mcdi->cv); - mtx_unlock(&mcdi->lock); + SFXGE_MCDI_UNLOCK(mcdi); } static void @@ -203,7 +201,7 @@ sfxge_mcdi_init(struct sfxge_softc *sc) KASSERT(mcdi->state == SFXGE_MCDI_UNINITIALIZED, ("MCDI already initialized")); - mtx_init(&mcdi->lock, "sfxge_mcdi", NULL, MTX_DEF); + SFXGE_MCDI_LOCK_INIT(mcdi, "sfxge_mcdi"); mcdi->state = SFXGE_MCDI_INITIALIZED; @@ -220,7 +218,7 @@ sfxge_mcdi_init(struct sfxge_softc *sc) return (0); fail: - mtx_destroy(&mcdi->lock); + SFXGE_MCDI_LOCK_DESTROY(mcdi); mcdi->state = SFXGE_MCDI_UNINITIALIZED; return (rc); } @@ -236,7 +234,7 @@ sfxge_mcdi_fini(struct sfxge_softc *sc) mcdi = &sc->mcdi; emtp = &mcdi->transport; - mtx_lock(&mcdi->lock); + SFXGE_MCDI_LOCK(mcdi); KASSERT(mcdi->state == SFXGE_MCDI_INITIALIZED, ("MCDI not initialized")); @@ -244,7 +242,7 @@ sfxge_mcdi_fini(struct sfxge_softc *sc) bzero(emtp, sizeof(*emtp)); cv_destroy(&mcdi->cv); - mtx_unlock(&mcdi->lock); + SFXGE_MCDI_UNLOCK(mcdi); - mtx_destroy(&mcdi->lock); + SFXGE_MCDI_LOCK_DESTROY(mcdi); } diff --git a/sys/dev/sfxge/sfxge_port.c b/sys/dev/sfxge/sfxge_port.c index ae81505..188f1f9 100644 --- a/sys/dev/sfxge/sfxge_port.c +++ b/sys/dev/sfxge/sfxge_port.c @@ -48,7 +48,7 @@ sfxge_mac_stat_update(struct sfxge_softc *sc) unsigned int count; int rc; - mtx_lock(&port->lock); + SFXGE_PORT_LOCK(port); if (port->init_state != SFXGE_PORT_STARTED) { rc = 0; @@ -82,7 +82,7 @@ sfxge_mac_stat_update(struct sfxge_softc *sc) rc = ETIMEDOUT; out: - mtx_unlock(&port->lock); + SFXGE_PORT_UNLOCK(port); return (rc); } @@ -170,7 +170,7 @@ sfxge_port_wanted_fc_handler(SYSCTL_HANDLER_ARGS) sc = arg1; port = &sc->port; - mtx_lock(&port->lock); + SFXGE_PORT_LOCK(port); if (req->newptr != NULL) { if ((error = SYSCTL_IN(req, &fcntl, sizeof(fcntl))) != 0) @@ -191,7 +191,7 @@ sfxge_port_wanted_fc_handler(SYSCTL_HANDLER_ARGS) } out: - mtx_unlock(&port->lock); + SFXGE_PORT_UNLOCK(port); return (error); } @@ -207,13 +207,13 @@ sfxge_port_link_fc_handler(SYSCTL_HANDLER_ARGS) sc = arg1; port = &sc->port; - mtx_lock(&port->lock); + SFXGE_PORT_LOCK(port); if (port->init_state == SFXGE_PORT_STARTED && SFXGE_LINK_UP(sc)) efx_mac_fcntl_get(sc->enp, &wanted_fc, &link_fc); else link_fc = 0; error = SYSCTL_OUT(req, &link_fc, sizeof(link_fc)); - mtx_unlock(&port->lock); + SFXGE_PORT_UNLOCK(port); return (error); } @@ -262,7 +262,7 @@ sfxge_mac_poll_work(void *arg, int npending) enp = sc->enp; port = &sc->port; - mtx_lock(&port->lock); + SFXGE_PORT_LOCK(port); if (port->init_state != SFXGE_PORT_STARTED) goto done; @@ -272,7 +272,7 @@ sfxge_mac_poll_work(void *arg, int npending) sfxge_mac_link_update(sc, mode); done: - mtx_unlock(&port->lock); + SFXGE_PORT_UNLOCK(port); } static int @@ -320,7 +320,7 @@ sfxge_mac_filter_set(struct sfxge_softc *sc) struct sfxge_port *port = &sc->port; int rc; - mtx_lock(&port->lock); + SFXGE_PORT_LOCK(port); /* * The function may be called without softc_lock held in the * case of SIOCADDMULTI and SIOCDELMULTI ioctls. ioctl handler @@ -335,7 +335,7 @@ sfxge_mac_filter_set(struct sfxge_softc *sc) rc = sfxge_mac_filter_set_locked(sc); else rc = 0; - mtx_unlock(&port->lock); + SFXGE_PORT_UNLOCK(port); return (rc); } @@ -348,7 +348,7 @@ sfxge_port_stop(struct sfxge_softc *sc) port = &sc->port; enp = sc->enp; - mtx_lock(&port->lock); + SFXGE_PORT_LOCK(port); KASSERT(port->init_state == SFXGE_PORT_STARTED, ("port not started")); @@ -367,7 +367,7 @@ sfxge_port_stop(struct sfxge_softc *sc) /* Destroy the common code port object. */ efx_port_fini(sc->enp); - mtx_unlock(&port->lock); + SFXGE_PORT_UNLOCK(port); } int @@ -383,7 +383,7 @@ sfxge_port_start(struct sfxge_softc *sc) port = &sc->port; enp = sc->enp; - mtx_lock(&port->lock); + SFXGE_PORT_LOCK(port); KASSERT(port->init_state == SFXGE_PORT_INITIALIZED, ("port not initialized")); @@ -426,7 +426,7 @@ sfxge_port_start(struct sfxge_softc *sc) port->init_state = SFXGE_PORT_STARTED; /* Single poll in case there were missing initial events */ - mtx_unlock(&port->lock); + SFXGE_PORT_UNLOCK(port); sfxge_mac_poll_work(sc, 0); return (0); @@ -439,7 +439,7 @@ fail3: fail2: efx_port_fini(sc->enp); fail: - mtx_unlock(&port->lock); + SFXGE_PORT_UNLOCK(port); return (rc); } @@ -453,7 +453,7 @@ sfxge_phy_stat_update(struct sfxge_softc *sc) unsigned int count; int rc; - mtx_lock(&port->lock); + SFXGE_PORT_LOCK(port); if (port->init_state != SFXGE_PORT_STARTED) { rc = 0; @@ -487,7 +487,7 @@ sfxge_phy_stat_update(struct sfxge_softc *sc) rc = ETIMEDOUT; out: - mtx_unlock(&port->lock); + SFXGE_PORT_UNLOCK(port); return (rc); } @@ -554,7 +554,7 @@ sfxge_port_fini(struct sfxge_softc *sc) sfxge_dma_free(esmp); free(port->mac_stats.decode_buf, M_SFXGE); - mtx_destroy(&port->lock); + SFXGE_PORT_LOCK_DESTROY(port); port->sc = NULL; } @@ -577,7 +577,7 @@ sfxge_port_init(struct sfxge_softc *sc) port->sc = sc; - mtx_init(&port->lock, "sfxge_port", NULL, MTX_DEF); + SFXGE_PORT_LOCK_INIT(port, "sfxge_port"); port->phy_stats.decode_buf = malloc(EFX_PHY_NSTATS * sizeof(uint32_t), M_SFXGE, M_WAITOK | M_ZERO); @@ -615,7 +615,7 @@ fail2: sfxge_dma_free(phy_stats_buf); fail: free(port->phy_stats.decode_buf, M_SFXGE); - (void)mtx_destroy(&port->lock); + SFXGE_PORT_LOCK_DESTROY(port); port->sc = NULL; return (rc); } @@ -655,7 +655,7 @@ sfxge_media_status(struct ifnet *ifp, struct ifmediareq *ifmr) efx_link_mode_t mode; sc = ifp->if_softc; - sx_xlock(&sc->softc_lock); + SFXGE_ADAPTER_LOCK(sc); ifmr->ifm_status = IFM_AVALID; ifmr->ifm_active = IFM_ETHER; @@ -669,7 +669,7 @@ sfxge_media_status(struct ifnet *ifp, struct ifmediareq *ifmr) ifmr->ifm_active |= sfxge_port_link_fc_ifm(sc); } - sx_xunlock(&sc->softc_lock); + SFXGE_ADAPTER_UNLOCK(sc); } static int @@ -682,7 +682,7 @@ sfxge_media_change(struct ifnet *ifp) sc = ifp->if_softc; ifm = sc->media.ifm_cur; - sx_xlock(&sc->softc_lock); + SFXGE_ADAPTER_LOCK(sc); if (!SFXGE_RUNNING(sc)) { rc = 0; @@ -695,7 +695,7 @@ sfxge_media_change(struct ifnet *ifp) rc = efx_phy_adv_cap_set(sc->enp, ifm->ifm_data); out: - sx_xunlock(&sc->softc_lock); + SFXGE_ADAPTER_UNLOCK(sc); return (rc); } diff --git a/sys/dev/sfxge/sfxge_rx.c b/sys/dev/sfxge/sfxge_rx.c index ccfdfb0..0a4b803 100644 --- a/sys/dev/sfxge/sfxge_rx.c +++ b/sys/dev/sfxge/sfxge_rx.c @@ -207,7 +207,7 @@ sfxge_rx_qfill(struct sfxge_rxq *rxq, unsigned int target, boolean_t retrying) prefetch_read_many(sc->enp); prefetch_read_many(rxq->common); - mtx_assert(&evq->lock, MA_OWNED); + SFXGE_EVQ_LOCK_ASSERT_OWNED(evq); if (rxq->init_state != SFXGE_RXQ_STARTED) return; @@ -749,7 +749,7 @@ sfxge_rx_qcomplete(struct sfxge_rxq *rxq, boolean_t eop) index = rxq->index; evq = sc->evq[index]; - mtx_assert(&evq->lock, MA_OWNED); + SFXGE_EVQ_LOCK_ASSERT_OWNED(evq); completed = rxq->completed; while (completed != rxq->pending) { @@ -834,7 +834,7 @@ sfxge_rx_qstop(struct sfxge_softc *sc, unsigned int index) rxq = sc->rxq[index]; evq = sc->evq[index]; - mtx_lock(&evq->lock); + SFXGE_EVQ_LOCK(evq); KASSERT(rxq->init_state == SFXGE_RXQ_STARTED, ("rxq not started")); @@ -849,7 +849,7 @@ again: /* Flush the receive queue */ efx_rx_qflush(rxq->common); - mtx_unlock(&evq->lock); + SFXGE_EVQ_UNLOCK(evq); count = 0; do { @@ -861,7 +861,7 @@ again: } while (++count < 20); - mtx_lock(&evq->lock); + SFXGE_EVQ_LOCK(evq); if (rxq->flush_state == SFXGE_FLUSH_FAILED) goto again; @@ -885,7 +885,7 @@ again: efx_sram_buf_tbl_clear(sc->enp, rxq->buf_base_id, EFX_RXQ_NBUFS(sc->rxq_entries)); - mtx_unlock(&evq->lock); + SFXGE_EVQ_UNLOCK(evq); } static int @@ -916,7 +916,7 @@ sfxge_rx_qstart(struct sfxge_softc *sc, unsigned int index) &rxq->common)) != 0) goto fail; - mtx_lock(&evq->lock); + SFXGE_EVQ_LOCK(evq); /* Enable the receive queue. */ efx_rx_qenable(rxq->common); @@ -926,7 +926,7 @@ sfxge_rx_qstart(struct sfxge_softc *sc, unsigned int index) /* Try to fill the queue from the pool. */ sfxge_rx_qfill(rxq, EFX_RXQ_LIMIT(sc->rxq_entries), B_FALSE); - mtx_unlock(&evq->lock); + SFXGE_EVQ_UNLOCK(evq); return (0); diff --git a/sys/dev/sfxge/sfxge_tx.c b/sys/dev/sfxge/sfxge_tx.c index 0a9218c..00e8b9e 100644 --- a/sys/dev/sfxge/sfxge_tx.c +++ b/sys/dev/sfxge/sfxge_tx.c @@ -118,7 +118,7 @@ sfxge_tx_qcomplete(struct sfxge_txq *txq, struct sfxge_evq *evq) { unsigned int completed; - mtx_assert(&evq->lock, MA_OWNED); + SFXGE_EVQ_LOCK_ASSERT_OWNED(evq); completed = txq->completed; while (completed != txq->pending) { @@ -178,7 +178,7 @@ sfxge_tx_qdpl_swizzle(struct sfxge_txq *txq) unsigned int count; unsigned int non_tcp_count; - mtx_assert(&txq->lock, MA_OWNED); + SFXGE_TXQ_LOCK_ASSERT_OWNED(txq); stdp = &txq->dpl; @@ -221,7 +221,7 @@ sfxge_tx_qdpl_swizzle(struct sfxge_txq *txq) static void sfxge_tx_qreap(struct sfxge_txq *txq) { - mtx_assert(SFXGE_TXQ_LOCK(txq), MA_OWNED); + SFXGE_TXQ_LOCK_ASSERT_OWNED(txq); txq->reaped = txq->completed; } @@ -233,7 +233,7 @@ sfxge_tx_qlist_post(struct sfxge_txq *txq) unsigned int level; int rc; - mtx_assert(SFXGE_TXQ_LOCK(txq), MA_OWNED); + SFXGE_TXQ_LOCK_ASSERT_OWNED(txq); KASSERT(txq->n_pend_desc != 0, ("txq->n_pend_desc == 0")); KASSERT(txq->n_pend_desc <= SFXGE_TSO_MAX_DESC, @@ -408,7 +408,7 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *txq) unsigned int pushed; int rc; - mtx_assert(&txq->lock, MA_OWNED); + SFXGE_TXQ_LOCK_ASSERT_OWNED(txq); sc = txq->sc; stdp = &txq->dpl; @@ -484,7 +484,7 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *txq) static inline void sfxge_tx_qdpl_service(struct sfxge_txq *txq) { - mtx_assert(&txq->lock, MA_OWNED); + SFXGE_TXQ_LOCK_ASSERT_OWNED(txq); do { if (SFXGE_TX_QDPL_PENDING(txq)) @@ -493,9 +493,9 @@ sfxge_tx_qdpl_service(struct sfxge_txq *txq) if (!txq->blocked) sfxge_tx_qdpl_drain(txq); - mtx_unlock(&txq->lock); + SFXGE_TXQ_UNLOCK(txq); } while (SFXGE_TX_QDPL_PENDING(txq) && - mtx_trylock(&txq->lock)); + SFXGE_TXQ_TRYLOCK(txq)); } /* @@ -519,7 +519,7 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq, struct mbuf *mbuf, int locked) KASSERT(mbuf->m_nextpkt == NULL, ("mbuf->m_nextpkt != NULL")); if (locked) { - mtx_assert(&txq->lock, MA_OWNED); + SFXGE_TXQ_LOCK_ASSERT_OWNED(txq); sfxge_tx_qdpl_swizzle(txq); @@ -588,11 +588,11 @@ sfxge_tx_packet_add(struct sfxge_txq *txq, struct mbuf *m) * the packet will be appended to the "get list" of the deferred * packet list. Otherwise, it will be pushed on the "put list". */ - locked = mtx_trylock(&txq->lock); + locked = SFXGE_TXQ_TRYLOCK(txq); if (sfxge_tx_qdpl_put(txq, m, locked) != 0) { if (locked) - mtx_unlock(&txq->lock); + SFXGE_TXQ_UNLOCK(txq); rc = ENOBUFS; goto fail; } @@ -605,7 +605,7 @@ sfxge_tx_packet_add(struct sfxge_txq *txq, struct mbuf *m) * is processing the list. */ if (!locked) - locked = mtx_trylock(&txq->lock); + locked = SFXGE_TXQ_TRYLOCK(txq); if (locked) { /* Try to service the list. */ @@ -626,7 +626,7 @@ sfxge_tx_qdpl_flush(struct sfxge_txq *txq) struct sfxge_tx_dpl *stdp = &txq->dpl; struct mbuf *mbuf, *next; - mtx_lock(&txq->lock); + SFXGE_TXQ_LOCK(txq); sfxge_tx_qdpl_swizzle(txq); for (mbuf = stdp->std_get; mbuf != NULL; mbuf = next) { @@ -638,7 +638,7 @@ sfxge_tx_qdpl_flush(struct sfxge_txq *txq) stdp->std_get_non_tcp_count = 0; stdp->std_getp = &stdp->std_get; - mtx_unlock(&txq->lock); + SFXGE_TXQ_UNLOCK(txq); } void @@ -753,21 +753,20 @@ void sfxge_if_start(struct ifnet *ifp) { struct sfxge_softc *sc = ifp->if_softc; - mtx_lock(&sc->tx_lock); + SFXGE_TXQ_LOCK(sc->txq[0]); sfxge_if_start_locked(ifp); - mtx_unlock(&sc->tx_lock); + SFXGE_TXQ_UNLOCK(sc->txq[0]); } static inline void sfxge_tx_qdpl_service(struct sfxge_txq *txq) { - struct sfxge_softc *sc = txq->sc; - struct ifnet *ifp = sc->ifnet; + struct ifnet *ifp = txq->sc->ifnet; - mtx_assert(&sc->tx_lock, MA_OWNED); + SFXGE_TXQ_LOCK_ASSERT_OWNED(txq); ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; sfxge_if_start_locked(ifp); - mtx_unlock(&sc->tx_lock); + SFXGE_TXQ_UNLOCK(txq); } #endif /* SFXGE_HAVE_MQ */ @@ -1118,12 +1117,12 @@ sfxge_tx_qunblock(struct sfxge_txq *txq) sc = txq->sc; evq = sc->evq[txq->evq_index]; - mtx_assert(&evq->lock, MA_OWNED); + SFXGE_EVQ_LOCK_ASSERT_OWNED(evq); if (txq->init_state != SFXGE_TXQ_STARTED) return; - mtx_lock(SFXGE_TXQ_LOCK(txq)); + SFXGE_TXQ_LOCK(txq); if (txq->blocked) { unsigned int level; @@ -1154,7 +1153,7 @@ sfxge_tx_qstop(struct sfxge_softc *sc, unsigned int index) txq = sc->txq[index]; evq = sc->evq[txq->evq_index]; - mtx_lock(SFXGE_TXQ_LOCK(txq)); + SFXGE_TXQ_LOCK(txq); KASSERT(txq->init_state == SFXGE_TXQ_STARTED, ("txq->init_state != SFXGE_TXQ_STARTED")); @@ -1165,7 +1164,7 @@ sfxge_tx_qstop(struct sfxge_softc *sc, unsigned int index) /* Flush the transmit queue. */ efx_tx_qflush(txq->common); - mtx_unlock(SFXGE_TXQ_LOCK(txq)); + SFXGE_TXQ_UNLOCK(txq); count = 0; do { @@ -1176,8 +1175,8 @@ sfxge_tx_qstop(struct sfxge_softc *sc, unsigned int index) break; } while (++count < 20); - mtx_lock(&evq->lock); - mtx_lock(SFXGE_TXQ_LOCK(txq)); + SFXGE_EVQ_LOCK(evq); + SFXGE_TXQ_LOCK(txq); KASSERT(txq->flush_state != SFXGE_FLUSH_FAILED, ("txq->flush_state == SFXGE_FLUSH_FAILED")); @@ -1207,8 +1206,8 @@ sfxge_tx_qstop(struct sfxge_softc *sc, unsigned int index) efx_sram_buf_tbl_clear(sc->enp, txq->buf_base_id, EFX_TXQ_NBUFS(sc->txq_entries)); - mtx_unlock(&evq->lock); - mtx_unlock(SFXGE_TXQ_LOCK(txq)); + SFXGE_EVQ_UNLOCK(evq); + SFXGE_TXQ_UNLOCK(txq); } static int @@ -1257,14 +1256,14 @@ sfxge_tx_qstart(struct sfxge_softc *sc, unsigned int index) &txq->common)) != 0) goto fail; - mtx_lock(SFXGE_TXQ_LOCK(txq)); + SFXGE_TXQ_LOCK(txq); /* Enable the transmit queue. */ efx_tx_qenable(txq->common); txq->init_state = SFXGE_TXQ_STARTED; - mtx_unlock(SFXGE_TXQ_LOCK(txq)); + SFXGE_TXQ_UNLOCK(txq); return (0); @@ -1362,7 +1361,7 @@ sfxge_tx_qfini(struct sfxge_softc *sc, unsigned int index) sc->txq[index] = NULL; #ifdef SFXGE_HAVE_MQ - mtx_destroy(&txq->lock); + SFXGE_TXQ_LOCK_DESTROY(txq); #endif free(txq, M_SFXGE); @@ -1468,7 +1467,7 @@ sfxge_tx_qinit(struct sfxge_softc *sc, unsigned int txq_index, stdp->std_get_non_tcp_max = sfxge_tx_dpl_get_non_tcp_max; stdp->std_getp = &stdp->std_get; - mtx_init(&txq->lock, "txq", NULL, MTX_DEF); + SFXGE_TXQ_LOCK_INIT(txq, "txq"); SYSCTL_ADD_UINT(device_get_sysctl_ctx(sc->dev), SYSCTL_CHILDREN(txq_node), OID_AUTO, diff --git a/sys/dev/sfxge/sfxge_tx.h b/sys/dev/sfxge/sfxge_tx.h index 958dbc3..d18e757 100644 --- a/sys/dev/sfxge/sfxge_tx.h +++ b/sys/dev/sfxge/sfxge_tx.h @@ -123,13 +123,27 @@ enum sfxge_txq_type { #define SFXGE_TX_BATCH 64 #ifdef SFXGE_HAVE_MQ -#define SFXGE_TXQ_LOCK(txq) (&(txq)->lock) +#define SFXGE_TX_LOCK(txq) (&(txq)->lock) #define SFXGE_TX_SCALE(sc) ((sc)->intr.n_alloc) #else -#define SFXGE_TXQ_LOCK(txq) (&(txq)->sc->tx_lock) +#define SFXGE_TX_LOCK(txq) (&(txq)->sc->tx_lock) #define SFXGE_TX_SCALE(sc) 1 #endif +#define SFXGE_TXQ_LOCK_INIT(_txq, _name) \ + mtx_init(&(_txq)->lock, (_name), NULL, MTX_DEF) +#define SFXGE_TXQ_LOCK_DESTROY(_txq) \ + mtx_destroy(&(_txq)->lock) +#define SFXGE_TXQ_LOCK(_txq) \ + mtx_lock(SFXGE_TX_LOCK(_txq)) +#define SFXGE_TXQ_TRYLOCK(_txq) \ + mtx_trylock(SFXGE_TX_LOCK(_txq)) +#define SFXGE_TXQ_UNLOCK(_txq) \ + mtx_unlock(SFXGE_TX_LOCK(_txq)) +#define SFXGE_TXQ_LOCK_ASSERT_OWNED(_txq) \ + mtx_assert(SFXGE_TX_LOCK(_txq), MA_OWNED) + + struct sfxge_txq { /* The following fields should be written very rarely */ struct sfxge_softc *sc; diff --git a/sys/dev/xen/timer/timer.c b/sys/dev/xen/timer/timer.c index 5743076..53aff0a 100644 --- a/sys/dev/xen/timer/timer.c +++ b/sys/dev/xen/timer/timer.c @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include <machine/clock.h> #include <machine/_inttypes.h> #include <machine/smp.h> +#include <machine/pvclock.h> #include <dev/xen/timer/timer.h> @@ -95,9 +96,6 @@ struct xentimer_softc { struct eventtimer et; }; -/* Last time; this guarantees a monotonically increasing clock. */ -volatile uint64_t xen_timer_last_time = 0; - static void xentimer_identify(driver_t *driver, device_t parent) { @@ -148,128 +146,20 @@ xentimer_probe(device_t dev) return (BUS_PROBE_NOWILDCARD); } -/* - * Scale a 64-bit delta by scaling and multiplying by a 32-bit fraction, - * yielding a 64-bit result. - */ -static inline uint64_t -scale_delta(uint64_t delta, uint32_t mul_frac, int shift) -{ - uint64_t product; - - if (shift < 0) - delta >>= -shift; - else - delta <<= shift; - -#if defined(__i386__) - { - uint32_t tmp1, tmp2; - - /** - * For i386, the formula looks like: - * - * lower = (mul_frac * (delta & UINT_MAX)) >> 32 - * upper = mul_frac * (delta >> 32) - * product = lower + upper - */ - __asm__ ( - "mul %5 ; " - "mov %4,%%eax ; " - "mov %%edx,%4 ; " - "mul %5 ; " - "xor %5,%5 ; " - "add %4,%%eax ; " - "adc %5,%%edx ; " - : "=A" (product), "=r" (tmp1), "=r" (tmp2) - : "a" ((uint32_t)delta), "1" ((uint32_t)(delta >> 32)), - "2" (mul_frac) ); - } -#elif defined(__amd64__) - { - unsigned long tmp; - - __asm__ ( - "mulq %[mul_frac] ; shrd $32, %[hi], %[lo]" - : [lo]"=a" (product), [hi]"=d" (tmp) - : "0" (delta), [mul_frac]"rm"((uint64_t)mul_frac)); - } -#else -#error "xentimer: unsupported architecture" -#endif - - return (product); -} - -static uint64_t -get_nsec_offset(struct vcpu_time_info *tinfo) -{ - - return (scale_delta(rdtsc() - tinfo->tsc_timestamp, - tinfo->tsc_to_system_mul, tinfo->tsc_shift)); -} - -/* - * Read the current hypervisor system uptime value from Xen. - * See <xen/interface/xen.h> for a description of how this works. - */ -static uint32_t -xen_fetch_vcpu_tinfo(struct vcpu_time_info *dst, struct vcpu_time_info *src) -{ - - do { - dst->version = src->version; - rmb(); - dst->tsc_timestamp = src->tsc_timestamp; - dst->system_time = src->system_time; - dst->tsc_to_system_mul = src->tsc_to_system_mul; - dst->tsc_shift = src->tsc_shift; - rmb(); - } while ((src->version & 1) | (dst->version ^ src->version)); - - return (dst->version); -} - /** * \brief Get the current time, in nanoseconds, since the hypervisor booted. * * \param vcpu vcpu_info structure to fetch the time from. * - * \note This function returns the current CPU's idea of this value, unless - * it happens to be less than another CPU's previously determined value. */ static uint64_t xen_fetch_vcpu_time(struct vcpu_info *vcpu) { - struct vcpu_time_info dst; - struct vcpu_time_info *src; - uint32_t pre_version; - uint64_t now; - volatile uint64_t last; - - src = &vcpu->time; - - do { - pre_version = xen_fetch_vcpu_tinfo(&dst, src); - barrier(); - now = dst.system_time + get_nsec_offset(&dst); - barrier(); - } while (pre_version != src->version); + struct pvclock_vcpu_time_info *time; - /* - * Enforce a monotonically increasing clock time across all - * VCPUs. If our time is too old, use the last time and return. - * Otherwise, try to update the last time. - */ - do { - last = xen_timer_last_time; - if (last > now) { - now = last; - break; - } - } while (!atomic_cmpset_64(&xen_timer_last_time, last, now)); + time = (struct pvclock_vcpu_time_info *) &vcpu->time; - return (now); + return (pvclock_get_timecount(time)); } static uint32_t @@ -302,15 +192,11 @@ static void xen_fetch_wallclock(struct timespec *ts) { shared_info_t *src = HYPERVISOR_shared_info; - uint32_t version = 0; + struct pvclock_wall_clock *wc; - do { - version = src->wc_version; - rmb(); - ts->tv_sec = src->wc_sec; - ts->tv_nsec = src->wc_nsec; - rmb(); - } while ((src->wc_version & 1) | (version ^ src->wc_version)); + wc = (struct pvclock_wall_clock *) &src->wc_version; + + pvclock_get_wallclock(wc, ts); } static void @@ -574,7 +460,7 @@ xentimer_resume(device_t dev) } /* Reset the last uptime value */ - xen_timer_last_time = 0; + pvclock_resume(); /* Reset the RTC clock */ inittodr(time_second); diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c index 6c4a403..2e35582 100644 --- a/sys/fs/tmpfs/tmpfs_subr.c +++ b/sys/fs/tmpfs/tmpfs_subr.c @@ -1426,7 +1426,6 @@ tmpfs_check_mtime(struct vnode *vp) ASSERT_VOP_ELOCKED(vp, "check_mtime"); if (vp->v_type != VREG) return; - node = VP_TO_TMPFS_NODE(vp); obj = vp->v_object; KASSERT((obj->flags & (OBJ_TMPFS_NODE | OBJ_TMPFS)) == (OBJ_TMPFS_NODE | OBJ_TMPFS), ("non-tmpfs obj")); diff --git a/sys/i386/include/pvclock.h b/sys/i386/include/pvclock.h new file mode 100644 index 0000000..f01fac6 --- /dev/null +++ b/sys/i386/include/pvclock.h @@ -0,0 +1,6 @@ +/*- + * This file is in the public domain. + */ +/* $FreeBSD$ */ + +#include <x86/pvclock.h> diff --git a/sys/i386/xen/clock.c b/sys/i386/xen/clock.c index 26fafee..ffb436e 100644 --- a/sys/i386/xen/clock.c +++ b/sys/i386/xen/clock.c @@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$"); #include <machine/intr_machdep.h> #include <machine/md_var.h> #include <machine/psl.h> +#include <machine/pvclock.h> #if defined(SMP) #include <machine/smp.h> #endif @@ -127,8 +128,6 @@ u_int timer_freq = TIMER_FREQ; static u_long cyc2ns_scale; static uint64_t processed_system_time; /* stime (ns) at last processing. */ -extern volatile uint64_t xen_timer_last_time; - #define do_div(n,base) ({ \ unsigned long __upper, __low, __high, __mod, __base; \ __base = (base); \ @@ -172,7 +171,7 @@ static inline unsigned long long cycles_2_ns(unsigned long long cyc) static uint32_t getit(void) { - return (xen_timer_last_time); + return (pvclock_get_last_cycles()); } diff --git a/sys/kern/kern_clocksource.c b/sys/kern/kern_clocksource.c index 4178513..cbbbce4 100644 --- a/sys/kern/kern_clocksource.c +++ b/sys/kern/kern_clocksource.c @@ -908,3 +908,42 @@ sysctl_kern_eventtimer_periodic(SYSCTL_HANDLER_ARGS) SYSCTL_PROC(_kern_eventtimer, OID_AUTO, periodic, CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, 0, 0, sysctl_kern_eventtimer_periodic, "I", "Enable event timer periodic mode"); + +#include "opt_ddb.h" + +#ifdef DDB +#include <ddb/ddb.h> + +DB_SHOW_COMMAND(clocksource, db_show_clocksource) +{ + struct pcpu_state *st; + int c; + + CPU_FOREACH(c) { + st = DPCPU_ID_PTR(c, timerstate); + db_printf( + "CPU %2d: action %d handle %d ipi %d idle %d\n" + " now %#jx nevent %#jx (%jd)\n" + " ntick %#jx (%jd) nhard %#jx (%jd)\n" + " nstat %#jx (%jd) nprof %#jx (%jd)\n" + " ncall %#jx (%jd) ncallopt %#jx (%jd)\n", + c, st->action, st->handle, st->ipi, st->idle, + (uintmax_t)st->now, + (uintmax_t)st->nextevent, + (uintmax_t)(st->nextevent - st->now) / tick_sbt, + (uintmax_t)st->nexttick, + (uintmax_t)(st->nexttick - st->now) / tick_sbt, + (uintmax_t)st->nexthard, + (uintmax_t)(st->nexthard - st->now) / tick_sbt, + (uintmax_t)st->nextstat, + (uintmax_t)(st->nextstat - st->now) / tick_sbt, + (uintmax_t)st->nextprof, + (uintmax_t)(st->nextprof - st->now) / tick_sbt, + (uintmax_t)st->nextcall, + (uintmax_t)(st->nextcall - st->now) / tick_sbt, + (uintmax_t)st->nextcallopt, + (uintmax_t)(st->nextcallopt - st->now) / tick_sbt); + } +} + +#endif diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 9d7d44b..fa06784 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -377,15 +377,16 @@ pipe_named_ctor(struct pipe **ppipe, struct thread *td) void pipe_dtor(struct pipe *dpipe) { + struct pipe *peer; ino_t ino; ino = dpipe->pipe_ino; + peer = (dpipe->pipe_state & PIPE_NAMED) != 0 ? dpipe->pipe_peer : NULL; funsetown(&dpipe->pipe_sigio); pipeclose(dpipe); - if (dpipe->pipe_state & PIPE_NAMED) { - dpipe = dpipe->pipe_peer; - funsetown(&dpipe->pipe_sigio); - pipeclose(dpipe); + if (peer != NULL) { + funsetown(&peer->pipe_sigio); + pipeclose(peer); } if (ino != 0 && ino != (ino_t)-1) free_unr(pipeino_unr, ino); diff --git a/sys/ofed/include/linux/linux_idr.c b/sys/ofed/include/linux/linux_idr.c index 3397cda..809e178 100644 --- a/sys/ofed/include/linux/linux_idr.c +++ b/sys/ofed/include/linux/linux_idr.c @@ -223,7 +223,7 @@ idr_pre_get(struct idr *idr, gfp_t gfp_mask) for (il = idr->free; il != NULL; il = il->ary[0]) need--; mtx_unlock(&idr->lock); - if (need == 0) + if (need <= 0) break; for (head = NULL; need; need--) { iln = malloc(sizeof(*il), M_IDR, M_ZERO | gfp_mask); diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h index b17e415..25ba218 100644 --- a/sys/sys/cdefs.h +++ b/sys/sys/cdefs.h @@ -293,7 +293,8 @@ #elif defined(__COUNTER__) #define _Static_assert(x, y) __Static_assert(x, __COUNTER__) #define __Static_assert(x, y) ___Static_assert(x, y) -#define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] +#define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] \ + __unused #else #define _Static_assert(x, y) struct __hack #endif diff --git a/sys/x86/include/pvclock.h b/sys/x86/include/pvclock.h new file mode 100644 index 0000000..402ffed --- /dev/null +++ b/sys/x86/include/pvclock.h @@ -0,0 +1,59 @@ +/*- + * Copyright (c) 2014, Bryan Venteicher <bryanv@FreeBSD.org> + * 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 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. + * + * $FreeBSD$ + */ + +#ifndef X86_PVCLOCK +#define X86_PVCLOCK + +struct pvclock_vcpu_time_info { + uint32_t version; + uint32_t pad0; + uint64_t tsc_timestamp; + uint64_t system_time; + uint32_t tsc_to_system_mul; + int8_t tsc_shift; + uint8_t flags; + uint8_t pad[2]; +}; + +#define PVCLOCK_FLAG_TSC_STABLE 0x01 +#define PVCLOCK_FLAG_GUEST_PASUED 0x02 + +struct pvclock_wall_clock { + uint32_t version; + uint32_t sec; + uint32_t nsec; +}; + +void pvclock_resume(void); +uint64_t pvclock_get_last_cycles(void); +uint64_t pvclock_tsc_freq(struct pvclock_vcpu_time_info *ti); +uint64_t pvclock_get_timecount(struct pvclock_vcpu_time_info *ti); +void pvclock_get_wallclock(struct pvclock_wall_clock *wc, + struct timespec *ts); + +#endif diff --git a/sys/x86/x86/pvclock.c b/sys/x86/x86/pvclock.c new file mode 100644 index 0000000..c1e6f83 --- /dev/null +++ b/sys/x86/x86/pvclock.c @@ -0,0 +1,203 @@ +/*- + * Copyright (c) 2009 Adrian Chadd + * Copyright (c) 2012 Spectra Logic Corporation + * Copyright (c) 2014 Bryan Venteicher + * 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 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 <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + +#include <sys/param.h> +#include <sys/systm.h> +#include <sys/proc.h> + +#include <machine/cpufunc.h> +#include <machine/cpu.h> +#include <machine/atomic.h> +#include <machine/pvclock.h> + +/* + * Last time; this guarantees a monotonically increasing clock for when + * a stable TSC is not provided. + */ +static volatile uint64_t pvclock_last_cycles; + +void +pvclock_resume(void) +{ + + atomic_store_rel_64(&pvclock_last_cycles, 0); +} + +uint64_t +pvclock_get_last_cycles(void) +{ + + return (atomic_load_acq_64(&pvclock_last_cycles)); +} + +uint64_t +pvclock_tsc_freq(struct pvclock_vcpu_time_info *ti) +{ + uint64_t freq; + + freq = (1000000000ULL << 32) / ti->tsc_to_system_mul; + + if (ti->tsc_shift < 0) + freq <<= -ti->tsc_shift; + else + freq >>= ti->tsc_shift; + + return (freq); +} + +/* + * Scale a 64-bit delta by scaling and multiplying by a 32-bit fraction, + * yielding a 64-bit result. + */ +static inline uint64_t +pvclock_scale_delta(uint64_t delta, uint32_t mul_frac, int shift) +{ + uint64_t product; + + if (shift < 0) + delta >>= -shift; + else + delta <<= shift; + +#if defined(__i386__) + { + uint32_t tmp1, tmp2; + + /** + * For i386, the formula looks like: + * + * lower = (mul_frac * (delta & UINT_MAX)) >> 32 + * upper = mul_frac * (delta >> 32) + * product = lower + upper + */ + __asm__ ( + "mul %5 ; " + "mov %4,%%eax ; " + "mov %%edx,%4 ; " + "mul %5 ; " + "xor %5,%5 ; " + "add %4,%%eax ; " + "adc %5,%%edx ; " + : "=A" (product), "=r" (tmp1), "=r" (tmp2) + : "a" ((uint32_t)delta), "1" ((uint32_t)(delta >> 32)), + "2" (mul_frac) ); + } +#elif defined(__amd64__) + { + unsigned long tmp; + + __asm__ ( + "mulq %[mul_frac] ; shrd $32, %[hi], %[lo]" + : [lo]"=a" (product), [hi]"=d" (tmp) + : "0" (delta), [mul_frac]"rm"((uint64_t)mul_frac)); + } +#else +#error "pvclock: unsupported x86 architecture?" +#endif + + return (product); +} + +static uint64_t +pvclock_get_nsec_offset(struct pvclock_vcpu_time_info *ti) +{ + uint64_t delta; + + delta = rdtsc() - ti->tsc_timestamp; + + return (pvclock_scale_delta(delta, ti->tsc_to_system_mul, + ti->tsc_shift)); +} + +static void +pvclock_read_time_info(struct pvclock_vcpu_time_info *ti, + uint64_t *cycles, uint8_t *flags) +{ + uint32_t version; + + do { + version = ti->version; + rmb(); + *cycles = ti->system_time + pvclock_get_nsec_offset(ti); + *flags = ti->flags; + rmb(); + } while ((ti->version & 1) != 0 || ti->version != version); +} + +static void +pvclock_read_wall_clock(struct pvclock_wall_clock *wc, uint32_t *sec, + uint32_t *nsec) +{ + uint32_t version; + + do { + version = wc->version; + rmb(); + *sec = wc->sec; + *nsec = wc->nsec; + rmb(); + } while ((wc->version & 1) != 0 || wc->version != version); +} + +uint64_t +pvclock_get_timecount(struct pvclock_vcpu_time_info *ti) +{ + uint64_t now, last; + uint8_t flags; + + pvclock_read_time_info(ti, &now, &flags); + + if (flags & PVCLOCK_FLAG_TSC_STABLE) + return (now); + + /* + * Enforce a monotonically increasing clock time across all VCPUs. + * If our time is too old, use the last time and return. Otherwise, + * try to update the last time. + */ + do { + last = atomic_load_acq_64(&pvclock_last_cycles); + if (last > now) + return (last); + } while (!atomic_cmpset_64(&pvclock_last_cycles, last, now)); + + return (now); +} + +void +pvclock_get_wallclock(struct pvclock_wall_clock *wc, struct timespec *ts) +{ + uint32_t sec, nsec; + + pvclock_read_wall_clock(wc, &sec, &nsec); + ts->tv_sec = sec; + ts->tv_nsec = nsec; +} diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 6cbf7d8..f779140 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -5747,18 +5747,28 @@ OLD_FILES+=usr/share/man/man8/ntptime.8.gz #.endif .if ${MK_OPENSSH} == no +OLD_FILES+=etc/rc.d/sshd +OLD_FILES+=etc/ssh/moduli +OLD_FILES+=etc/ssh/ssh_config +OLD_FILES+=etc/ssh/sshd_config +OLD_FILES+=usr/bin/scp OLD_FILES+=usr/bin/sftp +OLD_FILES+=usr/bin/slogin OLD_FILES+=usr/bin/ssh OLD_FILES+=usr/bin/ssh-add OLD_FILES+=usr/bin/ssh-agent OLD_FILES+=usr/bin/ssh-copy-id OLD_FILES+=usr/bin/ssh-keygen OLD_FILES+=usr/bin/ssh-keyscan +OLD_FILES+=usr/lib/pam_ssh.so +OLD_LIBS+=usr/lib/pam_ssh.so.5 OLD_FILES+=usr/lib/private/libssh.a OLD_FILES+=usr/lib/private/libssh.so OLD_LIBS+=usr/lib/private/libssh.so.5 OLD_FILES+=usr/lib/private/libssh_p.a .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64" +OLD_FILES+=usr/lib32/pam_ssh.so +OLD_LIBS+=usr/lib32/pam_ssh.so.5 OLD_FILES+=usr/lib32/private/libssh.a OLD_FILES+=usr/lib32/private/libssh.so OLD_LIBS+=usr/lib32/private/libssh.so.5 @@ -5768,6 +5778,22 @@ OLD_FILES+=usr/libexec/sftp-server OLD_FILES+=usr/libexec/ssh-keysign OLD_FILES+=usr/libexec/ssh-pkcs11-helper OLD_FILES+=usr/sbin/sshd +OLD_FILES+=usr/share/man/man1/scp.1.gz +OLD_FILES+=usr/share/man/man1/sftp.1.gz +OLD_FILES+=usr/share/man/man1/slogin.1.gz +OLD_FILES+=usr/share/man/man1/ssh-add.1.gz +OLD_FILES+=usr/share/man/man1/ssh-agent.1.gz +OLD_FILES+=usr/share/man/man1/ssh-copy-id.1.gz +OLD_FILES+=usr/share/man/man1/ssh-keygen.1.gz +OLD_FILES+=usr/share/man/man1/ssh-keyscan.1.gz +OLD_FILES+=usr/share/man/man1/ssh.1.gz +OLD_FILES+=usr/share/man/man5/ssh_config.5.gz +OLD_FILES+=usr/share/man/man5/sshd_config.5.gz +OLD_FILES+=usr/share/man/man8/pam_ssh.8.gz +OLD_FILES+=usr/share/man/man8/sftp-server.8.gz +OLD_FILES+=usr/share/man/man8/ssh-keysign.8.gz +OLD_FILES+=usr/share/man/man8/ssh-pkcs11-helper.8.gz +OLD_FILES+=usr/share/man/man8/sshd.8.gz .endif .if ${MK_OPENSSL} == no @@ -5869,6 +5895,11 @@ OLD_FILES+=etc/pf.os OLD_FILES+=etc/rc.d/ftp-proxy OLD_FILES+=sbin/pfctl OLD_FILES+=sbin/pflogd +OLD_FILES+=usr/include/netpfil/pf/pf.h +OLD_FILES+=usr/include/netpfil/pf/pf_altq.h +OLD_FILES+=usr/include/netpfil/pf/pf_mtag.h +OLD_FILES+=usr/lib/snmp_pf.so +OLD_LIBS+=usr/lib/snmp_pf.so.6 OLD_FILES+=usr/libexec/tftp-proxy OLD_FILES+=usr/sbin/ftp-proxy OLD_FILES+=usr/share/examples/etc/pf.os @@ -5892,6 +5923,8 @@ OLD_FILES+=usr/share/man/man8/ftp-proxy.8.gz OLD_FILES+=usr/share/man/man8/pfctl.8.gz OLD_FILES+=usr/share/man/man8/pflogd.8.gz OLD_FILES+=usr/share/man/man8/tftp-proxy.8.gz +OLD_FILES+=usr/share/snmp/defs/pf_tree.def +OLD_FILES+=usr/share/snmp/mibs/BEGEMOT-PF-MIB.txt .endif .if ${MK_PKGBOOTSTRAP} == no @@ -5899,12 +5932,99 @@ OLD_FILES+=usr/sbin/pkg OLD_FILES+=usr/share/man/man7/pkg.7.gz .endif +.if ${MK_PMC} == no +OLD_FILES+=usr/bin/pmcstudy +OLD_FILES+=usr/include/pmc.h +OLD_FILES+=usr/include/pmclog.h +OLD_FILES+=usr/lib/libpmc.a +OLD_FILES+=usr/lib/libpmc.so +OLD_LIBS+=usr/lib/libpmc.so.5 +OLD_FILES+=usr/lib/libpmc_p.a +OLD_FILES+=usr/lib32/libpmc.a +OLD_FILES+=usr/lib32/libpmc.so +OLD_LIBS+=usr/lib32/libpmc.so.5 +OLD_FILES+=usr/lib32/libpmc_p.a +OLD_FILES+=usr/sbin/pmcannotate +OLD_FILES+=usr/sbin/pmccontrol +OLD_FILES+=usr/sbin/pmcstat +OLD_FILES+=usr/share/man/man1/pmcstudy.1.gz +OLD_FILES+=usr/share/man/man3/pmc.3.gz +OLD_FILES+=usr/share/man/man3/pmc.atom.3.gz +OLD_FILES+=usr/share/man/man3/pmc.atomsilvermont.3.gz +OLD_FILES+=usr/share/man/man3/pmc.core.3.gz +OLD_FILES+=usr/share/man/man3/pmc.core2.3.gz +OLD_FILES+=usr/share/man/man3/pmc.corei7.3.gz +OLD_FILES+=usr/share/man/man3/pmc.corei7uc.3.gz +OLD_FILES+=usr/share/man/man3/pmc.haswell.3.gz +OLD_FILES+=usr/share/man/man3/pmc.haswelluc.3.gz +OLD_FILES+=usr/share/man/man3/pmc.iaf.3.gz +OLD_FILES+=usr/share/man/man3/pmc.ivybridge.3.gz +OLD_FILES+=usr/share/man/man3/pmc.ivybridgexeon.3.gz +OLD_FILES+=usr/share/man/man3/pmc.k7.3.gz +OLD_FILES+=usr/share/man/man3/pmc.k8.3.gz +OLD_FILES+=usr/share/man/man3/pmc.mips24k.3.gz +OLD_FILES+=usr/share/man/man3/pmc.octeon.3.gz +OLD_FILES+=usr/share/man/man3/pmc.p4.3.gz +OLD_FILES+=usr/share/man/man3/pmc.p5.3.gz +OLD_FILES+=usr/share/man/man3/pmc.p6.3.gz +OLD_FILES+=usr/share/man/man3/pmc.sandybridge.3.gz +OLD_FILES+=usr/share/man/man3/pmc.sandybridgeuc.3.gz +OLD_FILES+=usr/share/man/man3/pmc.sandybridgexeon.3.gz +OLD_FILES+=usr/share/man/man3/pmc.soft.3.gz +OLD_FILES+=usr/share/man/man3/pmc.tsc.3.gz +OLD_FILES+=usr/share/man/man3/pmc.ucf.3.gz +OLD_FILES+=usr/share/man/man3/pmc.westmere.3.gz +OLD_FILES+=usr/share/man/man3/pmc.westmereuc.3.gz +OLD_FILES+=usr/share/man/man3/pmc.xscale.3.gz +OLD_FILES+=usr/share/man/man3/pmc_allocate.3.gz +OLD_FILES+=usr/share/man/man3/pmc_attach.3.gz +OLD_FILES+=usr/share/man/man3/pmc_capabilities.3.gz +OLD_FILES+=usr/share/man/man3/pmc_configure_logfile.3.gz +OLD_FILES+=usr/share/man/man3/pmc_cpuinfo.3.gz +OLD_FILES+=usr/share/man/man3/pmc_detach.3.gz +OLD_FILES+=usr/share/man/man3/pmc_disable.3.gz +OLD_FILES+=usr/share/man/man3/pmc_enable.3.gz +OLD_FILES+=usr/share/man/man3/pmc_event_names_of_class.3.gz +OLD_FILES+=usr/share/man/man3/pmc_flush_logfile.3.gz +OLD_FILES+=usr/share/man/man3/pmc_get_driver_stats.3.gz +OLD_FILES+=usr/share/man/man3/pmc_get_msr.3.gz +OLD_FILES+=usr/share/man/man3/pmc_init.3.gz +OLD_FILES+=usr/share/man/man3/pmc_name_of_capability.3.gz +OLD_FILES+=usr/share/man/man3/pmc_name_of_class.3.gz +OLD_FILES+=usr/share/man/man3/pmc_name_of_cputype.3.gz +OLD_FILES+=usr/share/man/man3/pmc_name_of_disposition.3.gz +OLD_FILES+=usr/share/man/man3/pmc_name_of_event.3.gz +OLD_FILES+=usr/share/man/man3/pmc_name_of_mode.3.gz +OLD_FILES+=usr/share/man/man3/pmc_name_of_state.3.gz +OLD_FILES+=usr/share/man/man3/pmc_ncpu.3.gz +OLD_FILES+=usr/share/man/man3/pmc_npmc.3.gz +OLD_FILES+=usr/share/man/man3/pmc_pmcinfo.3.gz +OLD_FILES+=usr/share/man/man3/pmc_read.3.gz +OLD_FILES+=usr/share/man/man3/pmc_release.3.gz +OLD_FILES+=usr/share/man/man3/pmc_rw.3.gz +OLD_FILES+=usr/share/man/man3/pmc_set.3.gz +OLD_FILES+=usr/share/man/man3/pmc_start.3.gz +OLD_FILES+=usr/share/man/man3/pmc_stop.3.gz +OLD_FILES+=usr/share/man/man3/pmc_width.3.gz +OLD_FILES+=usr/share/man/man3/pmc_write.3.gz +OLD_FILES+=usr/share/man/man3/pmc_writelog.3.gz +OLD_FILES+=usr/share/man/man3/pmclog.3.gz +OLD_FILES+=usr/share/man/man3/pmclog_close.3.gz +OLD_FILES+=usr/share/man/man3/pmclog_feed.3.gz +OLD_FILES+=usr/share/man/man3/pmclog_open.3.gz +OLD_FILES+=usr/share/man/man3/pmclog_read.3.gz +OLD_FILES+=usr/share/man/man8/pmcannotate.8.gz +OLD_FILES+=usr/share/man/man8/pmccontrol.8.gz +OLD_FILES+=usr/share/man/man8/pmcstat.8.gz +.endif + .if ${MK_PORTSNAP} == no OLD_FILES+=etc/portsnap.conf OLD_FILES+=usr/libexec/make_index OLD_FILES+=usr/libexec/phttpget OLD_FILES+=usr/sbin/portsnap OLD_FILES+=usr/share/examples/etc/portsnap.conf +OLD_FILES+=usr/share/man/man8/phttpget.8.gz OLD_FILES+=usr/share/man/man8/portsnap.8.gz .endif @@ -6024,6 +6144,21 @@ OLD_FILES+=usr/lib/private/libldns_p.a OLD_FILES+=usr/lib/private/libssh_p.a .endif +.if ${MK_QUOTAS} == no +OLD_FILES+=sbin/quotacheck +OLD_FILES+=usr/bin/quota +OLD_FILES+=usr/sbin/edquota +OLD_FILES+=usr/sbin/quotaoff +OLD_FILES+=usr/sbin/quotaon +OLD_FILES+=usr/sbin/repquota +OLD_FILES+=usr/share/man/man1/quota.1.gz +OLD_FILES+=usr/share/man/man8/edquota.8.gz +OLD_FILES+=usr/share/man/man8/quotacheck.8.gz +OLD_FILES+=usr/share/man/man8/quotaoff.8.gz +OLD_FILES+=usr/share/man/man8/quotaon.8.gz +OLD_FILES+=usr/share/man/man8/repquota.8.gz +.endif + .if ${MK_RCMDS} == no OLD_FILES+=bin/rcp OLD_FILES+=etc/rc.d/rwho @@ -6327,9 +6462,225 @@ OLD_FILES+=usr/share/doc/pjdfstest/README OLD_DIRS+=usr/share/doc/pjdfstest .endif -#.if ${MK_SYSCONS} == no -# to be filled in -#.endif +.if ${MK_SSP} == no +OLD_LIBS+=lib/libssp.so.0 +OLD_FILES+=usr/include/ssp/ssp.h +OLD_FILES+=usr/include/ssp/stdio.h +OLD_FILES+=usr/include/ssp/string.h +OLD_FILES+=usr/include/ssp/unistd.h +OLD_FILES+=usr/lib/libssp.a +OLD_FILES+=usr/lib/libssp.so +OLD_FILES+=usr/lib/libssp_nonshared.a +OLD_FILES+=usr/lib32/libssp.a +OLD_FILES+=usr/lib32/libssp.so +OLD_LIBS+=usr/lib32/libssp.so.0 +OLD_FILES+=usr/lib32/libssp_nonshared.a +OLD_FILES+=usr/tests/lib/libc/ssp/Kyuafile +OLD_FILES+=usr/tests/lib/libc/ssp/h_fgets +OLD_FILES+=usr/tests/lib/libc/ssp/h_getcwd +OLD_FILES+=usr/tests/lib/libc/ssp/h_gets +OLD_FILES+=usr/tests/lib/libc/ssp/h_memcpy +OLD_FILES+=usr/tests/lib/libc/ssp/h_memmove +OLD_FILES+=usr/tests/lib/libc/ssp/h_memset +OLD_FILES+=usr/tests/lib/libc/ssp/h_read +OLD_FILES+=usr/tests/lib/libc/ssp/h_readlink +OLD_FILES+=usr/tests/lib/libc/ssp/h_snprintf +OLD_FILES+=usr/tests/lib/libc/ssp/h_sprintf +OLD_FILES+=usr/tests/lib/libc/ssp/h_stpcpy +OLD_FILES+=usr/tests/lib/libc/ssp/h_stpncpy +OLD_FILES+=usr/tests/lib/libc/ssp/h_strcat +OLD_FILES+=usr/tests/lib/libc/ssp/h_strcpy +OLD_FILES+=usr/tests/lib/libc/ssp/h_strncat +OLD_FILES+=usr/tests/lib/libc/ssp/h_strncpy +OLD_FILES+=usr/tests/lib/libc/ssp/h_vsnprintf +OLD_FILES+=usr/tests/lib/libc/ssp/h_vsprintf +OLD_FILES+=usr/tests/lib/libc/ssp/ssp_test +.endif + +.if ${MK_SYSCONS} == no +OLD_FILES+=usr/share/syscons/fonts/INDEX.fonts +OLD_FILES+=usr/share/syscons/fonts/armscii8-8x14.fnt +OLD_FILES+=usr/share/syscons/fonts/armscii8-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/armscii8-8x8.fnt +OLD_FILES+=usr/share/syscons/fonts/cp1251-8x14.fnt +OLD_FILES+=usr/share/syscons/fonts/cp1251-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/cp1251-8x8.fnt +OLD_FILES+=usr/share/syscons/fonts/cp437-8x14.fnt +OLD_FILES+=usr/share/syscons/fonts/cp437-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/cp437-8x8.fnt +OLD_FILES+=usr/share/syscons/fonts/cp437-thin-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/cp437-thin-8x8.fnt +OLD_FILES+=usr/share/syscons/fonts/cp850-8x14.fnt +OLD_FILES+=usr/share/syscons/fonts/cp850-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/cp850-8x8.fnt +OLD_FILES+=usr/share/syscons/fonts/cp850-thin-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/cp850-thin-8x8.fnt +OLD_FILES+=usr/share/syscons/fonts/cp865-8x14.fnt +OLD_FILES+=usr/share/syscons/fonts/cp865-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/cp865-8x8.fnt +OLD_FILES+=usr/share/syscons/fonts/cp865-thin-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/cp865-thin-8x8.fnt +OLD_FILES+=usr/share/syscons/fonts/cp866-8x14.fnt +OLD_FILES+=usr/share/syscons/fonts/cp866-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/cp866-8x8.fnt +OLD_FILES+=usr/share/syscons/fonts/cp866b-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/cp866c-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/cp866u-8x14.fnt +OLD_FILES+=usr/share/syscons/fonts/cp866u-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/cp866u-8x8.fnt +OLD_FILES+=usr/share/syscons/fonts/haik8-8x14.fnt +OLD_FILES+=usr/share/syscons/fonts/haik8-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/haik8-8x8.fnt +OLD_FILES+=usr/share/syscons/fonts/iso-8x14.fnt +OLD_FILES+=usr/share/syscons/fonts/iso-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/iso-8x8.fnt +OLD_FILES+=usr/share/syscons/fonts/iso-thin-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/iso02-8x14.fnt +OLD_FILES+=usr/share/syscons/fonts/iso02-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/iso02-8x8.fnt +OLD_FILES+=usr/share/syscons/fonts/iso04-8x14.fnt +OLD_FILES+=usr/share/syscons/fonts/iso04-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/iso04-8x8.fnt +OLD_FILES+=usr/share/syscons/fonts/iso04-vga9-8x14.fnt +OLD_FILES+=usr/share/syscons/fonts/iso04-vga9-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/iso04-vga9-8x8.fnt +OLD_FILES+=usr/share/syscons/fonts/iso04-vga9-wide-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/iso04-wide-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/iso05-8x14.fnt +OLD_FILES+=usr/share/syscons/fonts/iso05-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/iso05-8x8.fnt +OLD_FILES+=usr/share/syscons/fonts/iso07-8x14.fnt +OLD_FILES+=usr/share/syscons/fonts/iso07-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/iso07-8x8.fnt +OLD_FILES+=usr/share/syscons/fonts/iso08-8x14.fnt +OLD_FILES+=usr/share/syscons/fonts/iso08-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/iso08-8x8.fnt +OLD_FILES+=usr/share/syscons/fonts/iso09-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/iso15-8x14.fnt +OLD_FILES+=usr/share/syscons/fonts/iso15-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/iso15-8x8.fnt +OLD_FILES+=usr/share/syscons/fonts/iso15-thin-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/koi8-r-8x14.fnt +OLD_FILES+=usr/share/syscons/fonts/koi8-r-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/koi8-r-8x8.fnt +OLD_FILES+=usr/share/syscons/fonts/koi8-rb-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/koi8-rc-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/koi8-u-8x14.fnt +OLD_FILES+=usr/share/syscons/fonts/koi8-u-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/koi8-u-8x8.fnt +OLD_FILES+=usr/share/syscons/fonts/swiss-1131-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/swiss-1251-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/swiss-8x14.fnt +OLD_FILES+=usr/share/syscons/fonts/swiss-8x16.fnt +OLD_FILES+=usr/share/syscons/fonts/swiss-8x8.fnt +OLD_FILES+=usr/share/syscons/keymaps/INDEX.keymaps +OLD_FILES+=usr/share/syscons/keymaps/be.iso.acc.kbd +OLD_FILES+=usr/share/syscons/keymaps/be.iso.kbd +OLD_FILES+=usr/share/syscons/keymaps/bg.bds.ctrlcaps.kbd +OLD_FILES+=usr/share/syscons/keymaps/bg.phonetic.ctrlcaps.kbd +OLD_FILES+=usr/share/syscons/keymaps/br275.cp850.kbd +OLD_FILES+=usr/share/syscons/keymaps/br275.iso.acc.kbd +OLD_FILES+=usr/share/syscons/keymaps/br275.iso.kbd +OLD_FILES+=usr/share/syscons/keymaps/by.cp1131.kbd +OLD_FILES+=usr/share/syscons/keymaps/by.cp1251.kbd +OLD_FILES+=usr/share/syscons/keymaps/by.iso5.kbd +OLD_FILES+=usr/share/syscons/keymaps/ce.iso2.kbd +OLD_FILES+=usr/share/syscons/keymaps/colemak.iso15.acc.kbd +OLD_FILES+=usr/share/syscons/keymaps/cs.latin2.qwertz.kbd +OLD_FILES+=usr/share/syscons/keymaps/cz.iso2.kbd +OLD_FILES+=usr/share/syscons/keymaps/danish.cp865.kbd +OLD_FILES+=usr/share/syscons/keymaps/danish.iso.acc.kbd +OLD_FILES+=usr/share/syscons/keymaps/danish.iso.kbd +OLD_FILES+=usr/share/syscons/keymaps/danish.iso.macbook.kbd +OLD_FILES+=usr/share/syscons/keymaps/dutch.iso.acc.kbd +OLD_FILES+=usr/share/syscons/keymaps/eee_nordic.kbd +OLD_FILES+=usr/share/syscons/keymaps/el.iso07.kbd +OLD_FILES+=usr/share/syscons/keymaps/estonian.cp850.kbd +OLD_FILES+=usr/share/syscons/keymaps/estonian.iso.kbd +OLD_FILES+=usr/share/syscons/keymaps/estonian.iso15.kbd +OLD_FILES+=usr/share/syscons/keymaps/finnish.cp850.kbd +OLD_FILES+=usr/share/syscons/keymaps/finnish.iso.kbd +OLD_FILES+=usr/share/syscons/keymaps/fr.dvorak.acc.kbd +OLD_FILES+=usr/share/syscons/keymaps/fr.dvorak.kbd +OLD_FILES+=usr/share/syscons/keymaps/fr.iso.acc.kbd +OLD_FILES+=usr/share/syscons/keymaps/fr.iso.kbd +OLD_FILES+=usr/share/syscons/keymaps/fr.macbook.acc.kbd +OLD_FILES+=usr/share/syscons/keymaps/fr_CA.iso.acc.kbd +OLD_FILES+=usr/share/syscons/keymaps/german.cp850.kbd +OLD_FILES+=usr/share/syscons/keymaps/german.iso.acc.kbd +OLD_FILES+=usr/share/syscons/keymaps/german.iso.kbd +OLD_FILES+=usr/share/syscons/keymaps/gr.elot.acc.kbd +OLD_FILES+=usr/share/syscons/keymaps/gr.us101.acc.kbd +OLD_FILES+=usr/share/syscons/keymaps/hr.iso.kbd +OLD_FILES+=usr/share/syscons/keymaps/hu.iso2.101keys.kbd +OLD_FILES+=usr/share/syscons/keymaps/hu.iso2.102keys.kbd +OLD_FILES+=usr/share/syscons/keymaps/hy.armscii-8.kbd +OLD_FILES+=usr/share/syscons/keymaps/icelandic.iso.acc.kbd +OLD_FILES+=usr/share/syscons/keymaps/icelandic.iso.kbd +OLD_FILES+=usr/share/syscons/keymaps/it.iso.kbd +OLD_FILES+=usr/share/syscons/keymaps/iw.iso8.kbd +OLD_FILES+=usr/share/syscons/keymaps/jp.106.kbd +OLD_FILES+=usr/share/syscons/keymaps/jp.106x.kbd +OLD_FILES+=usr/share/syscons/keymaps/jp.pc98.iso.kbd +OLD_FILES+=usr/share/syscons/keymaps/jp.pc98.kbd +OLD_FILES+=usr/share/syscons/keymaps/kk.pt154.io.kbd +OLD_FILES+=usr/share/syscons/keymaps/kk.pt154.kst.kbd +OLD_FILES+=usr/share/syscons/keymaps/latinamerican.iso.acc.kbd +OLD_FILES+=usr/share/syscons/keymaps/latinamerican.kbd +OLD_FILES+=usr/share/syscons/keymaps/lt.iso4.kbd +OLD_FILES+=usr/share/syscons/keymaps/norwegian.dvorak.kbd +OLD_FILES+=usr/share/syscons/keymaps/norwegian.iso.kbd +OLD_FILES+=usr/share/syscons/keymaps/pl_PL.ISO8859-2.kbd +OLD_FILES+=usr/share/syscons/keymaps/pl_PL.dvorak.kbd +OLD_FILES+=usr/share/syscons/keymaps/pt.iso.acc.kbd +OLD_FILES+=usr/share/syscons/keymaps/pt.iso.kbd +OLD_FILES+=usr/share/syscons/keymaps/ru.cp866.kbd +OLD_FILES+=usr/share/syscons/keymaps/ru.iso5.kbd +OLD_FILES+=usr/share/syscons/keymaps/ru.koi8-r.kbd +OLD_FILES+=usr/share/syscons/keymaps/ru.koi8-r.shift.kbd +OLD_FILES+=usr/share/syscons/keymaps/ru.koi8-r.win.kbd +OLD_FILES+=usr/share/syscons/keymaps/si.iso.kbd +OLD_FILES+=usr/share/syscons/keymaps/sk.iso2.kbd +OLD_FILES+=usr/share/syscons/keymaps/spanish.dvorak.kbd +OLD_FILES+=usr/share/syscons/keymaps/spanish.iso.acc.kbd +OLD_FILES+=usr/share/syscons/keymaps/spanish.iso.kbd +OLD_FILES+=usr/share/syscons/keymaps/spanish.iso15.acc.kbd +OLD_FILES+=usr/share/syscons/keymaps/swedish.cp850.kbd +OLD_FILES+=usr/share/syscons/keymaps/swedish.iso.kbd +OLD_FILES+=usr/share/syscons/keymaps/swissfrench.cp850.kbd +OLD_FILES+=usr/share/syscons/keymaps/swissfrench.iso.acc.kbd +OLD_FILES+=usr/share/syscons/keymaps/swissfrench.iso.kbd +OLD_FILES+=usr/share/syscons/keymaps/swissgerman.cp850.kbd +OLD_FILES+=usr/share/syscons/keymaps/swissgerman.iso.acc.kbd +OLD_FILES+=usr/share/syscons/keymaps/swissgerman.iso.kbd +OLD_FILES+=usr/share/syscons/keymaps/swissgerman.macbook.acc.kbd +OLD_FILES+=usr/share/syscons/keymaps/tr.iso9.q.kbd +OLD_FILES+=usr/share/syscons/keymaps/ua.iso5.kbd +OLD_FILES+=usr/share/syscons/keymaps/ua.koi8-u.kbd +OLD_FILES+=usr/share/syscons/keymaps/ua.koi8-u.shift.alt.kbd +OLD_FILES+=usr/share/syscons/keymaps/uk.cp850-ctrl.kbd +OLD_FILES+=usr/share/syscons/keymaps/uk.cp850.kbd +OLD_FILES+=usr/share/syscons/keymaps/uk.dvorak.kbd +OLD_FILES+=usr/share/syscons/keymaps/uk.iso-ctrl.kbd +OLD_FILES+=usr/share/syscons/keymaps/uk.iso.kbd +OLD_FILES+=usr/share/syscons/keymaps/us.dvorak.kbd +OLD_FILES+=usr/share/syscons/keymaps/us.dvorakl.kbd +OLD_FILES+=usr/share/syscons/keymaps/us.dvorakp.kbd +OLD_FILES+=usr/share/syscons/keymaps/us.dvorakr.kbd +OLD_FILES+=usr/share/syscons/keymaps/us.dvorakx.kbd +OLD_FILES+=usr/share/syscons/keymaps/us.emacs.kbd +OLD_FILES+=usr/share/syscons/keymaps/us.iso.acc.kbd +OLD_FILES+=usr/share/syscons/keymaps/us.iso.kbd +OLD_FILES+=usr/share/syscons/keymaps/us.pc-ctrl.kbd +OLD_FILES+=usr/share/syscons/keymaps/us.unix.kbd +OLD_FILES+=usr/share/syscons/scrnmaps/armscii8-2haik8.scm +OLD_FILES+=usr/share/syscons/scrnmaps/iso-8859-1_to_cp437.scm +OLD_FILES+=usr/share/syscons/scrnmaps/iso-8859-4_for_vga9.scm +OLD_FILES+=usr/share/syscons/scrnmaps/iso-8859-7_to_cp437.scm +OLD_FILES+=usr/share/syscons/scrnmaps/koi8-r2cp866.scm +OLD_FILES+=usr/share/syscons/scrnmaps/koi8-u2cp866u.scm +OLD_FILES+=usr/share/syscons/scrnmaps/us-ascii_to_cp437.scm +.endif .if ${MK_TALK} == no OLD_FILES+=usr/bin/talk @@ -6339,10 +6690,19 @@ OLD_FILES+=usr/share/man/man8/talkd.8.gz .endif .if ${MK_TCSH} == no +OLD_FILES+=.cshrc +OLD_FILES+=etc/csh.cshrc +OLD_FILES+=etc/csh.login +OLD_FILES+=etc/csh.logout OLD_FILES+=bin/csh OLD_FILES+=bin/tcsh OLD_FILES+=rescue/csh OLD_FILES+=rescue/tcsh +OLD_FILES+=root/.cshrc +OLD_FILES+=root/.login +OLD_FILES+=usr/share/examples/etc/csh.cshrc +OLD_FILES+=usr/share/examples/etc/csh.login +OLD_FILES+=usr/share/examples/etc/csh.logout OLD_FILES+=usr/share/examples/tcsh/complete.tcsh OLD_FILES+=usr/share/examples/tcsh/csh-mode.el OLD_DIRS+=usr/share/examples/tcsh @@ -6875,6 +7235,7 @@ OLD_FILES+=usr/tests/usr.bin/yacc/undefined.y .endif .else # ATF libraries. +OLD_FILES+=etc/mtree/BSD.tests.dist OLD_FILES+=usr/bin/atf-sh OLD_DIRS+=usr/include/atf-c OLD_FILES+=usr/include/atf-c/build.h @@ -6905,6 +7266,7 @@ OLD_FILES+=usr/lib/libatf-c++.so.1 OLD_FILES+=usr/lib/libatf-c++.so OLD_FILES+=usr/lib/libatf-c.a OLD_FILES+=usr/libexec/atf-check +OLD_FILES+=usr/libexec/atf-sh OLD_DIRS+=usr/share/atf OLD_FILES+=usr/share/atf/libatf-sh.subr OLD_DIRS+=usr/share/doc/atf @@ -6912,14 +7274,20 @@ OLD_FILES+=usr/share/doc/atf/AUTHORS OLD_FILES+=usr/share/doc/atf/COPYING OLD_FILES+=usr/share/doc/atf/NEWS OLD_FILES+=usr/share/doc/atf/README +OLD_FILES+=usr/share/doc/pjdfstest/README OLD_FILES+=usr/share/man/man1/atf-check.1.gz OLD_FILES+=usr/share/man/man1/atf-sh.1.gz OLD_FILES+=usr/share/man/man1/atf-test-program.1.gz OLD_FILES+=usr/share/man/man3/atf-c-api.3.gz OLD_FILES+=usr/share/man/man3/atf-c++-api.3.gz OLD_FILES+=usr/share/man/man3/atf-sh-api.3.gz +OLD_FILES+=usr/share/man/man3/atf-sh.3.gz OLD_FILES+=usr/share/man/man4/atf-test-case.4.gz +OLD_FILES+=usr/share/man/man7/atf.7.gz OLD_FILES+=usr/share/mk/atf.test.mk +OLD_FILES+=usr/share/mk/plain.test.mk +OLD_FILES+=usr/share/mk/suite.test.mk +OLD_FILES+=usr/share/mk/tap.test.mk # Test suite. . if exists(${DESTDIR}${TESTSBASE}) @@ -6930,12 +7298,22 @@ OLD_FILES+=${TESTS_FILES} . endif .endif # Test suite. +.if ${MK_TEXTPROC} == no +OLD_FILES+=usr/bin/checknr +OLD_FILES+=usr/bin/colcrt +OLD_FILES+=usr/bin/ul +OLD_FILES+=usr/share/man/man1/checknr.1.gz +OLD_FILES+=usr/share/man/man1/colcrt.1.gz +OLD_FILES+=usr/share/man/man1/ul.1.gz +.endif + #.if ${MK_TOOLCHAIN} == no # to be filled in #.endif .if ${MK_UNBOUND} == no OLD_FILES+=etc/rc.d/local_unbound +OLD_FILES+=etc/unbound OLD_FILES+=usr/lib/private/libunbound.a OLD_FILES+=usr/lib/private/libunbound.so OLD_LIBS+=usr/lib/private/libunbound.so.5 @@ -6952,11 +7330,365 @@ OLD_FILES+=usr/sbin/unbound-anchor OLD_FILES+=usr/sbin/unbound-checkconf OLD_FILES+=usr/sbin/unbound-control OLD_FILES+=usr/sbin/unbound-control-setup +OLD_FILES+=usr/share/man/man5/unbound.conf.5.gz +OLD_FILES+=usr/share/man/man8/unbound-anchor.8.gz +OLD_FILES+=usr/share/man/man8/unbound-checkconf.8.gz +OLD_FILES+=usr/share/man/man8/unbound-control.8.gz +OLD_FILES+=usr/share/man/man8/unbound.8.gz .endif .if ${MK_USB} == no +OLD_FILES+=etc/devd/uath.conf OLD_FILES+=etc/devd/uauth.conf +OLD_FILES+=etc/devd/ulpt.conf OLD_FILES+=etc/devd/usb.conf +OLD_FILES+=usr/bin/usbhidaction +OLD_FILES+=usr/bin/usbhidctl +OLD_FILES+=usr/include/libusb.h +OLD_FILES+=usr/include/libusb20.h +OLD_FILES+=usr/include/libusb20_desc.h +OLD_FILES+=usr/include/usb.h +OLD_FILES+=usr/include/usbhid.h +OLD_FILES+=usr/lib/libusb.a +OLD_FILES+=usr/lib/libusb.so +OLD_LIBS+=usr/lib/libusb.so.3 +OLD_FILES+=usr/lib/libusb_p.a +OLD_FILES+=usr/lib/libusbhid.a +OLD_FILES+=usr/lib/libusbhid.so +OLD_LIBS+=usr/lib/libusbhid.so.4 +OLD_FILES+=usr/lib/libusbhid_p.a +OLD_FILES+=usr/lib32/libusb.a +OLD_FILES+=usr/lib32/libusb.so +OLD_LIBS+=usr/lib32/libusb.so.3 +OLD_FILES+=usr/lib32/libusb_p.a +OLD_FILES+=usr/lib32/libusbhid.a +OLD_FILES+=usr/lib32/libusbhid.so +OLD_LIBS+=usr/lib32/libusbhid.so.4 +OLD_FILES+=usr/lib32/libusbhid_p.a +OLD_FILES+=usr/libdata/pkgconfig/libusb-0.1.pc +OLD_FILES+=usr/libdata/pkgconfig/libusb-1.0.pc +OLD_FILES+=usr/libdata/pkgconfig/libusb-2.0.pc +OLD_FILES+=usr/sbin/uathload +OLD_FILES+=usr/sbin/uhsoctl +OLD_FILES+=usr/sbin/usbconfig +OLD_FILES+=usr/sbin/usbdump +OLD_FILES+=usr/share/examples/libusb20/Makefile +OLD_FILES+=usr/share/examples/libusb20/README +OLD_FILES+=usr/share/examples/libusb20/bulk.c +OLD_FILES+=usr/share/examples/libusb20/control.c +OLD_FILES+=usr/share/examples/libusb20/util.c +OLD_FILES+=usr/share/examples/libusb20/util.h +OLD_DIRS+=usr/share/examples/libusb20 +OLD_FILES+=usr/share/man/man1/uhsoctl.1.gz +OLD_FILES+=usr/share/man/man1/usbhidaction.1.gz +OLD_FILES+=usr/share/man/man1/usbhidctl.1.gz +OLD_FILES+=usr/share/man/man3/hid_dispose_report_desc.3.gz +OLD_FILES+=usr/share/man/man3/hid_end_parse.3.gz +OLD_FILES+=usr/share/man/man3/hid_get_data.3.gz +OLD_FILES+=usr/share/man/man3/hid_get_item.3.gz +OLD_FILES+=usr/share/man/man3/hid_get_report_desc.3.gz +OLD_FILES+=usr/share/man/man3/hid_init.3.gz +OLD_FILES+=usr/share/man/man3/hid_locate.3.gz +OLD_FILES+=usr/share/man/man3/hid_report_size.3.gz +OLD_FILES+=usr/share/man/man3/hid_set_data.3.gz +OLD_FILES+=usr/share/man/man3/hid_start_parse.3.gz +OLD_FILES+=usr/share/man/man3/hid_usage_in_page.3.gz +OLD_FILES+=usr/share/man/man3/hid_usage_page.3.gz +OLD_FILES+=usr/share/man/man3/libusb.3.gz +OLD_FILES+=usr/share/man/man3/libusb20.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_add_dev_quirk.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_alloc_default.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_dequeue_device.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_device_foreach.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_enqueue_device.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_free.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_get_dev_quirk.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_get_quirk_name.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_get_template.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_remove_dev_quirk.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_set_template.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_desc_foreach.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_alloc.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_alloc_config.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_check_connected.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_close.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_detach_kernel_driver.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_free.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_address.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_backend_name.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_bus_number.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_config_index.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_debug.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_desc.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_device_desc.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_fd.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_iface_desc.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_info.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_mode.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_parent_address.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_parent_port.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_port_path.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_power_mode.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_power_usage.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_speed.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_kernel_driver_active.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_open.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_process.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_req_string_simple_sync.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_req_string_sync.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_request_sync.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_reset.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_set_alt_index.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_set_config_index.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_set_debug.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_set_power_mode.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_wait_process.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_error_name.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_me_decode.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_me_encode.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_me_get_1.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_me_get_2.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_strerror.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_bulk_intr_sync.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_callback_wrapper.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_clear_stall_sync.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_close.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_drain.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_actual_frames.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_actual_length.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_length.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_max_frames.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_max_packet_length.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_max_total_length.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_pointer.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_priv_sc0.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_priv_sc1.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_status.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_time_complete.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_open.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_pending.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_set_buffer.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_set_callback.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_set_flags.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_set_length.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_set_priv_sc0.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_set_priv_sc1.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_set_timeout.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_set_total_frames.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_setup_bulk.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_setup_control.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_setup_intr.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_setup_isoc.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_start.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_stop.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_submit.3.gz +OLD_FILES+=usr/share/man/man3/libusb_alloc_transfer.3.gz +OLD_FILES+=usr/share/man/man3/libusb_attach_kernel_driver.3.gz +OLD_FILES+=usr/share/man/man3/libusb_bulk_transfer.3.gz +OLD_FILES+=usr/share/man/man3/libusb_cancel_transfer.3.gz +OLD_FILES+=usr/share/man/man3/libusb_check_connected.3.gz +OLD_FILES+=usr/share/man/man3/libusb_claim_interface.3.gz +OLD_FILES+=usr/share/man/man3/libusb_clear_halt.3.gz +OLD_FILES+=usr/share/man/man3/libusb_close.3.gz +OLD_FILES+=usr/share/man/man3/libusb_control_transfer.3.gz +OLD_FILES+=usr/share/man/man3/libusb_detach_kernel_driver.3.gz +OLD_FILES+=usr/share/man/man3/libusb_detach_kernel_driver_np.3.gz +OLD_FILES+=usr/share/man/man3/libusb_error_name.3.gz +OLD_FILES+=usr/share/man/man3/libusb_event_handler_active.3.gz +OLD_FILES+=usr/share/man/man3/libusb_event_handling_ok.3.gz +OLD_FILES+=usr/share/man/man3/libusb_exit.3.gz +OLD_FILES+=usr/share/man/man3/libusb_free_bos_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/libusb_free_config_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/libusb_free_device_list.3.gz +OLD_FILES+=usr/share/man/man3/libusb_free_ss_endpoint_comp.3.gz +OLD_FILES+=usr/share/man/man3/libusb_free_transfer.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_active_config_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_bus_number.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_config_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_config_descriptor_by_value.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_configuration.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_device.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_device_address.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_device_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_device_list.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_device_speed.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_driver.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_driver_np.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_max_iso_packet_size.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_max_packet_size.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_next_timeout.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_pollfds.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_string_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_string_descriptor_ascii.3.gz +OLD_FILES+=usr/share/man/man3/libusb_handle_events.3.gz +OLD_FILES+=usr/share/man/man3/libusb_handle_events_completed.3.gz +OLD_FILES+=usr/share/man/man3/libusb_handle_events_locked.3.gz +OLD_FILES+=usr/share/man/man3/libusb_handle_events_timeout.3.gz +OLD_FILES+=usr/share/man/man3/libusb_handle_events_timeout_completed.3.gz +OLD_FILES+=usr/share/man/man3/libusb_init.3.gz +OLD_FILES+=usr/share/man/man3/libusb_interrupt_transfer.3.gz +OLD_FILES+=usr/share/man/man3/libusb_kernel_driver_active.3.gz +OLD_FILES+=usr/share/man/man3/libusb_lock_event_waiters.3.gz +OLD_FILES+=usr/share/man/man3/libusb_lock_events.3.gz +OLD_FILES+=usr/share/man/man3/libusb_open.3.gz +OLD_FILES+=usr/share/man/man3/libusb_open_device_with_vid_pid.3.gz +OLD_FILES+=usr/share/man/man3/libusb_parse_bos_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/libusb_parse_ss_endpoint_comp.3.gz +OLD_FILES+=usr/share/man/man3/libusb_ref_device.3.gz +OLD_FILES+=usr/share/man/man3/libusb_release_interface.3.gz +OLD_FILES+=usr/share/man/man3/libusb_reset_device.3.gz +OLD_FILES+=usr/share/man/man3/libusb_set_configuration.3.gz +OLD_FILES+=usr/share/man/man3/libusb_set_debug.3.gz +OLD_FILES+=usr/share/man/man3/libusb_set_interface_alt_setting.3.gz +OLD_FILES+=usr/share/man/man3/libusb_set_pollfd_notifiers.3.gz +OLD_FILES+=usr/share/man/man3/libusb_strerror.3.gz +OLD_FILES+=usr/share/man/man3/libusb_submit_transfer.3.gz +OLD_FILES+=usr/share/man/man3/libusb_try_lock_events.3.gz +OLD_FILES+=usr/share/man/man3/libusb_unlock_event_waiters.3.gz +OLD_FILES+=usr/share/man/man3/libusb_unlock_events.3.gz +OLD_FILES+=usr/share/man/man3/libusb_unref_device.3.gz +OLD_FILES+=usr/share/man/man3/libusb_wait_for_event.3.gz +OLD_FILES+=usr/share/man/man3/libusbhid.3.gz +OLD_FILES+=usr/share/man/man3/usb.3.gz +OLD_FILES+=usr/share/man/man3/usb_bulk_read.3.gz +OLD_FILES+=usr/share/man/man3/usb_bulk_write.3.gz +OLD_FILES+=usr/share/man/man3/usb_check_connected.3.gz +OLD_FILES+=usr/share/man/man3/usb_claim_interface.3.gz +OLD_FILES+=usr/share/man/man3/usb_clear_halt.3.gz +OLD_FILES+=usr/share/man/man3/usb_close.3.gz +OLD_FILES+=usr/share/man/man3/usb_control_msg.3.gz +OLD_FILES+=usr/share/man/man3/usb_destroy_configuration.3.gz +OLD_FILES+=usr/share/man/man3/usb_device.3.gz +OLD_FILES+=usr/share/man/man3/usb_fetch_and_parse_descriptors.3.gz +OLD_FILES+=usr/share/man/man3/usb_find_busses.3.gz +OLD_FILES+=usr/share/man/man3/usb_find_devices.3.gz +OLD_FILES+=usr/share/man/man3/usb_get_busses.3.gz +OLD_FILES+=usr/share/man/man3/usb_get_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/usb_get_descriptor_by_endpoint.3.gz +OLD_FILES+=usr/share/man/man3/usb_get_string.3.gz +OLD_FILES+=usr/share/man/man3/usb_get_string_simple.3.gz +OLD_FILES+=usr/share/man/man3/usb_init.3.gz +OLD_FILES+=usr/share/man/man3/usb_interrupt_read.3.gz +OLD_FILES+=usr/share/man/man3/usb_interrupt_write.3.gz +OLD_FILES+=usr/share/man/man3/usb_open.3.gz +OLD_FILES+=usr/share/man/man3/usb_parse_configuration.3.gz +OLD_FILES+=usr/share/man/man3/usb_parse_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/usb_release_interface.3.gz +OLD_FILES+=usr/share/man/man3/usb_reset.3.gz +OLD_FILES+=usr/share/man/man3/usb_resetep.3.gz +OLD_FILES+=usr/share/man/man3/usb_set_altinterface.3.gz +OLD_FILES+=usr/share/man/man3/usb_set_configuration.3.gz +OLD_FILES+=usr/share/man/man3/usb_set_debug.3.gz +OLD_FILES+=usr/share/man/man3/usb_strerror.3.gz +OLD_FILES+=usr/share/man/man3/usbhid.3.gz +OLD_FILES+=usr/share/man/man4/u3g.4.gz +OLD_FILES+=usr/share/man/man4/u3gstub.4.gz +OLD_FILES+=usr/share/man/man4/uark.4.gz +OLD_FILES+=usr/share/man/man4/uart.4.gz +OLD_FILES+=usr/share/man/man4/uath.4.gz +OLD_FILES+=usr/share/man/man4/ubsa.4.gz +OLD_FILES+=usr/share/man/man4/ubsec.4.gz +OLD_FILES+=usr/share/man/man4/ubser.4.gz +OLD_FILES+=usr/share/man/man4/ubtbcmfw.4.gz +OLD_FILES+=usr/share/man/man4/uchcom.4.gz +OLD_FILES+=usr/share/man/man4/ucom.4.gz +OLD_FILES+=usr/share/man/man4/ucycom.4.gz +OLD_FILES+=usr/share/man/man4/udav.4.gz +OLD_FILES+=usr/share/man/man4/udbp.4.gz +OLD_FILES+=usr/share/man/man4/udp.4.gz +OLD_FILES+=usr/share/man/man4/udplite.4.gz +OLD_FILES+=usr/share/man/man4/uep.4.gz +OLD_FILES+=usr/share/man/man4/ufm.4.gz +OLD_FILES+=usr/share/man/man4/ufoma.4.gz +OLD_FILES+=usr/share/man/man4/uftdi.4.gz +OLD_FILES+=usr/share/man/man4/ugen.4.gz +OLD_FILES+=usr/share/man/man4/uhci.4.gz +OLD_FILES+=usr/share/man/man4/uhid.4.gz +OLD_FILES+=usr/share/man/man4/uhso.4.gz +OLD_FILES+=usr/share/man/man4/uipaq.4.gz +OLD_FILES+=usr/share/man/man4/ukbd.4.gz +OLD_FILES+=usr/share/man/man4/uled.4.gz +OLD_FILES+=usr/share/man/man4/ulpt.4.gz +OLD_FILES+=usr/share/man/man4/umass.4.gz +OLD_FILES+=usr/share/man/man4/umcs.4.gz +OLD_FILES+=usr/share/man/man4/umct.4.gz +OLD_FILES+=usr/share/man/man4/umodem.4.gz +OLD_FILES+=usr/share/man/man4/umoscom.4.gz +OLD_FILES+=usr/share/man/man4/ums.4.gz +OLD_FILES+=usr/share/man/man4/unix.4.gz +OLD_FILES+=usr/share/man/man4/upgt.4.gz +OLD_FILES+=usr/share/man/man4/uplcom.4.gz +OLD_FILES+=usr/share/man/man4/ural.4.gz +OLD_FILES+=usr/share/man/man4/urio.4.gz +OLD_FILES+=usr/share/man/man4/urndis.4.gz +OLD_FILES+=usr/share/man/man4/urtw.4.gz +OLD_FILES+=usr/share/man/man4/urtwn.4.gz +OLD_FILES+=usr/share/man/man4/urtwnfw.4.gz +OLD_FILES+=usr/share/man/man4/usb.4.gz +OLD_FILES+=usr/share/man/man4/usb_quirk.4.gz +OLD_FILES+=usr/share/man/man4/usb_template.4.gz +OLD_FILES+=usr/share/man/man4/usfs.4.gz +OLD_FILES+=usr/share/man/man4/uslcom.4.gz +OLD_FILES+=usr/share/man/man4/utopia.4.gz +OLD_FILES+=usr/share/man/man4/uvisor.4.gz +OLD_FILES+=usr/share/man/man4/uvscom.4.gz +OLD_FILES+=usr/share/man/man8/uathload.8.gz +OLD_FILES+=usr/share/man/man8/usbconfig.8.gz +OLD_FILES+=usr/share/man/man8/usbdump.8.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_alloc_buffer.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_attach.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_detach.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_free_buffer.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_get_data.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_get_data_buffer.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_get_data_error.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_get_data_linear.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_put_bytes_max.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_put_data.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_put_data_buffer.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_put_data_error.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_put_data_linear.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_reset.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_softc.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_wakeup.9.gz +OLD_FILES+=usr/share/man/man9/usbd_do_request.9.gz +OLD_FILES+=usr/share/man/man9/usbd_do_request_flags.9.gz +OLD_FILES+=usr/share/man/man9/usbd_errstr.9.gz +OLD_FILES+=usr/share/man/man9/usbd_lookup_id_by_info.9.gz +OLD_FILES+=usr/share/man/man9/usbd_lookup_id_by_uaa.9.gz +OLD_FILES+=usr/share/man/man9/usbd_transfer_clear_stall.9.gz +OLD_FILES+=usr/share/man/man9/usbd_transfer_drain.9.gz +OLD_FILES+=usr/share/man/man9/usbd_transfer_pending.9.gz +OLD_FILES+=usr/share/man/man9/usbd_transfer_poll.9.gz +OLD_FILES+=usr/share/man/man9/usbd_transfer_setup.9.gz +OLD_FILES+=usr/share/man/man9/usbd_transfer_start.9.gz +OLD_FILES+=usr/share/man/man9/usbd_transfer_stop.9.gz +OLD_FILES+=usr/share/man/man9/usbd_transfer_submit.9.gz +OLD_FILES+=usr/share/man/man9/usbd_transfer_unsetup.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_clr_flag.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_frame_data.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_frame_len.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_get_frame.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_get_priv.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_is_stalled.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_max_framelen.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_max_frames.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_max_len.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_set_flag.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_set_frame_data.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_set_frame_len.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_set_frame_offset.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_set_frames.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_set_interval.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_set_priv.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_set_stall.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_set_timeout.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_softc.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_state.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_status.9.gz +OLD_FILES+=usr/share/man/man9/usbdi.9.gz +OLD_FILES+=usr/share/misc/usb_hid_usages +OLD_FILES+=usr/share/misc/usbdevs .endif .if ${MK_UTMPX} == no diff --git a/tools/build/options/WITHOUT_BOOTPARAMD b/tools/build/options/WITHOUT_BOOTPARAMD new file mode 100644 index 0000000..f996083 --- /dev/null +++ b/tools/build/options/WITHOUT_BOOTPARAMD @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr bootparamd 8 . diff --git a/tools/build/options/WITHOUT_BOOTPD b/tools/build/options/WITHOUT_BOOTPD new file mode 100644 index 0000000..6733d5a --- /dev/null +++ b/tools/build/options/WITHOUT_BOOTPD @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr bootpd 8 . diff --git a/tools/build/options/WITHOUT_FILE b/tools/build/options/WITHOUT_FILE new file mode 100644 index 0000000..636d00a --- /dev/null +++ b/tools/build/options/WITHOUT_FILE @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build +.Xr file 1 +and related programs. diff --git a/tools/build/options/WITHOUT_FINGER b/tools/build/options/WITHOUT_FINGER new file mode 100644 index 0000000..7f65408 --- /dev/null +++ b/tools/build/options/WITHOUT_FINGER @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr finger 1 +and +.Xr fingerd 8 . diff --git a/tools/build/options/WITHOUT_FTP b/tools/build/options/WITHOUT_FTP new file mode 100644 index 0000000..5e0fc8e --- /dev/null +++ b/tools/build/options/WITHOUT_FTP @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr ftp 1 +and +.Xr ftpd 8 . diff --git a/tools/build/options/WITHOUT_INETD b/tools/build/options/WITHOUT_INETD new file mode 100644 index 0000000..b4fe5dc --- /dev/null +++ b/tools/build/options/WITHOUT_INETD @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to not build +.Xr inetd 8 . diff --git a/tools/build/options/WITHOUT_RADIUS_SUPPORT b/tools/build/options/WITHOUT_RADIUS_SUPPORT new file mode 100644 index 0000000..31f5aab --- /dev/null +++ b/tools/build/options/WITHOUT_RADIUS_SUPPORT @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build radius support into various applications, like +.Xr pam_radius 8 +and +.Xr ppp 8 . diff --git a/tools/build/options/WITHOUT_RBOOTD b/tools/build/options/WITHOUT_RBOOTD new file mode 100644 index 0000000..f7c33e1 --- /dev/null +++ b/tools/build/options/WITHOUT_RBOOTD @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr rbootd 8 . diff --git a/tools/build/options/WITHOUT_TCP_WRAPPERS b/tools/build/options/WITHOUT_TCP_WRAPPERS new file mode 100644 index 0000000..7c41198 --- /dev/null +++ b/tools/build/options/WITHOUT_TCP_WRAPPERS @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr tcpd 8 , +and related utilities. diff --git a/tools/build/options/WITHOUT_TFTP b/tools/build/options/WITHOUT_TFTP new file mode 100644 index 0000000..bdb51ac --- /dev/null +++ b/tools/build/options/WITHOUT_TFTP @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr tftp 1 +and +.Xr tftpd 8 . diff --git a/tools/build/options/WITHOUT_TIMED b/tools/build/options/WITHOUT_TIMED new file mode 100644 index 0000000..a1f4c68 --- /dev/null +++ b/tools/build/options/WITHOUT_TIMED @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr timed 8 . diff --git a/usr.bin/Makefile b/usr.bin/Makefile index fbe87bd..618170c 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -48,14 +48,11 @@ SUBDIR= ${_addr2line} \ expand \ false \ fetch \ - file \ find \ - finger \ fmt \ fold \ fstat \ fsync \ - ftp \ gcore \ gencat \ getconf \ @@ -166,7 +163,6 @@ SUBDIR= ${_addr2line} \ tcopy \ tee \ ${_tests} \ - tftp \ time \ timeout \ tip \ @@ -249,10 +245,22 @@ _size= size _strings= strings .endif +.if ${MK_FILE} != "no" +SUBDIR+= file +.endif + +.if ${MK_FINGER} != "no" +SUBDIR+= finger +.endif + .if ${MK_FMAKE} != "no" SUBDIR+= make .endif +.if ${MK_FTP} != "no" +SUBDIR+= ftp +.endif + .if ${MK_GPL_DTC} != "yes" SUBDIR+= dtc .endif @@ -365,6 +373,10 @@ SUBDIR+= colcrt SUBDIR+= ul .endif +.if ${MK_TFTP} != "no" +SUBDIR+= tftp +.endif + .if ${MK_TOOLCHAIN} != "no" SUBDIR+= ar SUBDIR+= c89 diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index 79e4909..918678b 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -6,7 +6,6 @@ SUBDIR= adduser \ arp \ binmiscctl \ - bootparamd \ bsdconfig \ cdcontrol \ chkgrp \ @@ -34,7 +33,6 @@ SUBDIR= adduser \ gstat \ i2c \ ifmcstat \ - inetd \ iostat \ kldxref \ mailwrapper \ @@ -82,11 +80,8 @@ SUBDIR= adduser \ spray \ syslogd \ sysrc \ - tcpdchk \ - tcpdmatch \ tcpdrop \ tcpdump \ - timed \ traceroute \ trpt \ tzsetup \ @@ -131,6 +126,10 @@ SUBDIR+= autofs SUBDIR+= bluetooth .endif +.if ${MK_BOOTPARAMD} != "no" +SUBDIR+= bootparamd +.endif + .if ${MK_BSDINSTALL} != "no" SUBDIR+= bsdinstall .endif @@ -179,6 +178,10 @@ SUBDIR+= rtsold SUBDIR+= traceroute6 .endif +.if ${MK_INETD} != "no" +SUBDIR+= inetd +.endif + .if ${MK_IPFW} != "no" SUBDIR+= ipfwpcap .endif @@ -300,10 +303,19 @@ SUBDIR+= praliases SUBDIR+= sendmail .endif +.if ${MK_TCP_WRAPPERS} != "no" +SUBDIR+= tcpdchk +SUBDIR+= tcpdmatch +.endif + .if ${MK_TESTS} != "no" SUBDIR+= tests .endif +.if ${MK_TIMED} != "no" +SUBDIR+= timed +.endif + .if ${MK_TOOLCHAIN} != "no" SUBDIR+= config SUBDIR+= crunch diff --git a/usr.sbin/ctladm/ctladm.c b/usr.sbin/ctladm/ctladm.c index 3351e3c..f2e933a 100644 --- a/usr.sbin/ctladm/ctladm.c +++ b/usr.sbin/ctladm/ctladm.c @@ -3542,6 +3542,7 @@ cctl_islist_end_element(void *user_data, const char *name) } else if (strcmp(name, "target_alias") == 0) { cur_conn->target_alias = str; str = NULL; + } else if (strcmp(name, "target_portal_group_tag") == 0) { } else if (strcmp(name, "header_digest") == 0) { cur_conn->header_digest = str; str = NULL; diff --git a/usr.sbin/ctld/ctld.c b/usr.sbin/ctld/ctld.c index 08e2905..c19b55a 100644 --- a/usr.sbin/ctld/ctld.c +++ b/usr.sbin/ctld/ctld.c @@ -59,6 +59,7 @@ static volatile bool sigterm_received = false; static volatile bool sigalrm_received = false; static int nchildren = 0; +static uint16_t last_portal_group_tag = 0; static void usage(void) @@ -609,8 +610,7 @@ portal_group_new(struct conf *conf, const char *name) pg->pg_name = checked_strdup(name); TAILQ_INIT(&pg->pg_portals); pg->pg_conf = conf; - conf->conf_last_portal_group_tag++; - pg->pg_tag = conf->conf_last_portal_group_tag; + pg->pg_tag = 0; /* Assigned later in conf_apply(). */ TAILQ_INSERT_TAIL(&conf->conf_portal_groups, pg, pg_next); return (pg); @@ -1655,6 +1655,17 @@ conf_apply(struct conf *oldconf, struct conf *newconf) } } + /* + * Go through the new portal groups, assigning tags or preserving old. + */ + TAILQ_FOREACH(newpg, &newconf->conf_portal_groups, pg_next) { + oldpg = portal_group_find(oldconf, newpg->pg_name); + if (oldpg != NULL) + newpg->pg_tag = oldpg->pg_tag; + else + newpg->pg_tag = ++last_portal_group_tag; + } + /* Deregister on removed iSNS servers. */ TAILQ_FOREACH(oldns, &oldconf->conf_isns, i_next) { TAILQ_FOREACH(newns, &newconf->conf_isns, i_next) { @@ -2372,7 +2383,7 @@ main(int argc, char **argv) log_debugx("exiting on signal; " "reloading empty configuration"); - log_debugx("disabling CTL iSCSI port " + log_debugx("removing CTL iSCSI ports " "and terminating all connections"); oldconf = newconf; diff --git a/usr.sbin/ctld/ctld.h b/usr.sbin/ctld/ctld.h index e082a41..251351d 100644 --- a/usr.sbin/ctld/ctld.h +++ b/usr.sbin/ctld/ctld.h @@ -180,7 +180,6 @@ struct conf { int conf_timeout; int conf_maxproc; - uint16_t conf_last_portal_group_tag; #ifdef ICL_KERNEL_PROXY int conf_portal_id; #endif diff --git a/usr.sbin/ctld/kernel.c b/usr.sbin/ctld/kernel.c index ae1b11d..0c5d2ce 100644 --- a/usr.sbin/ctld/kernel.c +++ b/usr.sbin/ctld/kernel.c @@ -913,12 +913,8 @@ kernel_port_remove(struct target *targ) req.num_args = 2; req.args = malloc(req.num_args * sizeof(*req.args)); str_arg(&req.args[0], "cfiscsi_target", targ->t_name); - if (targ->t_portal_group) { - snprintf(tagstr, sizeof(tagstr), "%d", - targ->t_portal_group->pg_tag); - str_arg(&req.args[1], "cfiscsi_portal_group_tag", tagstr); - } else - req.num_args--; + snprintf(tagstr, sizeof(tagstr), "%d", targ->t_portal_group->pg_tag); + str_arg(&req.args[1], "cfiscsi_portal_group_tag", tagstr); error = ioctl(ctl_fd, CTL_PORT_REQ, &req); free(req.args); diff --git a/usr.sbin/pkg/pkg.c b/usr.sbin/pkg/pkg.c index 8f26c61..90a215d 100644 --- a/usr.sbin/pkg/pkg.c +++ b/usr.sbin/pkg/pkg.c @@ -202,7 +202,11 @@ fetch_to_fd(const char *url, char *path) retry = max_retry; - u = fetchParseURL(url); + if ((u = fetchParseURL(url)) == NULL) { + warn("fetchParseURL('%s')", url); + return (-1); + } + while (remote == NULL) { if (retry == max_retry) { if (strcmp(u->scheme, "file") != 0 && @@ -371,8 +375,11 @@ load_fingerprints(const char *path, int *count) return (NULL); STAILQ_INIT(fingerprints); - if ((d = opendir(path)) == NULL) + if ((d = opendir(path)) == NULL) { + free(fingerprints); + return (NULL); + } while ((ent = readdir(d))) { if (strcmp(ent->d_name, ".") == 0 || @@ -799,8 +806,11 @@ cleanup: close(fd_sig); unlink(tmpsig); } - close(fd_pkg); - unlink(tmppkg); + + if (fd_pkg != -1) { + close(fd_pkg); + unlink(tmppkg); + } return (ret); } @@ -849,7 +859,7 @@ bootstrap_pkg_local(const char *pkgpath, bool force) if (config_string(SIGNATURE_TYPE, &signature_type) != 0) { warnx("Error looking up SIGNATURE_TYPE"); - return (-1); + goto cleanup; } if (signature_type != NULL && strcasecmp(signature_type, "FINGERPRINTS") == 0) { diff --git a/usr.sbin/ppp/Makefile b/usr.sbin/ppp/Makefile index 30de68c..e0772af 100644 --- a/usr.sbin/ppp/Makefile +++ b/usr.sbin/ppp/Makefile @@ -31,6 +31,9 @@ PPP_NO_NETGRAPH= .if ${MK_PAM_SUPPORT} == "no" PPP_NO_PAM= .endif +.if ${MK_RADIUS_SUPPORT} == "no" +PPP_NO_RADIUS= +.endif .if defined(PPP_NO_SUID) BINMODE=554 |