Commit Graph

97374 Commits

Author SHA1 Message Date
Warner Losh
f79309d29c Remove vestiges of knowing the ISA bus, which we gave up on around 20
years ago. Remove redunant copy of isaregs.h.
2014-03-19 21:03:04 +00:00
Warner Losh
e5d7b3ce52 Revert last change, it breaks other things. 2014-03-19 20:40:57 +00:00
Warner Losh
1afb8884a7 Remove redunant declaration. gcc complains while clang doesn't. 2014-03-19 17:53:09 +00:00
Julio Merino
b6d88aa39b Include strings.h so that bpf_filter.c can be built in userland.
This is to bring in a definition for bzero(3), which in turn allows the
tests in tools/regression/bpf/ to build again.
2014-03-19 13:10:25 +00:00
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
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
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
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
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
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
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
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
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
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
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
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
Ian Lepore
796e9260a7 Cosmetic changes to printed output, mostly related to probing devices...
- Display slice and partition as <auto> instead of 0 or -1 when they're
   not set to specific values (the paritition=-1 was confusing folks).
 - When loaderdev isn't set in the u-boot environment, say so rather
   than displaying unknown device ''.
 - Print the loader(8) ident/version info earlier, so that all device-
   related info appears together afterwards.

The one change here that isn't purely cosmetic is to call setheap()
earlier.  The comment says "Initialise heap as early as possible", now
that's more accurate.  It shouldn't make any functional difference, but
may be safer if future changes lead to trying to allocate memory earlier.
2014-03-17 16:10:42 +00:00
Ian Lepore
4f4ee43a1b Fix the paren nesting so that the network device is probed if the load
device type is either network or wildcard.
2014-03-17 13:54:53 +00:00
Hans Petter Selasky
ed25d0e833 Fix spelling.
Reported by:	Kevin P. Neal <kpneal@pobox.com>
2014-03-17 07:19:19 +00:00
Bryan Venteicher
e557c1dd90 Add Tx/Rx multiqueue support to vmx(4)
As a prerequisite for multiple queues, the guest must have MSIX enabled.
Unfortunately, to work around device passthrough bugs, FreeBSD disables
MSIX when running as a VMWare guest due to the hw.pci.honor_msi_blacklist
tunable; this tunable must be disabled for multiple queues.

Also included is various minor changes from the projects/vmxnet branch.

MFC after:	1 month
2014-03-17 05:45:29 +00:00
Marcel Moolenaar
47c6266afd In intr_event_handle() we already save and set td_intr_frame, so
don't do it also in ia64_handle_intr(). With ia64_handle_intr()
not saving and setting td_intr_frame, make sure to do it for
timer interrupts in ia64_ih_hardclock().
2014-03-17 04:38:10 +00:00
Marcel Moolenaar
c8afe4038e Move the implementation of kdb_cpu_trap() from <machine/kdb.h> to
machdep.c. This makes it easier to add conditional code based on
options.
2014-03-16 22:56:22 +00:00
Marcel Moolenaar
2b567b38b4 Don't use the ITC as the faulting address for external interrupts.
We only use it for tracing and the KTR infrastructure will use ITC
for the time-stamp.
2014-03-16 21:57:05 +00:00
Robert Watson
72ab4bfd09 Fix a comment in capability.h: it got renamed to capsicum.h, not
capability.h.

MFC after:	3 weeks
Spotted by:	alc, mcdouga9 at egr.msu.edu, thompsa
2014-03-16 21:05:00 +00:00
Ian Lepore
0a3c453277 Use armv7 TLB flush code, not arm11, for cortex-a processors.
The armv7 architecture uses a unified TLB model for maintenence ops even
if separate instruction and data TLBs are implemented in hardware.  That
means that there's no distinction between the 'I' and 'D' flavors of flush,
they all use the same 'ID' implementation.  On the other hand, there is a
difference between SMP and UP on armv7, but not on arm11, so use the armv7
routines for cortex-a processors.
2014-03-16 20:39:39 +00:00
Ian Lepore
312c48ff18 Use the same terminology as the ARM docs in comments. No functional changes. 2014-03-16 20:34:45 +00:00
Marcel Moolenaar
f32ac833eb In intr_event_handle() we already save and set td_intr_frame, so
don't do it also in ia64_handle_intr(). With ia64_handle_intr()
not saving and setting td_intr_frame, make sure to do it for
clock interrupts in ia64_ih_clock().
2014-03-16 20:21:40 +00:00
Warner Losh
6a5b1a3544 Align all comments in config files on same column. This consistency
helps when bits and pieces of GENERIC from i386 or amd64 are cut and
pasted into other architecture's config files (which in the case of
ARM had gotten rather akimbo).
2014-03-16 15:22:52 +00:00
Warner Losh
2299abfac5 Make all the comments '# ' and align to same column. This fixes the
rampently incosnsitent usage which made cut and paste from one file
to another look ugly.
2014-03-16 15:22:46 +00:00
Michael Tuexen
ff1ffd7499 * Provide information in error causes in ASCII instead of
proprietary binary format.
* Add support for a diagnostic information error cause.
  The code is sysctlable and the default is 0, which
  means it is not sent.

This is joint work with rrs@.

MFC after: 1 week
2014-03-16 12:32:16 +00:00
Robert Watson
6fcf98a095 Bump __FreeBSD_version to reflect capability.h -> capsicum.h change.
MFC after:	3 weeks
2014-03-16 11:06:05 +00:00