All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lv Zheng <lv.zheng@intel.com>
To: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Len Brown <len.brown@intel.com>
Cc: Lv Zheng <lv.zheng@intel.com>, Lv Zheng <zetalog@gmail.com>,
	linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: [RFC PATCH 13/15] ACPICA: Linux: Remove <asm/acpi.h> inclusion from ACPICA headers.
Date: Wed, 18 Dec 2013 17:07:08 +0800	[thread overview]
Message-ID: <f001ffc5442bf3f49291e91a294210d2678ea8f4.1387336613.git.lv.zheng@intel.com> (raw)
In-Reply-To: <cover.1387336613.git.lv.zheng@intel.com>

This patch removes <asm/acpi.h> inclusion from <acpi/platform/aclinux.h> as
it no longer contains useful prototypes for ACPICA.
This patch also introduces a top level header <linux/acpica.h> to be
included by other kernel source code.
Note that this patch changes the logic so that ACPICA header files
inclusions are no longer dependent on CONFIG_ACPI=y environment.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 include/acpi/platform/aclinux.h |    1 -
 include/linux/acpi.h            |   13 ++++---------
 include/linux/acpica.h          |   22 ++++++++++++++++++++++
 3 files changed, 26 insertions(+), 10 deletions(-)
 create mode 100644 include/linux/acpica.h

diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index b754bfa..8bdb773 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -83,7 +83,6 @@
 #ifdef CONFIG_ARCH_SUPPORTS_ACPICA
 #include <asm/acenv.h>
 #endif
-#include <asm/acpi.h>
 
 #ifdef CONFIG_ACPI
 
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 72c88f4..a197f64 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -28,22 +28,17 @@
 #include <linux/errno.h>
 #include <linux/ioport.h>	/* for struct resource */
 #include <linux/device.h>
-
-#ifdef	CONFIG_ACPI
-
-#ifndef _LINUX
-#define _LINUX
-#endif
-
 #include <linux/list.h>
 #include <linux/mod_devicetable.h>
+#include <linux/acpica.h>
+
+#ifdef	CONFIG_ACPI
 
-#include <acpi/acpi.h>
+#include <asm/acpi.h>	/* Definitions in it can be used by <acpi/x.h> headers */
 #include <acpi/acpi_bus.h>
 #include <acpi/acpi_drivers.h>
 #include <acpi/acpi_numa.h>
 #include <acpi/acpi_io.h>
-#include <asm/acpi.h>
 
 static inline acpi_handle acpi_device_handle(struct acpi_device *adev)
 {
diff --git a/include/linux/acpica.h b/include/linux/acpica.h
new file mode 100644
index 0000000..a67d3cf
--- /dev/null
+++ b/include/linux/acpica.h
@@ -0,0 +1,22 @@
+#ifndef _LINUX_ACPICA_H
+#define _LINUX_ACPICA_H
+
+/*
+ * Top level ACPICA header for Linux kernel
+ *
+ * Copyright (C) 2013, Intel Corporation
+ *   Author: Lv Zheng <lv.zheng@intel.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/* Support <acpi/platform/aclinux.h> inclusions for broken compilers */
+#ifndef _LINUX
+#define _LINUX
+#endif
+
+#include <acpi/acpi.h>
+
+#endif /* _LINUX_ACPICA_H */
-- 
1.7.10.4

WARNING: multiple messages have this Message-ID (diff)
From: Lv Zheng <lv.zheng@intel.com>
To: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Len Brown <len.brown@intel.com>
Cc: Lv Zheng <lv.zheng@intel.com>, Lv Zheng <zetalog@gmail.com>,
	<linux-kernel@vger.kernel.org>,
	linux-acpi@vger.kernel.org
Subject: [RFC PATCH 13/15] ACPICA: Linux: Remove <asm/acpi.h> inclusion from ACPICA headers.
Date: Wed, 18 Dec 2013 17:07:08 +0800	[thread overview]
Message-ID: <f001ffc5442bf3f49291e91a294210d2678ea8f4.1387336613.git.lv.zheng@intel.com> (raw)
In-Reply-To: <cover.1387336613.git.lv.zheng@intel.com>

This patch removes <asm/acpi.h> inclusion from <acpi/platform/aclinux.h> as
it no longer contains useful prototypes for ACPICA.
This patch also introduces a top level header <linux/acpica.h> to be
included by other kernel source code.
Note that this patch changes the logic so that ACPICA header files
inclusions are no longer dependent on CONFIG_ACPI=y environment.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
 include/acpi/platform/aclinux.h |    1 -
 include/linux/acpi.h            |   13 ++++---------
 include/linux/acpica.h          |   22 ++++++++++++++++++++++
 3 files changed, 26 insertions(+), 10 deletions(-)
 create mode 100644 include/linux/acpica.h

diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index b754bfa..8bdb773 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -83,7 +83,6 @@
 #ifdef CONFIG_ARCH_SUPPORTS_ACPICA
 #include <asm/acenv.h>
 #endif
-#include <asm/acpi.h>
 
 #ifdef CONFIG_ACPI
 
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 72c88f4..a197f64 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -28,22 +28,17 @@
 #include <linux/errno.h>
 #include <linux/ioport.h>	/* for struct resource */
 #include <linux/device.h>
-
-#ifdef	CONFIG_ACPI
-
-#ifndef _LINUX
-#define _LINUX
-#endif
-
 #include <linux/list.h>
 #include <linux/mod_devicetable.h>
+#include <linux/acpica.h>
+
+#ifdef	CONFIG_ACPI
 
-#include <acpi/acpi.h>
+#include <asm/acpi.h>	/* Definitions in it can be used by <acpi/x.h> headers */
 #include <acpi/acpi_bus.h>
 #include <acpi/acpi_drivers.h>
 #include <acpi/acpi_numa.h>
 #include <acpi/acpi_io.h>
-#include <asm/acpi.h>
 
 static inline acpi_handle acpi_device_handle(struct acpi_device *adev)
 {
diff --git a/include/linux/acpica.h b/include/linux/acpica.h
new file mode 100644
index 0000000..a67d3cf
--- /dev/null
+++ b/include/linux/acpica.h
@@ -0,0 +1,22 @@
+#ifndef _LINUX_ACPICA_H
+#define _LINUX_ACPICA_H
+
+/*
+ * Top level ACPICA header for Linux kernel
+ *
+ * Copyright (C) 2013, Intel Corporation
+ *   Author: Lv Zheng <lv.zheng@intel.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+/* Support <acpi/platform/aclinux.h> inclusions for broken compilers */
+#ifndef _LINUX
+#define _LINUX
+#endif
+
+#include <acpi/acpi.h>
+
+#endif /* _LINUX_ACPICA_H */
-- 
1.7.10.4


  parent reply	other threads:[~2013-12-18  9:07 UTC|newest]

Thread overview: 94+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` 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:05   ` 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   ` 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   ` 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   ` 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   ` 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   ` 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   ` 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   ` 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   ` 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   ` 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:06   ` 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   ` Lv Zheng
2013-12-18  9:07 ` Lv Zheng [this message]
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   ` Lv Zheng
2013-12-18  9:07 ` [RFC PATCH 15/15] ACPI/thinkpad: Fix wrong <acpi/acpi.h> inclusion in Thinkpad ACPI users Lv Zheng
2013-12-18  9:07 ` [alsa-devel] " Lv Zheng
2013-12-18  9:07   ` [RFC DBG PATCH] ACPICA: Add CONFIG_ACPI=n build test support Lv Zheng
2013-12-18  9:07   ` 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  0:28         ` Zheng, Lv
2013-12-20  6:52         ` Takashi Iwai
2013-12-20  6:52           ` Takashi Iwai
2013-12-18  9:07 ` Lv Zheng
2013-12-20  8:30 ` [UPDATE RFC " Lv Zheng
2013-12-20  8:30   ` Lv Zheng
2013-12-20  9:15   ` Takashi Iwai
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:16   ` Lv Zheng
2014-07-07  4:16   ` 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     ` 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     ` 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     ` Lv Zheng
2014-07-07  4:17     ` 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     ` 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  4:17     ` Lv Zheng
2014-07-07 21:25     ` Rafael J. Wysocki
2014-07-08  0:08       ` Zheng, Lv
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  4:17     ` Lv Zheng
2014-07-07 21:24     ` Rafael J. Wysocki
2014-07-08  0:05       ` Zheng, Lv
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-07  4:17     ` 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   ` 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:57     ` 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-16  8:58     ` Lv Zheng
2014-07-19 23:46     ` Rafael J. Wysocki
2014-07-21  1:26       ` Zheng, Lv
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     ` 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     ` 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     ` 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-16  8:58     ` 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  8:59     ` 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f001ffc5442bf3f49291e91a294210d2678ea8f4.1387336613.git.lv.zheng@intel.com \
    --to=lv.zheng@intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=zetalog@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.