Commit Graph

188410 Commits

Author SHA1 Message Date
Attilio Rao
3198603edd Fix comments.
Sponsored by:	EMC / Isilon Storage Division
2014-03-19 12:45:40 +00:00
Konstantin Belousov
88b124cede Make the array pointed to by AT_PAGESIZES auxv properly aligned.
Also, remove the expression which calculated the location of the
strings for a new image and grown over the time to be
non-comprehensible.  Instead, calculate the offsets by steps, which
also makes fixing the alignments much cleaner.

Reported and reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-03-19 12:35:04 +00:00
Julio Merino
8d08c1118c Add Makefiles missed in r263346.
Grrr, I wish svn clearly displayed files not yet added when about to commit.
2014-03-19 12:32:50 +00:00
Julio Merino
d525bcd959 Migrate tools/regression/usr.bin/make/ to the new tests layout.
Note that these tests are for fmake, not bmake, and thus they are not
installed nor run when bmake is selected (the default).  Yes, I have
wasted a *ton* of time on moving tests for no real reason other than
ensuring they are not left behind.

But maybe, just maybe, it was not work in vain: the majority of these
tests also work with bmake and the few that don't may point at broken
stuff.  For example, the tests for the "archive" feature do not work
with bmake, but bmake's manpage and source tree seem to imply that they
should.  So... to be investigated later; need to poke sjg@.
2014-03-19 12:29:20 +00:00
Julio Merino
f743627b41 Expand tabs that sneaked in into spaces.
Problem introduced by r263227.  Spotted by Alan Somers.
2014-03-19 12:06:51 +00:00
Peter Holm
a31faec3d1 Added sysctl kern.maxfiles increase test, do not use /etc/passwd for tests
and use volatile sig_atomic_t for signal handler variable.

Reviewed by:	 asomers (previous version)
Sponsored by:	EMC / Isilon storage division
2014-03-19 09:41:12 +00:00
Gleb Smirnoff
2d70c0ded1 When exporting ifnet via sysctl, add ifqueue(9) drop count to the
ifi_oqdrops. This is a temporary workaround until ifqueue(9) vanishes.

While here, remove the pointless ifi_vhid assignment. It has
sense only when we are exporting ifaddrs, not ifnets.

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2014-03-19 06:08:03 +00:00
Gleb Smirnoff
d7ac87d3a3 Add counter for Tx errors returned from if_transmit.
Submitted-by:	Boris Misenov <Boris.Misenov@oktetlabs.ru>
Sponsored by:	Solarflare Communications, Inc.
2014-03-19 06:03:26 +00:00
Gleb Smirnoff
55fb7d688b Now, after r263102 we have ifi_oqdrops in if_data, restore printing of
output queue drops in netstat(1).

No driver, neither kernel fills this field in if_data, yet.

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2014-03-19 03:33:32 +00:00
Mark Johnston
3e0ba3a163 Only invoke fasttrap hooks for traps from user mode, and ensure that they're
called with interrupts enabled. Calling fasttrap_pid_probe() with interrupts
disabled can lead to deadlock if fasttrap writes to the process' address
space.

Reviewed by:	rpaulo
MFC after:	3 weeks
2014-03-19 01:27:56 +00:00
Attilio Rao
0d8243cc34 vm_page_grab() and vm_pager_get_pages() can drop the vm_object lock,
then threads can sleep on the pip condition.
Avoid to deadlock such threads by correctly awakening the sleeping ones
after the pip is finished.
swapoff side of the bug can likely result in shutdown deadlocks.

Sponsored by:	EMC / Isilon Storage Division
Reported by:	pho, pluknet
Tested by:	pho
2014-03-19 01:13:42 +00:00
Attilio Rao
c149e542a5 Fix GENERIC build. 2014-03-19 00:38:27 +00:00
Marcel Moolenaar
ac5c8b7c5b Fix and improve exception tracing:
1.  Name the kernel option XTRACE instead of EXCEPTION_TRACING
2.  Put support functions in ia64/ia64/xtrace.c
3.  Make it work with SMP by giving each CPU its own buffer
4.  Save 16 key registers in the buffer for every exception
5.  In ia64_handle_intr() and trap() transfer the trace record
    to the KTR trace buffer using CTRx() and with some basic
    information for now
6.  Use a tunable to anble tracing and stop tracing as soon as
    we enter the debugger

Room for improvements:
1.  Transferring exception-relevant information to KTR
2.  Add a sysctl to enable/disable tracing
2014-03-18 23:51:34 +00:00
Tycho Nightingale
4feac03f2c Don't reissue in-flight commands.
Approved by:	neel (co-mentor)
2014-03-18 23:25:35 +00:00
Aleksandr Rybalko
b3ea9d99ed Switch kern.vt.suspendswitch to 0 by default (disabled).
kern.vt.suspendswitch - sysctl/tunable which enable switch to VT0 before going
to suspend and switch back after resume.

MFC after:	7 days
2014-03-18 22:22:47 +00:00
Dimitry Andric
a1f8ad145e Add separate patch files for all the customizations we have currently
applied to our copy of llvm/clang.  These can be applied in alphabetical
order to a pristine llvm/clang 3.4 release source tree, to result in the
same version used in FreeBSD.

This is intended to clearly document all the changes until now, which
mostly consist of cherry pickings from the respective upstream trunks,
plus a number of hand-written FreeBSD-specific ones.  Hopefully those
can eventually be cleaned up and sent upstream too.

MFC after:	1 week
X-MFC-With:	r263313
2014-03-18 22:07:45 +00:00
Attilio Rao
4f11a684ff Regen per r263318.
Sponsored by:	EMC / Isilon storage division
2014-03-18 21:34:11 +00:00
Attilio Rao
ce42e79310 Remove dead code from umtx support:
- Retire long time unused (basically always unused) sys__umtx_lock()
  and sys__umtx_unlock() syscalls
- struct umtx and their supporting definitions
- UMUTEX_ERROR_CHECK flag
- Retire UMTX_OP_LOCK/UMTX_OP_UNLOCK from _umtx_op() syscall

__FreeBSD_version is not bumped yet because it is expected that further
breakages to the umtx interface will follow up in the next days.
However there will be a final bump when necessary.

Sponsored by:	EMC / Isilon storage division
Reviewed by:	jhb
2014-03-18 21:32:03 +00:00
Navdeep Parhar
38035ed6dc cxgbe(4): significant rx rework.
- More flexible cluster size selection, including the ability to fall
  back to a safe cluster size (PAGE_SIZE from zone_jumbop by default) in
  case an allocation of a larger size fails.
- A single get_fl_payload() function that assembles the payload into an
  mbuf chain for any kind of freelist.  This replaces two variants: one
  for freelists with buffer packing enabled and another for those without.
- Buffer packing with any sized cluster.  It was limited to 4K clusters
  only before this change.
- Enable buffer packing for TOE rx queues as well.
- Statistics and tunables to go with all these changes.  The driver's
  man page will be updated separately.

MFC after:	5 weeks
2014-03-18 20:14:13 +00:00
Dimitry Andric
3ca4ead75d Pull in r203311 from upstream llvm trunk (by Arnold Schwaighofer):
ISel: Make VSELECT selection terminate in cases where the condition type has to
  be split and the result type widened.

  When the condition of a vselect has to be split it makes no sense widening the
  vselect and thereby widening the condition. We end up in an endless loop of
  widening (vselect result type) and splitting (condition mask type) doing this.
  Instead, split both the condition and the vselect and widen the result.

  I ran this over the test suite with i686 and mattr=+sse and saw no regressions.

  Fixes PR18036.

With this fix the original problem case from the graphics/rawtherapee
port (posted in http://llvm.org/PR18036 ) now compiles within ~97MB RSS.

Reported by:	mandree
MFC after:	1 week
2014-03-18 19:35:26 +00:00
Dimitry Andric
4f00c8c645 Pull in r196939 from upstream llvm trunk (by Reid Kleckner):
Reland "Fix miscompile of MS inline assembly with stack realignment"

  This re-lands commit r196876, which was reverted in r196879.

  The tests have been fixed to pass on platforms with a stack alignment
  larger than 4.

  Update to clang side tests will land shortly.

Pull in r196986 from upstream llvm trunk (by Reid Kleckner):

  Revert the backend fatal error from r196939

  The combination of inline asm, stack realignment, and dynamic allocas
  turns out to be too common to reject out of hand.

  ASan inserts empy inline asm fragments and uses aligned allocas.
  Compiling any trivial function containing a dynamic alloca with ASan is
  enough to trigger the check.

  XFAIL the test cases that would be miscompiled and add one that uses the
  relevant functionality.

Pull in r202930 from upstream llvm trunk (by Hans Wennborg):

  Check for dynamic allocas and inline asm that clobbers sp before building
  selection dag (PR19012)

  In X86SelectionDagInfo::EmitTargetCodeForMemcpy we check with MachineFrameInfo
  to make sure that ESI isn't used as a base pointer register before we choose to
  emit rep movs (which clobbers esi).

  The problem is that MachineFrameInfo wouldn't know about dynamic allocas or
  inline asm that clobbers the stack pointer until SelectionDAGBuilder has
  encountered them.

  This patch fixes the problem by checking for such things when building the
  FunctionLoweringInfo.

  Differential Revision: http://llvm-reviews.chandlerc.com/D2954

Together, these commits fix the problem encountered in the devel/emacs
port on the i386 architecture, where a combination of stack realignment,
alloca() and memcpy() could incidentally clobber the %esi register,
leading to segfaults in the temacs build-time utility.

See also: http://llvm.org/PR18171 and http://llvm.org/PR19012

Reported by:	ashish
PR:		ports/183064
MFC after:	1 week
2014-03-18 19:23:41 +00:00
Jim Harris
f42ca756b9 nvme: Allocate all MSI resources up front so that we can fall back to
INTx if necessary.

Sponsored by:	Intel
MFC after:	3 days
2014-03-18 18:10:35 +00:00
Jim Harris
496a27520d nvme: Close hole where nvd(4) would not be notified of all nvme(4)
instances if modules loaded during boot.

Sponsored by:	Intel
MFC after:	3 days
2014-03-18 18:09:08 +00:00
Ed Maste
f9d9faeb8e Switch to standard 2-clause license
Approved by:	hps@
Sponsored by:	The FreeBSD Foundation
2014-03-18 17:00:32 +00:00
Konstantin Belousov
9d0bc6d88f Add support for the PCI(e)-PCI bridges to the Intel VT-d driver. The
bridge takes ownership of the transaction, so bsf of the requester is
the bridge and not a device behind it.  As result, code needs to walk
the hierarchy up to use correct context.

Note that PCIe->PCI-X bridges are not handled quite correctly since
such bridges are allowed to only take ownership of some transactions.
Also, weird but unrealistic cases of PCIe behind PCI bus are also not
handled.

Still, the patch provides significant step forward for the bridge
handling.

Submitted by:	Jason Harmening <jason.harmening@gmail.com>
MFC after:	1 week
2014-03-18 16:41:32 +00:00
Konstantin Belousov
e02b05b39e It is not uncommon for BIOSes to report wrong RMRR entries in DMAR
table.  Among them, some (old AMI ?) BIOSes report entries with range
like (bf7ec000, bf7ebfff).  Attempts to ignore the bogus entries
result in faults, so the range must be covered somehow.

Provide a workaround by identity mapping the 32 pages after the bogus
entry start, which seems to be enough for the reported BIOS.

Reported and tested by:	Jason Harmening <jason.harmening@gmail.com>
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-03-18 16:20:33 +00:00
Konstantin Belousov
e8c5884213 Trim at EOL.
MFC after:	3 days
2014-03-18 15:59:06 +00:00
Jim Harris
8f3616caca Update nvme(4) and nvd(4) man pages to clarify the differences between
their respective device nodes.

Sponsored by:	Intel
MFC after:	3 days
2014-03-18 15:43:42 +00:00
George V. Neville-Neil
10d0bdca87 fix mbuf leak if it does not fit in software queue
mbuf should be owned by if_transmit function in any case.

Submitted-by:   Andrew Rybchenko <Andrew.Rybchenko at oktetlabs.ru>
Sponsored by:   Solarflare Communications, Inc.
2014-03-18 15:01:32 +00:00
Warner Losh
d4f95c889d In kernel config files, it is supposed to be 'options<space><tab>' not
'options<tab><tab>', per long standing (but recently not so strictly
enforced) convention.
2014-03-18 14:41:18 +00:00
Ed Maste
f1261466a0 Use standard FreeBSD license disclaimer
The original was accidentally copied from a NetBSD Foundation copyright
block.

Sponsored by:	The FreeBSD Foundation
2014-03-18 13:47:27 +00:00
Gleb Smirnoff
91350e5cd6 Return error when packet is dropped because of link down.
Submitted-by:	Boris Misenov <Boris.Misenov@oktetlabs.ru>
Sponsored by:	Solarflare Communications, Inc.
2014-03-18 12:50:22 +00:00
Adrian Chadd
86ac3134cd Extend the Atheros SoC support to include a method to enable/disable
the NAND flash controller.

Add the AR934x NAND flash controller reset routines.
(It's different on subsequent SoCs.)

Tested:

* AR9344, Atheros DB120 reference platform

Obtained from:	OpenWRT
2014-03-18 12:19:39 +00:00
Adrian Chadd
8ae440511d Add the AR934x NAND flash controller register definitions.
Obtained from:	OpenWRT
2014-03-18 12:18:35 +00:00
Hans Petter Selasky
62b91c7309 Add missing usfs manual page.
Suggested by:	Sascha Wildner <swildner@gmail.com>
MFC after:	1 week
2014-03-18 07:06:31 +00:00
Hans Petter Selasky
c742af04c4 Add missing umoscom manual page.
Suggested by:	Sascha Wildner <swildner@gmail.com>
MFC after:	1 week
2014-03-18 06:52:11 +00:00
Hans Petter Selasky
f50403d5b7 Correctly name USB template manual page and install it by default.
Suggested by:	Sascha Wildner <swildner@gmail.com>
MFC after:	1 week
2014-03-18 06:43:21 +00:00
Hans Petter Selasky
3a1d981606 Update USB template manual page.
MFC after:	1 week
2014-03-18 06:41:17 +00:00
Neel Natu
22d822c6b0 When a vcpu is deactivated it must also unblock any rendezvous that may be
blocked on it.

This is done by issuing a wakeup after clearing the 'vcpuid' from 'active_cpus'.
Also, use CPU_CLR_ATOMIC() to guarantee visibility of the updated 'active_cpus'
across all host cpus.
2014-03-18 02:49:28 +00:00
Ed Maste
0fcefb433d Update NetBSD Foundation copyrights to 2-clause BSD
The NetBSD Foundation states "Third parties are encouraged to change the
license on any files which have a 4-clause license contributed to the
NetBSD Foundation to a 2-clause license."

This change removes clauses 3 and 4 from copyright / license blocks that
list The NetBSD Foundation as the only copyright holder.

Sponsored by:	The FreeBSD Foundation
2014-03-18 01:40:25 +00:00
Bryan Drewery
8999b96521 Remove comment meant for removal in r263287
X-MFC-with:	263287
2014-03-18 01:17:08 +00:00
Bryan Drewery
fa19cd5ca7 'pkg(8) add' has no internal restriction on number of packages.
Submitted by:	tj
MFC after:	1 week
2014-03-18 01:14:49 +00:00
Neel Natu
970955e479 Notify vcpus participating in the rendezvous of the pending event to ensure
that they execute the rendezvous function as soon as possible.
2014-03-17 23:30:38 +00:00
Adrian Chadd
22d0785fde Implement apb_print_child().
Tested:

* AR9344, Atheros DB120 Reference board
2014-03-17 23:21:31 +00:00
Jim Harris
1416ef361e nvme: NVMe specification dictates 4-byte alignment for PRPs (not 8).
Sponsored by:	Intel
MFC after:	3 days
2014-03-17 22:37:17 +00:00
Jim Harris
2b26030cbc nvme: Remove the software progress marker SET_FEATURE command during
controller initialization.

The spec says OS drivers should send this command after controller
initialization completes successfully, but other NVMe OS drivers are
not sending this command.  This change will therefore reduce differences
between the FreeBSD and other OS drivers.

Sponsored by:	Intel
MFC after:	3 days
2014-03-17 22:36:04 +00:00
Jim Harris
5d16b89793 Base the max number of SG elements on MAXPHYS.
Sponsored by:	Intel
Discussed with:	scottl, emax
MFC after:	3 days
2014-03-17 22:32:54 +00:00
Jim Harris
5c300060a8 isci: Ensure ATA passthrough commands with RETURN_RESPONSE bit set
translate their response.

Sponsored by:	Intel
Discussed with:	scottl
MFC after:	3 days
2014-03-17 22:30:54 +00:00
Alan Somers
c676e6694e share/man/man9/counter.9
Fix logic error in the description of counter_u64_alloc: the command
	may fail only if M_NOWAIT is specified, not M_WAITOK.

Reviewed by:	glebius
MFC after:	2 weeks
Sponsored by:	Spectra Logic Corporation
2014-03-17 19:55:27 +00:00
Roger Pau Monné
86af13e28b xen: fix usage of db_active in xen console
Replace usage of db_active in Xen console with kdb_active.

Reported by: Andrzej Tobola <ato@iem.pw.edu.pl>
Approved by: gibbs
Sponsored by: Citrix Systems R&D
2014-03-17 16:45:28 +00:00