aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/osl.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2006-06-23 17:04:00 -0400
committerLen Brown <len.brown@intel.com>2006-06-28 03:11:38 -0400
commit967440e3be1af06ad4dc7bb18d2e3c16130fe067 (patch)
treec9bbf70475333f4f169838ed88233f8410010677 /drivers/acpi/osl.c
parent95b38b3f453c16de0f8cddcde3e71050bbfb37b9 (diff)
ACPI: ACPICA 20060623
Implemented a new acpi_spinlock type for the OSL lock interfaces. This allows the type to be customized to the host OS for improved efficiency (since a spinlock is usually a very small object.) Implemented support for "ignored" bits in the ACPI registers. According to the ACPI specification, these bits should be preserved when writing the registers via a read/modify/write cycle. There are 3 bits preserved in this manner: PM1_CONTROL[0] (SCI_EN), PM1_CONTROL[9], and PM1_STATUS[11]. http://bugzilla.kernel.org/show_bug.cgi?id=3691 Implemented the initial deployment of new OSL mutex interfaces. Since some host operating systems have separate mutex and semaphore objects, this feature was requested. The base code now uses mutexes (and the new mutex interfaces) wherever a binary semaphore was used previously. However, for the current release, the mutex interfaces are defined as macros to map them to the existing semaphore interfaces. Fixed several problems with the support for the control method SyncLevel parameter. The SyncLevel now works according to the ACPI specification and in concert with the Mutex SyncLevel parameter, since the current SyncLevel is a property of the executing thread. Mutual exclusion for control methods is now implemented with a mutex instead of a semaphore. Fixed three instances of the use of the C shift operator in the bitfield support code (exfldio.c) to avoid the use of a shift value larger than the target data width. The behavior of C compilers is undefined in this case and can cause unpredictable results, and therefore the case must be detected and avoided. (Fiodor Suietov) Added an info message whenever an SSDT or OEM table is loaded dynamically via the Load() or LoadTable() ASL operators. This should improve debugging capability since it will show exactly what tables have been loaded (beyond the tables present in the RSDT/XSDT.) Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/osl.c')
-rw-r--r--drivers/acpi/osl.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 8e46d1b39491..afd937b158b3 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -688,18 +688,9 @@ EXPORT_SYMBOL(acpi_os_wait_events_complete);
688/* 688/*
689 * Allocate the memory for a spinlock and initialize it. 689 * Allocate the memory for a spinlock and initialize it.
690 */ 690 */
691acpi_status acpi_os_create_lock(acpi_handle * out_handle) 691acpi_status acpi_os_create_lock(acpi_spinlock * handle)
692{ 692{
693 spinlock_t *lock_ptr; 693 spin_lock_init(*handle);
694
695
696 lock_ptr = acpi_os_allocate(sizeof(spinlock_t));
697
698 spin_lock_init(lock_ptr);
699
700 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Creating spinlock[%p].\n", lock_ptr));
701
702 *out_handle = lock_ptr;
703 694
704 return AE_OK; 695 return AE_OK;
705} 696}
@@ -707,13 +698,8 @@ acpi_status acpi_os_create_lock(acpi_handle * out_handle)
707/* 698/*
708 * Deallocate the memory for a spinlock. 699 * Deallocate the memory for a spinlock.
709 */ 700 */
710void acpi_os_delete_lock(acpi_handle handle) 701void acpi_os_delete_lock(acpi_spinlock handle)
711{ 702{
712
713 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Deleting spinlock[%p].\n", handle));
714
715 acpi_os_free(handle);
716
717 return; 703 return;
718} 704}
719 705
@@ -1037,10 +1023,10 @@ EXPORT_SYMBOL(max_cstate);
1037 * handle is a pointer to the spinlock_t. 1023 * handle is a pointer to the spinlock_t.
1038 */ 1024 */
1039 1025
1040acpi_cpu_flags acpi_os_acquire_lock(acpi_handle handle) 1026acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock lockp)
1041{ 1027{
1042 acpi_cpu_flags flags; 1028 acpi_cpu_flags flags;
1043 spin_lock_irqsave((spinlock_t *) handle, flags); 1029 spin_lock_irqsave(lockp, flags);
1044 return flags; 1030 return flags;
1045} 1031}
1046 1032
@@ -1048,9 +1034,9 @@ acpi_cpu_flags acpi_os_acquire_lock(acpi_handle handle)
1048 * Release a spinlock. See above. 1034 * Release a spinlock. See above.
1049 */ 1035 */
1050 1036
1051void acpi_os_release_lock(acpi_handle handle, acpi_cpu_flags flags) 1037void acpi_os_release_lock(acpi_spinlock lockp, acpi_cpu_flags flags)
1052{ 1038{
1053 spin_unlock_irqrestore((spinlock_t *) handle, flags); 1039 spin_unlock_irqrestore(lockp, flags);
1054} 1040}
1055 1041
1056#ifndef ACPI_USE_LOCAL_CACHE 1042#ifndef ACPI_USE_LOCAL_CACHE