projects/linux·commit 59df1c2b

Merge tag 'acpi-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

59df1c2b · Linus Torvalds <[email protected]> · 2019-05-06 19:35:13 -07:00

Pull ACPI updates from Rafael Wysocki:
 "These rearrange the ACPI documentation by converting it to the .rst
  format and splitting it into clear categories (admin guide, driver
  API, firmware guide), switch over multiple users of a problematic
  library function to a new better one, update the ACPICA code in the
  kernel to a new upstream release, fix a few issues, improve power
  device management diagnostics and do some cleanups.

  Specifics:

   - Convert the ACPI documentation in the kernel source tree to the
     .rst format and split it into the admin guide, driver API and
     firmware guide parts (Changbin Du).

   - Add a PRP0001 usage example to the ACPI documentation (Thomas
     Preston).

   - Switch over the users of the acpi_dev_get_first_match_name()
     library function which turned out to be problematic to a new,
     better one called acpi_dev_get_first_match_dev() (Andy Shevchenko,
     YueHaibing).

   - Update the ACPICA code in the kernel to upstream release 20190405
     including:
       * Null pointer dereference check in acpi_ns_delete_node() (Erik
         Schmauss).
       * Multiple macro and function name changes (Bob Moore).
       * Predefined operation region name fix (Erik Schmauss).

   - Fix hibernation issue on systems using the Baytrail and Cherrytrail
     Intel SoCs introduced during the 4.20 development cycle (Hans de
     Goede).

   - Add Sony VPCEH3U1E to the backlight quirk list (Zhang Rui).

   - Fix button handling during system resume (Zhang Rui).

   - Add a device PM diagnostic message (Rafael Wysocki).

   - Clean up the code, comments and white space in multiple places
     (Bjorn Helgaas, Gustavo Silva, Kefeng Wang)"

* tag 'acpi-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (53 commits)
  Documentation: ACPI: move video_extension.txt to firmware-guide/acpi and convert to reST
  Documentation: ACPI: move ssdt-overlays.txt to admin-guide/acpi and convert to reST
  Documentation: ACPI: move lpit.txt to firmware-guide/acpi and convert to reST
  Documentation: ACPI: move cppc_sysfs.txt to admin-guide/acpi and convert to reST
  Documentation: ACPI: move apei/einj.txt to firmware-guide/acpi and convert to reST
  Documentation: ACPI: move apei/output_format.txt to firmware-guide/acpi and convert to reST
  Documentation: ACPI: move aml-debugger.txt to firmware-guide/acpi and convert to reST
  Documentation: ACPI: move method-tracing.txt to firmware-guide/acpi and convert to rsST
  Documentation: ACPI: move debug.txt to firmware-guide/acpi and convert to reST
  Documentation: ACPI: move dsd/data-node-references.txt to firmware-guide/acpi and convert to reST
  Documentation: ACPI: move dsd/graph.txt to firmware-guide/acpi and convert to reST
  Documentation: ACPI: move acpi-lid.txt to firmware-guide/acpi and convert to reST
  Documentation: ACPI: move i2c-muxes.txt to firmware-guide/acpi and convert to reST
  Documentation: ACPI: move dsdt-override.txt to admin-guide/acpi and convert to reST
  Documentation: ACPI: move initrd_table_override.txt to admin-guide/acpi and convert to reST
  Documentation: ACPI: move method-customizing.txt to firmware-guide/acpi and convert to reST
  Documentation: ACPI: move gpio-properties.txt to firmware-guide/acpi and convert to reST
  Documentation: ACPI: move DSD-properties-rules.txt to firmware-guide/acpi and covert to reST
  Documentation: ACPI: move scan_handlers.txt to driver-api/acpi and convert to reST
  Documentation: ACPI: move linuxized-acpica.txt to driver-api/acpi and convert to reST
  ...
Commit
59df1c2bdecb0d1aaadfb8533df4bea528ee4952
Parents
c620f7bd · 10b4768b

Merge commit. Changes below are compared with the first parent: c620f7bd.

Changes

97 files changed · +1677 −1319

FileStatusAddDelContent
Documentation/acpi/cppc_sysfs.txt → Documentation/admin-guide/acpi/cppc_sysfs.rstrenamed+39−32View file
Documentation/acpi/dsdt-override.txt → Documentation/admin-guide/acpi/dsdt-override.rstrenamed+7−1View file
Documentation/admin-guide/acpi/index.rstadded+14−0View file
Documentation/acpi/initrd_table_override.txt → Documentation/admin-guide/acpi/initrd_table_override.rstrenamed+62−58View file
Documentation/acpi/ssdt-overlays.txt → Documentation/admin-guide/acpi/ssdt-overlays.rstrenamed+88−80View file
Documentation/admin-guide/index.rstmodified+1−0View file
Documentation/driver-api/acpi/index.rstadded+9−0View file
Documentation/acpi/linuxized-acpica.txt → Documentation/driver-api/acpi/linuxized-acpica.rstrenamed+63−46View file
Documentation/acpi/scan_handlers.txt → Documentation/driver-api/acpi/scan_handlers.rstrenamed+15−9View file
Documentation/driver-api/index.rstmodified+1−0View file
Documentation/acpi/DSD-properties-rules.txt → Documentation/firmware-guide/acpi/DSD-properties-rules.rstrenamed+12−9View file
Documentation/acpi/acpi-lid.txt → Documentation/firmware-guide/acpi/acpi-lid.rstrenamed+29−11View file
Documentation/acpi/aml-debugger.txt → Documentation/firmware-guide/acpi/aml-debugger.rstrenamed+34−25View file
Documentation/acpi/apei/einj.txt → Documentation/firmware-guide/acpi/apei/einj.rstrenamed+51−43View file
Documentation/acpi/apei/output_format.txt → Documentation/firmware-guide/acpi/apei/output_format.rstrenamed+131−128View file
Documentation/acpi/debug.txt → Documentation/firmware-guide/acpi/debug.rstrenamed+17−14View file
Documentation/acpi/dsd/data-node-references.txt → Documentation/firmware-guide/acpi/dsd/data-node-references.rstrenamed+20−16View file
Documentation/acpi/dsd/graph.txt → Documentation/firmware-guide/acpi/dsd/graph.rstrenamed+80−77View file
Documentation/acpi/enumeration.txt → Documentation/firmware-guide/acpi/enumeration.rstrenamed+99−62View file
Documentation/acpi/gpio-properties.txt → Documentation/firmware-guide/acpi/gpio-properties.rstrenamed+44−34View file
Documentation/acpi/i2c-muxes.txt → Documentation/firmware-guide/acpi/i2c-muxes.rstrenamed+40−37View file
Documentation/firmware-guide/acpi/index.rstadded+26−0View file
Documentation/acpi/lpit.txt → Documentation/firmware-guide/acpi/lpit.rstrenamed+13−5View file
Documentation/acpi/method-customizing.txt → Documentation/firmware-guide/acpi/method-customizing.rstrenamed+64−48View file
Documentation/acpi/method-tracing.txt → Documentation/firmware-guide/acpi/method-tracing.rstrenamed+189−143View file
Documentation/acpi/namespace.txt → Documentation/firmware-guide/acpi/namespace.rstrenamed+153−141View file
Documentation/acpi/osi.txt → Documentation/firmware-guide/acpi/osi.rstrenamed+9−6View file
Documentation/acpi/video_extension.txt → Documentation/firmware-guide/acpi/video_extension.rstrenamed+49−34View file
Documentation/firmware-guide/index.rstadded+13−0View file
Documentation/index.rstmodified+10−0View file
MAINTAINERSmodified+1−1View file
arch/x86/boot/compressed/acpi.cmodified+1−1View file
drivers/acpi/acpi_configfs.cmodified+2−2View file
drivers/acpi/acpi_dbg.cmodified+1−1View file
drivers/acpi/acpi_lpat.cmodified+1−1View file
drivers/acpi/acpi_lpss.cmodified+2−2View file
drivers/acpi/acpica/aclocal.hmodified+2−2View file
drivers/acpi/acpica/dbexec.cmodified+1−1View file
drivers/acpi/acpica/dbnames.cmodified+1−1View file
drivers/acpi/acpica/dsinit.cmodified+1−1View file
drivers/acpi/acpica/evgpeinit.cmodified+2−2View file
drivers/acpi/acpica/exnames.cmodified+3−3View file
drivers/acpi/acpica/nsaccess.cmodified+1−1View file
drivers/acpi/acpica/nsalloc.cmodified+4−0View file
drivers/acpi/acpica/nsdump.cmodified+1−1View file
drivers/acpi/acpica/nsinit.cmodified+2−2View file
drivers/acpi/acpica/nsnames.cmodified+4−4View file
drivers/acpi/acpica/nsparse.cmodified+1−1View file
drivers/acpi/acpica/nsrepair.cmodified+1−1View file
drivers/acpi/acpica/nsrepair2.cmodified+2−2View file
drivers/acpi/acpica/nsutils.cmodified+7−7View file
drivers/acpi/acpica/nsxfname.cmodified+2−2View file
drivers/acpi/acpica/psargs.cmodified+4−4View file
drivers/acpi/acpica/rsxface.cmodified+4−4View file
drivers/acpi/acpica/tbdata.cmodified+2−1View file
drivers/acpi/acpica/tbfind.cmodified+10−10View file
drivers/acpi/acpica/tbinstal.cmodified+1−1View file
drivers/acpi/acpica/tbprint.cmodified+5−5View file
drivers/acpi/acpica/tbutils.cmodified+3−3View file
drivers/acpi/acpica/tbxface.cmodified+2−2View file
drivers/acpi/acpica/tbxfload.cmodified+8−7View file
drivers/acpi/acpica/utascii.cmodified+1−1View file
drivers/acpi/acpica/utdecode.cmodified+2−2View file
drivers/acpi/acpica/utmisc.cmodified+4−4View file
drivers/acpi/acpica/utpredef.cmodified+2−2View file
drivers/acpi/acpica/utstring.cmodified+3−3View file
drivers/acpi/button.cmodified+4−1View file
drivers/acpi/cppc_acpi.cmodified+17−17View file
drivers/acpi/device_pm.cmodified+3−0View file
drivers/acpi/dptf/dptf_power.cmodified+1−2View file
drivers/acpi/event.cmodified+2−2View file
drivers/acpi/power.cmodified+2−2View file
drivers/acpi/pptt.cmodified+24−24View file
drivers/acpi/scan.cmodified+9−12View file
drivers/acpi/spcr.cmodified+1−1View file
drivers/acpi/sysfs.cmodified+7−7View file
drivers/acpi/tables.cmodified+7−15View file
drivers/acpi/utils.cmodified+10−6View file
drivers/acpi/video_detect.cmodified+9−1View file
drivers/extcon/extcon-axp288.cmodified+5−4View file
drivers/firmware/iscsi_ibft.cmodified+1−1View file
drivers/gpio/gpio-merrifield.cmodified+14−4View file
drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.cmodified+1−1View file
include/acpi/acpi_bus.hmodified+6−2View file
include/acpi/acpixf.hmodified+1−1View file
include/acpi/actbl.hmodified+2−2View file
include/acpi/actypes.hmodified+6−6View file
include/linux/acpi.hmodified+4−2View file
sound/soc/intel/boards/bytcht_da7213.cmodified+5−4View file
sound/soc/intel/boards/bytcht_es8316.cmodified+5−4View file
sound/soc/intel/boards/bytcr_rt5640.cmodified+5−5View file
sound/soc/intel/boards/bytcr_rt5651.cmodified+8−6View file
sound/soc/intel/boards/cht_bsw_rt5645.cmodified+5−4View file
sound/soc/intel/boards/cht_bsw_rt5672.cmodified+5−4View file
tools/power/acpi/os_specific/service_layers/oslinuxtbl.cmodified+24−24View file
tools/power/acpi/tools/acpidump/apdump.cmodified+4−4View file
tools/power/acpi/tools/acpidump/apfiles.cmodified+4−4View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/admin-guide/acpi/cppc_sysfs.rst

View file
diff --git a/Documentation/acpi/cppc_sysfs.txt b/Documentation/admin-guide/acpi/cppc_sysfs.rst
similarity index 74%
rename from Documentation/acpi/cppc_sysfs.txt
rename to Documentation/admin-guide/acpi/cppc_sysfs.rst
index f20fb44..a4b99af 100644
--- a/Documentation/acpi/cppc_sysfs.txt
+++ b/Documentation/admin-guide/acpi/cppc_sysfs.rst
@@ -1,5 +1,11 @@
+.. SPDX-License-Identifier: GPL-2.0
- Collaborative Processor Performance Control (CPPC)
+==================================================
+Collaborative Processor Performance Control (CPPC)
+==================================================
+
+CPPC
+====
CPPC defined in the ACPI spec describes a mechanism for the OS to manage the
performance of a logical processor on a contigious and abstract performance
@@ -10,31 +16,28 @@ For more details on CPPC please refer to the ACPI specification at:
http://uefi.org/specifications
-Some of the CPPC registers are exposed via sysfs under:
-
-/sys/devices/system/cpu/cpuX/acpi_cppc/
-
-for each cpu X
+Some of the CPPC registers are exposed via sysfs under::
---------------------------------------------------------------------------------
+ /sys/devices/system/cpu/cpuX/acpi_cppc/
-$ ls -lR /sys/devices/system/cpu/cpu0/acpi_cppc/
-/sys/devices/system/cpu/cpu0/acpi_cppc/:
-total 0
--r--r--r-- 1 root root 65536 Mar 5 19:38 feedback_ctrs
--r--r--r-- 1 root root 65536 Mar 5 19:38 highest_perf
--r--r--r-- 1 root root 65536 Mar 5 19:38 lowest_freq
--r--r--r-- 1 root root 65536 Mar 5 19:38 lowest_nonlinear_perf
--r--r--r-- 1 root root 65536 Mar 5 19:38 lowest_perf
--r--r--r-- 1 root root 65536 Mar 5 19:38 nominal_freq
--r--r--r-- 1 root root 65536 Mar 5 19:38 nominal_perf
--r--r--r-- 1 root root 65536 Mar 5 19:38 reference_perf
--r--r--r-- 1 root root 65536 Mar 5 19:38 wraparound_time
+for each cpu X::
---------------------------------------------------------------------------------
+ $ ls -lR /sys/devices/system/cpu/cpu0/acpi_cppc/
+ /sys/devices/system/cpu/cpu0/acpi_cppc/:
+ total 0
+ -r--r--r-- 1 root root 65536 Mar 5 19:38 feedback_ctrs
+ -r--r--r-- 1 root root 65536 Mar 5 19:38 highest_perf
+ -r--r--r-- 1 root root 65536 Mar 5 19:38 lowest_freq
+ -r--r--r-- 1 root root 65536 Mar 5 19:38 lowest_nonlinear_perf
+ -r--r--r-- 1 root root 65536 Mar 5 19:38 lowest_perf
+ -r--r--r-- 1 root root 65536 Mar 5 19:38 nominal_freq
+ -r--r--r-- 1 root root 65536 Mar 5 19:38 nominal_perf
+ -r--r--r-- 1 root root 65536 Mar 5 19:38 reference_perf
+ -r--r--r-- 1 root root 65536 Mar 5 19:38 wraparound_time
* highest_perf : Highest performance of this processor (abstract scale).
-* nominal_perf : Highest sustained performance of this processor (abstract scale).
+* nominal_perf : Highest sustained performance of this processor
+ (abstract scale).
* lowest_nonlinear_perf : Lowest performance of this processor with nonlinear
power savings (abstract scale).
* lowest_perf : Lowest performance of this processor (abstract scale).
@@ -48,22 +51,26 @@ total 0
* feedback_ctrs : Includes both Reference and delivered performance counter.
Reference counter ticks up proportional to processor's reference performance.
Delivered counter ticks up proportional to processor's delivered performance.
-* wraparound_time: Minimum time for the feedback counters to wraparound (seconds).
+* wraparound_time: Minimum time for the feedback counters to wraparound
+ (seconds).
* reference_perf : Performance level at which reference performance counter
accumulates (abstract scale).
---------------------------------------------------------------------------------
- Computing Average Delivered Performance
+Computing Average Delivered Performance
+=======================================
+
+Below describes the steps to compute the average performance delivered by
+taking two different snapshots of feedback counters at time T1 and T2.
+
+ T1: Read feedback_ctrs as fbc_t1
+ Wait or run some workload
-Below describes the steps to compute the average performance delivered by taking
-two different snapshots of feedback counters at time T1 and T2.
+ T2: Read feedback_ctrs as fbc_t2
-T1: Read feedback_ctrs as fbc_t1
- Wait or run some workload
-T2: Read feedback_ctrs as fbc_t2
+::
-delivered_counter_delta = fbc_t2[del] - fbc_t1[del]
-reference_counter_delta = fbc_t2[ref] - fbc_t1[ref]
+ delivered_counter_delta = fbc_t2[del] - fbc_t1[del]
+ reference_counter_delta = fbc_t2[ref] - fbc_t1[ref]
-delivered_perf = (refernce_perf x delivered_counter_delta) / reference_counter_delta
+ delivered_perf = (refernce_perf x delivered_counter_delta) / reference_counter_delta

Documentation/admin-guide/acpi/dsdt-override.rst

View file
diff --git a/Documentation/acpi/dsdt-override.txt b/Documentation/admin-guide/acpi/dsdt-override.rst
similarity index 57%
rename from Documentation/acpi/dsdt-override.txt
rename to Documentation/admin-guide/acpi/dsdt-override.rst
index 784841c..50bd7f1 100644
--- a/Documentation/acpi/dsdt-override.txt
+++ b/Documentation/admin-guide/acpi/dsdt-override.rst
@@ -1,6 +1,12 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+===============
+Overriding DSDT
+===============
+
Linux supports a method of overriding the BIOS DSDT:
-CONFIG_ACPI_CUSTOM_DSDT builds the image into the kernel.
+CONFIG_ACPI_CUSTOM_DSDT - builds the image into the kernel.
When to use this method is described in detail on the
Linux/ACPI home page:

Documentation/admin-guide/acpi/index.rst

View file
diff --git a/Documentation/admin-guide/acpi/index.rst b/Documentation/admin-guide/acpi/index.rst
new file mode 100644
index 0000000..4d13eee
--- /dev/null
+++ b/Documentation/admin-guide/acpi/index.rst
@@ -0,0 +1,14 @@
+============
+ACPI Support
+============
+
+Here we document in detail how to interact with various mechanisms in
+the Linux ACPI support.
+
+.. toctree::
+ :maxdepth: 1
+
+ initrd_table_override
+ dsdt-override
+ ssdt-overlays
+ cppc_sysfs

Documentation/admin-guide/acpi/initrd_table_override.rst

View file
diff --git a/Documentation/acpi/initrd_table_override.txt b/Documentation/admin-guide/acpi/initrd_table_override.rst
similarity index 86%
rename from Documentation/acpi/initrd_table_override.txt
rename to Documentation/admin-guide/acpi/initrd_table_override.rst
index 30437a6..cbd7682 100644
--- a/Documentation/acpi/initrd_table_override.txt
+++ b/Documentation/admin-guide/acpi/initrd_table_override.rst
@@ -1,13 +1,11 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+================================
Upgrading ACPI tables via initrd
================================
-1) Introduction (What is this about)
-2) What is this for
-3) How does it work
-4) References (Where to retrieve userspace tools)
-
-1) What is this about
----------------------
+What is this about
+==================
If the ACPI_TABLE_UPGRADE compile option is true, it is possible to
upgrade the ACPI execution environment that is defined by the ACPI tables
@@ -19,17 +17,20 @@ ACPI_TABLE_OVERRIDE_VIA_BUILTIN_INITRD should also be true for this
feature to work.
For a full list of ACPI tables that can be upgraded/installed, take a look
-at the char *table_sigs[MAX_ACPI_SIGNATURE]; definition in
+at the char `*table_sigs[MAX_ACPI_SIGNATURE];` definition in
drivers/acpi/tables.c.
+
All ACPI tables iasl (Intel's ACPI compiler and disassembler) knows should
be overridable, except:
- - ACPI_SIG_RSDP (has a signature of 6 bytes)
- - ACPI_SIG_FACS (does not have an ordinary ACPI table header)
+
+ - ACPI_SIG_RSDP (has a signature of 6 bytes)
+ - ACPI_SIG_FACS (does not have an ordinary ACPI table header)
+
Both could get implemented as well.
-2) What is this for
--------------------
+What is this for
+================
Complain to your platform/BIOS vendor if you find a bug which is so severe
that a workaround is not accepted in the Linux kernel. And this facility
@@ -47,65 +48,68 @@ It can and should be enabled in any kernel because there is no functional
change with not instrumented initrds.
-3) How does it work
--------------------
-
-# Extract the machine's ACPI tables:
-cd /tmp
-acpidump >acpidump
-acpixtract -a acpidump
-# Disassemble, modify and recompile them:
-iasl -d *.dat
-# For example add this statement into a _PRT (PCI Routing Table) function
-# of the DSDT:
-Store("HELLO WORLD", debug)
-# And increase the OEM Revision. For example, before modification:
-DefinitionBlock ("DSDT.aml", "DSDT", 2, "INTEL ", "TEMPLATE", 0x00000000)
-# After modification:
-DefinitionBlock ("DSDT.aml", "DSDT", 2, "INTEL ", "TEMPLATE", 0x00000001)
-iasl -sa dsdt.dsl
-# Add the raw ACPI tables to an uncompressed cpio archive.
-# They must be put into a /kernel/firmware/acpi directory inside the cpio
-# archive. Note that if the table put here matches a platform table
-# (similar Table Signature, and similar OEMID, and similar OEM Table ID)
-# with a more recent OEM Revision, the platform table will be upgraded by
-# this table. If the table put here doesn't match a platform table
-# (dissimilar Table Signature, or dissimilar OEMID, or dissimilar OEM Table
-# ID), this table will be appended.
-mkdir -p kernel/firmware/acpi
-cp dsdt.aml kernel/firmware/acpi
-# A maximum of "NR_ACPI_INITRD_TABLES (64)" tables are currently allowed
-# (see osl.c):
-iasl -sa facp.dsl
-iasl -sa ssdt1.dsl
-cp facp.aml kernel/firmware/acpi
-cp ssdt1.aml kernel/firmware/acpi
-# The uncompressed cpio archive must be the first. Other, typically
-# compressed cpio archives, must be concatenated on top of the uncompressed
-# one. Following command creates the uncompressed cpio archive and
-# concatenates the original initrd on top:
-find kernel | cpio -H newc --create > /boot/instrumented_initrd
-cat /boot/initrd >>/boot/instrumented_initrd
-# reboot with increased acpi debug level, e.g. boot params:
-acpi.debug_level=0x2 acpi.debug_layer=0xFFFFFFFF
-# and check your syslog:
-[ 1.268089] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
-[ 1.272091] [ACPI Debug] String [0x0B] "HELLO WORLD"
+How does it work
+================
+::
+
+ # Extract the machine's ACPI tables:
+ cd /tmp
+ acpidump >acpidump
+ acpixtract -a acpidump
+ # Disassemble, modify and recompile them:
+ iasl -d *.dat
+ # For example add this statement into a _PRT (PCI Routing Table) function
+ # of the DSDT:
+ Store("HELLO WORLD", debug)
+ # And increase the OEM Revision. For example, before modification:
+ DefinitionBlock ("DSDT.aml", "DSDT", 2, "INTEL ", "TEMPLATE", 0x00000000)
+ # After modification:
+ DefinitionBlock ("DSDT.aml", "DSDT", 2, "INTEL ", "TEMPLATE", 0x00000001)
+ iasl -sa dsdt.dsl
+ # Add the raw ACPI tables to an uncompressed cpio archive.
+ # They must be put into a /kernel/firmware/acpi directory inside the cpio
+ # archive. Note that if the table put here matches a platform table
+ # (similar Table Signature, and similar OEMID, and similar OEM Table ID)
+ # with a more recent OEM Revision, the platform table will be upgraded by
+ # this table. If the table put here doesn't match a platform table
+ # (dissimilar Table Signature, or dissimilar OEMID, or dissimilar OEM Table
+ # ID), this table will be appended.
+ mkdir -p kernel/firmware/acpi
+ cp dsdt.aml kernel/firmware/acpi
+ # A maximum of "NR_ACPI_INITRD_TABLES (64)" tables are currently allowed
+ # (see osl.c):
+ iasl -sa facp.dsl
+ iasl -sa ssdt1.dsl
+ cp facp.aml kernel/firmware/acpi
+ cp ssdt1.aml kernel/firmware/acpi
+ # The uncompressed cpio archive must be the first. Other, typically
+ # compressed cpio archives, must be concatenated on top of the uncompressed
+ # one. Following command creates the uncompressed cpio archive and
+ # concatenates the original initrd on top:
+ find kernel | cpio -H newc --create > /boot/instrumented_initrd
+ cat /boot/initrd >>/boot/instrumented_initrd
+ # reboot with increased acpi debug level, e.g. boot params:
+ acpi.debug_level=0x2 acpi.debug_layer=0xFFFFFFFF
+ # and check your syslog:
+ [ 1.268089] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
+ [ 1.272091] [ACPI Debug] String [0x0B] "HELLO WORLD"
iasl is able to disassemble and recompile quite a lot different,
also static ACPI tables.
-4) Where to retrieve userspace tools
-------------------------------------
+Where to retrieve userspace tools
+=================================
iasl and acpixtract are part of Intel's ACPICA project:
http://acpica.org/
+
and should be packaged by distributions (for example in the acpica package
on SUSE).
acpidump can be found in Len Browns pmtools:
ftp://kernel.org/pub/linux/kernel/people/lenb/acpi/utils/pmtools/acpidump
+
This tool is also part of the acpica package on SUSE.
Alternatively, used ACPI tables can be retrieved via sysfs in latest kernels:
/sys/firmware/acpi/tables

Documentation/admin-guide/acpi/ssdt-overlays.rst

View file
diff --git a/Documentation/acpi/ssdt-overlays.txt b/Documentation/admin-guide/acpi/ssdt-overlays.rst
similarity index 87%
rename from Documentation/acpi/ssdt-overlays.txt
rename to Documentation/admin-guide/acpi/ssdt-overlays.rst
index 5ae13f1..da37455 100644
--- a/Documentation/acpi/ssdt-overlays.txt
+++ b/Documentation/admin-guide/acpi/ssdt-overlays.rst
@@ -1,3 +1,8 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+=============
+SSDT Overlays
+=============
In order to support ACPI open-ended hardware configurations (e.g. development
boards) we need a way to augment the ACPI configuration provided by the firmware
@@ -15,55 +20,56 @@ user defined SSDT tables that contain the board specific information.
For example, to enumerate a Bosch BMA222E accelerometer on the I2C bus of the
Minnowboard MAX development board exposed via the LSE connector [1], the
-following ASL code can be used:
-
-DefinitionBlock ("minnowmax.aml", "SSDT", 1, "Vendor", "Accel", 0x00000003)
-{
- External (\_SB.I2C6, DeviceObj)
+following ASL code can be used::
- Scope (\_SB.I2C6)
+ DefinitionBlock ("minnowmax.aml", "SSDT", 1, "Vendor", "Accel", 0x00000003)
{
- Device (STAC)
- {
- Name (_ADR, Zero)
- Name (_HID, "BMA222E")
+ External (\_SB.I2C6, DeviceObj)
- Method (_CRS, 0, Serialized)
+ Scope (\_SB.I2C6)
+ {
+ Device (STAC)
{
- Name (RBUF, ResourceTemplate ()
+ Name (_ADR, Zero)
+ Name (_HID, "BMA222E")
+
+ Method (_CRS, 0, Serialized)
{
- I2cSerialBus (0x0018, ControllerInitiated, 0x00061A80,
- AddressingMode7Bit, "\\_SB.I2C6", 0x00,
- ResourceConsumer, ,)
- GpioInt (Edge, ActiveHigh, Exclusive, PullDown, 0x0000,
- "\\_SB.GPO2", 0x00, ResourceConsumer, , )
- { // Pin list
- 0
- }
- })
- Return (RBUF)
+ Name (RBUF, ResourceTemplate ()
+ {
+ I2cSerialBus (0x0018, ControllerInitiated, 0x00061A80,
+ AddressingMode7Bit, "\\_SB.I2C6", 0x00,
+ ResourceConsumer, ,)
+ GpioInt (Edge, ActiveHigh, Exclusive, PullDown, 0x0000,
+ "\\_SB.GPO2", 0x00, ResourceConsumer, , )
+ { // Pin list
+ 0
+ }
+ })
+ Return (RBUF)
+ }
}
}
}
-}
-which can then be compiled to AML binary format:
+which can then be compiled to AML binary format::
-$ iasl minnowmax.asl
+ $ iasl minnowmax.asl
-Intel ACPI Component Architecture
-ASL Optimizing Compiler version 20140214-64 [Mar 29 2014]
-Copyright (c) 2000 - 2014 Intel Corporation
+ Intel ACPI Component Architecture
+ ASL Optimizing Compiler version 20140214-64 [Mar 29 2014]
+ Copyright (c) 2000 - 2014 Intel Corporation
-ASL Input: minnomax.asl - 30 lines, 614 bytes, 7 keywords
-AML Output: minnowmax.aml - 165 bytes, 6 named objects, 1 executable opcodes
+ ASL Input: minnomax.asl - 30 lines, 614 bytes, 7 keywords
+ AML Output: minnowmax.aml - 165 bytes, 6 named objects, 1 executable opcodes
[1] http://wiki.minnowboard.org/MinnowBoard_MAX#Low_Speed_Expansion_Connector_.28Top.29
The resulting AML code can then be loaded by the kernel using one of the methods
below.
-== Loading ACPI SSDTs from initrd ==
+Loading ACPI SSDTs from initrd
+==============================
This option allows loading of user defined SSDTs from initrd and it is useful
when the system does not support EFI or when there is not enough EFI storage.
@@ -74,23 +80,24 @@ aml code must be placed in the first, uncompressed, initrd under the
in loading multiple tables. Only SSDT and OEM tables are allowed. See
initrd_table_override.txt for more details.
-Here is an example:
+Here is an example::
-# Add the raw ACPI tables to an uncompressed cpio archive.
-# They must be put into a /kernel/firmware/acpi directory inside the
-# cpio archive.
-# The uncompressed cpio archive must be the first.
-# Other, typically compressed cpio archives, must be
-# concatenated on top of the uncompressed one.
-mkdir -p kernel/firmware/acpi
-cp ssdt.aml kernel/firmware/acpi
+ # Add the raw ACPI tables to an uncompressed cpio archive.
+ # They must be put into a /kernel/firmware/acpi directory inside the
+ # cpio archive.
+ # The uncompressed cpio archive must be the first.
+ # Other, typically compressed cpio archives, must be
+ # concatenated on top of the uncompressed one.
+ mkdir -p kernel/firmware/acpi
+ cp ssdt.aml kernel/firmware/acpi
-# Create the uncompressed cpio archive and concatenate the original initrd
-# on top:
-find kernel | cpio -H newc --create > /boot/instrumented_initrd
-cat /boot/initrd >>/boot/instrumented_initrd
+ # Create the uncompressed cpio archive and concatenate the original initrd
+ # on top:
+ find kernel | cpio -H newc --create > /boot/instrumented_initrd
+ cat /boot/initrd >>/boot/instrumented_initrd
-== Loading ACPI SSDTs from EFI variables ==
+Loading ACPI SSDTs from EFI variables
+=====================================
This is the preferred method, when EFI is supported on the platform, because it
allows a persistent, OS independent way of storing the user defined SSDTs. There
@@ -116,48 +123,49 @@ include/linux/efi.h). Writing to the file must also be done with one write
operation.
For example, you can use the following bash script to create/update an EFI
-variable with the content from a given file:
+variable with the content from a given file::
-#!/bin/sh -e
+ #!/bin/sh -e
-while ! [ -z "$1" ]; do
- case "$1" in
- "-f") filename="$2"; shift;;
- "-g") guid="$2"; shift;;
- *) name="$1";;
- esac
- shift
-done
+ while ! [ -z "$1" ]; do
+ case "$1" in
+ "-f") filename="$2"; shift;;
+ "-g") guid="$2"; shift;;
+ *) name="$1";;
+ esac
+ shift
+ done
-usage()
-{
- echo "Syntax: ${0##*/} -f filename [ -g guid ] name"
- exit 1
-}
+ usage()
+ {
+ echo "Syntax: ${0##*/} -f filename [ -g guid ] name"
+ exit 1
+ }
-[ -n "$name" -a -f "$filename" ] || usage
+ [ -n "$name" -a -f "$filename" ] || usage
-EFIVARFS="/sys/firmware/efi/efivars"
+ EFIVARFS="/sys/firmware/efi/efivars"
-[ -d "$EFIVARFS" ] || exit 2
+ [ -d "$EFIVARFS" ] || exit 2
-if stat -tf $EFIVARFS | grep -q -v de5e81e4; then
- mount -t efivarfs none $EFIVARFS
-fi
+ if stat -tf $EFIVARFS | grep -q -v de5e81e4; then
+ mount -t efivarfs none $EFIVARFS
+ fi
-# try to pick up an existing GUID
-[ -n "$guid" ] || guid=$(find "$EFIVARFS" -name "$name-*" | head -n1 | cut -f2- -d-)
+ # try to pick up an existing GUID
+ [ -n "$guid" ] || guid=$(find "$EFIVARFS" -name "$name-*" | head -n1 | cut -f2- -d-)
-# use a randomly generated GUID
-[ -n "$guid" ] || guid="$(cat /proc/sys/kernel/random/uuid)"
+ # use a randomly generated GUID
+ [ -n "$guid" ] || guid="$(cat /proc/sys/kernel/random/uuid)"
-# efivarfs expects all of the data in one write
-tmp=$(mktemp)
-/bin/echo -ne "\007\000\000\000" | cat - $filename > $tmp
-dd if=$tmp of="$EFIVARFS/$name-$guid" bs=$(stat -c %s $tmp)
-rm $tmp
+ # efivarfs expects all of the data in one write
+ tmp=$(mktemp)
+ /bin/echo -ne "\007\000\000\000" | cat - $filename > $tmp
+ dd if=$tmp of="$EFIVARFS/$name-$guid" bs=$(stat -c %s $tmp)
+ rm $tmp
-== Loading ACPI SSDTs from configfs ==
+Loading ACPI SSDTs from configfs
+================================
This option allows loading of user defined SSDTs from userspace via the configfs
interface. The CONFIG_ACPI_CONFIGFS option must be select and configfs must be
@@ -165,8 +173,8 @@ mounted. In the following examples, we assume that configfs has been mounted in
/config.
New tables can be loading by creating new directories in /config/acpi/table/ and
-writing the SSDT aml code in the aml attribute:
+writing the SSDT aml code in the aml attribute::
-cd /config/acpi/table
-mkdir my_ssdt
-cat ~/ssdt.aml > my_ssdt/aml
+ cd /config/acpi/table
+ mkdir my_ssdt
+ cat ~/ssdt.aml > my_ssdt/aml

Documentation/admin-guide/index.rst

View file
diff --git a/Documentation/admin-guide/index.rst b/Documentation/admin-guide/index.rst
index 0a49167..5b8286f 100644
--- a/Documentation/admin-guide/index.rst
+++ b/Documentation/admin-guide/index.rst
@@ -77,6 +77,7 @@ configure specific aspects of kernel behavior to your liking.
LSM/index
mm/index
perf-security
+ acpi/index
.. only:: subproject and html

Documentation/driver-api/acpi/index.rst

View file
diff --git a/Documentation/driver-api/acpi/index.rst b/Documentation/driver-api/acpi/index.rst
new file mode 100644
index 0000000..ace0008
--- /dev/null
+++ b/Documentation/driver-api/acpi/index.rst
@@ -0,0 +1,9 @@
+============
+ACPI Support
+============
+
+.. toctree::
+ :maxdepth: 2
+
+ linuxized-acpica
+ scan_handlers

Documentation/driver-api/acpi/linuxized-acpica.rst

View file
diff --git a/Documentation/acpi/linuxized-acpica.txt b/Documentation/driver-api/acpi/linuxized-acpica.rst
similarity index 78%
rename from Documentation/acpi/linuxized-acpica.txt
rename to Documentation/driver-api/acpi/linuxized-acpica.rst
index 3ad7b0d..0ca8f15 100644
--- a/Documentation/acpi/linuxized-acpica.txt
+++ b/Documentation/driver-api/acpi/linuxized-acpica.rst
@@ -1,31 +1,37 @@
+.. SPDX-License-Identifier: GPL-2.0
+.. include:: <isonum.txt>
+
+============================================================
Linuxized ACPICA - Introduction to ACPICA Release Automation
+============================================================
-Copyright (C) 2013-2016, Intel Corporation
-Author: Lv Zheng <[email protected]>
+:Copyright: |copy| 2013-2016, Intel Corporation
+:Author: Lv Zheng <[email protected]>

This diff is incomplete. Download the complete patch.

Documentation/driver-api/acpi/scan_handlers.rst

View file

This diff is incomplete. Download the complete patch.

Documentation/driver-api/index.rst

View file

This diff is incomplete. Download the complete patch.

Documentation/firmware-guide/acpi/DSD-properties-rules.rst

View file

This diff is incomplete. Download the complete patch.

Documentation/firmware-guide/acpi/acpi-lid.rst

View file

This diff is incomplete. Download the complete patch.

Documentation/firmware-guide/acpi/aml-debugger.rst

View file

This diff is incomplete. Download the complete patch.

Documentation/firmware-guide/acpi/apei/einj.rst

View file

This diff is incomplete. Download the complete patch.

Documentation/firmware-guide/acpi/apei/output_format.rst

View file

This diff is incomplete. Download the complete patch.

Documentation/firmware-guide/acpi/debug.rst

View file

This diff is incomplete. Download the complete patch.

Documentation/firmware-guide/acpi/dsd/data-node-references.rst

View file

This diff is incomplete. Download the complete patch.

Documentation/firmware-guide/acpi/dsd/graph.rst

View file

This diff is incomplete. Download the complete patch.

Documentation/firmware-guide/acpi/enumeration.rst

View file

This diff is incomplete. Download the complete patch.

Documentation/firmware-guide/acpi/gpio-properties.rst

View file

This diff is incomplete. Download the complete patch.

Documentation/firmware-guide/acpi/i2c-muxes.rst

View file

This diff is incomplete. Download the complete patch.

Documentation/firmware-guide/acpi/index.rst

View file

This diff is incomplete. Download the complete patch.

Documentation/firmware-guide/acpi/lpit.rst

View file

This diff is incomplete. Download the complete patch.

Documentation/firmware-guide/acpi/method-customizing.rst

View file

This diff is incomplete. Download the complete patch.

Documentation/firmware-guide/acpi/method-tracing.rst

View file

This diff is incomplete. Download the complete patch.

Documentation/firmware-guide/acpi/namespace.rst

View file

This diff is incomplete. Download the complete patch.

Documentation/firmware-guide/acpi/osi.rst

View file

This diff is incomplete. Download the complete patch.

Documentation/firmware-guide/acpi/video_extension.rst

View file

This diff is incomplete. Download the complete patch.

Documentation/firmware-guide/index.rst

View file

This diff is incomplete. Download the complete patch.

Documentation/index.rst

View file

This diff is incomplete. Download the complete patch.

MAINTAINERS

View file

This diff is incomplete. Download the complete patch.

arch/x86/boot/compressed/acpi.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpi_configfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpi_dbg.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpi_lpat.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpi_lpss.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/aclocal.h

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/dbexec.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/dbnames.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/dsinit.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/evgpeinit.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/exnames.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/nsaccess.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/nsalloc.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/nsdump.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/nsinit.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/nsnames.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/nsparse.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/nsrepair.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/nsrepair2.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/nsutils.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/nsxfname.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/psargs.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/rsxface.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/tbdata.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/tbfind.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/tbinstal.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/tbprint.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/tbutils.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/tbxface.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/tbxfload.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/utascii.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/utdecode.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/utmisc.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/utpredef.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/acpica/utstring.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/button.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/cppc_acpi.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/device_pm.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/dptf/dptf_power.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/event.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/power.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/pptt.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/scan.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/spcr.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/sysfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/tables.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/utils.c

View file

This diff is incomplete. Download the complete patch.

drivers/acpi/video_detect.c

View file

This diff is incomplete. Download the complete patch.

drivers/extcon/extcon-axp288.c

View file

This diff is incomplete. Download the complete patch.

drivers/firmware/iscsi_ibft.c

View file

This diff is incomplete. Download the complete patch.

drivers/gpio/gpio-merrifield.c

View file

This diff is incomplete. Download the complete patch.

drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.c

View file

This diff is incomplete. Download the complete patch.

include/acpi/acpi_bus.h

View file

This diff is incomplete. Download the complete patch.

include/acpi/acpixf.h

View file

This diff is incomplete. Download the complete patch.

include/acpi/actbl.h

View file

This diff is incomplete. Download the complete patch.

include/acpi/actypes.h

View file

This diff is incomplete. Download the complete patch.

include/linux/acpi.h

View file

This diff is incomplete. Download the complete patch.

sound/soc/intel/boards/bytcht_da7213.c

View file

This diff is incomplete. Download the complete patch.

sound/soc/intel/boards/bytcht_es8316.c

View file

This diff is incomplete. Download the complete patch.

sound/soc/intel/boards/bytcr_rt5640.c

View file

This diff is incomplete. Download the complete patch.

sound/soc/intel/boards/bytcr_rt5651.c

View file

This diff is incomplete. Download the complete patch.

sound/soc/intel/boards/cht_bsw_rt5645.c

View file

This diff is incomplete. Download the complete patch.

sound/soc/intel/boards/cht_bsw_rt5672.c

View file

This diff is incomplete. Download the complete patch.

tools/power/acpi/os_specific/service_layers/oslinuxtbl.c

View file

This diff is incomplete. Download the complete patch.

tools/power/acpi/tools/acpidump/apdump.c

View file

This diff is incomplete. Download the complete patch.

tools/power/acpi/tools/acpidump/apfiles.c

View file

This diff is incomplete. Download the complete patch.