diff options
Diffstat (limited to 'include/acpi')
-rw-r--r-- | include/acpi/acpi_bus.h | 4 | ||||
-rw-r--r-- | include/acpi/acpi_drivers.h | 10 | ||||
-rw-r--r-- | include/acpi/acpixf.h | 9 | ||||
-rw-r--r-- | include/acpi/actypes.h | 20 | ||||
-rw-r--r-- | include/acpi/platform/acgcc.h | 4 | ||||
-rw-r--r-- | include/acpi/platform/aclinux.h | 63 | ||||
-rw-r--r-- | include/acpi/processor.h | 1 | ||||
-rw-r--r-- | include/acpi/video.h | 4 |
8 files changed, 64 insertions, 51 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index c34b11022908..bf1f43bd9016 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -168,7 +168,7 @@ struct acpi_device_dir { | |||
168 | 168 | ||
169 | /* Plug and Play */ | 169 | /* Plug and Play */ |
170 | 170 | ||
171 | typedef char acpi_bus_id[5]; | 171 | typedef char acpi_bus_id[8]; |
172 | typedef unsigned long acpi_bus_address; | 172 | typedef unsigned long acpi_bus_address; |
173 | typedef char acpi_hardware_id[15]; | 173 | typedef char acpi_hardware_id[15]; |
174 | typedef char acpi_unique_id[9]; | 174 | typedef char acpi_unique_id[9]; |
@@ -365,10 +365,10 @@ struct acpi_bus_type { | |||
365 | int register_acpi_bus_type(struct acpi_bus_type *); | 365 | int register_acpi_bus_type(struct acpi_bus_type *); |
366 | int unregister_acpi_bus_type(struct acpi_bus_type *); | 366 | int unregister_acpi_bus_type(struct acpi_bus_type *); |
367 | struct device *acpi_get_physical_device(acpi_handle); | 367 | struct device *acpi_get_physical_device(acpi_handle); |
368 | struct device *acpi_get_physical_pci_device(acpi_handle); | ||
369 | 368 | ||
370 | /* helper */ | 369 | /* helper */ |
371 | acpi_handle acpi_get_child(acpi_handle, acpi_integer); | 370 | acpi_handle acpi_get_child(acpi_handle, acpi_integer); |
371 | int acpi_is_root_bridge(acpi_handle); | ||
372 | acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int); | 372 | acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int); |
373 | #define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)((dev)->archdata.acpi_handle)) | 373 | #define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)((dev)->archdata.acpi_handle)) |
374 | 374 | ||
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index 5e8ed3a78cd0..f4906f6568d4 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h | |||
@@ -90,17 +90,15 @@ int acpi_pci_link_free_irq(acpi_handle handle); | |||
90 | 90 | ||
91 | /* ACPI PCI Interrupt Routing (pci_irq.c) */ | 91 | /* ACPI PCI Interrupt Routing (pci_irq.c) */ |
92 | 92 | ||
93 | int acpi_pci_irq_add_prt(acpi_handle handle, int segment, int bus); | 93 | int acpi_pci_irq_add_prt(acpi_handle handle, struct pci_bus *bus); |
94 | void acpi_pci_irq_del_prt(int segment, int bus); | 94 | void acpi_pci_irq_del_prt(struct pci_bus *bus); |
95 | 95 | ||
96 | /* ACPI PCI Device Binding (pci_bind.c) */ | 96 | /* ACPI PCI Device Binding (pci_bind.c) */ |
97 | 97 | ||
98 | struct pci_bus; | 98 | struct pci_bus; |
99 | 99 | ||
100 | acpi_status acpi_get_pci_id(acpi_handle handle, struct acpi_pci_id *id); | 100 | struct pci_dev *acpi_get_pci_dev(acpi_handle); |
101 | int acpi_pci_bind(struct acpi_device *device); | 101 | int acpi_pci_bind_root(struct acpi_device *device); |
102 | int acpi_pci_bind_root(struct acpi_device *device, struct acpi_pci_id *id, | ||
103 | struct pci_bus *bus); | ||
104 | 102 | ||
105 | /* Arch-defined function to add a bus to the system */ | 103 | /* Arch-defined function to add a bus to the system */ |
106 | 104 | ||
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 4db89e98535d..82ec6a3c0500 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 0x20090320 | 50 | #define ACPI_CA_VERSION 0x20090521 |
51 | 51 | ||
52 | #include "actypes.h" | 52 | #include "actypes.h" |
53 | #include "actbl.h" | 53 | #include "actbl.h" |
@@ -201,6 +201,8 @@ acpi_evaluate_object_typed(acpi_handle object, | |||
201 | acpi_status | 201 | acpi_status |
202 | acpi_get_object_info(acpi_handle handle, struct acpi_buffer *return_buffer); | 202 | acpi_get_object_info(acpi_handle handle, struct acpi_buffer *return_buffer); |
203 | 203 | ||
204 | acpi_status acpi_install_method(u8 *buffer); | ||
205 | |||
204 | acpi_status | 206 | acpi_status |
205 | acpi_get_next_object(acpi_object_type type, | 207 | acpi_get_next_object(acpi_object_type type, |
206 | acpi_handle parent, | 208 | acpi_handle parent, |
@@ -375,7 +377,7 @@ acpi_status acpi_leave_sleep_state_prep(u8 sleep_state); | |||
375 | acpi_status acpi_leave_sleep_state(u8 sleep_state); | 377 | acpi_status acpi_leave_sleep_state(u8 sleep_state); |
376 | 378 | ||
377 | /* | 379 | /* |
378 | * Debug output | 380 | * Error/Warning output |
379 | */ | 381 | */ |
380 | void ACPI_INTERNAL_VAR_XFACE | 382 | void ACPI_INTERNAL_VAR_XFACE |
381 | acpi_error(const char *module_name, | 383 | acpi_error(const char *module_name, |
@@ -394,6 +396,9 @@ void ACPI_INTERNAL_VAR_XFACE | |||
394 | acpi_info(const char *module_name, | 396 | acpi_info(const char *module_name, |
395 | u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3); | 397 | u32 line_number, const char *format, ...) ACPI_PRINTF_LIKE(3); |
396 | 398 | ||
399 | /* | ||
400 | * Debug output | ||
401 | */ | ||
397 | #ifdef ACPI_DEBUG_OUTPUT | 402 | #ifdef ACPI_DEBUG_OUTPUT |
398 | 403 | ||
399 | void ACPI_INTERNAL_VAR_XFACE | 404 | void ACPI_INTERNAL_VAR_XFACE |
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index f555d927f7c0..37ba576d06e8 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
@@ -429,20 +429,12 @@ typedef unsigned long long acpi_integer; | |||
429 | 429 | ||
430 | /* Data manipulation */ | 430 | /* Data manipulation */ |
431 | 431 | ||
432 | #define ACPI_LOWORD(l) ((u16)(u32)(l)) | 432 | #define ACPI_LOBYTE(integer) ((u8) (u16)(integer)) |
433 | #define ACPI_HIWORD(l) ((u16)((((u32)(l)) >> 16) & 0xFFFF)) | 433 | #define ACPI_HIBYTE(integer) ((u8) (((u16)(integer)) >> 8)) |
434 | #define ACPI_LOBYTE(l) ((u8)(u16)(l)) | 434 | #define ACPI_LOWORD(integer) ((u16) (u32)(integer)) |
435 | #define ACPI_HIBYTE(l) ((u8)((((u16)(l)) >> 8) & 0xFF)) | 435 | #define ACPI_HIWORD(integer) ((u16)(((u32)(integer)) >> 16)) |
436 | 436 | #define ACPI_LODWORD(integer64) ((u32) (u64)(integer64)) | |
437 | /* Full 64-bit integer must be available on both 32-bit and 64-bit platforms */ | 437 | #define ACPI_HIDWORD(integer64) ((u32)(((u64)(integer64)) >> 32)) |
438 | |||
439 | struct acpi_integer_overlay { | ||
440 | u32 lo_dword; | ||
441 | u32 hi_dword; | ||
442 | }; | ||
443 | |||
444 | #define ACPI_LODWORD(integer) (ACPI_CAST_PTR (struct acpi_integer_overlay, &integer)->lo_dword) | ||
445 | #define ACPI_HIDWORD(integer) (ACPI_CAST_PTR (struct acpi_integer_overlay, &integer)->hi_dword) | ||
446 | 438 | ||
447 | #define ACPI_SET_BIT(target,bit) ((target) |= (bit)) | 439 | #define ACPI_SET_BIT(target,bit) ((target) |= (bit)) |
448 | #define ACPI_CLEAR_BIT(target,bit) ((target) &= ~(bit)) | 440 | #define ACPI_CLEAR_BIT(target,bit) ((target) &= ~(bit)) |
diff --git a/include/acpi/platform/acgcc.h b/include/acpi/platform/acgcc.h index 8e2cdc57b197..935c5d7fc86e 100644 --- a/include/acpi/platform/acgcc.h +++ b/include/acpi/platform/acgcc.h | |||
@@ -62,4 +62,8 @@ | |||
62 | */ | 62 | */ |
63 | #define ACPI_UNUSED_VAR __attribute__ ((unused)) | 63 | #define ACPI_UNUSED_VAR __attribute__ ((unused)) |
64 | 64 | ||
65 | #ifdef _ANSI | ||
66 | #define inline | ||
67 | #endif | ||
68 | |||
65 | #endif /* __ACGCC_H__ */ | 69 | #endif /* __ACGCC_H__ */ |
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h index 6d49b2a498c4..fcb8e4b159b1 100644 --- a/include/acpi/platform/aclinux.h +++ b/include/acpi/platform/aclinux.h | |||
@@ -1,11 +1,11 @@ | |||
1 | /****************************************************************************** | 1 | /****************************************************************************** |
2 | * | 2 | * |
3 | * Name: aclinux.h - OS specific defines, etc. | 3 | * Name: aclinux.h - OS specific defines, etc. for Linux |
4 | * | 4 | * |
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2008, Intel Corp. | 8 | * Copyright (C) 2000 - 2009, Intel Corp. |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -44,10 +44,13 @@ | |||
44 | #ifndef __ACLINUX_H__ | 44 | #ifndef __ACLINUX_H__ |
45 | #define __ACLINUX_H__ | 45 | #define __ACLINUX_H__ |
46 | 46 | ||
47 | /* Common (in-kernel/user-space) ACPICA configuration */ | ||
48 | |||
47 | #define ACPI_USE_SYSTEM_CLIBRARY | 49 | #define ACPI_USE_SYSTEM_CLIBRARY |
48 | #define ACPI_USE_DO_WHILE_0 | 50 | #define ACPI_USE_DO_WHILE_0 |
49 | #define ACPI_MUTEX_TYPE ACPI_BINARY_SEMAPHORE | 51 | #define ACPI_MUTEX_TYPE ACPI_BINARY_SEMAPHORE |
50 | 52 | ||
53 | |||
51 | #ifdef __KERNEL__ | 54 | #ifdef __KERNEL__ |
52 | 55 | ||
53 | #include <linux/string.h> | 56 | #include <linux/string.h> |
@@ -63,15 +66,18 @@ | |||
63 | #include <linux/spinlock_types.h> | 66 | #include <linux/spinlock_types.h> |
64 | #include <asm/current.h> | 67 | #include <asm/current.h> |
65 | 68 | ||
66 | /* Host-dependent types and defines */ | 69 | /* Host-dependent types and defines for in-kernel ACPICA */ |
67 | 70 | ||
68 | #define ACPI_MACHINE_WIDTH BITS_PER_LONG | 71 | #define ACPI_MACHINE_WIDTH BITS_PER_LONG |
69 | #define acpi_cache_t struct kmem_cache | ||
70 | #define acpi_spinlock spinlock_t * | ||
71 | #define ACPI_EXPORT_SYMBOL(symbol) EXPORT_SYMBOL(symbol); | 72 | #define ACPI_EXPORT_SYMBOL(symbol) EXPORT_SYMBOL(symbol); |
72 | #define strtoul simple_strtoul | 73 | #define strtoul simple_strtoul |
73 | 74 | ||
74 | #else /* !__KERNEL__ */ | 75 | #define acpi_cache_t struct kmem_cache |
76 | #define acpi_spinlock spinlock_t * | ||
77 | #define acpi_cpu_flags unsigned long | ||
78 | #define acpi_thread_id struct task_struct * | ||
79 | |||
80 | #else /* !__KERNEL__ */ | ||
75 | 81 | ||
76 | #include <stdarg.h> | 82 | #include <stdarg.h> |
77 | #include <string.h> | 83 | #include <string.h> |
@@ -79,6 +85,11 @@ | |||
79 | #include <ctype.h> | 85 | #include <ctype.h> |
80 | #include <unistd.h> | 86 | #include <unistd.h> |
81 | 87 | ||
88 | /* Host-dependent types and defines for user-space ACPICA */ | ||
89 | |||
90 | #define ACPI_FLUSH_CPU_CACHE() | ||
91 | #define acpi_thread_id pthread_t | ||
92 | |||
82 | #if defined(__ia64__) || defined(__x86_64__) | 93 | #if defined(__ia64__) || defined(__x86_64__) |
83 | #define ACPI_MACHINE_WIDTH 64 | 94 | #define ACPI_MACHINE_WIDTH 64 |
84 | #define COMPILER_DEPENDENT_INT64 long | 95 | #define COMPILER_DEPENDENT_INT64 long |
@@ -94,17 +105,17 @@ | |||
94 | #define __cdecl | 105 | #define __cdecl |
95 | #endif | 106 | #endif |
96 | 107 | ||
97 | #define ACPI_FLUSH_CPU_CACHE() | 108 | #endif /* __KERNEL__ */ |
98 | #endif /* __KERNEL__ */ | ||
99 | 109 | ||
100 | /* Linux uses GCC */ | 110 | /* Linux uses GCC */ |
101 | 111 | ||
102 | #include "acgcc.h" | 112 | #include "acgcc.h" |
103 | 113 | ||
104 | #define acpi_cpu_flags unsigned long | ||
105 | |||
106 | #define acpi_thread_id struct task_struct * | ||
107 | 114 | ||
115 | #ifdef __KERNEL__ | ||
116 | /* | ||
117 | * Overrides for in-kernel ACPICA | ||
118 | */ | ||
108 | static inline acpi_thread_id acpi_os_get_thread_id(void) | 119 | static inline acpi_thread_id acpi_os_get_thread_id(void) |
109 | { | 120 | { |
110 | return current; | 121 | return current; |
@@ -119,30 +130,32 @@ static inline acpi_thread_id acpi_os_get_thread_id(void) | |||
119 | #include <acpi/actypes.h> | 130 | #include <acpi/actypes.h> |
120 | static inline void *acpi_os_allocate(acpi_size size) | 131 | static inline void *acpi_os_allocate(acpi_size size) |
121 | { | 132 | { |
122 | return kmalloc(size, irqs_disabled()? GFP_ATOMIC : GFP_KERNEL); | 133 | return kmalloc(size, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL); |
123 | } | 134 | } |
135 | |||
124 | static inline void *acpi_os_allocate_zeroed(acpi_size size) | 136 | static inline void *acpi_os_allocate_zeroed(acpi_size size) |
125 | { | 137 | { |
126 | return kzalloc(size, irqs_disabled()? GFP_ATOMIC : GFP_KERNEL); | 138 | return kzalloc(size, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL); |
127 | } | 139 | } |
128 | 140 | ||
129 | static inline void *acpi_os_acquire_object(acpi_cache_t * cache) | 141 | static inline void *acpi_os_acquire_object(acpi_cache_t * cache) |
130 | { | 142 | { |
131 | return kmem_cache_zalloc(cache, | 143 | return kmem_cache_zalloc(cache, |
132 | irqs_disabled()? GFP_ATOMIC : GFP_KERNEL); | 144 | irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL); |
133 | } | 145 | } |
134 | 146 | ||
135 | #define ACPI_ALLOCATE(a) acpi_os_allocate(a) | 147 | #define ACPI_ALLOCATE(a) acpi_os_allocate(a) |
136 | #define ACPI_ALLOCATE_ZEROED(a) acpi_os_allocate_zeroed(a) | 148 | #define ACPI_ALLOCATE_ZEROED(a) acpi_os_allocate_zeroed(a) |
137 | #define ACPI_FREE(a) kfree(a) | 149 | #define ACPI_FREE(a) kfree(a) |
138 | 150 | ||
139 | /* | 151 | /* Used within ACPICA to show where it is safe to preempt execution */ |
140 | * We need to show where it is safe to preempt execution of ACPICA | 152 | |
141 | */ | 153 | #define ACPI_PREEMPTION_POINT() \ |
142 | #define ACPI_PREEMPTION_POINT() \ | 154 | do { \ |
143 | do { \ | 155 | if (!irqs_disabled()) \ |
144 | if (!irqs_disabled()) \ | 156 | cond_resched(); \ |
145 | cond_resched(); \ | ||
146 | } while (0) | 157 | } while (0) |
147 | 158 | ||
148 | #endif /* __ACLINUX_H__ */ | 159 | #endif /* __KERNEL__ */ |
160 | |||
161 | #endif /* __ACLINUX_H__ */ | ||
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 4927c063347c..baf1e0a9a7ee 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -258,6 +258,7 @@ DECLARE_PER_CPU(struct acpi_processor *, processors); | |||
258 | extern struct acpi_processor_errata errata; | 258 | extern struct acpi_processor_errata errata; |
259 | 259 | ||
260 | void arch_acpi_processor_init_pdc(struct acpi_processor *pr); | 260 | void arch_acpi_processor_init_pdc(struct acpi_processor *pr); |
261 | void arch_acpi_processor_cleanup_pdc(struct acpi_processor *pr); | ||
261 | 262 | ||
262 | #ifdef ARCH_HAS_POWER_INIT | 263 | #ifdef ARCH_HAS_POWER_INIT |
263 | void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags, | 264 | void acpi_processor_power_init_bm_check(struct acpi_processor_flags *flags, |
diff --git a/include/acpi/video.h b/include/acpi/video.h index af6fe95fd3d0..cf7be3dd157b 100644 --- a/include/acpi/video.h +++ b/include/acpi/video.h | |||
@@ -3,10 +3,10 @@ | |||
3 | 3 | ||
4 | #if (defined CONFIG_ACPI_VIDEO || defined CONFIG_ACPI_VIDEO_MODULE) | 4 | #if (defined CONFIG_ACPI_VIDEO || defined CONFIG_ACPI_VIDEO_MODULE) |
5 | extern int acpi_video_register(void); | 5 | extern int acpi_video_register(void); |
6 | extern int acpi_video_exit(void); | 6 | extern void acpi_video_unregister(void); |
7 | #else | 7 | #else |
8 | static inline int acpi_video_register(void) { return 0; } | 8 | static inline int acpi_video_register(void) { return 0; } |
9 | static inline void acpi_video_exit(void) { return; } | 9 | static inline void acpi_video_unregister(void) { return; } |
10 | #endif | 10 | #endif |
11 | 11 | ||
12 | #endif | 12 | #endif |