kernel: Import atomic_testandset_int() from FreeBSD
kernel/i386: Implement ffsl()

It was only a builtin function on x86_64.

Obtained-from: FreeBSD
drm: Sync with FreeBSD

* As of commit r255045 (2013-08-30):
  'u_long' is consistently spelled 'unsigned long' in this file.  Fix it.

* Some of the changes are bug fixes, including a few memory leaks

* Others are necessary groundwork for the Radeon KMS driver

* Some new files were imported from Linux 3.8-rc3

* Support for E-DDC has been added

* Many atomic routines were revisited to make them more compatible with
  the Linux APIs and run-time behavior