kernel/hda: Add headphone switch support for the Acer Aspire One Happy 2.

Submitted-by:  shamaz
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2596>
make.1: We use bmake.1, not make.1.
kernel - Rewrite vnode ref-counting code to improve performance

* Rewrite the vnode ref-counting code and modify operation to not
  immediately VOP_INACTIVE a vnode when its refs drops to 0.  By
  doing so we avoid cycling vnodes through exclusive locks when
  temporarily accessing them (such as in a path lookup).  Shared
  locks can be used throughout.

* Track active/inactive vnodes a bit differently, keep track of
  the number of vnodes that are still active but have zero refs,
  and rewrite the vnode freeing code to use the new statistics
  to deactivate cached vnodes.
kernel - Fix a SMP race between pageout and exec_new_vmspace()

* Panics on token mismatch due to p->p_vmspace being replaced out
  from under a process utilizing p->p_vmspace->vm_map.map_token.

* Fix a SMP race between pageout and exec_new_vmspace().  The pageout
  code properly PHOLD()s the process and related process token but
  fails to hold p->p_vmspace during a potentially blocking call.

  Thus it is still possible to race termination of the vmspace and/or
  for the process to replace its vmspace while the pageout activity is
  in progress.

* Use vmspace_hold()/vmspace_drop() and reference the vmspace directly
  after load it from p->p_vmspace.  The race is allowed, but the vmspace
  will no longer be destroyed out from under the pageout and the code
  will no longer attempt to release the wrong token.
kernel - Rewrite lockmgr / struct lock

* Rewrite lockmgr() to remove the exclusive spinlock used internally
  to guard operations.

* Retain existing API and operational semantics.  This is primarily:

  - Acquiring a LK_SHARED lock on a lock the caller already owns
    exclusively simply bumps the count and retains the exclusive
    nature of the lock.

  - Exclusive requests and upgrade requests have priority over shared
    locks even if the lock is currently held shared, unless the thread
    is flagged for deadlock treatment.

  - Upgrade requests are capable of guaranteeing the upgrade (as before).
    This could be further enhanced because we now have the last release
    transfer the exclusive lock to the upgrade requestor, but the original
    API didn't have a function for this so neither do we.  The more
    primitive detection method is used (aka LK_SLEEPFAIL and/or
    LK_EXCLUPGRADE).

* Reduce multiple tracking fields into one field so we can use
  atomic_cmpset_int().

* Hot-path common operations.  A single atomic_cmpset_int() gets us
  through.
kernel: Fix sys/mqueue.h includes
buildworld - Adjust for recent commits

* Adjust for recent commits (VFREE no longer exists)
Fix typos in messages and manual pages.
test - Adjust vnodeinfo for recent kernel changes

* Adjust vnodeinfo for recent kernel changes
kernel - Fix hammer flush-during-reclaim bug

* hammer was improperly using vn_unlock/vn_lock to temporarily unlock a
  vnode.  If this is done during a reclaim vn_lock() will fail, resulting
  in a locking mismatch.

* Use vx_unlock/vx_lock instead, and also check for the reclaim by checking
  the VRECLAIMED flag rather than the VINACTIVE flag.  VINACTIVE might not
  yet be set.
kernel - Cleanup vfs_lock & ref-count states states

* Clean up vp->v_state state transitions

* Fix bugs in the cachedvnodes counter tracking.  v_refcnt has to
  be masked against VREF_MASK to detect non-zero->0 and 0->non-zero
  transitions properly.

* Clear VREF_FINALIZE when reactivating a vnode in vget().

* vhold()/vdrop() no longer prevent a vnode from being moved to the
  vinactive list.  They simply prevent reclamation.

* Adjust the vnlru trigger points a bit.

* When cleaning, leave the vnode on the inactive list until we determine
  we can destroy it.  Add a ref instead of using the VREF_TERMINATE
  placeholding ref (since the vnode is still on the list).

* Implement vnode->v_act and remove the inactive mid-point stuff.  The
  now is that vnodes are selectively moved from the active list to
  the inactive list as needed.  Inactive vnodes are then cleaned up in order.

* Adjust hysteresis so that vnlru has a better chance of handling the
  vnode garbage collection before we forced it to be done synchronously
  in userexit.
mxge: Make sure RX data size is cache line size aligned

Currently even without the __cachealign, RX data struct size is properly
aligned on 2 cache line size.  Add __cachealign, so that even if some
debugging fields are added, RX data struct size still will be cache line
size aligned.
test: Test commit from orb
mxge: Record RX slot count instead of its size

Original code assumes that the total size of RX slots is same as one RX
descriptor ring size.  This assumption could easily be broken if we ask
chip to deliver RSS hash (RX slot size will be changed from 4 bytes to 8
bytes).  RX slot count is recorded now.
kernel - Cleanup vfs_lock & ref-count states states (2)

* Adjust trigger points such that under normal operation vnlru_proc()
  handles cleaning up extra vnodes.  If this is not sufficient then
  the synchronous cleanup code will kick in at higher levels.

* Adjust vnode->v_act handling and try to take into account vnodes
  with large memory objects (which we would rather reclaim later and
  not sooner).  This takes over functionality from vlru_reclaim().

* Remove the vlrureclaim() mount-scanning infrastructure.  vnlru_proc()
  now just calls freesomevnodes().  This should now be sufficient.  This
  removes significant locking overheads during steady-state operation.
Sort SEE ALSO in some manual pages.
kernel - Remove debugging kprintf() from procfs

* Remove a procfs console warning that is not longer applicable.  The
  procfs filesystem topology is never quite in sync with reality and
  races between lookups and existing processes are to be expected.
kernel - general cleanup and mplock removal

* General cleanup and remove use of the mplock in multiple non-critical
  functions.

* Might slightly improve performance if programs run uname(),
  gethostname(), or getdomainname() a lot.
hammer - kqueue filterops are MPSAFE

* Hammer's kqueue filterops are MPSAFE, set appropriate flag.
tmpfs - remove most mp->mnt_token cases, kqueue filterops are MPSAFE

* tmpfs's kqueue filterops are MPSAFE, set appropriate flag.

* tmpfs's vnops frontend universally obtained the tmpfs mnt_token, but
  most of tmpfs's underlying code was already sub-locked by node.

  Remove most mnt_token use cases and make the portions that were not
  safe, safe.  This was primarily the directory lookup and scanning
  code and code to create, delete, and rename files.

* Should greatly improve tmpfs concurrency.