* When boot loader support is compiled w/ UFS and HAMMER together, which
is the default (note: HAMMER booting's never worked well)... the probe
order was to check for the hammer volume header first and UFS second.

* Change the probe order to check for UFS first and HAMMER second. The
reason is that a 'newfs' (for UFS) doesn't wipe the hammer volume header
because the ufs's newfs tries to 'skip' the partition reserved area of
the disk.

This is a huge throwback to the original BSD fdisk/disklabel which put
the boot code INSIDE the 'a' partition.

* The DragonFly disklabel64 (which is now the default) does not have this
problem so we could probably at some point adjust the UFS 'newfs' code to
wipe the old 'reserve' area to really put a cap on the problem.

Before the ipfilter removal, netif required ipfilter, which required
ipmon, which required cleanvar. In other words, cleanvar was run before
netif.

With the ipfilter requirement removed from netif, cleanvar was now
ordered at some place after netif, which caused the PID file and
control socket of wpa_supplicant(8) (which is started by netif if an
ifconfig_xxx="WPA" line is found in /etc/rc.conf) to be removed from
/var/run by cleanvar after they were created.

On AMD64, GCC and the ABI expects the x87 unit to be running in 80/64
mode rather than 64/53 mode seen on i386. This corrects errors seen
in long double tests involving runtime calculations. Previously, the
results of these runtime calculations would get rounded due to use
of 53-bit mantissas.

* Fix a serious MP race in the sysv semaphore code due to a lack of
protection of the semu* global structures.

* The race occurs during semaphore allocation and deallocation vs ANY
exiting process (even if it does not use semaphores), potentially
leading to a live-lock in the semu_list scan code.

The live-lock will prevent the cpu it occurs on from being able to
switch to another kernel or user thread. In the sample case it
stopped pagedaemon from running, creating a backlog in the I/O
subsystem which locked the computer up.

"When looking for some extra data to include in the hash, use the
address of the dirhash, rather than the first sizeof(struct dirhash *)
bytes of the structure (which, thankfully, seem to be constant)."

Note that cluster_awrite() always bawrite()'s or equivalent. The
DragonFly API split the functions out, so cluster_write() can now
almost always bdwrite() for the non-clustered case.

* Solves some serious performance and real-time disk space usage issues
when HAMMER1 was updated to use the cluster calls. The disk space
would be recovered by the daily cleanup but the extra writes could
end up being quite excessive, 25:1 unnecessary writes vs necessary
writes.

* The RB compare code for hammer_io was extracting the volume number
from the wrong place, creating a situation where duplicate hammer_io's
would sometimes be inserted in the RB tree (causing an assertion + panic).

vm_page_unwire could end up putting pages w/ NULL object fields onto the
active or inactive page queues. Allow the active/inactive scans to deal with
these pages rather than panic-ing. This pages can be disposed of normally.

ffs_sync_scan1 is a fast callback from vmntvnodescan; it is not called
with vnodes locked. It is possible for an ffs_reclaim to have reclaimed
the vnode in question, NULL-ing out ip, without having removed the vnode
from the per-mount list. If we see a NULL inode, return failure from the
fast callback.

softdep_disk_io_initiation was using the mplock rather than the softdep
lock to protect the softdep work queue and items on it. Take the softdep
lock and allow it to be taken recursively, so that io_start bioops can
call into other parts of softdep. Prevents softdep completion callback
from racing softdep_disk_io_initiation, remaining panics of 2291.

Eventually the MPLOCK in the bio_ops callback can go away, but that will
require more testing.

ffs softupdates was using a combination of critical sections and the mplock
to construct its acquire_lock/free_lock/interlocked_sleep primitives.

The softupdates I/O completion callback had a few points where it could block,
causing it to lose the mplock and any critical sections it held. When it did
so, front-end softupdates code would try to grab the lock but panic on seeing
the I/O completion callback in progress. This was not a problem in older
systems, as splx() would prevent the I/O callback from starting while
softdep code was executing.

This patch converts to using hard locks (lockmgr), which are held even while
a thread is blocked.

getdirtybuf(), locking a dirty buffer via BUF_LOCK, was changed to not
deadlock against the I/O completion path; specifically it drops the softdep
lock when its non-blocking attempt to lock a dirty buffer fails. One caller
of getdirtybuf() also required changes to retry locking buffers.

* africa: Morocco 2012 DST from last Sunday in April through last
Sunday in September.

* asia: Change start of DST in Syria to last Friday in March in
2012 and (as a guess) forward. Starts and (guessed) ends of
DST in West Bank and Gaza for 2012. Also add a missing HTML
directive at the top of the file.

* northamerica: Start and end of DST in Haiti in 2012 according
to US rules.

* Add cluster_awrite(), which replaces vfs_bio_awrite() and has the same
basic semantics as bawrite().

* Remove vfs_bio_awrite(), which had an odd API that required the buffer
to be locked but not removed from its queues.

* Make cluster operations work on disk device buffers as well as on
regular files.

* Add a blkflags argument to getcacheblk(), allowing GETBLK_NOWAIT to
be passed to it.

* Enhance cluster_wbuild() to support cluster_awrite() by having it take
an optional bp to incorporate into the cluster. The caller disposes of
the bp by calling bawrite() if the cluster_wbuild() code could not use it.

* Certain adjustments to cluster_write() and related code in checking against
the file EOF to not break when variable block sizes are used.

* Fix a bug in calls made to buf_checkwrite(). The caller is required to
initiate the I/O if the function returns good (0). HAMMER1 uses this
save side effects and blows up if the I/O is then not initiated.

* VOP_FSYNC() can be called during a vnode inactivation or reclaim.
In this case the vnode lock absolutely cannot be released or it
can create a window of opportunity for another thread that results
in a panic.

* Fixes a NFS server crash when multiple clients are trying to
delete/create/write the same file at the same time.

* Remove the unlock/lock sequences around the xpt_done() calls. These
temporary unlocks create a gap which can allow another interrupt to
squeeze in and interfere with the interrupt thread that is already
running, resulting in corruption.

This bug occurs under very heavy loads, and typically required multiple
concurrent ops to a SSD to trigger.

* Add additional assertions to catch issues and reorder one of the
chiploads.

* This is a bit non-optimal, be on the lookout for deadlocks in case it
turns out that holding the lock is a bad idea.

* This fixes spurious timeouts which occur on SMP boxes with faster devices
(such as SSDs or more recent hard drives)

* The global interrupt status register appears to be latched on some parts
rather than wire-or. Clearing it after signaling the port threads or
processing the interrupt can cause interrupts to be lost.

* In cases where it is actually wire-or we may get a double-interrupt,
but stability is more important here.

* Fix the port signaling code. The mask was being cleared with the
port interlock released. It has to be cleared when the interlock is
held.

* Reorder the per-port interrupt status register clearing code in two
places to execute before processing the operation rather than after,
which may fix another source of lost interrupts.

mpt(4): Fix an issue that caused the driver to attach to mfi(4) cards.

FreeBSD's commit message (r232411) explains it:

Fix a problem that was causing the mpt(4) driver to attach to MegaRAID
cards that should be handled by the mfi(4) driver.

The root of the problem is that the mpt(4) driver was masking off the
bottom bit of the PCI device ID when deciding which cards to attach to.

It appears that a number of the mpt(4) Fibre Channel cards had a LAN
variant whose PCI device ID was just one bit off from the FC card's device
ID. The FC cards were even and the LAN cards were odd.

The problem was that this pattern wasn't carried over on the SAS and
parallel SCSI mpt(4) cards. Luckily the SAS and parallel SCSI PCI device
IDs were either even numbers, or they would get masked to a supported
adjacent PCI device ID, and everything worked well.

Now LSI is using some of the odd-numbered PCI device IDs between the 3Gb
SAS device IDs for their new MegaRAID cards. This is causing the mpt(4)
driver to attach to the RAID cards instead of the mfi(4) driver.

The solution is to stop masking off the bottom bit of the device ID, and
explicitly list the PCI device IDs of all supported cards.

This change should be a no-op for mpt(4) hardware. The only intended
functional change is that for the 929X, the is_fc variable gets set. It
wasn't being set previously, but needs to be because the 929X is a Fibre
Channel card.

This follows up on a previous (pthread specific) commit by alexh
(e7322b09faff75b1298e9bfe444633425d173536) that used a per-proto
macro. Revert this commit, too. In principle, we do it like NetBSD
now.

See http://gcc.gnu.org/wiki/Visibility in the GCC wiki for details
on the issue.

This solution was suggested by Martin Husemann in a thread about
xulrunner building issues:

* northamerica: Summer time in Cuba has been delayed 3 weeks (now
starts April 1 rather than March 11). Since Mar 11 (the old
start date, as listed in 2012a) is just a little over a week
away, this change is urgent.

Also bump zone.tab's version for a fix that was not in 2012a but
which I already added.