diff options
Diffstat (limited to 'include/acpi')
-rw-r--r-- | include/acpi/acpi_bus.h | 42 | ||||
-rw-r--r-- | include/acpi/acpiosxf.h | 31 | ||||
-rw-r--r-- | include/acpi/acpixf.h | 54 | ||||
-rw-r--r-- | include/acpi/actbl1.h | 14 | ||||
-rw-r--r-- | include/acpi/actbl2.h | 2 | ||||
-rw-r--r-- | include/acpi/actypes.h | 14 | ||||
-rw-r--r-- | include/acpi/ghes.h | 2 | ||||
-rw-r--r-- | include/acpi/platform/acenv.h | 53 | ||||
-rw-r--r-- | include/acpi/platform/aclinux.h | 12 | ||||
-rw-r--r-- | include/acpi/platform/aclinuxex.h | 22 |
10 files changed, 187 insertions, 59 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index b5714580801a..bcfd808b1098 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -315,12 +315,19 @@ struct acpi_device_wakeup_flags { | |||
315 | u8 notifier_present:1; /* Wake-up notify handler has been installed */ | 315 | u8 notifier_present:1; /* Wake-up notify handler has been installed */ |
316 | }; | 316 | }; |
317 | 317 | ||
318 | struct acpi_device_wakeup_context { | ||
319 | struct work_struct work; | ||
320 | struct device *dev; | ||
321 | }; | ||
322 | |||
318 | struct acpi_device_wakeup { | 323 | struct acpi_device_wakeup { |
319 | acpi_handle gpe_device; | 324 | acpi_handle gpe_device; |
320 | u64 gpe_number; | 325 | u64 gpe_number; |
321 | u64 sleep_state; | 326 | u64 sleep_state; |
322 | struct list_head resources; | 327 | struct list_head resources; |
323 | struct acpi_device_wakeup_flags flags; | 328 | struct acpi_device_wakeup_flags flags; |
329 | struct acpi_device_wakeup_context context; | ||
330 | struct wakeup_source *ws; | ||
324 | int prepare_count; | 331 | int prepare_count; |
325 | }; | 332 | }; |
326 | 333 | ||
@@ -372,15 +379,9 @@ static inline void acpi_set_device_status(struct acpi_device *adev, u32 sta) | |||
372 | } | 379 | } |
373 | 380 | ||
374 | static inline void acpi_set_hp_context(struct acpi_device *adev, | 381 | static inline void acpi_set_hp_context(struct acpi_device *adev, |
375 | struct acpi_hotplug_context *hp, | 382 | struct acpi_hotplug_context *hp) |
376 | int (*notify)(struct acpi_device *, u32), | ||
377 | void (*uevent)(struct acpi_device *, u32), | ||
378 | void (*fixup)(struct acpi_device *)) | ||
379 | { | 383 | { |
380 | hp->self = adev; | 384 | hp->self = adev; |
381 | hp->notify = notify; | ||
382 | hp->uevent = uevent; | ||
383 | hp->fixup = fixup; | ||
384 | adev->hp = hp; | 385 | adev->hp = hp; |
385 | } | 386 | } |
386 | 387 | ||
@@ -487,6 +488,8 @@ struct acpi_bus_type { | |||
487 | }; | 488 | }; |
488 | int register_acpi_bus_type(struct acpi_bus_type *); | 489 | int register_acpi_bus_type(struct acpi_bus_type *); |
489 | int unregister_acpi_bus_type(struct acpi_bus_type *); | 490 | int unregister_acpi_bus_type(struct acpi_bus_type *); |
491 | int acpi_bind_one(struct device *dev, struct acpi_device *adev); | ||
492 | int acpi_unbind_one(struct device *dev); | ||
490 | 493 | ||
491 | struct acpi_pci_root { | 494 | struct acpi_pci_root { |
492 | struct acpi_device * device; | 495 | struct acpi_device * device; |
@@ -510,20 +513,18 @@ int acpi_enable_wakeup_device_power(struct acpi_device *dev, int state); | |||
510 | int acpi_disable_wakeup_device_power(struct acpi_device *dev); | 513 | int acpi_disable_wakeup_device_power(struct acpi_device *dev); |
511 | 514 | ||
512 | #ifdef CONFIG_PM | 515 | #ifdef CONFIG_PM |
513 | acpi_status acpi_add_pm_notifier(struct acpi_device *adev, | 516 | acpi_status acpi_add_pm_notifier(struct acpi_device *adev, struct device *dev, |
514 | acpi_notify_handler handler, void *context); | 517 | void (*work_func)(struct work_struct *work)); |
515 | acpi_status acpi_remove_pm_notifier(struct acpi_device *adev, | 518 | acpi_status acpi_remove_pm_notifier(struct acpi_device *adev); |
516 | acpi_notify_handler handler); | ||
517 | int acpi_pm_device_sleep_state(struct device *, int *, int); | 519 | int acpi_pm_device_sleep_state(struct device *, int *, int); |
518 | #else | 520 | #else |
519 | static inline acpi_status acpi_add_pm_notifier(struct acpi_device *adev, | 521 | static inline acpi_status acpi_add_pm_notifier(struct acpi_device *adev, |
520 | acpi_notify_handler handler, | 522 | struct device *dev, |
521 | void *context) | 523 | void (*work_func)(struct work_struct *work)) |
522 | { | 524 | { |
523 | return AE_SUPPORT; | 525 | return AE_SUPPORT; |
524 | } | 526 | } |
525 | static inline acpi_status acpi_remove_pm_notifier(struct acpi_device *adev, | 527 | static inline acpi_status acpi_remove_pm_notifier(struct acpi_device *adev) |
526 | acpi_notify_handler handler) | ||
527 | { | 528 | { |
528 | return AE_SUPPORT; | 529 | return AE_SUPPORT; |
529 | } | 530 | } |
@@ -538,13 +539,8 @@ static inline int acpi_pm_device_sleep_state(struct device *d, int *p, int m) | |||
538 | #endif | 539 | #endif |
539 | 540 | ||
540 | #ifdef CONFIG_PM_RUNTIME | 541 | #ifdef CONFIG_PM_RUNTIME |
541 | int __acpi_device_run_wake(struct acpi_device *, bool); | ||
542 | int acpi_pm_device_run_wake(struct device *, bool); | 542 | int acpi_pm_device_run_wake(struct device *, bool); |
543 | #else | 543 | #else |
544 | static inline int __acpi_device_run_wake(struct acpi_device *adev, bool en) | ||
545 | { | ||
546 | return -ENODEV; | ||
547 | } | ||
548 | static inline int acpi_pm_device_run_wake(struct device *dev, bool enable) | 544 | static inline int acpi_pm_device_run_wake(struct device *dev, bool enable) |
549 | { | 545 | { |
550 | return -ENODEV; | 546 | return -ENODEV; |
@@ -552,14 +548,8 @@ static inline int acpi_pm_device_run_wake(struct device *dev, bool enable) | |||
552 | #endif | 548 | #endif |
553 | 549 | ||
554 | #ifdef CONFIG_PM_SLEEP | 550 | #ifdef CONFIG_PM_SLEEP |
555 | int __acpi_device_sleep_wake(struct acpi_device *, u32, bool); | ||
556 | int acpi_pm_device_sleep_wake(struct device *, bool); | 551 | int acpi_pm_device_sleep_wake(struct device *, bool); |
557 | #else | 552 | #else |
558 | static inline int __acpi_device_sleep_wake(struct acpi_device *adev, | ||
559 | u32 target_state, bool enable) | ||
560 | { | ||
561 | return -ENODEV; | ||
562 | } | ||
563 | static inline int acpi_pm_device_sleep_wake(struct device *dev, bool enable) | 553 | static inline int acpi_pm_device_sleep_wake(struct device *dev, bool enable) |
564 | { | 554 | { |
565 | return -ENODEV; | 555 | return -ENODEV; |
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index f6f5f8af2112..03b3e6d405ff 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h | |||
@@ -399,4 +399,35 @@ char *acpi_os_get_next_filename(void *dir_handle); | |||
399 | void acpi_os_close_directory(void *dir_handle); | 399 | void acpi_os_close_directory(void *dir_handle); |
400 | #endif | 400 | #endif |
401 | 401 | ||
402 | /* | ||
403 | * File I/O and related support | ||
404 | */ | ||
405 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_open_file | ||
406 | ACPI_FILE acpi_os_open_file(const char *path, u8 modes); | ||
407 | #endif | ||
408 | |||
409 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_close_file | ||
410 | void acpi_os_close_file(ACPI_FILE file); | ||
411 | #endif | ||
412 | |||
413 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_read_file | ||
414 | int | ||
415 | acpi_os_read_file(ACPI_FILE file, | ||
416 | void *buffer, acpi_size size, acpi_size count); | ||
417 | #endif | ||
418 | |||
419 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_write_file | ||
420 | int | ||
421 | acpi_os_write_file(ACPI_FILE file, | ||
422 | void *buffer, acpi_size size, acpi_size count); | ||
423 | #endif | ||
424 | |||
425 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_file_offset | ||
426 | long acpi_os_get_file_offset(ACPI_FILE file); | ||
427 | #endif | ||
428 | |||
429 | #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_set_file_offset | ||
430 | acpi_status acpi_os_set_file_offset(ACPI_FILE file, long offset, u8 from); | ||
431 | #endif | ||
432 | |||
402 | #endif /* __ACPIOSXF_H__ */ | 433 | #endif /* __ACPIOSXF_H__ */ |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 35b525c19711..c3f38bc459e1 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
@@ -46,15 +46,13 @@ | |||
46 | 46 | ||
47 | /* Current ACPICA subsystem version in YYYYMMDD format */ | 47 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
48 | 48 | ||
49 | #define ACPI_CA_VERSION 0x20140424 | 49 | #define ACPI_CA_VERSION 0x20140627 |
50 | 50 | ||
51 | #include <acpi/acconfig.h> | 51 | #include <acpi/acconfig.h> |
52 | #include <acpi/actypes.h> | 52 | #include <acpi/actypes.h> |
53 | #include <acpi/actbl.h> | 53 | #include <acpi/actbl.h> |
54 | #include <acpi/acbuffer.h> | 54 | #include <acpi/acbuffer.h> |
55 | 55 | ||
56 | extern u8 acpi_gbl_permanent_mmap; | ||
57 | |||
58 | /***************************************************************************** | 56 | /***************************************************************************** |
59 | * | 57 | * |
60 | * Macros used for ACPICA globals and configuration | 58 | * Macros used for ACPICA globals and configuration |
@@ -335,6 +333,23 @@ ACPI_GLOBAL(u8, acpi_gbl_system_awake_and_running); | |||
335 | 333 | ||
336 | #endif /* ACPI_DEBUG_OUTPUT */ | 334 | #endif /* ACPI_DEBUG_OUTPUT */ |
337 | 335 | ||
336 | /* | ||
337 | * Application prototypes | ||
338 | * | ||
339 | * All interfaces used by application will be configured | ||
340 | * out of the ACPICA build unless the ACPI_APPLICATION | ||
341 | * flag is defined. | ||
342 | */ | ||
343 | #ifdef ACPI_APPLICATION | ||
344 | #define ACPI_APP_DEPENDENT_RETURN_VOID(prototype) \ | ||
345 | prototype; | ||
346 | |||
347 | #else | ||
348 | #define ACPI_APP_DEPENDENT_RETURN_VOID(prototype) \ | ||
349 | static ACPI_INLINE prototype {return;} | ||
350 | |||
351 | #endif /* ACPI_APPLICATION */ | ||
352 | |||
338 | /***************************************************************************** | 353 | /***************************************************************************** |
339 | * | 354 | * |
340 | * ACPICA public interface prototypes | 355 | * ACPICA public interface prototypes |
@@ -658,6 +673,10 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |||
658 | u32 gpe_number)) | 673 | u32 gpe_number)) |
659 | 674 | ||
660 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 675 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
676 | acpi_mark_gpe_for_wake(acpi_handle gpe_device, | ||
677 | u32 gpe_number)) | ||
678 | |||
679 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | ||
661 | acpi_setup_gpe_for_wake(acpi_handle | 680 | acpi_setup_gpe_for_wake(acpi_handle |
662 | parent_device, | 681 | parent_device, |
663 | acpi_handle gpe_device, | 682 | acpi_handle gpe_device, |
@@ -861,21 +880,32 @@ ACPI_DBG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(6) | |||
861 | const char *module_name, | 880 | const char *module_name, |
862 | u32 component_id, | 881 | u32 component_id, |
863 | const char *format, ...)) | 882 | const char *format, ...)) |
883 | ACPI_APP_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(1) | ||
884 | void ACPI_INTERNAL_VAR_XFACE | ||
885 | acpi_log_error(const char *format, ...)) | ||
864 | 886 | ||
865 | /* | 887 | /* |
866 | * Divergences | 888 | * Divergences |
867 | */ | 889 | */ |
868 | acpi_status acpi_get_id(acpi_handle object, acpi_owner_id * out_type); | 890 | ACPI_GLOBAL(u8, acpi_gbl_permanent_mmap); |
869 | 891 | ||
870 | acpi_status acpi_unload_table_id(acpi_owner_id id); | 892 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
893 | acpi_get_id(acpi_handle object, | ||
894 | acpi_owner_id * out_type)) | ||
871 | 895 | ||
872 | acpi_status | 896 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_unload_table_id(acpi_owner_id id)) |
873 | acpi_get_table_with_size(acpi_string signature, | ||
874 | u32 instance, struct acpi_table_header **out_table, | ||
875 | acpi_size *tbl_size); | ||
876 | 897 | ||
877 | acpi_status | 898 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status |
878 | acpi_get_data_full(acpi_handle object, acpi_object_handler handler, void **data, | 899 | acpi_get_table_with_size(acpi_string signature, |
879 | void (*callback)(void *)); | 900 | u32 instance, |
901 | struct acpi_table_header | ||
902 | **out_table, | ||
903 | acpi_size *tbl_size)) | ||
904 | |||
905 | ACPI_EXTERNAL_RETURN_STATUS(acpi_status | ||
906 | acpi_get_data_full(acpi_handle object, | ||
907 | acpi_object_handler handler, | ||
908 | void **data, | ||
909 | void (*callback)(void *))) | ||
880 | 910 | ||
881 | #endif /* __ACXFACE_H__ */ | 911 | #endif /* __ACXFACE_H__ */ |
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h index 4ad7da805180..9613e8e97960 100644 --- a/include/acpi/actbl1.h +++ b/include/acpi/actbl1.h | |||
@@ -604,7 +604,7 @@ struct acpi_hest_generic { | |||
604 | 604 | ||
605 | /* Generic Error Status block */ | 605 | /* Generic Error Status block */ |
606 | 606 | ||
607 | struct acpi_generic_status { | 607 | struct acpi_hest_generic_status { |
608 | u32 block_status; | 608 | u32 block_status; |
609 | u32 raw_data_offset; | 609 | u32 raw_data_offset; |
610 | u32 raw_data_length; | 610 | u32 raw_data_length; |
@@ -614,15 +614,15 @@ struct acpi_generic_status { | |||
614 | 614 | ||
615 | /* Values for block_status flags above */ | 615 | /* Values for block_status flags above */ |
616 | 616 | ||
617 | #define ACPI_GEN_ERR_UC BIT(0) | 617 | #define ACPI_HEST_UNCORRECTABLE (1) |
618 | #define ACPI_GEN_ERR_CE BIT(1) | 618 | #define ACPI_HEST_CORRECTABLE (1<<1) |
619 | #define ACPI_GEN_ERR_MULTI_UC BIT(2) | 619 | #define ACPI_HEST_MULTIPLE_UNCORRECTABLE (1<<2) |
620 | #define ACPI_GEN_ERR_MULTI_CE BIT(3) | 620 | #define ACPI_HEST_MULTIPLE_CORRECTABLE (1<<3) |
621 | #define ACPI_GEN_ERR_COUNT_SHIFT (0xFF<<4) /* 8 bits, error count */ | 621 | #define ACPI_HEST_ERROR_ENTRY_COUNT (0xFF<<4) /* 8 bits, error count */ |
622 | 622 | ||
623 | /* Generic Error Data entry */ | 623 | /* Generic Error Data entry */ |
624 | 624 | ||
625 | struct acpi_generic_data { | 625 | struct acpi_hest_generic_data { |
626 | u8 section_type[16]; | 626 | u8 section_type[16]; |
627 | u32 error_severity; | 627 | u32 error_severity; |
628 | u16 revision; | 628 | u16 revision; |
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 860e5c883eb3..21314d37cb07 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h | |||
@@ -516,7 +516,7 @@ struct acpi_dmar_andd { | |||
516 | struct acpi_dmar_header header; | 516 | struct acpi_dmar_header header; |
517 | u8 reserved[3]; | 517 | u8 reserved[3]; |
518 | u8 device_number; | 518 | u8 device_number; |
519 | u8 object_name[]; | 519 | char object_name[1]; |
520 | }; | 520 | }; |
521 | 521 | ||
522 | /******************************************************************************* | 522 | /******************************************************************************* |
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 19b26bb69a70..608a04019372 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
@@ -126,6 +126,7 @@ | |||
126 | typedef unsigned char u8; | 126 | typedef unsigned char u8; |
127 | typedef unsigned char u8; | 127 | typedef unsigned char u8; |
128 | typedef unsigned short u16; | 128 | typedef unsigned short u16; |
129 | typedef short s16; | ||
129 | typedef COMPILER_DEPENDENT_UINT64 u64; | 130 | typedef COMPILER_DEPENDENT_UINT64 u64; |
130 | typedef COMPILER_DEPENDENT_INT64 s64; | 131 | typedef COMPILER_DEPENDENT_INT64 s64; |
131 | 132 | ||
@@ -1244,4 +1245,17 @@ struct acpi_memory_list { | |||
1244 | #define ACPI_OSI_WIN_7 0x0B | 1245 | #define ACPI_OSI_WIN_7 0x0B |
1245 | #define ACPI_OSI_WIN_8 0x0C | 1246 | #define ACPI_OSI_WIN_8 0x0C |
1246 | 1247 | ||
1248 | /* Definitions of file IO */ | ||
1249 | |||
1250 | #define ACPI_FILE_READING 0x01 | ||
1251 | #define ACPI_FILE_WRITING 0x02 | ||
1252 | #define ACPI_FILE_BINARY 0x04 | ||
1253 | |||
1254 | #define ACPI_FILE_BEGIN 0x01 | ||
1255 | #define ACPI_FILE_END 0x02 | ||
1256 | |||
1257 | /* Definitions of getopt */ | ||
1258 | |||
1259 | #define ACPI_OPT_END -1 | ||
1260 | |||
1247 | #endif /* __ACTYPES_H__ */ | 1261 | #endif /* __ACTYPES_H__ */ |
diff --git a/include/acpi/ghes.h b/include/acpi/ghes.h index dfd60d0bfd27..720446cb243e 100644 --- a/include/acpi/ghes.h +++ b/include/acpi/ghes.h | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | struct ghes { | 15 | struct ghes { |
16 | struct acpi_hest_generic *generic; | 16 | struct acpi_hest_generic *generic; |
17 | struct acpi_generic_status *estatus; | 17 | struct acpi_hest_generic_status *estatus; |
18 | u64 buffer_paddr; | 18 | u64 buffer_paddr; |
19 | unsigned long flags; | 19 | unsigned long flags; |
20 | union { | 20 | union { |
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h index e863dd5c4e04..5f8cc1fa3278 100644 --- a/include/acpi/platform/acenv.h +++ b/include/acpi/platform/acenv.h | |||
@@ -87,20 +87,14 @@ | |||
87 | #define ACPI_DBG_TRACK_ALLOCATIONS | 87 | #define ACPI_DBG_TRACK_ALLOCATIONS |
88 | #endif | 88 | #endif |
89 | 89 | ||
90 | /* acpi_names configuration. Single threaded with debugger output enabled. */ | ||
91 | |||
92 | #ifdef ACPI_NAMES_APP | ||
93 | #define ACPI_DEBUGGER | ||
94 | #define ACPI_APPLICATION | ||
95 | #define ACPI_SINGLE_THREADED | ||
96 | #endif | ||
97 | |||
98 | /* | 90 | /* |
99 | * acpi_bin/acpi_dump/acpi_src/acpi_xtract/Example configuration. All single | 91 | * acpi_bin/acpi_dump/acpi_help/acpi_names/acpi_src/acpi_xtract/Example configuration. |
100 | * threaded, with no debug output. | 92 | * All single threaded. |
101 | */ | 93 | */ |
102 | #if (defined ACPI_BIN_APP) || \ | 94 | #if (defined ACPI_BIN_APP) || \ |
103 | (defined ACPI_DUMP_APP) || \ | 95 | (defined ACPI_DUMP_APP) || \ |
96 | (defined ACPI_HELP_APP) || \ | ||
97 | (defined ACPI_NAMES_APP) || \ | ||
104 | (defined ACPI_SRC_APP) || \ | 98 | (defined ACPI_SRC_APP) || \ |
105 | (defined ACPI_XTRACT_APP) || \ | 99 | (defined ACPI_XTRACT_APP) || \ |
106 | (defined ACPI_EXAMPLE_APP) | 100 | (defined ACPI_EXAMPLE_APP) |
@@ -108,12 +102,40 @@ | |||
108 | #define ACPI_SINGLE_THREADED | 102 | #define ACPI_SINGLE_THREADED |
109 | #endif | 103 | #endif |
110 | 104 | ||
105 | /* acpi_help configuration. Error messages disabled. */ | ||
106 | |||
111 | #ifdef ACPI_HELP_APP | 107 | #ifdef ACPI_HELP_APP |
112 | #define ACPI_APPLICATION | ||
113 | #define ACPI_SINGLE_THREADED | ||
114 | #define ACPI_NO_ERROR_MESSAGES | 108 | #define ACPI_NO_ERROR_MESSAGES |
115 | #endif | 109 | #endif |
116 | 110 | ||
111 | /* acpi_names configuration. Debug output enabled. */ | ||
112 | |||
113 | #ifdef ACPI_NAMES_APP | ||
114 | #define ACPI_DEBUG_OUTPUT | ||
115 | #endif | ||
116 | |||
117 | /* acpi_exec/acpi_names/Example configuration. Native RSDP used. */ | ||
118 | |||
119 | #if (defined ACPI_EXEC_APP) || \ | ||
120 | (defined ACPI_EXAMPLE_APP) || \ | ||
121 | (defined ACPI_NAMES_APP) | ||
122 | #define ACPI_USE_NATIVE_RSDP_POINTER | ||
123 | #endif | ||
124 | |||
125 | /* acpi_dump configuration. Native mapping used if provied by OSPMs */ | ||
126 | |||
127 | #ifdef ACPI_DUMP_APP | ||
128 | #define ACPI_USE_NATIVE_MEMORY_MAPPING | ||
129 | #define USE_NATIVE_ALLOCATE_ZEROED | ||
130 | #endif | ||
131 | |||
132 | /* acpi_names/Example configuration. Hardware disabled */ | ||
133 | |||
134 | #if (defined ACPI_EXAMPLE_APP) || \ | ||
135 | (defined ACPI_NAMES_APP) | ||
136 | #define ACPI_REDUCED_HARDWARE 1 | ||
137 | #endif | ||
138 | |||
117 | /* Linkable ACPICA library */ | 139 | /* Linkable ACPICA library */ |
118 | 140 | ||
119 | #ifdef ACPI_LIBRARY | 141 | #ifdef ACPI_LIBRARY |
@@ -185,6 +207,9 @@ | |||
185 | #elif defined(_AED_EFI) | 207 | #elif defined(_AED_EFI) |
186 | #include "acefi.h" | 208 | #include "acefi.h" |
187 | 209 | ||
210 | #elif defined(_GNU_EFI) | ||
211 | #include "acefi.h" | ||
212 | |||
188 | #elif defined(__HAIKU__) | 213 | #elif defined(__HAIKU__) |
189 | #include "achaiku.h" | 214 | #include "achaiku.h" |
190 | 215 | ||
@@ -399,8 +424,12 @@ typedef char *va_list; | |||
399 | #ifdef ACPI_APPLICATION | 424 | #ifdef ACPI_APPLICATION |
400 | #include <stdio.h> | 425 | #include <stdio.h> |
401 | #define ACPI_FILE FILE * | 426 | #define ACPI_FILE FILE * |
427 | #define ACPI_FILE_OUT stdout | ||
428 | #define ACPI_FILE_ERR stderr | ||
402 | #else | 429 | #else |
403 | #define ACPI_FILE void * | 430 | #define ACPI_FILE void * |
431 | #define ACPI_FILE_OUT NULL | ||
432 | #define ACPI_FILE_ERR NULL | ||
404 | #endif /* ACPI_APPLICATION */ | 433 | #endif /* ACPI_APPLICATION */ |
405 | #endif /* ACPI_FILE */ | 434 | #endif /* ACPI_FILE */ |
406 | 435 | ||
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index cd1f052d55bb..1ba7c190c2cc 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h | |||
@@ -44,6 +44,16 @@ | |||
44 | #ifndef __ACLINUX_H__ | 44 | #ifndef __ACLINUX_H__ |
45 | #define __ACLINUX_H__ | 45 | #define __ACLINUX_H__ |
46 | 46 | ||
47 | #ifdef __KERNEL__ | ||
48 | |||
49 | /* ACPICA external files should not include ACPICA headers directly. */ | ||
50 | |||
51 | #if !defined(BUILDING_ACPICA) && !defined(_LINUX_ACPI_H) | ||
52 | #error "Please don't include <acpi/acpi.h> directly, include <linux/acpi.h> instead." | ||
53 | #endif | ||
54 | |||
55 | #endif | ||
56 | |||
47 | /* Common (in-kernel/user-space) ACPICA configuration */ | 57 | /* Common (in-kernel/user-space) ACPICA configuration */ |
48 | 58 | ||
49 | #define ACPI_USE_SYSTEM_CLIBRARY | 59 | #define ACPI_USE_SYSTEM_CLIBRARY |
@@ -70,7 +80,9 @@ | |||
70 | #ifdef EXPORT_ACPI_INTERFACES | 80 | #ifdef EXPORT_ACPI_INTERFACES |
71 | #include <linux/export.h> | 81 | #include <linux/export.h> |
72 | #endif | 82 | #endif |
83 | #ifdef CONFIG_ACPI | ||
73 | #include <asm/acenv.h> | 84 | #include <asm/acenv.h> |
85 | #endif | ||
74 | 86 | ||
75 | #ifndef CONFIG_ACPI | 87 | #ifndef CONFIG_ACPI |
76 | 88 | ||
diff --git a/include/acpi/platform/aclinuxex.h b/include/acpi/platform/aclinuxex.h index 191e741cfa0e..568d4b886712 100644 --- a/include/acpi/platform/aclinuxex.h +++ b/include/acpi/platform/aclinuxex.h | |||
@@ -46,6 +46,28 @@ | |||
46 | 46 | ||
47 | #ifdef __KERNEL__ | 47 | #ifdef __KERNEL__ |
48 | 48 | ||
49 | #ifndef ACPI_USE_NATIVE_DIVIDE | ||
50 | |||
51 | #ifndef ACPI_DIV_64_BY_32 | ||
52 | #define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \ | ||
53 | do { \ | ||
54 | u64 (__n) = ((u64) n_hi) << 32 | (n_lo); \ | ||
55 | (r32) = do_div ((__n), (d32)); \ | ||
56 | (q32) = (u32) (__n); \ | ||
57 | } while (0) | ||
58 | #endif | ||
59 | |||
60 | #ifndef ACPI_SHIFT_RIGHT_64 | ||
61 | #define ACPI_SHIFT_RIGHT_64(n_hi, n_lo) \ | ||
62 | do { \ | ||
63 | (n_lo) >>= 1; \ | ||
64 | (n_lo) |= (((n_hi) & 1) << 31); \ | ||
65 | (n_hi) >>= 1; \ | ||
66 | } while (0) | ||
67 | #endif | ||
68 | |||
69 | #endif | ||
70 | |||
49 | /* | 71 | /* |
50 | * Overrides for in-kernel ACPICA | 72 | * Overrides for in-kernel ACPICA |
51 | */ | 73 | */ |