diff options
author | Bob Moore <robert.moore@intel.com> | 2006-06-23 17:04:00 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-06-28 03:11:38 -0400 |
commit | 967440e3be1af06ad4dc7bb18d2e3c16130fe067 (patch) | |
tree | c9bbf70475333f4f169838ed88233f8410010677 /drivers/acpi/executer/excreate.c | |
parent | 95b38b3f453c16de0f8cddcde3e71050bbfb37b9 (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/executer/excreate.c')
-rw-r--r-- | drivers/acpi/executer/excreate.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/drivers/acpi/executer/excreate.c b/drivers/acpi/executer/excreate.c index 106dc7219df7..34eec82c1b1e 100644 --- a/drivers/acpi/executer/excreate.c +++ b/drivers/acpi/executer/excreate.c | |||
@@ -177,7 +177,7 @@ acpi_status acpi_ex_create_event(struct acpi_walk_state *walk_state) | |||
177 | * that the event is created in an unsignalled state | 177 | * that the event is created in an unsignalled state |
178 | */ | 178 | */ |
179 | status = acpi_os_create_semaphore(ACPI_NO_UNIT_LIMIT, 0, | 179 | status = acpi_os_create_semaphore(ACPI_NO_UNIT_LIMIT, 0, |
180 | &obj_desc->event.semaphore); | 180 | &obj_desc->event.os_semaphore); |
181 | if (ACPI_FAILURE(status)) { | 181 | if (ACPI_FAILURE(status)) { |
182 | goto cleanup; | 182 | goto cleanup; |
183 | } | 183 | } |
@@ -226,12 +226,9 @@ acpi_status acpi_ex_create_mutex(struct acpi_walk_state *walk_state) | |||
226 | goto cleanup; | 226 | goto cleanup; |
227 | } | 227 | } |
228 | 228 | ||
229 | /* | 229 | /* Create the actual OS Mutex */ |
230 | * Create the actual OS semaphore. | 230 | |
231 | * One unit max to make it a mutex, with one initial unit to allow | 231 | status = acpi_os_create_mutex(&obj_desc->mutex.os_mutex); |
232 | * the mutex to be acquired. | ||
233 | */ | ||
234 | status = acpi_os_create_semaphore(1, 1, &obj_desc->mutex.semaphore); | ||
235 | if (ACPI_FAILURE(status)) { | 232 | if (ACPI_FAILURE(status)) { |
236 | goto cleanup; | 233 | goto cleanup; |
237 | } | 234 | } |
@@ -565,7 +562,7 @@ acpi_ex_create_method(u8 * aml_start, | |||
565 | obj_desc->method.aml_length = aml_length; | 562 | obj_desc->method.aml_length = aml_length; |
566 | 563 | ||
567 | /* | 564 | /* |
568 | * Disassemble the method flags. Split off the Arg Count | 565 | * Disassemble the method flags. Split off the Arg Count |
569 | * for efficiency | 566 | * for efficiency |
570 | */ | 567 | */ |
571 | method_flags = (u8) operand[1]->integer.value; | 568 | method_flags = (u8) operand[1]->integer.value; |
@@ -576,21 +573,19 @@ acpi_ex_create_method(u8 * aml_start, | |||
576 | (u8) (method_flags & AML_METHOD_ARG_COUNT); | 573 | (u8) (method_flags & AML_METHOD_ARG_COUNT); |
577 | 574 | ||
578 | /* | 575 | /* |
579 | * Get the concurrency count. If required, a semaphore will be | 576 | * Get the sync_level. If method is serialized, a mutex will be |
580 | * created for this method when it is parsed. | 577 | * created for this method when it is parsed. |
581 | */ | 578 | */ |
582 | if (acpi_gbl_all_methods_serialized) { | 579 | if (acpi_gbl_all_methods_serialized) { |
583 | obj_desc->method.concurrency = 1; | 580 | obj_desc->method.sync_level = 0; |
584 | obj_desc->method.method_flags |= AML_METHOD_SERIALIZED; | 581 | obj_desc->method.method_flags |= AML_METHOD_SERIALIZED; |
585 | } else if (method_flags & AML_METHOD_SERIALIZED) { | 582 | } else if (method_flags & AML_METHOD_SERIALIZED) { |
586 | /* | 583 | /* |
587 | * ACPI 1.0: Concurrency = 1 | 584 | * ACPI 1.0: sync_level = 0 |
588 | * ACPI 2.0: Concurrency = (sync_level (in method declaration) + 1) | 585 | * ACPI 2.0: sync_level = sync_level in method declaration |
589 | */ | 586 | */ |
590 | obj_desc->method.concurrency = (u8) | 587 | obj_desc->method.sync_level = (u8) |
591 | (((method_flags & AML_METHOD_SYNCH_LEVEL) >> 4) + 1); | 588 | ((method_flags & AML_METHOD_SYNCH_LEVEL) >> 4); |
592 | } else { | ||
593 | obj_desc->method.concurrency = ACPI_INFINITE_CONCURRENCY; | ||
594 | } | 589 | } |
595 | 590 | ||
596 | /* Attach the new object to the method Node */ | 591 | /* Attach the new object to the method Node */ |