aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2016-08-04 04:44:52 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-08-12 21:09:35 -0400
commit4e2fc6a0aa0a18403ccdcd46d7ed9f624845772b (patch)
treec413bbc0d2d9ff57aa3f235e4afc66203fd0eaa2
parentda24f31d33dd18c622bb4f21791565ab9b6421db (diff)
ACPICA: Clib/EFI: Fix wrong order of standard integer types/IO handles
ACPICA commit 7f9b359b7c78c69b07f62eb2d58f710c351fd75d EFI header should use standard C library stuffs (integer types and IO handles) rather than implementing such standard stuffs. This patch fixes this issue by: 1. Implementing standard integer types for ACPI_USE_STANDARD_HADERS=n; 2. Defining EFI types using standard integer types and standard IO handles; 3. Tuning header inclusion order and environment definition order; 4. Removing wrong standard header inclusion from ACPICA core files; 5. Moving several application headers from acpidump.h to acenv.h. This patch corrects some of them. Lv Zheng. Except some harmless header inclusion re-ordering, Linux kernel is not affected by this change. Link: https://github.com/acpica/acpica/commit/7f9b359b Link: https://bugs.acpica.org/show_bug.cgi?id=1300 Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/acpica/acapps.h2
-rw-r--r--drivers/acpi/acpica/utpredef.c2
-rw-r--r--include/acpi/platform/acenv.h23
-rw-r--r--include/acpi/platform/acenvex.h14
-rw-r--r--tools/power/acpi/common/cmfsize.c1
-rw-r--r--tools/power/acpi/tools/acpidump/acpidump.h5
6 files changed, 22 insertions, 25 deletions
diff --git a/drivers/acpi/acpica/acapps.h b/drivers/acpi/acpica/acapps.h
index ca2c0607104b..247f30c33e21 100644
--- a/drivers/acpi/acpica/acapps.h
+++ b/drivers/acpi/acpica/acapps.h
@@ -44,8 +44,6 @@
44#ifndef _ACAPPS 44#ifndef _ACAPPS
45#define _ACAPPS 45#define _ACAPPS
46 46
47#include <stdio.h>
48
49/* Common info for tool signons */ 47/* Common info for tool signons */
50 48
51#define ACPICA_NAME "Intel ACPI Component Architecture" 49#define ACPICA_NAME "Intel ACPI Component Architecture"
diff --git a/drivers/acpi/acpica/utpredef.c b/drivers/acpi/acpica/utpredef.c
index 770a1775b264..ce18346b6144 100644
--- a/drivers/acpi/acpica/utpredef.c
+++ b/drivers/acpi/acpica/utpredef.c
@@ -176,8 +176,6 @@ void acpi_ut_get_expected_return_types(char *buffer, u32 expected_btypes)
176 ******************************************************************************/ 176 ******************************************************************************/
177 177
178#if (defined ACPI_ASL_COMPILER || defined ACPI_HELP_APP) 178#if (defined ACPI_ASL_COMPILER || defined ACPI_HELP_APP)
179#include <stdio.h>
180#include <string.h>
181 179
182/* Local prototypes */ 180/* Local prototypes */
183 181
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index ee5c0b98e53a..1e2fe9501c16 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -209,18 +209,20 @@
209#elif defined(__OS2__) 209#elif defined(__OS2__)
210#include "acos2.h" 210#include "acos2.h"
211 211
212#elif defined(_AED_EFI)
213#include "acefi.h"
214
215#elif defined(_GNU_EFI)
216#include "acefi.h"
217
218#elif defined(__HAIKU__) 212#elif defined(__HAIKU__)
219#include "achaiku.h" 213#include "achaiku.h"
220 214
221#elif defined(__QNX__) 215#elif defined(__QNX__)
222#include "acqnx.h" 216#include "acqnx.h"
223 217
218/*
219 * EFI applications can be built with -nostdlib, in this case, it must be
220 * included after including all other host environmental definitions, in
221 * order to override the definitions.
222 */
223#elif defined(_AED_EFI) || defined(_GNU_EFI)
224#include "acefi.h"
225
224#else 226#else
225 227
226/* Unknown environment */ 228/* Unknown environment */
@@ -344,12 +346,16 @@
344#include <stdlib.h> 346#include <stdlib.h>
345#include <string.h> 347#include <string.h>
346#include <ctype.h> 348#include <ctype.h>
349#ifdef ACPI_APPLICATION
350#include <stdio.h>
351#include <fcntl.h>
352#include <errno.h>
353#include <sys/stat.h>
354#endif
347 355
348#endif /* ACPI_USE_STANDARD_HEADERS */ 356#endif /* ACPI_USE_STANDARD_HEADERS */
349 357
350#ifndef ACPI_FILE
351#ifdef ACPI_APPLICATION 358#ifdef ACPI_APPLICATION
352#include <stdio.h>
353#define ACPI_FILE FILE * 359#define ACPI_FILE FILE *
354#define ACPI_FILE_OUT stdout 360#define ACPI_FILE_OUT stdout
355#define ACPI_FILE_ERR stderr 361#define ACPI_FILE_ERR stderr
@@ -358,7 +364,6 @@
358#define ACPI_FILE_OUT NULL 364#define ACPI_FILE_OUT NULL
359#define ACPI_FILE_ERR NULL 365#define ACPI_FILE_ERR NULL
360#endif /* ACPI_APPLICATION */ 366#endif /* ACPI_APPLICATION */
361#endif /* ACPI_FILE */
362 367
363#ifndef ACPI_INIT_FUNCTION 368#ifndef ACPI_INIT_FUNCTION
364#define ACPI_INIT_FUNCTION 369#define ACPI_INIT_FUNCTION
diff --git a/include/acpi/platform/acenvex.h b/include/acpi/platform/acenvex.h
index 4f15c1d10b61..b6726152a300 100644
--- a/include/acpi/platform/acenvex.h
+++ b/include/acpi/platform/acenvex.h
@@ -59,15 +59,17 @@
59#elif defined(WIN32) 59#elif defined(WIN32)
60#include "acwinex.h" 60#include "acwinex.h"
61 61
62#elif defined(_AED_EFI)
63#include "acefiex.h"
64
65#elif defined(_GNU_EFI)
66#include "acefiex.h"
67
68#elif defined(__DragonFly__) 62#elif defined(__DragonFly__)
69#include "acdragonflyex.h" 63#include "acdragonflyex.h"
70 64
65/*
66 * EFI applications can be built with -nostdlib, in this case, it must be
67 * included after including all other host environmental definitions, in
68 * order to override the definitions.
69 */
70#elif defined(_AED_EFI) || defined(_GNU_EFI)
71#include "acefiex.h"
72
71#endif 73#endif
72 74
73/*! [End] no source code translation !*/ 75/*! [End] no source code translation !*/
diff --git a/tools/power/acpi/common/cmfsize.c b/tools/power/acpi/common/cmfsize.c
index e73a79fce015..d2240e60566f 100644
--- a/tools/power/acpi/common/cmfsize.c
+++ b/tools/power/acpi/common/cmfsize.c
@@ -44,7 +44,6 @@
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include "accommon.h" 45#include "accommon.h"
46#include "acapps.h" 46#include "acapps.h"
47#include <stdio.h>
48 47
49#define _COMPONENT ACPI_TOOLS 48#define _COMPONENT ACPI_TOOLS
50ACPI_MODULE_NAME("cmfsize") 49ACPI_MODULE_NAME("cmfsize")
diff --git a/tools/power/acpi/tools/acpidump/acpidump.h b/tools/power/acpi/tools/acpidump/acpidump.h
index 94dd8a10f7f6..9f7db006f326 100644
--- a/tools/power/acpi/tools/acpidump/acpidump.h
+++ b/tools/power/acpi/tools/acpidump/acpidump.h
@@ -56,11 +56,6 @@
56#include "accommon.h" 56#include "accommon.h"
57#include "actables.h" 57#include "actables.h"
58 58
59#include <stdio.h>
60#include <fcntl.h>
61#include <errno.h>
62#include <sys/stat.h>
63
64/* Globals */ 59/* Globals */
65 60
66EXTERN u8 INIT_GLOBAL(gbl_summary_mode, FALSE); 61EXTERN u8 INIT_GLOBAL(gbl_summary_mode, FALSE);