diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/acpi/acpi_bus.h | 14 | ||||
| -rw-r--r-- | include/acpi/acpi_drivers.h | 2 | ||||
| -rw-r--r-- | include/acpi/acpiosxf.h | 14 | ||||
| -rw-r--r-- | include/acpi/acpixf.h | 11 | ||||
| -rw-r--r-- | include/acpi/actypes.h | 30 | ||||
| -rw-r--r-- | include/acpi/platform/acenv.h | 6 | ||||
| -rw-r--r-- | include/acpi/platform/acgcc.h | 2 | ||||
| -rw-r--r-- | include/acpi/platform/aclinux.h | 7 | ||||
| -rw-r--r-- | include/linux/acpi.h | 11 |
9 files changed, 47 insertions, 50 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 4de84ce3a927..359ef11725a6 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
| @@ -184,7 +184,7 @@ struct acpi_device_pnp { | |||
| 184 | 184 | ||
| 185 | #define acpi_device_bid(d) ((d)->pnp.bus_id) | 185 | #define acpi_device_bid(d) ((d)->pnp.bus_id) |
| 186 | #define acpi_device_adr(d) ((d)->pnp.bus_address) | 186 | #define acpi_device_adr(d) ((d)->pnp.bus_address) |
| 187 | char *acpi_device_hid(struct acpi_device *device); | 187 | const char *acpi_device_hid(struct acpi_device *device); |
| 188 | #define acpi_device_name(d) ((d)->pnp.device_name) | 188 | #define acpi_device_name(d) ((d)->pnp.device_name) |
| 189 | #define acpi_device_class(d) ((d)->pnp.device_class) | 189 | #define acpi_device_class(d) ((d)->pnp.device_class) |
| 190 | 190 | ||
| @@ -389,21 +389,25 @@ struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle); | |||
| 389 | int acpi_enable_wakeup_device_power(struct acpi_device *dev, int state); | 389 | int acpi_enable_wakeup_device_power(struct acpi_device *dev, int state); |
| 390 | int acpi_disable_wakeup_device_power(struct acpi_device *dev); | 390 | int acpi_disable_wakeup_device_power(struct acpi_device *dev); |
| 391 | 391 | ||
| 392 | #ifdef CONFIG_PM_SLEEP | 392 | #ifdef CONFIG_PM_OPS |
| 393 | int acpi_pm_device_sleep_state(struct device *, int *); | 393 | int acpi_pm_device_sleep_state(struct device *, int *); |
| 394 | int acpi_pm_device_sleep_wake(struct device *, bool); | 394 | #else |
| 395 | #else /* !CONFIG_PM_SLEEP */ | ||
| 396 | static inline int acpi_pm_device_sleep_state(struct device *d, int *p) | 395 | static inline int acpi_pm_device_sleep_state(struct device *d, int *p) |
| 397 | { | 396 | { |
| 398 | if (p) | 397 | if (p) |
| 399 | *p = ACPI_STATE_D0; | 398 | *p = ACPI_STATE_D0; |
| 400 | return ACPI_STATE_D3; | 399 | return ACPI_STATE_D3; |
| 401 | } | 400 | } |
| 401 | #endif | ||
| 402 | |||
| 403 | #ifdef CONFIG_PM_SLEEP | ||
| 404 | int acpi_pm_device_sleep_wake(struct device *, bool); | ||
| 405 | #else | ||
| 402 | static inline int acpi_pm_device_sleep_wake(struct device *dev, bool enable) | 406 | static inline int acpi_pm_device_sleep_wake(struct device *dev, bool enable) |
| 403 | { | 407 | { |
| 404 | return -ENODEV; | 408 | return -ENODEV; |
| 405 | } | 409 | } |
| 406 | #endif /* !CONFIG_PM_SLEEP */ | 410 | #endif |
| 407 | 411 | ||
| 408 | #endif /* CONFIG_ACPI */ | 412 | #endif /* CONFIG_ACPI */ |
| 409 | 413 | ||
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index 23d78b4d088b..3090471b2a5e 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h | |||
| @@ -115,8 +115,6 @@ void pci_acpi_crs_quirks(void); | |||
| 115 | #define ACPI_PROCESSOR_LIMIT_INCREMENT 0x01 | 115 | #define ACPI_PROCESSOR_LIMIT_INCREMENT 0x01 |
| 116 | #define ACPI_PROCESSOR_LIMIT_DECREMENT 0x02 | 116 | #define ACPI_PROCESSOR_LIMIT_DECREMENT 0x02 |
| 117 | 117 | ||
| 118 | int acpi_processor_set_thermal_limit(acpi_handle handle, int type); | ||
| 119 | |||
| 120 | /*-------------------------------------------------------------------------- | 118 | /*-------------------------------------------------------------------------- |
| 121 | Dock Station | 119 | Dock Station |
| 122 | -------------------------------------------------------------------------- */ | 120 | -------------------------------------------------------------------------- */ |
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index 29bf945143e8..65b3f5888f42 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h | |||
| @@ -98,8 +98,6 @@ acpi_os_table_override(struct acpi_table_header *existing_table, | |||
| 98 | /* | 98 | /* |
| 99 | * Spinlock primitives | 99 | * Spinlock primitives |
| 100 | */ | 100 | */ |
| 101 | acpi_status acpi_os_create_lock(acpi_spinlock * out_handle); | ||
| 102 | |||
| 103 | void acpi_os_delete_lock(acpi_spinlock handle); | 101 | void acpi_os_delete_lock(acpi_spinlock handle); |
| 104 | 102 | ||
| 105 | acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock handle); | 103 | acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock handle); |
| @@ -223,25 +221,15 @@ acpi_os_write_memory(acpi_physical_address address, u32 value, u32 width); | |||
| 223 | */ | 221 | */ |
| 224 | acpi_status | 222 | acpi_status |
| 225 | acpi_os_read_pci_configuration(struct acpi_pci_id *pci_id, | 223 | acpi_os_read_pci_configuration(struct acpi_pci_id *pci_id, |
| 226 | u32 reg, u32 *value, u32 width); | 224 | u32 reg, u64 *value, u32 width); |
| 227 | 225 | ||
| 228 | acpi_status | 226 | acpi_status |
| 229 | acpi_os_write_pci_configuration(struct acpi_pci_id *pci_id, | 227 | acpi_os_write_pci_configuration(struct acpi_pci_id *pci_id, |
| 230 | u32 reg, u64 value, u32 width); | 228 | u32 reg, u64 value, u32 width); |
| 231 | 229 | ||
| 232 | /* | 230 | /* |
| 233 | * Interim function needed for PCI IRQ routing | ||
| 234 | */ | ||
| 235 | void | ||
| 236 | acpi_os_derive_pci_id(acpi_handle device, | ||
| 237 | acpi_handle region, struct acpi_pci_id **pci_id); | ||
| 238 | |||
| 239 | /* | ||
| 240 | * Miscellaneous | 231 | * Miscellaneous |
| 241 | */ | 232 | */ |
| 242 | acpi_status acpi_os_validate_interface(char *interface); | ||
| 243 | acpi_status acpi_osi_invalidate(char* interface); | ||
| 244 | |||
| 245 | acpi_status | 233 | acpi_status |
| 246 | acpi_os_validate_address(u8 space_id, acpi_physical_address address, | 234 | acpi_os_validate_address(u8 space_id, acpi_physical_address address, |
| 247 | acpi_size length, char *name); | 235 | acpi_size length, char *name); |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 984cdc62e30b..53b7cfd924a3 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
| @@ -47,7 +47,7 @@ | |||
| 47 | 47 | ||
| 48 | /* Current ACPICA subsystem version in YYYYMMDD format */ | 48 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
| 49 | 49 | ||
| 50 | #define ACPI_CA_VERSION 0x20100702 | 50 | #define ACPI_CA_VERSION 0x20101013 |
| 51 | 51 | ||
| 52 | #include "actypes.h" | 52 | #include "actypes.h" |
| 53 | #include "actbl.h" | 53 | #include "actbl.h" |
| @@ -72,6 +72,7 @@ extern u8 acpi_gbl_truncate_io_addresses; | |||
| 72 | 72 | ||
| 73 | extern u32 acpi_current_gpe_count; | 73 | extern u32 acpi_current_gpe_count; |
| 74 | extern struct acpi_table_fadt acpi_gbl_FADT; | 74 | extern struct acpi_table_fadt acpi_gbl_FADT; |
| 75 | extern u8 acpi_gbl_system_awake_and_running; | ||
| 75 | 76 | ||
| 76 | extern u32 acpi_rsdt_forced; | 77 | extern u32 acpi_rsdt_forced; |
| 77 | /* | 78 | /* |
| @@ -105,6 +106,10 @@ const char *acpi_format_exception(acpi_status exception); | |||
| 105 | 106 | ||
| 106 | acpi_status acpi_purge_cached_objects(void); | 107 | acpi_status acpi_purge_cached_objects(void); |
| 107 | 108 | ||
| 109 | acpi_status acpi_install_interface(acpi_string interface_name); | ||
| 110 | |||
| 111 | acpi_status acpi_remove_interface(acpi_string interface_name); | ||
| 112 | |||
| 108 | /* | 113 | /* |
| 109 | * ACPI Memory management | 114 | * ACPI Memory management |
| 110 | */ | 115 | */ |
| @@ -263,6 +268,8 @@ acpi_remove_gpe_handler(acpi_handle gpe_device, | |||
| 263 | acpi_status acpi_install_exception_handler(acpi_exception_handler handler); | 268 | acpi_status acpi_install_exception_handler(acpi_exception_handler handler); |
| 264 | #endif | 269 | #endif |
| 265 | 270 | ||
| 271 | acpi_status acpi_install_interface_handler(acpi_interface_handler handler); | ||
| 272 | |||
| 266 | /* | 273 | /* |
| 267 | * Event interfaces | 274 | * Event interfaces |
| 268 | */ | 275 | */ |
| @@ -308,6 +315,8 @@ acpi_install_gpe_block(acpi_handle gpe_device, | |||
| 308 | 315 | ||
| 309 | acpi_status acpi_remove_gpe_block(acpi_handle gpe_device); | 316 | acpi_status acpi_remove_gpe_block(acpi_handle gpe_device); |
| 310 | 317 | ||
| 318 | acpi_status acpi_update_gpes(void); | ||
| 319 | |||
| 311 | /* | 320 | /* |
| 312 | * Resource interfaces | 321 | * Resource interfaces |
| 313 | */ | 322 | */ |
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 5db8f472fec9..2b134b691e34 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
| @@ -115,7 +115,6 @@ | |||
| 115 | * | 115 | * |
| 116 | * ACPI_SIZE 16/32/64-bit unsigned value | 116 | * ACPI_SIZE 16/32/64-bit unsigned value |
| 117 | * ACPI_NATIVE_INT 16/32/64-bit signed value | 117 | * ACPI_NATIVE_INT 16/32/64-bit signed value |
| 118 | * | ||
| 119 | */ | 118 | */ |
| 120 | 119 | ||
| 121 | /******************************************************************************* | 120 | /******************************************************************************* |
| @@ -132,6 +131,16 @@ typedef COMPILER_DEPENDENT_INT64 INT64; | |||
| 132 | 131 | ||
| 133 | /*! [End] no source code translation !*/ | 132 | /*! [End] no source code translation !*/ |
| 134 | 133 | ||
| 134 | /* | ||
| 135 | * Value returned by acpi_os_get_thread_id. There is no standard "thread_id" | ||
| 136 | * across operating systems or even the various UNIX systems. Since ACPICA | ||
| 137 | * only needs the thread ID as a unique thread identifier, we use a u64 | ||
| 138 | * as the only common data type - it will accommodate any type of pointer or | ||
| 139 | * any type of integer. It is up to the host-dependent OSL to cast the | ||
| 140 | * native thread ID type to a u64 (in acpi_os_get_thread_id). | ||
| 141 | */ | ||
| 142 | #define acpi_thread_id u64 | ||
| 143 | |||
| 135 | /******************************************************************************* | 144 | /******************************************************************************* |
| 136 | * | 145 | * |
| 137 | * Types specific to 64-bit targets | 146 | * Types specific to 64-bit targets |
| @@ -211,12 +220,6 @@ typedef u32 acpi_physical_address; | |||
| 211 | * | 220 | * |
| 212 | ******************************************************************************/ | 221 | ******************************************************************************/ |
| 213 | 222 | ||
| 214 | /* Value returned by acpi_os_get_thread_id */ | ||
| 215 | |||
| 216 | #ifndef acpi_thread_id | ||
| 217 | #define acpi_thread_id acpi_size | ||
| 218 | #endif | ||
| 219 | |||
| 220 | /* Flags for acpi_os_acquire_lock/acpi_os_release_lock */ | 223 | /* Flags for acpi_os_acquire_lock/acpi_os_release_lock */ |
| 221 | 224 | ||
| 222 | #ifndef acpi_cpu_flags | 225 | #ifndef acpi_cpu_flags |
| @@ -375,16 +378,6 @@ typedef void *acpi_handle; /* Actually a ptr to a NS Node */ | |||
| 375 | typedef u8 acpi_owner_id; | 378 | typedef u8 acpi_owner_id; |
| 376 | #define ACPI_OWNER_ID_MAX 0xFF | 379 | #define ACPI_OWNER_ID_MAX 0xFF |
| 377 | 380 | ||
| 378 | struct uint64_struct { | ||
| 379 | u32 lo; | ||
| 380 | u32 hi; | ||
| 381 | }; | ||
| 382 | |||
| 383 | union uint64_overlay { | ||
| 384 | u64 full; | ||
| 385 | struct uint64_struct part; | ||
| 386 | }; | ||
| 387 | |||
| 388 | #define ACPI_INTEGER_BIT_SIZE 64 | 381 | #define ACPI_INTEGER_BIT_SIZE 64 |
| 389 | #define ACPI_MAX_DECIMAL_DIGITS 20 /* 2^64 = 18,446,744,073,709,551,616 */ | 382 | #define ACPI_MAX_DECIMAL_DIGITS 20 /* 2^64 = 18,446,744,073,709,551,616 */ |
| 390 | 383 | ||
| @@ -950,6 +943,9 @@ acpi_status(*acpi_walk_callback) (acpi_handle object, | |||
| 950 | u32 nesting_level, | 943 | u32 nesting_level, |
| 951 | void *context, void **return_value); | 944 | void *context, void **return_value); |
| 952 | 945 | ||
| 946 | typedef | ||
| 947 | u32 (*acpi_interface_handler) (acpi_string interface_name, u32 supported); | ||
| 948 | |||
| 953 | /* Interrupt handler return values */ | 949 | /* Interrupt handler return values */ |
| 954 | 950 | ||
| 955 | #define ACPI_INTERRUPT_NOT_HANDLED 0x00 | 951 | #define ACPI_INTERRUPT_NOT_HANDLED 0x00 |
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h index c05aeba9e8f0..a3e334ab1119 100644 --- a/include/acpi/platform/acenv.h +++ b/include/acpi/platform/acenv.h | |||
| @@ -193,6 +193,12 @@ | |||
| 193 | #define ACPI_MUTEX_TYPE ACPI_BINARY_SEMAPHORE | 193 | #define ACPI_MUTEX_TYPE ACPI_BINARY_SEMAPHORE |
| 194 | #endif | 194 | #endif |
| 195 | 195 | ||
| 196 | /* "inline" keywords - configurable since inline is not standardized */ | ||
| 197 | |||
| 198 | #ifndef ACPI_INLINE | ||
| 199 | #define ACPI_INLINE | ||
| 200 | #endif | ||
| 201 | |||
| 196 | /* | 202 | /* |
| 197 | * Debugger threading model | 203 | * Debugger threading model |
| 198 | * Use single threaded if the entire subsystem is contained in an application | 204 | * Use single threaded if the entire subsystem is contained in an application |
diff --git a/include/acpi/platform/acgcc.h b/include/acpi/platform/acgcc.h index 0cd53e3cd1a3..5dcb9537343c 100644 --- a/include/acpi/platform/acgcc.h +++ b/include/acpi/platform/acgcc.h | |||
| @@ -44,6 +44,8 @@ | |||
| 44 | #ifndef __ACGCC_H__ | 44 | #ifndef __ACGCC_H__ |
| 45 | #define __ACGCC_H__ | 45 | #define __ACGCC_H__ |
| 46 | 46 | ||
| 47 | #define ACPI_INLINE __inline__ | ||
| 48 | |||
| 47 | /* Function name is used for debug output. Non-ANSI, compiler-dependent */ | 49 | /* Function name is used for debug output. Non-ANSI, compiler-dependent */ |
| 48 | 50 | ||
| 49 | #define ACPI_GET_FUNCTION_NAME __func__ | 51 | #define ACPI_GET_FUNCTION_NAME __func__ |
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 103f08aca764..572189e37133 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h | |||
| @@ -75,7 +75,6 @@ | |||
| 75 | #define acpi_cache_t struct kmem_cache | 75 | #define acpi_cache_t struct kmem_cache |
| 76 | #define acpi_spinlock spinlock_t * | 76 | #define acpi_spinlock spinlock_t * |
| 77 | #define acpi_cpu_flags unsigned long | 77 | #define acpi_cpu_flags unsigned long |
| 78 | #define acpi_thread_id struct task_struct * | ||
| 79 | 78 | ||
| 80 | #else /* !__KERNEL__ */ | 79 | #else /* !__KERNEL__ */ |
| 81 | 80 | ||
| @@ -88,7 +87,7 @@ | |||
| 88 | /* Host-dependent types and defines for user-space ACPICA */ | 87 | /* Host-dependent types and defines for user-space ACPICA */ |
| 89 | 88 | ||
| 90 | #define ACPI_FLUSH_CPU_CACHE() | 89 | #define ACPI_FLUSH_CPU_CACHE() |
| 91 | #define acpi_thread_id pthread_t | 90 | #define ACPI_CAST_PTHREAD_T(pthread) ((acpi_thread_id) (pthread)) |
| 92 | 91 | ||
| 93 | #if defined(__ia64__) || defined(__x86_64__) | 92 | #if defined(__ia64__) || defined(__x86_64__) |
| 94 | #define ACPI_MACHINE_WIDTH 64 | 93 | #define ACPI_MACHINE_WIDTH 64 |
| @@ -113,12 +112,13 @@ | |||
| 113 | 112 | ||
| 114 | 113 | ||
| 115 | #ifdef __KERNEL__ | 114 | #ifdef __KERNEL__ |
| 115 | #include <acpi/actypes.h> | ||
| 116 | /* | 116 | /* |
| 117 | * Overrides for in-kernel ACPICA | 117 | * Overrides for in-kernel ACPICA |
| 118 | */ | 118 | */ |
| 119 | static inline acpi_thread_id acpi_os_get_thread_id(void) | 119 | static inline acpi_thread_id acpi_os_get_thread_id(void) |
| 120 | { | 120 | { |
| 121 | return current; | 121 | return (acpi_thread_id)(unsigned long)current; |
| 122 | } | 122 | } |
| 123 | 123 | ||
| 124 | /* | 124 | /* |
| @@ -127,7 +127,6 @@ static inline acpi_thread_id acpi_os_get_thread_id(void) | |||
| 127 | * However, boot has (system_state != SYSTEM_RUNNING) | 127 | * However, boot has (system_state != SYSTEM_RUNNING) |
| 128 | * to quiet __might_sleep() in kmalloc() and resume does not. | 128 | * to quiet __might_sleep() in kmalloc() and resume does not. |
| 129 | */ | 129 | */ |
| 130 | #include <acpi/actypes.h> | ||
| 131 | static inline void *acpi_os_allocate(acpi_size size) | 130 | static inline void *acpi_os_allocate(acpi_size size) |
| 132 | { | 131 | { |
| 133 | return kmalloc(size, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL); | 132 | return kmalloc(size, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL); |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index c227757feb06..050a7bccb836 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
| @@ -245,8 +245,6 @@ int acpi_check_resource_conflict(const struct resource *res); | |||
| 245 | 245 | ||
| 246 | int acpi_check_region(resource_size_t start, resource_size_t n, | 246 | int acpi_check_region(resource_size_t start, resource_size_t n, |
| 247 | const char *name); | 247 | const char *name); |
| 248 | int acpi_check_mem_region(resource_size_t start, resource_size_t n, | ||
| 249 | const char *name); | ||
| 250 | 248 | ||
| 251 | int acpi_resources_are_enforced(void); | 249 | int acpi_resources_are_enforced(void); |
| 252 | 250 | ||
| @@ -308,6 +306,9 @@ extern acpi_status acpi_pci_osc_control_set(acpi_handle handle, | |||
| 308 | u32 *mask, u32 req); | 306 | u32 *mask, u32 req); |
| 309 | extern void acpi_early_init(void); | 307 | extern void acpi_early_init(void); |
| 310 | 308 | ||
| 309 | int acpi_os_map_generic_address(struct acpi_generic_address *addr); | ||
| 310 | void acpi_os_unmap_generic_address(struct acpi_generic_address *addr); | ||
| 311 | |||
| 311 | #else /* !CONFIG_ACPI */ | 312 | #else /* !CONFIG_ACPI */ |
| 312 | 313 | ||
| 313 | #define acpi_disabled 1 | 314 | #define acpi_disabled 1 |
| @@ -344,12 +345,6 @@ static inline int acpi_check_region(resource_size_t start, resource_size_t n, | |||
| 344 | return 0; | 345 | return 0; |
| 345 | } | 346 | } |
| 346 | 347 | ||
| 347 | static inline int acpi_check_mem_region(resource_size_t start, | ||
| 348 | resource_size_t n, const char *name) | ||
| 349 | { | ||
| 350 | return 0; | ||
| 351 | } | ||
| 352 | |||
| 353 | struct acpi_table_header; | 348 | struct acpi_table_header; |
| 354 | static inline int acpi_table_parse(char *id, | 349 | static inline int acpi_table_parse(char *id, |
| 355 | int (*handler)(struct acpi_table_header *)) | 350 | int (*handler)(struct acpi_table_header *)) |
