From mboxrd@z Thu Jan 1 00:00:00 1970 From: Len Brown Subject: [Fwd: [PATCH][RFC] Clean up Kconfig logic for IA64 ACPI] Date: 01 Nov 2003 21:48:52 -0500 Sender: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Message-ID: <1067741332.2724.3.camel@dhcppc4> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-j4hBRen0UcKO14ABBXay" Return-path: Errors-To: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: Luming Yu Cc: ACPI Developers List-Id: linux-acpi@vger.kernel.org --=-j4hBRen0UcKO14ABBXay Content-Type: text/plain Content-Transfer-Encoding: 7bit Luming, Please review and comment. thanks, -Len --=-j4hBRen0UcKO14ABBXay Content-Disposition: inline Content-Description: Forwarded message - [PATCH][RFC] Clean up Kconfig logic for IA64 ACPI Content-Type: message/rfc822 Received: from fmsmsx312.amr.corp.intel.com ([132.233.42.227]) by hdsmsx402.amr.corp.intel.com with Microsoft SMTPSVC(5.0.2195.5329); Sat, 1 Nov 2003 19:37:57 -0500 Received: from fmsmsx332.amr.corp.intel.com ([132.233.42.148]) by fmsmsx312.amr.corp.intel.com with Microsoft SMTPSVC(5.0.2195.5329); Sat, 1 Nov 2003 16:37:56 -0800 MIME-Version: 1.0 Received: from fmsmsxv041-1.fm.intel.com ([132.233.42.126]) by fmsmsx332.amr.corp.intel.com with Microsoft SMTPSVC(5.0.2195.5329); Sat, 1 Nov 2003 16:37:56 -0800 Received: from petasus.fm.intel.com ([10.1.192.37]) by fmsmsxv041-1.fm.intel.com (NAVGW 2.5.2.11) with SMTP id M2003110116375515052 for ; Sat, 01 Nov 2003 16:37:55 -0800 X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 Received: from hermes-pilot.fm.intel.com (hermes-pilot.fm.intel.com [10.1.193.42]) by petasus.fm.intel.com (8.11.6-20030918-01/8.11.6/d: inner.mc,v 1.35 2003/05/22 21:18:01 rfjohns1 Exp $) with ESMTP id hA20TQD29810 for ; Sun, 2 Nov 2003 00:29:26 GMT Received: from vger.kernel.org (vger.kernel.org [67.72.78.212]) by hermes-pilot.fm.intel.com (8.12.9-20030918-01/8.11.6/d: major-outer.mc,v 1.5 2003/10/14 22:30:27 root Exp $) with ESMTP id hA20XHYD006194 for ; Sun, 2 Nov 2003 00:33:23 GMT Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org via listexpand id S261298AbTKBAfh (ORCPT ); Sat, 1 Nov 2003 19:35:37 -0500 Received: (majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org) by vger.kernel.org id S261299AbTKBAfh (ORCPT ); Sat, 1 Nov 2003 19:35:37 -0500 Received: from SteeleMR-loadb-NAT-49.caltech.edu ([131.215.49.69]:24437 "EHLO earth-ox.its.caltech.edu") by vger.kernel.org with ESMTP id S261298AbTKBAfN (ORCPT ); Sat, 1 Nov 2003 19:35:13 -0500 Received: from water-dog (water-dog [192.168.1.26]) by earth-ox-postvirus (Postfix) with ESMTP id CD138109A16; Sat, 1 Nov 2003 16:35:12 -0800 (PST) Received: from water-ox ([192.168.1.10]) by water-dog (MailMonitor for SMTP v1.2.2 ) ; Sat, 1 Nov 2003 16:35:11 -0800 (PST) Received: from sue.its.caltech.edu (sue.its.caltech.edu [131.215.48.175]) by water-ox.its.caltech.edu (Postfix) with ESMTP id 9FD5126AC3E; Sat, 1 Nov 2003 16:35:11 -0800 (PST) Received: from localhost (noah@localhost) by sue.its.caltech.edu (8.12.9/8.12.8) with ESMTP id hA20ZBkI011573; Sat, 1 Nov 2003 16:35:11 -0800 (PST) content-class: urn:content-classes:message Subject: [PATCH][RFC] Clean up Kconfig logic for IA64 ACPI Date: Sat, 1 Nov 2003 19:35:11 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH][RFC] Clean up Kconfig logic for IA64 ACPI Thread-Index: AcOg2Y/oBzwuVMGbRL+SfcKfFMVMIw== From: "Noah J. Misch" Sender: To: Cc: , Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 7bit [PATCH][RFC] Clean up Kconfig logic for IA64 ACPI

Greetings,

I found the Kconfig logic for ACPI and IA64, as defined in arch/ia64/Kconfig and
drivers/acpi/Kconfig to be a bit redundant and hard to follow.  It appears to do
the following:

1) Set ACPI=y, ACPI_INTERPRETER=y, ACPI_EFI=y, and ACPI_KERNEL_CONFIG=y if and
only if not configuring for the HP simulator (arch/ia64/Kconfig).

2) Show the configs in drivers/acpi/Kconfig unless configuring for the HP
simulator (arch/IA64/Kconfig).

3) Set ACPI_BOOT=y under the same conditions as #1 (drivers/acpi/Kconfig).

4) Set ACPI_INTERPRETER=y if and only if !IA64_SGI_SN (drivers/acpi/Kconfig).

5) Automatically set or allow a number of specific ACPI options if
ACPI_INTERPRETER but not IA64_SGI_SN (drivers/acpi/Kconfig).

6) Set ACPI_EFI=y if ACPI_INTERPRETER (drivers/acpi/Kconfig).

There's a fair amount of textual and logical redundancy there, as well as
dependencies on and selections of obsolete options.  This had even caused
compilation failures in certain corner cases.  This patch corrects that:

1) Remove the copies of ACPI, ACPI_INTERPRETER, and ACPI_EFI from
arch/ia64/Kconfig and instead make IA64 select ACPI unless configuring for the
HP simulator.

2) Delete ACPI_KERNEL_CONFIG from arch/ia64/Kconfig.  It no longer affects any
part of the kernel, and it appears as though ACPI_BOOT has fully superseded it.

3) Remove all dependencies in drivers/acpi/Kconfig that reference IA64_SGI_SN.
That option no longer exists, and even if it did, only ACPI_INTERPRETER need
depend on it, and the rest of the options it currently guards would follow suit.

I have compiled a wide variety of IA64 kernels with this patch applied, so I am
fairly confident that it is not introducing new problems.  The patch applies to
linux-2.5 BK and linux-ia64-2.5 BK as of 2003-11-02 at 0000 UTC.

This should not change any user-visible configuration semantics.  Indeed, the
only user-visible change is the visible defaulting of ACPI.  Please let me know
what you think.  I consider this 2.7 material.

Thanks,
Noah

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#                  ChangeSet    1.1296.83.15 -> 1.1296.83.16
#          arch/ia64/Kconfig    1.46    -> 1.47
#       drivers/acpi/Kconfig    1.26    -> 1.27
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/10/27      noah-7GExONQZ6ZKVc3sceRu5cw@public.gmane.org        1.1296.83.16
# Merge ACPI Kconfig entries from arch/ia64/Kconfig into drivers/acpi/Kconfig.
# Eliminate references to obsolete ACPI_KERNEL_CONFIG and IA64_SGI_SN config
# variables.  Add help text to ACPI_BOOT, for the benefit of developers
# perusing drivers/acpi/Kconfig.
# --------------------------------------------
#
diff -Nru a/arch/ia64/Kconfig b/arch/ia64/Kconfig
--- a/arch/ia64/Kconfig Sat Nov  1 14:43:25 2003
+++ b/arch/ia64/Kconfig Sat Nov  1 14:43:25 2003
@@ -11,6 +11,7 @@

 config IA64
        bool
+       select ACPI if !IA64_HP_SIM
        default y
        help
          The Itanium Processor Family is Intel's 64-bit successor to
@@ -130,57 +131,6 @@
        bool "64KB"

 endchoice
-
-config ACPI
-       bool
-       depends on !IA64_HP_SIM
-       default y
-       ---help---
-         ACPI/OSPM support for Linux is currently under development. As such,
-         this support is preliminary and EXPERIMENTAL.  Configuring ACPI
-         support enables kernel interfaces that allow higher level software
-         (OSPM) to manipulate ACPI defined hardware and software interfaces,
-         including the evaluation of ACPI control methods.  If unsure, choose
-         N here.  Note, this option will enlarge your kernel by about 120K.
-
-         This support requires an ACPI compliant platform (hardware/firmware).
-         If both ACPI and Advanced Power Management (APM) support are
-         configured, whichever is loaded first shall be used.
-
-         This code DOES NOT currently provide a complete OSPM implementation
-         -- it has not yet reached APM's level of functionality.  When fully
-         implemented, Linux ACPI/OSPM will provide a more robust functional
-         replacement for legacy configuration and power management
-         interfaces, including the Plug-and-Play BIOS specification (PnP
-         BIOS), the Multi-Processor Specification (MPS), and the Advanced
-         Power Management specification (APM).
-
-         Linux support for ACPI/OSPM is based on Intel Corporation's ACPI
-         Component Architecture (ACPI CA). The latest ACPI CA source code,
-         documentation, debug builds, and implementation status information
-         can be downloaded from:
-         <http://developer.intel.com/technology/iapc/acpi/downloads.htm>.
-
-         The ACPI Sourceforge project may also be of interest:
-         <http://sf.net/projects/acpi/>
-
-config ACPI_EFI
-       bool
-       depends on !IA64_HP_SIM
-       default y
-
-config ACPI_INTERPRETER
-       bool
-       depends on !IA64_HP_SIM
-       default y
-
-config ACPI_KERNEL_CONFIG
-       bool
-       depends on !IA64_HP_SIM
-       default y
-       help
-         If you say `Y' here, Linux's ACPI support will use the
-         hardware-level system descriptions found on IA-64 systems.

 config IA64_BRL_EMU
        bool
diff -Nru a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
--- a/drivers/acpi/Kconfig      Sat Nov  1 14:43:25 2003
+++ b/drivers/acpi/Kconfig      Sat Nov  1 14:43:25 2003
@@ -9,7 +9,7 @@

 config ACPI
        bool "ACPI Support"
-       depends on IA64 || X86
+       depends on IA64 && !IA64_HP_SIM || X86

        default y
        ---help---
@@ -44,11 +44,15 @@
        bool
        depends on ACPI || X86_HT
        default y
+       help
+         If you say `Y' here, Linux will read the ACPI tables at boot to
+         discover system characteristics such as processors, APICs, and
+         PCI IRQ routing.  This replaces traditional mechanisms for
+         discovering those properties.

 config ACPI_INTERPRETER
        bool
        depends on ACPI
-       depends on !IA64_SGI_SN
        default y

 config ACPI_SLEEP
@@ -101,7 +105,6 @@
 config ACPI_BUTTON
        tristate "Button"
        depends on ACPI_INTERPRETER
-       depends on !IA64_SGI_SN
        default m
        help
          This driver registers for events based on buttons, such as the
@@ -113,7 +116,6 @@
 config ACPI_FAN
        tristate "Fan"
        depends on ACPI_INTERPRETER
-       depends on !IA64_SGI_SN
        default m
        help
          This driver adds support for ACPI fan devices, allowing user-mode
@@ -122,7 +124,6 @@
 config ACPI_PROCESSOR
        tristate "Processor"
        depends on ACPI_INTERPRETER
-       depends on !IA64_SGI_SN
        default m
        help
          This driver installs ACPI as the idle handler for Linux, and uses
@@ -207,7 +208,6 @@
 config ACPI_DEBUG
        bool "Debug Statements"
        depends on ACPI_INTERPRETER
-       depends on !IA64_SGI_SN
        default n
        help
          The ACPI driver can optionally report errors with a great deal
@@ -217,7 +217,6 @@
 config ACPI_BUS
        bool
        depends on ACPI_INTERPRETER
-       depends on !IA64_SGI_SN
        default y

 config ACPI_EC
@@ -233,19 +232,16 @@
 config ACPI_POWER
        bool
        depends on ACPI_INTERPRETER
-       depends on !IA64_SGI_SN
        default y

 config ACPI_PCI
        bool
        depends on ACPI_INTERPRETER
-       depends on !IA64_SGI_SN
        default PCI

 config ACPI_SYSTEM
        bool
        depends on ACPI_INTERPRETER
-       depends on !IA64_SGI_SN
        default y
        help
          This driver will enable your system to shut down using ACPI, and
@@ -260,7 +256,6 @@
 config ACPI_RELAXED_AML
        bool "Relaxed AML"
        depends on ACPI_INTERPRETER
-       depends on !IA64_SGI_SN
        default n
        help
          If you say `Y' here, the ACPI interpreter will relax its checking

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

--=-j4hBRen0UcKO14ABBXay-- ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/