attilio [Thu, 6 Jun 2013 18:19:26 +0000 (18:19 +0000)]
Complete r251452:
Avoid to busy/unbusy a page in cases where there is no need to drop the
vm_obj lock, more nominally when the page is full valid after
vm_page_grab().
jhb [Thu, 6 Jun 2013 14:43:19 +0000 (14:43 +0000)]
Do not compare the existing mask of a cpuset with a new mask when changing
the mask of a cpuset. Also, change the cpuset's mask before updating the
masks of all children. Previously changing a cpuset's mask first required
setting the mask to a super-set of both the old and new masks and then
changing it a second time to the new mask.
jeff [Wed, 5 Jun 2013 23:53:00 +0000 (23:53 +0000)]
- Consolidate duplicate code into support functions.
- Split the bqlock into bqclean and bqdirty locks.
- Only acquire the wakeup synchronization locks when we cross a
threshold requiring them.
- Restructure the way flushbufqueues() targets work so they are more
smp friendly and sane.
rmacklem [Wed, 5 Jun 2013 23:17:39 +0000 (23:17 +0000)]
Add a "-v" (verbose) option to the gssd daemon, to help
with diagnosis of kerberized NFS mount problems. When set,
messages are sent to syslog() (or fprintf(stderr,...) if
"-d" is also specified) to indicate activity/results of
kgssapi upcalls.
adrian [Wed, 5 Jun 2013 22:23:13 +0000 (22:23 +0000)]
Enable slow diversity combining for the AR9285.
Now that I understand what's going on - and the RX antenna array maps
to what the receive LNA configuration actually is - I feel comfortable
in enabling this.
If people do have issues with this, there's enough debugging now available
that we have a chance to diagnose it without writing it up as 'weird
crap.'
Tested:
* AR9285 STA w/ diversity combining enabled in EEPROM
adrian [Wed, 5 Jun 2013 22:21:13 +0000 (22:21 +0000)]
As a temporary work-around (read: until there's a nice API for exposing
and controlling this form of antenna diversity) - print out the AR9285
antenna diversity configuration at attach time.
This will help track down and diagose if/when people have connectivity
issues on cards (eg if they connect a single antenna to LNA1, yet the
card has RX configured to only occur on LNA2.)
Tested:
* AR9285 w/ antenna diversity enabled in EEPROM;
* AR9285 w/ antenna diversity disabled in EEPROM; mapping only to a
single antenna (LNA1.)
dim [Wed, 5 Jun 2013 19:46:39 +0000 (19:46 +0000)]
Pull in r183297 from upstream llvm trunk:
PR15662: Optimized debug info produces out of order function
parameters
When a function is inlined we lazily construct the variables
representing the function's parameters. After that, we add any
remaining unused parameters.
If the function doesn't use all the parameters, or uses them out of
order, then the DWARF would produce them in that order, producing a
parameter order that doesn't match the source.
This fix causes us to always keep the arg variables at the start of
the variable list & in the original order from the source.
luigi [Wed, 5 Jun 2013 17:27:59 +0000 (17:27 +0000)]
- fix a bug in the previous commit that was dropping the last packet
from each batch flowing on the VALE switch
- feature: add glue for 'indirect' buffers on the sender side:
if a slot has NS_INDIRECT set, the netmap buffer contains pointer(s)
to the actual userspace buffers, which are accessed with copyin().
The feature is not finalised yet, as it will likely need to deal
with some iovec variant for proper scatter/gather support.
This will save one copy for clients (e.g. qemu) that cannot
use the netmap buffer directly.
A curiosity: on amd64 copyin() appears to be 10-15% faster than pkt_copy()
or bcopy() at least for sizes of 256 and greater.
marius [Wed, 5 Jun 2013 01:22:59 +0000 (01:22 +0000)]
- 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.
adrian [Wed, 5 Jun 2013 00:45:19 +0000 (00:45 +0000)]
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.
adrian [Wed, 5 Jun 2013 00:42:04 +0000 (00:42 +0000)]
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.)
attilio [Tue, 4 Jun 2013 22:47:01 +0000 (22:47 +0000)]
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.
asomers [Tue, 4 Jun 2013 22:32:33 +0000 (22:32 +0000)]
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
marius [Tue, 4 Jun 2013 20:49:17 +0000 (20:49 +0000)]
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.
andrew [Tue, 4 Jun 2013 19:47:26 +0000 (19:47 +0000)]
Start to merge the updated ARM NetBSD setjump/longjmp functions. To begin
with merge the functions but leave out the code to save/load the VFP
registers as that requires other changes to ensure the VFP is enabled
first.
This removes storing the old fpa registers. These were never fully
supported, and the only user of this code I can find have moved to newer
CPUs which use a VFP.
dteske [Tue, 4 Jun 2013 17:08:26 +0000 (17:08 +0000)]
Shift Console->Saver menu items to place the default item at the top, making
this menu consistent with Console->Repeat, Console->Font, Console->Screenmap
and many others which place the default choice at the top.
NOTE: SVN r249751 changed things so that these menus highlight the active
selection, so the idea that the default choice (now at top) "can be selected
immediately by hitting ENTER" is not possible unless the default choice is
the currently active setting (e.g., on first visit to the menu). However, it
is still warranted to have the default choice at the top of the menu.
jhb [Tue, 4 Jun 2013 15:35:37 +0000 (15:35 +0000)]
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.
glebius [Tue, 4 Jun 2013 11:19:08 +0000 (11:19 +0000)]
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().
dteske [Tue, 4 Jun 2013 03:47:21 +0000 (03:47 +0000)]
Use f_shell_escape() instead of forking to awk. In this case, the
replacement comes with a great performance increase (as f_shell_escape()
uses the built-in based f_replaceall() which out-performs forking to
awk(1)). This should also improve readability slightly.
dteske [Tue, 4 Jun 2013 03:30:44 +0000 (03:30 +0000)]
Similar to r251236, r251242, and r251244. Introduce new function-pair to
dialog(1) API in dialog.subr responsible for retrieving menu-choice data
(for the --menu widget).
Add f_dialog_menuitem_store()/f_dialog_menuitem_fetch() for storing and
retrieving the menuitem (not the tag) from a --menu widget result.
The dialog --menu widget returns the `tag' from the tag/item pair of choices
for a menu list. Because the menu list is often local to the function that
is displaying it, the ability to dereference this into the item is not
possible unless you use a global. This changes things so the function (upon
successful return of dialog) dereferences the tag into the item and stores
it for later retrieval using these functions.
NOTE: Tags are dereferenced into items using f_dialog_menutag2item().
dteske [Tue, 4 Jun 2013 00:42:31 +0000 (00:42 +0000)]
Fix a code typo (missing `eval') which lead to improperly-sized menu when
displaying packages (menu was always maximum height). The problem was
introduced by SVN r251232.
dteske [Tue, 4 Jun 2013 00:38:19 +0000 (00:38 +0000)]
Fix menu accenting for the package category list. The single-space indent
for duplicate initial-characters was removed for making comparisons but was
not put back.
sjg [Mon, 3 Jun 2013 23:51:46 +0000 (23:51 +0000)]
bmake does not like universe_${target}_prologue in the .ORDER
when there is an explicit dependency for it anyway.
Remove it so both bmake and fmake do the same thing.
adrian [Mon, 3 Jun 2013 19:14:29 +0000 (19:14 +0000)]
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.
kargl [Mon, 3 Jun 2013 19:13:44 +0000 (19:13 +0000)]
ld80/s_expl.c:
* Use integral numerical constants, and let the compiler do the
conversion to long double.
ld128/s_expl.c:
* Use integral numerical constants, and let the compiler do the
conversion to long double.
* Use the ENTERI/RETURNI macros, which are no-ops on ld128. This
however makes the ld80 and ld128 identical.
kargl [Mon, 3 Jun 2013 18:40:00 +0000 (18:40 +0000)]
ld80/s_expl.c:
* Update the evaluation of the polynomial. This allows the removal
of the now unused variables t23 and t45.
ld128/s_expl.c:
* Update the evaluation of the polynomial and the intermediate
result t. This update allows several numerical constants to be
written as double rather than long double constants. Update
the constants as appropriate.
kargl [Mon, 3 Jun 2013 18:07:04 +0000 (18:07 +0000)]
Add a u suffix to the IEEEl2bits unions o_threshold and u_threshold,
and use macros to access the e component of the unions. This allows
the portions of the code in ld80 to be identical to the ld128 code.
kargl [Mon, 3 Jun 2013 17:51:08 +0000 (17:51 +0000)]
Introduce the macro LOG2_INTERVAL, which is log2(number of intervals).
Use the macroi as a micro-optimization to convert a subtraction and
division to a shift.
jhb [Mon, 3 Jun 2013 17:41:11 +0000 (17:41 +0000)]
- 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.
kib [Mon, 3 Jun 2013 17:36:43 +0000 (17:36 +0000)]
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.
Add libiconv based versions of *c16*() and *c32*().
I initially thought wchar_t was locale independent, but this seems to be
only the case on Linux. This means that we cannot depend on the *wc*()
routines to implement *c16*() and *c32*(). Instead, use the Citrus
libiconv that is part of libc.
I'll see if there is anything I can do to make the existing functions
somewhat useful in case the system is built without libiconv in the
nearby future. If not, I'll simply remove the broken implementations.