[RFC PATCH 00/15] ACPICA: Add CONFIG_ACPI=n build support for ACPICA header files.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux