]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoMFamd64 r238669:
kib [Sat, 21 Jul 2012 21:39:02 +0000 (21:39 +0000)]
MFamd64 r238669:
Force clean FPU state in PCB user FPU save area for PT_I386_{GET,SET}XMMREGS.

Reported by: bde
MFC after: 1 week

12 years agoUse 16bit PIO instead of 32bit in case of misaligned buffer.
mav [Sat, 21 Jul 2012 14:59:43 +0000 (14:59 +0000)]
Use 16bit PIO instead of 32bit in case of misaligned buffer.
It fixes kernel panic during CD write with cdrecord on sparc64.

12 years agoFix typo in comment, should be MHz here.
glebius [Sat, 21 Jul 2012 14:07:43 +0000 (14:07 +0000)]
Fix typo in comment, should be MHz here.

Submitted by: Daan Vreeken <Daan vitsch.nl>

12 years agoConstently use 2-space sentence breaks.
kib [Sat, 21 Jul 2012 13:53:00 +0000 (13:53 +0000)]
Constently use 2-space sentence breaks.

Submitted by:  bde
MFC after:  1 week

12 years agoStop caching curpcb in the local variable.
kib [Sat, 21 Jul 2012 13:47:37 +0000 (13:47 +0000)]
Stop caching curpcb in the local variable.

Requested by:     bde
MFC after:     1 week

12 years agoThe PT_I386_{GET,SET}XMMREGS and PT_{GET,SET}XSTATE operate on the
kib [Sat, 21 Jul 2012 13:06:37 +0000 (13:06 +0000)]
The PT_I386_{GET,SET}XMMREGS and PT_{GET,SET}XSTATE operate on the
stopped threads. Implementation assumes that the thread's FPU context
is spilled into the PCB due to stop. This is mostly true, except when
FPU state for the thread is not initialized. Then the requests operate
on the garbage state which is currently left in the PCB, causing
confusion.

The situation is indeed observed after a signal delivery and before
#NM fault on execution of any FPU instruction in the signal handler,
since sendsig(9) drops FPU state for current thread, clearing
PCB_FPUINITDONE. When inspecting context state for the signal handler,
debugger sees the FPU state of the main program context instead of the
clear state supposed to be provided to handler.

Fix this by forcing clean FPU state in PCB user FPU save area by
performing getfpuregs(9) before accessing user FPU save area in
ptrace_machdep.c.

Note: this change will be merged to i386 kernel as well, where it is
much more important, since e.g. gdb on i386 uses PT_I386_GETXMMREGS to
inspect FPU context on CPUs that support SSE. Amd64 version of gdb
uses PT_GETFPREGS to inspect both 64 and 32 bit processes, which does
not exhibit the bug.

Reported by: bde
MFC after: 1 week

12 years agoStop clearing x87 exceptions in the #MF handler on amd64. If user code
kib [Sat, 21 Jul 2012 13:05:34 +0000 (13:05 +0000)]
Stop clearing x87 exceptions in the #MF handler on amd64. If user code
understands FPU hardware enough to catch SIGFPE and unmask exceptions
in control word, then it may as well properly handle return from
SIGFPE without causing an infinite loop of #MF exceptions due to
faulting instruction restart, when needed.

Clearing exceptions causes information loss for handlers which do
understand FPU hardware, and struct siginfo si_code member cannot be
considered adequate replacement for en_sw content due to translation.

Supposed reason for clearing the exceptions, which is IRQ13 handling
oddities, were never applicable to amd64.

Note: this change will be merged to i386 kernel as well, since we do
not support IRQ13 delivery of #MF notifications for some time.

Requested by: bde
MFC after: 1 week

12 years ago(Incomplete) fixes for symbols visibility issues and style in fcntl.h.
kib [Sat, 21 Jul 2012 13:02:11 +0000 (13:02 +0000)]
(Incomplete) fixes for symbols visibility issues and style in fcntl.h.

Append '__' prefix to the tag of struct oflock, and put it under BSD
namespace. Structure is needed both by libc and kernel, thus cannot be
hidden under #ifdef _KERNEL.

Move a set of non-standard F_* and O_* constants into BSD namespace.
SUSv4 explicitely allows implemenation to pollute F_* and O_* names
after fcntl.h is included, but it costs us nothing to adhere
to the specification if exact POSIX compliance level is requested by
user code.

Change some spaces after #define to tabs.

Noted by and discussed with:      bde
MFC after:   1 week

12 years agoFix typo in bzero length argument during sense fetching.
mav [Sat, 21 Jul 2012 08:19:43 +0000 (08:19 +0000)]
Fix typo in bzero length argument during sense fetching.
For me it at least fixed CD burning in PIO mode.

MFC after: 3 days

12 years agoRemove copy/pasteo in the copyright notice.
gnn [Sat, 21 Jul 2012 07:14:52 +0000 (07:14 +0000)]
Remove copy/pasteo in the copyright notice.

12 years agoAdd a new script, hotopen, which shows what uid is opening files
gnn [Fri, 20 Jul 2012 23:56:23 +0000 (23:56 +0000)]
Add a new script, hotopen, which shows what uid is opening files
on a per second basis.  While here clean up the Makefile as well.

MFC after: 1 week

12 years agoMake it possible to resize opened partitions.
trasz [Fri, 20 Jul 2012 17:51:20 +0000 (17:51 +0000)]
Make it possible to resize opened partitions.

Sponsored by: FreeBSD Foundation

12 years agoMake ZVOL resizing ('zfs set volsize') properly resize the GEOM provider.
trasz [Fri, 20 Jul 2012 16:56:34 +0000 (16:56 +0000)]
Make ZVOL resizing ('zfs set volsize') properly resize the GEOM provider.

Sponsored by: FreeBSD Foundation

12 years agoUse proper error message when fstat(2) fails on stdout.
jh [Fri, 20 Jul 2012 08:33:23 +0000 (08:33 +0000)]
Use proper error message when fstat(2) fails on stdout.

PR: bin/159746
Submitted by: Alex K.

12 years agostyle(9).
jh [Fri, 20 Jul 2012 08:31:36 +0000 (08:31 +0000)]
style(9).

12 years agoAdd a needed #include due to my recent change.
adrian [Fri, 20 Jul 2012 07:49:26 +0000 (07:49 +0000)]
Add a needed #include due to my recent change.

12 years agoAdd missing SRCS.
adrian [Fri, 20 Jul 2012 07:38:11 +0000 (07:38 +0000)]
Add missing SRCS.

12 years agoAdd the new athratestats tool.
adrian [Fri, 20 Jul 2012 07:17:24 +0000 (07:17 +0000)]
Add the new athratestats tool.

12 years agoTidy things up substantially:
adrian [Fri, 20 Jul 2012 06:11:26 +0000 (06:11 +0000)]
Tidy things up substantially:

* remove some debugging;
* introduce command line arguments;
* introduce support for non-ath0 interfaces.

12 years agoDon't forget to initialize return value.
davidxu [Fri, 20 Jul 2012 05:47:12 +0000 (05:47 +0000)]
Don't forget to initialize return value.

12 years agoSimplify code by replacing _thr_ref_add() with _thr_find_thread().
davidxu [Fri, 20 Jul 2012 03:37:19 +0000 (03:37 +0000)]
Simplify code by replacing _thr_ref_add() with _thr_find_thread().

12 years agoEliminate duplicated code.
davidxu [Fri, 20 Jul 2012 03:27:07 +0000 (03:27 +0000)]
Eliminate duplicated code.

12 years agoDon't assign same value.
davidxu [Fri, 20 Jul 2012 03:22:17 +0000 (03:22 +0000)]
Don't assign same value.

12 years agoEliminate duplicated code.
davidxu [Fri, 20 Jul 2012 03:16:52 +0000 (03:16 +0000)]
Eliminate duplicated code.

12 years agoEliminate duplicated code.
davidxu [Fri, 20 Jul 2012 03:00:41 +0000 (03:00 +0000)]
Eliminate duplicated code.

12 years agoUse the rate control table to display the rate rather than the rix,
adrian [Fri, 20 Jul 2012 02:18:47 +0000 (02:18 +0000)]
Use the rate control table to display the rate rather than the rix,
making the output of this program much more meaningful.

12 years agoIntroduce a rate table TLV so rate table statistics consumers
adrian [Fri, 20 Jul 2012 02:17:48 +0000 (02:17 +0000)]
Introduce a rate table TLV so rate table statistics consumers
know how to map rix -> rate code.

12 years agoDon't forget to release a thread reference count,
davidxu [Fri, 20 Jul 2012 01:56:14 +0000 (01:56 +0000)]
Don't forget to release a thread reference count,
replace _thr_ref_add() with _thr_find_thread(),
so reference count is no longer needed.

MFC after: 3 days

12 years agoBump this up to match what the HAL is at now.
adrian [Fri, 20 Jul 2012 01:41:18 +0000 (01:41 +0000)]
Bump this up to match what the HAL is at now.

12 years agoImplement a first cut of the 'sample' rate statistics userland utility.
adrian [Fri, 20 Jul 2012 01:38:03 +0000 (01:38 +0000)]
Implement a first cut of the 'sample' rate statistics userland utility.

This outputs almost exactly the same information as the kernel sysctl does,
however the rix -> rate mapping isn't yet available as a TLV.

12 years agoEnable the basic node-based rate control statistics via an ioctl().
adrian [Fri, 20 Jul 2012 01:36:46 +0000 (01:36 +0000)]
Enable the basic node-based rate control statistics via an ioctl().

12 years agoAdd a per-node rate control routine for each rate control module.
adrian [Fri, 20 Jul 2012 01:36:02 +0000 (01:36 +0000)]
Add a per-node rate control routine for each rate control module.

For now, the only module implement is 'sample', and that's only partially
implemented.  The main issue here with reusing this structure in userland
is that it uses 'rix' everywhere, which requires the userland code to
have access to the current HAL rate table.

For now, this is a very large work in progress.

Specific details:

* The rate control information is per-node at the moment and wrapped
  in a TLV, to ease parsing and backwards compatibility.
* .. but so I can be slack for now, the userland statistics are just
  a copy of the kernel-land sample node state.
* However, for now use a temporary copy and change the rix entries
  to dot11rate entries to make it slightly easier to eyeball.

Problems:

* The actual rate information table is unfortunately indexed by rix
  and it doesn't contain a rate code.  So the userland side of this
  currently has no way to extract out a mapping.

TODO:

* Add a TLV payload to dump out the rate control table mapping so
  'rix' can be turned into a dot11 / MCS rate.
* .. then remove the temporary copy.

12 years agoCreate an ioctl API for fetching the current rate control information.
adrian [Fri, 20 Jul 2012 01:27:20 +0000 (01:27 +0000)]
Create an ioctl API for fetching the current rate control information.

12 years agoImport an updated version of moduli(5) manual page from OpenBSD.
delphij [Fri, 20 Jul 2012 01:11:53 +0000 (01:11 +0000)]
Import an updated version of moduli(5) manual page from OpenBSD.

MFC after: 1 month

12 years agoPrepare for (re)using this header file in userland.
adrian [Fri, 20 Jul 2012 00:47:23 +0000 (00:47 +0000)]
Prepare for (re)using this header file in userland.

Remove the inlined code from the header file if it's compiled in userland.
It's not required and it shouldn't be there in the first place.

12 years agoRevert SVN r238628 (mistake).
dteske [Thu, 19 Jul 2012 22:41:00 +0000 (22:41 +0000)]
Revert SVN r238628 (mistake).

12 years agoFix syntax errors (s/:=/:-/).
dteske [Thu, 19 Jul 2012 22:33:13 +0000 (22:33 +0000)]
Fix syntax errors (s/:=/:-/).

Reviewed by: emaste (mentor)
Approved by: emaste (mentor)
MFC after: 3 days

12 years agoRemove line which was accidentally kept in r238614.
kib [Thu, 19 Jul 2012 20:38:03 +0000 (20:38 +0000)]
Remove line which was accidentally kept in r238614.

Submitted by: pjd
Pointy hat to: kib
MFC after: 1 week

12 years agoMerge more cosmetical changes from NetBSD's libedit.
pfg [Thu, 19 Jul 2012 19:15:47 +0000 (19:15 +0000)]
Merge more cosmetical changes from NetBSD's libedit.

makelist:
change tr '[a-z]' '[A-Z]' to tr '[:lower:]' '[:upper:]' so that POSIX
systems work proerly regardsless of environment variable settings.

tokenizer.c:
pass lint on _LP64

Obtained from: NetBSD
MFC after: 2 weeks

12 years agoIntroduce curpcb magic variable, similar to curthread, which is MD
kib [Thu, 19 Jul 2012 19:09:12 +0000 (19:09 +0000)]
Introduce curpcb magic variable, similar to curthread, which is MD
amd64.  It is implemented as __pure2 inline with non-volatile asm read
from pcpu, which allows a compiler to cache its results.

Convert most PCPU_GET(pcb) and curthread->td_pcb accesses into curpcb.

Note that __curthread() uses magic value 0 as an offsetof(struct pcpu,
pc_curthread). It seems to be done this way due to machine/pcpu.h
needs to be processed before sys/pcpu.h, because machine/pcpu.h
contributes machine-depended fields to the struct pcpu definition. As
result, machine/pcpu.h cannot use struct pcpu yet.

The __curpcb() also uses a magic constant instead of offsetof(struct
pcpu, pc_curpcb) for the same reason. The constants are now defined as
symbols and CTASSERTs are added to ensure that future KBI changes do
not break the code.

Requested and reviewed by: bde
MFC after:    3 weeks

12 years agoAllow to specify no source-address-selection policy
emax [Thu, 19 Jul 2012 15:36:36 +0000 (15:36 +0000)]
Allow to specify no source-address-selection policy

MFC after: 1 week

12 years agoRevert the use of BUS_DMA_ALLOCNOW when creating the DMA tag for user
marius [Thu, 19 Jul 2012 14:43:46 +0000 (14:43 +0000)]
Revert the use of BUS_DMA_ALLOCNOW when creating the DMA tag for user
data introduced in r236061. Using that flag doesn't make that much
sense on this case as the DMA maps using it are also created during
sym_pci_attach(). Moreover, due to the maxsegsz parameter used, doing
so may exhaust the bounce pages pool on architectures requiring
bounce pages. [1]
While at it, use a slightly more appropriate maxsegsz parameter.

PR: 169526
Submitted by: Mike Watters [1]
MFC after: 3 days

12 years agoAdd share/examples/libusb20 to the list of directories.
joerg [Thu, 19 Jul 2012 11:18:41 +0000 (11:18 +0000)]
Add share/examples/libusb20 to the list of directories.

12 years agoFix several reads beyond the mapped first page of the binary in the
kib [Thu, 19 Jul 2012 11:15:53 +0000 (11:15 +0000)]
Fix several reads beyond the mapped first page of the binary in the
ELF parser. Specifically, do not allow note reader and interpreter
path comparision in the brandelf code to read past end of the page.
This may happen if specially crafter ELF image is activated.

Submitted by: Lukasz Wojcik <lukasz.wojcik zoho com>
MFC after: 3 days

12 years agoDocument F_DUPFD_CLOEXEC. Also provide some wording changes for
kib [Thu, 19 Jul 2012 10:23:59 +0000 (10:23 +0000)]
Document F_DUPFD_CLOEXEC. Also provide some wording changes for
F_DUPFD to make it less confusing, at least for me.

MFC after: 1 week

12 years agoImplement F_DUPFD_CLOEXEC command for fcntl(2), specified by SUSv4.
kib [Thu, 19 Jul 2012 10:22:54 +0000 (10:22 +0000)]
Implement F_DUPFD_CLOEXEC command for fcntl(2), specified by SUSv4.

PR:   standards/169962
Submitted by: Jukka A. Ukkonen <jau iki fi>
MFC after: 1 week

12 years agoUpdate my e-mail to my FreeBSD one.
zeising [Thu, 19 Jul 2012 08:56:30 +0000 (08:56 +0000)]
Update my e-mail to my FreeBSD one.

Approved by: joel (mentor)

12 years agoDon't unnecessarily set PGA_REFERENCED in pmap_enter().
alc [Thu, 19 Jul 2012 05:34:19 +0000 (05:34 +0000)]
Don't unnecessarily set PGA_REFERENCED in pmap_enter().

12 years agoConvert the TX path to use the new HAL methods for accessing the
adrian [Thu, 19 Jul 2012 03:51:16 +0000 (03:51 +0000)]
Convert the TX path to use the new HAL methods for accessing the
TX descriptor link pointers.

This is required for the AR93xx and later chipsets.

The RX path is slightly different - the legacy RX path directly
accesses ath_desc->ds_link for now, however this isn't at all done
for EDMA (FIFO) RX.

Now, for those performing a little software archeology here:

This is all a bit sub-optimal. "struct ath_desc" is only really relevant
for the pre-AR93xx NICs - where ds_link and ds_data is always in the
same location.

The AR93xx and later NICs have different descriptor layouts altogether.

Now, for AR93xx and later NICs, you should never directly reference
ds_link and ds_data, as:

* the RX descriptors don't have either - the data is _after_ the RX
  descriptor.  They're just one large buffer.  There's also no need for
  a per-descriptor RX buffer size as they're all fixed sizes.

* the TX descriptors have 4 buffer and 4 length fields _and_ a link
  pointer.  Each frame takes up one TX FIFO pointer, but it can contain
  multiple subframes (either multiple frames in a buffer, and/or
  multiple frames in an aggregate/RIFS burst.)

* .. so, when TX frames are queued to a hardware queue, the link
  pointer is ONLY for buffers in that frame/aggregate.  The next frame
  starts in a new FIFO pointer.

* Finally, descriptor completion status is in a different ring.
  I'll write something up about that when its time to do so.

This was inspired by Linux ath9k and the reference driver but is a
reimplementation.

Obtained from: Linux ath9k, Qualcomm Atheros

12 years agoUse HAL_NUM_RX_QUEUES rather than a magic constant.
adrian [Thu, 19 Jul 2012 03:18:15 +0000 (03:18 +0000)]
Use HAL_NUM_RX_QUEUES rather than a magic constant.

12 years agoBreak out the TX descriptor link field into HAL methods.
adrian [Thu, 19 Jul 2012 02:25:14 +0000 (02:25 +0000)]
Break out the TX descriptor link field into HAL methods.

The DMA FIFO chips (AR93xx and later) differ slightly to th elegacy
chips:

* The RX DMA descriptors don't have a ds_link field;
* The TX DMA descriptors have a ds_link field however at a different
  offset.

This is a reimplementation based on what the reference driver and ath9k
does.

A subsequent commit will enable it in the TX and beacon paths.

Obtained from: Linux ath9k, Qualcomm Atheros

12 years agoXref mwl(4) and rum(4) in hostapd(8).
gjb [Wed, 18 Jul 2012 23:32:12 +0000 (23:32 +0000)]
Xref mwl(4) and rum(4) in hostapd(8).

MFC after: 3 days

12 years agoMove -n ${_jail} before ${_flags} so that any -n options in ${_flags}
des [Wed, 18 Jul 2012 23:01:23 +0000 (23:01 +0000)]
Move -n ${_jail} before ${_flags} so that any -n options in ${_flags}
will override ours instead of the other way around.

12 years agoDo not restart scan of the inactive queue when non-inactive page is
kib [Wed, 18 Jul 2012 21:47:50 +0000 (21:47 +0000)]
Do not restart scan of the inactive queue when non-inactive page is
found. Rather, we shall not find such pages on inactive queue at all.

Requested and reviewed by: alc
MFC after:    2 weeks

12 years agoAdd some examples about how to use FreeBSD's libusb20 in your own
joerg [Wed, 18 Jul 2012 21:30:17 +0000 (21:30 +0000)]
Add some examples about how to use FreeBSD's libusb20 in your own
code.

12 years agoAdd -g (gigabyte) flag to complement -k (kilobyte) and -m (megabyte).
des [Wed, 18 Jul 2012 19:28:22 +0000 (19:28 +0000)]
Add -g (gigabyte) flag to complement -k (kilobyte) and -m (megabyte).

MFC after: 1 week

12 years agoOn BIO_ERROR, set bio_resid to stop losing data in the error case.
sbruno [Wed, 18 Jul 2012 18:10:27 +0000 (18:10 +0000)]
On BIO_ERROR, set bio_resid to stop losing data in the error case.

Submitted by: Mark Johnston <markjdb@gmail.com>
Reviewed by: scottl@freebsd.org
MFC after: 2 weeks

12 years agoReturn zero from get_addrselectpolicy() when no source-address-selection
emax [Wed, 18 Jul 2012 15:52:09 +0000 (15:52 +0000)]
Return zero from get_addrselectpolicy() when no source-address-selection
policy is installed.

MFC after: 1 week

12 years agoOn AMD64, provide siginfo.si_code for floating point errors when error
kib [Wed, 18 Jul 2012 15:43:47 +0000 (15:43 +0000)]
On AMD64, provide siginfo.si_code for floating point errors when error
occurs using the SSE math processor.  Update comments describing the
handling of the exception status bits in coprocessors control words.

Remove GET_FPU_CW and GET_FPU_SW macros which were used only once.
Prefer to use curpcb to access pcb_save over the longer path of
referencing pcb through the thread structure.

Based on the submission by: Ed Alley <wea llnl gov>
PR:   amd64/169927
Reviewed by: bde
MFC after: 3 weeks

12 years agoAdd stmxcsr.
kib [Wed, 18 Jul 2012 15:36:03 +0000 (15:36 +0000)]
Add stmxcsr.

Submitted by: Ed Alley <wea llnl gov>
PR:   amd64/169927
MFC after: 3 weeks

12 years agoFix some typos in r238595.
mav [Wed, 18 Jul 2012 12:41:09 +0000 (12:41 +0000)]
Fix some typos in r238595.

Reported by: brueffer

12 years agoAdd bunch of new ASC/ASCQ values from T10 site.
mav [Wed, 18 Jul 2012 12:23:45 +0000 (12:23 +0000)]
Add bunch of new ASC/ASCQ values from T10 site.

12 years agoFix a small memory leak in mpssas_get_sata_identify(). The change has been
brueffer [Wed, 18 Jul 2012 09:06:07 +0000 (09:06 +0000)]
Fix a small memory leak in mpssas_get_sata_identify().  The change has been
submitted upstream as well.

Reviewed by: ken, scottl
Obtained from: DragonFly BSD (change df8658e030226dd015cff9749452666d8fe1e87b)
MFC after: 5 days

12 years agoPlug a reference leak: before doing 'goto again' we need to unref
glebius [Wed, 18 Jul 2012 08:58:30 +0000 (08:58 +0000)]
Plug a reference leak: before doing 'goto again' we need to unref
ia->ia_ifa if there is any.

Submitted by: Andrey Zonov <andrey zonov.org>

12 years agoWhen traversing global in_ifaddr list in the IFP_TO_IA() macro, we need
glebius [Wed, 18 Jul 2012 08:41:00 +0000 (08:41 +0000)]
When traversing global in_ifaddr list in the IFP_TO_IA() macro, we need
to obtain IN_IFADDR_RLOCK().

12 years agoAdd missing free.
trasz [Wed, 18 Jul 2012 07:26:20 +0000 (07:26 +0000)]
Add missing free.

12 years agoSort per the comment.
obrien [Wed, 18 Jul 2012 07:07:54 +0000 (07:07 +0000)]
Sort per the comment.

12 years agoa ";" tells make we want the shell to be used
obrien [Wed, 18 Jul 2012 05:57:42 +0000 (05:57 +0000)]
a ";" tells make we want the shell to be used

Submitted by: Simon Gerraty <sjg@juniper.net>

12 years agoRemoving bsd{ar,ranlib} found on my ancient installation.
avatar [Wed, 18 Jul 2012 05:50:40 +0000 (05:50 +0000)]
Removing bsd{ar,ranlib} found on my ancient installation.

MFC after: 3 weeks

12 years agoMove what remains of vm/vm_contig.c into vm/vm_pageout.c, where similar
alc [Wed, 18 Jul 2012 05:21:34 +0000 (05:21 +0000)]
Move what remains of vm/vm_contig.c into vm/vm_pageout.c, where similar
code resides.  Rename vm_contig_grow_cache() to vm_pageout_grow_cache().

Reviewed by: kib

12 years agoAdd back spare fields consumed in r237545. It seems that these should only
ken [Tue, 17 Jul 2012 22:16:10 +0000 (22:16 +0000)]
Add back spare fields consumed in r237545.  It seems that these should only
be consumed to maintain backward compatibility in stable, but should not be
consumed in head.

Submitted by: trasz, attilio (indirectly)

12 years agoDtrace: improve handling of library paths.
pfg [Tue, 17 Jul 2012 19:57:34 +0000 (19:57 +0000)]
Dtrace: improve handling of library paths.

Merge changes from illumos

906 dtrace depends_on pragma should search all library paths, not just the
current one

949 dtrace should only include the first instance of a library found on
its library path

Illumos Revisions: 13353:936a1e45726c
13354:2b2c36a81512

Reference:
https://www.illumos.org/issues/906
https://www.illumos.org/issues/949

Tested by: Fabian Keil
Obtained from: Illumos
MFC after: 3 weeks

12 years agoChange UL to ULL since time is 32 bits.
gnn [Tue, 17 Jul 2012 14:36:40 +0000 (14:36 +0000)]
Change UL to ULL since time is 32 bits.

Pointed out by: avg@
MFC after: 2 weeks

12 years agoFor Intel Panther/Lynx Point USB 3.0 xHCI controllers enable SuperSpeed USB
mav [Tue, 17 Jul 2012 14:03:04 +0000 (14:03 +0000)]
For Intel Panther/Lynx Point USB 3.0 xHCI controllers enable SuperSpeed USB
capability and reroute USB 2.0 ports to the xHCI controller.

Reviewed by: hselasky

12 years agoFix a refcount bug when freeing an association.
tuexen [Tue, 17 Jul 2012 13:03:47 +0000 (13:03 +0000)]
Fix a refcount bug when freeing an association.
While there: Change code to be consistent.
Discussed with rrs@.
MFC after: 3 days

12 years agoMake sure that arraysz is initialized to a value larger than zero.
jh [Tue, 17 Jul 2012 09:34:52 +0000 (09:34 +0000)]
Make sure that arraysz is initialized to a value larger than zero.
arraysz could get initialized to zero on ZFS because ZFS reports
directory sizes differently compared to UFS.

PR: bin/169493
Tested by: swills
MFC after: 2 weeks

12 years agoRemove trailing whitespace.
jh [Tue, 17 Jul 2012 09:31:05 +0000 (09:31 +0000)]
Remove trailing whitespace.

MFC after: 2 weeks

12 years agoMove unmask IRQ function call up to nexus device level.
gonzo [Tue, 17 Jul 2012 03:18:12 +0000 (03:18 +0000)]
Move unmask IRQ function call up to nexus device level.

FDT-enabled targets were broken after r238043 that relies
on device up the hierarchy to properly setup interrupt.
nexus device for ARM platforms did job only partially:
setting handler but not unmasking interrupt. Unmasking
was performed by platform code.

Reviewed by: andrew@

12 years agoCorrect vm_page_alloc_contig()'s implementation of VM_ALLOC_NODUMP.
alc [Tue, 17 Jul 2012 02:36:59 +0000 (02:36 +0000)]
Correct vm_page_alloc_contig()'s implementation of VM_ALLOC_NODUMP.

12 years agoPut parenthesis around sizeof args.
kevlo [Tue, 17 Jul 2012 02:05:39 +0000 (02:05 +0000)]
Put parenthesis around sizeof args.

12 years agoIn ipfw(8), make the text about dynamic rules consistent.
issyl0 [Mon, 16 Jul 2012 22:15:30 +0000 (22:15 +0000)]
In ipfw(8), make the text about dynamic rules consistent.

PR: docs/120539
Approved by: gabor (mentor)
MFC after: 5 days

12 years agoSimply error handling by moving the allocation of np down to where it is
brueffer [Mon, 16 Jul 2012 22:07:29 +0000 (22:07 +0000)]
Simply error handling by moving the allocation of np down to where it is
actually used.  While here, improve style a little.

Submitted by: mjg
MFC after: 2 weeks

12 years agoMetaflush on/off values don't need quotes.
trociny [Mon, 16 Jul 2012 20:43:28 +0000 (20:43 +0000)]
Metaflush on/off values don't need quotes.

Reviewed by: pjd
MFC after: 3 days

12 years agoAdd support for walltimestamp in DTrace.
gnn [Mon, 16 Jul 2012 20:17:19 +0000 (20:17 +0000)]
Add support for walltimestamp in DTrace.

Submitted by: Fabian Keil
MFC after: 2 weeks

12 years agoVarious improvements to vm_contig_grow_cache(). Most notably, even when
alc [Mon, 16 Jul 2012 18:13:43 +0000 (18:13 +0000)]
Various improvements to vm_contig_grow_cache().  Most notably, even when
it can't sleep, it can still move clean pages from the inactive queue to
the cache.  Also, when a page is cached, there is no need to restart the
scan.  The "next" page pointer held by vm_contig_launder() is still
valid.  Finally, add a comment summarizing what vm_contig_grow_cache()
does based upon the value of "tries".

MFC after: 3 weeks

12 years agoAdd a script that traces NFS attribute cache accesses.
gnn [Mon, 16 Jul 2012 17:48:43 +0000 (17:48 +0000)]
Add a script that traces NFS attribute cache accesses.

Submitted by: rwatson
MFC after: 2 weeks

12 years agoThe resize GEOM event has no references, thus cannot be canceled.
trasz [Mon, 16 Jul 2012 17:41:38 +0000 (17:41 +0000)]
The resize GEOM event has no references, thus cannot be canceled.

12 years agoAdd back spare fields reused in r238213. According to Attilio, the rule
trasz [Mon, 16 Jul 2012 16:50:28 +0000 (16:50 +0000)]
Add back spare fields reused in r238213.  According to Attilio, the rule
is to use reuse spares only when MFC-ing, not in CURRENT.

12 years agoAdd new USB device ID.
hselasky [Mon, 16 Jul 2012 10:12:07 +0000 (10:12 +0000)]
Add new USB device ID.

PR: usb/169789
Submitted by: Ruslan Bukin
MFC after: 1 week

12 years ago- Add support for displaying process stack memory regions.
pgj [Mon, 16 Jul 2012 09:38:19 +0000 (09:38 +0000)]
- Add support for displaying process stack memory regions.

Approved by: rwatson
MFC after: 3 days

12 years agoAdd new USB device ID.
hselasky [Mon, 16 Jul 2012 09:35:47 +0000 (09:35 +0000)]
Add new USB device ID.

PR: usb/169789
MFC after: 1 week

12 years agoIf ip_output() returns EMSGSIZE to tcp_output(), then the latter calls
glebius [Mon, 16 Jul 2012 07:08:34 +0000 (07:08 +0000)]
If ip_output() returns EMSGSIZE to tcp_output(), then the latter calls
tcp_mtudisc(), which in its turn may call tcp_output(). Under certain
conditions (must admit they are very special) an infinite recursion can
happen.

To avoid recursion we can pass struct route to ip_output() and obtain
correct mtu. This allows us not to use tcp_mtudisc() but call tcp_mss_update()
directly.

PR: kern/155585
Submitted by: Andrey Zonov <andrey zonov.org> (original version of patch)

12 years agoAllow netstat to be build if INET is not defined in the kernel.
tuexen [Mon, 16 Jul 2012 06:43:04 +0000 (06:43 +0000)]
Allow netstat to be build if INET is not defined in the kernel.
Thanks to Garrett Cooper for reporting the issue.

MFC after: 3 days
X-MFC: 238501

12 years agoCorrect an off-by-one error in vm_reserv_alloc_contig() that resulted in
alc [Sun, 15 Jul 2012 21:46:19 +0000 (21:46 +0000)]
Correct an off-by-one error in vm_reserv_alloc_contig() that resulted in
the last reservation of a multi-reservation allocation not being
initialized.

12 years agoUse libc's strndup() instead of Dtrace's reimplementation.
pfg [Sun, 15 Jul 2012 21:20:31 +0000 (21:20 +0000)]
Use libc's strndup() instead of Dtrace's reimplementation.

Corresponds partially to OpenSolaris change:
PSARC 2010/299 GNU/Linux/BSD compatibility functions
6901783 strndup would be nice

MFC after: 2 weeks

12 years agostty: Mark usage() __dead2.
jilles [Sun, 15 Jul 2012 21:12:22 +0000 (21:12 +0000)]
stty: Mark usage() __dead2.

This reduces code size a little and should fix a scan-build warning.

12 years agoHandle RX Keymiss events.
adrian [Sun, 15 Jul 2012 20:51:41 +0000 (20:51 +0000)]
Handle RX Keymiss events.

The AR9003 series NICs implement a separate RX error to signal that a
Keycache miss occured.  The earlier NICs would not set the key index
valid bit.

I'll dig into the difference between "no key index bit set" and "keycache
miss".

12 years agoLog the number of handled decsriptors and valid descriptors when
adrian [Sun, 15 Jul 2012 20:48:21 +0000 (20:48 +0000)]
Log the number of handled decsriptors and valid descriptors when
hitting RXEOL.

12 years agolibc: Remove some unused strings from getaddrinfo().
jilles [Sun, 15 Jul 2012 20:39:21 +0000 (20:39 +0000)]
libc: Remove some unused strings from getaddrinfo().

12 years agoFix a bug with memguard(9) on 32-bit architectures without a
mdf [Sun, 15 Jul 2012 20:29:48 +0000 (20:29 +0000)]
Fix a bug with memguard(9) on 32-bit architectures without a
VM_KMEM_MAX_SIZE.

The code was not taking into account the size of the kernel_map, which
the kmem_map is allocated from, so it could produce a sub-map size too
large to fit.  The simplest solution is to ignore VM_KMEM_MAX entirely
and base the memguard map's size off the kernel_map's size, since this
is always relevant and always smaller.

Found by: Justin Hibbits