Commit graph

399933 commits

Author SHA1 Message Date
Bob Moore bf9b448ef8 ACPICA: Debug output: Do not emit function nesting level for kernel build.
The nesting level is really only useful during a single-thread
execution. Therefore, only enable this output for the AcpiExec
utility. Also, only emit the thread ID when executing under AcpiExec.
(Context switches are still detected and a message is emitted.)
ACPICA BZ 972.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-11-21 13:47:03 +01:00
Lv Zheng 45c9f78b25 ACPICA: Add __init for ACPICA initializers/finalizers.
This patch adds __init to the ACPICA documented initializers:
  acpi_initialize_tables()
  acpi_initialize_subsystem()
  acpi_load_tables()
  acpi_enable_subsystem()
  acpi_initialize_objects()
and to acpi_reallocate_root_table(), acpi_find_root_pointer() which
are also meant to be called only during initialization.

This patch adds __init to the ACPICA documented finalizer:
  acpi_terminate()
as this finalizer is only called in __init function now.

This change helps to reduce source code differences between
ACPICA upstream and Linux.

[rjw: Changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-31 14:37:36 +01:00
Lv Zheng 40bce100ca ACPICA: Cleanup asmlinkage for ACPICA APIs.
Add an asmlinkage wrapper around acpi_enter_sleep_state() to prevent
an empty stub from being called by assmebly code for ACPI_REDUCED_HARDWARE
set.

As arch/x86/kernel/acpi/wakeup_xx.S is only compiled when CONFIG_ACPI=y
and there are no users of ACPI_HARDWARE_REDUCED, currently this is in
fact not a real issue, but a cleanup to reduce source code differences
between Linux and ACPICA upstream.

[rjw: Changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-31 14:37:35 +01:00
Lv Zheng efb835429f ACPICA: Update acpidump related header file changes.
This patch updates header files used by acpidump to reduce the
source code differences between Linux and ACPICA upstream.

This patch does not affect the generation of the Linux kernel binary.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-31 14:37:35 +01:00
Lv Zheng a4fb614ad0 ACPICA: Update compilation environment settings.
This patch updates architecture specific environment settings to reduce
source differences between Linux and ACPICA upstream.

This patch does not affect the generation of the Linux kernel binary.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-31 14:37:35 +01:00
Lv Zheng dba47d3af9 ACPICA: Fix cached object deletion code.
Function acpi_ut_delete_caches() is meant to be used to implement
ACPI_ALLOCATE()/ACPI_FREE() mechanisms in ACPICA, so it should call
acpi_os_free() rather than ACPI_FREE().  Linux is not affected by this
issue as it uses kmem_cache instead of the ACPICA local cache, but
the change helps to reduce source code differences between Linux and
ACPICA upstream.

[rjw: Changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-31 14:37:34 +01:00
Lv Zheng 2faa046485 ACPICA: Remove dead AOPOBJ_INVALID check.
Reversion commit 7cb7f45c7f (Revert "ACPICA: Remove obsolete
acpi_os_validate_address interface") restored a piece of dead code
related to an obselete AOPOBJ_INVALID flag.  Remove that code again.

This helps to reduce source code differences between Linux and ACPICA
upstream.

[rjw: Changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-31 14:37:34 +01:00
Lv Zheng 6208a3dd37 ACPICA: Cleanup useless memset invocations.
This patch removes unnecessary memset() invocations where
kmem_cache_zalloc() is used for allocating memory.  It also helps to
reduce source code differences between ACPICA upstream and Linux.

[rjw: Changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-31 14:37:34 +01:00
Lv Zheng bd48d67767 ACPICA: Fix an ACPI_ALLOCATE_ZEROED() reversal.
ACPI_FREE() should always be used to free objects allocated with
ACPI_ALLOCATE_ZEROED(), so make acpi_ut_create_package_object() do
that.

This patch ports a fix from ACPICA upstream to Linux and helps to
reduce source code differences between them.

[rjw: Changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-31 14:37:33 +01:00
Lv Zheng 130797a6c3 ACPICA: Fix wrong object length returned by acpi_ut_get_simple_object_size().
The object length returned by acpi_ut_get_simple_object_size() should
be rounded up to the closest word boundary.

This patch ports a fix from ACPICA upstream to Linux.

[rjw: Changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-31 14:37:33 +01:00
Lv Zheng 9187a415fd ACPICA: Add new statistics interface.
This patch ports new counters and statistics interface, already
implemented in ACPICA upstream, to Linux.  That helps to reduce
source code differences between Linux and ACPICA upstream.

[rjw: Changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-31 14:37:33 +01:00
Lv Zheng fa5f508f94 ACPICA: Update DMAR table definitions.
This patch updates DMAR table header definitions as such enhancement
has been made in ACPICA upstream already.  It ports that change to
the Linux source to reduce source code differences between Linux and
ACPICA upstream.

Build test done on x86-64 machine with the following configs enabled:
  CONFIG_DMAR_TABLE
  CONFIG_IRQ_REMAP
  CONFIG_INTEL_IOMMU

This patch does not affect the generation of the Linux kernel binary.

[rjw: Changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-31 14:37:32 +01:00
Lv Zheng 09b8b1fce7 ACPICA: Update RSDP table definitions.
This patch updates RSDP table header definitions as such enhancement
has been made in ACPICA upstream already.  It ports that change to
the Linux source to reduce source code differences between Linux and
ACPICA upstream.

This patch does not affect the generation of the Linux kernel binary.

[rjw: Changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-31 14:37:32 +01:00
Lv Zheng 98f7eb878a ACPICA: Update namespace dump code.
This patch merges namespace dump code updates from ACPICA upstream to
reduce the source code differences between Linux and ACPICA upstream.  No
functional changes as currently nsdumpdv.c is not used by Linux.

This patch does not affect the generation of the Linux kernel binary.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-31 14:37:31 +01:00
Lv Zheng 99567bc550 ACPICA: Update check for setting the ANOBJ_IS_EXTERNAL flag.
The ANOBJ_IS_EXTERNAL flag is only used by an ACPICA utilities - iASL.

No functional change for the Linux kernel should results from applying
this patch, but it helps to reduce source code differences between
the kernel and ACPICA upstream.

[rjw: Subject and changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-31 14:37:31 +01:00
Lv Zheng bb42cc224a ACPICA: Update default space handlers.
This patch adds code that is already in ACPICA upstream, so applying
it can help to reduce the source code differences between Linux and
ACPICA upstream.

This code fragment is only useful for ACPICA utilities and no
functional changes to the Linux kernel should result from it.

[rjw: Changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-31 14:37:31 +01:00
Bob Moore affffae367 ACPICA: Update version to 20130927.
Version 20130927.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-31 14:37:30 +01:00
Lv Zheng 93220587f7 ACPICA: Update aclinux.h for new OSL override mechanism.
The new ACPICA OSL override mechanism is used to solve these issues
for the Linux OSL:
 1. Linux can implement OSL using a macro.
 2. Linux can implement OSL using an inlined function.
 3. Linux can leave OSL not implemented for __KERNEL__ undefined code
    fragments.
 4. Linux can add sparse declarators (__iomem) to OSL.
 5. Linux can add memory tuning declarators (__init/__exit) to OSL.
This patch also moves Linux specific OSL to aclinux.h which has not been
maintained in the ACPICA code base.  Lv Zheng.

Known issue:

 From ACPICA's perspective, actypes.h should be included after inclusion
 of acenv.h.  But currently in Linux, aclinux.h included by acenv.h has
 included actypes.h to find ACPICA types for inline functions.  This is a
 known and existing issue and currently there is no real problem caused
 by this issue for Linux kernel build.  Thus this issue is not covered by
 this cleanup commit.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-31 14:36:41 +01:00
Lv Zheng 7e94632fc5 ACPICA: Add support to allow host OS to redefine individual OSL prototypes.
This change enables the host OS to redefine OSL prototypes found in the
acpiosxf.h file. This allows the host OS to implement OSL interfaces with
a macro or inlined function. Further, it allows the host OS to add any
additional required modifiers such as __iomem, __init, __exit, etc.,
as necessary on a per-interface basis. Enables maximum flexibility
for the OSL interfaces. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-31 14:35:50 +01:00
Bob Moore c0144dc0e4 ACPICA: Simplify configuration of global ACPI_REDUCED_HARDWARE macro.
Surround definition of this with a #ifndef so that the kernel
can define it elsewhere if desired.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-31 14:35:49 +01:00
Lv Zheng cd27d79f56 ACPICA: Fix indentation issues for macro invocations.
During the automatic translation of the upstream ACPICA source code
into Linux kernel source code some extra white spaces are added by
the "indent" program at the beginning of each line which is an
invocation of a macro and there is no ";" at the end of the line.

For this reason, a new mode has been added to the translation scripts
to remove the extra spaces inserted before invoking such macros and add
an empty line between the invocations of such macros (like the other
function declarations).  This new mode is executed after executing
"indent" during the Linux release process.  Consequently, some
existing ACPICA source code in the Linux kernel tree needs to be
adjusted to allow the new scripts to work correctly.

The affected macros and files are:
 1. ACPI_HW_DEPENDENT_RETURN (acpixf.h/acdebug.h/acevents.h):
    This macro is used as a wrapper for hardware dependent APIs to offer
    a stub when the reduced hardware is configured during compilation.
 2. ACPI_EXPORT_SYMBOL (utglobal.c):
    This macro is used by Linux to export symbols to be found by Linux
    modules.  All such invocations are well formatted except those
    exported as global variables.

This can help to reduce the source code differences between Linux
and upstream ACPICA, and also help to automate the release process.
No functional or binary generation changes should result from it.
Lv Zheng.

[rjw: Changelog]
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-31 14:35:46 +01:00
Lv Zheng 4506bf2329 ACPICA: Prevent possible build issues for use of ACPI_PRINTF_LIKE macro
The following build error:
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   CC      arch/x86/kernel/setup.o
 In file included from include/acpi/acpi.h:64:0,
                  from include/linux/iscsi_ibft.h:24,
                  from arch/x86/kernel/setup.c:43:
 include/acpi/acpixf.h:543:1: error: expected ',' or ';' before '{' token
 include/acpi/acpixf.h:540:1: warning: 'acpi_error' declared 'static' but never defined [-Wunused-function]
 make[2]: *** [arch/x86/kernel/setup.o] Error 1
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
can be triggerred by the following stub function (if implemented):
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 static inline void ACPI_INTERNAL_VAR_XFACE
 acpi_error(const char *module_name,
 	   u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3)
 {
 }
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This patch changes the position of ACPI_PRINTF_LIKE(x) to follow the
style of __printf(x, x+1) used in Linux to prevent such issues from
happening.  Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-31 14:35:43 +01:00
Lv Zheng d21f600b0e ACPICA: Deploy ACPI_EXPORT_SYMBOL_INIT for main ACPICA initialization interfaces.
This changes can reduce source code differences between Linux and ACPICA
upstream to help improving the release automation.

The side effect of applying this patch in Linux is:
1. Some ACPICA initialization/termination APIs are no longer exported in
   Linux, these include:
    acpi_load_tables
    acpi_initialize_subsystem
    acpi_enable_subsystem
    acpi_initialize_objects
    acpi_terminate
2. This patch does not affect the following APIs as they are currently not
   marked with ACPI_EXPORT_SYMBOL in Linux:
    acpi_reallocate_root_table
    acpi_initialize_tables
Such functions should not be exported as they are internal to ACPI
subsystem in Linux, and will only be invoked inside of ACPI subsystem's
initialization routines marked with __init and termination routines marked
with __exit.  While on other OSPMs, such functions may still need to be
exported.

Thus this patch adds the configurability for ACPICA, so that it leaves
OSPMs to determine if the __init/__exit marked functions should be exported
or not.  Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-31 14:35:39 +01:00
Lv Zheng 10622bf8ce ACPICA: Linuxize: Change indentation of C labels.
It is reported by kernel build test systems that all ACPICA source
files in the kernel tree have incorrect label indentation.  This
patch changes default indent option used in the release process to
fix this bug.  Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-31 14:35:36 +01:00
Bob Moore bb1cab3d52 ACPICA: Clarify ACPI_FREE_BUFFER usage.
Add a comment to clarify reason for using ACPI_FREE_BUFFER directly
instead of ACPI_FREE.

In addition to that, change one instance in which ACPI_FREE_BUFFER()
should be used instead of ACPI_FREE().

[rjw: Subject and changelog]
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-31 14:35:33 +01:00
Lv Zheng 839e928f5b ACPICA: Add EXPORT_ACPI_INTERFACES macro to external interface modules.
For Linux, there are no functional changes/binary generation differences
introduced by this patch.

This change adds a new macro to all files that contain external ACPICA
interfaces. It can be detected and used by the host (via the host-specific
header) for any special processing required for such modules. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-31 14:34:00 +01:00
Bob Moore e07fcfd89f ACPICA: Hardcode access width for the reset register.
The ACPI spec requires the reset register width to be 8, so we
now hardcode it and ignore the FADT value. This provides/maintains
compatibility with other ACPI implementations that have allowed
BIOS code with bad register width values to go unnoticed.
Matthew Garett, Bob Moore, Lv Zheng.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-30 12:24:22 +01:00
Lv Zheng ab3b24807a ACPICA: Fix possible memory leaks in the GPE handling.
This change fixes potential memory leaks in the error paths of the GPE
handling code. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-30 12:24:22 +01:00
Bob Moore bf4994aca7 ACPICA: Predefine name macros: Sort list.
Sort the method names in acnames.h.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-30 12:24:21 +01:00
Lv Zheng b3c86c30ef ACPICA: Cleanup memory allocation macros and configurability.
In the common case, the ACPI_ALLOCATE and related macros now resolve
directly to their respective acpi_os* OSL interfaces. Two options:
1) The ACPI_ALLOCATE_ZEROED macro defaults to a simple local implementation
   by default, unless overridden by the USE_NATIVE_ALLOCATE_ZEROED define.
2) For ACPI execution simulation environment (AcpiExec) which is not
   shipped with the Linux kernel, the macros can optionally be resolved to
   the local interfaces that track each allocation (used to immediately
   detect memory leaks).

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-30 12:24:21 +01:00
Bob Moore 73424473d0 ACPICA: Add safe versions of common string functions.
This change adds and deploys "safe" versions of strcpy and strcat that
ensure that the target buffer does not overflow. These safe functions
are only helpful for processing user input and command lines. For most
ACPICA code however, the required buffer length is precisely calculated
before buffer allocation, so the use of these functions is unnecessary.
ACPICA BZ 1043.

This change only applies to the ACPICA utilities and the debugger, none
of which are not shipped with the kernel yet, so the kernel's behavior
remains unchanged after it.

References: https://bugs.acpica.org/show_bug.cgi?id=1043
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-30 12:24:21 +01:00
Bob Moore c26f3c9080 ACPICA: Fix a macro for the hardware-reduced case
This fix repairs a version of a macro that is used for the hardware
reduced case only. It adds a return statement to the macro definition
so that the translation into the Linux kernel source will not completely
delete the second line of the macro because it thinks that it is an empty
block. It actually clarifies the use of the macro anyway.

Reported-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-30 12:24:20 +01:00
Bob Moore 1d98e9e0bb ACPICA: Add history/line-editing for Unix/Linux systems.
The original upstream ACPICA change added full history and limited
line editing to the debugger:

 This change adds full history and limited line editing for Unix and
 Linux systems. It does not use readline() because of portability issues.
 Instead it uses the POSIX termio interface to put the terminal in raw
 input mode so that the various special keys can be trapped (such as
 up-arrow and down-arrow for history support).

Since the debugger is not shipped in the kernel, it only is necessary
to update one header file to keep the kernel source in sync with the
upstream.

[rjw: Changelog]
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-30 12:24:20 +01:00
Bob Moore 48961ce627 ACPICA: Add a check for a null node during namespace walk.
Mostly for consistency. ACPICA BZ 1042.

Actually, currently no one is experiencing problem without this check
as the obj_handle is guaranteed to be valid.

References: https://bugs.acpica.org/show_bug.cgi?id=1042
Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-30 12:24:20 +01:00
Bob Moore d7da179423 ACPICA: Table print header function: Increase default width for table length.
This change increases the default width for the length of tables from
5 to 6, to improve alignment/readability on systems with large tables.
These are being seen more frequently, especially large DSDTs (greater
than 1 MB).

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-30 12:24:20 +01:00
Tomasz Nowicki 1b673f23d9 ACPICA: Ensure that debug output is immediately disabled on termination.
Set the global debug flag to "no output" when the debugger is shutdown.
ACPICA BZ 1011. Tomasz Nowicki.

Since the debugger is not shipped in the Linux kernel upstream, this
change doesn't affect Linux kernel's behavior.

References: https://bugs.acpica.org/show_bug.cgi?id=1011
Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-30 12:24:20 +01:00
Rafael J. Wysocki 3774929d2a MAINTAINERS / ACPICA: Add ACPICA information to MAINTAINERS
ACPICA (ACPI Component Architecture) is an external project that
some ACPI kernel code, including the AML interpreter, is derived
from.  That kernel code is generated automatically out of the
original upstream ACPICA sources and therefore, as a general rule,
all changes to it have to go through the ACPICA upstream.

Add ACPICA information to MAINTAINERS to provide the upstream
ACPICA maintainers contact information and pointers to the original
ACPICA Web site and source code.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-16 00:41:52 +02:00
Bob Moore 94d7ba991f ACPICA: Update version to 20130823.
Version 20130823.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-09-24 01:46:25 +02:00
Bob Moore c53ae3a60c ACPICA: SCI Handlers: Update handler interface, eliminate unnecessary argument.
The SCI interrupt number is not needed for the SCI handlers, and was
just unnecessary overhead.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-09-24 01:46:25 +02:00
Lv Zheng 31e93a166c ACPICA: Cleanup exception codes.
This patch adds AE_ACCESS for EACCES or EPERM.  Some error prompts are
also cleaned up in this patch.  Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-09-24 01:46:25 +02:00
Lv Zheng cacba86573 ACPICA: Tables: Cleanup RSDP signature codes.
This patch introduces new macors to handle RSDP signature and cleans up the
affected codes.  Lv Zheng.
Some updates are only used for ACPICA utilities which are not shipped in
the kernel yet.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-09-24 01:46:24 +02:00
Lv Zheng 94d4be6773 ACPICA: Tables: Cleanup table checksum verification code.
This patch reduces code redundancy by moving the FACS/S3PT checksum
verification skip logic into acpi_tb_verify_checksum() and other
calls of this function also get benefit from this change.  Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-09-24 01:46:24 +02:00
Bob Moore 424deb3870 ACPICA: Debugger: Add new command to display full namespace pathnames.
Paths command displays the full pathname and object type for
the entire namespace. Alternative to the Namespace command.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-09-24 01:46:24 +02:00
David E. Box d2e7d079c7 ACPICA: Operation region support: Never free the handler "context" pointer.
This change removes some dangerous code that attempts to free the
handler context pointer in some (rare) circumstances. The owner of
the handler owns this pointer and the ACPICA code should never
touch it. Although not seen to be an issue in any kernel, it did
show up as a problem under AcpiExec. Also, set the internal storage
field for the context pointer to zero when the region is deactivated,
simply for sanity. David Box.

Signed-off-by: David E. Box <david.e.box@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-09-24 01:46:24 +02:00
Lv Zheng a2fd4b4b4e ACPICA: Add support for host-installed SCI handlers.
This change adds support to allow hosts to install System Control
Interrupt handlers. Certain ACPI functionality requires the host
to handle raw SCIs. For example, the "SCI Doorbell" that is defined
for memory power state support requires the host device driver to
handle SCIs to examine if the doorbell has been activated. Multiple
SCI handlers can be installed to allow for future expansion.
Debugger support is included.
Lv Zheng, Bob Moore. ACPICA BZ 1032.

Bug summary:
It is reported when the PCC (Platform Communication Channel, via
MPST table, defined in ACPI specification 5.0) subchannel responds
to the host, it issues an SCI and the host must probe the subchannel
for channel status.

Buglink: http://bugs.acpica.org/show_bug.cgi?id=1032
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-09-24 01:46:24 +02:00
Bob Moore d53d820741 ACPICA: Validate start object for acpi_walk_namespace.
Perform a sanity check on the start object to prevent problems
later. ACPICA BZ 1025.
This patch only adds additional input parameter validation, no actual
kernel suffering has been discovered.

Buglink: http://bugs.acpica.org/show_bug.cgi?id=1025
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-09-24 01:46:24 +02:00
Bob Moore 1f5210a1e6 ACPICA: Debugger: Prevent possible command line buffer overflow, kernel behavior is not affected.
Increase the size of a couple of the debugger line buffers.
ACPICA BZ 1037.

The debugger related code is not in the kernel so the behavior of the
kernel is not affected.

Buglink: http://bugs.acpica.org/show_bug.cgi?id=1037
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-09-24 01:46:24 +02:00
Naresh Bhat 3009520707 ACPICA: Linux-specific header: enable "aarch64" 64-bit build.
Add support for the __aarch64__ define for 64-bit builds.

Signed-off-by: Naresh Bhat <naresh.bhat@linaro.org>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-09-24 01:46:24 +02:00
Bob Moore 2856846e3a ACPICA: Debug output: small formatting update, no functional change.
Allow for longer filenames in the module name output during
trace operations.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-09-24 01:46:23 +02:00
Bjorn Helgaas c3faedcdb4 ACPICA: acpi_read: On error, do not modify the return value target location.
If an error happens in the middle of a split 32/32 64-bit I/O
operation, do not modify the target of the return value pointer.
Makes the code consistent with the rest of ACPICA. Bjorn Helgaas.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Reviewed-by: Len Brown <len.brown@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-09-24 01:46:23 +02:00