diff options
Diffstat (limited to 'share')
-rw-r--r-- | share/examples/jails/rc.conf.jails | 22 | ||||
-rw-r--r-- | share/examples/jails/rcjail.xxx.conf | 26 | ||||
-rw-r--r-- | share/man/man4/Makefile | 4 | ||||
-rw-r--r-- | share/man/man4/bnxt.4 | 224 | ||||
-rw-r--r-- | share/man/man4/hv_ata_pci_disengage.4 | 90 | ||||
-rw-r--r-- | share/man/man4/hv_vmbus.4 | 2 | ||||
-rw-r--r-- | share/man/man4/hv_vss.4 | 366 | ||||
-rw-r--r-- | share/man/man4/rtwn_pci.4 | 5 | ||||
-rw-r--r-- | share/man/man4/smb.4 | 19 | ||||
-rw-r--r-- | share/man/man4/snd_uaudio.4 | 4 | ||||
-rw-r--r-- | share/man/man9/usbdi.9 | 66 | ||||
-rw-r--r-- | share/man/man9/vm_page_alloc.9 | 16 | ||||
-rw-r--r-- | share/misc/committers-src.dot | 5 | ||||
-rw-r--r-- | share/mk/bsd.cpu.mk | 21 | ||||
-rw-r--r-- | share/mk/bsd.dep.mk | 11 | ||||
-rw-r--r-- | share/mk/bsd.init.mk | 33 | ||||
-rw-r--r-- | share/mk/bsd.lib.mk | 3 | ||||
-rw-r--r-- | share/mk/bsd.subdir.mk | 5 | ||||
-rw-r--r-- | share/mk/bsd.sys.mk | 2 | ||||
-rw-r--r-- | share/mk/local.meta.sys.mk | 2 | ||||
-rw-r--r-- | share/mk/src.opts.mk | 6 | ||||
-rw-r--r-- | share/mk/sys.mk | 2 | ||||
-rw-r--r-- | share/zoneinfo/Makefile | 4 |
23 files changed, 723 insertions, 215 deletions
diff --git a/share/examples/jails/rc.conf.jails b/share/examples/jails/rc.conf.jails index 674dce538ea6..6906b7a2eeb7 100644 --- a/share/examples/jails/rc.conf.jails +++ b/share/examples/jails/rc.conf.jails @@ -5,7 +5,7 @@ ############################################################################### jail_enable="YES" -jail_list="xxx" +jail_list="XXX" # # Global presets for all jails @@ -57,19 +57,19 @@ jail_devfs_enable="YES" # mount devfs # # XXX # -jail_xxx_hostname="xxx.yyy" # hostname -jail_xxx_rootdir="/vm/xxx" # root directory +jail_XXX_hostname="XXX.YYY" # hostname +jail_XXX_rootdir="/vm/XXX" # root directory # netgraph -jail_xxx_vnet_interface="ng0_xxx" # vnet interface(s) -jail_xxx_exec_prestart0="jng bridge xxx em0" # bridge interface(s) -jail_xxx_exec_poststop0="jng shutdown xxx" # destroy interface(s) +jail_XXX_vnet_interface="ng0_XXX" # vnet interface(s) +jail_XXX_exec_prestart0="jng bridge XXX em0" # bridge interface(s) +jail_XXX_exec_poststop0="jng shutdown XXX" # destroy interface(s) # if_bridge -#jail_xxx_vnet_interface="e0b_xxx" # vnet interface(s) -#jail_xxx_exec_prestart0="jib addm xxx em0" # bridge interface(s) -#jail_xxx_exec_poststop0="jib destroy xxx" # destroy interface(s) +#jail_XXX_vnet_interface="e0b_XXX" # vnet interface(s) +#jail_XXX_exec_prestart0="jib addm XXX em0" # bridge interface(s) +#jail_XXX_exec_poststop0="jib destroy XXX" # destroy interface(s) # Optional (default off) -#jail_xxx_devfs_ruleset="11" # rule to unhide bpf for DHCP -#jail_xxx_mount_enable="YES" # mount /etc/fstab.xxx +#jail_XXX_devfs_ruleset="11" # rule to unhide bpf for DHCP +#jail_XXX_mount_enable="YES" # mount /etc/fstab.XXX ################################################################################ # END diff --git a/share/examples/jails/rcjail.xxx.conf b/share/examples/jails/rcjail.xxx.conf index a292905109c9..be711833e290 100644 --- a/share/examples/jails/rcjail.xxx.conf +++ b/share/examples/jails/rcjail.xxx.conf @@ -1,25 +1,25 @@ # $FreeBSD$ -jail_xxx_hostname="xxx.yyy" # hostname -jail_xxx_rootdir="/vm/xxx" # root directory +jail_XXX_hostname="XXX.YYY" # hostname +jail_XXX_rootdir="/vm/XXX" # root directory # # NB: Below 3 lines required # # netgraph -jail_xxx_vnet_interface="ng0_xxx" # vnet interface(s) -jail_xxx_exec_prestart0="jng bridge xxx em0" # bridge interface(s) -jail_xxx_exec_poststop0="jng shutdown xxx" # destroy interface(s) +jail_XXX_vnet_interface="ng0_XXX" # vnet interface(s) +jail_XXX_exec_prestart0="jng bridge XXX em0" # bridge interface(s) +jail_XXX_exec_poststop0="jng shutdown XXX" # destroy interface(s) # if_bridge -#jail_xxx_vnet_interface="e0b_xxx" # vnet interface(s) -#jail_xxx_exec_prestart0="jib addm xxx em0" # bridge interface(s) -#jail_xxx_exec_poststop0="jib destroy xxx" # destroy interface(s) +#jail_XXX_vnet_interface="e0b_XXX" # vnet interface(s) +#jail_XXX_exec_prestart0="jib addm XXX em0" # bridge interface(s) +#jail_XXX_exec_poststop0="jib destroy XXX" # destroy interface(s) # Standard recipe -jail_xxx_devfs_enable="YES" # mount devfs +jail_XXX_devfs_enable="YES" # mount devfs # Optional (default off) -#jail_xxx_devfs_ruleset="11" # rule to unhide bpf for DHCP -#jail_xxx_mount_enable="YES" # mount /etc/fstab.xxx -#jail_xxx_set_hostname_allow="YES" # Allow hostname to change -#jail_xxx_sysvipc_allow="YES" # Allow SysV Interprocess Comm. +#jail_XXX_devfs_ruleset="11" # rule to unhide bpf for DHCP +#jail_XXX_mount_enable="YES" # mount /etc/fstab.XXX +#jail_XXX_set_hostname_allow="YES" # Allow hostname to change +#jail_XXX_sysvipc_allow="YES" # Allow SysV Interprocess Comm. diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 61f1a89c5f27..98697541983f 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -79,6 +79,7 @@ MAN= aac.4 \ bhndb.4 \ bktr.4 \ blackhole.4 \ + bnxt.4 \ bpf.4 \ bridge.4 \ bt.4 \ @@ -186,12 +187,12 @@ MAN= aac.4 \ ${_hptmv.4} \ ${_hptnr.4} \ ${_hptrr.4} \ - hv_ata_pci_disengage.4 \ hv_kvp.4 \ hv_netvsc.4 \ hv_storvsc.4 \ hv_utils.4 \ hv_vmbus.4 \ + hv_vss.4 \ hwpmc.4 \ ichsmb.4 \ ${_ichwd.4} \ @@ -591,6 +592,7 @@ MLINKS+=bce.4 if_bce.4 MLINKS+=bfe.4 if_bfe.4 MLINKS+=bge.4 if_bge.4 MLINKS+=bktr.4 brooktree.4 +MLINKS+=bnxt.4 if_bnxt.4 MLINKS+=bridge.4 if_bridge.4 MLINKS+=bwi.4 if_bwi.4 MLINKS+=bwn.4 if_bwn.4 diff --git a/share/man/man4/bnxt.4 b/share/man/man4/bnxt.4 new file mode 100644 index 000000000000..4b8f6e3e7f94 --- /dev/null +++ b/share/man/man4/bnxt.4 @@ -0,0 +1,224 @@ +.\" Copyright (c) 2016 Broadcom, All Rights Reserved. +.\" The term Broadcom refers to Broadcom Limited and/or its subsidiaries +.\" +.\" 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 COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS' +.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +.\" THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd November 16, 2016 +.Dt BNXT 4 +.Os +.Sh NAME +.Nm bnxt +.Nd "Broadcom NetXtreme-C/NetXtreme-E Family Ethernet driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device bnxt" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_bnxt_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for various NICs based on the Broadcom BCM57301/2/4, +and BCM57402/4/6 Ethernet controller chips. +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver provides support for various NICs based on the Broadcom NetXtreme-C and +NetXtreme-E families of Gigabit Ethernet controller chips, including the +following: +.Pp +.Bl -bullet -compact +.It +Broadcom BCM57301 NetXtreme-C 10Gb Ethernet Controller +.It +Broadcom BCM57302 NetXtreme-C 10Gb/25Gb Ethernet Controller +.It +Broadcom BCM57304 NetXtreme-C 10Gb/25Gb/40Gb/50Gb Ethernet Controller +.It +Broadcom BCM57402 NetXtreme-E 10Gb Ethernet Controller +.It +Broadcom BCM57404 NetXtreme-E 10Gb/25Gb Ethernet Controller +.It +Broadcom BCM57406 NetXtreme-E 10GBase-T Ethernet Controller +.It +Broadcom BCM57402 NetXtreme-E Partition +.It +Broadcom BCM57407 NetXtreme-E 10GBase-T Ethernet Controller +.It +Broadcom BCM57404 NetXtreme-E Partition +.It +Broadcom BCM57406 NetXtreme-E Partition +.It +Broadcom BCM57407 NetXtreme-E 25Gb Ethernet Controller +.It +Broadcom BCM57304 NetXtreme-C Virtual Function +.It +Broadcom BCM57404 NetXtreme-E Virtual Function +.El +.Sh SYSCTL VARIABLES +These variables must be set before loading the driver, either via +.Xr loader.conf 5 +or through the use of +.Xr kenv 1 . +These are provided by the +.Xr iflib 9 +framework, and might be better documented there. +.Bl -tag -width indent +.It Va dev.bnxt.X.iflib.override_nrxds +Override the number of RX descriptors for each queue. +The value is a comma separated list of three positive integers: the size of the +completion ring, +the size of the receive ring, and the size of the aggregation ring respectively. +The completion ring should be at least the size of the aggregation ring plus +four times the size of the receive ring. +These numbers must be powers of two, and zero means to use the default. +Defaults to 0,0,0. +.It Va dev.bnxt.X.iflib.override_ntxds +Override the number of TX descriptors for each queue. +The value is a comma separated list of two positive integers: the size of the +completion ring, and the size of the transmit ring respectively. +The completion ring should be at least twice the size of the transmit ring. +These numbers must be powers of two, and zero means to use the default. +Defaults to 0,0. +.It Va override_qs_enable +When set, allows the number of transmit and receive queues to be different. +If not set, the lower of the number of TX or RX queues will be used for both. +.It Va override_nrxqs +Set the number of RX queues. +If zero, the number of RX queues is derived from the number of cores on the +socket connected to the controller. +Defaults to 0. +.It Va override_ntxqs +Set the number of TX queues. +If zero, the number of TX queues is derived from the number of cores on the +socket connected to the controller. +.El +.Pp +These +.Xr sysctl 8 +variables can be changed at any time: +.Bl -tag -width indent +.It Va dev.bnxt.X.vlan_only +Require that incoming frames must have a VLAN tag on them that matches one that +is configured for the NIC. +Normally, both frames that have a matching VLAN tag and frames that have no +VLAN tag are accepted. +Defaults to 0. +.It Va dev.bnxt.X.vlan_strip +When non-zero the NIC strips VLAN tags on receive. +Defaults to 0. +.It Va dev.bnxt.X.rx_stall +Enable buffering rather than dropping frames when there are no available host +RX buffers for DMA. +Defaults to 0. +.It Va dev.bnxt.X.rss_type +Comma-separated list of RSS hash types to support. +Default is all types. +Defaults to ipv4,tcp_ipv4,udp_ipv4,ipv6,tcp_ipv6,udp_ipv6. +.It Va dev.bnxt.X.rss_key +Current RSS key. +Defaults to a randomly generated value which is generated for each device +during attach. +.It Va dev.bnxt.X.ver.hwrm_min_ver +Minimum HWRM (HardWare Resource Manager) firmware API to support. +If the firmware implements an older version, a warning will be printed, and the +firmware should be upgraded. +Defaults to 1.2.2. +.El +.Pp +These +.Xr sysctl 8 +variables are read-only: +.Bl -tag -width indent +.It Va dev.bnxt.X.if_name +Current interface name of the device. +This will normally be +.Va bnxtX , +but this can be changed using +.Cm ifconfig name . +This sysctl allows correlating an interface with a child of +.Va dev.bnxt . +.It Va dev.bnxt.X.nvram.* +Information about the NVRAM device which contains the device firmware. +.It Va dev.bnxt.X.ver.* +Version-related information about the device and firmware: +.It Va dev.bnxt.X.ver.hwrm_if +Supported HWRM API version of the currently running firmware. +.It Va dev.bnxt.X.ver.driver_hwrm_if +HWRM API version the driver was built to support. +.It Va dev.bnxt.X.hwstats.* +Per-queue statistics tracked by the hardware. +.It Va dev.bnxt.X.hwstats.rxq0.drop_pkts +Number of packets dropped by hardware on queue zero. +This number might seem high, but the count includes packets dropped due to +incorrect destination MAC, unsubscribed multicast address, and other normal +reasons to ignore Ethernet frames. +.El +.Sh DIAGNOSTICS +.Bl -diag +.It "bnxt%d: %s command returned %s error." +Device firmware rejected a command from the driver. +There might be a driver/firmware HWRM API mismatch. +.It "bnxt%d: Timeout sending %s (timeout: %d) seq %d" +Device firmware unresponsive. +A PCI device reset is likely needed. +.It "bnxt%d: Timeout sending %s (timeout: %d) msg {0x%x 0x%x} len:%d v: %d" +Partial firmware response. +A PCI device reset is likely needed. +.Pp +As of this writing, the system must be rebooted to initiate a PCI device reset. +.El +.Sh SEE ALSO +.Xr altq 4 , +.Xr arp 4 , +.Xr iflib 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr vlan 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 12.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Jack Vogel Aq Mt jfvogel@gmail.com , +and is currently maintained by +.An Stephen Hurd Aq Mt stephen.hurd@broadcom.com . diff --git a/share/man/man4/hv_ata_pci_disengage.4 b/share/man/man4/hv_ata_pci_disengage.4 deleted file mode 100644 index e7a33523333d..000000000000 --- a/share/man/man4/hv_ata_pci_disengage.4 +++ /dev/null @@ -1,90 +0,0 @@ -.\" $FreeBSD$ -.\" -.\" Copyright (c) 2012 Microsoft Corp. -.\" 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. -.\" -.Dd September 10, 2013 -.Dt HYPER-V 4 -.Os -.Sh NAME -.Nm hv_ata_pci_disengage -.Nd Hyper-V ATA PCI Disengage driver -.Sh SYNOPSIS -To compile this driver into the kernel, place the following lines in -the system kernel configuration file: -.Bd -ragged -offset indent -.Cd "device hyperv" -.Ed -.Sh DESCRIPTION -The -.Nm -driver prevents the native -.Fx -ATA driver from -loading in the presence of Hyper-V. -.Fx -guests running on Hyper-V can take advantage of the Hyper-V Storage -Virtual Consumer -.Pq Xr hv_storvsc 4 -for using their IDE devices. -Since the ATA -driver serves IDE devices as well, there is a chance that the ATA driver may -interfere with the operations of -.Xr hv_storvsc 4 . -The -.Nm -driver avoids -conflicts between the ATA driver and -.Xr hv_storvsc 4 -by disabling the ATA driver -when the -.Fx -guest is booting. -.Pp -A side effect of disabling the ATA driver is that CDROM may become -inoperational on -.Fx -guest partitions. -If CDROM access is a must then users may use -"set hw.ata.disk_enable=1" at boot time to prevent the ATA driver from being -disabled. -.Sh SEE ALSO -.Xr hv_netvsc 4 , -.Xr hv_storvsc 4 , -.Xr hv_utils 4 , -.Xr hv_vmbus 4 -.Sh HISTORY -Support for -.Nm -first appeared in -.Fx 10.0 . -The driver was developed through a joint effort between Citrix Incorporated, -Microsoft Corporation, and Network Appliance Incorporated. -.Sh AUTHORS -.An -nosplit -.Fx -support for -.Nm -was first added by -.An Microsoft BSD Integration Services Team Aq Mt bsdic@microsoft.com . diff --git a/share/man/man4/hv_vmbus.4 b/share/man/man4/hv_vmbus.4 index d992be521b45..eb661b8c26e4 100644 --- a/share/man/man4/hv_vmbus.4 +++ b/share/man/man4/hv_vmbus.4 @@ -35,6 +35,7 @@ To compile this driver into the kernel, place the following lines in the system kernel configuration file: .Bd -ragged -offset indent .Cd "device hyperv" +.Cd "device pci" .Ed .Sh DESCRIPTION The @@ -73,7 +74,6 @@ the interface that facilitate high performance bi-directional communication between the VSCs and VSPs. All VSCs utilize the VMBus driver. .Sh SEE ALSO -.Xr hv_ata_pci_disengage 4 , .Xr hv_netvsc 4 , .Xr hv_storvsc 4 , .Xr hv_utils 4 diff --git a/share/man/man4/hv_vss.4 b/share/man/man4/hv_vss.4 new file mode 100644 index 000000000000..4db54e364d92 --- /dev/null +++ b/share/man/man4/hv_vss.4 @@ -0,0 +1,366 @@ +.\" Copyright (c) 2016 Microsoft Corp. +.\" 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$ +.Dd October 12, 2016 +.Dt HV_VSS 4 +.Os +.Sh NAME +.Nm hv_vss +.Nd Hyper-V Volume Shadow Copy Service API +.Sh SYNOPSIS +.In dev/hyperv/hv_snapshot.h +.Bd -literal +#define VSS_SUCCESS 0x00000000 +#define VSS_FAIL 0x00000001 + +enum hv_vss_op_t { + HV_VSS_NONE = 0, + HV_VSS_CHECK, + HV_VSS_FREEZE, + HV_VSS_THAW, + HV_VSS_COUNT +}; + +struct hv_vss_opt_msg { + uint32_t opt; /* operation */ + uint32_t status; /* 0 for success, 1 for error */ + uint64_t msgid; /* an ID used to identify the transaction */ + uint8_t reserved[48]; /* reserved values are all zeroes */ +}; +.Ed +.Sh DESCRIPTION +The freeze or thaw functionality of application is important to guarantee +the application consistent backup. On windows platform, VSS is defined to do +live backup. But for VM guest running on Hyper-V, the corresponding VSS is +not defined yet. For example, a running database server instance, it knows when the +applications' freeze/thaw should start or finish. But it is not aware of +the freeze/thaw notification from Hyper-V host. The +.Nm +is designed to notify application freeze/thaw request. +Thus, it plays a role of broker to forward the freeze/thaw command from Hyper-V host +to userland application if it registered VSS service on +.Fx +VM, and sends the result back to Hyper-V host. +.Pp +Generally, +.Xr hv_vss_daemon 8 +takes the responsiblity to freeze/thaw UFS file system, +and it is automatically launched after system boots. When Hyper-V host wants to +take a snapshot of the +.Fx +VM, it will first send VSS capability check to +.Fx +VM. The +.Nm +received the request and forward the request to userland application if it is +registered. Only after +.Nm +received the VSS_SUCCESS response from application, the +.Xr hv_vss_daemon 8 +will be informed to check whether file system freeze/thaw is supported. Any error +occurs during this period, +.Nm +will inform Hyper-V host that VSS is not supported. In addition, there is a default +timeout limit before sending response to Hyper-V host. +If the total response time from application and +.Xr hv_vss_daemon 8 +exceeds this value, timeout +will occurs and VSS unsupported is responsed to Hyper-V host. +.Pp +After Hyper-V host confirmed the +.Fx +VM supports VSS, it will send freeze request to VM, and +.Nm +will first forward it to application. After application finished freezing, it should +inform +.Nm +and file system level freezing will be triggered by +.Xr hv_vss_daemon 8 . After all freezing +on both application and +.Xr hv_vss_daemon 8 +were finished, the +.Nm +will inform Hyper-V host that freezing is done. Of course, there is a timeout limit as +same as VSS capability is set to make sure freezing on +.Fx +VM is not hang. If there is any error occurs or timeout happened, the freezing is failed +on Hyper-V side. +.Pp +Hyper-V host will send thaw request after taking the snapshot, typically, this period is +very short in order not to block the running application. +.Nm +firstly thaw the file system by notifying +.Xr hv_vss_daemon 8 , +then notifies user registered +application. There is also a timeout check before sending response to Hyper-V host. +.Pp +All the default timeout limit used in VSS capability check, freeze or thaw is the same. +It is 15 seconds currently. +.Sh NOTES +.Nm +only support UFS currently. If any of file system partition is non UFS, the VSS capability +check will fail. If application does not register VSS, +.Nm +only support backup for file system level consistent. The device should be closed before it +was opened again. If you want to simultaneously open "/dev/hv_appvss_dev" two or more times, +an error (-1) will be returned, and errno was set. +.Pp +If +.Xr hv_vss_daemon 8 +was killed after system boots, the VSS functionality will not work. +.Sh EXAMPLES +The following is a complete example which does nothing except for waiting 2 seconds when +receiving those notifications from +.Nm +.Bd -literal +#include <string.h> +#include <stdio.h> +#include <sys/ioctl.h> +#include <sys/param.h> +#include <sys/ucred.h> +#include <sys/mount.h> +#include <sys/types.h> +#include <unistd.h> +#include <stdlib.h> +#include <poll.h> +#include <stdint.h> +#include <syslog.h> +#include <errno.h> +#include <err.h> +#include <fcntl.h> +#include <ufs/ffs/fs.h> +#include <paths.h> +#include <sys/ioccom.h> +#include <dev/hyperv/hv_snapshot.h> + +#define UNDEF_FREEZE_THAW (0) +#define FREEZE (1) +#define THAW (2) +#define CHECK (3) + +#define VSS_LOG(priority, format, args...) do { \\ + if (is_debugging == 1) { \\ + if (is_daemon == 1) \\ + syslog(priority, format, ## args); \\ + else \\ + printf(format, ## args); \\ + } else { \\ + if (priority < LOG_DEBUG) { \\ + if (is_daemon == 1) \\ + syslog(priority, format, ## args); \\ + else \\ + printf(format, ## args); \\ + } \\ + } \\ + } while(0) + +#define CHECK_TIMEOUT 1 +#define CHECK_FAIL 2 +#define FREEZE_TIMEOUT 1 +#define FREEZE_FAIL 2 +#define THAW_TIMEOUT 1 +#define THAW_FAIL 2 + +static int is_daemon = 1; +static int is_debugging = 0; +static int simu_opt_waiting = 2; // seconds + +#define GENERIC_OPT(TIMEOUT, FAIL) \\ + do { \\ + sleep(simu_opt_waiting); \\ + if (opt == CHECK_TIMEOUT) { \\ + sleep(simu_opt_waiting * 10); \\ + VSS_LOG(LOG_INFO, "%s timeout simulation\\n", \\ + __func__); \\ + return (0); \\ + } else if (opt == CHECK_FAIL) { \\ + VSS_LOG(LOG_INFO, "%s failure simulation\\n", \\ + __func__); \\ + return (CHECK_FAIL); \\ + } else { \\ + VSS_LOG(LOG_INFO, "%s success simulation\\n", \\ + __func__); \\ + return (0); \\ + } \\ + } while (0) + +static int +check(int opt) +{ + GENERIC_OPT(CHECK_TIMEOUT, CHECK_FAIL); +} + +static int +freeze(int opt) +{ + GENERIC_OPT(FREEZE_TIMEOUT, FREEZE_FAIL); +} + +static int +thaw(int opt) +{ + GENERIC_OPT(THAW_TIMEOUT, THAW_FAIL); +} + +static void usage(const char* cmd) { + fprintf(stderr, + "%s -f <0|1|2>: simulate app freeze." + " 0: successful, 1: freeze timeout, 2: freeze failed\\n" + " -c <0|1|2>: simulate vss feature check" + " -t <0|1|2>: simulate app thaw." + " 0: successful, 1: freeze timeout, 2: freeze failed\\n" + " -d : enable debug mode\\n" + " -n : run this tool under non-daemon mode\\n", cmd); +} + +int +main(int argc, char* argv[]) { + int ch, freezesimuop = 0, thawsimuop = 0, checksimuop = 0, fd, r, error; + uint32_t op; + struct pollfd app_vss_fd[1]; + struct hv_vss_opt_msg userdata; + + while ((ch = getopt(argc, argv, "f:c:t:dnh")) != -1) { + switch (ch) { + case 'f': + /* Run as regular process for debugging purpose. */ + freezesimuop = (int)strtol(optarg, NULL, 10); + break; + case 't': + thawsimuop = (int)strtol(optarg, NULL, 10); + break; + case 'c': + checksimuop = (int)strtol(optarg, NULL, 10); + break; + case 'd': + is_debugging = 1; + break; + case 'n': + is_daemon = 0; + break; + case 'h': + default: + usage(argv[0]); + exit(0); + } + } + + openlog("APPVSS", 0, LOG_USER); + /* Become daemon first. */ + if (is_daemon == 1) + daemon(1, 0); + else + VSS_LOG(LOG_DEBUG, "Run as regular process.\\n"); + + VSS_LOG(LOG_INFO, "HV_VSS starting; pid is: %d\\n", getpid()); + + fd = open(VSS_DEV(APP_VSS_DEV_NAME), O_RDWR); + if (fd < 0) { + VSS_LOG(LOG_ERR, "Fail to open %s, error: %d %s\\n", + VSS_DEV(APP_VSS_DEV_NAME), errno, strerror(errno)); + exit(EXIT_FAILURE); + } + app_vss_fd[0].fd = fd; + app_vss_fd[0].events = POLLIN | POLLRDNORM; + + while (1) { + r = poll(app_vss_fd, 1, INFTIM); + + VSS_LOG(LOG_DEBUG, "poll returned r = %d, revent = 0x%x\\n", + r, app_vss_fd[0].revents); + + if (r == 0 || (r < 0 && errno == EAGAIN) || + (r < 0 && errno == EINTR)) { + /* Nothing to read */ + continue; + } + + if (r < 0) { + /* + * For poll return failure other than EAGAIN, + * we want to exit. + */ + VSS_LOG(LOG_ERR, "Poll failed.\\n"); + perror("poll"); + exit(EIO); + } + + /* Read from character device */ + error = ioctl(fd, IOCHVVSSREAD, &userdata); + if (error < 0) { + VSS_LOG(LOG_ERR, "Read failed.\\n"); + perror("pread"); + exit(EIO); + } + + if (userdata.status != 0) { + VSS_LOG(LOG_ERR, "data read error\\n"); + continue; + } + + op = userdata.opt; + + switch (op) { + case HV_VSS_CHECK: + error = check(checksimuop); + break; + case HV_VSS_FREEZE: + error = freeze(freezesimuop); + break; + case HV_VSS_THAW: + error = thaw(thawsimuop); + break; + default: + VSS_LOG(LOG_ERR, "Illegal operation: %d\\n", op); + error = VSS_FAIL; + } + if (error) + userdata.status = VSS_FAIL; + else + userdata.status = VSS_SUCCESS; + error = ioctl(fd, IOCHVVSSWRITE, &userdata); + if (error != 0) { + VSS_LOG(LOG_ERR, "Fail to write to device\\n"); + exit(EXIT_FAILURE); + } else { + VSS_LOG(LOG_INFO, "Send response %d for %s to kernel\\n", + userdata.status, op == HV_VSS_FREEZE ? "Freeze" : + (op == HV_VSS_THAW ? "Thaw" : "Check")); + } + } + return 0; +} +.Sh SEE ALSO +.Xr hv_vss_daemon 8 , +.Xr hv_utils 4 +.Sh HISTORY +The daemon was introduced in October 2016 and developed by Microsoft Corp. +.Sh AUTHORS +.An -nosplit +.Fx +support for +.Nm +was first added by +.An Microsoft BSD Integration Services Team Aq Mt bsdic@microsoft.com . diff --git a/share/man/man4/rtwn_pci.4 b/share/man/man4/rtwn_pci.4 index 71fa1669233e..f86a69689390 100644 --- a/share/man/man4/rtwn_pci.4 +++ b/share/man/man4/rtwn_pci.4 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\"/ -.Dd October 17, 2016 +.Dd November 12, 2016 .Dt RTWN_PCI 4 .Os .Sh NAME @@ -58,6 +58,3 @@ It operates in the 2GHz spectrum only. .Xr rtwnfw 4 , .Xr rtwn_usb 4 , .Xr pci 4 -.Sh CAVEATS -Most 802.11 capabilities were turned off; some more testing -is required to re-enable them. diff --git a/share/man/man4/smb.4 b/share/man/man4/smb.4 index 82202a480512..53e809da3066 100644 --- a/share/man/man4/smb.4 +++ b/share/man/man4/smb.4 @@ -141,26 +141,25 @@ in .Em BlockWrite first sends the byte from .Fa cmd -to the device, followed by +to the device, then the byte from +.Fa wcount +followed by .Fa wcount bytes of data that are taken from the buffer pointed to by .Fa wbuf . The SMBus specification mandates that no more than 32 bytes of -data can be transferred in a single block read or write command, -but since -.Xr smbus 4 -is also used to access I2C devices, the limit has been increased -to 1024. +data can be transferred in a single block read or write command. This value can be read from the constant .Dv SMB_MAXBLOCKSIZE . .It Dv SMB_BREAD Ta .Em BlockRead first sends the byte from .Fa cmd -to the device, then reads -.Fa rcount -bytes of data that from the device. -This data is returned in the buffer pointed to by +to the device, then reads a count of data bytes that the device +is going to provide and then reads that many bytes. +The count is returned in +.Fa rcount. +The data is returned in the buffer pointed to by .Fa rbuf . .El .Pp diff --git a/share/man/man4/snd_uaudio.4 b/share/man/man4/snd_uaudio.4 index 5166f08f6d31..17780692a669 100644 --- a/share/man/man4/snd_uaudio.4 +++ b/share/man/man4/snd_uaudio.4 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 19, 2015 +.Dd November 12, 2016 .Dt SND_UAUDIO 4 .Os .Sh NAME @@ -73,7 +73,7 @@ for more information. .Xr usb 4 .Rs .%T "USB Audio Class Specifications" -.%U http://www.usb.org/developers/devclass_docs/ +.%U http://www.usb.org/developers/docs/devclass_docs/ .Re .Sh HISTORY The diff --git a/share/man/man9/usbdi.9 b/share/man/man9/usbdi.9 index 588c79e501b3..640222b8067c 100644 --- a/share/man/man9/usbdi.9 +++ b/share/man/man9/usbdi.9 @@ -24,7 +24,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd June 24, 2009 +.Dd November 14, 2016 .Dt USBDI 9 .Os .Sh NAME @@ -84,60 +84,40 @@ .In dev/usb/usb.h .In dev/usb/usbdi.h .In dev/usb/usbdi_util.h -.Sh DESCRIPTION -The Universal Serial Bus (USB) driver programming interface provides -USB peripheral drivers with a host controller independent API for -controlling and communicating with USB peripherals. -The -.Nm usb -module supports both USB Host and USB Device side mode. -. -.Sh USB KERNEL PROGRAMMING -Here is a list of commonly used functions: -.Pp -. .Ft "usb_error_t" .Fo "usbd_transfer_setup" -.Fa "udev" -.Fa "ifaces" -.Fa "pxfer" -.Fa "setup_start" -.Fa "n_setup" -.Fa "priv_sc" -.Fa "priv_mtx" +.Fa "struct usb_device *udev" +.Fa "const uint8_t *ifaces" +.Fa "struct usb_xfer **pxfer" +.Fa "const struct usb_config *setup_start" +.Fa "uint16_t n_setup" +.Fa "void *priv_sc" +.Fa "struct mtx *priv_mtx" .Fc -. -.Pp -. .Ft "void" .Fo "usbd_transfer_unsetup" -.Fa "pxfer" -.Fa "n_setup" +.Fa "struct usb_xfer **pxfer" +.Fa "uint16_t n_setup" .Fc -. -.Pp -. .Ft "void" .Fo "usbd_transfer_start" -.Fa "xfer" +.Fa "struct usb_xfer *xfer" .Fc -. -.Pp -. .Ft "void" .Fo "usbd_transfer_stop" -.Fa "xfer" +.Fa "struct usb_xfer *xfer" .Fc -. -.Pp -. .Ft "void" .Fo "usbd_transfer_drain" -.Fa "xfer" +.Fa "struct usb_xfer *xfer" .Fc -. -. -. +.Sh DESCRIPTION +The Universal Serial Bus (USB) driver programming interface provides +USB peripheral drivers with a host controller independent API for +controlling and communicating with USB peripherals. +The +.Nm usb +module supports both USB Host and USB Device side mode. .Sh USB TRANSFER MANAGEMENT FUNCTIONS The USB standard defines four types of USB transfers. . @@ -552,7 +532,7 @@ for the 8-bytes of SETUP header. These 8-bytes are not counted by the "xfer->max_data_length" variable. . -This flag can not be changed during operation. +This flag cannot be changed during operation. . . .It ext_buffer @@ -561,7 +541,7 @@ allocated. . Instead the USB client must supply a data buffer. . -This flag can not be changed during operation. +This flag cannot be changed during operation. . . .It manual_status @@ -579,7 +559,7 @@ This flag can be changed during operation. . .It no_pipe_ok Setting this flag causes the USB_ERR_NO_PIPE error to be ignored. -This flag can not be changed during operation. +This flag cannot be changed during operation. . . .It stall_pipe diff --git a/share/man/man9/vm_page_alloc.9 b/share/man/man9/vm_page_alloc.9 index 082574f4d150..aa3854b47aea 100644 --- a/share/man/man9/vm_page_alloc.9 +++ b/share/man/man9/vm_page_alloc.9 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 28, 2012 +.Dd November 16, 2016 .Dt VM_PAGE_ALLOC 9 .Os .Sh NAME @@ -52,8 +52,6 @@ The page returned is inserted into the object, unless .Dv VM_ALLOC_NOOBJ is specified in the .Fa req . -The page may exist in the vm object cache, in which case it will -be reactivated instead, moving from the cache into the object page list. .Pp .Fn vm_page_alloc will not sleep. @@ -89,7 +87,7 @@ than zero. .El .Pp The optional flags are: -.Bl -tag -width ".Dv VM_ALLOC_IFNOTCACHED" +.Bl -tag -width ".Dv VM_ALLOC_NOBUSY" .It Dv VM_ALLOC_NOBUSY The returned page will not be exclusive busy. .It Dv VM_ALLOC_NODUMP @@ -100,16 +98,6 @@ Do not associate the allocated page with a vm object. The .Fa object argument is ignored. -.It Dv VM_ALLOC_IFCACHED -Allocate the page only if it is cached. -Otherwise, return -.Dv NULL . -.It Dv VM_ALLOC_IFNOTCACHED -Only allocate the page if it is not cached in the -.Fa object . -If the page at the specified -.Fa pindex -is cached, NULL is returned instead. .It Dv VM_ALLOC_SBUSY The returned page will be shared busy. .It Dv VM_ALLOC_WIRED diff --git a/share/misc/committers-src.dot b/share/misc/committers-src.dot index bab00b0a4852..59565c15050f 100644 --- a/share/misc/committers-src.dot +++ b/share/misc/committers-src.dot @@ -143,8 +143,10 @@ csjp [label="Christian S.J. Peron\ncsjp@FreeBSD.org\n2004/05/04"] das [label="David Schultz\ndas@FreeBSD.org\n2003/02/21"] davide [label="Davide Italiano\ndavide@FreeBSD.org\n2012/01/27"] dchagin [label="Dmitry Chagin\ndchagin@FreeBSD.org\n2009/02/28"] +def [label="Konrad Witaszczyk\ndef@FreeBSD.org\n2016/11/02"] delphij [label="Xin Li\ndelphij@FreeBSD.org\n2004/09/14"] des [label="Dag-Erling Smorgrav\ndes@FreeBSD.org\n1998/04/03"] +dexuan [label="Dexuan Cui\ndexuan@FreeBSD.org\n2016/10/24"] dfr [label="Doug Rabson\ndfr@FreeBSD.org\n????/??/??"] dg [label="David Greenman\ndg@FreeBSD.org\n1993/06/14"] dim [label="Dimitry Andric\ndim@FreeBSD.org\n2010/08/30"] @@ -683,6 +685,7 @@ philip -> kp phk -> jkoshy phk -> mux +pjd -> def pjd -> kib pjd -> lulf pjd -> oshogbo @@ -753,6 +756,8 @@ scottl -> sbruno scottl -> slm scottl -> yongari +sephe -> dexuan + sheldonh -> dwmalone sheldonh -> iedowse diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk index ae29f14aebe1..79c37664849f 100644 --- a/share/mk/bsd.cpu.mk +++ b/share/mk/bsd.cpu.mk @@ -155,8 +155,6 @@ _CPUCFLAGS = -march=${CPUTYPE} # sb1, xlp, xlr _CPUCFLAGS = -march=${CPUTYPE:S/^mips//} . endif -. elif ${MACHINE_CPUARCH} == "riscv" -_CPUCFLAGS = -mno-float -march="IMAFD" . elif ${MACHINE_ARCH} == "sparc64" . if ${CPUTYPE} == "v9" _CPUCFLAGS = -mcpu=v9 @@ -303,9 +301,22 @@ MACHINE_CPU = v9 ultrasparc ultrasparc3 .if ${MACHINE_CPUARCH} == "mips" CFLAGS += -G0 -.if ${MACHINE_ARCH:Mmips*hf} +. if ${MACHINE_ARCH:Mmips*el*} != "" +ACFLAGS += -EL +AFLAGS += -EL +CFLAGS += -EL +LDFLAGS += -EL +. else +ACFLAGS += -EB +AFLAGS += -EB +CFLAGS += -EB +LDFLAGS += -EB +. endif +. if ${MACHINE_ARCH:Mmips*hf} CFLAGS += -mhard-float -.endif +. else +CFLAGS += -msoft-float +. endif .endif ########## arm @@ -337,9 +348,11 @@ CFLAGS += -mcpu=8540 -Wa,-me500 -mspe=yes -mabi=spe -mfloat-gprs=double .endif .if ${MACHINE_CPUARCH} == "riscv" +.if ${TARGET_ARCH:Mriscv*sf} CFLAGS += -mno-float ACFLAGS += -mno-float .endif +.endif # NB: COPTFLAGS is handled in /usr/src/sys/conf/kern.pre.mk diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk index c5d242f166e2..acc66991619a 100644 --- a/share/mk/bsd.dep.mk +++ b/share/mk/bsd.dep.mk @@ -77,14 +77,13 @@ _meta_filemon= 1 .endif # Skip reading .depend when not needed to speed up tree-walks and simple -# lookups. For install, only do this if no other targets are specified. +# lookups. See _SKIP_BUILD logic in bsd.init.mk for more details. # Also skip generating or including .depend.* files if in meta+filemon mode # since it will track dependencies itself. OBJS_DEPEND_GUESS is still used. -.if !empty(.MAKEFLAGS:M-V${_V_READ_DEPEND}) || make(obj) || make(clean*) || \ - ${.TARGETS:M*install*} == ${.TARGETS} || \ - make(analyze) || defined(_meta_filemon) || make(print-dir) +.if defined(_SKIP_BUILD) || defined(_meta_filemon) _SKIP_READ_DEPEND= 1 -.if ${MK_DIRDEPS_BUILD} == "no" || make(analyze) || make(print-dir) +.if ${MK_DIRDEPS_BUILD} == "no" || make(analyze) || make(print-dir) || \ + make(obj) || make(clean*) || make(destroy*) .MAKE.DEPENDFILE= /dev/null .endif .endif @@ -198,7 +197,7 @@ CFLAGS+= ${DEPEND_CFLAGS} .endif # !defined(_meta_filemon) .endif # defined(SRCS) -.if ${MK_DIRDEPS_BUILD} == "yes" && !make(analyze) && !make(print-dir) +.if ${MK_DIRDEPS_BUILD} == "yes" && ${.MAKE.DEPENDFILE} != "/dev/null" # Prevent meta.autodep.mk from tracking "local dependencies". .depend: .include <meta.autodep.mk> diff --git a/share/mk/bsd.init.mk b/share/mk/bsd.init.mk index b7a45d9ac43a..5e8951a6e605 100644 --- a/share/mk/bsd.init.mk +++ b/share/mk/bsd.init.mk @@ -15,19 +15,36 @@ __<bsd.init.mk>__: .endif .include <bsd.own.mk> .MAIN: all -beforebuild: .PHONY .NOTMAIN -.if !defined(_SKIP_BUILD) -all: beforebuild .WAIT -.endif -.if ${.MAKE.LEVEL:U1} == 0 && ${BUILD_AT_LEVEL0:Uyes:tl} == "no" && !make(clean*) -# this tells lib.mk and prog.mk to not actually build anything -_SKIP_BUILD = not building at level 0 +# Some targets need to know when something may build. This is used to +# optimize targets that are only needed when building something, such as +# (not) reading in depend files. For DIRDEPS_BUILD, it will only calculate +# the dependency graph at .MAKE.LEVEL==0, so nothing should be built there. +# Skip "build" logic if: +# - DIRDEPS_BUILD at MAKELEVEL 0 +# - make -V is used without an override +# - make install is used without other targets. This is to avoid breaking +# things like 'make all install' or 'make foo install'. +# - non-build targets are called +.if ${MK_DIRDEPS_BUILD} == "yes" && ${.MAKE.LEVEL:U1} == 0 && \ + ${BUILD_AT_LEVEL0:Uyes:tl} == "no" && !make(clean*) +_SKIP_BUILD= not building at level 0 +.elseif !empty(.MAKEFLAGS:M-V${_V_DO_BUILD}) || \ + ${.TARGETS:M*install*} == ${.TARGETS} || \ + make(clean*) || make(obj) || make(analyze) || make(print-dir) || \ + make(destroy*) +# Skip building, but don't show a warning. +_SKIP_BUILD= .endif -.if ${.MAKE.LEVEL} > 0 && !empty(_SKIP_BUILD) +.if ${MK_DIRDEPS_BUILD} == "yes" && ${.MAKE.LEVEL} > 0 && !empty(_SKIP_BUILD) .warning ${_SKIP_BUILD} .endif +beforebuild: .PHONY .NOTMAIN +.if !defined(_SKIP_BUILD) +all: beforebuild .WAIT +.endif + .if ${MK_META_MODE} == "yes" .if !exists(/dev/filemon) && \ ${UPDATE_DEPENDFILE:Uyes:tl} != "no" && !defined(NO_FILEMON) && \ diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 1fab97cf9e8d..67a5630996be 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -304,7 +304,6 @@ all: .else .if defined(_LIBS) && !empty(_LIBS) all: ${_LIBS} -CLEANFILES+= ${_LIBS} .endif .if ${MK_MAN} != "no" && !defined(LIBRARIES_ONLY) @@ -312,6 +311,8 @@ all: all-man .endif .endif +CLEANFILES+= ${_LIBS} + _EXTRADEPEND: .if !defined(NO_EXTRADEPEND) && defined(SHLIB_NAME) .if defined(DPADD) && !empty(DPADD) diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk index 9d1fed72073d..e5c73ac8355d 100644 --- a/share/mk/bsd.subdir.mk +++ b/share/mk/bsd.subdir.mk @@ -70,7 +70,10 @@ print-dir: .PHONY .endif .if !defined(NEED_SUBDIR) -.if ${.MAKE.LEVEL} == 0 && ${MK_DIRDEPS_BUILD} == "yes" && !empty(SUBDIR) && !(make(clean*) || make(destroy*)) +# .MAKE.DEPENDFILE==/dev/null is set by bsd.dep.mk to avoid reading +# Makefile.depend +.if ${.MAKE.LEVEL} == 0 && ${MK_DIRDEPS_BUILD} == "yes" && !empty(SUBDIR) && \ + ${.MAKE.DEPENDFILE} != "/dev/null" .include <meta.subdir.mk> # ignore this _SUBDIR: diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index e94977c43cfb..7a4ed45a8a6d 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -209,7 +209,7 @@ CXXFLAGS+= ${CXXFLAGS.${.IMPSRC:T}} .if defined(SRCTOP) # Prevent rebuilding during install to support read-only objdirs. -.if !make(all) && make(install) && empty(.MAKE.MODE:Mmeta) +.if ${.TARGETS:M*install*} == ${.TARGETS} && empty(.MAKE.MODE:Mmeta) CFLAGS+= ERROR-tried-to-rebuild-during-make-install .endif .endif diff --git a/share/mk/local.meta.sys.mk b/share/mk/local.meta.sys.mk index 49f625ccefa9..3a4e8f1352bd 100644 --- a/share/mk/local.meta.sys.mk +++ b/share/mk/local.meta.sys.mk @@ -48,7 +48,7 @@ TARGET_ARCHES_arm64?= aarch64 TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 mipsn32el TARGET_ARCHES_powerpc?= powerpc powerpc64 powerpcspe TARGET_ARCHES_pc98?= i386 -TARGET_ARCHES_riscv?= riscv64 +TARGET_ARCHES_riscv?= riscv64 riscv64sf # some corner cases BOOT_MACHINE_DIR.amd64 = boot/i386 diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index a0fd48b2d7f5..51b79f3d609a 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -236,16 +236,16 @@ __DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX __DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC .endif # In-tree binutils/gcc are older versions without modern architecture support. -.if ${__T} == "aarch64" || ${__T} == "riscv64" +.if ${__T} == "aarch64" || ${__T:Mriscv*} != "" BROKEN_OPTIONS+=BINUTILS BINUTILS_BOOTSTRAP GCC GCC_BOOTSTRAP GDB .endif -.if ${__T} == "riscv64" +.if ${__T:Mriscv*} != "" BROKEN_OPTIONS+=PROFILE # "sorry, unimplemented: profiler support for RISC-V" BROKEN_OPTIONS+=TESTS # "undefined reference to `_Unwind_Resume'" BROKEN_OPTIONS+=CXX # "libcxxrt.so: undefined reference to `_Unwind_Resume_or_Rethrow'" .endif .if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "i386" || \ - ${__T} == "riscv64" + ${__T:Mriscv*} != "" __DEFAULT_YES_OPTIONS+=LLVM_LIBUNWIND .else __DEFAULT_NO_OPTIONS+=LLVM_LIBUNWIND diff --git a/share/mk/sys.mk b/share/mk/sys.mk index 2c3743342018..04c342c134f0 100644 --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -13,7 +13,7 @@ unix ?= We run FreeBSD, not UNIX. # and/or endian. This is called MACHINE_CPU in NetBSD, but that's used # for something different in FreeBSD. # -MACHINE_CPUARCH=${MACHINE_ARCH:C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/powerpc(64|spe)/powerpc/:C/riscv64/riscv/} +MACHINE_CPUARCH=${MACHINE_ARCH:C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/powerpc(64|spe)/powerpc/:C/riscv64(sf)?/riscv/} .endif diff --git a/share/zoneinfo/Makefile b/share/zoneinfo/Makefile index 2269b1f40bcd..701a02a579f1 100644 --- a/share/zoneinfo/Makefile +++ b/share/zoneinfo/Makefile @@ -67,6 +67,10 @@ TZBUILDSUBDIRS= \ Pacific \ SystemV +.if defined(OLDTIMEZONES) +TZBUILDSUBDIRS+= US Mexico Chile Canada Brazil +.endif + .if !defined(_SKIP_BUILD) all: zoneinfo .endif |