Commit Graph

93445 Commits

Author SHA1 Message Date
Marius Strobl
743f0a55b0 - Flag sym(4) as supporting unmapped I/O; all necessary conversion actually
already has been done as part of r246713.
- Revert a part of r251402 in order to appease clang.
2013-06-05 01:22:59 +00:00
Marius Strobl
db228ec9b5 Handle/mark/nuke unused arguments. 2013-06-05 01:07:40 +00:00
Adrian Chadd
3df7a8ab08 Implement a bit of a hack to store the AR9285/AR9485 RX LNA configuration in
the RX antenna field.

The AR9285/AR9485 use an LNA mixer to determine how to combine the signals
from the two antennas.  This is encoded in the RSSI fields (ctl/ext) for
chain 2.  So, let's use that here.

This maps RX antennas 0->3 to the RX mixer configuration used to
receive a frame.  There's more that can be done but this is good enough
to diagnose if the hardware is doing "odd" things like trying to
receive frames on LNA2 (ie, antenna 2 or "alt" antenna) when there's
only one antenna connected.

Tested:

* AR9285, STA mode
2013-06-05 00:45:19 +00:00
Adrian Chadd
d98a3d6936 Add a new capability flag to announce that the chip implements LNA mixing
for the RX path.

This is different to the div comb HAL flag, that says it actually
can use this for RX diversity (the "slow" diversity path implemented
but disabled in the AR9285 HAL code.)

Tested:

* AR9285, STA operation
2013-06-05 00:42:04 +00:00
Adrian Chadd
bd77565e39 Document the AR9285/AR9485 LNA configuration information that's
stored in the ctl/ext RSSI field for chain 2.

Tested:

* AR9285, STA
2013-06-05 00:39:20 +00:00
Attilio Rao
dfd55c0c7b In vm_object_split(), busy and consequently unbusy the pages only when
swap_pager_copy() is invoked, otherwise there is no reason to do so.
This will eliminate the necessity to busy pages most of the times.

Sponsored by:	EMC / Isilon storage division
Reviewed by:	alc
2013-06-04 22:47:01 +00:00
Alan Somers
2ce303e83d sys/dev/mps/mps.c
sys/dev/mps/mps_user.c
	Fix uninitialized memory reference in mps_read_config_page.  It was
	referencing a field (params->hdr.Ext.ExtPageType) that would only be
	set when reading an Extended config page.  The symptom was that
	MPSIO_READ_CFG_PAGE ioctls would randomly fail with
	MPI2_IOCSTATUS_CONFIG_INVALID_PAGE errors.  The solution is to
	determine whether an extended or an ordinary config page is requested
	by looking at the PageType field, which should be available regardless.

	Similarly, mps_user_read_extcfg_header and mps_user_read_extcfg_page,
	which call mps_read_config_page, had to be fixed to always set the
	PageType field.  They were implicitly assuming that
	mps_read_config_page always operated on Extended pages.

Reviewed by:	ken
Approved by:	ken (mentor)
MFC after:	3 days
2013-06-04 22:32:33 +00:00
Marius Strobl
95c5ac34ba CAM_DEV_QFREEZE handling should only be done on request submission but
neither on completion nor by SIM drivers in the first place. This issue
has been revealed by r249466.

Reviewed by:	mav
MFC after:	3 days
2013-06-04 20:49:17 +00:00
John Baldwin
8aa9937318 Fix build with both INET and INET6 disabled. 2013-06-04 20:40:16 +00:00
Alan Cox
a42159f0ee Relax the vm object locking in mac_proc_vm_revoke_recurse(). A read lock
suffices in one place.

Sponsored by:	EMC / Isilon Storage Division
2013-06-04 17:23:09 +00:00
Alan Cox
ba887a9b33 Eliminate unnecessary vm object locking from tmpfs_nocacheread(). 2013-06-04 15:40:45 +00:00
John Baldwin
af13de0f57 Build fix: Only <sys/cdefs.h> should be included before __FBSDID().
<sys/param.h> needs to be included after any "opt_foo.h" headers so it
sees the same set of defined macros as other headers.
2013-06-04 15:35:37 +00:00
Gleb Smirnoff
82e825c4c9 Improve r250890, so that we stop processing of a message with zero
descriptors as early as possible, and assert that number of descriptors
is positive in unp_freerights().

Reviewed by:	mjg, pjd, jilles
2013-06-04 11:19:08 +00:00
Marius Strobl
ab1aa38b02 Flag isp(4) as supporting unmapped I/O; all necessary conversion actually
already has been done as part of r246713.

Reviewed by:	mjacob
2013-06-04 11:05:57 +00:00
Grzegorz Bernacki
046b51bfdd Fix the passing of time on Armada XP.
In order to become independent of Coherency Fabric frequency, configure
Timer and Watchdog to operate in 25MHz mode.

Submitted by:	Zbigniew Bodek <zbb@semihalf.com>
2013-06-04 09:33:03 +00:00
Grzegorz Bernacki
df8c5665ac Implement pmap_copy() for ARMv6/v7.
Copy the given range of mappings from the source map to the
destination map, thereby reducing the number of VM faults on fork.

Submitted by:   Zbigniew Bodek <zbb@semihalf.com>
Sponsored by:   The FreeBSD Foundation, Semihalf
2013-06-04 09:21:18 +00:00
David E. O'Brien
f9d4b3926a Match the options of the kernel. 2013-06-04 06:38:01 +00:00
Alan Cox
da38420832 Update a comment. 2013-06-04 05:44:52 +00:00
Adrian Chadd
bc1af55754 Add the combined (mixed) diversity support capability bit for the
AR9285/AR9485.
2013-06-04 02:56:56 +00:00
Alan Cox
e23b0a193e Relax the object locking in vm_pageout_map_deactivate_pages() and
vm_pageout_object_deactivate_pages().  A read lock suffices.

Sponsored by:	EMC / Isilon Storage Division
2013-06-04 02:28:47 +00:00
Navdeep Parhar
9050afc0a0 cxgbe(4): Provide accurate hit count for filters on T5 cards. The
location within the TCB and the size have both changed.

MFC after:	1 week
2013-06-04 02:25:25 +00:00
Justin Hibbits
05bd8e50ac Pad the PCPU MD struct, to satisfy an assert added with the projects/counters
branch import.

PR:		ports/179173,ports/179164
2013-06-04 00:40:26 +00:00
Hiren Panchasara
15e45369fe Fixing a typo.
Approved by:	sbruno (mentor)
MFC after:	3 days
2013-06-03 22:22:53 +00:00
Ed Schouten
6e8727211d Add ATOMIC_*_LOCK_FREE constants.
These constants are part of the C standard. Both Clang and GCC seem to
export these constants under the name __GCC_ATOMIC_*_LOCK_FREE.
2013-06-03 20:52:20 +00:00
Pedro F. Giffuni
532ebe1313 ext2fs: space vs tab.
Obtained from:	Christoph Mallon
MFC after:	3 days
2013-06-03 20:33:05 +00:00
Pedro F. Giffuni
fc3ea958b2 ext2fs: Small cosmetic fixes.
Make a long macro readable and sort a header.

Obtained from:	Christoph Mallon
MFC after:	3 days
2013-06-03 20:02:45 +00:00
Adrian Chadd
904e385eba Fix the order of TX shutdown and reset.
* Grab the reset lock first, so any subsequent interrupt, TX, RX work
  will fail

* Then shut down interrupts

* Then wait for TX/RX to finish running

At this point no further work will be running, so it's safe to do the
reset path code.

PR:		kern/179232
2013-06-03 19:39:37 +00:00
Adrian Chadd
cc7b47dd1b Fix receive on the AR9285 (Kite) with only one antenna connected.
The main problem here is that fast and driver RX diversity isn't actually
configured; I need to figure out why that is.  That said, this makes
the single-antenna connected AR9285 and AR2427 (AR9285 w/ no 11n) work
correctly.

PR:		kern/179269
2013-06-03 19:14:29 +00:00
Pedro F. Giffuni
4f69a09308 ext2fs: Update Block Group Descriptor struct.
Uncover some, previously reserved, fields that are used by Ext4.
These are currently unused but it is good to have them for future
reference.

Reviewed by:	bde
MFC after:	3 days
2013-06-03 18:52:14 +00:00
John Baldwin
24150d37d3 - Fix a couple of inverted panic messages for shared/exclusive mismatches
of a lock within a single thread.
- Fix handling of interlocks in WITNESS by properly requiring the interlock
  to be held exactly once if it is specified.
2013-06-03 17:41:11 +00:00
Konstantin Belousov
9138579845 Assert that interrupts are enabled in the trap handlers on x86 before
calling generic code to deliver signals.

Discussed with:	bde
Tested by:	pho
MFC after:	1 week
2013-06-03 17:40:05 +00:00
John Baldwin
95d28652af - Handle the recursed/not recursed flags with RA_RLOCKED in rw_assert().
- Tweak a panic message.
2013-06-03 17:38:57 +00:00
Konstantin Belousov
d39116f5d5 Be more generous when donating the current thread time to the owner of
the vnode lock while iterating over the free vnode list.  Instead of
yielding, pause for 1 tick.  The change is reported to help in some
virtualized environments.

Submitted by:	Roger Pau Monn? <roger.pau@citrix.com>
Discussed with:	jilles
Tested by:	pho
MFC after:	2 weeks
2013-06-03 17:36:43 +00:00
Konstantin Belousov
be6ec55376 Remove irrelevant comments.
Discussed with:	alc
MFC after:	3 days
2013-06-03 17:30:40 +00:00
Andre Oppermann
33e0730e2d Specify a maximum TSO length limiting the segment chain to what the
Xen host side can handle after defragmentation.

This prevents the driver from throwing away too long TSO chains and
improves the performance on Amazon AWS instances with 10GigE virtual
interfaces to the normally expected throughput.

Submitted by:	cperciva (earlier version)
Reviewed by:	cperciva
Tested by:	cperciva
MFC after:	1 week
2013-06-03 13:00:33 +00:00
Andre Oppermann
3c914c547e Allow drivers to specify a maximum TSO length in bytes if they are
limited in the amount of data they can handle at once.

Drivers can set ifp->if_hw_tsomax before calling ether_ifattach() to
change the limit.

The lowest allowable size is IP_MAXPACKET / 8 (8192 bytes) as anything
less wouldn't be very useful anymore.  The upper limit is still at
IP_MAXPACKET (65536 bytes).  Raising it requires further auditing of
the IPv4/v6 code path's as the length field in the IP header would
overflow leading to confusion in firewalls and others packet handler on
the real size of the packet.

The placement into "struct ifnet" is a bit hackish but the best place
that was found.  When the stack/driver boundary is updated it should
be handled in a better way.

Submitted by:	cperciva (earlier version)
Reviewed by:	cperciva
Tested by:	cperciva
MFC after:	1 week (using spare struct members to preserve ABI)
2013-06-03 12:55:13 +00:00
David Schultz
0921e73008 Bump __FreeBSD_version for the addition of the following functions to libm:
cacos, cacosf, cacosh, cacoshf,
  casin, casinf, casinh, casinhf,
  catan, catanf, catanh, catanhf,
  logl, log2l, log10l, log1pl
I am hoping kargl@ will commit expl and expm1l soon, in which case this
bump will cover those, too.

Requested by:	danfe
2013-06-03 09:33:51 +00:00
Konstantin Belousov
1e65d73c74 Do not map the shared page COW. If the process wired its address
space, fork(2) would cause shadowing of the physical object and
copying of the shared page into private copy, effectively preventing
updates for the exported timehands structure and stopping the clock.

Specify the maximum allowed permissions for the page to be read and
execute, preventing write from the user mode.

Reported and tested by:	<huanghwh@yahoo.com>
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2013-06-03 04:32:53 +00:00
Konstantin Belousov
07d46f9c18 MFamd64: when printing the trap information, show the %esp value.
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2013-06-03 04:19:21 +00:00
Konstantin Belousov
92fab43f7f When auto-sizing the buffer cache, limit the amount of physical memory
used as the estimation of size, to 32GB.  This provides around 100K of
buffer headers and corresponding KVA for buffer map at the peak.
Sizing the cache larger is not useful, also resulting in the wasting
and exhausting of KVA for large machines.

Reported and tested by:	bdrewery
Sponsored by:	The FreeBSD Foundation
2013-06-03 04:16:48 +00:00
Konstantin Belousov
aed1e745d0 The vm_page lock is not needed around the call to vm_page_insert().
Submitted by:	alc
MFC after:	1 week
2013-06-03 04:11:42 +00:00
Alan Cox
b417181250 Require that the page lock is held, instead of the object lock, when
clearing the page's PGA_REFERENCED flag.  Since we are typically
manipulating the page's act_count field when we are clearing its
PGA_REFERENCED flag, the page lock is already held everywhere that we clear
the PGA_REFERENCED flag.  So, in fact, this revision only changes some
comments and an assertion.  Nonetheless, it will enable later changes to
object locking in the pageout code.

Introduce vm_page_assert_locked(), which completely hides the implementation
details of the page lock from the caller, and use it in
vm_page_aflag_clear().  (The existing vm_page_lock_assert() could not be
used in vm_page_aflag_clear().)  Over the coming weeks, I expect that we'll
either eliminate or replace the various uses of vm_page_lock_assert() with
vm_page_assert_locked().

Reviewed by:	attilio
Sponsored by:	EMC / Isilon Storage Division
2013-06-03 01:22:54 +00:00
Alan Cox
eeff88a7ca Remove unnecessary #include's. 2013-06-02 18:10:16 +00:00
Alan Cox
39a4cd0cec Reduce the scope of the VM object locking in brelse(). In my tests, this
change reduced the total number of VM object lock acquisitions by brelse()
by 74%.

Sponsored by:	EMC / Isilon Storage Division
2013-06-02 16:18:03 +00:00
Hans Petter Selasky
e45547006e Correct the TD size computation. npkt should reflect the number of packets
remaining after the current TRB has been executed. Refer to section 4.11.2.4
of the XHCI specification for USB.

MFC after:	1 week
2013-06-02 12:28:29 +00:00
Hans Petter Selasky
c82b624fdc Correct TRB type for multi TRB transfers of non-NORMAL type, like isochronous.
Only the first TRB should be markes as special. Subsequent ones should be
marked as NORMAL. Optimise away TD first variable.

MFC after:	1 week
2013-06-02 12:16:58 +00:00
Hans Petter Selasky
fc66305366 Use the correct constant for 8000 IRQ/s.
MFC after:	1 week
2013-06-02 12:00:16 +00:00
Hans Petter Selasky
60decf203d Block event interrupts when we don't need it as soon as possible.
Typically this feature is used for isochronous transfers.
This reduces the amount of XHCI interrupting.

MFC after:	1 week
2013-06-02 11:58:31 +00:00
Tijl Coosemans
53089271a1 Convert old make variable modifiers :U and :L to bmake :tu and :tl.
Reviewed by:	sjg
2013-06-02 11:44:23 +00:00
Hans Petter Selasky
ef32af2180 Don't set the start ISOC ASAP bit for non-isochronous TRBs.
MFC after:	1 week
2013-06-02 10:54:47 +00:00