drm: Fix a randr bug

* Sync drm_linux_list_sort.c with FreeBSD, fixing a qsort_r() bug

* Array elements were not properly sorted, resulting in infinite
  loops in KDE

* FreeBSD revision: 258549

Pointed-out-by: dumbbell
kernel/acpi: Use ACPI_FAILURE() and also remove unneeded variables.
udp: Prepare for re-redispatching for SO_REUSEPORT sockets
inpcb: Remove the code that does hash-threshold wildcard sockets selection

We always use modulo-N here.
netrate/pktgen: Unbreak building
kernel/acpi: Sync acpi_resource with FreeBSD.

* Use AcpiWalkResources() for parsing _CRS result.

* Add support for 64-bit address range resources.

* Add workaround for BIOSes that specify edge-sensitive but active low
  settings for ACPI-enumerated serial ports (such as the one found on
  an Intel D2500CCE mobo).

* Minor fixes/cleanup.
udp: Factor out function to reset inpcb route cache
kernel/drm: Add back #include "opt_drm.h" to drmP.h so that DRM_DEBUG works.
kernel/i915: Add missing opt_acpi.h to SRCS.
cddl: Makefiles used to build userland libraries and utilities

Import cddl/ directory as-is from FreeBSD.

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
sys/cddl/compat: OpenSolaris kernel API compatability layer

Taken 'sys/cddl/compat' directory as-is from FreeBSD.

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
sys/cddl/contrib: kernel code taken from OpenSolaris used by ZFS

Take 'sys/cddl/contrib' directory as-is from FreeBSD.

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
sys/cddl/Makefile: Bring in from FreeBSD sys/modules/zfs

Bring in from FreeBSD as-is.

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
sys/cddl/Makefile: Trim out some bits and fix path

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
sys/sys/elf.h: Solaris compatibility header

Wraps up the inclusion of some usual headers in a place where
OpenSolaris derived code can find.

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
hook up ZFS Makefiles into Dfly Makefile system

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
cddl/*/Makefile: Deal with src.opts.mk

In DragonflyBSD we don't have 'src.opts.mk' for MK_FOO like FreeBSD
has. Trim that out of the Makefiles with tests and dtrace bits.

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
cddl/*/Makefile: Change MK_FOO -> NO_FOO

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
sys/cddl/compat/opensolaris: Dfly supports DIOCGPART for ioctl

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
sys/sys/sdt.h: Missing header in ZFS port

Probably can prune this latter.

Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>