freebsd-skq/sys/dev/acpica
jhb b0b93a3c55 Optimize sx locks to use simple atomic operations for the common cases of
obtaining and releasing shared and exclusive locks.  The algorithms for
manipulating the lock cookie are very similar to that rwlocks.  This patch
also adds support for exclusive locks using the same algorithm as mutexes.

A new sx_init_flags() function has been added so that optional flags can be
specified to alter a given locks behavior.  The flags include SX_DUPOK,
SX_NOWITNESS, SX_NOPROFILE, and SX_QUITE which are all identical in nature
to the similar flags for mutexes.

Adaptive spinning on select locks may be enabled by enabling the
ADAPTIVE_SX kernel option.  Only locks initialized with the SX_ADAPTIVESPIN
flag via sx_init_flags() will adaptively spin.

The common cases for sx_slock(), sx_sunlock(), sx_xlock(), and sx_xunlock()
are now performed inline in non-debug kernels.  As a result, <sys/sx.h> now
requires <sys/lock.h> to be included prior to <sys/sx.h>.

The new kernel option SX_NOINLINE can be used to disable the aforementioned
inlining in non-debug kernels.

The size of struct sx has changed, so the kernel ABI is probably greatly
disturbed.

MFC after:	1 month
Submitted by:	attilio
Tested by:	kris, pjd
2007-03-31 23:23:42 +00:00
..
Osd - Use '*h' instead of 'struct acpi_spinlock' for sizeof[1]. 2007-03-26 23:04:02 +00:00
acpi_acad.c Catch up with ACPI-CA 20070320 import. 2007-03-22 18:16:43 +00:00
acpi_battery.c ACPIIO_BATT_GET_UNITS would always return ENXIO. However, it should never 2006-12-22 00:57:26 +00:00
acpi_button.c Catch up with ACPI-CA 20070320 import. 2007-03-22 18:16:43 +00:00
acpi_cmbat.c Catch up with ACPI-CA 20070320 import. 2007-03-22 18:16:43 +00:00
acpi_cpu.c Catch up with ACPI-CA 20070320 import. 2007-03-22 18:16:43 +00:00
acpi_dock.c Catch up with ACPI-CA 20070320 import. 2007-03-22 18:16:43 +00:00
acpi_ec.c Optimize sx locks to use simple atomic operations for the common cases of 2007-03-31 23:23:42 +00:00
acpi_hpet.c Re-enable the HPET timer after a resume. 2007-03-28 22:28:48 +00:00
acpi_if.m
acpi_isab.c
acpi_lid.c Catch up with ACPI-CA 20070320 import. 2007-03-22 18:16:43 +00:00
acpi_package.c Re-work Cx handling to be per-cpu and asymmetrical, fixing support on 2007-01-07 21:53:42 +00:00
acpi_pci_link.c Catch up with ACPI-CA 20070320 import. 2007-03-22 18:16:43 +00:00
acpi_pci.c Fixup some comments to allow for the fact that PCI domains are not specific 2006-05-11 22:13:21 +00:00
acpi_pcib_acpi.c Expand the MSI/MSI-X API to address some deficiencies in the MSI-X support. 2007-01-22 21:48:44 +00:00
acpi_pcib_pci.c Expand the MSI/MSI-X API to address some deficiencies in the MSI-X support. 2007-01-22 21:48:44 +00:00
acpi_pcib.c
acpi_pcibvar.h
acpi_perf.c Catch up with ACPI-CA 20070320 import. 2007-03-22 18:16:43 +00:00
acpi_powerres.c Remove unnecessary assignment. 2006-04-21 19:06:29 +00:00
acpi_quirk.c Catch up with ACPI-CA 20070320 import. 2007-03-22 18:16:43 +00:00
acpi_quirks
acpi_resource.c Catch up with ACPI-CA 20070320 import. 2007-03-22 18:16:43 +00:00
acpi_smbat.c
acpi_smbus.h
acpi_thermal.c Check the _TMP value for sanity also. On some systems (HP NX laptops), the 2007-03-05 21:39:53 +00:00
acpi_throttle.c Catch up with ACPI-CA 20070320 import. 2007-03-22 18:16:43 +00:00
acpi_timer.c Catch up with ACPI-CA 20070320 import. 2007-03-22 18:16:43 +00:00
acpi_video.c Improve the way we'll detect video devices as per ACPI 3.0. 2006-08-10 13:18:02 +00:00
acpi.c Catch up with ACPI-CA 20070320 import. 2007-03-22 18:16:43 +00:00
acpiio.h
acpivar.h Catch up with ACPI-CA 20070320 import. 2007-03-22 18:16:43 +00:00