linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 00/15] ACPICA: Add CONFIG_ACPI=n build support for ACPICA header files.
@ 2013-12-18  9:05 Lv Zheng
  2013-12-18  9:05 ` [RFC PATCH 01/15] ACPICA: OSL: Add configurability mechanism for global variables Lv Zheng
                   ` (17 more replies)
  0 siblings, 18 replies; 50+ messages in thread
From: Lv Zheng @ 2013-12-18  9:05 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown; +Cc: Lv Zheng, Lv Zheng, linux-kernel, linux-acpi

Currently, there are issues in the ACPI subsystem:

1. ACPICA header files are lacking in stub protections.
   This makes all ACPICA header files could only be included for
   CONFIG_ACPI=y environment.  This infects new ACPI prototypes, if such
   prototypes referenced ACPICA defined types, they must be incldued only
   in the CONFIG_ACPI=y environment.  While CONFIG_SFI requires to include
   ACPICA headers to find generic table definitions when CONFIG_ACPI is not
   enabled.  This seems to be too complicated to achieve a cleaned SFI
   header.  So please check if this solution is acceptable.  And this patch
   set is thus marked as RFC.
2. ACPICA layer is lacking in its own architecture specific layer.
   The file <asm/acpi.h> now is used as architecture specific layer of both
   in kernel ACPICA and Linux ACPI.  While Linux ACPI headers are always
   need to include ACPICA top level header <acpi/acpi.h> to find ACPICA
   defined types before including their own architecture specific layer.
   The mis-order of header inclusion will potentially infect
   arch/x86/include/asm folder, and defining prototypes using ACPICA types
   in <asm/acpi.h> is not possible.

This patchset solves above issues to make ACPICA a law-abiding resident in
the Linux kernel.

The benefits of merging this series are:
1. We can sort all direct <acpi/acpi.h> inclusions from subsystems other
   than ACPICA out from the entire kernel source tree.
2. We are able to kill many "#ifdef CONFIG_ACPI" code from other kernel
   subsystems.
3. Using ACPICA types in <asm/acpi.h> is possible.

PATCH 01-13 add stub protections for ACPICA headers.
      01-02 add stub support for ACPICA global variables
      03    add stub support for ACPICA OSL prototypes
      04    add stub support for ACPICA macros
      05-09 add stub support for ACPICA external functions
      10-13 remove <asm/acpi.h> inclusion from ACPICA headers.
PATCH 14-15 remove wrong direct <acpi/acpi.h> inclusions.

NOTE: PATCH 01-08 are linuxized ACPICA commits, it is better to merge them
      into the ACPICA upstream first and integrate them into Linux during
      ACPICA release process.  Or the divergences generated by this series
      may hurt ACPICA release automation.

The patch set has passed a build/boot test on the following machines:
Dell Inspiron Mini 1010 (i386)
HP Compaq 8200 Elite SFF PC (x86-64)
With the following kernel configuration items enabled:
  All drivers/acpi configurations
  All platform drivers
  All ACPI drivers
  4 DRM drivers that implement ACPI opregion
  All buses with ACPI bindings
  All cpufreq configurations
  All xen configurations
  All ACPI table drivers
They are tested twice with CONFIG_ACPI enabled/disabled.

Also allyes/allno/allmod tests are done for ARCH=i386 and ARCH=x86_64.

A boot test has been done to ARCH=x86_64 default configuration and it is
confirmed that the ACPI devices are successfully created under
/sys/bus/acpi/devices when CONFIG_ACPI is enabled.

Another test is to compose a .c file invoking all ACPICA globals,
functions, macros and built it with and without CONFIG_ACPI enabled.

Lv Zheng (15):
  ACPICA: OSL: Add configurability mechanism for global variables.
  ACPICA: Linux: Add configurability for external globals.
  ACPICA: Linux: Add configurability for OSL APIs.
  ACPICA: OSL: Cleanup external macros and add stubs for macros.
  ACPICA: OSL: Add configurability to error message functions.
  ACPICA: OSL: Add configurability to debug output functions.
  ACPICA: OSL: Add configurability mechanism for external APIs.
  ACPICA: OSL: Updates ACPI_EXTERNAL_RETURN_x usages for external APIs.
  ACPICA: Linux: Add stub support for Linux specific variables and
    functions.
  ACPICA: Linux: Add architecture specific ACPICA headers in Linux.
  ACPICA: Linux: Add stub implementation of ACPICA 64-bit mathematics.
  ACPICA: Linux: Add configuration item to indicate the architecture
    specific support.
  ACPICA: Linux: Remove <asm/acpi.h> inclusion from ACPICA headers.
  ACPI/SFI: Fix wrong <acpi/acpi.h> inclusion in SFI/ACPI wrapper -
    table definitions.
  ACPI/thinkpad: Fix wrong <acpi/acpi.h> inclusion in Thinkpad ACPI
    users.

 arch/ia64/Kconfig                    |    1 +
 arch/ia64/include/asm/acenv.h        |   73 ++++
 arch/ia64/include/asm/acpi.h         |   50 ---
 arch/ia64/kernel/acpi.c              |    1 -
 arch/x86/Kconfig                     |    1 +
 arch/x86/include/asm/acenv.h         |   70 +++
 arch/x86/include/asm/acpi.h          |   45 --
 arch/x86/kernel/acpi/boot.c          |    1 -
 drivers/acpi/Kconfig                 |    4 +
 drivers/acpi/acpica/acglobal.h       |  123 ------
 drivers/acpi/acpica/utglobal.c       |    6 -
 drivers/acpi/acpica/utxferror.c      |    2 +
 drivers/acpi/bus.c                   |    3 -
 drivers/platform/x86/thinkpad_acpi.c |    1 -
 include/acpi/acpixf.h                |  782 +++++++++++++++++++++++-----------
 include/acpi/actypes.h               |   21 +
 include/acpi/platform/aclinux.h      |  182 +++++++-
 include/linux/acpi.h                 |   13 +-
 include/linux/acpica.h               |   22 +
 include/linux/sfi_acpi.h             |    3 -
 include/linux/thinkpad_acpi.h        |    2 +
 sound/pci/hda/patch_conexant.c       |    1 -
 sound/pci/hda/patch_realtek.c        |    1 -
 23 files changed, 910 insertions(+), 498 deletions(-)
 create mode 100644 arch/ia64/include/asm/acenv.h
 create mode 100644 arch/x86/include/asm/acenv.h
 create mode 100644 include/linux/acpica.h

-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 50+ messages in thread

end of thread, other threads:[~2014-07-23  3:54 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-18  9:05 [RFC PATCH 00/15] ACPICA: Add CONFIG_ACPI=n build support for ACPICA header files Lv Zheng
2013-12-18  9:05 ` [RFC PATCH 01/15] ACPICA: OSL: Add configurability mechanism for global variables Lv Zheng
2013-12-18  9:06 ` [RFC PATCH 02/15] ACPICA: Linux: Add configurability for external globals Lv Zheng
2013-12-18  9:06 ` [RFC PATCH 03/15] ACPICA: Linux: Add configurability for OSL APIs Lv Zheng
2013-12-18  9:06 ` [RFC PATCH 04/15] ACPICA: OSL: Cleanup external macros and add stubs for macros Lv Zheng
2013-12-18  9:06 ` [RFC PATCH 05/15] ACPICA: OSL: Add configurability to error message functions Lv Zheng
2013-12-18  9:06 ` [RFC PATCH 06/15] ACPICA: OSL: Add configurability to debug output functions Lv Zheng
2013-12-18  9:06 ` [RFC PATCH 07/15] ACPICA: OSL: Add configurability mechanism for external APIs Lv Zheng
2013-12-18  9:06 ` [RFC PATCH 08/15] ACPICA: OSL: Updates ACPI_EXTERNAL_RETURN_x usages " Lv Zheng
2013-12-18  9:06 ` [RFC PATCH 09/15] ACPICA: Linux: Add stub support for Linux specific variables and functions Lv Zheng
2013-12-18  9:06 ` [RFC PATCH 10/15] ACPICA: Linux: Add architecture specific ACPICA headers in Linux Lv Zheng
2013-12-18  9:06 ` [RFC PATCH 11/15] ACPICA: Linux: Add stub implementation of ACPICA 64-bit mathematics Lv Zheng
2013-12-18  9:07 ` [RFC PATCH 12/15] ACPICA: Linux: Add configuration item to indicate the architecture specific support Lv Zheng
2013-12-18  9:07 ` [RFC PATCH 13/15] ACPICA: Linux: Remove <asm/acpi.h> inclusion from ACPICA headers Lv Zheng
2013-12-18  9:07 ` [RFC PATCH 14/15] ACPI/SFI: Fix wrong <acpi/acpi.h> inclusion in SFI/ACPI wrapper - table definitions Lv Zheng
2013-12-18  9:07 ` [RFC DBG PATCH] ACPICA: Add CONFIG_ACPI=n build test support Lv Zheng
2013-12-18 11:41   ` [RFC PATCH 15/15] ACPI/thinkpad: Fix wrong <acpi/acpi.h> inclusion in Thinkpad ACPI users Henrique de Moraes Holschuh
2013-12-18 13:06     ` [alsa-devel] " Takashi Iwai
2013-12-20  0:28       ` Zheng, Lv
2013-12-20  6:52         ` Takashi Iwai
2013-12-20  8:30 ` [UPDATE RFC " Lv Zheng
2013-12-20  9:15   ` Takashi Iwai
2014-07-07  4:16 ` [PATCH v2 0/7] ACPICA: Enable ACPICA prototypes for CONFIG_ACPI=n builds Lv Zheng
2014-07-07  4:17   ` [PATCH v2 1/7] ACPICA: Linux: Add stub support for Linux specific variables and functions Lv Zheng
2014-07-07  4:17   ` [PATCH v2 2/7] ACPICA: Linux: Add stub implementation of ACPICA 64-bit mathematics Lv Zheng
2014-07-07  4:17   ` [PATCH v2 3/7] ACPICA: Linux: Add configuration item to indicate the architecture specific support Lv Zheng
2014-07-07  4:17   ` [PATCH v2 4/7] ACPICA: Linux: Allow ACPICA inclusion for CONFIG_ACPI=n builds Lv Zheng
2014-07-07  4:17   ` [PATCH v2 5/7] ACPI/SFI: Fix wrong <acpi/acpi.h> inclusion in SFI/ACPI wrapper - table definitions Lv Zheng
2014-07-07 21:25     ` Rafael J. Wysocki
2014-07-08  0:08       ` Zheng, Lv
2014-07-07  4:17   ` [PATCH v2 6/7] ACPI: Cleanup useless ACPI inclusion Lv Zheng
2014-07-07 21:24     ` Rafael J. Wysocki
2014-07-08  0:05       ` Zheng, Lv
2014-07-07  4:17   ` [PATCH v2 7/7] ACPI: Add support to force header inclusion rules for <acpi/acpi.h> Lv Zheng
2014-07-16  8:57 ` [PATCH v3 0/7] ACPICA: Enable ACPICA prototypes for CONFIG_ACPI=n builds Lv Zheng
2014-07-16  8:57   ` [PATCH v3 1/7] ACPICA: Linux: Add stub support for Linux specific variables and functions Lv Zheng
2014-07-16  8:58   ` [PATCH v3 2/7] ACPICA: Linux: Add stub implementation of ACPICA 64-bit mathematics Lv Zheng
2014-07-19 23:46     ` Rafael J. Wysocki
2014-07-21  1:26       ` Zheng, Lv
2014-07-22 23:42         ` Rafael J. Wysocki
2014-07-16  8:58   ` [PATCH v3 3/7] ACPICA: Linux: Add support to exclude <asm/acenv.h> inclusion Lv Zheng
2014-07-16  8:58   ` [PATCH v3 4/7] ACPICA: Linux: Allow ACPICA inclusion for CONFIG_ACPI=n builds Lv Zheng
2014-07-16  8:58   ` [PATCH v3 5/7] ACPI/SFI: Fix wrong <acpi/acpi.h> inclusion in SFI/ACPI wrapper - table definitions Lv Zheng
2014-07-16  8:58   ` [PATCH v3 6/7] ACPI: Add support to force header inclusion rules for <acpi/acpi.h> Lv Zheng
2014-07-23  3:53     ` Hanjun Guo
2014-07-16  8:59   ` [PATCH v3 7/7] ACPI: Cleanup useless ACPI inclusion Lv Zheng
2014-07-16 12:07     ` Mark Brown
2014-07-16 21:46       ` Rafael J. Wysocki
2014-07-16 21:34         ` Mark Brown
2014-07-17  1:29           ` Zheng, Lv

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).