Commit Graph

205100 Commits

Author SHA1 Message Date
Enji Cooper
ea36ade1d1 Limit RESOLUTION_MAX to INT_MAX, not UINT_MAX (all spelled out) so the
mode value isn't always clipped to -1 when (resolution * size) == 32, which
would have been the case with values => {4i,32b,32t}.

This seems to have been broken in r64382.

MFC after: 1 week
X-MFC with: r289915
PR: 200619
Reported by: Michael Baptist
Submitted by: Lars Skodje
Sponsored by: EMC / Isilon Storage Division
2015-10-25 04:37:00 +00:00
Enji Cooper
d53226d715 Use 't' (bit-field) not 'b' (bit-sized integral type) for describing MRIE (aka
"Method of Reporting Informational Exceptions") in the SCSI mode database.
T10/04-371 revision 2 (revision 4; page 2, table 1) describes it as a
bit-field of 4 bits wide.

1. http://www.t10.org/ftp/t10/document.04/04-371r2.pdf

This a recommit of head@r289913 to fix the original commit message, in
particular:
- I incorrectly claimed that unit change was 'i' -> 't'.
- The spec I reference in this commit is 2 decades newer than the one noted in
  r289913. The fields in the SCSI mode database are more complete in the newer
  spec, so it'll be easier for someone to decipher this commit if need be
  later.
- I screwed up the bug entry in the previous commit message

Pointyhat to: ngie (for botching up r289913)
PR: 200619
Reported by: Michael Baptist
Submitted by: Lars Skodje
Sponsored by: EMC / Isilon Storage Divisionf
2015-10-25 04:04:25 +00:00
Enji Cooper
e54187eb89 Revert r289913 -- I botched up the commit message by accident
Will redo the commit shortly
2015-10-25 03:22:21 +00:00
Enji Cooper
93709850e0 Use 't' (bits) not 'i' (bytes) for describing MRIE (aka
"Method of Reporting Informational Exceptions") in the SCSI mode database as
the field described in X3T10/94-190 (revision 4; page 2, table 1) [1.] is
4 bits wide, not 4 bytes wide

1. http://ftp.t10.org/ftp/t10/document.94/94-190r4.pdf

Bug 200619
MFC after: 1 week
Reported by: Michael Baptist <mbaptist@isilon.com>
Submitted by: Lars Skodje <lskodje@isilon.com>
Sponsored by: EMC / Isilon Storage Division
2015-10-25 03:16:08 +00:00
Conrad Meyer
cea5b880c3 ioat: Actually bring the hardware back online after reset
We need to reset the chancmp and chainaddr MMIO registers to bring the
device back to a working state.

Name the chanerr bits while we're here.

Sponsored by:	EMC / Isilon Storage Division
2015-10-24 23:46:32 +00:00
Conrad Meyer
e88e14b9f0 ioat: Use bus_alloc_resource_any(9)
Sponsored by:	EMC / Isilon Storage Division
2015-10-24 23:46:20 +00:00
Conrad Meyer
8f27463708 ioat: Extract halted error-debugging to a function
Sponsored by:	EMC / Isilon Storage Division
2015-10-24 23:46:08 +00:00
Conrad Meyer
4becebdf9e ioat: Always re-arm interrupts in process_events
It doesn't hurt, even if there is nothing to do.

Sponsored by:	EMC / Isilon Storage Division
2015-10-24 23:45:56 +00:00
Conrad Meyer
f7157235b8 ioat: Add sysctl to force hw reset
To enable controlled testing.

Sponsored by:	EMC / Isilon Storage Division
2015-10-24 23:45:45 +00:00
Conrad Meyer
466b3540ff ioat: refcnt users so we can drain them at detach
We only need to borrow a mutex for the drain sleep and the 0->1
transition, so just reuse an existing one for now.

The wchan is arbitrary.  Using refcount itself would have required
__DEVOLATILE(), so use the lock's address instead.

Different uses are tagged by kind, although we only do anything with
that information in INVARIANTS builds.

Sponsored by:	EMC / Isilon Storage Division
2015-10-24 23:45:33 +00:00
Conrad Meyer
09f49f249a ioat: When queueing operations, assert the submit lock
Callers should have acquired this lock when they invoked ioat_acquire()
before issuing operations.  Assert it is held.

Sponsored by:	EMC / Isilon Storage Division
2015-10-24 23:45:21 +00:00
Conrad Meyer
f46011ae19 ioat: Don't use sleeping allocation in lock path
This is still the worst possible way to allocate memory if it will ever
be under pressure, but at least it won't deadlock.

Suggested by:	WITNESS
Sponsored by:	EMC / Isilon Storage Division
2015-10-24 23:45:10 +00:00
Conrad Meyer
fe720f5ae0 ioat: Pull out timer callout delay into a constant
Pull out the timer callout delay into IOAT_INTR_TIMO and shorten it
considerably (5s -> 100ms).  Single operations do not take 5-10 seconds
and when interrupts aren't working, waiting 100ms sucks a lot less than
5s.

Sponsored by:	EMC / Isilon Storage Division
2015-10-24 23:44:58 +00:00
Enji Cooper
567be5c2fb Add libvmmapi to OptionalObsoleteFiles.inc when MK_BHYVE == no
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-10-24 23:25:43 +00:00
Enji Cooper
dc50fb3673 Add a regression test for r289899 to validate rockridge encoding
of device types

X-MFC with: r289899
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-10-24 23:21:08 +00:00
Enji Cooper
fb9ab5ec6b Remove an ls -l I was using for debugging
MFC after: 2 weeks
X-MFC with: r289897
Sponsored by: EMC / Isilon Storage Division
2015-10-24 23:19:24 +00:00
Jason Evans
ba4f5cc0a6 Update jemalloc to version 4.0.4. 2015-10-24 23:18:05 +00:00
Enji Cooper
fc002adafd Import the fix from NetBSD kern/48852 (sic) to fix rockridge encoding of
device nodes

In particular, use st_rdev (the device type), not st_dev (the device inode),
and fix the comparison to be correct with the st_rdev field

Bug 203648
MFC after: 2 weeks
Submitted by: Thomas Schmitt <scdbackup@gmx.net>
Coverity CID: 1008927
Sponsored by: EMC / Isilon Storage Division
2015-10-24 23:16:13 +00:00
Adrian Chadd
141a008498 arge(4): flip this on for AR9344 SoCs.
I couldn't test arge0->arge1 bridging, only arge0 VLAN bridging.
The DIR-825C1 only hooks up arge0 to the switch GMAC0 and so
you need to abuse VLANs to test.

Tested:

* DIR-825C1 (AR9344)
2015-10-24 22:37:59 +00:00
Enji Cooper
fc2b053656 Add more cd9660/FFS makefs testcases
General changes:
- Parameterize out the mount command.
- Use mtree to verify the contents of an image (check_image_contents) instead
  of using diff (diff verifies content, but not file metadata).
- Move common logic out to functions (common_cleanup, mount_image,
  check_image_contents)
- Add stub testcases for makefs -D (crashes with SIGBUS, similar to bug # 192839)
- Add a note about the ISO-9660 and rockridge specs
- Add testcases that exercise:
-- Creating disk images from an mtree and multiple directories.
-- -F flag use (not really an extensive testcase right now)

cd9660-specific test changes:

- Remove an XXX comment about symlinks; I forgot that non-rockridge images turn
  symlinks into hardlinks.
- Add testcases that exercise:
-- -o allow-deep-trees
-- -o allow-max-name stub testcase (doesn't seem to be implemented in makefs)
-- -o preparer (existence in image; not conformance to spec)
-- -o publisher (existence in image; not conformance to spec)
-- -o rockridge (basic)

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-10-24 22:12:23 +00:00
Enji Cooper
a71c657475 Make vers.c creation atomic by using a temporary file, then moving
the temporary file to vers.c at the end of the script

The previous logic wrote out to vers.c multiple times, so the file
could be incorrectly interpreted as being completely written out
after one of the echo calls with recursive make, when in reality it
was only partially written.

Also, in the event the build was interrupted when creating vers.c
(small race window), it would have a leftover file that needed to
be cleaned up before resuming the build.

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division
2015-10-24 21:59:58 +00:00
Konstantin Belousov
eac91e326a Reduce the amount of calls to VOP_BMAP() made from the local vnode
pager.  It is enough to execute VOP_BMAP() once to obtain both the
disk block address for the requested page, and the before/after limits
for the contiguous run.  The clipping of the vm_page_t array passed to
the vnode_pager_generic_getpages() and the disk address for the first
page in the clipped array can be deduced from the call results.

While there, remove some noise (like if (1) {...}) and adjust nearby
code.

Reviewed by:	alc
Discussed with:	glebius
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	3 weeks
2015-10-24 21:59:22 +00:00
Konstantin Belousov
af95bbf5bf Intel SDM before revision 56 described the CLFLUSH instruction as only
ordered with the MFENCE instruction.  Similar weak guarantees are also
specified by the AMD APM vol. 3 rev. 3.22.  x86 pmap methods
pmap_invalidate_cache_range() and pmap_invalidate_cache_pages() braced
CLFLUSH loop with MFENCE both before and after the loop.

In the revision 56 of SDM, Intel stated that all existing
implementations of CLFLUSH are strict, CLFLUSH instructions execution
is ordered WRT other CLFLUSH and writes.  Also, the strict behaviour
is made architectural.

A new instruction CLFLUSHOPT (which was documented for some time in
the Instruction Set Extensions Programming Reference) provides the
weak behaviour which was previously attributed to CLFLUSH.

Use CLFLUSHOPT when available.  When CLFLUSH is used on Intel CPUs, do
not execute MFENCE before and after the flushing loop.

Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
2015-10-24 21:37:47 +00:00
Ian Lepore
e6bbb5d227 Define a couple macros to access cacheline size/mask in an arch-dependent
way.  This code should now work for all arm versions v4 thru v7.
2015-10-24 21:27:09 +00:00
Ian Lepore
ce6ce41cac Provide armv4/v5 implementations of several of the armv6 cache maintenance
functions.  This will make it possible to use the same busdma code for all
arm platforms v4 thru v7.
2015-10-24 21:25:53 +00:00
Andriy Voskoboinyk
a0226b9f2d urtwn(4): fix mbuf leak in the TX path
Reviewed by:	kevlo
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D3988
2015-10-24 19:59:15 +00:00
Alexander Motin
5b355b1259 Skip reserved IP Broadcast handle from using. 2015-10-24 19:47:54 +00:00
Tai-hwa Liang
671b575901 - Plugging a memory leak when malloc() failed during initialisation;
- Plugging another memory leak inside the destructor.

Reviewed by:	matk
MFC after:	3 weeks
2015-10-24 19:40:03 +00:00
Ian Lepore
d818f2b6b9 Rename dcache_dma_preread() to dcache_inv_poc_dma() to make it clear that it
is a dcache invalidate to point of coherency just like dcache_inv_poc(), but
a slightly different version specific to dma operations.  Elaborate the
comment about how and why it's different.
2015-10-24 19:39:41 +00:00
Alexander Motin
18c74b2242 Add new field to Abort IOCB. 2015-10-24 19:38:06 +00:00
Conrad Meyer
ce7543042c xen: Add missing semi-colon for BITSET_DEFINE()
Broken when it was removed from the macro in r289867.

Pointy-hat:	markj
Sponsored by:	EMC / Isilon Storage Division
2015-10-24 19:04:55 +00:00
Alexander Motin
6af11b82c0 Add PIM_EXTLUNS support to isp(4) driver.
Now 24xx and above chips support full 8-byte LUN address space.
Older FC chips may support up to 16K LUNs when firmware allows.
Tested in both initiator and target modes for 23xx, 24xx and 25xx.
2015-10-24 17:34:40 +00:00
Alexander Motin
59f063d549 Give CTL support for PIM_EXTLUNS when talking to CAM.
CTL itself still lives in flat LUN space, but it can generate extended
numbers if CAM SIM reports such capability.
2015-10-24 17:24:19 +00:00
Baptiste Daroussin
c91d99bf1c newsyslog.conf: allow to configure the signal using the signal name.
Submitted by:	Alexandre Perrin <alex@kaworu.ch>
MFC after:	1 week
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D3961
2015-10-24 13:55:12 +00:00
Baptiste Daroussin
44a94685f3 timeout(1): fix the acceptable range values for parse_signal()
Before both 0 and sys_nsig would be successfully returned by parse_signal()
although being invalid signal numbers.

PR:		Alexandre Perrin <alex@kaworu.ch>
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D3990
2015-10-24 13:47:03 +00:00
Alexander Motin
385490cb81 Remove ISP_INTERNAL_TARGET code.
We have CTL now, which is real and much more functional then this joke.
2015-10-24 13:45:45 +00:00
Baptiste Daroussin
902b9f79f7 Fix some mdoc(7) issues
Obtained from:	DragonflyBSD
2015-10-24 13:43:10 +00:00
Alexander Motin
7846391fd7 Decode few more response info codes.
Though CAM still does not send any requests that would require those.
2015-10-24 10:01:04 +00:00
Michael Tuexen
2a95561f19 Bump date. Missed in r289873.
MFC after:	1 week
X-MFC with:	r289873
2015-10-24 09:41:43 +00:00
Michael Tuexen
1eaa568237 Add support to systat to display SCTP statistics.
MFC after: 1 week
2015-10-24 09:34:40 +00:00
Bryan Drewery
a1a3d6f4c1 Replace gcc reference with 'cc' and document the default ${CC}.
MFC after:	1 week
2015-10-24 05:16:30 +00:00
Bryan Drewery
8870ad3609 Sort properly.
MFC after:	1 week
X-MFC-With:	r289870
2015-10-24 05:00:20 +00:00
Bryan Drewery
ce3c9a36c5 Add bsd.crunchgen.mk to bsd.README.
MFC after:	1 week
2015-10-24 04:55:17 +00:00
Bryan Drewery
8758abd5b3 Slightly rework the comments and logic for default Clang/GCC.
This is because the previous version was very obscure about the fact
that despite having Clang "on by default" for architectures such as powerpc, it
does not actually build due to the GCC it uses not having C++11 support.
Using an external compiler that supports C++11 does allow this to work.
This whole block should be rethought more given "on by default" is not
really default without extra work which could actually be surprising for
why Clang is showing up when using a newer GCC.

Sponsored by:	EMC / Isilon Storage Division
2015-10-24 04:03:32 +00:00
Bryan Drewery
de606f83e0 Configs should not be under MK_INCLUDES control.
'buildconfig' is connected to 'all', but 'installconfig' is only called
manually.  There is not much need to conditionalize this file right
now due to how it is hooked up and its impact on various build phases.

Sponsored by:	EMC / Isilon Storage Division
2015-10-24 04:03:29 +00:00
Mark Johnston
c8fc1264a5 Remove an erroneous semicolon.
MFC after:	3 days
2015-10-24 03:16:40 +00:00
Mark Johnston
a4dc509f72 DWARF emitted by clang 3.7 encodes array sizes using the DW_AT_count
attribute rather than DW_AT_upper_bound. Teach ctfconvert about this so that
array type sizes are encoded correctly.

PR:		203772
MFC after:	1 week
2015-10-24 03:14:36 +00:00
Ian Lepore
872fb8b006 A few more whitespace, style, and comment cleanups. No functional changes. 2015-10-24 03:01:47 +00:00
Ian Lepore
5c738111f9 Bring in all the new(-ish) statistics code from armv6. 2015-10-24 02:44:13 +00:00
Andrey A. Chernov
b956b17696 Since no room left in the _flags, reuse __SALC for O_APPEND.
It helps to remove _fcntl() call from _ftello() and optimize seek position
calculation in _swrite().

MFC after:      3 weeks
2015-10-24 02:23:15 +00:00