Skip to content

Introduce ACPI _DSM helper functions to simplify code

Jiang Liu dri-devel intel-gfx linux-acpi linux-input linux-pci lkml 2 versions – Applied

Status from this message: I've queued up the entire series for 3.14, thanks a lot!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest13 patches 5 repliesApplied
  2. v1 RFC13 patches 1 replySuperseded

Changes in v2 from the cover letter

1) fix an issue in initializing acpi_object structure

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/13ACPI: introduce helper interfaces to support ACPI _DSM methoddrivers/acpi/utils.c include/acpi/acpi_bus.h+124 -00 replies
2/13ACPI, extlog: replace open-coded _DSM specific code with helper functionsdrivers/acpi/acpi_extlog.c+12 -491 reply
3/13PCI, pci-label: release allocated ACPI object on error recovery pathdrivers/pci/pci-label.c+4 -82 replies
4/13ACPI, PCI: replace open-coded _DSM specific code with helper functionsdrivers/pci/pci-label.c+34 -870 replies
5/13PCI, pci-label: treat PCI label with index 0 as valid labeldrivers/pci/pci-label.c+18 -160 replies
6/13ACPI, TPM: fix memory leak when walking ACPI namespacedrivers/char/tpm/tpm_ppi.c+9 -60 replies
7/13ACPI, TPM: matching node name instead of full path when searching for TPM devicedrivers/char/tpm/tpm_ppi.c+1 -10 replies
8/13ACPI, TPM: replace open-coded _DSM specific code with helper functionsdrivers/char/tpm/tpm_ppi.c+145 -2590 replies
9/13ACPI, TPM: detecting PPI features by checking availability of _DSM functionsdrivers/char/tpm/tpm_ppi.c+19 -260 replies
10/13ACPI, i2c-hid: replace open-coded _DSM specific code with helper functionsdrivers/hid/i2c-hid/i2c-hid.c+6 -200 replies
11/13ACPI, i915: replace open-coded _DSM specific code with helper functionsdrivers/gpu/drm/i915/intel_acpi.c+30 -1140 replies
12/13nouveau: fix memory leak in ACPI _DSM related codedrivers/gpu/drm/nouveau/nouveau_acpi.c+4 -10 replies
13/13ACPI, nouveau: replace open-coded _DSM specific code with helper functionsdrivers/gpu/drm/nouveau/core/subdev/mxm/base.c drivers/gpu/drm/nouveau/nouveau_acpi.c+54 -1330 replies

Reviews trailers per patch

2 of 13 patches have a Reviewed-by or Acked-by.

PatchDaniel VetterChen, Gong
1/13
2/13T-b R-b
3/13
4/13
5/13
6/13
7/13
8/13
9/13
10/13
11/13A-b
12/13
13/13

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [Patch v2 00/13] Introduce ACPI _DSM helper functions to simplify code

There are several drivers making use of ACPI _DSM method to detect and invoke device specific methods. Currently every driver has implemented its private version to support ACPI _DSM method. So this patch introduces three helper functions to support ACPI _DSM method, which will be used to replace open-coded versions. It helps to simplify code and improve code readability.

It also includes some bugfixes for TPM/nouveau drivers.

It applies to the mainstream kernel on top of
b0031f2 Merge tag 's2mps11-build' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Due to lacking of hardware platform, I have only tested the ACPI _DSM helper functions and TPM related changes, but haven't tested changes to other drivers yet. So appreciate help to review and test these patches.

V1->V2
1) fix an issue in initializing acpi_object structure

Jiang Liu (13):
ACPI: introduce helper interfaces to support ACPI _DSM method ACPI, extlog: replace open-coded _DSM specific code with helper
functions
PCI, pci-label: release allocated ACPI object on error recovery path ACPI, PCI: replace open-coded _DSM specific code with helper
functions
PCI, pci-label: treat PCI label with index 0 as valid label ACPI, TPM: fix memory leak when walking ACPI namespace ACPI, TPM: matching node name instead of full path when searching for
TPM device
ACPI, TPM: replace open-coded _DSM specific code with helper
functions
ACPI, TPM: detecting PPI features by checking availability of _DSM
functions
ACPI, i2c-hid: replace open-coded _DSM specific code with helper
functions
ACPI, i915: replace open-coded _DSM specific code with helper
functions
nouveau: fix memory leak in ACPI _DSM related code
ACPI, nouveau: replace open-coded _DSM specific code with helper
functions

 drivers/acpi/acpi_extlog.c                     |   61 +---
 drivers/acpi/utils.c                           |   98 ++++++
 drivers/char/tpm/tpm_ppi.c                     |  406 +++++++++---------------
 drivers/gpu/drm/i915/intel_acpi.c              |  144 ++-------
 drivers/gpu/drm/nouveau/core/subdev/mxm/base.c |   48 +--
 drivers/gpu/drm/nouveau/nouveau_acpi.c         |  134 +++-----
 drivers/hid/i2c-hid/i2c-hid.c                  |   26 +-
 drivers/pci/pci-label.c                        |  129 +++-----
 include/acpi/acpi_bus.h                        |   26 ++
 9 files changed, 406 insertions(+), 666 deletions(-)
Signature · 1 line
1.7.10.4