While developing the GPE reference counting code we overlooked the
fact that acpi_ev_update_gpes() could have enabled GPEs before
acpi_ev_initialize_gpe_block() was called. As a result, some GPEs
are enabled twice during the initialization.
To fix this issue avoid calling acpi_enable_gpe() from
acpi_ev_initialize_gpe_block() for the GPEs that have nonzero
runtime reference counters.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Patch : https://patchwork.kernel.org/patch/104911/
ACPICA uses acpi_hw_write_gpe_enable_reg() to re-enable a GPE after
an event signaled by it has been handled. However, this function
writes the entire GPE enable mask to the GPE's enable register which
may not be correct. Namely, if one of the other GPEs in the same
register was previously enabled by acpi_enable_gpe() and subsequently
disabled using acpi_set_gpe(), acpi_hw_write_gpe_enable_reg() will
re-enable it along with the target GPE.
To fix this issue rework acpi_hw_write_gpe_enable_reg() so that it
calls acpi_hw_low_set_gpe() with a special action value,
ACPI_GPE_CONDITIONAL_ENABLE, that will make it only enable the GPE if the
corresponding bit in its register's enable_for_run mask is set.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Patch : https://patchwork.kernel.org/patch/104909/
ACPICA uses acpi_ev_enable_gpe() for enabling GPEs at the low level,
which is incorrect, because this function only enables the GPE if the
corresponding bit in its enable register's enable_for_run mask is set.
This causes acpi_set_gpe() to work incorrectly if used for enabling
GPEs that were not previously enabled with acpi_enable_gpe(). As a
result, among other things, wakeup-only GPEs are never enabled by
acpi_enable_wakeup_device(), so the devices that use them are unable
to wake up the system.
To fix this issue remove acpi_ev_enable_gpe() and its counterpart
acpi_ev_disable_gpe() and replace acpi_hw_low_disable_gpe() with
acpi_hw_low_set_gpe() that will be used instead to manipulate GPE
enable bits at the low level. Make the users of acpi_ev_enable_gpe()
and acpi_ev_disable_gpe() call acpi_hw_low_set_gpe() instead and
make sure that GPE enable masks are only updated by acpi_enable_gpe()
and acpi_disable_gpe() when GPE reference counters change from 0
to 1 and from 1 to 0, respectively.
Rafael Wysocki. Corresponds to:
Patch : https://patchwork.kernel.org/patch/104912/
In quite a few places ACPICA needs to compute a GPE enable mask with
only one bit set, corresponding to a given GPE. Currently, that
computation is always open coded which leads to unnecessary code
duplication. Fix this by introducing a helper function for computing
one-bit GPE enable masks and using it where appropriate.
Rafael Wysocki. corresponds to:
Patch : https://patchwork.kernel.org/patch/104903/
Adds full support for comments within input source files.
Fixed a couple error messages one for unknown table signature,
another for unrecognized source file (not asl or data table source.)
Also, reduced verbosity of the standard templates, but added
option (-vt) to make the output look exactly like the disassembler.
These tables are a bit different from the rest of the tables.
DSDT/SSDT are AML tables, not data tables. FACS/RSDP do not use
the standard ACPI table header.
Use the temp filename instead of temp handle for existence check.
Also, clear both the filename and handle during re-init during
multiple file compiles.
Previously, the maximum data size passed to the EC operation region
handler was a single byte. Since there are often larger datums that
need to be transfered, and the EC would like to lock these as a single
transaction, this change enables transfers larger than a single byte.
This may require changes to the host-OS Embedded Controller driver
to enable 16/32/64 bit tranfers in addition to 8-bit transfers.
Alexey Starikovskiy, Lin Ming
Remove obsolete AOPOBJ_SINGLE_DATUM. Add AOPOBJ_INVALID for use if
the host OS rejects the address of an operation region (currently
only used by Linux.)
This change enhances the performance of namespace searches and walks
by adding a backpointer to the parent in each namespace node. On large
namespaces, this change can improve overall ACPI performance by up to 9X.
Adding a pointer to each namespace node increases the overall size of
the internal namespace by about 5%, since each namespace entry usually
consists of both a namespace node and an ACPI operand object.
Alexey Starikovskiy.
This feature is optional and is enabled if the BIOS requests any Windows
OSI strings. It can also be enabled by the host OS. Matthew Garrett,
Bob Moore.
On control method exit, only walk the namespace if the method is known
to have created namespace objects outside of its local scope.
Bob Moore, Alexey Starikovskiy.
-dt option will disable the tracking mechanism, which improves performance
considerably. Also restructured the options into -d (disable) and -e (enable) options.
These objects are defined by "Windows Instrumentation", and are not
part of the ACPI spec. Adds compiler support and runtime typechecking
support in the ACPICA core. ACPICA BZ 860.
Useful for ASLTS. Disable errors from resource descriptors.
ASLTS checks for correct byte-by-byte descriptor construction, thus
errors are unavoidable.