Commit Graph

204592 Commits

Author SHA1 Message Date
Enji Cooper
0b0d825ad8 Replace references to /dev/acd0 with /dev/cd0
atapicd(4) was replaced by cd(4) with the atacam work done by
mav@ and then removed in r249083

X-MFC to: stable/10
MFC after: 2 weeks
2015-10-13 17:14:27 +00:00
Sean Bruno
24484ca4bf makefs(8) leaves sblock.fs_providersize uninitialized (zero) that can be easily
checked with dumpfs(8). This may lead to other problems, f.e. geom_label kernel
module sanity checks do not like zero fs_old_size value and skips such UFS1
file system while tasting (fs_old_size derives from sblock.fs_providersize).

PR:	203704
Submitted by:	eugen@grosbein.net
Reviewed by:	marcel
2015-10-13 17:00:14 +00:00
Dimitry Andric
4409569894 Add llvm patch corresponding to r289221. 2015-10-13 16:25:02 +00:00
Dimitry Andric
645bd50341 Pull in r250085 from upstream llvm trunk (by Andrea Di Biagio):
[x86] Fix wrong lowering of vsetcc nodes (PR25080).

  Function LowerVSETCC (in X86ISelLowering.cpp) worked under the wrong
  assumption that for non-AVX512 targets, the source type and destination type
  of a type-legalized setcc node were always the same type.

  This assumption was unfortunately incorrect; the type legalizer is not always
  able to promote the return type of a setcc to the same type as the first
  operand of a setcc.

  In the case of a vsetcc node, the legalizer firstly checks if the first input
  operand has a legal type. If so, then it promotes the return type of the vsetcc
  to that same type. Otherwise, the return type is promoted to the 'next legal
  type', which, for vectors of MVT::i1 is always a 128-bit integer vector type.

  Example (-mattr=+avx):

    %0 = trunc <8 x i32> %a to <8 x i23>
    %1 = icmp eq <8 x i23> %0, zeroinitializer

  The initial selection dag for the code above is:

  v8i1 = setcc t5, t7, seteq:ch
    t5: v8i23 = truncate t2
      t2: v8i32,ch = CopyFromReg t0, Register:v8i32 %vreg1
      t7: v8i32 = build_vector of all zeroes.

  The type legalizer would firstly check if 't5' has a legal type. If so, then it
  would reuse that same type to promote the return type of the setcc node.
  Unfortunately 't5' is of illegal type v8i23, and therefore it cannot be used to
  promote the return type of the setcc node. Consequently, the setcc return type
  is promoted to v8i16. Later on, 't5' is promoted to v8i32 thus leading to the
  following dag node:
    v8i16 = setcc t32, t25, seteq:ch

    where t32 and t25 are now values of type v8i32.

  Before this patch, function LowerVSETCC would have wrongly expanded the setcc
  to a single X86ISD::PCMPEQ. Surprisingly, ISel was still able to match an
  instruction. In our case, ISel would have matched a VPCMPEQWrr:
    t37: v8i16 = X86ISD::VPCMPEQWrr t36, t25

  However, t36 and t25 are both VR256, while the result type is instead of class
  VR128. This inconsistency ended up causing the insertion of COPY instructions
  like this:
    %vreg7<def> = COPY %vreg3; VR128:%vreg7 VR256:%vreg3

  Which is an invalid full copy (not a sub register copy).
  Eventually, the backend would have hit an UNREACHABLE "Cannot emit physreg copy
  instruction" in the attempt to expand the malformed pseudo COPY instructions.

  This patch fixes the problem adding the missing logic in LowerVSETCC to handle
  the corner case of a setcc with 128-bit return type and 256-bit operand type.

  This problem was originally reported by Dimitry as PR25080. It has been latent
  for a very long time. I have added the minimal reproducible from that bugzilla
  as test setcc-lowering.ll.

  Differential Revision: http://reviews.llvm.org/D13660

This should fix the "Cannot emit physreg copy instruction" errors when
compiling contrib/wpa/src/common/ieee802_11_common.c, and CPUTYPE is set
to a CPU supporting AVX (e.g. sandybridge, ivybridge).
2015-10-13 16:24:22 +00:00
Ed Maste
a8f2a2b926 Rewrap UPDATING entry from r265422 to 80 columns 2015-10-13 12:51:44 +00:00
Alexander Motin
e596ff7a1f Export bunch of state variables as sysctls. 2015-10-13 11:02:56 +00:00
Conrad Meyer
fd95aefd77 NTB: Style(9) cleanups 2015-10-13 03:12:55 +00:00
Conrad Meyer
59cf83b813 NTB: MFV 948d3a65: Xeon Errata Workaround
There is a Xeon hardware errata related to writes to SDOORBELL or B2BDOORBELL
in conjunction with inbound access to NTB MMIO Space, which may hang the
system.  To workaround this issue, use one of the memory windows to access the
interrupt and scratch pad registers on the remote system.  This bypasses the
issue, but removes one of the memory windows from use by the transport.  This
reduction of MWs necessitates adding some logic to determine the number of
available MWs.

Since some NTB usage methodologies may have unidirectional traffic, the ability
to disable the workaround via modparm has been added.

See BF113 in
http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/xeon-c5500-c3500-spec-update.pdf
See BT119 in
http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/xeon-e5-family-spec-update.pdf

Authored by:	Jon Mason
Obtained from:	Linux
Sponsored by:	EMC / Isilon Storage Division
2015-10-13 03:12:11 +00:00
Conrad Meyer
902362c988 NTB: Add hw.ntb sysctl node 2015-10-13 03:11:21 +00:00
Conrad Meyer
f74e1ad354 NTB: MFV b6750cfe: Correct USD/DSD Identification
Due to ambiguous documentation, the USD/DSD identification is backward
when compared to the setting in BIOS.  Correct the bits to match the
BIOS setting.

Authored by:	Jon Mason
Obtained from:	Linux
Sponsored by:	EMC / Isilon Storage Division
2015-10-13 03:10:36 +00:00
Conrad Meyer
7a97964b79 NTB: MFV 87034511: Correct Number of Scratch Pad Registers
The NTB Xeon hardware has 16 scratch pad registers and 16 back-to-back
scratch pad registers.  Correct the #define to represent this and update
the variable names to reflect their usage.

Authored by:	Jon Mason
Obtained from:	Linux
Sponsored by:	EMC / Isilon Storage Division
2015-10-13 03:10:04 +00:00
Adrian Chadd
4052b8bc34 casperd: bump default socket queue length to SOMAXCONN; make length configurable.
The current default listen queue for casperd is too small (8) and
hard-coded.

This patch increases the default to SOMAXCONN, and introduces a command
line flag that can used to further increase or decrease the queue length.

PR:		bin/202147
Submitted by:	<lidl@pix.net>
2015-10-13 02:34:41 +00:00
Adrian Chadd
a08b904c5e makefs: introduce a new option to specify what to round the resulting
image up to.

From ticket:

While trying to run FreeBSD/mips on some device having very small flash media,
one is forced to compress file system with mkulzma(8) utility. It is desirable
to specify small UFS block/fragment sizes like 4096/512 bytes for makefs(8)
and big compression block size like 65535 bytes to mkulzma at the same time.
Then one obtains very good comression ratios (like 75% and more) but faces
the following problem.

geom_uncompress kernel module reports GEOM provider size rounded up to its
compression block size. Generally, this changes original media size and now
it fails to match the size of embedded UFS file system that leads to other
problems, f.e. geom_label kernel module does not like this and skips the
file system while tasting the GEOM and looking for UFS label.

This makes it impossible to refer to the file system using known UFS label
instead of something like /dev/map/rootfs.uncompress.

The following patch introduces new command line option "-r roundup" for makefs
that makes it round up the image to specified block size. Hence, geom_uncompress
does not change GEOM media size for images rounded that way and geom_label
accepts such GEOMs just fine.

With the patch applied, one can use following commands:

$ makefs -t ffs -r 65536 -o bsize=4096,fsize=512,label=flash optimization=space fs.img fs
$ mkulzma -s 65536 -o fs.img.ulzma fs.img

PR:		bin/203707
Submitted by:	<eugen@grosbein.net>
2015-10-13 02:32:15 +00:00
Jason A. Harmening
dcaa560af0 Ensure the client regions for unmapped bounce buffers created through bus_dmamap_load_phys() do not span multiple pages.
This is already done for mapped buffers.
While here, stop casting bus_addr_t to vm_offset_t.
2015-10-13 02:17:56 +00:00
Navdeep Parhar
ca7c0f2e2d iw_cxgbe: MPA v2 is always available.
Submitted by:	Krishnamraju Eraparaju at chelsio dot com
Reviewed by:	Steve Wise at opengridcomputing dot com
2015-10-13 01:04:38 +00:00
Peter Wemm
ff446b05f1 If world is built with a custom sendmail.cf, use it for the distribution
target.  This is the feeder for mergemaster / etcupdate.  This change
makes installworld/mergemaster/etcupdate behave the same regardless of
whether SENDMAIL_MC or SENDMAIL_CF is used.

If you use a custom SENDMAIL_MC/CF in make.conf and excluded it from
mergemaster.rc/etcupdate.conf to work around the conflicts, you may wish
to revert that or change it from 'ignore' to 'always install'.

If you do not use a custom SENDMAIL_MC/CF, there should be no change in
behavior.
2015-10-12 21:02:36 +00:00
David C Somayajulu
56c55e6513 Add support for reading device temperature
MFC after:5 days
2015-10-12 20:21:17 +00:00
Enji Cooper
59e2ff550c Integrate the tests from lib/libarchive, usr.bin/cpio, and usr.bin/tar in to
the FreeBSD test suite

functional_test.sh was ported from bin/sh/tests/functional_test.sh, as a
small wrapper around libarchive_test, bsdcpio_test, and bsdtar_test provided
by upstream.

A handful of testcases in lib/libarchive/tests have been disabled as they
were failing when run with kyua test (see BROKEN_TESTS in
lib/libarchive/tests/Makefile)

As a sidenote: this removes the check/test targets from the Makefiles as they
don't match the pattern used in the rest of the FreeBSD test suite.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-10-12 18:31:21 +00:00
Alexander Motin
2269f420b2 FreeBSD-specific addition to r289191. 2015-10-12 18:15:25 +00:00
Alexander Motin
fea4f2108f MFV r289188: 6281 prefetching should apply to 1MB reads
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Alexander Motin <mav@freebsd.org>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Justin Gibbs <gibbs@scsiguy.com>
Reviewed by: Xin Li <delphij@freebsd.org>
Approved by: Gordon Ross <gordon.ross@nexenta.com>
Author: George Wilson <george.wilson@delphix.com>

illumos/illumos-gate@632802744e
2015-10-12 15:48:45 +00:00
Alexander Motin
558dcd4e42 MFV r289187: 6251 add tunable to disable free_bpobj processing
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Simon Klinkert <simon.klinkert@gmail.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed by: Albert Lee <trisk@omniti.com>
Reviewed by: Xin Li <delphij@freebsd.org>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: George Wilson <george.wilson@delphix.com>

illumos/illumos-gate@139510fb6e
2015-10-12 15:44:44 +00:00
Alexander Motin
72b6ad9bb5 MFV r289185: 6250 zvol_dump_init() can hold txg open
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Albert Lee <trisk@omniti.com>
Reviewed by: Xin Li <delphij@freebsd.org>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: George Wilson <george.wilson@delphix.com>

illumos/illumos-gate@b10bba7246
2015-10-12 15:39:03 +00:00
Ed Maste
b54cfe0ae9 Add missing commas
Pointy hat to:	kan
Obtained from:	ELF Tool Chain r3253
2015-10-12 15:35:34 +00:00
Alexander Motin
ebdbbfb3b5 6281 prefetching should apply to 1MB reads
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Alexander Motin <mav@freebsd.org>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Justin Gibbs <gibbs@scsiguy.com>
Reviewed by: Xin Li <delphij@freebsd.org>
Approved by: Gordon Ross <gordon.ross@nexenta.com>
Author: George Wilson <george.wilson@delphix.com>

illumos/illumos-gate@632802744e
2015-10-12 14:27:27 +00:00
Alexander Motin
f9e9551e6b 6251 add tunable to disable free_bpobj processing
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Simon Klinkert <simon.klinkert@gmail.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed by: Albert Lee <trisk@omniti.com>
Reviewed by: Xin Li <delphij@freebsd.org>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: George Wilson <george.wilson@delphix.com>

illumos/illumos-gate@139510fb6e
2015-10-12 14:24:11 +00:00
Eric van Gyzen
b7359cb33c Fix indentation in etc/rc.d/fsck.
MFC after:	3 days
Sponsored by:	Dell Inc.
2015-10-12 14:23:10 +00:00
Alexander Motin
1138983b22 6250 zvol_dump_init() can hold txg open
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Albert Lee <trisk@omniti.com>
Reviewed by: Xin Li <delphij@freebsd.org>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: George Wilson <george.wilson@delphix.com>

illumos/illumos-gate@b10bba7246
2015-10-12 14:23:00 +00:00
Peter Wemm
af80ed6add Update from svn-1.8.14 to 1.9.2.
Formal release notes are available:
  https://subversion.apache.org/docs/release-notes/1.9.html

Of particular note, the client checkout format has *not* changed so
upgrades should *not* be required.

When reading a repository (file:// or running as a local server), an
improved fsfs version 7 is available with significant performance
improvements.  An optional upgrade is possible to use the new features.
Without the upgrade, this is fully read/write compatible with the
version 6 fsfs as in svn-1.8.

Relnotes:	yes
2015-10-12 09:53:55 +00:00
Peter Wemm
dc5d469d65 Vendor import of subversion-1.9.2 2015-10-12 08:54:49 +00:00
Kevin Lo
dc82802918 Accept any correct frames from any source when MONITOR mode is used.
Submitted by:	Andriy Voskoboinyk <s3erios at gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3812
2015-10-12 08:17:21 +00:00
Enji Cooper
b2d48be1bc Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and
netbsd-tests.test.mk (r289151)

- Eliminate explicit OBJTOP/SRCTOP setting
- Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk
- Remove unnecessary TESTSDIR setting
- Use SRCTOP where possible for clarity

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Divison
2015-10-12 08:16:03 +00:00
Adrian Chadd
4f4a7a03ce net80211 drivers: eliminate any references to sc_rxtap_len/sc_txtap_len (never used here)
Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3776
2015-10-12 05:21:51 +00:00
Adrian Chadd
c0658ced70 urtwn(4): split *reg and *var parts (no functional change).
Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3775
2015-10-12 05:14:49 +00:00
Adrian Chadd
d957a93abe net80211: move ieee80211_free_node() call on error from ic_raw_xmit() to ieee80211_raw_output().
This doesn't free the mbuf upon error; the driver ic_raw_xmit method is still
doing that.

Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3774
2015-10-12 04:55:20 +00:00
Adrian Chadd
d3a4ade3b8 net80211: free node reference in the ieee80211_parent_xmitpkt() when error happened.
Move error handling into ieee80211_parent_xmitpkt() instead of spreading it
between functions.

Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3772
2015-10-12 04:30:38 +00:00
Adrian Chadd
940aa8080c wpi(4): add support for TX fragmentation.
Tested:

* Tested with Intel 3945BG, HOSTAP and STA modes

Differential Revision:	https://reviews.freebsd.org/D3770
2015-10-12 04:05:12 +00:00
Adrian Chadd
d07be335a0 net80211: separate mbuf cleanup from ieee80211_fragment()
* Create ieee80211_free_mbuf() which frees a list of mbufs.
* Use it in the fragment transmit path and ath / uath transmit paths.
* Call it in xmit_pkt() if the transmission fails; otherwise fragments
  may be leaked.

This should be a big no-op.

Submitted by:	<s3erios@gmail.com>
Differential Revision:	https://reviews.freebsd.org/D3769
2015-10-12 03:27:08 +00:00
Pedro F. Giffuni
5668d203ed Revert r289150:
Correct handling of enum attributes with g++

It is causing issues on some platforms.

Reported by:	sbruno (through adrian)
2015-10-12 02:05:25 +00:00
Jilles Tjoelker
8ef0ae8a8f sh: Make struct arglist an array instead of a linked list.
This simplifies the code (e.g. allowing use of qsort(3) instead of a
hand-rolled mergesort) and should have better cache properties.

The waste of unused args arrays after resizes is approximately the same as
the savings from getting rid of the next pointers.

At the same time, remove a piece of global state and move some duplicated
code into a function.
2015-10-11 21:33:00 +00:00
Enji Cooper
da3110ed56 Default TESTSDIR to /usr/tests/${RELDIR:H}
When run from bin/ls/tests, for example, the value of TESTSDIR would be
${TESTSBASE}/${RELDIR:H} -> /usr/tests/bin/ls/tests/.. ->
/usr/tests/bin/ls

Document the new behavior in bsd.README.

While here, also document TESTSBASE

Relnotes: yes
Differential Revision: D1022
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-10-11 21:29:24 +00:00
Conrad Meyer
ae92db9ed6 NTB: MFV c336acd3: memcpy lockup workaround
The system will appear to lockup for long periods of time due to the NTB
driver spending too much time in memcpy.  Avoid this by reducing the
number of packets that can be serviced on a given interrupt.

Authored by:	Jon Mason
Obtained from:	Linux
Sponsored by:	EMC / Isilon Storage Division
2015-10-11 21:01:14 +00:00
Conrad Meyer
7ee9e4bc6e NTB: MFV c9d534c8: Correctly handle receive buffers of the minimal size
The ring logic of the NTB receive buffer/transmit memory window requires
there to be at least 2 payload sized allotments.  For the minimal size
case, split the buffer into two and set the transport_mtu to the
appropriate size.

Authored by:	Jon Mason
Obtained from:	Linux
Sponsored by:	EMC / Isilon Storage Division
2015-10-11 21:00:19 +00:00
Conrad Meyer
a30525bf65 NTB: MFV 90f9e934: reset tx_index on link toggle
If the NTB link toggles, the driver could stop receiving due to the
tx_index not being set to 0 on the transmitting size on a link-up event.
This is due to the driver expecting the incoming data to start at the
beginning of the receive buffer and not at a random place.

Authored by:	Jon Mason
Obtained from:	Linux
Sponsored by:	EMC / Isilon Storage Division
2015-10-11 20:59:40 +00:00
Conrad Meyer
0125f2c1af NTB: MFV b77b2637: Link toggle memory leak
Each link-up will allocate a new NTB receive buffer when the NTB
properties are negotiated with the remote system.  These allocations did
not check for existing buffers and thus did not free them.  Now, the
driver will check for an existing buffer and free it if not of the
correct size, before trying to alloc a new one.

Authored by:	Jon Mason
Obtained from:	Linux
Sponsored by:	EMC / Isilon Storage Division
2015-10-11 20:59:02 +00:00
Conrad Meyer
92bbfa507c NTB: MFV 113fc505: Handle 64bit BAR sizes
64bit BAR sizes are permissible with an NTB device.  To support them
various modifications and clean-ups were required, most significantly
using 2 32bit scratch pad registers for each BAR.

Also, modify the driver to allow more than 2 Memory Windows.

Authored by:	Jon Mason
Obtained from:	Linux
Sponsored by:	EMC / Isilon Storage Division
2015-10-11 20:58:00 +00:00
Conrad Meyer
262d9f674f NTB: MFV cc0f868d: fix pointer math issues
->remote_rx_info and ->rx_info are struct ntb_rx_info pointers.  If we
add sizeof(struct ntb_rx_info) then it goes too far.

Authored by:	Dan Carpenter
Obtained from:	Linux
Sponsored by:	EMC / Isilon Storage Division
2015-10-11 20:57:09 +00:00
Enji Cooper
dfff069863 Simplify netbsd-tests.test.mk
- projects/bmake and subsequent commits provide SRCTOP; there's no need to
  manually specify it now.
- Compute a sane default for OBJTOP based on .OBJDIR and RELDIR. Manually
  specifying this is probably no longer needed, but it persists just in case
  (supporting commits will need to be made to move it out of some of the meta
  .mk files).
- Compute a sane default for TESTSRC. Error out if the path cannot be found.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-10-11 20:02:10 +00:00
Pedro F. Giffuni
e277c15f54 Correct handling of enum attributes with g++
From OpenBSD's commit log:

This was responsible for memory corruption with recent versions
of Mesa where c and c++ code share a header with a packed enum type.

Reference:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39219

Obtained from:	OpenBSD (CVS rev. 1.2)
MFC after:	1 week
2015-10-11 19:58:57 +00:00
Baptiste Daroussin
f98f68bd50 Use existing CONFDIR instead of adding a new CONFIGDIR
Reported by:	jbeich
2015-10-11 19:25:39 +00:00
Sean Bruno
88a1a27261 Correct flash layout (this is a 4M flash unit).
Remove "rootfs" entry and assign the 800K or so to the kernel
partition as this unit boots from usb mass storage.
2015-10-11 18:37:29 +00:00