]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoMerge libcxxrt c812a07cd2f95c1403baf0bbe0366e7618d1d6d3:
dim [Sat, 27 Apr 2013 19:26:56 +0000 (19:26 +0000)]
Merge libcxxrt c812a07cd2f95c1403baf0bbe0366e7618d1d6d3:

* Don't call the _fast version of the TLS accessor in terminate() or
  unexpected().
  1) TLS may not have been set up yet.
  2) When we're in one of these functions, Really Bad Stuff has
     happened and potentially saving a few cycles really isn't
     important.
* Merge in fixes from FreeBSD trunk to make atomics work with recent
  clang.

MFC after: 1 week

11 years agoAvoid some lookup restarts in vm_radix_lookup_{ge,le}().
alc [Sat, 27 Apr 2013 16:44:59 +0000 (16:44 +0000)]
Avoid some lookup restarts in vm_radix_lookup_{ge,le}().

Sponsored by: EMC / Isilon Storage Division

11 years agolibthr: Fix a parameter name in an internal header file.
jilles [Sat, 27 Apr 2013 14:21:36 +0000 (14:21 +0000)]
libthr: Fix a parameter name in an internal header file.

11 years agosh: Don't consider jobs -s/-p as reporting the status of jobs.
jilles [Sat, 27 Apr 2013 14:07:25 +0000 (14:07 +0000)]
sh: Don't consider jobs -s/-p as reporting the status of jobs.

This ensures that something like j=$(jobs -p) does not prevent any
status from being written to the terminal.

11 years agosyslogd: Use closefrom() instead of getdtablesize()/close() loop.
jilles [Sat, 27 Apr 2013 13:26:35 +0000 (13:26 +0000)]
syslogd: Use closefrom() instead of getdtablesize()/close() loop.

When syslogd forks a process for '|' destinations, it closes all file
descriptors greater than 2.

Use closefrom() for this instead of a getdtablesize()/close() loop because
it is both faster and avoids leaving file descriptors open because the limit
was lowered after they were opened.

MFC after: 1 week

11 years agoMFprojects/camlock r249542:
mav [Sat, 27 Apr 2013 12:46:04 +0000 (12:46 +0000)]
MFprojects/camlock r249542:
Remove ADA_FLAG_PACK_INVALID flag. Since ATA disks have no concept of media
change it only duplicates CAM_PERIPH_INVALID flag, so we can use last one.

Slightly cleanup DA_FLAG_PACK_INVALID use.

11 years agoMFprojects/camlock r249541:
mav [Sat, 27 Apr 2013 12:39:28 +0000 (12:39 +0000)]
MFprojects/camlock r249541:
Give periph validity flag own periph reference.  That slightly simplifies
the release logic and covers hypothetical case if lock is dropped inside
the periph_oninval() method.

11 years agointro(2): Fix some errors in ENFILE and EMFILE descriptions.
jilles [Sat, 27 Apr 2013 11:55:23 +0000 (11:55 +0000)]
intro(2): Fix some errors in ENFILE and EMFILE descriptions.

MFC after: 1 week

11 years agoChange maxio to reflect variable hardware configurations.
sbruno [Sat, 27 Apr 2013 08:40:37 +0000 (08:40 +0000)]
Change maxio to reflect variable hardware configurations.

If max_sg_length is 0, then we default to 16

If max_sg_length is less than CISS_MAX_SG_ELEMENTS, then
we will set round the value of max_sg_length to the nearest
power of 2 and use it to align maxio.

Else, we will use CISS_MAX_SG_ELEMENTS for our calculations.

Thanks to scottl for working me through the history and providing
the basis for this patch.

Submitted by: scott
Obtained from: Yahoo! Inc.
MFC after: 2 weeks

11 years agoAdd const qualifier to the dst parameter of the ifnet if_output method.
glebius [Sat, 27 Apr 2013 08:11:48 +0000 (08:11 +0000)]
Add const qualifier to the dst parameter of the ifnet if_output method.

11 years agoReturn "descr" field alike to "Intel RAID1 volume" for GEOM RAID to make
mav [Sat, 27 Apr 2013 06:57:39 +0000 (06:57 +0000)]
Return "descr" field alike to "Intel RAID1 volume" for GEOM RAID to make
it look better in bsdinstall.

11 years agoAdd reset support to the Wii.
rpaulo [Sat, 27 Apr 2013 06:54:49 +0000 (06:54 +0000)]
Add reset support to the Wii.

11 years agoRemove references to MK_IDEA.
ed [Sat, 27 Apr 2013 05:44:39 +0000 (05:44 +0000)]
Remove references to MK_IDEA.

As of r249959, we want to build with IDEA support enabled
unconditionally. As this change removed the MK_IDEA flag, update these
Makefiles accordingly.

11 years agoPartially revert my last change.
ed [Sat, 27 Apr 2013 05:06:25 +0000 (05:06 +0000)]
Partially revert my last change.

I forgot that I still had a locally applied patch to my copy of Clang
that needs to be pushed in before we should use C11 atomics.

11 years agoUse C11 <stdatomic.h> instead of our non-standard <machine/atomic.h>.
ed [Sat, 27 Apr 2013 05:01:29 +0000 (05:01 +0000)]
Use C11 <stdatomic.h> instead of our non-standard <machine/atomic.h>.

Reviewed by: pjd

11 years agoUnbreak <stdatomic.h> on ARM + Clang.
ed [Sat, 27 Apr 2013 04:56:02 +0000 (04:56 +0000)]
Unbreak <stdatomic.h> on ARM + Clang.

Clang only supports atomic operations for ARMv6. For non-ARMv6, we still
need to emit these functions.

Clang's prototype for these functions slightly differs, as it is truly
based on GCC's documentation. It requires the use of signed types, but
also requires varargs. Still, we are not allowed to simply implement
this function directly. Cleverly work around this by implementing it
under a different name and using __strong_reference().

11 years agoAdd a comma to satisfy Igor.
eadler [Sat, 27 Apr 2013 04:09:09 +0000 (04:09 +0000)]
Add a comma to satisfy Igor.

11 years agoFix the frambuffer issues by calling pmap_mapdev() in the attach routine. This
rpaulo [Sat, 27 Apr 2013 01:57:45 +0000 (01:57 +0000)]
Fix the frambuffer issues by calling pmap_mapdev() in the attach routine. This
will make the framebuffer region uncacheable and it will create a proper
KVA -> RAM mapping.

11 years agoRemove IDEA from OptionalObsoleteFiles.inc
eadler [Sat, 27 Apr 2013 00:03:07 +0000 (00:03 +0000)]
Remove IDEA from OptionalObsoleteFiles.inc

Also add an UPDATING entry (requsted by gjb)

11 years agoRemove the WITH_IDEA option and build it unconditionally.
eadler [Fri, 26 Apr 2013 23:24:41 +0000 (23:24 +0000)]
Remove the WITH_IDEA option and build it unconditionally.
The European version of the patent expired in 2011.
The US version of the patent expired in 2012 or prior.

Reviewed by: des
No objection from: cperciva, ehaupt

11 years agoConditionally compile this only if ATH_DEBUG is defined.
adrian [Fri, 26 Apr 2013 22:22:38 +0000 (22:22 +0000)]
Conditionally compile this only if ATH_DEBUG is defined.

11 years agoDump the entire TXQ descriptor contents during a reset, rather than only
adrian [Fri, 26 Apr 2013 21:51:17 +0000 (21:51 +0000)]
Dump the entire TXQ descriptor contents during a reset, rather than only
completed descriptors.

11 years agosysconf(3): Correct the description of _SC_OPEN_MAX.
jilles [Fri, 26 Apr 2013 21:43:42 +0000 (21:43 +0000)]
sysconf(3): Correct the description of _SC_OPEN_MAX.

Reported by: bde
MFC after: 1 week

11 years agoProperly sanitize --menu results (guards against Gtk library warnings from
dteske [Fri, 26 Apr 2013 21:28:24 +0000 (21:28 +0000)]
Properly sanitize --menu results (guards against Gtk library warnings from
X11 side of things from bleeding into Xdialog(1) stderr output). It should
be duely noted that such errors are not a by-product of anything in the
Xdialog(1) utility or API, but optional libraries that it can link against
(such as Gtk1 versus Gtk2; if you compile xdialog from ports against Gtk2
AND misconfigure your fonts or generally make Gtk2 unhappy, these warning
messages can bleed into the captured stderr -- that is we we sanitize!).

11 years agoComments.
dteske [Fri, 26 Apr 2013 21:19:05 +0000 (21:19 +0000)]
Comments.

11 years agoFix examples for overriding INSTALL to not suggest hardcoding
bdrewery [Fri, 26 Apr 2013 19:56:14 +0000 (19:56 +0000)]
Fix examples for overriding INSTALL to not suggest hardcoding
'install' since it breaks buildworld after the introduction and
use of 'install -l' in r245752. Overriding INSTALL causes
/usr/bin/install to be used instead of the proper
/usr/src/tools/install.sh which handles the new flag.

Approved by: bapt
MFC after: 2 weeks

11 years agoAccording to devctl(4), clients must read events whole; they may not
asomers [Fri, 26 Apr 2013 19:49:37 +0000 (19:49 +0000)]
According to devctl(4), clients must read events whole; they may not
piece them together from multiple reads().  It's as if /dev/devctl is
a datagram device instead of a stream device.  However, devd's
internal buffer was too small (1025 bytes) to read an entire
ereport.fs.zfs.checksum event (variable, up to ~1300 bytes).  This
commit enlarges the buffer to 8k.

Reviewed by: imp
Approved by: ken (mentor)
MFC after: 2 weeks

11 years agoAdd two more 'static' qualifiers
eadler [Fri, 26 Apr 2013 17:56:35 +0000 (17:56 +0000)]
Add two more 'static' qualifiers

11 years agoTake some improvements from DragonFlyBSD:
eadler [Fri, 26 Apr 2013 17:45:40 +0000 (17:45 +0000)]
Take some improvements from DragonFlyBSD:
- add const where appropriate
- add static where appropriate
- fix a whitespace issues

Reviewed by: brooks
Obtained from: DragonFlyBSD
MFC After: 1 week

11 years agoAdd -x option to avoid crossing mount points when removing a hierarchy.
eadler [Fri, 26 Apr 2013 17:45:37 +0000 (17:45 +0000)]
Add -x option to avoid crossing mount points when removing a hierarchy.

Discussed on: -hackers
Inspired by: DragonflyBSD
MFC After: 1 week

11 years agoAdjust the min comparison to look at the adjust value after subtraction, don't
sbruno [Fri, 26 Apr 2013 17:28:45 +0000 (17:28 +0000)]
Adjust the min comparison to look at the adjust value after subtraction, don't
subtract 1 from the chosen value if we are going to use the configued value.

Obtained from: Yahoo! Inc.
MFC after: 2 weeks

11 years agoMove pinmux configuration to board-specific config. It will vary
gonzo [Fri, 26 Apr 2013 17:27:53 +0000 (17:27 +0000)]
Move pinmux configuration to board-specific config. It will vary
    from board to board.

11 years agoBump FreeBSD_version after glebius' changes.
adrian [Fri, 26 Apr 2013 17:06:36 +0000 (17:06 +0000)]
Bump FreeBSD_version after glebius' changes.

11 years agoAdded automatic detection of non-rotating media which disables the
smh [Fri, 26 Apr 2013 16:31:03 +0000 (16:31 +0000)]
Added automatic detection of non-rotating media which disables the
use of BIO queue sorting, hence optimising performance for devices
such as SSD's

Reviewed by: scottl
Approved by: pjd (mentor)
MFC after: 2 weeks

11 years agoTeach GEOM and CAM about the difference between the max "size" of r/w and delete
smh [Fri, 26 Apr 2013 16:22:54 +0000 (16:22 +0000)]
Teach GEOM and CAM about the difference between the max "size" of r/w and delete
requests.

sys/geom/geom_disk.h:
        - Added d_delmaxsize which represents the maximum size of individual
          device delete requests in bytes. This can be used by devices to
          inform geom of their size limitations regarding delete operations
          which are generally different from the read / write limits as data
          is not usually transferred from the host to physical device.

sys/geom/geom_disk.c:
        - Use new d_delmaxsize to calculate the size of chunks passed through to
          the underlying strategy during deletes instead of using read / write
          optimised values. This defaults to d_maxsize if unset (0).

        - Moved d_maxsize default up so it can be used to default d_delmaxsize

sys/cam/ata/ata_da.c:
        - Added d_delmaxsize calculations for TRIM and CFA

sys/cam/scsi/scsi_da.c:
        - Added re-calculation of d_delmaxsize whenever delete_method is set.

        - Added kern.cam.da.X.delete_max sysctl which allows the max size for
          delete requests to be limited. This is useful in preventing timeouts
          on devices who's delete methods are slow. It should be noted that
          this limit is reset then the device delete method is changed and
          that it can only be lowered not increased from the device max.

Reviewed by: mav
Approved by: pjd (mentor)

11 years agoAdded available delete methods discovery during device probe, including the
smh [Fri, 26 Apr 2013 16:17:04 +0000 (16:17 +0000)]
Added available delete methods discovery during device probe, including the
maximum sizes for said methods, which are used when processing BIO_DELETE
requests. This includes updating UNMAP support discovery to be based on
SBC-3 T10/1799-D Revision 31 specification.

Added ATA TRIM support to cam scsi devices via ATA Pass-Through(16)

sys/cam/scsi/scsi_da.c:
        - Added ATA Data Set Management TRIM support via ATA Pass-Through(16)
          as a delete_method

        - Added four new probe states used to identity available methods and their
          limits for the processing of BIO_DELETE commands via both UNMAP and the
          new ATA TRIM commands.

        - Renamed Probe states to better indicate their use

        - Added delete method descriptions used when informing user of issues.

        - Added automatic calculation of the optimum delete mode based on which
          method presents the largest maximum request size as this is most likely
          to result in the best performance.

        - Added WRITE SAME max block limits

        - Updated UNMAP range generation to mirror that used by ATA TRIM, this
          optimises the generation of ranges and fixes a potential overflow
          issue in the count when combining multiple BIO_DELETE requests

        - Added output of warnings about short deletes. This should only ever
          be triggered on devices that fail to correctly advertise their supported
          delete modes / max sizes.

        - Fixed WS16 requests being incorrectly limited to 65535 in length.

Reviewed by: mav
Approved by: pjd (mentor)
MFC after: 2 weeks

11 years agoRefactored scsi_xpt use of device_has_vpd to generic scsi_vpd_supported_page
smh [Fri, 26 Apr 2013 16:11:03 +0000 (16:11 +0000)]
Refactored scsi_xpt use of device_has_vpd to generic scsi_vpd_supported_page
so its available for use in generic scsi code.

This is a pre-requirement for using VPD queries to determine available SCSI
delete methods within scsi_da.

Reviewed by: mav
Approved by: pjd (mentor)
MFC after: 2 weeks

11 years agoUpdated TRIM calculations in cam/ata to be based off ATA_DSM_* defines
smh [Fri, 26 Apr 2013 15:59:19 +0000 (15:59 +0000)]
Updated TRIM calculations in cam/ata to be based off ATA_DSM_* defines

Reviewed by: mav
Approved by: pjd (mentor)
MFC after: 2 weeks

11 years agoAdded the ability to send ATA identify and Data Set Management (DSM) TRIM
smh [Fri, 26 Apr 2013 15:53:22 +0000 (15:53 +0000)]
Added the ability to send ATA identify and Data Set Management (DSM) TRIM
commands to an ATA device attached via a SCSI control.

sys/cam/scsi/scsi_all.c:
        - Added scsi_ata_identify, scsi_ata_trim
          Which use ATA Pass-Through to send commands to the attached disk.

sys/cam/scsi/scsi_all.h:
        - Added defines for all missing ATA Pass-Through commands values.

        - Added scsi_ata_identify, scsi_ata_trim methods used in ATA TRIM
          support.

        - Added scsi_vpd_logical_block_prov structure used when querying for
          the supported sizes UNMAP commands.

        - Added scsi_vpd_block_limits structure used when querying for the
          supported sizes of the UNMAP command.

Reviewed by: mav
Approved by: pjd (mentor)
MFC after: 2 weeks

11 years agoAdded Dataset Management defines to be used by TRIM in cam ata and scsi to
smh [Fri, 26 Apr 2013 15:46:09 +0000 (15:46 +0000)]
Added Dataset Management defines to be used by TRIM in cam ata and scsi to
calculate the size of blocks.

Reviewed by: mav
Approved by: pjd (mentor)
MFC after: 2 weeks

11 years agoAdded a sysctl (kern.geom.dev.delete_max_sectors) to control the maximum
smh [Fri, 26 Apr 2013 15:43:24 +0000 (15:43 +0000)]
Added a sysctl (kern.geom.dev.delete_max_sectors) to control the maximum
size of a delete request sent to the providing device performed by g_dev_ioctl.

This allows the kernel and apps via ioctl e.g. newfs -E to request large LBA
deletes which siginificantly improves performance.

Previously this was hard coded to 65536 sectors, the new default is 262144
which doubles the throughput of deletes on commonly available SSD's.

In tests on a Intel 520 120GB FW: 400i disk it improved the delete throughput
from 1.6GB/s to over 2.6GB/s on a full disk delete such as that done via
newfs -E

For some SSD's where delete time is pretty much constant, no matter what
the request, setting this to 0 will provide significantly better throughput
e.g. Samsung 840 240GB FW DXT07B0Q @ 262144 = 79G/s, @ 0 = 2259G/s

Reviewed by: mav
Approved by: pjd (mentor)
MFC after: 2 weeks

11 years agoRemoved unneeded tests in dadeletemethodset changing it to return void
smh [Fri, 26 Apr 2013 15:31:52 +0000 (15:31 +0000)]
Removed unneeded tests in dadeletemethodset changing it to return void

Reviewed by: mav
Approved by: pjd (mentor)
MFC after: 2 weeks

11 years agoDocument constantness of dst argument to if_output.
glebius [Fri, 26 Apr 2013 13:18:07 +0000 (13:18 +0000)]
Document constantness of dst argument to if_output.

Submitted by: pluknet

11 years agoAdd usie to LINT.
glebius [Fri, 26 Apr 2013 13:03:22 +0000 (13:03 +0000)]
Add usie to LINT.

11 years agoOn those machines that use critical(9) for counter(9) we need to
glebius [Fri, 26 Apr 2013 13:02:11 +0000 (13:02 +0000)]
On those machines that use critical(9) for counter(9) we need to
include systm.h.

11 years agoAdd const qualifier to the dst parameter of the ifnet if_output method.
glebius [Fri, 26 Apr 2013 12:50:32 +0000 (12:50 +0000)]
Add const qualifier to the dst parameter of the ifnet if_output method.

11 years agoDon't appease clang static analyzer after all and roll back
uqs [Fri, 26 Apr 2013 12:27:30 +0000 (12:27 +0000)]
Don't appease clang static analyzer after all and roll back
the free(3) of mntbuf ... again. There's no point in doing
useless extra work when we're about to exit.

See also r240565.

Not reading file history: uqs

11 years agoChanged ZFS TRIM sysctl from vfs.zfs.trim_disable -> vfs.zfs.trim.enabled
smh [Fri, 26 Apr 2013 11:24:20 +0000 (11:24 +0000)]
Changed ZFS TRIM sysctl from vfs.zfs.trim_disable -> vfs.zfs.trim.enabled
Enabled ZFS TRIM by default

Reviewed by: pjd (mentor)
Approved by: pjd (mentor)
MFC after: 2 weeks

11 years agoOcteon 2 (6xxx) and newer CPUs don't use the clock CPU speed for its
imp [Fri, 26 Apr 2013 05:42:35 +0000 (05:42 +0000)]
Octeon 2 (6xxx) and newer CPUs don't use the clock CPU speed for its
I/O clock. Thankfully, the simple executive provies a way to querry
the proper clock that works on all models. Move to asking for the SCLK
via this interface.

This gets the serial console working after we start init and open the
console and set the divisor (which turned the output from good to
bad). I can login on the console now.

11 years agoRemove a comment that shouldn't have gone in.
jhibbits [Fri, 26 Apr 2013 05:18:18 +0000 (05:18 +0000)]
Remove a comment that shouldn't have gone in.

X-MFC-with: r249864

11 years agoUse a thread for the processing of virtio tx descriptors rather
grehan [Fri, 26 Apr 2013 05:13:48 +0000 (05:13 +0000)]
Use a thread for the processing of virtio tx descriptors rather
than blocking the vCPU thread. This improves bulk data performance
by ~30-40% and doesn't harm req/resp time for stock netperf runs.

Future work will use a thread pool rather than a thread per tx queue.

Submitted by: Dinakar Medavaram
Reviewed by: neel, grehan
Obtained from: NetApp

11 years agoGripe if some <slot,function> tuple is specified more than once instead of
neel [Fri, 26 Apr 2013 02:24:50 +0000 (02:24 +0000)]
Gripe if some <slot,function> tuple is specified more than once instead of
silently overwriting the previous assignment.

Gripe if the emulation is not recognized instead of silently ignoring the
emulated device.

If an error is detected by pci_parse_slot() then exit from the command line
parsing loop in main().

Submitted by (initial version): Chris Torek (chris.torek@gmail.com)

11 years agoIn the case where the controller supports an sg_list LESS than our predefined
sbruno [Thu, 25 Apr 2013 23:10:34 +0000 (23:10 +0000)]
In the case where the controller supports an sg_list LESS than our predefined
and tuned value, we would advertise the unsupported value to CAM and it would
merrily destroy the controller with way too many IO operations.

This manifests itself in a Zero Memory RAID configuration for a P410 and
possibly other controllers.

Obtained from: Yahoo! Inc.
MFC after: 2 weeks

11 years agoUse the system MAKEOBJDIRPREFIX when running make targets in
brooks [Thu, 25 Apr 2013 21:19:50 +0000 (21:19 +0000)]
Use the system MAKEOBJDIRPREFIX when running make targets in
mergemaster.  This allows bootstrap verions of tools to be used.

Add a note to UPDATING about this change.

Discussed with: jhb
Sponsored by: DARPA, AFRL
MFC after: 5 days

11 years agoRemove deprecated APIs to get the total and free memory available to vmm.ko.
neel [Thu, 25 Apr 2013 20:42:21 +0000 (20:42 +0000)]
Remove deprecated APIs to get the total and free memory available to vmm.ko.

These APIs were relevant when memory for virtual machine allocation was
hard partitioned away from the rest of the system but that is no longer
the case. The sysctls that provided this information were garbage collected
a while back.

Obtained from: NetApp

11 years agomdoc: remove superfluous paragraph macro.
joel [Thu, 25 Apr 2013 20:23:22 +0000 (20:23 +0000)]
mdoc: remove superfluous paragraph macro.

11 years agoFix couple of mbuf leaks in incoming ARP processing.
glebius [Thu, 25 Apr 2013 17:38:04 +0000 (17:38 +0000)]
Fix couple of mbuf leaks in incoming ARP processing.

11 years agoMinor whitespace nit
imp [Thu, 25 Apr 2013 17:27:13 +0000 (17:27 +0000)]
Minor whitespace nit

11 years agoUse the offsets from pcb.h rather than regnum.h to store the registers
imp [Thu, 25 Apr 2013 17:23:54 +0000 (17:23 +0000)]
Use the offsets from pcb.h rather than regnum.h to store the registers
in the pcb. setjmp/longjmp in the kernel also used these values, so
continue to use them although their use isn't technically the pcb
register array (matching is all that's important for setjmp/longjmp in
the kernel). Finally, eliminate the old register names from regnum.h.

This is a lexical change only. The non-debug .o files have the same md5.

11 years agoDon't free memory that is going to be used as error string.
glebius [Thu, 25 Apr 2013 16:34:04 +0000 (16:34 +0000)]
Don't free memory that is going to be used as error string.

PR: bin/178121
Submitted by: Garrett Cooper <yaneurabeya gmail.com>

11 years agoRestore the ipNetToMedia MIB, that was broken with new ARP commit
glebius [Thu, 25 Apr 2013 16:23:22 +0000 (16:23 +0000)]
Restore the ipNetToMedia MIB, that was broken with new ARP commit
in the r186119.

Submitted by: Konstantin Kukushkin <dark rambler-co.ru>

11 years agoAdds Host Protected Area (HPA) support for ATA disks to camcontrol
smh [Thu, 25 Apr 2013 14:11:38 +0000 (14:11 +0000)]
Adds Host Protected Area (HPA) support for ATA disks to camcontrol

Reviewed by: mav
Approved by: pjd (mentor)
MFC after: 2 weeks

11 years agoIntroduce a pointer to const variable gw, which points either at the
glebius [Thu, 25 Apr 2013 12:42:09 +0000 (12:42 +0000)]
Introduce a pointer to const variable gw, which points either at the
same place as dst, or to the sockaddr in the routing table.

The const constraint of gw makes us safe from modifing routing table
accidentially. And "onstantness" of dst allows us to remove several
bandaids, when we switched it back at &ro->ro_dst, now it always
points there.

Reviewed by: rrs

11 years agoFix installworld with DB_FROM_SRC after r249807
bdrewery [Thu, 25 Apr 2013 12:05:17 +0000 (12:05 +0000)]
Fix installworld with DB_FROM_SRC after r249807

Approved by: bapt
Reported by: Tom Everett

11 years agorevert r248644 because of the regression for usdt probes
avg [Thu, 25 Apr 2013 07:04:56 +0000 (07:04 +0000)]
revert r248644 because of the regression for usdt probes

USDT probes are advertised to kernel by initialization code with
atrribute((constructor))).  It seems that on Solaris the .init-ish code
of the main object is executed before RD_PREINIT point is hit.  On
FreeBSD that is not the case.  And because on FreeBSD there is no other
well-defined point between RD_PREINIT and main() we have to parse a
DTrace script when main is hit, for time being.

A footnote: currently we actually post RD_POSTINIT event, but that's a
bug because the event is triggered by hitting r_debug_state which
happens before any init code is executed.

Reported by: markj

11 years agoRespect the enoent_ok flag if reporting error for holding an non-existing
mm [Thu, 25 Apr 2013 06:55:57 +0000 (06:55 +0000)]
Respect the enoent_ok flag if reporting error for holding an non-existing
snapshot.

Related illumos ZFS issue:
  3699 zfs hold or release of a non-existent snapshot does not output error

Reported by: Steven Hartland <smh@FreeBSD.org>
MFC after: 3 days

11 years agoMake it possible to include this file in assembler .S sources.
imp [Thu, 25 Apr 2013 06:29:23 +0000 (06:29 +0000)]
Make it possible to include this file in assembler .S sources.

11 years agoUse the defines from pcb.h over the ones from regnum.h for this 'C'
imp [Thu, 25 Apr 2013 06:28:19 +0000 (06:28 +0000)]
Use the defines from pcb.h over the ones from regnum.h for this 'C'
code. In theory, the ones from regnum.h should be used only for
assembler code.

11 years agoRemove the Fortran directories.
rpaulo [Thu, 25 Apr 2013 06:05:43 +0000 (06:05 +0000)]
Remove the Fortran directories.

11 years agoAdd RIP-relative addressing to the instruction decoder.
grehan [Thu, 25 Apr 2013 04:56:43 +0000 (04:56 +0000)]
Add RIP-relative addressing to the instruction decoder.
Rework the guest register fetch code to allow the RIP to
be extracted from the VMCS while the kernel decoder is
functioning.

Hit by the OpenBSD local-apic code.

Submitted by: neel
Reviewed by: grehan
Obtained from: NetApp

11 years agoFix mips64 and mipsn32 bilds by using proper register names.
imp [Thu, 25 Apr 2013 04:53:01 +0000 (04:53 +0000)]
Fix mips64 and mipsn32 bilds by using proper register names.

11 years agoIntroduce kernel coredumps to ppc32 AIM. Leeched from the booke code.
jhibbits [Thu, 25 Apr 2013 00:39:43 +0000 (00:39 +0000)]
Introduce kernel coredumps to ppc32 AIM.  Leeched from the booke code.

MFC after: 2 weeks

11 years agoAdd myself as a src committer
asomers [Wed, 24 Apr 2013 23:38:04 +0000 (23:38 +0000)]
Add myself as a src committer

Approved by: ken (mentor)

11 years agoAdd myself to the committers list.
ken [Wed, 24 Apr 2013 23:32:47 +0000 (23:32 +0000)]
Add myself to the committers list.

11 years agoFix the Dvorak Programmer Keymap
eadler [Wed, 24 Apr 2013 21:41:24 +0000 (21:41 +0000)]
Fix the Dvorak Programmer Keymap

PR: conf/177572
Submitted by: Sean DuBois <sean@siobud.com>

11 years agogetdtablesize(2): Describe what this function actually does.
jilles [Wed, 24 Apr 2013 21:24:35 +0000 (21:24 +0000)]
getdtablesize(2): Describe what this function actually does.

getdtablesize() returns the limit on new file descriptors; this says nothing
about existing descriptors.

MFC after: 1 week

11 years agoMFV r249857:
mm [Wed, 24 Apr 2013 21:21:03 +0000 (21:21 +0000)]
MFV r249857:

Merge vendor bugfix for a possible deadlock related to async destroy
and improve write performance by introducing a new lock protecting
tx_open_txg.

Illumos ZFS issues:
  3642 dsl_scan_active() should not issue I/O to determine if async
       destroying is active
  3643 txg_delay should not hold the tc_lock

MFC after: 1 week

11 years agoMove hptmv and mpt drivers shutdown a bit later to the SHUTDOWN_PRI_LAST
mav [Wed, 24 Apr 2013 19:00:45 +0000 (19:00 +0000)]
Move hptmv and mpt drivers shutdown a bit later to the SHUTDOWN_PRI_LAST
stage of shutdown_post_sync.  That should allow CAM to do final cache flush
at the SHUTDOWN_PRI_DEFAULT without using polling magic.

MFC after: 3 days

11 years agoThis fixes the issue with the "randomly changing" default
rrs [Wed, 24 Apr 2013 18:30:32 +0000 (18:30 +0000)]
This fixes the issue with the "randomly changing" default
route. What it was is there are two places in ip_output.c
where we do a goto again. One place was fine, it
copies out the new address and then resets dst = ro->rt_dst;
But the other place does *not* do that, which means earlier
when we found the gateway, we have dst pointing there
aka dst = ro->rt_gateway is done.. then we do a
goto again.. bam now we clobber the default route.

The fix is just to move the again so we are always
doing dst = &ro->rt_dst; in the again loop.

PR:  174749,157796
MFC after: 1 week

11 years agoFix N32/N64 ABIs to use proper registers after recent changes.
imp [Wed, 24 Apr 2013 18:00:28 +0000 (18:00 +0000)]
Fix N32/N64 ABIs to use proper registers after recent changes.

Pointy Hat to: imp

11 years agoWhen rebooting (exiting) from the BTX loader, make sure to restore the
dim [Wed, 24 Apr 2013 17:20:45 +0000 (17:20 +0000)]
When rebooting (exiting) from the BTX loader, make sure to restore the
GDT from the correct segment, otherwise a triple fault would be caused.
In some virtual environments (VMware, VirtualBox, etc) this could lead
to a unhandled error or hang in the guest emulation software.

Thanks to avg and jhb for a few hints in the right direction.

Noticed by: Jeremy Chadwick <jdc@koitsu.org> (and many others)
MFC after: 1 week

11 years agoFix for duplicate sample rate detection after recent patches.
hselasky [Wed, 24 Apr 2013 16:52:03 +0000 (16:52 +0000)]
Fix for duplicate sample rate detection after recent patches.

11 years agoFix the USB audio feedback endpoint algorithm. There should not
hselasky [Wed, 24 Apr 2013 16:22:53 +0000 (16:22 +0000)]
Fix the USB audio feedback endpoint algorithm. There should not
be any need to bias the returned value.

Reported by: Craig Leres <leres@ee.lbl.gov>

11 years agoBase the calculation of maxmbufmem in part on kmem_map size
andre [Wed, 24 Apr 2013 13:54:55 +0000 (13:54 +0000)]
Base the calculation of maxmbufmem in part on kmem_map size
instead of kernel_map size to prevent kernel memory exhaustion
by mbufs and a subsequent panic on physical page allocation
failure.

On architectures without a direct map all mbuf memory (except
for jumbo mbufs larger than PAGE_SIZE) comes from kmem_map.
It is the limiting factor hence.

For architectures with a direct map using the size of kmem_map
is a good proxy of available kernel memory as well.  If it is
much smaller the mbuf limit may be sub-optimal but remains
reasonable, while avoiding panics under exhaustion.

The overall mbuf memory limit calculation may be reconsidered
again later, however due to the many different mbuf sizes and
different backing KVM maps it is a tricky subject.

Found by: pho's new network stress test
Pointed out by: alc (kmem_map instead of kernel_map)
Tested by: pho

11 years agoMerge updated "no such identity file" patch.
des [Wed, 24 Apr 2013 12:36:37 +0000 (12:36 +0000)]
Merge updated "no such identity file" patch.

PR: bin/178060

11 years agoRemove unused variable.
ae [Wed, 24 Apr 2013 10:24:01 +0000 (10:24 +0000)]
Remove unused variable.

MFC after: 1 week

11 years agoFix playback for Focusrite Scarlett 2i2 USB recording interface.
hselasky [Wed, 24 Apr 2013 06:05:33 +0000 (06:05 +0000)]
Fix playback for Focusrite Scarlett 2i2 USB recording interface.

Submitted by: Ed Maste, emaste @

11 years agoFix copy/paste error.
dteske [Wed, 24 Apr 2013 03:15:55 +0000 (03:15 +0000)]
Fix copy/paste error.

11 years agoHandle the IRQ for the reset button.
rpaulo [Wed, 24 Apr 2013 01:36:35 +0000 (01:36 +0000)]
Handle the IRQ for the reset button.

11 years agowiigpio depends on options WII.
rpaulo [Wed, 24 Apr 2013 01:20:10 +0000 (01:20 +0000)]
wiigpio depends on options WII.

11 years agoiso639: Add Standard Moroccan Tamazight.
eadler [Wed, 24 Apr 2013 00:41:36 +0000 (00:41 +0000)]
iso639: Add Standard Moroccan Tamazight.

See http://www.loc.gov/standards/iso639-2/php/code_changes.php

Obtained from: DragonflyBSD (commit 2d64ea1d0ec1beacc8f4e22353b7eb84c6f2b3f0)

11 years agoAdd missing include.
dteske [Tue, 23 Apr 2013 22:55:59 +0000 (22:55 +0000)]
Add missing include.

11 years agoFix declarations to slightly increase WARNS level.
jkim [Tue, 23 Apr 2013 19:42:45 +0000 (19:42 +0000)]
Fix declarations to slightly increase WARNS level.

11 years agoClean up generated files added in r233250.
jkim [Tue, 23 Apr 2013 19:29:49 +0000 (19:29 +0000)]
Clean up generated files added in r233250.

11 years agoPull in r180121 from upstream llvm trunk:
dim [Tue, 23 Apr 2013 18:58:39 +0000 (18:58 +0000)]
Pull in r180121 from upstream llvm trunk:

  LoopVectorizer: Fix 15830. When scalarizing and unrolling stores make
  sure that the order in which the elements are scalarized is the same
  as the original order.
  This fixes a miscompilation in FreeBSD's regex library.

This should fix lib/libc/regex/regcomp.c at -O3 with clang 3.3 r178860
on CPUs with SSE.  Before this change, the vectorizer could incorrectly
rearrange the second loop in computejumps(), leading to possibly invalid
entries in the re_gets::charjump table.

The net result was that for example "sed s/@CC@/foo/" failed to work
correctly, leading to trouble with many configure scripts.

11 years agoFix white spaces.
jkim [Tue, 23 Apr 2013 18:30:33 +0000 (18:30 +0000)]
Fix white spaces.

11 years agoReturn a lun count of 1 and a lun id of 0 when CAM attempts a REPORT_LUNS
sbruno [Tue, 23 Apr 2013 18:29:51 +0000 (18:29 +0000)]
Return a lun count of 1 and a lun id of 0 when CAM attempts a REPORT_LUNS
command on a disk device.  This quieseces some noise on the console that
recently appeared.

Obtained from: Yahoo! Inc.
MFC after: 2 weeks

11 years agoTeach the virtio block device to deal with direct as well as indirect
neel [Tue, 23 Apr 2013 16:40:39 +0000 (16:40 +0000)]
Teach the virtio block device to deal with direct as well as indirect
descriptors. Prior to this change the device would only work with guests
that chose to use indirect descriptors.

Modify the device reset callback to actually reset the device state.

Submitted by: Tycho Nightingale (tycho.nightingale@pluribusnetworks.com)

11 years agoRevert r249800 as
eadler [Tue, 23 Apr 2013 16:33:25 +0000 (16:33 +0000)]
Revert r249800 as
 - it is incorrect:  In the 'back' case you want to reuse the previous
 mbuf.
- it was not reviewed by wireless@

Requested by: jhb, adrian

11 years agoLiterally follow POSIX:
kib [Tue, 23 Apr 2013 16:08:24 +0000 (16:08 +0000)]
Literally follow POSIX:
If the bs= expr operand is specified and no conversions other than sync,
noerror, or notrunc are requested, the data returned from each input
block shall be written as a separate output block.

In particular, when both bs=size and conv=sparce were specified, the
resulted file was fully filled, instead of sparce.

PR: standards/177742
Submitted by: Matthew Rezny <mrezny@hexaneinc.com>
MFC after: 2 weeks