Commit Graph

104385 Commits

Author SHA1 Message Date
Dmitry Chagin
32ba368ba9 Finish r283544. In exec case properly detach threads from user space
before suicide.
2015-06-06 06:12:14 +00:00
Jack F Vogel
be771cda12 Update SW4 to the Intel ixl/ixlv drivers. This is primarily a shared
code update, with supporting changes in the CORE. Changes for the extended
media types, VF driver has virtual channel protocol changes, and some
register use corrections.  This software change should be coordinated with
Firmware updates to your hardware, contact your support channels for that.

MFC after:	1 week
2015-06-05 22:52:42 +00:00
Neel Natu
647c87825c The 'verify_gla()' function is used to ensure that the effective address
after decoding the instruction matches the one provided by hardware.

Prior to r283293 'vie->num_valid' used to contain the actual length of
the instruction whereas now it contains the maximum instruction length
possible. This introduced a bug when calculating a RIP-relative base address.

Fix this by using 'vie->num_processed' rather than 'vie->num_valid' as the
length of the emulated instruction.

Reported and tested by:	tychon
MFC after:	1 week
2015-06-05 21:22:26 +00:00
Alexander Motin
6fbc43fdfb Fix wrong function name in error message.
MFC after:	3 days
2015-06-05 20:30:36 +00:00
Sean Bruno
280b716943 Revert 284029, update imgact_binmisctl.c change mtx to reader count, at the
request of the submitter.

Will attempt to use an sx_lock for this fix to WITNESS crashes in a later
revision.

Submitted by:	sson
2015-06-05 18:16:10 +00:00
Andriy Gapon
649a80dc4c dnode_read: fixup r284025, BP_IS_HOLE macro expects a pointer
PR:		199804
Reported by:	sbruno
Pointyhat to:	avg
MFC after:	10 days
X-MFC with:	r284025
2015-06-05 17:02:21 +00:00
Sean Bruno
8c8613a14f This change uses a reader count instead of holding the mutex for the
interpreter list to avoid the problem of holding a non-sleep lock during
a page fault as reported by witness.  In addition, it consistently uses
memset()/memcpy() instead of bzero()/bcopy() except in the case where
bcopy() is required (i.e. overlapping copy).

Differential Revision:	https://reviews.freebsd.org/D2123
Submitted by:	sson
MFC after:	2 weeks
Relnotes:	Yes
2015-06-05 16:21:43 +00:00
Andriy Gapon
dade6e27ab dnode_read: handle hole blocks in zfs boot code
A hole block pointer can be encountered at any level and the hole
can cover multiple data blocks, but we are reading the data blocks
one by one, so we care only about the current one.

PR:		199804
Reported by:	Toomas Soome <tsoome@me.com>
Submitted by:	Toomas Soome <tsoome@me.com> (earlier version)
Tested by:	Toomas Soome <tsoome@me.com>
MFC after:	11 days
2015-06-05 15:32:04 +00:00
Achim Leubner
7cfc62d866 aic7xxx: Do not support device IDs 0x8081, 0x8088 and 0x8089 to avoid
conflicts with the new PMC Adaptec controller families supported by aacraid
2015-06-05 11:37:54 +00:00
Adrian Chadd
2108f2a8e7 For now, just default to presenting "found" channels as 11g, not 11b.
The intel 7260 driver under development requires this - the scans come
in as normal frames but with the frequency provided.  The correct method
is to have the driver provide flags (so we can determine if it's 11b
or 11g); this will have to do in the meantime.

Without this, the channel found is 11b, and no ERP (ie "11g") bits
are negotiated with the AP.

This allows the 7260 in 2ghz mode to operate in 11bg, rather than
just 11b.

Tested:

* intel 7260 driver, 11bg channels
2015-06-05 06:49:08 +00:00
Alexander Motin
7607afb12f Allow setting only WWNN or only WWPN.
MFC after:	2 weeks
2015-06-05 06:46:11 +00:00
Hans Petter Selasky
378b5a4cf3 Disable VGA PCI interrupts until a chipset driver is loaded for VGA
PCI devices. Else unhandled display adapter interrupts might freeze
the CPU or consume a lot of CPU.

PR:		156596
MFC after:	1 week
2015-06-05 06:23:03 +00:00
Hans Petter Selasky
b6630e5024 Don't wait forever for USB data to be flushed.
MFC after:	1 week
2015-06-05 06:06:07 +00:00
Navdeep Parhar
a40200ca80 cxgbe: set the minimum burst size when fetching fl buffers to 128B for
netmap rx queues too.  This should have gone in as part of r283858.
2015-06-05 00:37:46 +00:00
Adrian Chadd
3a1da00bd9 Some hostap setups may result in raw frames being transmitted with
no parameters set.  So, don't unconditionally call things.

Thanks to jkim@ for pointing this out!

MFC after:	2 weeks
Sponsored by:	Norse Corp, Inc.
2015-06-04 23:07:21 +00:00
John Baldwin
c2a51a4b0e Remove compatibility shims for FreeBSD versions older than 8.0. 2015-06-04 20:36:16 +00:00
John Baldwin
7077c42623 Add a new file operations hook for mmap operations. File type-specific
logic is now placed in the mmap hook implementation rather than requiring
it to be placed in sys/vm/vm_mmap.c.  This hook allows new file types to
support mmap() as well as potentially allowing mmap() for existing file
types that do not currently support any mapping.

The vm_mmap() function is now split up into two functions.  A new
vm_mmap_object() function handles the "back half" of vm_mmap() and accepts
a referenced VM object to map rather than a (handle, handle_type) tuple.
vm_mmap() is now reduced to converting a (handle, handle_type) tuple to a
a VM object and then calling vm_mmap_object() to handle the actual mapping.
The vm_mmap() function remains for use by other parts of the kernel
(e.g. device drivers and exec) but now only supports mapping vnodes,
character devices, and anonymous memory.

The mmap() system call invokes vm_mmap_object() directly with a NULL object
for anonymous mappings.  For mappings using a file descriptor, the
descriptors fo_mmap() hook is invoked instead.  The fo_mmap() hook is
responsible for performing type-specific checks and adjustments to
arguments as well as possibly modifying mapping parameters such as flags
or the object offset.  The fo_mmap() hook routines then call
vm_mmap_object() to handle the actual mapping.

The fo_mmap() hook is optional.  If it is not set, then fo_mmap() will
fail with ENODEV.  A fo_mmap() hook is implemented for regular files,
character devices, and shared memory objects (created via shm_open()).

While here, consistently use the VM_PROT_* constants for the vm_prot_t
type for the 'prot' variable passed to vm_mmap() and vm_mmap_object()
as well as the vm_mmap_vnode() and vm_mmap_cdev() helper routines.
Previously some places were using the mmap()-specific PROT_* constants
instead.  While this happens to work because PROT_xx == VM_PROT_xx,
using VM_PROT_* is more correct.

Differential Revision:	https://reviews.freebsd.org/D2658
Reviewed by:	alc (glanced over), kib
MFC after:	1 month
Sponsored by:	Chelsio
2015-06-04 19:41:15 +00:00
Adrian Chadd
ff09e23f53 Tag outbound raw 802.11 frames with both the node and an mbuf tag
with the transmit params.

This allows raw 802.11 frames to be queued in the driver if necessary,
rather than requiring it to be direct-dispatched into the hardware.

Tested:

* ath(4), STA mode
* iwn(4), STA mode

MFC after:	2 weeks
Sponsored by:	Norse Corp, Inc.
2015-06-04 17:54:41 +00:00
Michael Tuexen
0694a1bc74 Export a pointer to the SCTP socket. This is needed to add SCTP support
to sockstat.

MFC after: 3 days
2015-06-04 12:46:56 +00:00
Andrew Turner
5148474e8b Fix the build by hiding ieee80211_add_xmit_params and
ieee80211_get_xmit_params from userspace.
2015-06-04 10:55:36 +00:00
Xin LI
b8d083798c Document the disable of legacy entries in password database in UPDATING
and bump __FreeBSD_version after r283981.
2015-06-04 07:37:09 +00:00
Adrian Chadd
9afc11b224 First pass of adding transmit parameters as an option for outbound
802.11 mbufs.

The raw transmit path currently doesn't make it easy to queue
these frames:

* there's no node reference stored in the mbuf, like for the normal
  path, and
* the bpf supplied raw transmit parameters (rate, rts/cts, etc)
  are passed in as an argument, not as an mbuf tag.

In order to support driver queuing of these frames, we need to
be able to put the above into the mbuf before the driver gets it,
so the driver /can/ put it into a queue if needed.

Use an mbuf tag and for now just verbatim copy the bpf parameters
into it.  Later on it may grow to include more options but this
will do for now.

Why would you want to queue raw frames? Well, in the case of
iwn(4), we can't send the firmware frames to transmit before
we hear a beacon - the firmware will consider passive channels
as unavailable until it hears a beacon.  The firmware "passive"
channel state is cleared upon each RXON command, which is sent to
update association status.  So, when we attempt association and
authorisation, the RXON command causes the firmware to clear out
what it's already seen, and so we have to wait for a beacon before
we can transmit.

Before people get overly excited - this alone doesn't "fix" 5GHz
operation - it just makes it (more) possible.

The aim here is to convert all the drivers over to use a raw_xmit()
API that doesn't include the node and params - instead they'd get
those from the mbuf.  Then raw_xmit() becomes just a side-channel
version of the normal transmit path for management traffic.

MFC after:	2 weeks
Sponsored by:	Norse Corp, Inc.
2015-06-04 06:30:39 +00:00
Adrian Chadd
5d97054765 Disable bgscan for now - it interferes with 11n activity and general
stability.

I'll re-enable it once the scan overhaul is done - the NIC itself
can do bgscan, but not how we're doing it.

MFC after:	2 weeks
Sponsored by:	Norse Corp, Inc.
2015-06-04 05:37:07 +00:00
Neel Natu
b14bd6ac9d Use tunable 'hw.vmm.svm.features' to disable specific SVM features even
though they might be available in hardware.

Use tunable 'hw.vmm.svm.num_asids' to limit the number of ASIDs used by
the hypervisor.

MFC after:	1 week
2015-06-04 02:12:23 +00:00
Konstantin Belousov
46c3d3ac99 Syncing a directory vnode might drop the vnode lock in the
softdep_sync() similarly to the regular vnode sync.  Allow retry for
both vnode types.

Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-06-03 20:48:00 +00:00
Jung-uk Kim
5836df80a2 MFV: r283965
- Update GUIDs for new NFIT tables.
- Fix ill-formed GUID strings for NFIT tables.
- Fix a possible fault when performing a UUID search.
2015-06-03 19:39:59 +00:00
Sean Bruno
23c9098b2a Change EM_MULTIQUEUE to a real kernconf entry and enable support for
up to 2 rx/tx queues for the 82574.

Program the 82574 to enable 5 msix vectors, assign 1 to each rx queue,
1 to each tx queue and 1 to the link handler.

Inspired by DragonFlyBSD, enable some RSS logic for handling tx queue
handling/processing.

Move multiqueue handler functions so that they line up better in a diff
review to if_igb.c

Always enqueue tx work to be done in em_mq_start, if unable to acquire
the TX lock, then this will be processed in the background later by the
taskqueue.  Remove mbuf argument from em_start_mq_locked() as the work
is always enqueued.  (stolen from igb)

Setup TARC, TXDCTL and RXDCTL registers for better performance and stability
in multiqueue and singlequeue implementations. Handle Intel errata  3 and
generic multiqueue behavior with the initialization of TARC(0) and TARC(1)

Bind interrupt threads to cpus in order.  (stolen from igb)

Add 2 new DDB functions, one to display the queue(s) and their settings and
one to reset the adapter.  Primarily used for debugging.

In the multiqueue configuration, bump RXD and TXD ring size to max for the
adapter (4096).  Setup an RDTR of 64 and an RADV of 128 in multiqueue configuration
to cut down on the number of interrupts.  RADV was arbitrarily set to 2x RDTR
and can be adjusted as needed.

Cleanup the display in top a bit to make it clearer where the taskqueue threads
are running and what they should be doing.

Ensure that both queues are processed by em_local_timer() by writing them both
to the IMS register to generate soft interrupts.

Ensure that an soft interrupt is generated when em_msix_link() is run so that
any races between assertion of the link/status interrupt and a rx/tx interrupt
are handled.

Document existing tuneables: hw.em.eee_setting, hw.em.msix, hw.em.smart_pwr_down, hw.em.sbp

Document use of hw.em.num_queues and the new kernel option EM_MULTIQUEUE

Thanks to Intel for their continued support of FreeBSD.

Reviewed by:	erj jfv hiren gnn wblock
Obtained from:	Intel Corporation
MFC after:	2 weeks
Relnotes:	Yes
Sponsored by:	Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D1994
2015-06-03 18:01:09 +00:00
Hans Petter Selasky
be14cd6be7 Fix spelling. 2015-06-03 15:43:55 +00:00
Luiz Otavio O Souza
ecb3497f56 Fix wrong variable name in the previous commit.
Pointy hat to:	loos
Reported by:	araujo
2015-06-03 15:18:32 +00:00
Luiz Otavio O Souza
9500101c2f Fix the OACTIVE handling on if_dwc.
Previously the OACTIVE flag was being set when the tx descriptors are fully
allocated but it wasn't unset anywhere.

As soon as a packet is transmitted, unset the OACTIVE flag and call start
routine to push any pending packets from the tx queue.

This closes another race where a full tx queue would jam the tx path (tx
queue is full, new packets cannot be added to queue and dwc_txstart never
gets called).
2015-06-03 14:48:03 +00:00
Ian Lepore
8826d90475 Better handling of userland sysarch() requests to flush icache.
On armv6, cache maintenance can trigger page faults.  Add handling so that
these turn into SIGSEGV that kills the process rather than panics that kill
the kernel.

Differential Revision:	https://reviews.freebsd.org/D2035
Submitted by:	Michal Meloun <meloun@miracle.cz>
2015-06-03 14:07:50 +00:00
Andriy Gapon
2ecf70de02 userboot: enable bzipfs support
Additionally, sort all real filesystems before the virtual ones.

Differential Revision:	https://reviews.freebsd.org/D2709
Reviewed by:	grehan
MFC after:	5 days
2015-06-03 10:10:00 +00:00
Alexander Motin
e18af60507 Restore AHCI quirks printing as base16.
smh@ at r278034 made it base17, that is somewhat odd. :)

MFC after:	3 days
2015-06-02 23:11:12 +00:00
Gleb Smirnoff
6468c41303 Make the last revision compilable.
Remove extra argument from iwi_wme_setparams(), a softc has 1 to 1
accordance with ieee80211com.
2015-06-02 22:45:28 +00:00
Gleb Smirnoff
405c7166ef The argument passed to the iwi_update_wme() is softc, not ieee80211com.
This fatal mismatch appeared to be absolutely harmless, since both structs
have pointer to struct ifnet as their first member, and they both point to
the same ifnet.  And the first member is the only one used from the argument.
2015-06-02 22:39:16 +00:00
Devin Teske
46c39cc077 Add comments to indicate where the flag for later abort" originates.
MFC after:	3 days
X-MFC-to:	stable/10
2015-06-02 22:23:20 +00:00
Eric van Gyzen
63e4c6cdf9 Provide vnode in memory map info for files on tmpfs
When providing memory map information to userland, populate the vnode pointer
for tmpfs files.  Set the memory mapping to appear as a vnode type, to match
FreeBSD 9 behavior.

This fixes the use of tmpfs files with the dtrace pid provider,
procstat -v, procfs, linprocfs, pmc (pmcstat), and ptrace (PT_VM_ENTRY).

Submitted by:   Eric Badger <eric@badgerio.us> (initial revision)
Obtained from:  Dell Inc.
PR:             198431
MFC after:      2 weeks
Reviewed by:    jhb
Approved by:    kib (mentor)
2015-06-02 18:37:04 +00:00
Sean Bruno
b7a728aaba Simplify hang detection by stealing the techniques used in ixl(4) and
applying them to em(4).

Rely on iterations through the local timer, and the tx queue state to
determine if an actual hang has occurred. Any time a descriptor is used
(packet sent), the tx queue is flagged as busy. Then when txeof runs, it
either clears the flag when all is clean, or resets it to 1 if ANY are
cleaned, if nothing is cleaned it increments the flag.

Local timer simply checks to see if busy ever reaches MAX (10, which
is compile time configurable), and then sets it as HUNG, at that point
there is one more timer cycle in which to have any cleans, if not a
watchdog reset will occur.

Differential Revision:	https://reviews.freebsd.org/D2019
Submitted by:	jfv
Reviewed by:	hiren
Obtained from:	Intel Corporation
MFC after:	2 weeks
Relnotes:	Yes
Sponsored by:	Limelight Networks
2015-06-02 18:28:41 +00:00
Hans Petter Selasky
b4df5b00f2 Fix for control endpoint handling in the DWC OTG driver. The data
stage processing is only allowed after the setup complete event has
been received. Else a race may occur and the OUT data can be corrupted.
While at it ensure resetting a FIFO has the required wait loop.

MFC after:	3 days
2015-06-02 17:40:52 +00:00
Ian Lepore
148ddb8a6f Add a missing wakeup when releasing ownership of the SPI hardware.
Also, validate the chipselect parameter before grabbing ownership of the
hardware, and report timeout errors after releasing it.

PR:		200584
2015-06-02 16:07:28 +00:00
John Baldwin
9e34aea25c Catch up to the SRIOV API changes in r283670. 2015-06-01 20:05:06 +00:00
Xin LI
6e55e724a6 Clear p_stops upon PROCFS_CTL_DETACH, similar to r283889.
Noticed by:	jhb
Reviewed by:	sef
Sponsored by:	iXsystems, Inc.
MFC after:	2 weeks
2015-06-01 18:49:31 +00:00
Xin LI
4c372ca254 Clear p_stops when doing PT_DETACH.
Without this, if a process was being traced by truss(1), which
uses different p_stops bits than gdb(1), the latter would
misbehave because of the unexpected bits.

Reported by:	jceel
Submitted by:	sef
Sponsored by:	iXsystems, Inc.
MFC after:	2 weeks
2015-06-01 18:15:45 +00:00
Andrew Turner
00ed281d7d Remove __ARM_EABI__ from sys/arm/arm, building for oabi is unsupported. 2015-06-01 18:15:44 +00:00
Andrew Turner
93b9a2a6f8 Clear the C bit of the saved program state register when also clearing the
return value. We use this bit to signal when a syscall has failed, and
without this getcontext/setcontext may fail.

MFC after:	1 week
2015-06-01 18:13:32 +00:00
Jack F Vogel
48056c88e1 Delta D2489 - Add SRIOV support to the Intel 10G driver.
NOTE: This is a technology preview, while it has undergone
      development testing, Intel has not yet completed full
      validation of the feature. It is being integrated for
      early access and customer testing.
2015-06-01 17:43:34 +00:00
Jack F Vogel
3012653750 Revert last commit, to remove added skeleton tree. 2015-06-01 17:35:29 +00:00
Jack F Vogel
2533e32559 Delta D2489 - Add SRIOV support to the Intel 10G driver.
NOTE: This is a technology preview, while it has undergone development
      tests, Intel has not yet completed full validation of the feature.
      It is being integrated for early access and customer testing.
2015-06-01 17:15:25 +00:00
Hans Petter Selasky
0a76fe7c24 Add USB MIDI template for USB device side mode. 2015-06-01 11:24:34 +00:00
Dimitry Andric
38954a1d1c Remove unneeded NULL checks in amd64's trap_fatal().
Since td_name is an array member of struct thread, it can never be NULL,
so the check can be removed.  In addition, curproc can never be NULL,
so remove the if statement, and splice the two printfs() together.

While here, remove the u_long cast, and use the correct printf format
specifier curproc->p_pid.

Reviewed by:	kib
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D2695
2015-06-01 06:50:39 +00:00