diff options
| author | Lv Zheng <lv.zheng@intel.com> | 2016-08-04 04:44:52 -0400 |
|---|---|---|
| committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-08-12 21:09:35 -0400 |
| commit | 4e2fc6a0aa0a18403ccdcd46d7ed9f624845772b (patch) | |
| tree | c413bbc0d2d9ff57aa3f235e4afc66203fd0eaa2 /include/acpi | |
| parent | da24f31d33dd18c622bb4f21791565ab9b6421db (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>
Diffstat (limited to 'include/acpi')
| -rw-r--r-- | include/acpi/platform/acenv.h | 23 | ||||
| -rw-r--r-- | include/acpi/platform/acenvex.h | 14 |
2 files changed, 22 insertions, 15 deletions
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 !*/ |
