ACPICA: Split buffer dump routines into separate file

To enhance configurability of ACPICA.  The new file is
utilities/utbuffer.c

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>
ACPICA: Split internal error msg routines to a separate file

Improves configurability of ACPICA.

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>
ACPICA: Standardize all switch() blocks

After many years, different formatting for switch() has crept in.
This change makes every switch block identical. Chao Guan.
ACPICA bugzilla 997.

References: https://bugs.acpica.org/show_bug.cgi?id=997
Signed-off-by: Chao Guan <chao.guan@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>
ACPICA: Add option to disable loading of SSDTs from the RSDT/XSDT

Optionally do not load any SSDTs from the RSDT/XSDT during
initialization.  This can be useful for overriding SSDTs
using DSDT overriding, thus useful for debugging ACPI
problems on some machines.  Lv Zheng. ACPICA BZ 1005.

References: https://bugs.acpica.org/show_bug.cgi?id=1005
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>
ACPICA: Split table print utilities to a new a separate file

Improves configurability of ACPICA.

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>
ACPICA: Do not use extended sleep registers unless HW-reduced bit is set

Previous implementation incorrectly used the ACPI 5.0 extended
sleep registers if they were simply populated. This caused
problems on some non-HW-reduced machines. As per the ACPI spec,
they should only be used if the HW-reduced bit is set.  Lv Zheng,
ACPICA BZ 1020.

References: https://bugzilla.kernel.org/show_bug.cgi?id=54181
References: https://bugs.acpica.org/show_bug.cgi?id=1020
Reported-by: Daniel Rowe <bart@fathom13.com>
Bisected-by: Brint E. Kriebel <kernel@bekit.net>
Cc: 3.4+ <stable@vger.kernel.org>
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>
ACPICA: New: Portable acpidump utility (get system ACPI tables)

This utility dumps the system ACPI tables in an ascii format
suitable for extraction via the acpixtract utility.

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>
ACPICA: Update interface to AcpiUtValidAcpiName

Clean up the interface by making the input argument a char *
string instead of a UINT32 name. This is easier to use for all
callers and eliminates casting to *(UINT32*)

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>
ACPICA: ACPICA Termination: Delete global lock pending lock

Add deletion of this lock, used for the global lock.  ACPICA BZ
1012. Tomasz Nowicki <tomasz.nowicki@linaro.org>

References: https://bugs.acpica.org/show_bug.cgi?id=1012
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>
ACPICA: Fix possible memory leak in GPE init error path

Some GPE blocks were not deleted.  ACPICA BZ 1018. Tomasz Nowicki
<tomasz.nowicki@linaro.org>

References: https://bugs.acpica.org/show_bug.cgi?id=1018
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>
ACPICA: Clear events initialized flag upon event component termination

Clear this flag to allow clean startup and even double termination.
ACPICA BZ 1013. Tomasz Nowicki <tomasz.nowicki@linaro.org>

References: https://bugs.acpica.org/show_bug.cgi?id=1013
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>
ACPICA: Move _PRT repair into the standard complex repair module

Moved this longstanding repair to the relatively new predefined
name repair module. ACPICA BZ 783. Lv Zheng.

References: https://bugs.acpica.org/show_bug.cgi?id=783
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>
ACPICA: Add several repairs for _CST predefined name

Sort list based on the C-state, remove invalid/zero entries.
ACPICA BZ 890. Lv Zheng.

References: https://bugs.acpica.org/show_bug.cgi?id=890
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>
ACPICA: _CST repair: Handle null package entries

Sort package only after null/bad elements have been removed.
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>
ACPICA: Update version to 20130517

Version 20130517.

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>
Merge branch 'acpica-next' into bleeding-edge

* acpica-next:
  ACPICA: Update version to 20130517
  ACPICA: _CST repair: Handle null package entries
  ACPICA: Add several repairs for _CST predefined name
  ACPICA: Move _PRT repair into the standard complex repair module
  ACPICA: Clear events initialized flag upon event component termination
  ACPICA: Fix possible memory leak in GPE init error path
  ACPICA: ACPICA Termination: Delete global lock pending lock
  ACPICA: Update interface to AcpiUtValidAcpiName
  ACPICA: New: Portable acpidump utility (get system ACPI tables)
  ACPICA: Do not use extended sleep registers unless HW-reduced bit is set
  ACPICA: Split table print utilities to a new a separate file
  ACPICA: Add option to disable loading of SSDTs from the RSDT/XSDT
  ACPICA: Standardize all switch() blocks
  ACPICA: Split internal error msg routines to a separate file
  ACPICA: Split buffer dump routines into separate file