diff options
Diffstat (limited to 'include/linux/acpi.h')
-rw-r--r-- | include/linux/acpi.h | 62 |
1 files changed, 47 insertions, 15 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 63f2e6ed698f..ddbe7efe590e 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #ifndef _LINUX_ACPI_H | 25 | #ifndef _LINUX_ACPI_H |
26 | #define _LINUX_ACPI_H | 26 | #define _LINUX_ACPI_H |
27 | 27 | ||
28 | #include <linux/ioport.h> /* for struct resource */ | ||
28 | 29 | ||
29 | #ifdef CONFIG_ACPI | 30 | #ifdef CONFIG_ACPI |
30 | 31 | ||
@@ -43,8 +44,6 @@ | |||
43 | #include <linux/dmi.h> | 44 | #include <linux/dmi.h> |
44 | 45 | ||
45 | 46 | ||
46 | #ifdef CONFIG_ACPI | ||
47 | |||
48 | enum acpi_irq_model_id { | 47 | enum acpi_irq_model_id { |
49 | ACPI_IRQ_MODEL_PIC = 0, | 48 | ACPI_IRQ_MODEL_PIC = 0, |
50 | ACPI_IRQ_MODEL_IOAPIC, | 49 | ACPI_IRQ_MODEL_IOAPIC, |
@@ -80,7 +79,6 @@ typedef int (*acpi_table_handler) (struct acpi_table_header *table); | |||
80 | typedef int (*acpi_table_entry_handler) (struct acpi_subtable_header *header, const unsigned long end); | 79 | typedef int (*acpi_table_entry_handler) (struct acpi_subtable_header *header, const unsigned long end); |
81 | 80 | ||
82 | char * __acpi_map_table (unsigned long phys_addr, unsigned long size); | 81 | char * __acpi_map_table (unsigned long phys_addr, unsigned long size); |
83 | unsigned long acpi_find_rsdp (void); | ||
84 | int acpi_boot_init (void); | 82 | int acpi_boot_init (void); |
85 | int acpi_boot_table_init (void); | 83 | int acpi_boot_table_init (void); |
86 | int acpi_numa_init (void); | 84 | int acpi_numa_init (void); |
@@ -115,8 +113,8 @@ int acpi_unmap_lsapic(int cpu); | |||
115 | 113 | ||
116 | int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base); | 114 | int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base); |
117 | int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base); | 115 | int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base); |
118 | 116 | void acpi_irq_stats_init(void); | |
119 | extern int acpi_mp_config; | 117 | extern u32 acpi_irq_handled; |
120 | 118 | ||
121 | extern struct acpi_mcfg_allocation *pci_mmcfg_config; | 119 | extern struct acpi_mcfg_allocation *pci_mmcfg_config; |
122 | extern int pci_mmcfg_config_num; | 120 | extern int pci_mmcfg_config_num; |
@@ -124,12 +122,6 @@ extern int pci_mmcfg_config_num; | |||
124 | extern int sbf_port; | 122 | extern int sbf_port; |
125 | extern unsigned long acpi_realmode_flags; | 123 | extern unsigned long acpi_realmode_flags; |
126 | 124 | ||
127 | #else /* !CONFIG_ACPI */ | ||
128 | |||
129 | #define acpi_mp_config 0 | ||
130 | |||
131 | #endif /* !CONFIG_ACPI */ | ||
132 | |||
133 | int acpi_register_gsi (u32 gsi, int triggering, int polarity); | 125 | int acpi_register_gsi (u32 gsi, int triggering, int polarity); |
134 | int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); | 126 | int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); |
135 | 127 | ||
@@ -145,8 +137,6 @@ extern int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity); | |||
145 | */ | 137 | */ |
146 | void acpi_unregister_gsi (u32 gsi); | 138 | void acpi_unregister_gsi (u32 gsi); |
147 | 139 | ||
148 | #ifdef CONFIG_ACPI | ||
149 | |||
150 | struct acpi_prt_entry { | 140 | struct acpi_prt_entry { |
151 | struct list_head node; | 141 | struct list_head node; |
152 | struct acpi_pci_id id; | 142 | struct acpi_pci_id id; |
@@ -179,8 +169,6 @@ struct acpi_pci_driver { | |||
179 | int acpi_pci_register_driver(struct acpi_pci_driver *driver); | 169 | int acpi_pci_register_driver(struct acpi_pci_driver *driver); |
180 | void acpi_pci_unregister_driver(struct acpi_pci_driver *driver); | 170 | void acpi_pci_unregister_driver(struct acpi_pci_driver *driver); |
181 | 171 | ||
182 | #endif /* CONFIG_ACPI */ | ||
183 | |||
184 | #ifdef CONFIG_ACPI_EC | 172 | #ifdef CONFIG_ACPI_EC |
185 | 173 | ||
186 | extern int ec_read(u8 addr, u8 *val); | 174 | extern int ec_read(u8 addr, u8 *val); |
@@ -192,6 +180,26 @@ extern int ec_transaction(u8 command, | |||
192 | 180 | ||
193 | #endif /*CONFIG_ACPI_EC*/ | 181 | #endif /*CONFIG_ACPI_EC*/ |
194 | 182 | ||
183 | #if defined(CONFIG_ACPI_WMI) || defined(CONFIG_ACPI_WMI_MODULE) | ||
184 | |||
185 | typedef void (*wmi_notify_handler) (u32 value, void *context); | ||
186 | |||
187 | extern acpi_status wmi_evaluate_method(const char *guid, u8 instance, | ||
188 | u32 method_id, | ||
189 | const struct acpi_buffer *in, | ||
190 | struct acpi_buffer *out); | ||
191 | extern acpi_status wmi_query_block(const char *guid, u8 instance, | ||
192 | struct acpi_buffer *out); | ||
193 | extern acpi_status wmi_set_block(const char *guid, u8 instance, | ||
194 | const struct acpi_buffer *in); | ||
195 | extern acpi_status wmi_install_notify_handler(const char *guid, | ||
196 | wmi_notify_handler handler, void *data); | ||
197 | extern acpi_status wmi_remove_notify_handler(const char *guid); | ||
198 | extern acpi_status wmi_get_event_data(u32 event, struct acpi_buffer *out); | ||
199 | extern bool wmi_has_guid(const char *guid); | ||
200 | |||
201 | #endif /* CONFIG_ACPI_WMI */ | ||
202 | |||
195 | extern int acpi_blacklisted(void); | 203 | extern int acpi_blacklisted(void); |
196 | #ifdef CONFIG_DMI | 204 | #ifdef CONFIG_DMI |
197 | extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d); | 205 | extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d); |
@@ -217,6 +225,13 @@ extern int pnpacpi_disabled; | |||
217 | #define PXM_INVAL (-1) | 225 | #define PXM_INVAL (-1) |
218 | #define NID_INVAL (-1) | 226 | #define NID_INVAL (-1) |
219 | 227 | ||
228 | int acpi_check_resource_conflict(struct resource *res); | ||
229 | |||
230 | int acpi_check_region(resource_size_t start, resource_size_t n, | ||
231 | const char *name); | ||
232 | int acpi_check_mem_region(resource_size_t start, resource_size_t n, | ||
233 | const char *name); | ||
234 | |||
220 | #else /* CONFIG_ACPI */ | 235 | #else /* CONFIG_ACPI */ |
221 | 236 | ||
222 | static inline int acpi_boot_init(void) | 237 | static inline int acpi_boot_init(void) |
@@ -229,5 +244,22 @@ static inline int acpi_boot_table_init(void) | |||
229 | return 0; | 244 | return 0; |
230 | } | 245 | } |
231 | 246 | ||
247 | static inline int acpi_check_resource_conflict(struct resource *res) | ||
248 | { | ||
249 | return 0; | ||
250 | } | ||
251 | |||
252 | static inline int acpi_check_region(resource_size_t start, resource_size_t n, | ||
253 | const char *name) | ||
254 | { | ||
255 | return 0; | ||
256 | } | ||
257 | |||
258 | static inline int acpi_check_mem_region(resource_size_t start, | ||
259 | resource_size_t n, const char *name) | ||
260 | { | ||
261 | return 0; | ||
262 | } | ||
263 | |||
232 | #endif /* !CONFIG_ACPI */ | 264 | #endif /* !CONFIG_ACPI */ |
233 | #endif /*_LINUX_ACPI_H*/ | 265 | #endif /*_LINUX_ACPI_H*/ |