Skip to content

ACPI AML helper conversion

Zhang Rui intel-gfx linux-acpi linux-pm platform-driver-x86 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest27 patches 10 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/27olpc_xo15_sci: convert acpi_evaluate_object() to acpi_execute_simple_method()arch/x86/platform/olpc/olpc-xo15-sci.c+1 -80 replies
2/27gpiolib-acpi: convert acpi_evaluate_object() to acpi_execute_simple_method()drivers/gpio/gpiolib-acpi.c+1 -83 replies
3/27eeepc-laptop: convert acpi_evaluate_object() to acpi_execute_simple_method()drivers/platform/x86/eeepc-laptop.c+1 -70 replies
4/27fujitsu-laptop: convert acpi_evaluate_object() to acpi_execute_simple_method()drivers/platform/x86/fujitsu-laptop.c+2 -91 reply
5/27intel-rst: convert acpi_evaluate_object() to acpi_execute_simple_method()drivers/platform/x86/intel-rst.c+2 -180 replies
6/27intel-smartconnect: convert acpi_evaluate_object() to acpi_execute_simple_method()drivers/platform/x86/intel-smartconnect.c+1 -100 replies
7/27topstar-laptop: convert acpi_evaluate_object() to acpi_execute_simple_method()drivers/platform/x86/topstar-laptop.c+2 -60 replies
8/27toshiba_acpi: convert acpi_evaluate_object() to acpi_execute_simple_method()drivers/platform/x86/toshiba_acpi.c+1 -80 replies
9/27wmi: convert acpi_evaluate_object() to acpi_execute_simple_method()drivers/platform/x86/wmi.c+6 -190 replies
10/27pcc_freq: convert acpi_get_handle() to acpi_has_method()drivers/cpufreq/pcc-cpufreq.c+2 -30 replies
11/27i915: intel_acpi: convert acpi_get_handle() to acpi_has_method()drivers/gpu/drm/i915/intel_acpi.c+2 -41 reply
12/27nouveau_acpi: convert acpi_get_handle() to acpi_has_method()drivers/gpu/drm/nouveau/nouveau_acpi.c+2 -50 replies
13/27acpi_pcihp: convert acpi_get_handle() to acpi_has_method()drivers/pci/hotplug/acpi_pcihp.c+2 -50 replies
14/27pci-acpi: convert acpi_get_handle() to acpi_has_method()drivers/pci/pci-acpi.c+1 -20 replies
15/27fujitsu-laptop: convert acpi_get_handle() to acpi_has_method()drivers/platform/x86/fujitsu-laptop.c+4 -91 reply
16/27intel_menlow: convert acpi_get_handle() to acpi_has_method()drivers/platform/x86/intel_menlow.c+2 -60 replies
17/27sony-laptop: convert acpi_get_handle() to acpi_has_method()drivers/platform/x86/sony-laptop.c+9 -190 replies
18/27toshiba_acpi: convert acpi_get_handle() to acpi_has_method()drivers/platform/x86/toshiba_acpi.c+6 -150 replies
19/27wmi: convert acpi_get_handle() to acpi_has_method()drivers/platform/x86/wmi.c+2 -30 replies
20/27pnpacpi: convert acpi_get_handle() to acpi_has_method()drivers/pnp/pnpacpi/core.c+3 -80 replies
21/27acpi_processor: convert acpi_evaluate_object() to acpi_evaluate_integer()drivers/acpi/acpi_processor.c+3 -30 replies
22/27ACPI: dock: convert acpi_evaluate_object() to acpi_evaluate_integer()drivers/acpi/dock.c+2 -40 replies
23/27i2c-hid: convert acpi_evaluate_object() to acpi_evaluate_integer()drivers/hid/i2c-hid/i2c-hid.c+5 -132 replies
24/27fujitsu-laptop: convert acpi_evaluate_object() to acpi_evaluate_integer()drivers/platform/x86/fujitsu-laptop.c+4 -161 reply
25/27intel-rst: convert acpi_evaluate_object() to acpi_evaluate_integer()drivers/platform/x86/intel-rst.c+6 -220 replies
26/27intel-smartconnect: convert acpi_evaluate_object() to acpi_evaluate_integer()drivers/platform/x86/intel-smartconnect.c+3 -130 replies
27/27toshiba_acpi: convert acpi_evaluate_object() to acpi_evaluate_integer()drivers/platform/x86/toshiba_acpi.c+5 -90 replies

Reviews trailers per patch

6 of 27 patches have a Reviewed-by or Acked-by.

PatchMika WesterbergMathias NymanJonathan WoitheJiri KosinaBenjamin TissoiresDaniel Vetter
1/27
2/27A-b A-b
3/27
4/27A-b
5/27
6/27
7/27
8/27
9/27
10/27
11/27A-b
12/27
13/27
14/27
15/27A-b
16/27
17/27
18/27
19/27
20/27
21/27
22/27
23/27A-b A-b
24/27A-b
25/27
26/27
27/27

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 6 reviewers.

Read the v1 thread

Cover letter [PATCH 00/27] ACPI AML helper conversion

Hi, all,

ACPI has some fine grained helpers for evaluating AML, which can be used to simplify the code a lot.
And there are a couple of new helpers introduced recently, say, acpi_has_method/acpi_execute_simple_method, etc.

This patch set does some cleanup and converts the code to use the AML helpers when possible.

Patch 01/27 ~ Patch 09/27:
converts acpi_evaluate_object() to acpi_execute_simple_method() Patch 10/27 ~ Patch 20/27:
converts acpi_get_handle() to acpi_has_method()
Patch 21/27 ~ Patch 27/27:
converts acpi_evaluate_object() to acpi_evaluate_integer()

Given that there is no functional change in this patch set, and most of the patches are not able for me to test as they are platform driver changes, I just did build test and reboot with acpi_processor, i915 driver loaded on an Lenovo Ultrabook, and everything works well.

Drivers that I've compiled in my build test,
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_DOCK=y
CONFIG_X86_PCC_CPUFREQ=y
CONFIG_GPIO_ACPI=y
CONFIG_DRM_I915=m
CONFIG_DRM_NOUVEAU=m
ONFIG_I2C_HID=m
CONFIG_HOTPLUG_PCI=y
CONFIG_EEEPC_LAPTOP=y
CONFIG_FUJITSU_LAPTOP=y
CONFIG_INTEL_RST=m
CONFIG_INTEL_SMARTCONNECT=y
CONFIG_INTEL_MENLOW=y
CONFIG_SONY_LAPTOP=y
CONFIG_TOPSTAR_LAPTOP=y
CONFIG_ACPI_TOSHIBA=y
CONFIG_ACPI_WMI=y
CONFIG_PNPACPI=y

Any comments are welcome. :)

thanks,
rui

------------------------------------------------------------------------

 arch/x86/platform/olpc/olpc-xo15-sci.c    |  9 +--------
 drivers/acpi/acpi_processor.c             |  6 +++---
 drivers/acpi/dock.c                       |  6 ++----
 drivers/cpufreq/pcc-cpufreq.c             |  5 ++---
 drivers/gpio/gpiolib-acpi.c               | 11 ++---------
 drivers/gpu/drm/i915/intel_acpi.c         |  5 ++---
 drivers/gpu/drm/nouveau/nouveau_acpi.c    |  6 ++----
 drivers/hid/i2c-hid/i2c-hid.c             | 16 ++++------------
 drivers/pci/hotplug/acpi_pcihp.c          |  7 ++-----
 drivers/pci/pci-acpi.c                    |  3 +--
 drivers/platform/x86/eeepc-laptop.c       |  8 +-------
 drivers/platform/x86/fujitsu-laptop.c     | 42 +++++++++---------------------------------
 drivers/platform/x86/intel-rst.c          | 48 ++++++++----------------------------------------
 drivers/platform/x86/intel-smartconnect.c | 27 ++++-----------------------
 drivers/platform/x86/intel_menlow.c       |  7 ++-----
 drivers/platform/x86/sony-laptop.c        | 28 +++++++++-------------------
 drivers/platform/x86/topstar-laptop.c     |  8 ++------
 drivers/platform/x86/toshiba_acpi.c       | 44 ++++++++++++--------------------------------
 drivers/platform/x86/wmi.c                | 30 ++++++++----------------------
 drivers/pnp/pnpacpi/core.c                | 10 +++-------
 20 files changed, 79 insertions(+), 247 deletions(-)