]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
10 years agoMFC r254587: MFV r254421:
delphij [Wed, 19 Mar 2014 23:21:31 +0000 (23:21 +0000)]
MFC r254587: MFV r254421:

Illumos ZFS issues:
  3996 want a libzfs_core API to rollback to latest snapshot

git-svn-id: svn://svn.freebsd.org/base/stable/9@263386 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259860 (by mjacob):
dim [Wed, 19 Mar 2014 22:50:14 +0000 (22:50 +0000)]
MFC r259860 (by mjacob):

Harvest one no longer used constant string.

Remove another and place it into play in the
normally ifdef protected zone it would be used
int.

Noticed by: dim

git-svn-id: svn://svn.freebsd.org/base/stable/9@263384 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMake it possible to call VOP_PUTPAGES with shared vnode lock instead
delphij [Wed, 19 Mar 2014 19:32:53 +0000 (19:32 +0000)]
Make it possible to call  VOP_PUTPAGES with shared vnode lock instead
of insisting an exclusive lock.

When VFS_LOCK_DEBUG is enabled and when the underlying file system is
capable of MNT_SHARED_WRITES,  a failed assertion may lead to a panic
because when calling fsync(2),  a.k.a.  sys_fsync() over a vnode with
mmap'ed page,  it will grab a shared lock when underlying file system
is capable,  then call vm_object_page_clean that eventually proceeded
to  vnode_pager_putpages()   that  tries  to do  VOP_PUTPAGES,  where
VOP_PUTPAGES_APV  generated from the declaration asserts the vnode is
always exclusively locked by caller.

This is a direct commit to stable/9 because a majority portion of the
original changeset 257899 (kib), which main goal was an optimization,
was omitted.   We saw the panic independently in a FreeNAS bug ticket
(#4578).

git-svn-id: svn://svn.freebsd.org/base/stable/9@263375 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r263095:
kib [Wed, 19 Mar 2014 13:09:38 +0000 (13:09 +0000)]
MFC r263095:
Initialize paddr to handle the case of zero size.

git-svn-id: svn://svn.freebsd.org/base/stable/9@263361 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r263080:
kib [Wed, 19 Mar 2014 13:02:26 +0000 (13:02 +0000)]
MFC r263080:
Use correct types for sizeof() in the calculations for the malloc(9) sizes.

git-svn-id: svn://svn.freebsd.org/base/stable/9@263358 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r263079:
kib [Wed, 19 Mar 2014 12:57:13 +0000 (12:57 +0000)]
MFC r263079:
The auio structure is only initialized when the vnode is symlink,
avoid reading from it otherwise.

git-svn-id: svn://svn.freebsd.org/base/stable/9@263355 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMerge r262690 from head to stable/9:
rwatson [Wed, 19 Mar 2014 10:32:57 +0000 (10:32 +0000)]
Merge r262690 from head to stable/9:

  When querying a process's umask via sysctl in libprocstat(), don't
  print a warning if EPERM is returned as this is an expected failure
  mode rather than error -- similar to current handling of ESRCH.
  This makes the output of 'procstat -as' vastly more palatable.

  Sponsored by: DARPA, AFRL

git-svn-id: svn://svn.freebsd.org/base/stable/9@263343 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257847, r260243: Update aacraid to version 3.2.5.
achim [Wed, 19 Mar 2014 10:18:34 +0000 (10:18 +0000)]
MFC r257847, r260243: Update aacraid to version 3.2.5.

Approved by: emaste (co-mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/9@263340 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r263021:
bdrewery [Wed, 19 Mar 2014 00:54:43 +0000 (00:54 +0000)]
MFC r263021:

  Support Last-Modified behind proxies which return UTC instead of GMT.

git-svn-id: svn://svn.freebsd.org/base/stable/9@263326 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r249562:
delphij [Tue, 18 Mar 2014 20:05:55 +0000 (20:05 +0000)]
MFC r249562:

Fix incomplete printf.

PR: kern/177889
Submitted by: Sven-Thorsten Dietrich <sven vyatta com>

git-svn-id: svn://svn.freebsd.org/base/stable/9@263316 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r249559:
delphij [Tue, 18 Mar 2014 20:01:00 +0000 (20:01 +0000)]
MFC r249559:

Don't leak lock when returning.

PR:  kern/177888
Submitted by: Sven-Thorsten Dietrich <sven vyatta com>

git-svn-id: svn://svn.freebsd.org/base/stable/9@263314 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoIncrement fi_wgen before awakening threads polling the read socket of a
jhb [Tue, 18 Mar 2014 17:17:42 +0000 (17:17 +0000)]
Increment fi_wgen before awakening threads polling the read socket of a
FIFO.  Previously, a thread sleeping in poll() could be awakened and
re-poll the FIFO with the old value of fi_wgen (and thus improperly
setting POLLINIGNEOF) before a thread closing a writable fifo descriptor
bumped fi_wgen.  The end result was that the reading thread in poll()
would never see POLLHUP but could block forever (or until a timeout).

This is a direct commit to 8 and 9 since the FIFO code is implemented
differently in 10.x and later.  The pipe-backed FIFOs in 10 do not have
this bug.

git-svn-id: svn://svn.freebsd.org/base/stable/9@263309 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262741:
mav [Tue, 18 Mar 2014 14:19:53 +0000 (14:19 +0000)]
MFC r262741:
Do not retry on CAM_FUNC_NOTAVAIL error, but return immediately.

git-svn-id: svn://svn.freebsd.org/base/stable/9@263300 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262754: MFV r253848 (mm):
delphij [Tue, 18 Mar 2014 01:00:14 +0000 (01:00 +0000)]
MFC r262754: MFV r253848 (mm):

Update vendor/xz from v5.0 branch to post-5.0.5

git-svn-id: svn://svn.freebsd.org/base/stable/9@263286 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262325:
markj [Tue, 18 Mar 2014 00:55:40 +0000 (00:55 +0000)]
MFC r262325:
Print a backtrace if the SDT(9) stub gets called so that there's at least
some hope of figuring out how it happened.

git-svn-id: svn://svn.freebsd.org/base/stable/9@263284 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259535:
markj [Tue, 18 Mar 2014 00:38:36 +0000 (00:38 +0000)]
MFC r259535:
The fasttrap fork handler is responsible for removing tracepoints in the
child process that were inherited from its parent. However, this should
not be done in the case of a vfork, since the fork handler ends up removing
the tracepoints from the shared vm space, and userland DTrace probes in the
parent will no longer fire as a result.

Now the child of a vfork may trigger userland DTrace probes enabled in its
parent, so modify the fasttrap probe handler to handle this case and handle
the child process in the same way that it would handle the traced process.
In particular, if once traces function foo() in a process that vforks, and
the child calls foo(), fasttrap will treat this call as having come from the
parent. This is the behaviour of the upstream code.

While here, add #ifdef guards to some code that isn't present upstream.

git-svn-id: svn://svn.freebsd.org/base/stable/9@263282 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254303:
jimharris [Mon, 17 Mar 2014 21:45:08 +0000 (21:45 +0000)]
MFC r254303:

  If a controller fails to initialize, do not notify consumers (nvd) of its
  namespaces.

Sponsored by: Intel

git-svn-id: svn://svn.freebsd.org/base/stable/9@263274 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254302:
jimharris [Mon, 17 Mar 2014 21:42:31 +0000 (21:42 +0000)]
MFC r254302:

  Send a shutdown notification in the driver unload path, to ensure
  notification gets sent in cases where system shuts down with driver
  unloaded.

Sponsored by: Intel

git-svn-id: svn://svn.freebsd.org/base/stable/9@263273 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r263120:
dim [Mon, 17 Mar 2014 20:42:45 +0000 (20:42 +0000)]
MFC r263120:

Pull in r201021 from upstream libc++ trunk:

  Fix for PR18735 - self-assignment for map/multimap gives incorrect
  results in C++03

(Please note: that is an LLVM PR identifier, not a FreeBSD one.)

Reported by: rakuco

git-svn-id: svn://svn.freebsd.org/base/stable/9@263272 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262676:
delphij [Mon, 17 Mar 2014 19:09:39 +0000 (19:09 +0000)]
MFC r262676:

All callers of static method load_nvlist() in spa.c handles error case,
so there is no reason to assert that we won't hit an error.  Instead,
just return that error to caller and have the upper layer handle it.

Obtained from: FreeNAS
Reported by: rodrigc
Reviewed by: Matthew Ahrens

git-svn-id: svn://svn.freebsd.org/base/stable/9@263270 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262972:
hselasky [Mon, 17 Mar 2014 06:36:54 +0000 (06:36 +0000)]
MFC r262972:
Ignore USB keyboard driver calls from critical sections.

git-svn-id: svn://svn.freebsd.org/base/stable/9@263260 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r263107:
davidxu [Mon, 17 Mar 2014 02:10:45 +0000 (02:10 +0000)]
MFC r263107:

To avoid missing a chance to cancel thread, call _pthread_testcancel at the
beginning of _sem_timedwait.

Submitted by: Eric van Gyzen &lt; eric at vangyzen dot net &gt;

git-svn-id: svn://svn.freebsd.org/base/stable/9@263255 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoPull in r192123 from upstream llvm trunk (by Benjamin Kramer):
dim [Sun, 16 Mar 2014 16:33:25 +0000 (16:33 +0000)]
Pull in r192123 from upstream llvm trunk (by Benjamin Kramer):

  X86: Fix type check. Just because an integer type is illegal doesn't
  mean it's i64.

  Fixes PR17495, where an i24 triggered this code. It's intended to
  optimize i64 loads on 32 bit x86.

Fixes "Cannot select" fatal errors when building the audio/jack port
with ALSA support turned on.

This is a direct commit to stable/9 and stable/10, since head already
has the commit as part of an upgrade to llvm/clang 3.4.

Reported by: Radim Kolar <hsn@sendmail.cz> via http://llvm.org/bugs/

git-svn-id: svn://svn.freebsd.org/base/stable/9@263247 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoBackport bmake to 9 so ports can rely on it being available.
sjg [Sat, 15 Mar 2014 23:51:28 +0000 (23:51 +0000)]
Backport bmake to 9 so ports can rely on it being available.
We only build/install it as bmake.

Requested by: bapt
Reviewed by: marcel

git-svn-id: svn://svn.freebsd.org/base/stable/9@263212 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262663:
hselasky [Sat, 15 Mar 2014 18:20:39 +0000 (18:20 +0000)]
MFC r262663:
- Make pointer easier to control when moving slowly.
- Increase chance of vertical scrolling as vertical scrolling is used more often.

git-svn-id: svn://svn.freebsd.org/base/stable/9@263209 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoBump __FreeBSD_version to 902508 after Radeon KMS driver merge
dumbbell [Fri, 14 Mar 2014 12:42:30 +0000 (12:42 +0000)]
Bump __FreeBSD_version to 902508 after Radeon KMS driver merge

git-svn-id: svn://svn.freebsd.org/base/stable/9@263171 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC Radeon KMS driver
dumbbell [Fri, 14 Mar 2014 12:37:42 +0000 (12:37 +0000)]
MFC Radeon KMS driver

FreeBSD 9 already had modern Intel GPUs support, now this is the case for
Radeon GPUs too. This will ease the work on ports, where there won't be a
need to distinguish between FreeBSD 9/10 and different hardware vendors.

Help from: jhb@, jkim@, kan@, kib@,
J.R. Oldroyd <fbsd@opal.com> (previous version of the patch)

The following revisions were merged in this single commit:

r254885:
  drm/radeon: Import the Radeon KMS driver

  This driver is based on Linux 3.8 and a previous effort by kan@.

  More informations about this project can be found on the FreeBSD wiki:
      https://wiki.freebsd.org/AMD_GPU

  The driver is split into:

    sys/dev/drm2:
      The driver sources.

    sys/modules/drm2/radeonkmw:
      The driver main kernel module's Makefile.

    sys/modules/drm2/radeonkmsfw:
      All firmware kernel module Makefiles. There's one directory and one
      Makefile for each firmware.

    sys/contrib/dev/drm2/radeonkmsfw:
      All firmware binary sources.

    tools/tools/drm/radeon
      Tools to update firmwares or regenerate some headers.

  Merging the driver to FreeBSD 9.x may be possible but not a priority for
  now.

  Help from: kib@, kan@
  Tested by: avg@, kwm@, ray@,
Alexander Yerenkow <yerenkow@gmail.com>,
Anders Bolt-Evensen <andersbo87@me.com>,
Denis Djubajlo <stdedjub@googlemail.com>,
J.R. Oldroyd <fbsd@opal.com>,
Mikaël Urankar <mikael.urankar@gmail.com>,
Pierre-Emmanuel Pédron <pepcitron@gmail.com>,
Sam Fourman Jr. <sfourman@gmail.com>,
Wade <wade-is-great@live.com>,
(probably other I forgot...)
  HW donations: kyzh, Yakaz

r254894:
  drm/radeon: Rename the (S)DEBUG macros in atom.c to avoid conflicts

  For instance, DEBUG is already defined in the LINT kernel configuration.
  This fixes the build of LINT.

r254899:
  drm/radeon: Disable build on i386/pc98

r255572:
  drm/radeon: Fix usage of vga_pci_map_bios()

  vga_pci_(un)map_bios() takes a vgapci device as argument, not a drmn
  one. This fixes a bug where the BIOS couldn't be mapped if the device
  wasn't the boot display.

  Approved by: re (kib; blanket for following drm2/radeon commits)

r255573:
  drm/radeon: Fix usage of pci_save_state() and pci_restore_state()

  Calling those functions with the drmn device as argument causes a panic,
  because it's not a direct child of pci$N. They must be called with the
  vgapci device instead.

  This fix is not enough to make suspend/resume work reliably.

  Approved by: re (blanket)

r255587:
  drm/radeon: Add missing "return false" after unmapping invalid BIOS

  Without that, we would try to copy the unmapped BIOS.

  Submitted by: Christoph Mallon <christoph.mallon@gmx.de>
  Approved by: re (blanket)

r256771:
  drm/radeon: radeonkms depends on firmware(9)

  Submitted by: tijl@

r257869:
  drm: Initialize "handle" to 0 before calling drm_gem_handle_create()

  This is variable is being checked in drm_gem_name_create() before being
  set.

r257870:
  drm/radeon: Wake up userland after page flip

  For instance, this caused issues in KDE, such as stuttered animations
  (with desktop effects enabled).

r259003:
  Initialize modesetting sysctls in radeonkms.

  This is intended for MFC if re@ permits.

  Reviewed by: kib, dumbbell
  Tested by: Steven Chamberlain <steven@pyro.eu.org>
  MFC after: 3 days

r259101:
  drm/radeon: agp_info->ai_aperture_size is in bytes, not Mbytes

  This fixes radeon_agp_init() and gtt_size is now correct. However, this
  is not enough to make Radeon AGP cards work: ttm_agp_backend.c isn't
  implemented yet.

  Submitted by: tijl@

r259104:
  drm/radeon: radeon_dp_i2c_aux_ch() must return 0 on FreeBSD

  The code was unmodified compared to Linux and returned the amount of
  received bytes from the i2c bus. This led to non-working i2c bus and
  failure to eg. read monitor's EDID, if connected to DisplayPort.

  MFC after: 3 days
  Tested by: Mikaël Urankar <mikael.urankar@gmail.com>

r259684:
  drm/ttm, drm/radeon: Replace EINTR/ERESTART by ERESTARTSYS...

  ... for msleep/cv_*wait() return values, where wait_event*() is used
  on Linux. ERESTARTSYS is the return code expected by callers when the
  operation was interrupted.

  For instance, this is the case of radeon_cs_ioctl() (radeon_cs.c): if
  an error occurs, and the code isn't ERESTARTSYS (eg. EINTR), it logs an
  error.

  Note that ERESTARTSYS is defined as ERESTART, but this keeps callers'
  code close to Linux.

  Submitted by: avg@ (previous version)

r261497:
  Abort when firmware isn't present in R600+ models.

  More details at:
  http://anonscm.debian.org/viewvc/kernel/dists/trunk/linux/debian/patches/bugfix/all/radeon-firmware-is-required-for-drm-and-kms-on-r600-onward.patch?revision=20909&view=co

  Reviewed by: dumbbell
  MFC after: 1 week

git-svn-id: svn://svn.freebsd.org/base/stable/9@263170 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r227751, r238766, r241553, r242748, r244047, r245947, r246021, r247255,
hselasky [Fri, 14 Mar 2014 10:18:53 +0000 (10:18 +0000)]
MFC r227751, r238766, r241553, r242748, r244047, r245947, r246021, r247255,
    r249039, r249204, r250848, r251351, r252295, r252498, r255123, r255238,
    r256782, r257132, r257390 and r259675:
- Add various new USB ID's and quirks.
- Make sure the usbdevs mergeinfo gets recorded on the sys directory.

git-svn-id: svn://svn.freebsd.org/base/stable/9@263166 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC
hselasky [Fri, 14 Mar 2014 09:46:56 +0000 (09:46 +0000)]
MFC
Sync usb.conf file to head branch.

git-svn-id: svn://svn.freebsd.org/base/stable/9@263165 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262550, r262551 and r262554:
hselasky [Fri, 14 Mar 2014 09:13:53 +0000 (09:13 +0000)]
MFC r262550, r262551 and r262554:
Add support for kqfilter to USB character devices.

git-svn-id: svn://svn.freebsd.org/base/stable/9@263163 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262886:
mav [Fri, 14 Mar 2014 07:48:35 +0000 (07:48 +0000)]
MFC r262886:
Fix support for increased logical sector size (4K-native drives).

- Logical sector size is measured in words, not bytes.
- If physical sector is not bigger then logical sector, it does not mean
it should be set equal to 512 bytes, but set to logical sector.

PR:             misc/187269
Submitted by:   Ravi Pokala <rpokala@panasas.com>

git-svn-id: svn://svn.freebsd.org/base/stable/9@263157 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262577: MFV r262570:
delphij [Fri, 14 Mar 2014 01:10:54 +0000 (01:10 +0000)]
MFC r262577: MFV r262570:

4626 libzfs memleak in zpool_in_use()

git-svn-id: svn://svn.freebsd.org/base/stable/9@263128 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262572:
delphij [Fri, 14 Mar 2014 01:05:32 +0000 (01:05 +0000)]
MFC r262572:

Get rid of the 'chan' from softc structure and use the latter
directly as sleep channel.

PR: kern/174684
Submitted by: jmg

git-svn-id: svn://svn.freebsd.org/base/stable/9@263126 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC changes to atomic.h usage in DRM code
dumbbell [Thu, 13 Mar 2014 21:06:13 +0000 (21:06 +0000)]
MFC changes to atomic.h usage in DRM code

This commit follows the merge of atomic.h changes in r262807 and r262823.
The original work is from Jung-uk Kim (jkim@).

The following revisions were merged in this single commit:

r255009:
  Fix a compiler warning.  With this fix, a negative time can be converted to
  a struct timeval and back to the original nanoseconds correctly.

r255012:
  Fix a compiler warning and add couple of VM map types.

r255013:
  Correct atomic operations in i915.

r255037:
  Fix atomic operations on context_flag without altering semantics.

r255039:
  - Remove test_and_set_bit() macro.  It is unused since r255037.
  - Relax atomic_read() and atomic_set() macros.  Linux does not require any
  memory barrier.  Also, these macros may be even reordered or optimized away
  according to the API documentation:

  https://www.kernel.org/doc/Documentation/atomic_ops.txt

r255041:
  Clarify confusions between atomic_t and bitmap.  Fix bitmap operations
  accordingly.

r255042:
  Fix the incomplete conversion from atomic_t to long for test_bit().

r255044:
  Partially revert r254880.  The bitmap operations actually use long type now.

r255045:
  'u_long' is consistently spelled 'unsigned long' in this file.  Fix it.

git-svn-id: svn://svn.freebsd.org/base/stable/9@263119 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262539:
eadler [Thu, 13 Mar 2014 03:57:33 +0000 (03:57 +0000)]
MFC r262539:
linprocfs: add support for /sys/kernel/random/uuid

PR: kern/186187

git-svn-id: svn://svn.freebsd.org/base/stable/9@263103 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262220:
bdrewery [Thu, 13 Mar 2014 01:14:37 +0000 (01:14 +0000)]
MFC r262220:

  Add missing Save Cursor support for VT520

PR: conf/174937

git-svn-id: svn://svn.freebsd.org/base/stable/9@263099 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262732:
hselasky [Wed, 12 Mar 2014 08:30:18 +0000 (08:30 +0000)]
MFC r262732:
Add new quirk.

PR: usb/187188

git-svn-id: svn://svn.freebsd.org/base/stable/9@263075 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262795:
hselasky [Wed, 12 Mar 2014 08:26:49 +0000 (08:26 +0000)]
MFC r262795:
- Temporary fix for race in RUN driver which can
cause freed memory to be accessed.
- Properly lock callout_reset()'s.

git-svn-id: svn://svn.freebsd.org/base/stable/9@263074 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262477:
hselasky [Wed, 12 Mar 2014 08:21:36 +0000 (08:21 +0000)]
MFC r262477:
Updates for WSP driver.

git-svn-id: svn://svn.freebsd.org/base/stable/9@263071 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r261710
brueffer [Wed, 12 Mar 2014 08:16:17 +0000 (08:16 +0000)]
MFC: r261710

Only count table lookups when we're actually processing packets.

PR:             183462
Submitted by:   Sven-Thorsten Dietrich <thebigcorporation at gmail.com>
Reviewed by:    bms

git-svn-id: svn://svn.freebsd.org/base/stable/9@263070 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC
hselasky [Wed, 12 Mar 2014 08:08:41 +0000 (08:08 +0000)]
MFC
Sync usbdevs file to head branch.

git-svn-id: svn://svn.freebsd.org/base/stable/9@263068 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262417, r262439, r262454, r262455 and r262478:
hselasky [Wed, 12 Mar 2014 07:18:39 +0000 (07:18 +0000)]
MFC r262417, r262439, r262454, r262455 and r262478:
- Several updates and improvements to ATP driver.
- Start effort merging WSP and ATP driver.

git-svn-id: svn://svn.freebsd.org/base/stable/9@263064 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoRegen after r263053
gjb [Tue, 11 Mar 2014 23:54:13 +0000 (23:54 +0000)]
Regen after r263053

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@263061 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253304, r255964:
gjb [Tue, 11 Mar 2014 23:04:32 +0000 (23:04 +0000)]
MFC r253304, r255964:
r253304:
  Ensure the locale is LC_ALL=C when regenerating
  src.conf.5

r255964:
  Have makeman always use the mk files from the source
  tree it's operating on rather than those from the
  installed system.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@263058 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r237997, r238018, r238023, r257440, r258924:
gjb [Tue, 11 Mar 2014 22:11:45 +0000 (22:11 +0000)]
MFC r237997, r238018, r238023, r257440, r258924:
  Add WITHOUT_PKGBOOTSTRAP options file.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@263053 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoRevert r263047 now that the missing commit was merged for pkg(7)
gjb [Tue, 11 Mar 2014 21:48:30 +0000 (21:48 +0000)]
Revert r263047 now that the missing commit was merged for pkg(7)
updates.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@263051 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 238010:
gjb [Tue, 11 Mar 2014 21:46:26 +0000 (21:46 +0000)]
MFC 238010:
  Add PKGBOOTSTRAP to __DEFAULT_YES_OPTIONS to fix build.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@263050 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoTemporarily turn off MK_PKGBOOTSTRAP evaluation to fix build.
gjb [Tue, 11 Mar 2014 21:06:17 +0000 (21:06 +0000)]
Temporarily turn off MK_PKGBOOTSTRAP evaluation to fix build.

Discussed with: bapt
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@263047 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC of 263041, tzdata2014a:
edwin [Tue, 11 Mar 2014 20:34:29 +0000 (20:34 +0000)]
MFC of 263041, tzdata2014a:

- Fix historical info about asia/Zion, Ukraine
- Fiji starts DST at 02:00 instead of 03:00
- Turkey will move to DST at 31 March this year.

git-svn-id: svn://svn.freebsd.org/base/stable/9@263042 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r241737,r246790,r247060,r247841,r248033,r248133,r255468,r256450,r256770
bapt [Tue, 11 Mar 2014 18:15:05 +0000 (18:15 +0000)]
MFC: r241737,r246790,r247060,r247841,r248033,r248133,r255468,r256450,r256770
     r256971,r256978,r257051,r257142,r257145,r257146,r257147,r257148,r257149
     r257158,r257193,r257377,r257378,r257400,r257505,r257668,r257701,r257945
     r258020,r258226,r258348,r258550,r259266,r259773,r259774,r259775,r262400
     r262401,r262419

Sync pkg(7) with head:
- signature checking
- respecting and reading repository configurations
- support pkg bootstrap -f

Direct modifications:
- Support old libarchive
- Support old openssl API
- Define non yet existing elf macros

git-svn-id: svn://svn.freebsd.org/base/stable/9@263038 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r262398,r262399,r262410,r262975
bapt [Tue, 11 Mar 2014 16:24:54 +0000 (16:24 +0000)]
MFC: r262398,r262399,r262410,r262975

Import libucl into head

UCL is heavily infused by nginx configuration as the example of a convenient
configuration system. However, UCL is fully compatible with JSON format and is
able to parse json files.

UCL is used by pkg(8) for its configuration file as well for the manifest format
in packages, it will be used in base for the pkg boostrap (signature checking
and configuration file parsing.)

libucl has been developped and is maintained by vsevolod@

git-svn-id: svn://svn.freebsd.org/base/stable/9@263032 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFH (r251810): fix installation from read-only .OBJDIR
des [Tue, 11 Mar 2014 16:13:03 +0000 (16:13 +0000)]
MFH (r251810): fix installation from read-only .OBJDIR
MFH (r255384): add PRIVATELIB for internal-use shred libraries
MFH (r255385, r255413): add a stock libmap32.conf
MFH (r255765): always support directory mapping; rewrite libmap man page

git-svn-id: svn://svn.freebsd.org/base/stable/9@263031 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 261030:
jhb [Tue, 11 Mar 2014 15:28:41 +0000 (15:28 +0000)]
MFC 261030:
Similar to cap_mkdb(1), add endianness support to services_mkdb(1)
to support cross-builds once this is invoked during releases.

git-svn-id: svn://svn.freebsd.org/base/stable/9@263028 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r257145,r257147,r257150,r257159,r257164,r257168,r257344,r257667,r257668,
bapt [Tue, 11 Mar 2014 14:48:44 +0000 (14:48 +0000)]
MFC: r257145,r257147,r257150,r257159,r257164,r257168,r257344,r257667,r257668,
     r258227,r260605

Add default configuration for FreeBSD official pkg(8) repositories
Add fingerprint for the trusted keys

git-svn-id: svn://svn.freebsd.org/base/stable/9@263023 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 261243:
jhb [Tue, 11 Mar 2014 14:33:42 +0000 (14:33 +0000)]
MFC 261243:
Some BIOSes incorrectly use standard memory resource ranges to list
the memory ranges that they decode for downstream devices rather than
creating ResourceProducer range resource entries.  The result is that
we allocate the full range to the PCI root bridge device causing
allocations in child devices to all fail.

As a workaround, ignore any standard memory resources on a PCI root
bridge device.  It is normal for a PCI root bridge to allocate an I/O
resource for the I/O ports used for PCI config access, but I have not
seen any PCI root bridges that legitimately allocate a memory resource.

git-svn-id: svn://svn.freebsd.org/base/stable/9@263022 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262020:
jhay [Tue, 11 Mar 2014 13:03:05 +0000 (13:03 +0000)]
MFC r262020:

Make it possible to use the env kernel config file option for AVILA
and CAMBRIA boards that does not use loader to load the kernel. This
is basically how it was done for i386. This way tunables can also be
set. For example in config file:

env "/conf/AVILA.env"

And in AVILA.env:

vfs.unmapped_buf_allowed=0

git-svn-id: svn://svn.freebsd.org/base/stable/9@263018 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262036:
jhay [Tue, 11 Mar 2014 12:24:19 +0000 (12:24 +0000)]
MFC r262036:

etcupdate should use the src tree from where the release is built, not
the default (/usr/src) tree.

git-svn-id: svn://svn.freebsd.org/base/stable/9@263016 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC TTM, a memory manager used by video drivers
dumbbell [Mon, 10 Mar 2014 23:16:19 +0000 (23:16 +0000)]
MFC TTM, a memory manager used by video drivers

This is the last step before the merge of the Radeon KMS driver. Other
changes to TTM will be merged with radeonkms.

The following revisions were merged in this single commit:

r247835:
  Import the preliminary port of the TTM.

  The early commit is done to facilitate the off-tree work on the
  porting of the Radeon driver.

  Sponsored by: The FreeBSD Foundation
  Debugged and tested by:     dumbbell
  MFC after: 1 month

r247848:
  Fix build with gcc, remove redundand declarations.

  Reported and tested by: gjb
  MFC after: 1 month

r247849:
  Fix build with gcc, do not use unnamed union.

  Reported and tested by: gjb
  MFC after: 1 month

r248060:
  drm: Fix a call to free(9) with an incorrect malloc type

  While here, the call to free(9) is moved to drm_global.c, near the
  initial malloc(9).

  Reviewed by: Konstantin Belousov (kib@)

r248657:
  drm/ttm: Fix TTM buffer object refcount

  This fixes memory leaks in the radeonkms driver.

  Reviewed by: Konstantin Belousov (kib@)
  Tested by: J.R. Oldroyd <jr@opal.com>

r248661:
  drm/ttm: Explain why we don't need to acquire a ref in ttm_bo_vm_ctor()

r248663:
  drm/ttm: Fix a typo: s/pTTM]/[TTM]/

r248666:
  Do not call malloc(M_WAITOK) while bodev->fence_lock mutex is
  held. The ttm_buffer_object_transfer() does not need the mutex locked
  at all, except for the call to the driver sync_obj_ref() method.

  Reported and tested by: dumbbell
  MFC after:   2 weeks

r252864:
  Remove unneeded page lock around vm_page_insert().

  Submitted by: alc

r253710:
  MFgem r251960: re-check the mgt device object for the requested page
  after the object was relocked.

  Tested by: dumbbell
  Sponsored by: The FreeBSD Foundation
  MFC after: 1 week

r254822:
  drm: In drm_mmap_single, try ttm_bo_mmap_single() before drm_gem_mmap_single()

  In drivers such as the Radeon driver, the DRIVER_GEM features flag is
  set but TTM is used to mmap buffer object.

r254858:
  drm: Add missing bits to drmP.h, required by the Radeon driver

  Some of the FreeBSD-specific definitions are moved to drm_os_freebsd.h.
  But there's still work to do to clean it up and reduce the diff with
  Linux' drmP.h.

r254860:
  drm: Update drm_atomic.h, now that projects/atomic64 is in HEAD

  Submitted by: jkim@

r254861:
  drm/ttm: Import Linux commit 63d0a4195560362e2e00a3ad38fc331d34e1da9b

  Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
  Date:   Tue Jan 15 14:56:37 2013 +0100

      drm/ttm: remove lru_lock around ttm_bo_reserve

      There should no longer be assumptions that reserve will always succeed
      with the lru lock held, so we can safely break the whole atomic
      reserve/lru thing. As a bonus this fixes most lockdep annotations for
      reservations.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
r254862:
  drm/ttm: Import Linux commit 7a1863084c9d90ce4b67d645bf9b0f1612e68f62

  Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
  Date:   Tue Jan 15 14:56:48 2013 +0100

      drm/ttm: cleanup ttm_eu_reserve_buffers handling

      With the lru lock no longer required for protecting reservations we
      can just do a ttm_bo_reserve_nolru on -EBUSY, and handle all errors
      in a single path.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
r254863:
  drm/ttm: Import Linux commit 5e45d7dfd74100d622f9cdc70bfd1f9fae1671de

  Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
  Date:   Tue Jan 15 14:57:05 2013 +0100

      drm/ttm: add ttm_bo_reserve_slowpath

      Instead of dropping everything, waiting for the bo to be unreserved
      and trying over, a better strategy would be to do a blocking wait.

      This can be mapped a lot better to a mutex_lock-like call.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
  Approved by: kib@

r254864:
  drm/ttm: Import Linux commit f2d476a110bc24fde008698ae9018c99e803e25c

  Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
  Date:   Tue Jan 15 14:57:10 2013 +0100

      drm/ttm: use ttm_bo_reserve_slowpath_nolru in ttm_eu_reserve_buffers, v2

      This requires re-use of the seqno, which increases fairness slightly.
      Instead of spinning with a new seqno every time we keep the current one,
      but still drop all other reservations we hold. Only when we succeed,
      we try to get back our other reservations again.

      This should increase fairness slightly as well.

      Changes since v1:
       - Increase val_seq before calling ttm_bo_reserve_slowpath_nolru and
 retrying to take all entries to prevent a race.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
  Approved by: kib@

r254865:
  drm/ttm: Import Linux commit cc4c0c4de3c775be22072ec3251f2e581b63d9a0

  Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
  Date:   Tue Jan 15 14:57:28 2013 +0100

      drm/ttm: unexport ttm_bo_wait_unreserved

      All legitimate users of this function outside ttm_bo.c are gone, now
      it's only an implementation detail.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
  Approved by: kib@

r254866:
  drm/ttm: Import Linux commit 630541863b29f88c7ab34e647758344e4cd1eafd

  Author: Dave Airlie <airlied@gmail.com>
  Date:   Wed Jan 16 14:25:44 2013 +1000

      ttm: don't destroy old mm_node on memcpy failure

      When we are using memcpy to move objects around, and we fail to memcpy
      due to lack of memory to populate or failure to finish the copy, we don't
      want to destroy the mm_node that has been copied into old_copy.

      While working on a new kms driver that uses memcpy, if I overallocated bo's
      up to the memory limits, and eviction failed, then machine would oops soon
      after due to having an active bo with an already freed drm_mm embedded in it,
      freeing it a second time didn't end well.

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  Approved by: kib@

r254867:
  drm/ttm: Import Linux commit 014b34409fb2015f63663b6cafdf557fdf289628

  Author: Dave Airlie <airlied@gmail.com>
  Date:   Wed Jan 16 15:58:34 2013 +1000

      ttm: on move memory failure don't leave a node dangling

      if we have a move notify callback, when moving fails, we call move notify
      the opposite way around, however this ends up with *mem containing the mm_node
      from the bo, which means we double free it. This is a follow on to the previous
      fix.

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  Approved by: kib@

r254868:
  drm/ttm: Import Linux commit ff7c60c580d9722f820d85c9c58ca55ecc1ee7c4

  Author: Daniel Vetter <daniel.vetter@ffwll.ch>
  Date:   Mon Jan 14 15:08:14 2013 +0100

      drm/ttm: fix fence locking in ttm_buffer_object_transfer, 2nd try

      This fixes up

      commit e8e89622ed361c46bf90ba4828e685a8b603f7e5
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Tue Dec 18 22:25:11 2012 +0100

  drm/ttm: fix fence locking in ttm_buffer_object_transfer

      which leaves behind a might_sleep in atomic context, since the
      fence_lock spinlock is held over a kmalloc(GFP_KERNEL) call. The fix
      is to revert the above commit and only take the lock where we need it,
      around the call to ->sync_obj_ref.

      v2: Fixup things noticed by Maarten Lankhorst:
      - Brown paper bag locking bug.
      - No need for kzalloc if we clear the entire thing on the next line.
      - check for bo->sync_obj (totally unlikely race, but still someone
else could have snuck in) and clear fbo->sync_obj if it's cleared
already.

Reported-by: Dave Airlie <airlied@gmail.com>
Cc: Jerome Glisse <jglisse@redhat.com>
Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  Approved by: kib@

r254870:
  drm/ttm: Make ttm_bo_wait() call uninterruptible in page fault handler

  This fixes a crash where a SIGLALRM, heavily used by X.Org, would
  interrupt the wait, causing the page fault to fail and the "Xorg"
  process to receive a SIGSEGV.

  Approved by: kib@

r254871:
  drm/ttm: Fix style errors

r254873:
  drm/ttm: When removing a range of pages from a pool, remove all of them

  Submitted by: Mark Kettenis and Jonathan Gray from OpenBSD
  Approved by: kib@

r254874:
  drm/ttm: Improve comment in ttm_bo_vm_ctor() about lack of ref acquisition

  Approved by: kib@

r254875:
  ttm: "to_page->valid = VM_PAGE_BITS_ALL" before vm_page_dirty(to_page)

  Approved by; kib@

r254876:
  drm/ttm: Fix unmap of buffer object

  Add a new ttm_bo_release_mmap() function to unmap pages in a
  vm_object_t. Pages are freed when the buffer object is later released.

  This function is called in ttm_bo_unmap_virtual_locked(), replacing
  Linux' unmap_mapping_range(). In particular this is called when a buffer
  object is about to be moved, so that its mapping is invalidated.

  However, we don't use this function in ttm_bo_vm_dtor(), because the
  vm_object_t is already marked as OBJ_DEAD and the pages will be
  unmapped.

  Approved by: kib@

r254877:
  drm/ttm: Fix style in ttm_bo_release_mmap()

r254878:
  drm/ttm: Fix a reversed condition and add missing locks

  This allows to run OpenGL applications on at least two test machines
  with the Radeon driver.

  Approved by: kib@

r254879:
  drm/ttm: Remove unused VM_ALLOC_DMA32 define

r254880:
  drm: Use the new drm_atomic.h, following the merge of projects/atomic64

  Submitted by: jkim@

r259612:
  ttm_bo_vm_lookup_rb: actually make use of the red-black tree

  Previously the code would just iterate over the whole tree as if it were
  just a list.

  Without this change I would observe X server becoming more and more
  jerky over time.

  MFC after: 5 days

git-svn-id: svn://svn.freebsd.org/base/stable/9@262988 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r262746, r262748, r262750, r262752
jkim [Mon, 10 Mar 2014 20:47:24 +0000 (20:47 +0000)]
MFC: r262746, r262748, r262750, r262752

Move fpusave() wrapper for suspend hander to sys/amd64/amd64/fpu.c.

git-svn-id: svn://svn.freebsd.org/base/stable/9@262981 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261535:
markj [Mon, 10 Mar 2014 02:38:41 +0000 (02:38 +0000)]
MFC r261535:
Add support for MegaRAID Fury cards. The main change needed to boot from a
9341-4i controller was to ensure that scatter/gather lists are ended with
an end-of-list marker. Both the mrsas and Linux megaraid_sas drivers use
this marker with Invader cards as well, so we do the same thing, though
it is apparently not strictly necessary.

git-svn-id: svn://svn.freebsd.org/base/stable/9@262968 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262805:
dim [Sun, 9 Mar 2014 21:02:23 +0000 (21:02 +0000)]
MFC r262805:

Pull in r199848 from upstream libc++ trunk:

  Const qualify __mem_fn call operator

  QOI improvement.

  Differential Revision: http://llvm-reviews.chandlerc.com/D2059

This should help with building recent versions of Mesa.  See also:
https://bugs.freedesktop.org/show_bug.cgi?id=75505

Reported by: dumbbell

git-svn-id: svn://svn.freebsd.org/base/stable/9@262956 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262869:
pfg [Sun, 9 Mar 2014 04:17:04 +0000 (04:17 +0000)]
MFC r262869:

ext2fs: Fix a bug when sorting htree entries.

This a typo introduced when bringing the original code from NetBSD.

Reported by: Mike Ma

git-svn-id: svn://svn.freebsd.org/base/stable/9@262944 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC vm_page_alloc_contig()
dumbbell [Sat, 8 Mar 2014 20:31:04 +0000 (20:31 +0000)]
MFC vm_page_alloc_contig()

This function will be used by TTM, a memory manager used by the Radeon
KMS driver.

Compared to HEAD, the type of the "boundary" argument to several functions
is left as "unsigned long" (instead of "vm_paddr_t" in HEAD) to prevent an
API change in a stable branch.

The following revisions were merged in this single commit:

MFC r226928:
  Eliminate vm_phys_bootstrap_alloc().  It was a failed attempt at
  eliminating duplicated code in the various pmap implementations.

  Micro-optimize vm_phys_free_pages().

  Introduce vm_phys_free_contig().  It is fast routine for freeing an
  arbitrary number of physically contiguous pages.  In particular, it
  doesn't require the number of pages to be a power of two.

  Use "u_long" instead of "unsigned long".

  Bruce Evans (bde@) has convinced me that the "boundary" parameters
  to kmem_alloc_contig(), vm_phys_alloc_contig(), and
  vm_reserv_reclaim_contig() should be of type "vm_paddr_t" and not
  "u_long".  Make this change.

MFC r227012:
  Add support for VM_ALLOC_WIRED and VM_ALLOC_ZERO to vm_page_alloc_freelist()
  and use these new options in the mips pmap.

  Wake up the page daemon in vm_page_alloc_freelist() if the number of free
  and cached pages becomes too low.

  Tidy up vm_page_alloc_init().  In particular, add a comment about an
  important restriction on its use.

  Tested by: jchandra@

MFC r227072:
  Simplify the implementation of the failure case in kmem_alloc_attr().

MFC r227127:
  Wake up the page daemon in vm_page_alloc_freelist() if it couldn't
  allocate the requested page because too few pages are cached or free.

  Document the VM_ALLOC_COUNT() option to vm_page_alloc() and
  vm_page_alloc_freelist().

  Make style changes to vm_page_alloc() and vm_page_alloc_freelist(),
  such as using a variable name that more closely corresponds to the
  comments.

MFC r227568:
  Refactor the code that performs physically contiguous memory allocation,
  yielding a new public interface, vm_page_alloc_contig().  This new function
  addresses some of the limitations of the current interfaces, contigmalloc()
  and kmem_alloc_contig().  For example, the physically contiguous memory that
  is allocated with those interfaces can only be allocated to the kernel vm
  object and must be mapped into the kernel virtual address space.  It also
  provides functionality that vm_phys_alloc_contig() doesn't, such as wiring
  the returned pages.  Moreover, unlike that function, it respects the low
  water marks on the paging queues and wakes up the page daemon when
  necessary.  That said, at present, this new function can't be applied to all
  types of vm objects.  However, that restriction will be eliminated in the
  coming weeks.

  From a design standpoint, this change also addresses an inconsistency
  between vm_phys_alloc_contig() and the other vm_phys_alloc*() functions.
  Specifically, vm_phys_alloc_contig() manipulated vm_page fields that other
  functions in vm/vm_phys.c didn't.  Moreover, vm_phys_alloc_contig() knew
  about vnodes and reservations.  Now, vm_page_alloc_contig() is responsible
  for these things.

  Reviewed by:         kib
  Discussed with: jhb

git-svn-id: svn://svn.freebsd.org/base/stable/9@262933 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r262333
brueffer [Sat, 8 Mar 2014 12:25:45 +0000 (12:25 +0000)]
MFC: r262333

Simplify the way the end of a singly linked list is followed (for adding
items), so it is more obvious that we aren't going to indirect through
a NULL pointer.

PR:             144723
Submitted by:   Garrett Cooper <yaneurabeya at gmail.com>
Obtained from:  NetBSD r1.19

git-svn-id: svn://svn.freebsd.org/base/stable/9@262927 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r262603
brueffer [Fri, 7 Mar 2014 12:21:51 +0000 (12:21 +0000)]
MFC: r262603

mdoc cleanup.

git-svn-id: svn://svn.freebsd.org/base/stable/9@262888 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r260772:
gjb [Fri, 7 Mar 2014 00:38:29 +0000 (00:38 +0000)]
MFC r260772:
  Update the pkg-stage target to be more compatible with
  pkg-1.2:

  - Add a release-dvd.conf pkg(8) configuration file to override
    the default FreeBSD.conf configuration.
  - Remove architecture-specific pkg-stage.conf files, consolidate,
    and move their contents to scripts/pkg-stage.sh.
  - Use 'pkg -vv' to determine the ABI, which is used as the
    cache directory.

  Prior to these changes, it would be possible for pkg-stage to
  fetch conflicting binary packages from multiple repositories.

NOTE:  WITH_DVD=1 is broken on stable/9, pending updates to the
pkg(7) code.  The 'dvdrom' target on stable/9 is broken as-is,
so there is no harm merging this change now.  I think.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@262879 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258305, r258770, r259400, r259426:
gjb [Fri, 7 Mar 2014 00:28:11 +0000 (00:28 +0000)]
MFC r258305, r258770, r259400, r259426:

r258305:
  Use the IMAGES variable to determine which image files to
  remove as part of 'make -C /usr/src/release clean'.

r258770 (hrs):
  Add NOPKG to disable pkg-stage.

r259400:
  Reduce disc1.iso size by 74MB by removing lib32 libraries,
  sendmail, and atf.

r259426:
  Add a pkg(8) repository configuration file for cdrom-based
  package installation.

  As part of the 'pkg-stage' target, copy the configuration
  file to the 'packages/repos/' directory on the DVD filesystem.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@262878 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r225817 (des):
gjb [Thu, 6 Mar 2014 23:49:46 +0000 (23:49 +0000)]
MFC r225817 (des):
  Don't force active mode FTP.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@262876 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoRecord mergeinfo for r225757.
gjb [Thu, 6 Mar 2014 23:42:50 +0000 (23:42 +0000)]
Record mergeinfo for r225757.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@262875 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r226891:
dumbbell [Thu, 6 Mar 2014 23:17:38 +0000 (23:17 +0000)]
MFC r226891:

Use "u_long" instead of "unsigned long".

git-svn-id: svn://svn.freebsd.org/base/stable/9@262874 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r226848:
dumbbell [Thu, 6 Mar 2014 23:06:47 +0000 (23:06 +0000)]
MFC r226848:

Tidy up the comment at the head of vm_page_alloc, and mention that the
returned page has the flag VPO_BUSY set.

git-svn-id: svn://svn.freebsd.org/base/stable/9@262873 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r226824:
dumbbell [Thu, 6 Mar 2014 18:50:35 +0000 (18:50 +0000)]
MFC r226824:

contigmalloc(9) and contigfree(9) are now implemented in terms of other
more general VM system interfaces.  So, their implementation can now
reside in kern_malloc.c alongside the other functions that are declared
in malloc.h.

git-svn-id: svn://svn.freebsd.org/base/stable/9@262863 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262575:
mav [Thu, 6 Mar 2014 14:32:55 +0000 (14:32 +0000)]
MFC r262575:
Restore SIM freeze/release match, broken at r253549.

This fixes problem with SIM left in frozen state after reinit, for example,
after firmware update.

git-svn-id: svn://svn.freebsd.org/base/stable/9@262857 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262553:
mav [Thu, 6 Mar 2014 13:25:21 +0000 (13:25 +0000)]
MFC r262553:
Pass proper pointer to bus_dmamem_free() in mps_iocfacts_free().

Passing there pointer into the middle of allocated area caused kernel
panic during reinit, for example, after firmware upgrade.

git-svn-id: svn://svn.freebsd.org/base/stable/9@262851 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261832-261834:
zeising [Thu, 6 Mar 2014 10:26:25 +0000 (10:26 +0000)]
MFC r261832-261834:

r261832:
    Add cross references between rc.conf(5) and jail.conf(5).

r261833:
    Add commas (,) to the list in the SEE ALSO section, to match most
    other manuals.

r261834:
    Bump .Dd forgotten in r261832.

git-svn-id: svn://svn.freebsd.org/base/stable/9@262836 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254623:
dumbbell [Thu, 6 Mar 2014 07:42:27 +0000 (07:42 +0000)]
MFC r254623:

Reimplement atomic operations on PDEs and PTEs in pmap.h.  This change
significantly reduces duplicate code and make it easier to read.

Note: This merge fixes the build of i386's PAE kernel, broken in r262807.

git-svn-id: svn://svn.freebsd.org/base/stable/9@262823 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254610, r254611, r254617, r254620:
dumbbell [Wed, 5 Mar 2014 21:33:11 +0000 (21:33 +0000)]
MFC r254610, r254611, r254617, r254620:

Implement atomic_swap() and atomic_testandset().
Implement atomic_cmpset_64() and atomic_swap_64() for i386.

The following revisions were merged at the same time, to avoid build
breakage:
    o  r256118
    o  r256119
    o  r256131

git-svn-id: svn://svn.freebsd.org/base/stable/9@262807 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r253102:
dumbbell [Wed, 5 Mar 2014 19:48:47 +0000 (19:48 +0000)]
MFC r253102:

Remove redundant definitions to appease tinderbox.

Note: This MFC is required by a future merge of changes to amd64's and
i386's atomic.h.

git-svn-id: svn://svn.freebsd.org/base/stable/9@262803 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261283:
dim [Wed, 5 Mar 2014 19:30:36 +0000 (19:30 +0000)]
MFC r261283:

Import libc++ 3.4 release.  This contains a lot of bugfixes, and some
preliminary support for C++1y.

MFC r261604:

HEAD is not buildable for the past day.  Commit a 'quick fix' in order to permit
buildworld to complete.

Reviewed by: theraven

MFC r261608:

Apply a cleaner solution for the sign warnings that can occur when
compiling libc++'s <locale> header with -Wsystem-headers on.

This has also been submitted upstream.

Reported by: asomers

MFC r261801:

An ABI incompatibility crept into the libc++ 3.4 import in r261283.  It
was caused by upstream libc++ commit r194536, which aimed to make the
headers more standards-compliant, by making std::pair's copy constructor
trivial.  Unfortunately, this could cause certain C++ applications using
shared libraries built against the previous version of libc++ to crash.

Fix the ABI incompatibility by making std::pair's copy constructor
non-trivial again.

Please note: Any C++ applications or shared libraries built with libc++
between r261283 and this revision should be recompiled.

Reported by: stefanf

git-svn-id: svn://svn.freebsd.org/base/stable/9@262801 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262513:
gjb [Wed, 5 Mar 2014 17:23:38 +0000 (17:23 +0000)]
MFC r262513:
 Update release/release.conf.sample to reflect changes in r262509.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@262794 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r262494
brueffer [Wed, 5 Mar 2014 13:28:02 +0000 (13:28 +0000)]
MFC: r262494

Rough cleanup (new sentence -> new line, grammar, spelling, mdoc).
This could use more work.

PR:             187035 (in part)
Submitted by:   Bjorn Heidotting

git-svn-id: svn://svn.freebsd.org/base/stable/9@262784 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262678;
pfg [Wed, 5 Mar 2014 04:27:15 +0000 (04:27 +0000)]
MFC r262678;
ufs: small formatting fixes.

Cleanup some extra space.
Use of tabs vs. spaces.
No functional change.

Reviewed by: mckusick

git-svn-id: svn://svn.freebsd.org/base/stable/9@262780 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262499, r262505, r262507, r262509:
gjb [Wed, 5 Mar 2014 00:48:11 +0000 (00:48 +0000)]
MFC r262499, r262505, r262507, r262509:

r262499:
  release.sh:
  - Add a VCSCMD variable that defaults to 'svn checkout',
    and update places 'svn co' is used directly.
  - After sourcing a configuration file, prefix SRCBRANCH,
    PORTBRANCH, and DOCBRANCH with the SVNROOT.
  - Properly capitalize 'FreeBSD.org' in the default SVNROOT.
  - Update Copyright.

  release.conf.sample:
  - Add an example to use git instead of svn, by nullifying
    SVNROOT, and setting SRCBRANCH, DOCBRANCH, and PORTBRANCH
    to the URL fo a git repository.

  release.7:
  - Document VCSCMD.

r262505:
  In release/Makefile, remove exclusion of CVS directories in the
  src/ and ports/ distributions.

  While I am thinking about it, exclude .git directories for src/
  and ports/, as somewhat of a followup to r262499.

r262507:
  Chase r262505, and remove CVS exclusion from picobsd builds.

r262509:
  Rework how WORLD_FLAGS and KERNEL_FLAGS are set, to remove an
  unnecessary expr(1) call.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/9@262762 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r254379:
dumbbell [Tue, 4 Mar 2014 20:21:43 +0000 (20:21 +0000)]
MFC r254379:

Avoid potential redefinition of the macro.

git-svn-id: svn://svn.freebsd.org/base/stable/9@262751 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r232365:
dumbbell [Tue, 4 Mar 2014 18:27:00 +0000 (18:27 +0000)]
MFC r232365:

Provide pre/post transfer method callbacks for icbbb
clients.

These are helful when making certain drivers work on both Linux
and FreeBSD without changing the code flow too much.

Reviewed by: kib, wlosh
Approved by: kan@

git-svn-id: svn://svn.freebsd.org/base/stable/9@262745 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262623, r262667:
pfg [Tue, 4 Mar 2014 03:14:09 +0000 (03:14 +0000)]
MFC r262623, r262667:

ext2fs: use of tab vs spaces.

Consistently use a single tab after a #define as mentioned in style(9).
Use tabs instead of space for indenting.
Fix a typo: "hash_vesion".

No functional change.

git-svn-id: svn://svn.freebsd.org/base/stable/9@262724 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFV 262445:
erwin [Mon, 3 Mar 2014 09:18:19 +0000 (09:18 +0000)]
MFV 262445:
Update BIND to 9.9.5

Release note:
https://lists.isc.org/pipermail/bind-announce/2013-September/000871.html
https://lists.isc.org/pipermail/bind-announce/2014-January/000896.html

Note this is a commit straight to stable as BIND no longer exists in head.

Sponsored by: DK Hostmaster A/S

git-svn-id: svn://svn.freebsd.org/base/stable/9@262706 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r262574
brueffer [Sun, 2 Mar 2014 12:13:54 +0000 (12:13 +0000)]
MFC: r262574

Add tws(4) to the hardware notes.

git-svn-id: svn://svn.freebsd.org/base/stable/9@262687 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r261068
jhibbits [Sun, 2 Mar 2014 00:20:00 +0000 (00:20 +0000)]
MFC r261068

Properly sort the arguments to mtx_init(9).

PR: misc/186020
Submitted by: alfred

git-svn-id: svn://svn.freebsd.org/base/stable/9@262671 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262472:
dim [Fri, 28 Feb 2014 20:31:07 +0000 (20:31 +0000)]
MFC r262472:

Make sure a for loop in fire_alloc_msix() terminates, by making the loop
counter signed.

Reviewed by: marius

git-svn-id: svn://svn.freebsd.org/base/stable/9@262621 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262471:
dim [Fri, 28 Feb 2014 20:22:48 +0000 (20:22 +0000)]
MFC r262471:

In sys/sparc64/sparc64/spitfire.c, prevent signed shift overflow by
casting to the appropriate type.  (Note this fix cannot be done in
sys/sparc64/sparc64/spitfire.c, since that file is also included by
assembly source files.)

Reviewed by: marius

git-svn-id: svn://svn.freebsd.org/base/stable/9@262620 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262465:
kevlo [Fri, 28 Feb 2014 16:11:43 +0000 (16:11 +0000)]
MFC r262465:

Add a flag to run's device list which uses a standard scsi eject.
The flag indicates that the mcu doesn't need to load firmware.

Tested by: Alex Deiter <alex dot deiter at gmail.com>, myself
Tested on: ASUS USB-N66

git-svn-id: svn://svn.freebsd.org/base/stable/9@262605 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262142:
rodrigc [Fri, 28 Feb 2014 01:35:24 +0000 (01:35 +0000)]
MFC r262142:

   In ue_attach_post_task(), initialize curvnet to vnet0 before calling if_attach().
   Before this patch, curvnet was NULL.
   When the VIMAGE kernel option is enabled, this eliminates
   kernel panics when USB ethernet devices are plugged in.

PR: 183835
Submitted by: Hiroo Oono <hiroo.ono at gmail dot com>

git-svn-id: svn://svn.freebsd.org/base/stable/9@262594 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r262296
brueffer [Fri, 28 Feb 2014 00:44:41 +0000 (00:44 +0000)]
MFC: r262296

Match the correct variable to the variable description.

PR: 121173
Submitted by: Thomas Mueller <tmueller at sysgo.com>

git-svn-id: svn://svn.freebsd.org/base/stable/9@262589 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257472
hiren [Thu, 27 Feb 2014 22:36:16 +0000 (22:36 +0000)]
MFC r257472

Rate limit (to once per minute) "Listen queue overflow" message in
sonewconn().

git-svn-id: svn://svn.freebsd.org/base/stable/9@262579 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262346:
pfg [Thu, 27 Feb 2014 16:07:12 +0000 (16:07 +0000)]
MFC r262346:
ext2fs: fully enable ext4 read-only support.

The ext4 developers tend to tag Ext4-specific flags as
"incompatible" even when such features are not relevant for
read-only support.  This is a consequence of the process
though which this filesystem is implemented without design
and the fact that some new features are not extensible to
ext2/3.

Organize the features according to what we support and sort
them so that we can now read-only mount filesystems with
some features that may be found in newly formatted ext4 fs.

Submitted by: Zheng Liu

git-svn-id: svn://svn.freebsd.org/base/stable/9@262564 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262277:
davidxu [Thu, 27 Feb 2014 02:41:41 +0000 (02:41 +0000)]
MFC r262277:

malloc_aligned() may not leave enough space for pointer to allocated memory,
saving the pointer will overwrite bytes belongs to another memory block
unexpectly, to fix the problem, use (allocated address + sizeof(void *)) as
initial value, and slip to next aligned address, so maximum extra bytes is
sizeof(void *) + align - 1.

Tested by: Andre Albsmeier < mail at ma17 dot ata dot myota dot orgndre >

MFC r262334:

Increase alignment to size of pointer if the alignment is too small.
Some modules do not align data at least to size of pointer, they uses a
smaller alignment, but our pointer should be aligned to its native
boundary, otherwise on some platforms, hardware alignment checking
will cause bus error.

git-svn-id: svn://svn.freebsd.org/base/stable/9@262545 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r261773
brueffer [Tue, 25 Feb 2014 07:57:17 +0000 (07:57 +0000)]
MFC: r261773

In acline_init(), initialize ac_line to SRC_UNKNOWN.  Previously
this could lead to the -n option effectively being ignored (in case
ac_line happened to be 0 aka SRC_AC), or other undefined behaviour.

PR: 169779
Submitted by: Alex Gonzalez <loox at e-shell.com>
Reviewed by: jhb

git-svn-id: svn://svn.freebsd.org/base/stable/9@262475 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262467: sh: Add -h option to SYNOPSIS
daichi [Tue, 25 Feb 2014 04:19:15 +0000 (04:19 +0000)]
MFC r262467: sh: Add -h option to SYNOPSIS

Reviewed by: jilles

git-svn-id: svn://svn.freebsd.org/base/stable/9@262469 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r262310:
dim [Mon, 24 Feb 2014 21:22:44 +0000 (21:22 +0000)]
MFC r262310:

Move the part in bsd.own.mk that sets -Wno-c++11-extensions for clang to
bsd.sys.mk, where it really belongs.  This also causes the flag to get
added when clang is *not* the default system compiler, but is still
used, e.g. by setting WITH_CLANG_IS_CC manually.

git-svn-id: svn://svn.freebsd.org/base/stable/9@262459 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f