]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoDtrace: resolve const types from fbt and other fixes.
pfg [Fri, 12 Apr 2013 20:10:27 +0000 (20:10 +0000)]
Dtrace: resolve const types from fbt and other fixes.

Merge change from illumos:

3519 DTrace fails to resolve const types from fbt
3520 dtrace internal error -- token type 316 is not a valid D
     compilation token
3521 clean up dtrace unit tests

Illumos Revision: e98f46c

Reference:
https://www.illumos.org/issues/3519
https://www.illumos.org/issues/3520
https://www.illumos.org/issues/3521

Tested by: Fabian Keil
Obtained from: Illumos
MFC after: 1 month

11 years agolibthr: Remove _thr_rtld_fini(), unused since r245630.
jilles [Fri, 12 Apr 2013 19:47:32 +0000 (19:47 +0000)]
libthr: Remove _thr_rtld_fini(), unused since r245630.

11 years agoUpgrade our copy of llvm/clang to trunk r178860, in preparation of the
dim [Fri, 12 Apr 2013 17:57:40 +0000 (17:57 +0000)]
Upgrade our copy of llvm/clang to trunk r178860, in preparation of the
upcoming 3.3 release (branching and freezing expected in a few weeks).

Preliminary release notes can be found at the usual location:
<http://llvm.org/docs/ReleaseNotes.html>

An MFC is planned once the actual 3.3 release is finished.

11 years agoRemove the NVME_IDENTIFY_CONTROLLER and NVME_IDENTIFY_NAMESPACE IOCTLs and replace
jimharris [Fri, 12 Apr 2013 17:56:47 +0000 (17:56 +0000)]
Remove the NVME_IDENTIFY_CONTROLLER and NVME_IDENTIFY_NAMESPACE IOCTLs and replace
them with the NVMe passthrough equivalent.

Sponsored by: Intel

11 years agoAdd support for passthrough NVMe commands.
jimharris [Fri, 12 Apr 2013 17:52:17 +0000 (17:52 +0000)]
Add support for passthrough NVMe commands.

This includes a new IOCTL to support a generic method for nvmecontrol(8) to pass
IDENTIFY, GET_LOG_PAGE, GET_FEATURES and other commands to the controller, rather than
separate IOCTLs for each.

Sponsored by: Intel

11 years agoMove the busdma mapping functions to nvme_qpair.c.
jimharris [Fri, 12 Apr 2013 17:48:45 +0000 (17:48 +0000)]
Move the busdma mapping functions to nvme_qpair.c.

This removes nvme_uio.c completely.

Sponsored by: Intel

11 years agoRemove the NVMe-specific physio and associated routines.
jimharris [Fri, 12 Apr 2013 17:44:55 +0000 (17:44 +0000)]
Remove the NVMe-specific physio and associated routines.

These were added early on for benchmarking purposes to avoid the mapped I/O
penalties incurred in kern_physio.  Now that FreeBSD (including kern_physio)
supports unmapped I/O, the need for these NVMe-specific routines no longer exists.

Sponsored by: Intel

11 years agoAdd a mutex to each namespace, for general locking operations on the namespace.
jimharris [Fri, 12 Apr 2013 17:41:24 +0000 (17:41 +0000)]
Add a mutex to each namespace, for general locking operations on the namespace.

Sponsored by: Intel

11 years agoRename the controller's fail_req_lock, so that it can be used for other
jimharris [Fri, 12 Apr 2013 17:36:48 +0000 (17:36 +0000)]
Rename the controller's fail_req_lock, so that it can be used for other
locking operations on the controller.

Sponsored by: Intel

11 years agoDo not panic when a busdma mapping operation fails.
jimharris [Fri, 12 Apr 2013 17:34:49 +0000 (17:34 +0000)]
Do not panic when a busdma mapping operation fails.

Instead, print an error message and fail the associated command with
DATA_TRANSFER_ERROR NVMe completion status.

Sponsored by: Intel

11 years agoMove MIPS_MAX_TLB_ENTRIES definition from cpuregs.h to tlb.c
jchandra [Fri, 12 Apr 2013 17:22:12 +0000 (17:22 +0000)]
Move MIPS_MAX_TLB_ENTRIES definition from cpuregs.h to tlb.c

Having MIPS_MAX_TLB_ENTRIES defined to 128 is misleading, since it used
to be 64 in older releases of MIPS architecture (where it could be read
from Config1) and can be much more than 128 for the newer processors.

For now, move the definition to the only file using it (mips/mips/tlb.c)
and define MIPS_MAX_TLB_ENTRIES depending on the MIPS cpu defined. Also
add few checks so that we do not write beyond the end of the tlb_state
array.

This fixes a kernel data corruption seen in Netlogic XLP, which was casued
by tlb_save() writing beyond the end of tlb_state array when breaking into
debugger.

11 years agoAdd some more dates and relationships.
gavin [Fri, 12 Apr 2013 17:01:07 +0000 (17:01 +0000)]
Add some more dates and relationships.

Submitted by: jkoshy, gj, dfr

11 years agoFix usage for soreceive(9) - uio must always be non-NULL.
trasz [Fri, 12 Apr 2013 16:36:18 +0000 (16:36 +0000)]
Fix usage for soreceive(9) - uio must always be non-NULL.

MFC after: 1 week

11 years agoReflect removing of the counter_u64_subtract() function in the macro.
ae [Fri, 12 Apr 2013 16:29:15 +0000 (16:29 +0000)]
Reflect removing of the counter_u64_subtract() function in the macro.

11 years agoRemove ctl(4) from GENERIC. Also remove 'options CTL_DISABLE'
trasz [Fri, 12 Apr 2013 16:25:03 +0000 (16:25 +0000)]
Remove ctl(4) from GENERIC.  Also remove 'options CTL_DISABLE'
and kern.cam.ctl.disable tunable; those were introduced as a workaround
to make it possible to boot GENERIC on low memory machines.

With ctl(4) being built as a module and automatically loaded by ctladm(8),
this makes CTL work out of the box.

Reviewed by: ken
Sponsored by: FreeBSD Foundation

11 years agoFix incorrect KASSERTs in xlpge
jchandra [Fri, 12 Apr 2013 16:03:22 +0000 (16:03 +0000)]
Fix incorrect KASSERTs in xlpge

Fix for crash in Netlogic XLP network accelerator driver when invariants
are enabled - use correct the condition for KASSERT.

11 years agoFix kenv behavior when there is no static environment
jchandra [Fri, 12 Apr 2013 15:58:53 +0000 (15:58 +0000)]
Fix kenv behavior when there is no static environment

In case where there are no static kernel environment entries, the
function init_dynamic_kenv() adds an incorrect entry at position 0 of
the dynamic kernel environment. This in turn causes kenv(1) to print
and empty list even though there are dynamic entries added later.

Fix this by checking env_pos in init_dynamic_kenv() and adding dynamic
entries only if there are static entries.

11 years agosh: Don't modify exit status when break/continue/return passes !.
jilles [Fri, 12 Apr 2013 15:19:35 +0000 (15:19 +0000)]
sh: Don't modify exit status when break/continue/return passes !.

This matches what would happen if  ! P  were to be replaced with
if P; then false; else true; fi.

Example:
  f() { ! return 0; }; f

11 years ago- Do not bail out if stat(2) fails with ENOENT in the spool directory. This
gahr [Fri, 12 Apr 2013 14:32:16 +0000 (14:32 +0000)]
- Do not bail out if stat(2) fails with ENOENT in the spool directory. This
  happens if another atrm process removes a job while we're scanning through
  the directory.
- While at it, optimize a bit the directory scanning, so that we quit looping
  as soon as all jobs specified in argv have been dealt with.

Approved by: cognet

11 years ago- Switch order of setting real uid and gid. If we set uid first, then we
gahr [Fri, 12 Apr 2013 14:19:44 +0000 (14:19 +0000)]
- Switch order of setting real uid and gid. If we set uid first, then we
  don't have enough privileges to set gid.

  This looks like a long standing bug, just recently revealed by r241852.

Approved by: cognet

11 years agoisa_if.h is indirectly included.
bz [Fri, 12 Apr 2013 13:56:21 +0000 (13:56 +0000)]
isa_if.h is indirectly included.
Depend on it to unbreak pc98 builds.

11 years agoAttempt to clean up spacing and long lines.
glebius [Fri, 12 Apr 2013 08:52:19 +0000 (08:52 +0000)]
Attempt to clean up spacing and long lines.

11 years agoUpdate with several early mentor/mentee relationships and dates commit
gavin [Fri, 12 Apr 2013 08:39:18 +0000 (08:39 +0000)]
Update with several early mentor/mentee relationships and dates commit
bits were granted.  Relationships have been provided by the mentees,
dates have been sourced from either the mentees or the CVS mailing list
archives.

Obtained from: mux, wilko, msmith, peter, schweikh
Obtained from: gallatin, dfr, murray, jkoshy

11 years agoFree memory after deleting an address policy entry.
ae [Fri, 12 Apr 2013 07:59:54 +0000 (07:59 +0000)]
Free memory after deleting an address policy entry.

MFC after: 1 week

11 years agoFix a few typos.
delphij [Fri, 12 Apr 2013 02:01:17 +0000 (02:01 +0000)]
Fix a few typos.

Reviewed by: gjb
MFC after: 3 days

11 years agoIf vmm.ko could not be initialized correctly then prevent the creation of
neel [Fri, 12 Apr 2013 01:16:52 +0000 (01:16 +0000)]
If vmm.ko could not be initialized correctly then prevent the creation of
virtual machines subsequently.

Submitted by: Chris Torek

11 years agoIf doing buildworld -DWITH_BMAKE make sure bmake does the build.
sjg [Fri, 12 Apr 2013 00:34:19 +0000 (00:34 +0000)]
If doing buildworld -DWITH_BMAKE make sure bmake does the build.

11 years agoAdd pciids of the T5 based cards. The ones that I haven't tested with
np [Thu, 11 Apr 2013 23:40:05 +0000 (23:40 +0000)]
Add pciids of the T5 based cards.  The ones that I haven't tested with
cxgbe(4) are disabled for now.  This will change.

MFC after: 2 weeks

11 years agoCosmetic change (s/wrwc/wcwr/;s/WRWC/WCWR/).
np [Thu, 11 Apr 2013 22:49:29 +0000 (22:49 +0000)]
Cosmetic change (s/wrwc/wcwr/;s/WRWC/WCWR/).

MFC after: 3 days.

11 years agoAuto-reduce the holdoff timers that are greater than the maximum value
np [Thu, 11 Apr 2013 22:46:39 +0000 (22:46 +0000)]
Auto-reduce the holdoff timers that are greater than the maximum value
allowed by the hardware.

MFC after: 3 days

11 years agoGenerate a LINT for powerpc and for powerpc64.
bz [Thu, 11 Apr 2013 22:18:20 +0000 (22:18 +0000)]
Generate a LINT for powerpc and for powerpc64.

Discussed with: nwhitehorn

11 years agoAlways enable TXOK interrupts when setting up TX queues for EDMA NICs.
adrian [Thu, 11 Apr 2013 22:02:35 +0000 (22:02 +0000)]
Always enable TXOK interrupts when setting up TX queues for EDMA NICs.

11 years agocxgbe/tom: Slight simplification of code that calculates options2.
np [Thu, 11 Apr 2013 21:36:01 +0000 (21:36 +0000)]
cxgbe/tom: Slight simplification of code that calculates options2.

MFC after: 3 days

11 years agoFix bugs in the elapsed time calculation in ctlstat_standard()
ken [Thu, 11 Apr 2013 21:18:04 +0000 (21:18 +0000)]
Fix bugs in the elapsed time calculation in ctlstat_standard()
pointed out by bde:

- Casting to long double isn't needed.
- The division isn't needed, multiplication can be used.
  "When 1 nanosecond is in a floating point literal, the whole
  expression is automatically promoted correctly."
- non-KNF indentation (1 tab) for the newly split line
- different non-KNF indentation (5 spaces) for the previously split
  line
- exessive parentheses around the division operation
- bogus blank line which splits up the etime initialization
- general verboseness from the above.

Submitted by: bde
MFC after: 3 days

11 years agoGet rid of a couple of stray \n's.
np [Thu, 11 Apr 2013 21:17:49 +0000 (21:17 +0000)]
Get rid of a couple of stray \n's.

MFC after: 3 days.

11 years agoThere is no need for elaborate queries and error checking when trying to
np [Thu, 11 Apr 2013 21:15:35 +0000 (21:15 +0000)]
There is no need for elaborate queries and error checking when trying to
set FW4MSG_ENCAP.

MFC after: 3 days

11 years agoSpelling correction
emaste [Thu, 11 Apr 2013 20:15:37 +0000 (20:15 +0000)]
Spelling correction

11 years agoDocument sbuf_start_section() and sbuf_end_section() functions.
trociny [Thu, 11 Apr 2013 19:51:53 +0000 (19:51 +0000)]
Document sbuf_start_section() and sbuf_end_section() functions.

MFC after: 1 month

11 years agoAdd sbuf_start_section and sbuf_end_section to the libsbuf symbol map.
trociny [Thu, 11 Apr 2013 19:50:10 +0000 (19:50 +0000)]
Add sbuf_start_section and sbuf_end_section to the libsbuf symbol map.

MFC after: 1 month

11 years agoAdd sbuf_start_section() and sbuf_end_section() functions, which can
trociny [Thu, 11 Apr 2013 19:49:18 +0000 (19:49 +0000)]
Add sbuf_start_section() and sbuf_end_section() functions, which can
be used for automatic section alignment.

Discussed with: kib
Reviewed by: kib
MFC after: 1 month

11 years ago- Explain clearly why a different firmware is being installed (if/when
np [Thu, 11 Apr 2013 19:39:40 +0000 (19:39 +0000)]
- Explain clearly why a different firmware is being installed (if/when
  it is being installed).  Improve other error messages while here.

- Select special FPGA specific configuration profile when appropriate.

MFC after: 3 days

11 years agoMinor spelling and grammar fixes.
joel [Thu, 11 Apr 2013 19:05:24 +0000 (19:05 +0000)]
Minor spelling and grammar fixes.

11 years agoRemove contractions.
joel [Thu, 11 Apr 2013 18:46:41 +0000 (18:46 +0000)]
Remove contractions.

11 years agoFix tcp_output() so that tcpcb is updated in the same manner when an
glebius [Thu, 11 Apr 2013 18:23:56 +0000 (18:23 +0000)]
Fix tcp_output() so that tcpcb is updated in the same manner when an
mbuf allocation fails, as in a case when ip_output() returns error.

To achieve that, move large block of code that updates tcpcb below
the out: label.

This fixes a panic, that requires the following sequence to happen:

1) The SYN was sent to the network, tp->snd_nxt = iss + 1, tp->snd_una = iss
2) The retransmit timeout happened for the SYN we had sent,
   tcp_timer_rexmt() sets tp->snd_nxt = tp->snd_una, and calls tcp_output().
   In tcp_output m_get() fails.
3) Later on the SYN|ACK for the SYN sent in step 1) came,
   tcp_input sets tp->snd_una += 1, which leads to
   tp->snd_una > tp->snd_nxt inconsistency, that later panics in
   socket buffer code.

For reference, this bug fixed in DragonflyBSD repo:

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/1ff9b7d322dc5a26f7173aa8c38ecb79da80e419

Reviewed by: andre
Tested by: pho
Sponsored by: Nginx, Inc.
PR: kern/177456
Submitted by: HouYeFei&XiBoLiu <lglion718 163.com>

11 years agoRemove kernel options from the SYNOPSIS. They are already documented in the
joel [Thu, 11 Apr 2013 18:02:42 +0000 (18:02 +0000)]
Remove kernel options from the SYNOPSIS. They are already documented in the
geom(4) manual page SYNOPSIS.

11 years agocxgbe(4): Ensure that the MOD_LOAD handler runs before either t4nex or
np [Thu, 11 Apr 2013 17:50:50 +0000 (17:50 +0000)]
cxgbe(4): Ensure that the MOD_LOAD handler runs before either t4nex or
t5nex attach to their devices.

MFC after: 3 days

11 years ago- Add entries for alc and akoszek, alredy referenced elsewhere
gavin [Thu, 11 Apr 2013 17:16:08 +0000 (17:16 +0000)]
- Add entries for alc and akoszek, alredy referenced elsewhere
- Add phk -> mux relationship, confirmed by mux@
- Add scottl -> sbruno relationship
- Move four ex-committers to the alumni section
- Sort.

11 years agoSet and display the IP fragment bit correctly when dealing with
np [Thu, 11 Apr 2013 16:50:58 +0000 (16:50 +0000)]
Set and display the IP fragment bit correctly when dealing with
the filter mode.

MFC after: 3 days.

11 years agoDTrace: option for time-ordered output
pfg [Thu, 11 Apr 2013 16:24:36 +0000 (16:24 +0000)]
DTrace: option for time-ordered output

Merge changes from illumos:

3021 option for time-ordered output from dtrace(1M)
3022 DTrace: keys should not affect the sort order when sorting by value
3023 it should be possible to dereference dynamic variables
3024 D integer narrowing needs some work
3025 register leak in D code generation
3026 libdtrace should set LD_NOLAZYLOAD=1 to help the pid provider

This brings yet another feature implemented in upstream DTrace.
A complete description is available here:
http://dtrace.org/blogs/ahl/2012/07/28/my-new-dtrace-favorite/

This change bumps the DT_VERS_* number to 1.9.1 in
accordance to what is done in illumos.

This change was somewhat complicated because upstream is mixed many
changes in an individual commit and some of the tests don't really
apply to us.

There are also appear to be differences in timestamping with Solaris
so we had to workaround some assertions making sure no regression
happened.

Special thanks to Fabian Keil for changes and testing.

Illumos Revisions: 13758:23432da34147

Reference:
https://www.illumos.org/issues/3021
https://www.illumos.org/issues/3022
https://www.illumos.org/issues/3023
https://www.illumos.org/issues/3024
https://www.illumos.org/issues/3025
https://www.illumos.org/issues/1694

Tested by: Fabian Keil
Obtained from: Illumos
MFC after: 1 months

11 years agoRemove EOL whitespace.
joel [Thu, 11 Apr 2013 13:05:38 +0000 (13:05 +0000)]
Remove EOL whitespace.

11 years agoRemove unused atomic header
emaste [Thu, 11 Apr 2013 12:49:42 +0000 (12:49 +0000)]
Remove unused atomic header

11 years agofuser(1) requires a filename.
eadler [Thu, 11 Apr 2013 12:24:29 +0000 (12:24 +0000)]
fuser(1) requires a filename.

Reviewed by: lstewart
Approved by: bcr (mentor)
MFC after: 3 days

11 years agoFix typo.
glebius [Thu, 11 Apr 2013 10:14:28 +0000 (10:14 +0000)]
Fix typo.

11 years agoFix libzfs to report error instead of returning zero if trying to hold or
mm [Thu, 11 Apr 2013 07:49:16 +0000 (07:49 +0000)]
Fix libzfs to report error instead of returning zero if trying to hold or
release a non-existing snapshot of a existing dataset. In recursive case
error is reported if no snapshots with the requested name have been found.

Problem and proposed solution reported to illumos:
  3699 zfs hold or release of a non-existent snapshot does not output error

MFC after: 8 days

11 years agoMFV r249354:
mm [Thu, 11 Apr 2013 07:40:30 +0000 (07:40 +0000)]
MFV r249354:
Merge bugfixes accepted and integrated by vendor. Underlying problems
have been reported by us and fixed in r240942 and r249196.

Illumos ZFS issues:
  3645 dmu_send_impl: possibilty of pool hold leak
  3692 Panic on zfs receive of a recursive deduplicated stream

MFC after: 8 days

11 years agoInclude types.h for C99 uintXX_t types.
glebius [Thu, 11 Apr 2013 07:30:49 +0000 (07:30 +0000)]
Include types.h for C99 uintXX_t types.

11 years agoDo not sent 120 TEST UNIT READY requests on generic NOT READY statuses.
mav [Thu, 11 Apr 2013 06:34:41 +0000 (06:34 +0000)]
Do not sent 120 TEST UNIT READY requests on generic NOT READY statuses.

Some failing disks tend to return vendor-specific ASC/ASCQ codes with
NOT READY sense key.  It caused extremely long recovery attempts, repeating
these 120 TURs (it takes at least 1 minute) for every I/O request.
Instead of that use default error handling, doing just few retries.

Reviewed by: ken, gibbs
MFC after: 1 month

11 years agoMake the code to check if VMX is enabled more readable by using macros
neel [Thu, 11 Apr 2013 04:29:45 +0000 (04:29 +0000)]
Make the code to check if VMX is enabled more readable by using macros
instead of magic numbers.

Discussed with: Chris Torek

11 years agoUpdate ciss(4) man page. We absolutely support performant mode of operation
sbruno [Wed, 10 Apr 2013 23:37:15 +0000 (23:37 +0000)]
Update ciss(4) man page.  We absolutely support performant mode of operation
on this controller.  Indicate that the 5300 is the *only* controller that
will only work in simple mode.

Bus rescans should not be needed now and I consider it a bug if disks do
not appear or dissapear when created or destroyed.

Obtained from: Yahoo! Inc

11 years agoWhile investigating a p/r I noted that the camcontrol devlist output for
sbruno [Wed, 10 Apr 2013 23:31:19 +0000 (23:31 +0000)]
While investigating a p/r I noted that the camcontrol devlist output for
volumes behind a ciss(4) controller were being reported with malformeed
names and identifiers.

Repair that reporting by using the CAM values for the three SCSI indents
reported via camcontrol devlist

PR: kern/171650
Reviewed by: scottl
Obtained from: Yahoo! Inc.
MFC after: 2 weeks

11 years agooptions DPT_HANDLE_TIMEOUTS hasn't worked since dpt(4) was converted to CAM
sbruno [Wed, 10 Apr 2013 23:20:09 +0000 (23:20 +0000)]
options DPT_HANDLE_TIMEOUTS hasn't worked since dpt(4) was converted to CAM
somewhere around svn r39402 to r39234.

I don't know of anyone who really wants to test these changes, but they
only remove the deprecated code in question.  This shreds the driver down a
bit and *removes* options from the kernel configs.

These don't appear to be referenced in the man page, so no need to check it
there.

PR: kern/44587
Obtained from: Yahoo! Inc.
MFC after: 2 weeks

11 years agoAdd a callback to the ada(4) driver so that it knows when GEOM has released
ken [Wed, 10 Apr 2013 22:12:21 +0000 (22:12 +0000)]
Add a callback to the ada(4) driver so that it knows when GEOM has released
references to it.

This is the functional equivalent to change r237518, which added this
functionality to the cd(4) and da(4) drivers.

This fix prevents a panic caused by GEOM calling adaopen() while the device
is going away.  We now keep the device around until GEOM has finished
cleaning up its state.

ata_da.c: In adaregister(), add a d_gone callback to the GEOM disk
structure registered for the ada driver.  Increment the
peripheral reference count for GEOM.

Add a new callback, adadiskgonecb(), that GEOM calls when
it is done with its resources.  This callback releases the
reference acquired in adaregister().

Submitted by: Po-Li Soong
Sponsored by: Spectra Logic
MFC After: 5 days

11 years agoCreate controller-level DMA tag, handling range of supported addresses.
mav [Wed, 10 Apr 2013 20:38:15 +0000 (20:38 +0000)]
Create controller-level DMA tag, handling range of supported addresses.
That simplifies logic for channels and gives the bus information about what
device actually allocated the tag.

Submitted by: jhb@

11 years agoUse kvm_counter_u64_fetch() to fix obtaining ipstat and tcpstat from
glebius [Wed, 10 Apr 2013 20:29:23 +0000 (20:29 +0000)]
Use kvm_counter_u64_fetch() to fix obtaining ipstat and tcpstat from
kernel core files.

Sponsored by: Nginx, Inc.

11 years agoo Provide function kvm_read_zpcpu() to access UMA_ZONE_PCPU allocations.
glebius [Wed, 10 Apr 2013 20:26:53 +0000 (20:26 +0000)]
o Provide function kvm_read_zpcpu() to access UMA_ZONE_PCPU allocations.
o Provide function kvm_counter_u64_fetch() to fetch valut of a counter(9).

Sponsored by: Nginx, Inc.

11 years agoNeed to call init_mem() to really initialize the MMIO range lookups.
neel [Wed, 10 Apr 2013 18:59:20 +0000 (18:59 +0000)]
Need to call init_mem() to really initialize the MMIO range lookups.

This was working by accident because:
- the RB_HEADs were being initialized to zero as part of BSS
- the pthread_rwlock functions were implicitly initializing the lock object

Obtained from: NetApp

11 years agoRemove obsolete comment about lack of locking for MMIO range lookup.
neel [Wed, 10 Apr 2013 18:53:14 +0000 (18:53 +0000)]
Remove obsolete comment about lack of locking for MMIO range lookup.

Pointed out by: Tycho Nightingale (tycho.nightingale@plurisbusnetworks.com)

11 years agoSimplify allocate_legacy code, txr pointer was breaking LEGACY compile,
jfv [Wed, 10 Apr 2013 17:51:39 +0000 (17:51 +0000)]
Simplify allocate_legacy code, txr pointer was breaking LEGACY compile,
thanks to Nick Rogers for pointing this out.

11 years agoAdd ID for ASMedia ASM1042 USB 3.0 controller.
mav [Wed, 10 Apr 2013 17:43:20 +0000 (17:43 +0000)]
Add ID for ASMedia ASM1042 USB 3.0 controller.

MFC after: 1 week

11 years agoSince UMA_ZONE_PCPU zones put a constraint on sizeof(struct pcpu), declared
glebius [Wed, 10 Apr 2013 16:09:45 +0000 (16:09 +0000)]
Since UMA_ZONE_PCPU zones put a constraint on sizeof(struct pcpu), declared
as CTASSERT in MI pcpu.h, stop including all possible mutually exclusive
PCPU_MD_FIELDS fields into LINT kernels, due to brekaing
aforementioned CTASSERT.

11 years agoFix a time calculation error in ctlstat_standard().
ken [Wed, 10 Apr 2013 16:01:45 +0000 (16:01 +0000)]
Fix a time calculation error in ctlstat_standard().

ctlstat.c: When converting a timeval to a floating point
number in ctlstat_standard(), cast the nanoseconds
calculation to a long double, so we don't lose
precision.  Without the cast, we wind up with a
time in whole seconds only.

Sponsored by: Spectra Logic
MFC after: 3 days

11 years agoRemove the number of addresses restriction from sctp_connectx().
tuexen [Wed, 10 Apr 2013 11:26:30 +0000 (11:26 +0000)]
Remove the number of addresses restriction from sctp_connectx().
Remove unused code.
While there, do some cleanup of the code.

MFC after: 1 week

11 years agoUpdate vendor/illumos/dist and vendor-sys/illumos/dist
mm [Wed, 10 Apr 2013 10:29:30 +0000 (10:29 +0000)]
Update vendor/illumos/dist and vendor-sys/illumos/dist
to illumos-gate 14005:55fc53126003

Illumos ZFS issues:
  3654 zdb should print number of ganged blocks
  3656 remove unused function zap_cursor_move_to_key()

11 years agoMake ctladm(8) try to load ctl.ko kernel module if needed.
trasz [Wed, 10 Apr 2013 08:48:10 +0000 (08:48 +0000)]
Make ctladm(8) try to load ctl.ko kernel module if needed.

Reviewed by: ken

11 years agoFix build.
glebius [Wed, 10 Apr 2013 08:09:25 +0000 (08:09 +0000)]
Fix build.

11 years agoCast to (void *)(uintptr_t) on copyout and copyin of zfs_iocparm_t.zfs_cmd
mm [Wed, 10 Apr 2013 07:01:17 +0000 (07:01 +0000)]
Cast to (void *)(uintptr_t) on copyout and copyin of zfs_iocparm_t.zfs_cmd

MFC after: 9 days

11 years agoUnsynchronized TSCs on the host require special handling in bhyve:
neel [Wed, 10 Apr 2013 05:59:07 +0000 (05:59 +0000)]
Unsynchronized TSCs on the host require special handling in bhyve:

- use clock_gettime(2) as the time base for the emulated ACPI timer instead
  of directly using rdtsc().

- don't advertise the invariant TSC capability to the guest to discourage it
  from using the TSC as its time base.

Discussed with: jhb@ (about making 'smp_tsc' a global)
Reported by: Dan Mack on freebsd-virtualization@
Obtained from: NetApp

11 years agoswapcontext wrapper can not be implemented in C, the stack pointer saved in
davidxu [Wed, 10 Apr 2013 02:40:03 +0000 (02:40 +0000)]
swapcontext wrapper can not be implemented in C, the stack pointer saved in
the context becomes invalid when the function returns, same as setjmp,
it must be implemented in assemble language, see discussions in PR
misc/177624.

11 years agoChange name of variable from 'rwlock' to more descriptive 'mmio_rwlock'
neel [Wed, 10 Apr 2013 02:18:17 +0000 (02:18 +0000)]
Change name of variable from 'rwlock' to more descriptive 'mmio_rwlock'

Requested by: grehan
Obtained from: NetApp

11 years agoImprove PCI BAR emulation:
neel [Wed, 10 Apr 2013 02:12:39 +0000 (02:12 +0000)]
Improve PCI BAR emulation:
- Respect the MEMEN and PORTEN bits in the command register
- Allow the guest to reprogram the address decoded by the BAR

Submitted by: Gopakumar T
Obtained from: NetApp

11 years agoFix the build.
jimharris [Wed, 10 Apr 2013 00:35:08 +0000 (00:35 +0000)]
Fix the build.

11 years agoZFS expects a copyout of zfs_cmd_t on an ioctl error. Our sys_ioctl()
mm [Tue, 9 Apr 2013 22:27:44 +0000 (22:27 +0000)]
ZFS expects a copyout of zfs_cmd_t on an ioctl error. Our sys_ioctl()
doesn't copyout in this case.

To solve this issue a new struct zfs_iocparm_t is introduced consisting of:
- zfs_ioctl_version (future backwards compatibility purposes)
- user space pointer to zfs_cmd_t (copyin and copyout)
- size of zfs_cmd_t (verification purposes)

The copyin and copyout of zfs_cmd_t is now done the illumos (vendor) way
what makes porting of new changes easier and ensures correct behavior if
returning an error.

MFC after: 10 days

11 years agoChange certain heavily used network related mutexes and rwlocks to
andre [Tue, 9 Apr 2013 21:02:20 +0000 (21:02 +0000)]
Change certain heavily used network related mutexes and rwlocks to
reside on their own cache line to prevent false sharing with other
nearby structures, especially for those in the .bss segment.

NB: Those mutexes and rwlocks with variables next to them that get
changed on every invocation do not benefit from their own cache line.
Actually it may be net negative because two cache misses would be
incurred in those cases.

11 years agoFix a race condition on tcp listen socket teardown with pending
andre [Tue, 9 Apr 2013 20:52:26 +0000 (20:52 +0000)]
Fix a race condition on tcp listen socket teardown with pending
connections in the accept queue and contiguous new incoming SYNs.

Compared to the original submitters patch I've moved the test
next to the SYN handling to have it together in a logical unit
and reworded the comment explaining the issue.

Submitted by: Matt Miller <matt@matthewjmiller.net>
Submitted by: Juan Mojica <jmojica@gmail.com>
Reviewed by: Matt Miller (changes)
Tested by: pho
MFC after: 1 week

11 years agoEnsure make -j N universe works correctly, by checking for an up-to-date
dim [Tue, 9 Apr 2013 20:21:35 +0000 (20:21 +0000)]
Ensure make -j N universe works correctly, by checking for an up-to-date
make before starting the universe targets themselves.  Otherwise, all of
the targets would attempt to build make simultaneously, overwriting each
other's copies of the make object files and executable.  This could lead
to strange errors, for example when partially-written make executables
are invoked.

Also amend r216620, to make the rest of universe wait properly until the
upgrade_checks target is finished, by adding universe_${target}_prologue
to the .ORDER target.  Otherwise, make will be too smart for its own
good, and start building the universe targets simultaneously with the
prologues anyway.

MFC after: 1 week

11 years agoProxy allocation requests for the PCI ROM BAR from child devices similar
jhb [Tue, 9 Apr 2013 19:36:34 +0000 (19:36 +0000)]
Proxy allocation requests for the PCI ROM BAR from child devices similar
to how the VGA bus driver currently proxies allocation requests for other
PCI BARs.

MFC after: 1 week

11 years agoPass the segmented address of the counter, based on %fs, i.e. offset
kib [Tue, 9 Apr 2013 17:55:39 +0000 (17:55 +0000)]
Pass the segmented address of the counter, based on %fs, i.e. offset
from the pcpu[0] to the counter base, instead of the linear address.

11 years agoConvert UMA code to C99 uintXX_t types.
glebius [Tue, 9 Apr 2013 17:43:48 +0000 (17:43 +0000)]
Convert UMA code to C99 uintXX_t types.

11 years agoSwap us_freecount and us_flags, achieving same structure size
glebius [Tue, 9 Apr 2013 17:25:15 +0000 (17:25 +0000)]
Swap us_freecount and us_flags, achieving same structure size
as before previous commit.

Submitted by: alc

11 years agoAdd static/const keywords to the arrays.
ed [Tue, 9 Apr 2013 16:16:34 +0000 (16:16 +0000)]
Add static/const keywords to the arrays.

This theoretically allows a compiler to optimize (parts of) the array
away if unused.

While there, make the array size implicit and use a _Static_assert() to
ensure that the definition matches up with the number of elements in the
list.

11 years agoSince now we support 256 items per slab, we need more bits
glebius [Tue, 9 Apr 2013 15:15:52 +0000 (15:15 +0000)]
Since now we support 256 items per slab, we need more bits
for us_freecount.

This grows uma_slab_head on 32-bit arches, but growth isn't
significant. Taking kmem zones as example, only the 32 byte
zone is affected, ipers is reduced from 113 to 112.

In collaboration with: kib

11 years agoLast remaining prototype issue that still hasn't been fixed upstream.
des [Tue, 9 Apr 2013 13:16:11 +0000 (13:16 +0000)]
Last remaining prototype issue that still hasn't been fixed upstream.

11 years agoRevert local changes and pull in r3828 from upstream.
des [Tue, 9 Apr 2013 13:14:39 +0000 (13:14 +0000)]
Revert local changes and pull in r3828 from upstream.

11 years agoFix KASSERTs: maximum number of items per slab is 256.
glebius [Tue, 9 Apr 2013 12:20:44 +0000 (12:20 +0000)]
Fix KASSERTs: maximum number of items per slab is 256.

11 years agoFix build for AIM 64bit.
kib [Tue, 9 Apr 2013 12:01:54 +0000 (12:01 +0000)]
Fix build for AIM 64bit.

11 years agoFix the assertions for the state of the object under the map entry
kib [Tue, 9 Apr 2013 10:04:10 +0000 (10:04 +0000)]
Fix the assertions for the state of the object under the map entry
with the MAP_ENTRY_VN_WRITECNT flag:
- Move the assertion that verifies the state of the v_writecount and
  vnp.writecount, under the block where the object is locked.
- Check that the object type is OBJT_VNODE before asserting.

Reported by: avg
Reviewed by: alc
MFC after: 1 week

11 years agoFix VIMAGE build.
glebius [Tue, 9 Apr 2013 09:15:26 +0000 (09:15 +0000)]
Fix VIMAGE build.

11 years agoUse IP6STAT_INC/IP6STAT_DEC macros to update ip6 stats.
ae [Tue, 9 Apr 2013 07:11:22 +0000 (07:11 +0000)]
Use IP6STAT_INC/IP6STAT_DEC macros to update ip6 stats.

MFC after: 1 week

11 years agoImport a new version of NetBSD's mtree.
ed [Tue, 9 Apr 2013 06:50:11 +0000 (06:50 +0000)]
Import a new version of NetBSD's mtree.

This version of mtree implements a new flag (-O) that can be used to
restrict the tool to certain pathnames. Also, it fixes a compiler
warning generated by -Wmissing-variable-declarations.

Acked by: brooks

11 years agoAdd missing file dt_pq.h that should have been committed in r239385
mm [Tue, 9 Apr 2013 06:33:03 +0000 (06:33 +0000)]
Add missing file dt_pq.h that should have been committed in r239385

Reported by: Pedro Giffuni <pfg@FreeBSD.org>