]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
13 years agoMFC r215471:
kib [Fri, 26 Nov 2010 15:30:02 +0000 (15:30 +0000)]
MFC r215471:
In vm_object_page_clean(), handle the pages that might be cached
or not written by vm_pageout_flush().

MFC r215574:
The runlen returned from vm_pageout_flush() might be zero legitimately

MCF r215610:
Eliminate the mab, maf arrays and related variables.
The change also fixes off-by-one error in the calculation of mreq.

MFC r215796:
After the sleep caused by encountering a busy page, relookup the page.

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

13 years agoMFC r215708:
bschmidt [Fri, 26 Nov 2010 11:55:51 +0000 (11:55 +0000)]
MFC r215708:
Resurrect amd64 support.
- Many drivers on amd64 are picking system uptime, interrupt time and ticks
  via global data structure instead of calling functions for performance
  reasons. For now just patch such address so driver will not trigger page
  fault when trying to access such data. In future, additional callout may
  be added to update data in periodic intervals.
- On amd64 we need to allocate "shadow space" on stack before calling any
  function.

Submitted by: Paul B Mahol <onemda at gmail.com>

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

13 years agoMFC r215707:
bschmidt [Fri, 26 Nov 2010 11:48:47 +0000 (11:48 +0000)]
MFC r215707:
Prefer pmap_extract() over pmap_kextract() as done in MmIsAddressValid().
According to the comment for MmIsAddressValid() there are issues on PAE
kernels using pmap_kextract().

Submitted by: Paul B Mahol <onemda at gmail.com>

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

13 years agoPartial MFC r215548:
kib [Fri, 26 Nov 2010 11:37:35 +0000 (11:37 +0000)]
Partial MFC r215548:
Remove printf()s in the vop_inactive and vop_reclaim() methods related
to prtactive variable. The prtactive variable definition and declaration
are kept in the stable branch to preserve the KPI and KBI.

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

13 years agoMFC r215741:
kib [Fri, 26 Nov 2010 11:11:48 +0000 (11:11 +0000)]
MFC r215741:
Add include guards.

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

13 years agoMFC r215742:
kib [Fri, 26 Nov 2010 11:05:29 +0000 (11:05 +0000)]
MFC r215742:
Add PT_GNU_STACK definition.

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

13 years agoMFC r213471:
netchild [Fri, 26 Nov 2010 11:02:51 +0000 (11:02 +0000)]
MFC r213471:
  Fix a comparision of an uninitialised pointer.

  Submitted by: arundel
  Found by: clang analysis (automatic service by uqs@)
  Reviewed by: rdivacky

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

13 years agoMFC r215666:
netchild [Fri, 26 Nov 2010 10:57:52 +0000 (10:57 +0000)]
MFC r215666:
  Remove trailing dot from the unimplemented futex messages to make
  them consistent with the syscall and ipc messages.

  Submitted by: arundel

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

13 years agoMFC r214426: Add a short note about kernel modules in FIXIT mode.
delphij [Fri, 26 Nov 2010 02:15:39 +0000 (02:15 +0000)]
MFC r214426: Add a short note about kernel modules in FIXIT mode.

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

13 years agoMFC r215135,215419,215420:
bschmidt [Thu, 25 Nov 2010 18:50:59 +0000 (18:50 +0000)]
MFC r215135,215419,215420:
- According to specs for MmAllocateContiguousMemorySpecifyCache() physically
  contiguous memory with requested restrictions must be allocated.
- Use kmem_alloc_contig() to honour the cache_type variable.
- Fix a panic on i386 for drivers using MmAllocateContiguousMemory()
  and MmAllocateContiguousMemorySpecifyCache().

Submitted by: Paul B Mahol <onemda at gmail.com>

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

13 years agoMFC r214798:
bschmidt [Thu, 25 Nov 2010 18:43:18 +0000 (18:43 +0000)]
MFC r214798:
Remove 4.x, 5.x and 6.x compatibility bits.

Submitted by: Paul B Mahol <onemda at gmail.com>

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

13 years agoMFC r213461:
bschmidt [Thu, 25 Nov 2010 18:40:56 +0000 (18:40 +0000)]
MFC r213461:
Use the printf-like capability from kproc_create().

Submitted by: Paul B Mahol <onemda at gmail.com>
Committed by: thompsa

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

13 years agoMFC r213778:
bschmidt [Thu, 25 Nov 2010 18:37:04 +0000 (18:37 +0000)]
MFC r213778:
WPA_CSE_WEP104 was being incorrectly checked.

Committed by: rpaulo

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

13 years agoMFC r201620,201644:
bschmidt [Thu, 25 Nov 2010 18:34:42 +0000 (18:34 +0000)]
MFC r201620,201644:
Add net80211 media status reporting.

Submitted by: Paul B Mahol <onemda at gmail.com>
Committed by: rpaulo

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

13 years agoMFC 215474
rstone [Thu, 25 Nov 2010 18:32:02 +0000 (18:32 +0000)]
MFC 215474

When netstat was run with -i/-I and -w1 to produce running counters, the idrop
field printed an absolute value rather than the delta from the last value

Approved by: emaste (mentor)

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

13 years agoMFC r198786,198816,198819:
bschmidt [Thu, 25 Nov 2010 18:27:59 +0000 (18:27 +0000)]
MFC r198786,198816,198819:
Big style cleanup. While there remove references to FreeBSD versions
older than 6.0.

Submitted by: Paul B Mahol <onemda at gmail.com>
Committed by: rpaulo

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

13 years agoMFC r215234:
delphij [Thu, 25 Nov 2010 18:21:08 +0000 (18:21 +0000)]
MFC r215234:

Update to vendor release 1.20.00.19.

Bug fixes:
  * Fixed "inquiry data fails comparion at DV1 step"
  * Fixed bad range input in bus_alloc_resource for ADAPTER_TYPE_B
  * Fixed arcmsr driver prevent arcsas support for Areca SAS HBA ARC13x0

Many thanks to Areca for continuing to support FreeBSD.

MFC r215280:

Workaround build for PAE case for now - revert the PHYS
case to previous panic behavior.

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

13 years agoMFC r215102:
attilio [Thu, 25 Nov 2010 16:21:56 +0000 (16:21 +0000)]
MFC r215102:
Fix a typo.

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

13 years agoMFC of 215110:
rrs [Thu, 25 Nov 2010 12:10:59 +0000 (12:10 +0000)]
MFC of 215110:
Fix so that a multicast packet can be sent
even if there is no route out to that mcast address. The code in
in_pcb inadvertantly would error (no route) even though
the user may have specified the address with the
proper socket option (to specify the egress interface).
Thanks bz for reminding me I forgot to commit this ;-)

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

13 years agoMFC r215699:
bschmidt [Thu, 25 Nov 2010 08:55:57 +0000 (08:55 +0000)]
MFC r215699:
The meshid element is memcpy()'ed into se_meshid if included in either
beacon or probe-response frames. Fix the condition by checking for the
the array's content instead of the always existing array itself.

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

13 years agoMFC: r201217: ANSIfy ldconfig and the aout bits it still uses from rtld-aout
obrien [Thu, 25 Nov 2010 07:02:36 +0000 (07:02 +0000)]
MFC: r201217: ANSIfy ldconfig and the aout bits it still uses from rtld-aout

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

13 years agoMFC: r215705: hdr.elf.e_ident[EI_OSABI] is not a bitmask
obrien [Wed, 24 Nov 2010 22:44:10 +0000 (22:44 +0000)]
MFC: r215705: hdr.elf.e_ident[EI_OSABI] is not a bitmask

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

13 years agoMFC r215637:
brucec [Wed, 24 Nov 2010 21:54:45 +0000 (21:54 +0000)]
MFC r215637:

dispatch_add_command:
Modify the logic so there's only one exit point instead of two.
Only insert valid (non-NULL) values into the queue.

dispatch_free_command:
Ensure that item is not NULL before removing it from the queue and
dereferencing the pointer.
NULL out free'd pointers to catch any use-after-free bugs.

PR: bin/146855
Submitted by: gcooper

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

13 years agoMFC 213876: Add more USB device IDs to supported list of devices.
n_hibma [Wed, 24 Nov 2010 09:36:36 +0000 (09:36 +0000)]
MFC 213876: Add more USB device IDs to supported list of devices.

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

13 years agoMFC: r204329: Fixed dependencies (make checkdpadd).
obrien [Wed, 24 Nov 2010 08:09:33 +0000 (08:09 +0000)]
MFC: r204329: Fixed dependencies (make checkdpadd).

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

13 years agoMFhead r214508:
glebius [Wed, 24 Nov 2010 05:37:12 +0000 (05:37 +0000)]
MFhead r214508:
  Revert a small part of the r198301, that is entirely unrelated to the
  r198301 itself. It also broke the logic of not sending more than one
  ARP request per second, that consequently lead to a potential problem
  of flooding network with broadcast packets.

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

13 years agoSynchronize Xen support with current, excluding console API changes in
gibbs [Wed, 24 Nov 2010 01:03:03 +0000 (01:03 +0000)]
Synchronize Xen support with current, excluding console API changes in
the PV Xen console driver.

Merged revisions
================
r199734 | kmacy | 2009-11-24 00:17:51 -0700 (Tue, 24 Nov 2009) | 2 lines

    fixup kernel core dumps on paravirtual guests

r199959 | kmacy | 2009-11-29 21:20:43 -0700 (Sun, 29 Nov 2009) | 3 lines

    Update license to reflect terms in xen 2.0 as of the time when the
    driver was ported to FreeBSD

r199960 | kmacy | 2009-11-29 21:32:34 -0700 (Sun, 29 Nov 2009) | 2 lines

    Merge Scott Long's latest blkfront now that the licensing issues are
    resolved

r201234 | gibbs | 2009-12-29 16:28:13 -0700 (Tue, 29 Dec 2009) | 5 lines

    Correct bug introduced while purging the -ERRNO Linuxism from the
    grant table API.  Valid grant refs are in the range of positive 32bit
    integers.  ENOSPACE, being 29, is also a positive integer.  Return
    GNTTAB_LIST_END (-1) instead when gnttab_claim_grant_reference() fails.

r201138 | gibbs | 2009-12-28 11:59:13 -0700 (Mon, 28 Dec 2009) | 8 lines

    Correct alignment and boundary constraints in blkfront's bus dma tag.  The
    blkif interface in Xen requires all I/O to be 512 byte aligned with each
    segment bounded by a 4k page.

    Note: This submission only documents the proper contraints for blkif I/O.
          The alignment code in busdma does not yet handle alignment constraints
          correctly in all cases.

r201236 | gibbs | 2009-12-29 16:31:21 -0700 (Tue, 29 Dec 2009) | 3 lines

    In blkif_queue_cb(), test the return value from
    gnttab_claim_grant_reference() for >= 0 instead of != ENOSPC.

r204159 | kmacy | 2010-02-20 18:12:18 -0700 (Sat, 20 Feb 2010) | 2 lines

    don't hold spin lock across free

r214077 | gibbs | 2010-10-19 14:53:30 -0600 (Tue, 19 Oct 2010) | 342 lines

    Improve the Xen para-virtualized device infrastructure of FreeBSD:

     o Add support for backend devices (e.g. blkback)
     o Implement extensions to the Xen para-virtualized block API to allow
       for larger and more outstanding I/Os.
     o Import a completely rewritten block back driver with support for
       fronting I/O to both raw devices and files.
     o General cleanup and documentation of the XenBus and XenStore support
       code.
     o Robustness and performance updates for the block front driver.
     o Fixes to the netfront driver.

    Sponsored by: Spectra Logic Corporation

    sys/xen/xenbus/init.txt:
            Deleted: This file explains the Linux method for XenBus device
            enumeration and thus does not apply to FreeBSD's NewBus approach.

    sys/xen/xenbus/xenbus_probe_backend.c:
           Deleted: Linux version of backend XenBus service routines.  It
           was never ported to FreeBSD.  See xenbusb.c, xenbusb_if.m,
           xenbusb_front.c xenbusb_back.c for details of FreeBSD's XenBus
           support.

    sys/xen/xenbus/xenbusvar.h:
    sys/xen/xenbus/xenbus_xs.c:
    sys/xen/xenbus/xenbus_comms.c:
    sys/xen/xenbus/xenbus_comms.h:
    sys/xen/xenstore/xenstorevar.h:
    sys/xen/xenstore/xenstore.c:
            Split XenStore into its own tree.  XenBus is a software layer
            built on top of XenStore.  The old arrangement and the naming of
            some structures and functions blurred these lines making it
            difficult to discern what services are provided by which layer
            and at what times these services are available (e.g. during
            system startup and shutdown).

    sys/xen/xenbus/xenbus_client.c:
    sys/xen/xenbus/xenbus.c:
    sys/xen/xenbus/xenbus_probe.c:
    sys/xen/xenbus/xenbusb.c:
    sys/xen/xenbus/xenbusb.h:
            Split up XenBus code into methods available for use by client
            drivers (xenbus.c) and code used by the XenBus "bus code" to
            enumerate, attach, detach, and service bus drivers.

    sys/xen/reboot.c:
    sys/dev/xen/control/control.c:
    Add a XenBus front driver for handling shutdown, reboot,
    suspend, and resume events published in the XenStore.
    Move all PV suspend/reboot support from reboot.c into
    this driver.

    sys/xen/blkif.h:
            New file from Xen vendor with macros and structures used by
            a block back driver to service requests from a VM running a
            different ABI (e.g. amd64 back with i386 front).

    sys/conf/files:
            Adjust kernel build spec for new XenBus/XenStore layout and added
            Xen functionality.

    sys/dev/xen/balloon/balloon.c:
    sys/dev/xen/netfront/netfront.c:
    sys/dev/xen/blkfront/blkfront.c:
    sys/xen/xenbus/...
    sys/xen/xenstore/...
            o Rename XenStore APIs and structures from xenbus_* to xs_*.
    o Adjust to use of M_XENBUS and M_XENSTORE malloc types
      for allocation of objects returned by these APIs.
    o Adjust for changes in the bus interface for Xen
    drivers.

    sys/xen/xenbus/...
    sys/xen/xenstore/...
            Add Doxygen comments for these interfaces and the code that
            implements them.

    sys/dev/xen/blkback/blkback.c:
            o Rewrite the Block Back driver to attach properly via newbus,
              operate correctly in both PV and HVM mode regardless of domain
              (e.g. can be in a DOM other than 0), and to deal with the latest
              metadata available in XenStore for block devices.

            o Allow users to specify a file as a backend to blkback, in addition
              to character devices.  Use the namei lookup of the backend path
              to automatically configure, based on file type, the appropriate
              backend method.

            The current implementation is limited to a single outstanding I/O
            at a time to file backed storage.

    sys/dev/xen/blkback/blkback.c:
    sys/xen/interface/io/blkif.h:
    sys/xen/blkif.h:
    sys/dev/xen/blkfront/blkfront.c:
    sys/dev/xen/blkfront/block.h:
            Extend the Xen blkif API: Negotiable request size and number of
            requests.

            This change extends the information recorded in the XenStore
            allowing block front/back devices to negotiate for optimal I/O
            parameters.  This has been achieved without sacrificing backward
            compatibility with drivers that are unaware of these protocol
            enhancements.  The extensions center around the connection protocol
            which now includes these additions:

            o The back-end device publishes its maximum supported values for,
              request I/O size, the number of page segments that can be
              associated with a request, the maximum number of requests that
              can be concurrently active, and the maximum number of pages that
              can be in the shared request ring.  These values are published
              before the back-end enters the XenbusStateInitWait state.

            o The front-end waits for the back-end to enter either the InitWait
              or Initialize state.  At this point, the front end limits it's
              own capabilities to the lesser of the values it finds published
              by the backend, it's own maximums, or, should any back-end data
              be missing in the store, the values supported by the original
              protocol.  It then initializes it's internal data structures
              including allocation of the shared ring, publishes its maximum
              capabilities to the XenStore and transitions to the Initialized
              state.

            o The back-end waits for the front-end to enter the Initalized
              state.  At this point, the back end limits it's own capabilities
              to the lesser of the values it finds published by the frontend,
              it's own maximums, or, should any front-end data be missing in
              the store, the values supported by the original protocol.  It
              then initializes it's internal data structures, attaches to the
              shared ring and transitions to the Connected state.

            o The front-end waits for the back-end to enter the Connnected
              state, transitions itself to the connected state, and can
              commence I/O.

            Although an updated front-end driver must be aware of the back-end's
            InitWait state, the back-end has been coded such that it can
            tolerate a front-end that skips this step and transitions directly
            to the Initialized state without waiting for the back-end.

    sys/xen/interface/io/blkif.h:
            o Increase BLKIF_MAX_SEGMENTS_PER_REQUEST to 255.  This is
              the maximum number possible without changing the blkif
              request header structure (nr_segs is a uint8_t).

            o Add two new constants:
              BLKIF_MAX_SEGMENTS_PER_HEADER_BLOCK, and
              BLKIF_MAX_SEGMENTS_PER_SEGMENT_BLOCK.  These respectively
              indicate the number of segments that can fit in the first
              ring-buffer entry of a request, and for each subsequent
              (sg element only) ring-buffer entry associated with the
              "header" ring-buffer entry of the request.

            o Add the blkif_request_segment_t typedef for segment
              elements.

            o Add the BLKRING_GET_SG_REQUEST() macro which wraps the
              RING_GET_REQUEST() macro and returns a properly cast
              pointer to an array of blkif_request_segment_ts.

            o Add the BLKIF_SEGS_TO_BLOCKS() macro which calculates the
              number of ring entries that will be consumed by a blkif
              request with the given number of segments.

    sys/xen/blkif.h:
            o Update for changes in interface/io/blkif.h macros.

            o Update the BLKIF_MAX_RING_REQUESTS() macro to take the
              ring size as an argument to allow this calculation on
              multi-page rings.

            o Add a companion macro to BLKIF_MAX_RING_REQUESTS(),
              BLKIF_RING_PAGES().  This macro determines the number of
              ring pages required in order to support a ring with the
              supplied number of request blocks.

    sys/dev/xen/blkback/blkback.c:
    sys/dev/xen/blkfront/blkfront.c:
    sys/dev/xen/blkfront/block.h:
            o Negotiate with the other-end with the following limits:
                  Reqeust Size:   MAXPHYS
                  Max Segments:   (MAXPHYS/PAGE_SIZE) + 1
                  Max Requests:   256
                  Max Ring Pages: Sufficient to support Max Requests with
                                  Max Segments.

            o Dynamically allocate request pools and segemnts-per-request.

            o Update ring allocation/attachment code to support a
              multi-page shared ring.

            o Update routines that access the shared ring to handle
              multi-block requests.

    sys/dev/xen/blkfront/blkfront.c:
            o Track blkfront allocations in a blkfront driver specific
              malloc pool.

            o Strip out XenStore transaction retry logic in the
              connection code.  Transactions only need to be used when
              the update to multiple XenStore nodes must be atomic.
              That is not the case here.

            o Fully disable blkif_resume() until it can be fixed
              properly (it didn't work before this change).

            o Destroy bus-dma objects during device instance tear-down.

            o Properly handle backend devices with powef-of-2 sector
              sizes larger than 512b.

    sys/dev/xen/blkback/blkback.c:
            Advertise support for and implement the BLKIF_OP_WRITE_BARRIER
            and BLKIF_OP_FLUSH_DISKCACHE blkif opcodes using BIO_FLUSH and
            the BIO_ORDERED attribute of bios.

    sys/dev/xen/blkfront/blkfront.c:
    sys/dev/xen/blkfront/block.h:
            Fix various bugs in blkfront.

           o gnttab_alloc_grant_references() returns 0 for success and
             non-zero for failure.  The check for < 0 is a leftover
             Linuxism.

           o When we negotiate with blkback and have to reduce some of our
             capabilities, print out the original and reduced capability before
             changing the local capability.  So the user now gets the correct
             information.

            o Fix blkif_restart_queue_callback() formatting.  Make sure we hold
              the mutex in that function before calling xb_startio().

            o Fix a couple of KASSERT()s.

            o Fix a check in the xb_remove_* macro to be a little more specific.

    sys/xen/gnttab.h:
    sys/xen/gnttab.c:
            Define GNTTAB_LIST_END publicly as GRANT_REF_INVALID.

    sys/dev/xen/netfront/netfront.c:
            Use GRANT_REF_INVALID instead of driver private definitions of the
            same constant.

    sys/xen/gnttab.h:
    sys/xen/gnttab.c:
            Add the gnttab_end_foreign_access_references() API.

    This API allows a client to batch the release of an
    array of grant references, instead of coding a private
    for loop.  The implementation takes advantage of this
    batching to reduce lock overhead to one acquisition and
    release per-batch instead of per-freed grant reference.

    While here, reduce the duration the gnttab_list_lock
    is held during gnttab_free_grant_references() operations.
    The search to find the tail of the incoming free list
    does not rely on global state and so can be performed
    without holding the lock.

    sys/dev/xen/xenpci/evtchn.c:
    sys/dev/xen/evtchn/evtchn.c:
    sys/xen/xen_intr.h:
    o Implement the bind_interdomain_evtchn_to_irqhandler
      API for HVM mode.  This allows an HVM domain to serve
      back end devices to other domains.  This API is already
      implemented for PV mode.

            o Synchronize the API between HVM and PV.

    sys/dev/xen/xenpci/xenpci.c:
    o Scan the full region of CPUID space in which the Xen
      VMM interface may be implemented.  On systems using
      SuSE as a Dom0 where the Viridian API is also exported,
      the VMM interface is above the region we used to
      search.

            o Pass through bus_alloc_resource() calls so that XenBus drivers
              attaching on an HVM system can allocate unused physical address
              space from the nexus.  The block back driver makes use of this
              facility.

    sys/i386/xen/xen_machdep.c:
            Use the correct type for accessing the statically mapped xenstore
            metadata.

    sys/xen/interface/hvm/params.h:
    sys/xen/xenstore/xenstore.c:
            Move hvm_get_parameter() to the correct global header file instead
            of as a private method to the XenStore.

    sys/xen/interface/io/protocols.h:
            Sync with vendor.

    sys/xeninterface/io/ring.h:
            Add macro for calculating the number of ring pages needed for an N
            deep ring.

            To avoid duplication within the macros, create and use the new
            __RING_HEADER_SIZE() macro.  This macro calculates the size of the
            ring book keeping struct (producer/consumer indexes, etc.) that
            resides at the head of the ring.

            Add the __RING_PAGES() macro which calculates the number of shared
            ring pages required to support a ring with the given number of
            requests.

            These APIs are used to support the multi-page ring version of the
            Xen block API.

    sys/xeninterface/io/xenbus.h:
            Add Comments.

    sys/xen/xenbus/...
    o Refactor the FreeBSD XenBus support code to allow for
      both front and backend device attachments.

            o Make use of new config_intr_hook capabilities to allow
              front and back devices to be probed/attached in parallel.

    o Fix bugs in probe/attach state machine that could
      cause the system to hang when confronted with a failure
      either in the local domain or in a remote domain to
      which one of our driver instances is attaching.

    o Publish all required state to the XenStore on device
      detach and failure.  The majority of the missing
      functionality was for serving as a back end since the
      typical "hot-plug" scripts in Dom0 don't handle the
      case of cleaning up for a "service domain" that is
      not itself.

            o Add dynamic sysctl nodes exposing the generic ivars of
              XenBus devices.

            o Add doxygen style comments to the majority of the code.

            o Cleanup types, formatting, etc.

    sys/xen/xenbus/xenbusb.c:
            Common code used by both front and back XenBus busses.

    sys/xen/xenbus/xenbusb_if.m:
            Method definitions for a XenBus bus.

    sys/xen/xenbus/xenbusb_front.c:
    sys/xen/xenbus/xenbusb_back.c:
            XenBus bus specialization for front and back devices.

r214444 | gibbs | 2010-10-27 22:14:28 -0600 (Wed, 27 Oct 2010) | 9 lines

    sys/dev/xen/blkback/blkback.c:
            In xbb_detach() only perform cleanup of our taskqueue and
            device statistics structures if they have been initialized.
            This avoids a panic when xbb_detach() is called on a partially
            initialized device instance, due to an early failure in
            attach.

    Sponsored by:   Spectra Logic Corporation

r215681 | jhb | 2010-11-22 08:15:11 -0700 (Mon, 22 Nov 2010) | 2 lines

    Remove some bogus, self-referential mergeinfo.

r215682 | jhb | 2010-11-22 08:26:47 -0700 (Mon, 22 Nov 2010) | 5 lines

    Purge mergeinfo on sys/dev/xen/xenpci.  The only unique mergeinfo compared
    to head was not useful (it came in with the merge from /user/dfr/xenhvm/7
    and that mergeinfo is still present at sys/) and not worth keeping an extra
    set of mergeinfo around in the kernel.

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

13 years agoMFC of 215576
mckusick [Tue, 23 Nov 2010 23:13:58 +0000 (23:13 +0000)]
MFC of 215576

Delete /sys/ufs/ffs/README.snapshot as it is no longer relevant.
Drop reference to it in mount(8).

Reported by: Bruce Cran <bruce@cran.org.uk>
PR: docs/128325

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

13 years agoMFC r215468:
mav [Tue, 23 Nov 2010 21:42:26 +0000 (21:42 +0000)]
MFC r215468:
Make ATA_CAM wrapper to report SATA power management capabilities to CAM to
make it configure device to initiate transitions if controller configured
to accept them. This makes hint.ata.X.pm_level=1 mode working.

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

13 years agoMFC r215453:
mav [Tue, 23 Nov 2010 21:40:21 +0000 (21:40 +0000)]
MFC r215453:
Even if we are skipping SATA hard reset - set power management bits in
SControl register. This should make things more consistent.

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

13 years agoMFC r215454:
mav [Tue, 23 Nov 2010 21:36:56 +0000 (21:36 +0000)]
MFC r215454:
If HBA doesn't report user-enabled SATA capabilies (like ATA_CAM wrapper) -
handle all of them as disabled.

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

13 years agoMFC r214237,214489:
uqs [Tue, 23 Nov 2010 21:36:53 +0000 (21:36 +0000)]
MFC r214237,214489:

Remove mention of non-existant -o flag for debugging options.

Fix CPU load reporting independent of scheduler used.
- Sample CPU usage data from kern.cp_times, this makes for a far more
  accurate and scheduler independent algorithm.
- Rip out the process list scraping that is no longer required.
- Don't update CPU usage sampling on every request, but every 15s
  instead. This makes it impossible for an attacker to hide the CPU load
  by triggering 4 samplings in short succession when the system is idle.
- After reaching the steady-state, the system will always report the
  average CPU load of the last 60 sampled seconds.
- Untangling of call graph.

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

13 years agoMFC r214288:
mav [Tue, 23 Nov 2010 21:35:13 +0000 (21:35 +0000)]
MFC r214288:
Make da driver to handle some probably broken Android devices, returning
zero media and sector size instead of "Medium not present" error,
until some confirmation button is tapped on device.

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

13 years agoMFC r215428, r215431, r215462:
mav [Tue, 23 Nov 2010 21:29:40 +0000 (21:29 +0000)]
MFC r215428, r215431, r215462:
Add support for VIA VX900 chipset SATA controller.

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

13 years agoMFC r214896:
mav [Tue, 23 Nov 2010 21:22:18 +0000 (21:22 +0000)]
MFC r214896:
Mark command submission timeouts as timeouts. This should trigger device
resets and increase chances of getting device back again.

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

13 years agoMFC r214880:
mav [Tue, 23 Nov 2010 21:20:27 +0000 (21:20 +0000)]
MFC r214880:
Add support for odd-sized PIO transfers, sometimes used by ATAPI.

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

13 years agoMFC r213856
n_hibma [Tue, 23 Nov 2010 19:22:44 +0000 (19:22 +0000)]
MFC r213856

- Add more USB devices to usbdevs and rename some previously unknown
  ones.
- Add more USB mass storage quirks.

Note: In this MFC the QUALCOMMINC E2000 entry is left intact as it is in
use.

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

13 years agoMFC r215353,215355:
yongari [Tue, 23 Nov 2010 19:21:44 +0000 (19:21 +0000)]
MFC r215353,215355:
r215353:
  Plug memory leakage introduced in r204989.

  Reported by: yongari
r215355:
  Restore the previous behaviour of substring match.

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

13 years agoMFC r215327,215350:
yongari [Tue, 23 Nov 2010 19:11:27 +0000 (19:11 +0000)]
MFC r215327,215350:
r215327:
  P5N32-SLI PREMIUM from ASUSTeK is known to have MSI/MSI-X issue
  such that nfe(4) does not work with MSI-X. When MSI-X support was
  introduced, I remember MCP55 controller worked without problems so
  the issue could be either PCI bridge or BIOS issue. But I also
  noticed snd_hda(4) disabled MSI on all MCP55 chipset so I'm still
  not sure this is generic issue of MCP55 chipset. If this was PCI
  bridge issue we would have added it to a system wide black-list
  table but it's not clear to me at this moment whether it was caused
  by either broken BIOS or silicon bug of MCP55 chipset.

  To workaround the issue, maintain a MSI/MSI-X black-list table in
  driver and lookup base board manufacturer and product name from the
  table before attempting to use MSI-X. If driver find an matching
  entry, nfe(4) will not use MSI/MSI-X and fall back on traditional
  INTx mode. This approach should be the last resort since it relies
  on smbios and if another instance of MSI/MSI-X breakage is reported
  with different maker/product, we may have to get the PCI bridge
  black-listed instead of adding an new entry.

  PR: kern/152150

r215350:
  Plug memory leakage introduced in r215327.

  Submitted by: jkim

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

13 years agoMFC r215237: Fix bug in jn(3) and jnf(3) that led to -inf results
uqs [Tue, 23 Nov 2010 18:48:57 +0000 (18:48 +0000)]
MFC r215237: Fix bug in jn(3) and jnf(3) that led to -inf results

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

13 years agoRevert r215755 as it was supposed to happen on -CURRENT and not STABLE_8.
attilio [Tue, 23 Nov 2010 18:47:43 +0000 (18:47 +0000)]
Revert r215755 as it was supposed to happen on -CURRENT and not STABLE_8.

Pointy hat to: me

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

13 years agoMake this printf output more verbose.
attilio [Tue, 23 Nov 2010 18:45:12 +0000 (18:45 +0000)]
Make this printf output more verbose.

Sponsored by: Sandvine Incorporated
Submitted by: Sandvine Incorporated
MFC after: 3 days

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

13 years agoMFC r208839,214999:
nwhitehorn [Tue, 23 Nov 2010 14:13:12 +0000 (14:13 +0000)]
MFC r208839,214999:
Add two new flags (IIC_M_NOSTOP and IIC_M_NOSTART) to struct iic_msg to
allow consumers of iicbus_transfer() to send messages with repeated starts.

Reviewed by: imp, thompsa

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

13 years agoMFC 212726:
zec [Tue, 23 Nov 2010 13:37:42 +0000 (13:37 +0000)]
MFC 212726:

  Make the format of "Real Memory" and "Virtual Memory" lines more
  consistent with the rest of sysctl vm.vmtotal output.

  MFC after:    3 days

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

13 years agoMFC 209723:
zec [Tue, 23 Nov 2010 13:28:45 +0000 (13:28 +0000)]
MFC 209723:

   Fix a double-free bug which can occur if both bit error rate and
   packet duplication probability are configured on a ng_pipe node.

   Submitted by:   Jeffrey Ahrenholtz
   MFC after:    3 days

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

13 years agoMFC 207426:
zec [Tue, 23 Nov 2010 13:26:59 +0000 (13:26 +0000)]
MFC 207426:

   Avoid undefined behaviour.

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

13 years agoMFC 206360:
zec [Tue, 23 Nov 2010 13:25:27 +0000 (13:25 +0000)]
MFC 206360:
   Start copyright notice with /*-

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

13 years agoMFC r215176:
pluknet [Tue, 23 Nov 2010 11:39:11 +0000 (11:39 +0000)]
MFC r215176:

 Stop documenting vgonel() after its converting to the static function:
  svn r147332 (by jeff): "Don't make vgonel() globally visible".
 While here, specify the vnode locking scheme for vgone().

Approved by: avg (mentor), kib (mentor)

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

13 years agoMFC r213718:
mm [Tue, 23 Nov 2010 11:31:12 +0000 (11:31 +0000)]
MFC r213718:

- Add support for xz compression to pkg_create, bzip2 remains the default
compression algorithm.
- Bump PKG_INSTALL_VERSION to 20101012.

Submitted by: mm
Approved by: portmgr (flz)

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

13 years agoMFC r213700, r215187, r215515:
mm [Tue, 23 Nov 2010 10:37:00 +0000 (10:37 +0000)]
MFC r213700, r215187, r215515:

MFC r213700:
Upgrade xz to git snapshot as of 20101010

MFC r215187:
Update xz to release 5.0.0

MFC r215515
Remove obsoleted private symbol.

Approved by: delphij (mentor)

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

13 years agoMFC 200669:
fabient [Tue, 23 Nov 2010 09:12:43 +0000 (09:12 +0000)]
MFC 200669:
Recognize Intel CPUs with Family 0x6, Models 0x1E and 0x1F.

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

13 years agoMFC r204459 (antonie):
delphij [Tue, 23 Nov 2010 01:39:30 +0000 (01:39 +0000)]
MFC r204459 (antonie):

Add files to remove when MK_PKGTOOLS=no.

MFC r215045 [1]:

Hide 460.chkportsum in MK_PKGTOOLS != no case.

Submitted by: Alex Kozlov <spam rm-rf kiev ua> [1]

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

13 years agoMFC of 213119
mckusick [Tue, 23 Nov 2010 01:24:27 +0000 (01:24 +0000)]
MFC of 213119

Reported problem:
Large (60GB) filesystems created using "newfs -U -O 1 -b 65536 -f 8192"
show incorrect results from "df" for free and used space when mounted
immediately after creation. fsck on the new filesystem (before ever
mounting it once) gives a "SUMMARY INFORMATION BAD" error in phase 5.

This error hasn't occurred in any runs of fsck immediately after
"newfs -U -b 65536 -f 8192" (leaving out the "-O 1" option).

Solution:
The default UFS1 superblock is located at offset 8K in the filesystem
partition; the default UFS2 superblock is located at offset 64K in
the filesystem partition. For UFS1 filesystems with a blocksize of
64K, the first alternate superblock resides at 64K which is the the
location used for the default UFS2 superblock. By default, the
system first checks for a valid superblock at the default location
for a UFS2 filoesystem. For a UFS1 filesystem with a blocksize of
64K, there is a valid UFS1 superblock at this location. Thus, even
though it is expected to be a backup superblock, the system will
use it as its default superblock. So, we have to ensure that all the
statistcs on usage are correct in this first alternate superblock
as it is the superblock that will actually be used.

While tracking down this problem, another limitation of UFS1 became
evident. For UFS1, the number of inodes per cylinder group is stored
in an int16_t. Thus the maximum number of inodes per cylinder group
is limited to 2^15 - 1. This limit can easily be exceeded for block
sizes of 32K and above. Thus when building UFS1 filesystems, newfs
must limit the number of inodes per cylinder group to 2^15 - 1.

Reported by: Guy Helmer<ghelmer@palisadesys.com>
Followup by: Bruce Cran <brucec@freebsd.org>
PR: 107692

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

13 years agoMFC r214754:
n_hibma [Mon, 22 Nov 2010 22:41:43 +0000 (22:41 +0000)]
MFC r214754:

Don't spam the console with 'Loading <alias module>' messages.

This cannot be hidden behind 'bootverbose' as this file is included from
userland.

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

13 years agoMFC -r212829: Bugfix: Reset the packet counters at the same time as the byte counts.
n_hibma [Mon, 22 Nov 2010 21:43:45 +0000 (21:43 +0000)]
MFC -r212829: Bugfix: Reset the packet counters at the same time as the byte counts.

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

13 years agoRemove a stale file. It seems this file was mis-merged from current.
jkim [Mon, 22 Nov 2010 21:12:20 +0000 (21:12 +0000)]
Remove a stale file.  It seems this file was mis-merged from current.

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

13 years agoMFH r215508:
mlaier [Mon, 22 Nov 2010 20:50:40 +0000 (20:50 +0000)]
MFH r215508:
  Off by one page in vm_reserv_reclaim_contig(): reclaim reservations with
  only a single free page as well.

  Reviewed by: alc

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

13 years agoMFC r209052, r210702, r211095, r211182, r212149: Fix a memory leak and
des [Mon, 22 Nov 2010 19:02:30 +0000 (19:02 +0000)]
MFC r209052, r210702, r211095, r211182, r212149: Fix a memory leak and
some potential deadlocks, increase the target limit from 4 to 64, and
numerous other scalability and stability improvements, including.

Submitted by: Daniel Braniss <danny@cs.huji.ac.il>
Sponsored by: Dansk Scanning A/S, Data Robotics Inc.

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

13 years agoMFC r212054:
nwhitehorn [Mon, 22 Nov 2010 17:39:18 +0000 (17:39 +0000)]
MFC r212054:
Restructure how reset and poweroff are handled on PowerPC systems, since
the existing code was very platform specific, and broken for SMP systems
trying to reboot from KDB.

- Add a new PLATFORM_RESET() method to the platform KOBJ interface, and
  migrate existing reset functions into platform modules.
- Modify the OF_reboot() routine to submit the request by hand to avoid
  the IPIs involved in the regular openfirmware() routine. This fixes
  reboot from KDB on SMP machines.
- Move non-KDB reset and poweroff functions on the Powermac platform
  into the relevant power control drivers (cuda, pmu, smu), instead of
  using them through the Open Firmware backdoor.
- Rename platform_chrp to platform_powermac since it has become
  increasingly Powermac specific. When we gain support for IBM systems,
  we will grow a new platform_chrp.

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

13 years agoMFC r208842:
nwhitehorn [Mon, 22 Nov 2010 17:15:41 +0000 (17:15 +0000)]
MFC r208842:
Add a driver for the CPU temperature sensors attached over I2C on the
PowerMac 11,2.

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

13 years agoMFC r208841:
nwhitehorn [Mon, 22 Nov 2010 17:14:29 +0000 (17:14 +0000)]
MFC r208841:
Add support for the I2C busses hanging off Apple system management chips.

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

13 years agoMFC r205506:
nwhitehorn [Mon, 22 Nov 2010 17:13:04 +0000 (17:13 +0000)]
MFC r205506:
Get nexus(4) out of the RTC business. The interface used by nexus(4)
in Open Firmware was Apple-specific, and we have complete coverage of Apple
system controllers, so move RTC responsibilities into the system controller
drivers. This avoids interesting problems from manipulating these devices
through Open Firmware behind the backs of their drivers.

Obtained from: NetBSD

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

13 years agoMFC r215100:
nwhitehorn [Mon, 22 Nov 2010 17:09:42 +0000 (17:09 +0000)]
MFC r215100:
Disabling CPU NAP modes during SMU commands is a hack needed only on U3
systems. Don't use it on non-U3 systems to allow cpu_idle() to work
correctly.

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

13 years agoMFC r204127,215101:
nwhitehorn [Mon, 22 Nov 2010 17:06:24 +0000 (17:06 +0000)]
MFC r204127,215101:
Provide support for the DEEPNAP power-saving mode found on the 970MP.

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

13 years agoMFC r214575:
nwhitehorn [Mon, 22 Nov 2010 17:03:09 +0000 (17:03 +0000)]
MFC r214575:
Allow access to the HT I/O port space on the IBM CPC9X5 northbridge chips.

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

13 years agoMFC r214610:
nwhitehorn [Mon, 22 Nov 2010 17:01:40 +0000 (17:01 +0000)]
MFC r214610:
Map userland copyin/copyout segment no-execute while it is mapped into the
kernel.

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

13 years agoMFC r213986:
nwhitehorn [Mon, 22 Nov 2010 16:58:07 +0000 (16:58 +0000)]
MFC r213986:
Fix an XXX comment by answering 'no'. OS X does not set the day-of-week
counter on SMU-based systems, which causes FreeBSD to reject the RTC time
when used in a dual-boot environment. Since we don't use the day-of-week
counter anyway, solve this by just not checking that it matches.

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

13 years agoWe're a bit under a week from Code Freeze for the upcoming 8.2-RELEASE
kensmith [Mon, 22 Nov 2010 16:09:57 +0000 (16:09 +0000)]
We're a bit under a week from Code Freeze for the upcoming 8.2-RELEASE
cycle.  Warn people tracking stable/8 that the branch may be more
active than usual.

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

13 years agoMFC r212247 & r212724 from head:
brian [Mon, 22 Nov 2010 09:32:54 +0000 (09:32 +0000)]
MFC r212247 & r212724 from head:
    Handle geli-encrypted root disk devices.
    Add support for identifying a journaled root filesystem.
    Fix support for identifying the given /dev/vinum/root example.

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

13 years agoMFC r215339:
netchild [Mon, 22 Nov 2010 08:35:06 +0000 (08:35 +0000)]
MFC r215339:
  Some style(9) fixes.

  Submitted by: arundel

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

13 years agoMFC r215338:
netchild [Mon, 22 Nov 2010 08:21:58 +0000 (08:21 +0000)]
MFC r215338:
  - print out the PID and program name of the program trying to use an
    unsupported futex operation
  - for those futex operations which are known to be not supported,
    print out which futex operation it is
  - shortcut the error return of the unsupported FUTEX_CLOCK_REALTIME in
    some cases:
      FUTEX_CLOCK_REALTIME can be used to tell linux to use
      CLOCK_REALTIME instead of CLOCK_MONOTONIC. FUTEX_CLOCK_REALTIME
      however must only be set, if either FUTEX_WAIT_BITSET or
      FUTEX_WAIT_REQUEUE_PI are set too. If that's not the case
      we can die with ENOSYS right at the beginning.

  Submitted by: arundel
  Reviewed by: rdivacky (earlier iteration of the patch)
  MFC after: 1 week

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

13 years agoMFC r215607:
kevlo [Mon, 22 Nov 2010 06:41:05 +0000 (06:41 +0000)]
MFC r215607:
Fix missing closedir()

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

13 years agoMFC r215519:
kevlo [Mon, 22 Nov 2010 06:38:52 +0000 (06:38 +0000)]
MFC r215519:
Fix fd leak

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

13 years agoMFC r215518:
kevlo [Mon, 22 Nov 2010 06:37:21 +0000 (06:37 +0000)]
MFC r215518:
Close file and directory descriptors

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

13 years agoMFC r215335:
kevlo [Mon, 22 Nov 2010 06:31:42 +0000 (06:31 +0000)]
MFC r215335:
Remove unused struct rue_type

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

13 years agoMFC r209669
alc [Mon, 22 Nov 2010 06:25:56 +0000 (06:25 +0000)]
MFC r209669
  Improve the comment and man page for vm_page_alloc().

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

13 years agoMFC 215334:
dougb [Mon, 22 Nov 2010 00:31:52 +0000 (00:31 +0000)]
MFC 215334:

Remove references to MAKEDEV(8)

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

13 years agoMFC 215250:
dougb [Mon, 22 Nov 2010 00:10:14 +0000 (00:10 +0000)]
MFC 215250:

Remove references to the long-gone ramdisk

Submitted by: Garrett Cooper <yanegomi@gmail.com>

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

13 years agoMFC r203567 (by antoine):
brucec [Sun, 21 Nov 2010 18:04:28 +0000 (18:04 +0000)]
MFC r203567 (by antoine):
Update files to remove when MK_KERBEROS=no.

MFC r203561 (by antoine):
Add files to remove when MK_GSSAPI=no.

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

13 years agoMFC r215306:
brucec [Sun, 21 Nov 2010 13:41:04 +0000 (13:41 +0000)]
MFC r215306:

libatm_p.a, libkeycap_p.a and libmytinfo_p.a are already in ObsoleteFiles.inc.
liblwres.so.10 has been replaced by liblwres.so.50.
usr/share/man/man8/nsupdate.8.gz was moved to usr/share/man/man1/nsupdate.1.gz
in bind 9.4.3.

Reported by: arundel

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

13 years agoMFC r212262:
kib [Sun, 21 Nov 2010 13:25:10 +0000 (13:25 +0000)]
MFC r212262:
Add aesni(4) manpage.

MFC r212268:
Grammar fixes.

MFC r212388 (by brueffer):
Some more grammar, wording and mdoc fixes.

MFC r212389 (by brueffer):
Xref aesni(4).

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

13 years agoBring aesni(4) driver from HEAD.
kib [Sun, 21 Nov 2010 13:20:14 +0000 (13:20 +0000)]
Bring aesni(4) driver from HEAD.

MFC r210409:
Crypto(4) driver for AESNI.

MFC r213064 (by pjd):
Simplify code a bit.

MFC r213066 (by pjd):
Add support for CRD_F_KEY_EXPLICIT flag.

MFC r213069 (by pjd):
Add support for CRYPTO_AES_XTS.

MFC r213166 (by pjd):
Fix two copy&paste bugs.

MFC r213797 (by dim):
Change two missed instances of 'retq' in aeskeys_i386.S to 'retl'.

MFC r215427:
Only save FPU context when not executing in the context of the crypto
thread.

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

13 years agoMFC r215286:
brucec [Sun, 21 Nov 2010 13:04:53 +0000 (13:04 +0000)]
MFC r215286:

Connect to ftp2.tr.freebsd.org when the Turkey #2 mirror is selected.

PR: bin/128587
Submitted by:  Mehmet Kose <mehmet.kose at gmail.com>

MFC r215287:

"Web" should not be all upper-case because it's not an acronym.

PR: bin/130366
Submitted by: Royce Williams <royce at alaska.net>

MFC r215290:

ntpdate(8) hosts are now configured in rc.conf via ntpdate_hosts.

PR: bin/148350
Submitted by: Joel FAEDI <joel.faedi at gmail.com>

MFC r215291:

Remove support for cpioVerbose=medium because bsdcpio doesn't support the
"-V" flag.

PR: bin/151821
Submitted by: Devin Teske <dteske at vicor.com>

MFC r215296:

Fix use of CD_VERSION=any in cdrom.inf by calling strcmp instead of
variable_cmp.

PR: bin/142960
Submitted by: G. Paul Ziemba <p-fbsd-bugs at ziemba.us>

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

13 years agoMFC r215284, r215285:
brucec [Sun, 21 Nov 2010 12:52:33 +0000 (12:52 +0000)]
MFC r215284, r215285:

When rebooting the machine jump to 0xf000:0xfff0 instead of 0xffff:0x0.
This is the same change that was made in rev 1.33 of boot/i386/btx/btx.S.

PR: i386/91871
Submitted by: Bjorn Konig <bkoenig at cs.tu-berlin.de>

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

13 years agoMFC r215281, r215282, r215283, r215304:
brucec [Sun, 21 Nov 2010 12:47:54 +0000 (12:47 +0000)]
MFC r215281, r215282, r215283, r215304:

Add some descriptions to sys/kern sysctls.
Fix style(9) issues.

PR: kern/148710
PR: kern/148510

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

13 years agoMFC r214125:
delphij [Sun, 21 Nov 2010 12:40:16 +0000 (12:40 +0000)]
MFC r214125:

In syscall_module_handler(): all switch branches return, remove
unreached code as pointed out in a Chinese forum [1].

[1] http://www.freebsdchina.org/forum/viewtopic.php?t=50619

Pointed out by: btw616 <btw s qq com>

MFC r214181:

Call chainevh callback when we are invoked with neither MOD_LOAD nor
MOD_UNLOAD.  This makes it possible to add custom hooks for other module
events.

Return EOPNOTSUPP when there is no callback available.

Pointed out by: jhb
Reviewed by: jhb

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

13 years agoRevert r215618, ABI breakage ahead.
bschmidt [Sun, 21 Nov 2010 12:32:35 +0000 (12:32 +0000)]
Revert r215618, ABI breakage ahead.

Pointy hat to: me

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

13 years agoMFC r210372:
simon [Sun, 21 Nov 2010 11:10:09 +0000 (11:10 +0000)]
MFC r210372:

Add support for creating the archived log filenames using a time-stamp
instead of the traditional simple counter.

Using the time-stamp based file-names, once a log file is archived, it
will not change name until it is deleted.  This means that many backup
systems will only perform one backup of the archived log file, instead
for performing a new backup of the logfile upon each logfile rotation.

This implementation is separate from the patches in the mentioned PR,
as I wasn't aware of the existence of the PR until after I had
implemented the same functionality as the patches in the PR provide.
Unlike the PR, this new code does honor the 'log count' in
newsyslog.conf so old logfiles are deleted.  This new code does not
currently support never deleting the archived logfiles.

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

13 years agoMFC r215249:
tuexen [Sun, 21 Nov 2010 11:08:22 +0000 (11:08 +0000)]
MFC r215249:
Add for existing protocol entries the missing SCTP port allocations
and add protocol entries for protocols which have SCTP port allocations.
These entries are according to
http://www.iana.org/assignments/port-numbers
as of today. Also add SCTP port allocation entires for the
echo, daytime, and chargen service.
Discussed with rwatson@

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

13 years agoMFC r208649 by gordon (needed for MFC of r210372):
simon [Sun, 21 Nov 2010 11:04:19 +0000 (11:04 +0000)]
MFC r208649 by gordon (needed for MFC of r210372):

Add file include processing for newsyslog.

Format for the include line in /etc/newsyslog.conf is:
<include> /etc/defaults/newsyslog.conf

Other notes of interest:
Globbing is supported in <include> statements.
Properly detect circular include loop dependencies.

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

13 years agoMFC r203422,r203556:
bschmidt [Sun, 21 Nov 2010 11:03:22 +0000 (11:03 +0000)]
MFC r203422,r203556:
When taking the AMPDU reorder fastpath, need_tap wasn't being
initialized. Initialize on declaration to avoid this.

Found with: clang static analyzer
Committed by: rpaulo

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

13 years agoMFC r208648 by gordon (needed for MFC of r210372):
simon [Sun, 21 Nov 2010 11:01:56 +0000 (11:01 +0000)]
MFC r208648 by gordon (needed for MFC of r210372):

Convert newsyslog to using queue(3) macros instead of a home rolled version.

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

13 years agoMFC r199076:
bschmidt [Sun, 21 Nov 2010 10:58:18 +0000 (10:58 +0000)]
MFC r199076:
The isr_intval in ieee80211req_scan_result structure should be 16 bit.
This makes ifconfig list scan display the correct beacon interval
(previously it would int overflow). As a side effect, this makes the
ieee80211req_scan_result word aligned.

Submitted by: Paul B Mahol <onemda at gmail.com>
Committed by: rpaulo

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

13 years agoMFC r200242:
bschmidt [Sun, 21 Nov 2010 10:55:43 +0000 (10:55 +0000)]
MFC r200242:
Fix typo in comment

Submitted by: Paul B Mahol <onemda at gmail.com>
Committed by: rpaulo

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

13 years agoMFC r207322:
bschmidt [Sun, 21 Nov 2010 10:52:18 +0000 (10:52 +0000)]
MFC r207322:
Fix typo. No functional change.

Obtained from: DragonFlyBSD
Committed by: rpaulo

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

13 years agoCompare the address of the array, not the array.
bschmidt [Sun, 21 Nov 2010 10:49:40 +0000 (10:49 +0000)]
Compare the address of the array, not the array.

Committed by: rpaulo
Found with: Coverity Prevent(tm)
CID: 3690

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

13 years agoMFC r208028 by uqs:
simon [Sun, 21 Nov 2010 10:45:10 +0000 (10:45 +0000)]
MFC r208028 by uqs:

mdoc: move remaining sections into consistent order

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

13 years agoMFC r215309:
kib [Sun, 21 Nov 2010 10:00:43 +0000 (10:00 +0000)]
MFC r215309:
Use symbolic names instead of hardcoding values for magic p_osrel constants.

MFC r215321:
Do not use __FreeBSD_version prefix for the special osrel version.

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

13 years agoMFC r215307:
kib [Sun, 21 Nov 2010 09:50:11 +0000 (09:50 +0000)]
MFC r215307:
Implement a (soft) stack guard page for auto-growing stack mappings.

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

13 years agoMFC: r215325
marius [Sun, 21 Nov 2010 00:53:19 +0000 (00:53 +0000)]
MFC: r215325

Use the correct variable for determining the verbosity level in mpt_lprtc().
While at it, fix the whitespace of that macro.

PR: 149502
Submitted by: Andrew Boyer

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