adrian [Thu, 23 Jun 2016 01:15:35 +0000 (01:15 +0000)]
revert error commit from previous commit. my bad!
Approved by: re (implicit)
adrian [Thu, 23 Jun 2016 01:14:33 +0000 (01:14 +0000)]
[BHND/bcma] Add implementation of BHND_BUS_RESET_CORE function for BCMA
This patch addes missing implementation of BHND_BUS_RESET_CORE function for BCMA.
The reset procedure is very simple: enable reset mode, stop clocking,
enable clocking & force clock gating, disable reset mode, stop clock gating.
Tested:
* (michael) Tested on ASUS RT-N53 for enabling/reset USB core
Submitted by: Michael Zhilin <mizhka@gmail.com>
Approved by: re (gjb)
adrian [Thu, 23 Jun 2016 01:13:30 +0000 (01:13 +0000)]
[iwm] Use mbuf for large firmware commands, like OpenBSD does.
We also need to consider the size of large firmware commands in iwm_alloc_tx_ring(),
in the dma tag creation, when qid == IWM_MVM_CMD_QUEUE. The old code apparently
only allocated a 2KB (MCLBYTES) sized buffer when it actually expected 4KB.
Submitted by: Imre Vadasz <imre@vdsz.com>
Approved by: re (gjb)
Differential Revision: https://reviews.freebsd.org/D6824
adrian [Thu, 23 Jun 2016 01:11:52 +0000 (01:11 +0000)]
[iwm] Add and use iwm_phy_db_free(), to plug phy_db memory leak.
(Together with other iwm(4) memory leak fixes) Memory leakage in M_DEVBUF
is now at ca. 2KB for each iwm(4) module load/unload cycle.
Submitted by: Imre Vadasz <imre@vdsz.com>
Approved by: re (gjb)
Obtained from: DragonflyBSD git
eaf551a1d464c643e98ce5781971dd32124e9af1
Differential Revision: https://reviews.freebsd.org/D6819
adrian [Thu, 23 Jun 2016 01:00:13 +0000 (01:00 +0000)]
[iwm] Fix iwm_dma_contig_free(). dma->map is always NULL here.
* When bus_dmamem_alloc is used, the bus_dmamap_t is usually set to NULL, so
we were never actually freeing any dma memory allocations done via
iwm_dma_contig_alloc(). So we should check dma->vaddr instead of dma->map here.
* Also, the dmamap is actually supposed to be invalidated as part of
bus_dmamem_free(), so bus_dmamap_destroy() is never needed here.
Submitted by: Imre Vadasz <imre@vdsz.com>
Approved by: re (gjb)
Obtained from: DragonflyBSD git
ef2b29a7ba6ca8a9d2c82ab591c0622227ff84cb
adrian [Thu, 23 Jun 2016 00:56:54 +0000 (00:56 +0000)]
[iwm] Use vap->iv_myaddr instead of ic->ic_macaddr when vap != NULL.
ic_macaddr is only used for the initial mac address provided by NVM. We should
rather use vap->iv_myaddr when vap != NULL, to allow the MAC address
to be changed later with ifconfig(8).
Submitted by: Imre Vadasz <imre@vdsz.com>
Reviewed by: avos
Approved by: re (gjb)
Obtained from: DragonflyBSD git
4aee7a78275676d22d14c04177bd0c9377d91478
Differential Revision: https://reviews.freebsd.org/D6743
adrian [Thu, 23 Jun 2016 00:54:14 +0000 (00:54 +0000)]
[ath] fix comments!
I keep asking myself "what do these fields mean" and so now I've clarified
it for myself.
Tested:
* Reading the comments, going "a-ha!" a couple times.
Approved by: re (gjb)
bz [Thu, 23 Jun 2016 00:34:03 +0000 (00:34 +0000)]
Check the V_tcbinfo.ipi_count to hit 0 before doing the full TCP cleanup.
That way timers can finish cleanly and we do not gamble with a DELAY().
Reviewed by: gnn, jtl
Approved by: re (gjb)
Obtained from: projects/vnet
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6923
bz [Thu, 23 Jun 2016 00:32:58 +0000 (00:32 +0000)]
No longer mark TCP TW zone NO_FREE.
Timewait code does a proper cleanup after itself.
Reviewed by: gnn
Approved by: re (gjb)
Obtained from: projects/vnet
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6922
brooks [Thu, 23 Jun 2016 00:30:09 +0000 (00:30 +0000)]
Regen post r302096 and implement svr4_pipe().
Approved by: re (implict, fixing build)
Sponsored by: DARPA, AFRL
brooks [Thu, 23 Jun 2016 00:29:03 +0000 (00:29 +0000)]
Declare a svr4 version of pipe() now that sys_pipe() is no more.
Approved by: re (implicit, fixing build)
Sponsored by: DARPA, AFRL
brooks [Wed, 22 Jun 2016 21:18:19 +0000 (21:18 +0000)]
Generate syscall tables and update pipe() implementation after r302094.
Mark the pipe() system call as COMPAT10.
As of r302092 libc uses pipe2() with a zero flags value instead of pipe().
Approved by: re (gjb)
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D6816
brooks [Wed, 22 Jun 2016 21:15:59 +0000 (21:15 +0000)]
Mark the pipe() system call as COMPAT10.
As of r302092 libc uses pipe2() with a zero flags value instead of pipe().
Commit with regenerated files and implementation to follow.
Approved by: re (gjb)
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D6816
brooks [Wed, 22 Jun 2016 21:12:53 +0000 (21:12 +0000)]
Add support for COMPAT10 keywords in syscalls.
Approved by: re (gjb)
Sponsored by: DARPA, AFRL
brooks [Wed, 22 Jun 2016 21:11:27 +0000 (21:11 +0000)]
Replace use of the pipe(2) system call with pipe2(2) with a zero flags
value.
This eliminates the need for machine dependant assembly wrappers for
pipe(2).
It also make passing an invalid address to pipe(2) return EFAULT rather
than triggering a segfault. Document this behavior (which was already
true for pipe2(2), but undocumented).
Reviewed by: andrew
Approved by: re (gjb)
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D6815
markj [Wed, 22 Jun 2016 21:00:28 +0000 (21:00 +0000)]
Do not complete pending gmirror BIOs when tearing down the provider.
This will result in lock recursion and is more generally incorrect since
the completion handlers will just reinsert the BIOs into the queue we're
trying to drain.
Reviewed by: imp, ngie
Approved by: re (gjb)
MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D6908
bdrewery [Wed, 22 Jun 2016 20:31:49 +0000 (20:31 +0000)]
Add AFLAGS.IMPSRC and document A[C]FLAGS
Approved by: re (gjb)
Sponsored by: EMC / Isilon Storage Division
kib [Wed, 22 Jun 2016 20:15:37 +0000 (20:15 +0000)]
Fix a LOR between vnode locks and allproc_lock.
There is an order between covered vnode lock and allproc_lock, which
is established by calling mountcheckdirs() while owning the covered
vnode lock. mountcheckdirs() iterates over the processes, protected by
allproc_lock. This order is needed and seems to be not avoidable.
On the other hand, various VM daemons also need to iterate over all
processes, and they lock and unlock user maps. Since unlock of the
user map may trigger processing of the deferred map entries, it causes
vnode locking to occur. Or, when vmspace is freed, dropping references
on the vnode-backed object also lock vnodes. We get reverted order
comparing with the mount/unmount order.
For VM daemons, there is no need to own allproc_lock while we operate
on vmspaces. If the process is held, it serves as the marker for
allproc list, which allows to continue the iteration.
Add _PHOLD_LITE() macro, similar to _PHOLD(), but not causing swap-in
of the kernel stacks. It is used instead of _PHOLD() in vm code,
since e.g. calling faultin() in OOM conditions only exaggerates the
problem.
Modernize comment describing PHOLD.
Reported by: lists@yamagi.org
Tested by: pho (previous version)
Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 3 week
Approved by: re (gjb)
Differential revision: https://reviews.freebsd.org/D6679
bdrewery [Wed, 22 Jun 2016 19:07:41 +0000 (19:07 +0000)]
WITH_META_MODE: Whitelist 'make kernel-toolchain'
Approved by: re (blanket, META_MODE)
Sponsored by: EMC / Isilon Storage Division
ken [Wed, 22 Jun 2016 14:39:13 +0000 (14:39 +0000)]
Fix a bug that caused da(4) peripheral drivers to not fully go away
after the underlying device went away.
The problem was that callers who queue the GEOM resize provider
event didn't check to make sure that the provider had not been
withered. For the other equivalent case, g_new_provider_event(),
the code checks to see whether the provider has been withered
before queueing a g_new_provider_event() to the event thread.
In some cases, a resize provider event would come through after
the provider had been withered and all of the existing consumers
had been orphaned. When the resize event triggered a taste of
the provider, that would attach a new consumer to the now
withered provider. The wither washer (g_wither_washer() would
never be able to completely tear down the GEOM because of the
consumers that were hanging around.
The solution was to check the G_PF_WITHER provider flag before
queueing the g_resize_provider_event(), and add an assert to
g_resize_provider_event() to insure that it isn't called on a
withered provider.
sys/geom/geom_subr.c:
In g_resize_provider(), don't try to continue if the
G_PF_WITHER flag is set.
In g_resize_provider_event(), add an assert that the
G_PF_WITHER flag is not set.
In g_access(), if a provider has an error, print out the
name of the provider with the error.
Sponsored by: Spectra Logic
Approved by: re (marius)
MFC after: 3 days
bz [Wed, 22 Jun 2016 12:53:10 +0000 (12:53 +0000)]
Add more fields to if_debug.c for ddb(4) 'show ifnet'; resort
some fields to match the order in the struct. Especially needed
if_pf_kif to do pf(4) VNET debugging.
Approved by: re (marius)
Obtained from: projects/vnet
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
andrew [Wed, 22 Jun 2016 12:05:08 +0000 (12:05 +0000)]
Fix a race when the hardware has raised an exception with an unknown or
uncategorised reason. We need to read the fault address register before
enabling interrupts as the interrupt handler may cause this register to
change.
Approved by: re (marius, kib)
Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation
bz [Wed, 22 Jun 2016 11:45:30 +0000 (11:45 +0000)]
After r302054 unloading an network interface driver on a kernel
without VIMAGE support would dereference a NULL point unconditionally
leading to a panic. Wrap the entire VIMAGE related code with #ifdefs
rather than just the decision making part to save an extra bit of
resources.
Reported by: np
Sponsored by: The FreeBSD Foundation
MFC After: 13 days
Approved by: re (marius)
ae [Wed, 22 Jun 2016 11:29:21 +0000 (11:29 +0000)]
Fix the NULL pointer dereference for unresolved link layer entries in
the netinet6 code. Copy link layer address only when corresponding entry
has LLE_VALID flag.
PR: 210379
Approved by: re (kib)
hselasky [Wed, 22 Jun 2016 10:38:41 +0000 (10:38 +0000)]
Implement libusb_hotplug_register_callback() and
libusb_hotplug_deregister_callback() for the LibUSB v1.0 API and
update the libusb(3) manual page.
Approved by: re (kib)
Requested by: swills
MFC after: 1 week
hselasky [Wed, 22 Jun 2016 09:03:55 +0000 (09:03 +0000)]
Update the definition for number of scratch pages to match the latest
version of the XHCI specification. Make sure the code can handle the
maximum number of allowed scratch pages.
Submitted by: Shichun_Ma@Dell.com
Approved by: re (hrs)
MFC after: 1 week
mm [Wed, 22 Jun 2016 07:49:59 +0000 (07:49 +0000)]
MFV r302003,r302037,r302038,r302056:
Update libarchive to 3.2.1 (bugfix and security fix release)
List of vendor fixes:
- fix exploitable heap overflow vulnerability in Rar decompression
(vendor issue 719, CVE-2016-4302, TALOS-2016-0154)
- fix exploitable stack based buffer overflow vulnebarility in mtree
parse_device functionality (vendor PR 715, CVE-2016-4301, TALOS-2016-0153)
- fix exploitable heap overflow vulnerability in 7-zip read_SubStreamsInfo
(vendor issue 718, CVE-2016-4300, TALOS-2016-152)
- fix integer overflow when computing location of volume descriptor
(vendor issue 717)
- fix buffer overflow when reading a crafred rar archive (vendor issue 521)
- fix possible buffer overflow when reading ISO9660 archives on machines
where sizeof(int) < sizeof(size_t) (vendor issue 711)
- tar and cpio should fail if an input file named on the command line is
missing (vendor issue 708)
- fix incorrect writing of gnutar filenames that are exactly 512 bytes
long (vendor issue 682)
- allow tests to be run from paths that are equal or longer than 128
characters (vendor issue 657)
- add memory allocation errors in archive_entry_xattr.c (vendor PR 603)
- remove dead code in archive_entry_xattr_add_entry() (vendor PR 716)
- fix broken decryption of ZIP files (vendor issue 553)
- manpage style, typo and description fixes
Post-3.2.1 vendor fixes:
- fix typo in cpio version reporting (Vendor PR 725, 726)
- fix argument range of ctype functions in libarchive_fe/passphrase.c
- fix ctype use and avoid empty loop bodies in WARC reader
MFC after: 1 week
Security: CVE-2016-4300, CVE-2016-4301, CVE-2016-4302
Approved by: re (kib)
jhb [Tue, 21 Jun 2016 22:19:06 +0000 (22:19 +0000)]
Account for AIO socket operations in thread/process resource usage.
File and disk-backed I/O requests store counts of read/written disk
blocks in each AIO job so that they can be charged to the thread that
completes an AIO request via aio_return() or aio_waitcomplete(). This
change extends AIO jobs to store counts of received/sent messages and
updates socket backends to set these counts accordingly. Note that
the socket backends are careful to only charge a single messages for
each AIO request even though a single request on a blocking socket might
invoke sosend or soreceive multiple times. This is to mimic the
resource accounting of synchronous read/write.
Adjust the UNIX socketpair AIO test to verify that the message resource
usage counts update accordingly for aio_read and aio_write.
Approved by: re (hrs)
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D6911
bdrewery [Tue, 21 Jun 2016 21:55:03 +0000 (21:55 +0000)]
META_MODE: Don't generate or read _EXTRADEPEND dependencies when using filemon.
The DPADD data in .depend will be redundant with what is in the .meta file.
Also extend NO_EXTRADEPEND support to bsd.prog.mk.
Approved by: re (blanket, META_MODE)
Sponsored by: EMC / Isilon Storage Division
ken [Tue, 21 Jun 2016 20:28:30 +0000 (20:28 +0000)]
Bump __FreeBSD_version to 1100118 for r302069, which breaks binary
compatibility for loadable modules that depend on struct disk.
Approved by: re (delphij)
Sponsored by: Spectra Logic
ken [Tue, 21 Jun 2016 20:18:19 +0000 (20:18 +0000)]
Fix a bug that caused da(4) instances to hang around after the underlying
device is gone.
The problem was that when disk_gone() is called, if the GEOM disk
creation process has not yet happened, the withering process
couldn't start.
We didn't record any state in the GEOM disk code, and so the d_gone()
callback to the da(4) driver never happened.
The solution is to track the state of the creation process, and
initiate the withering process from g_disk_create() if the disk is
being created.
This change does add fields to struct disk, and so I have bumped
DISK_VERSION.
geom_disk.c: Track where we are in the disk creation process,
and check to see whether our underlying disk has
gone away or not.
In disk_gone(), set a new d_goneflag variable that
g_disk_create() can check to see if it needs to
clean up the disk instance.
geom_disk.h: Add a mutex to struct disk (for internal use) disk
init level, and a gone flag.
Bump DISK_VERSION because the size of struct disk has
changed and fields have been added at the beginning.
Sponsored by: Spectra Logic
Approved by: re (marius)
bdrewery [Tue, 21 Jun 2016 20:14:32 +0000 (20:14 +0000)]
Fix top-level builds with fmake / 9.x.
Reported by: allanjude
Approved by: re (marius)
Sponsored by: EMC / Isilon Storage Division
ian [Tue, 21 Jun 2016 17:53:42 +0000 (17:53 +0000)]
Revert the recent armv6 changes to ALIGNED_POINTER(), restoring the
fully-pessimized implementation that requires a type to be aligned to
its natural size.
On armv6+ the compiler might generate load-/store-multiple instructions
which require 4-byte alignment even though the source code is only
accessing individual uint32_t values in a way that doesn't require any
particular alignment at all. The compiler apparently feels free to
combine multiple accesses into a single instruction that requires a
more-strict alignment, and no set of compiler flags seems to disable
this behavior (at least in clang 3.8).
This fixes alignment faults on arm systems using wifi adapters. The
wifi code uses ALIGNED_POINTER(p, uint32_t) to decide whether it needs
to copy-align tcp headers. Because clang is combining several uint32_t
accesses into a single ldm instruction, we need to say that accessing a
uint32_t requires 4-byte alignment.
Approved by: re(gjb)
kib [Tue, 21 Jun 2016 17:49:33 +0000 (17:49 +0000)]
The vmtotal sysctl handler marks active vm objects to calculate
statistics. Marking is done by setting the OBJ_ACTIVE flag. The
flags change is locked, but the problem is that many parts of system
assume that vm object initialization ensures that no other code could
change the object, and thus performed lockless. The end result is
corrupted flags in vm objects, most visible is spurious OBJ_DEAD flag,
causing random hangs.
Avoid the active object marking, instead provide equally inexact but
immutable is_object_alive() definition for the object mapped state.
Avoid iterating over the processes mappings altogether by using
arguably improved definition of the paging thread as one which sleeps
on the v_free_count.
PR: 204764
Diagnosed by: pho
Tested by: pho (previous version)
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Approved by: re (gjb)
adrian [Tue, 21 Jun 2016 15:38:20 +0000 (15:38 +0000)]
[ath] fix TX throughput for EDMA chips by pushing more into the TX FIFO.
It turns out that getting decent performance requires stacking the TX
FIFO a little more aggressively.
* Ensure that when we complete a frame, we attempt to push a new frame
into the FIFO so TX is kept as active as it needs to be
* Be more aggressive about batching non-aggregate frames into a single
TX FIFO slot. This "fixes" TDMA performance (since we only get one
TX FIFO slot ungated per DMA beacon alert) but it does this by pushing
a whole lot of work into the TX FIFO slot.
I'm not /entirely/ pleased by this solution, but it does fix a whole bunch
of corner case issues in the transmit side and fix TDMA whilst I'm at it.
I'll go revisit transmit packet scheduling in ath(4) post 11.
Tested:
* AR9380, STA mode
* AR9580, hostap mode
* AR9380, TDMA client mode
Approved by: re (hrs)
asomers [Tue, 21 Jun 2016 15:27:16 +0000 (15:27 +0000)]
Fix uninitialized variable from r300881
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
Initialize needs_update in vdev_geom_set_physpath
PR: 210409
Reported by: kp
Reviewed by: kp
Approved by: re (hrs)
MFC after: 4 weeks
X-MFC-With: 300881
Sponsored by: Spectra Logic Corp
emaste [Tue, 21 Jun 2016 14:16:32 +0000 (14:16 +0000)]
syscons.4,vt.4: update kern.vty description reflecting vt as default
rS274085 made vt(4) the default system console. Catch up to this in
the man page description for the kern.vty tunable.
Reviewed by: bz
Approved by: re (hrs)
Differential Revision: https://reviews.freebsd.org/D6901
bz [Tue, 21 Jun 2016 13:48:49 +0000 (13:48 +0000)]
Get closer to a VIMAGE network stack teardown from top to bottom rather
than removing the network interfaces first. This change is rather larger
and convoluted as the ordering requirements cannot be separated.
Move the pfil(9) framework to SI_SUB_PROTO_PFIL, move Firewalls and
related modules to their own SI_SUB_PROTO_FIREWALL.
Move initialization of "physical" interfaces to SI_SUB_DRIVERS,
move virtual (cloned) interfaces to SI_SUB_PSEUDO.
Move Multicast to SI_SUB_PROTO_MC.
Re-work parts of multicast initialisation and teardown, not taking the
huge amount of memory into account if used as a module yet.
For interface teardown we try to do as many of them as we can on
SI_SUB_INIT_IF, but for some this makes no sense, e.g., when tunnelling
over a higher layer protocol such as IP. In that case the interface
has to go along (or before) the higher layer protocol is shutdown.
Kernel hhooks need to go last on teardown as they may be used at various
higher layers and we cannot remove them before we cleaned up the higher
layers.
For interface teardown there are multiple paths:
(a) a cloned interface is destroyed (inside a VIMAGE or in the base system),
(b) any interface is moved from a virtual network stack to a different
network stack ("vmove"), or (c) a virtual network stack is being shut down.
All code paths go through if_detach_internal() where we, depending on the
vmove flag or the vnet state, make a decision on how much to shut down;
in case we are destroying a VNET the individual protocol layers will
cleanup their own parts thus we cannot do so again for each interface as
we end up with, e.g., double-frees, destroying locks twice or acquiring
already destroyed locks.
When calling into protocol cleanups we equally have to tell them
whether they need to detach upper layer protocols ("ulp") or not
(e.g., in6_ifdetach()).
Provide or enahnce helper functions to do proper cleanup at a protocol
rather than at an interface level.
Approved by: re (hrs)
Obtained from: projects/vnet
Reviewed by: gnn, jhb
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D6747
mm [Tue, 21 Jun 2016 00:00:05 +0000 (00:00 +0000)]
Add two missing test files in r302037
mm [Mon, 20 Jun 2016 23:55:33 +0000 (23:55 +0000)]
Update vendor/libarchive to git
139d0576b51a253732a5ab1f66805dffbf8b00af
tag v3.2.1
Fixed vendor issues:
Issue 521: Properly check reading from lzss decompression buffer
Issue 717: Fix integer overflow when computing location of volume
descriptor
Issue 718: Security fix TALOS-CAN-152
Issue 719: Security fix TALOS-CAN-154
Security: TALOS-CAN-152, TALOS-CAN-154
asomers [Mon, 20 Jun 2016 23:17:00 +0000 (23:17 +0000)]
Skip sys/acl tests on systems lacking perl
tests/sys/acl/Makefile
add perl to the required_programs for all tests in this directory
Reviewed by: ngie
Approved by: re (gjb)
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D6870
avos [Mon, 20 Jun 2016 22:45:19 +0000 (22:45 +0000)]
rtwn: fix Tx processing, add some busdma synchronization.
1) Unload mbuf instead of descriptor in rtwn_tx_done().
2) Add more synchronization for device visible mappings before
touching the memory.
3) Improve watchdog timer logic.
Reported and tested by: mva
Approved by: re (gjb)
avos [Mon, 20 Jun 2016 22:39:32 +0000 (22:39 +0000)]
urtwn: fix panic on device detach.
Remove frames from active/pending Tx queues and free related node
references when vap is destroyed to prevent various use-after-free
scenarios.
Reported and tested by: Aleksander Alekseev <afiskon@devzen.ru>
PR: 208632
Approved by: re (gjb)
slm [Mon, 20 Jun 2016 18:14:51 +0000 (18:14 +0000)]
- No log bit in IOCStatus and endian-safe changes.
Use MPI2_IOCSTATUS_MASK when checking IOCStatus to mask off the log bit, and
make a few more things endian-safe.
- Fix possible use of invalid pointer.
It was possible to use an invalid pointer to get the target ID value. To fix
this, initialize a local Target ID variable to an invalid value and change that
variable to a valid value only if the pointer to the Target ID is not NULL.
- No need to set the MPSSAS_SHUTDOWN flag because it's never used.
- done_ccb pointer can be used if it is NULL.
To prevent this, move check for done_ccb == NULL to before done_ccb is used in
mpssas_stop_unit_done().
- Disks can go missing until a reboot is done in some cases.
This is due to the DevHandle not being released, which causes the Firmware to
not allow that disk to be re-added.
Reviewed by: ken
Approved by: re (gjb), ken, scottl, ambrisko (mentors)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D6872
adrian [Mon, 20 Jun 2016 16:12:27 +0000 (16:12 +0000)]
[ath] implement TX queue configuration extensions for the AR9380 HAL.
Among other things, this introduces the idea of DBA-gated queues that
aren't the CABQ. The TDMA support requires this.
Tested:
* AR9580 (hostap mode)
* AR9380 (sta mode)
Approved by: re (gjb)
kib [Mon, 20 Jun 2016 15:45:50 +0000 (15:45 +0000)]
Fix typo. Note that atomic is still required even for interlocked case.
Sponsored by: The FreeBSD Foundation
Approved by: re (marius)
bapt [Mon, 20 Jun 2016 06:45:42 +0000 (06:45 +0000)]
Fix generation of locales with multiple variants
Serbian locales have triple components to represent the 2 variations of the
locale: Latin and Cyrillic. Previously the tools generatic the locale were
appending both definitions instead of differentiating them.
Reported by: ache
Approved by: re (gjb)
wma [Mon, 20 Jun 2016 06:40:58 +0000 (06:40 +0000)]
ARM64: bsdinstall support for creating EFI partitions
This patch enables bsdinstall to create EFI partition during installation and uploading it's contents,
making the ARM64 FreeBSD installation bootable.
Obtained from: Semihalf
Sponsored by: Cavium
Approved by: re
Reviewed by: allanjude, emaste, nwhitehorn, wma
Differential Revision: https://reviews.freebsd.org/D6853
adrian [Mon, 20 Jun 2016 02:04:40 +0000 (02:04 +0000)]
[ath] fix EDMA TX buffer flags for use when retransmitting frames.
This started showing up when doing lots of aggregate traffic. For TDMA it's
always no-ACK traffic and I didn't notice this, and I didn't notice it
when doing 11abg traffic as it didn't fail enough in a bad way to trigger
this.
This showed up as the fifo depth being < 0.
Eg:
Jun 19 09:23:07 gertrude kernel: ath0: ath_tx_edma_push_staging_list: queued 2 packets; depth=2, fifo depth=1
Jun 19 09:23:07 gertrude kernel: ath0: ath_edma_tx_processq: Q1, bf=0xfffffe000385f068, start=1, end=1
Jun 19 09:23:07 gertrude kernel: ath0: ath_edma_tx_processq: Q1: FIFO depth is now 0 (1)
Jun 19 09:23:07 gertrude kernel: ath0: ath_edma_tx_processq: Q1, bf=0xfffffe0003866fe8, start=0, end=1
Jun 19 09:23:07 gertrude kernel: ath0: ath_edma_tx_processq: Q1: FIFO depth is now -1 (0)
So, clear the flags before adding them to a TX queue, so if they're
re-added for the retransmit path it'll clear whatever they were and
not double-account the FIFOEND flag. Oops.
Tested:
* AR9380, STA mode, 11n iperf testing (~130mbit)
Approved by: re (delphij)
karels [Sun, 19 Jun 2016 23:36:40 +0000 (23:36 +0000)]
Add Mike Karels as committer, with gnn as mentor.
Approved by: gnn (mentor)
Approved by: re
kib [Sun, 19 Jun 2016 18:32:35 +0000 (18:32 +0000)]
Remote and local adv lock servers might de-synchronize (the added comment
explains the plausible scenario), resulting in EDEADLK returned on the
local registration attempt. Handle this by re-trying the local op [1].
On unmount, local registration abort is indicated as EINTR, abort the nlm
call as well.
Reported and tested by: pho
Suggested and reviewed by: dfr (previous version, [1])
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Approved by: re (delphij)
kib [Sun, 19 Jun 2016 18:29:43 +0000 (18:29 +0000)]
Do not access NFS data for reclaimed vnode.
Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Approved by: re (delphij)
adrian [Sun, 19 Jun 2016 07:31:02 +0000 (07:31 +0000)]
[net80211] remove node scan lock / generation number + fix few LORs
Drop scan generation number and node table scan lock - the only place
where ni_scangen is checked is in ieee80211_timeout_stations() (and it
is used to prevent duplicate checking of the same node); node scan lock
protects only this variable + node table scan generation number.
This will fix (at least) next LOR (hostap mode):
lock order reversal:
1st 0xc175f84c urtwm0_scan_loc (urtwm0_scan_loc) @ /usr/src/sys/modules/wlan/../../net80211/ieee80211_node.c:2019
2nd 0xc175e018 urtwm0_com_lock (urtwm0_com_lock) @ /usr/src/sys/modules/wlan/../../net80211/ieee80211_node.c:2693
stack backtrace:
#0 0xa070d1c5 at witness_debugger+0x75
#1 0xa070d0f6 at witness_checkorder+0xd46
#2 0xa0694cce at __mtx_lock_flags+0x9e
#3 0xb03ad9ef at ieee80211_node_leave+0x12f
#4 0xb03afd13 at ieee80211_timeout_stations+0x483
#5 0xb03aa1c2 at ieee80211_node_timeout+0x42
#6 0xa06c6fa1 at softclock_call_cc+0x1e1
#7 0xa06c7518 at softclock+0xc8
#8 0xa06789ae at intr_event_execute_handlers+0x8e
#9 0xa0678fa0 at ithread_loop+0x90
#10 0xa0675fbe at fork_exit+0x7e
#11 0xa08af910 at fork_trampoline+0x8
In addition to the above:
* switch to ieee80211_iterate_nodes();
* do not assert that node table lock is held, while calling node_age();
that's not really needed (there are no resources, which can be protected
by this lock) + this fixes LOR/deadlock between ieee80211_timeout_stations()
and ieee80211_set_tim() (easy to reproduce in HOSTAP mode while
sending something to an STA with enabled power management).
Tested:
* (avos) urtwn0, hostap mode
* (adrian) AR9380, STA mode
* (adrian) AR9380, AR9331, AR9580, hostap mode
Notes:
* This changes the net80211 internals, so you have to recompile all of it
and the wifi drivers.
Submitted by: avos
Approved by: re (delphij)
Differential Revision: https://reviews.freebsd.org/D6833
adrian [Sun, 19 Jun 2016 03:45:32 +0000 (03:45 +0000)]
[ath] add support for batching frames to the general TX queues.
It turns out the frame scheduling policies (eg DBA_GATED) operate on
a single TX FIFO entry. ASAP scheduling is fine; those frames always
go out.
DBA-gated sets the TX queue ready when the DBA timer fires, which triggers
a beacon transmit. Normally this is used for content-after-beacon queue
(CABQ) work, which needs to burst out immediately after a beacon.
(eg broadcast, multicast, etc frames.) This is a general policy that you
can use for any queue, and Sam's TDMA code uses it.
When DBA_GATED is used and something like say, an 11e TX burst window,
it only operates on a single TX FIFO entry. If you have a single frame
per TX FIFO entry and say, a 2.5ms long burst window (eg TDMA!) then it'll
only burst a single frame every 2.5ms. If there's no gating (eg ASAP) then
the burst window is fine, and multiple TX FIFO slots get used.
The CABQ code does pack in a list of frames (ie, the whole cabq) but
up until this commit, the normal TX queues didn't. It showed up when
I started to debug TDMA on the AR9380 and later.
This commit doesn't fix the TDMA case - that's still broken here, because
all I'm doing here is allowing 'some' frames to be bursting, but I'm
certainly not filling the whole TX FIFO slot entry with frames.
Doing that 'properly' kind of requires me to take into account how long
packets should take to transmit and say, doing 1.5 or something times that
per TX FIFO slot, as if you partially transmit a slot, when it's next
gated it'll just finish that TX FIFO slot, then not advance to the next
one.
Now, I /also/ think queuing a new packet restarts DMA, but you have to
push new frames into the TX FIFO. I need to experiment some more with
this because if it's really the case, I will be able to do TDMA support
without the egregious hacks I have in my local tree. Sam's TDMA code
for previous chips would just kick the TXE bit to push along DMA
again, but we can't do that for EDMA chips - we /have/ to push a new
frame into the TX FIFO to restart DMA. Ugh.
Tested:
* AR9380, STA mode
* AR9380, hostap mode
* AR9580, hostap mode
Approved by: re (gjb)
ume [Sun, 19 Jun 2016 03:44:32 +0000 (03:44 +0000)]
- Prefer to use %d over %e where the day of the month should be zero
filled.
- Since %e means the day of the month as well, regard %e as same as %d
in md_order.
Reported by: vangyzen
Approved by: re (gjb)
vangyzen [Sat, 18 Jun 2016 23:18:04 +0000 (23:18 +0000)]
Fix if_ntb interface setup to include IFF_MULTICAST.
This allows IPv6 link local addresses (and other IPv6 functionality) to work.
PR: 210355
Submitted by: Steve Wahl and David Bright (both at Dell Inc.)
Reviewed by: cem, mav
Tested by: mav (on Intel hardware)
Approved by: re (kib)
MFC after: 5 days
Sponsored by: Dell Inc.
Differential Revision: https://reviews.freebsd.org/D6885
kib [Sat, 18 Jun 2016 20:22:53 +0000 (20:22 +0000)]
After the vnode unlock, mount point might be destroyed immediately,
dropping the reference on mnt_cred. Prevent this by referencing the
temporal credentials before unlock.
Tested by: pho
Reviewed by: dfr
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Approved by: re (gjb)
kib [Sat, 18 Jun 2016 20:20:00 +0000 (20:20 +0000)]
Fix gcc build.
Reported andt tested by: swills
Sponsored by: The FreeBSD Foundation
Approved by: re (gjb)
mm [Sat, 18 Jun 2016 08:25:31 +0000 (08:25 +0000)]
Update vendor/libarchive to git
d85976e7ff4a062e1de6e04dab7bb78e3344768f
Fixed vendor issues:
Issue 553: Fix broken decryption for ZIP files
Issue 657: Allow up to 8k for the test root directory name
Issue 682: Correctly write gnutar filenames of exactly 512 bytes
Issue 708: tar should fail if a named input file is missing
PR 715: Fix libarchive/archive_read_support_format_mtree.c:1388:11:
error: array subscript is above array bounds
mjg [Fri, 17 Jun 2016 19:41:30 +0000 (19:41 +0000)]
vfs: ifdef out noop vop_* primitives on !DEBUG_VFS_LOCKS kernels
This removes calls to empty functions like vop_lock_{pre/post} from
common vfs routines.
Approved by: re (gjb)
emaste [Fri, 17 Jun 2016 18:49:42 +0000 (18:49 +0000)]
mkimg: bump version to
20151211 after r292082
mkimg has had a number of functional additions after the last time the
version was incremented. Do so now, to r292082's commit date, so that
users can determine what is supported.
Reviewed by: marcel
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6882
kp [Fri, 17 Jun 2016 18:21:55 +0000 (18:21 +0000)]
pf: Filter on and set vlan PCP values
Adopt the OpenBSD syntax for setting and filtering on VLAN PCP values. This
introduces two new keywords: 'set prio' to set the PCP value, and 'prio' to
filter on it.
Reviewed by: allanjude, araujo
Approved by: re (gjb)
Obtained from: OpenBSD (mostly)
Differential Revision: https://reviews.freebsd.org/D6786
kib [Fri, 17 Jun 2016 17:34:28 +0000 (17:34 +0000)]
Use vnlru_free(9) to implement dnlc_reduce_cache().
This apparently puts ARC back under the limits after the vnode pressure
rework in r291244, in particular due to the kmem exhaustion.
Based on patch by: mckusick
Reviewed by: avg, mckusick
Tested by: allanjude, madpilot
Sponsored by: The FreeBSD Foundation
Approved by: re (gjb)
kib [Fri, 17 Jun 2016 17:33:25 +0000 (17:33 +0000)]
Add VFS interface to flush specified amount of free vnodes belonging
to mount points with the given filesystem type, specified by mount
vfs_ops pointer.
Based on patch by: mckusick
Reviewed by: avg, mckusick
Tested by: allanjude, madpilot
Sponsored by: The FreeBSD Foundation
Approved by: re (gjb)
manu [Fri, 17 Jun 2016 17:09:22 +0000 (17:09 +0000)]
Print a message when disks are found but no logical partition are
reported by EFI implementation. This address comment on r301714.
Approved by: re (gjb), andrew (mentor)
Differential Revision: https://reviews.freebsd.org/D6787
adrian [Fri, 17 Jun 2016 17:01:32 +0000 (17:01 +0000)]
[ath] don't debug RX EDMA descriptors that are not yet complete.
Approved by: re@ (gjb)
bdrewery [Fri, 17 Jun 2016 16:46:58 +0000 (16:46 +0000)]
Add clang-format under WITH_CLANG_EXTRAS.
Reviewed by: dim
Approved by: re (gjb)
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D6856
bdrewery [Fri, 17 Jun 2016 16:44:31 +0000 (16:44 +0000)]
Import ClangFormat.cpp from ^/vendor/clang/clang-release_380-r262564
Discussed with: dim
Approved by: re (gjb)
lidl [Fri, 17 Jun 2016 16:34:25 +0000 (16:34 +0000)]
Note ipfilter support in blacklist-helper script in relnotes
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation
gjb [Fri, 17 Jun 2016 00:00:45 +0000 (00:00 +0000)]
Update 11.0 to -ALPHA4 in preparation of a new set of snapshot
builds.
Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation
emaste [Thu, 16 Jun 2016 21:22:26 +0000 (21:22 +0000)]
ar: enable reproducible output by default when invoked as 'ar -s'
ar output is already deterministic by default for ar -q and ar -r, and
when invoked as ranlib. Make ar -s equivalent to ranlib and enable
deterministic output by default in that case too.
PR: 210330
Reviewed by: bdrewery
Approved by: re (gjb)
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6871
dteske [Thu, 16 Jun 2016 21:14:25 +0000 (21:14 +0000)]
Add bsdconfig `wifi' (aka `wireless' or `wlan') module
Approved by: re (gjb)
MFC after: 8 weeks
Relnotes: yes
landonf [Thu, 16 Jun 2016 20:04:33 +0000 (20:04 +0000)]
siba(4): Adopt bcma-compatible mapping of bhnd(4) port/region identifiers.
Maps Sonics/OCP per-core address spaces to bcma(4)-compatible port/region
identifiers.
This permits the use of common address map identifiers in bhnd device
drivers, independent of the underlying interconnect type.
Approved by: re (gjb), adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D6850
landonf [Thu, 16 Jun 2016 19:57:24 +0000 (19:57 +0000)]
bhnd(4): Fix resource allocation issues exposed by chipc PMU support.
- Delete all chipc children on attachment failure.
- Added missing bhnd_nexus bhnd_bus_deactivate_resource implementation.
- Drop a CHIPC_UNLOCK() accidentally left behind after lifting
synchronization into the chipc region refcounting API.
- Fix re-allocation of chipc resources. Previously, the resource ID was
reset to -1 on release, preventing later re-allocation.
Approved by: re (gjb), adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D6849
adrian [Thu, 16 Jun 2016 17:59:15 +0000 (17:59 +0000)]
[iwm] free RX ring / NVM memory after they're used.
* Free RX ring during detach
* Free NVM memory after parsing
Tested:
* 7260, STA mode
Submitted by: Imre Vadasz <imre@vdsz.com>
Approved by: re (gjb)
Obtained from: dragonflybsd
Differential Revision: https://reviews.freebsd.org/D6817
hselasky [Thu, 16 Jun 2016 16:26:16 +0000 (16:26 +0000)]
Add missing return statement.
Approved by: re (gjb)
MFC after: 1 week
hselasky [Thu, 16 Jun 2016 16:17:29 +0000 (16:17 +0000)]
Add multiple missing descriptor parsing functions to the LibUSB v1.0 API.
Approved by: re (kib)
Requested by: swills
MFC after: 1 week
asomers [Thu, 16 Jun 2016 15:25:37 +0000 (15:25 +0000)]
Fix usr.sbin/rpcbind ATF tests on 32-bit platforms
usr.sbin/rpcbind/tests/addrmerge_test.c
Fix some sizeof calculations that work only by luck on 64-bit
platforms.
PR: 210314
Reviewed by: ngie
Approved by: re (kib)
Reported by: Mark Millard
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D6855
hselasky [Thu, 16 Jun 2016 14:26:04 +0000 (14:26 +0000)]
Add support for libusb_set_auto_detach_kernel_driver() to the LibUSB v1.0 API.
Approved by: re (kostikbel)
Requested by: swills
MFC after: 1 week
gjb [Thu, 16 Jun 2016 13:34:20 +0000 (13:34 +0000)]
Reimplement r301944 using the correct install(1) invocation, which again
fixes packaging tzdata/zoneinfo.
Thank you to hrs for the pointer on what I did incorrectly.
Approved by: re (blanket, pkgbase)
Sponsored by: The FreeBSD Foundation
hselasky [Thu, 16 Jun 2016 12:14:19 +0000 (12:14 +0000)]
Add support for libusb_get_port_number() to the LibUSB v1.0 API.
Approved by: re (kostikbel)
Requested by: swills
MFC after: 1 week
kib [Thu, 16 Jun 2016 12:08:25 +0000 (12:08 +0000)]
Return usual error indicator to shell.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Approved by: re (hrs)
kib [Thu, 16 Jun 2016 12:07:40 +0000 (12:07 +0000)]
Always allow loading of cpuctl(4). When a CPU feature is not
supported, e.g. CPUID or MSR, return ENODEV from the ioctl which needs
that feature.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Approved by: re (hrs)
kib [Thu, 16 Jun 2016 12:05:44 +0000 (12:05 +0000)]
Update comments for the MD functions managing contexts for new
threads, to make it less confusing and using modern kernel terms.
Rename the functions to reflect current use of the functions, instead
of the historic KSE conventions:
cpu_set_fork_handler -> cpu_fork_kthread_handler (for kthreads)
cpu_set_upcall -> cpu_copy_thread (for forks)
cpu_set_upcall_kse -> cpu_set_upcall (for new threads creation)
Reviewed by: jhb (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Approved by: re (hrs)
Differential revision: https://reviews.freebsd.org/D6731
kib [Thu, 16 Jun 2016 12:01:11 +0000 (12:01 +0000)]
Remove XXX comments from kern_thread.c. In one case, there is no
reason for it in modern times. In the other case, expand the comment
stating instead of doubting.
Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Approved by: re (hrs)
X-Differential revision: https://reviews.freebsd.org/D6731
kib [Thu, 16 Jun 2016 11:58:46 +0000 (11:58 +0000)]
Remove code duplication.
Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Approved by: re (hrs)
X-Differential revision: https://reviews.freebsd.org/D6731
gjb [Thu, 16 Jun 2016 11:55:24 +0000 (11:55 +0000)]
Revert r301944, which apparently broke zoneinfo install during
installworld (although I am not sure why). I'll revisit this
change after I further understand the cause of the breakage.
Thanks to our secret canary (dhw) for the report.
Approved by: re (blanket, pkgbase)
Sponsored by: The FreeBSD Foundation
hselasky [Thu, 16 Jun 2016 11:51:20 +0000 (11:51 +0000)]
Define LIBUSB_API_VERSION.
Approved by: re (kostikbel)
Requested by: swills
MFC after: 1 week
hselasky [Thu, 16 Jun 2016 07:48:21 +0000 (07:48 +0000)]
Implement libusb_get_version() and update libusb manual page.
Approved by: re (glebius)
Requested by: swills
MFC after: 1 week
avg [Thu, 16 Jun 2016 07:45:57 +0000 (07:45 +0000)]
fix a zfs boot regression introduced in r300117 by accident
There is no reason to return non-zero value from zfs_probe_partition()
as that causes following partitions to not be probed for ZFS vdevs.
A particular scenario that I encountered is a GPT partitioned disk
where several partitions have freebsd-zfs type. A partition with a lower
index is used as a cache (l2arc) vdev and in that case case zfs_probe()
returned a non-zero status. That status was returned to ptable_iterate()
and caused it to abort the iteration. Because of that the subsequent
partitions were not probed and a root pool was not discovered resulting
in a boot failure.
While there fix the style for nearby return statements.
Approved by: re (kib)
manu [Thu, 16 Jun 2016 03:02:27 +0000 (03:02 +0000)]
Bump /tmp from 30m to 50m for ARM release images.
30m isn't enough for pkg anymore to extract packagesite.txz.
40m is fine for now but let's take a safer way as we don't know when pkg will need more.
Reported by: many
Approved by: re (gjb), andrew (mentor)
gjb [Thu, 16 Jun 2016 03:00:10 +0000 (03:00 +0000)]
Fix zoneinfo file packaging.
This change fixes 468 of 488 zoneinfo file packaging issues,
the rest still to be investigated.
Approved by: re (blanket, pkgbase)
Sponsored by: The FreeBSD Foundation
bdrewery [Wed, 15 Jun 2016 23:58:09 +0000 (23:58 +0000)]
Mark targets with _SUBDIR as .PHONY.
This is mostly fixing META_MODE with realinstall wanting a .meta
file when it does not need one. These targets really should
always run though since they have _SUBDIR on them.
Approved by: re (implicit)
Sponsored by: EMC / Isilon Storage Division
bdrewery [Wed, 15 Jun 2016 23:58:06 +0000 (23:58 +0000)]
WITH_META_MODE: Whitelist 'make kernel' and 'make world'.
installkernel is technically META_MODE safe but doesn't need an explicit
approval to use it since it's all disabled via .PHONY.
world uses 'make -B installworld' which already will disable META_MODE
via the -B (.MAKE.MODE=compat) usage.
Approved by: re (implicit)
Sponsored by: EMC / Isilon Storage Division
bdrewery [Wed, 15 Jun 2016 23:58:03 +0000 (23:58 +0000)]
Fix native powerpc64 build of lib32 with in-tree GCC.
- This was broken by r300350 and r300885.
- Add some comments around the external GCC logic since it is spread out
and in need of some cleanup.
- The problem was that X_COMPILER_TYPE is always defined from CC->XCC's
default, so if /usr/bin/cc is GCC (as it is on native powerpc64) then
X_COMPILER_TYPE was getting GCC and triggering the external logic in
Makefile.libcompat. It was intended to always provide -isystem with
GCC since --sysroot is used into the lib32 sysroot which won't modify
the header path without the -isystem. The use of the libc++/std=c++11
override was only intended to be used for external compilers though
(more accurately GCC 4.8+ but that's a separate assumption to
cleanup). Apply the same logic from Makefile.inc1 to Makefile.libcompat
to only add the libc++ override when needed for external compilers.
Pointyhat to: bdrewery
Tested with: native ppc64 (swills), universe, ppc64 xtoolchain,
amd64 xtoolchain, sparc64 cross-build of ppc64 (host GCC 4.2)
Reported by: andreast, swills
Approved by: re (gjb)
Sponsored by: EMC / Isilon Storage Division
bdrewery [Wed, 15 Jun 2016 23:58:00 +0000 (23:58 +0000)]
tinderbox/universe: Only show arm64 warning if it was in the TARGETS list.
This was a flaw in my change in r287903 but also in the original change
in r282156 since it used empty(${TARGETS}) rather than empty(TARGETS).
Reported by: lidl
Approved by: re (gjb)
Sponsored by: EMC / Isilon Storage Division
bdrewery [Wed, 15 Jun 2016 23:57:57 +0000 (23:57 +0000)]
WITH_META_MODE: Keep .MAKE.MODE/META_MODE clean
Due to META_MODE being passed into the environment it tends
to keep growing with the defaults.
Approved by: re (implicit)
Sponsored by: EMC / Isilon Storage Division
bdrewery [Wed, 15 Jun 2016 23:57:53 +0000 (23:57 +0000)]
WITH_META_MODE: Don't expect a .meta file for side-effect generated files.
This is the same as r301285.
Approved by: re (implicit)
Sponsored by: EMC / Isilon Storage Division
bdrewery [Wed, 15 Jun 2016 23:57:50 +0000 (23:57 +0000)]
WITH_META_MODE: Do include headers for specific guessed dependencies
This is a follow-up to r300343.
This is important for the OBJS_DEPEND_GUESS usage in
gnu/usr.bin/cc/cc_tools.
See comments for more details.
Approved by: re (implicit)
Sponsored by: EMC / Isilon Storage Division
bdrewery [Wed, 15 Jun 2016 23:57:46 +0000 (23:57 +0000)]
Convert to new FAST_DEPEND syntax for guessed dependencies.
This OBJS_DEPEND_GUESS is needed since each target gets its
own .depend.target.o file but also because it is spelled
.meta.target.o with WITH_META_MODE. The OBJS_DEPEND_GUESS
will apply the dependency if the required file is missing.
Also remove redundant .c files while here to avoid prolems with
targets using .ALLSRC and getting multiple source files.
Approved by: re (implicit)
Sponsored by: EMC / Isilon Storage Division