aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/acpi.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/acpi.h')
-rw-r--r--include/linux/acpi.h62
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
48enum acpi_irq_model_id { 47enum 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);
80typedef int (*acpi_table_entry_handler) (struct acpi_subtable_header *header, const unsigned long end); 79typedef int (*acpi_table_entry_handler) (struct acpi_subtable_header *header, const unsigned long end);
81 80
82char * __acpi_map_table (unsigned long phys_addr, unsigned long size); 81char * __acpi_map_table (unsigned long phys_addr, unsigned long size);
83unsigned long acpi_find_rsdp (void);
84int acpi_boot_init (void); 82int acpi_boot_init (void);
85int acpi_boot_table_init (void); 83int acpi_boot_table_init (void);
86int acpi_numa_init (void); 84int acpi_numa_init (void);
@@ -115,8 +113,8 @@ int acpi_unmap_lsapic(int cpu);
115 113
116int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base); 114int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base);
117int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base); 115int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base);
118 116void acpi_irq_stats_init(void);
119extern int acpi_mp_config; 117extern u32 acpi_irq_handled;
120 118
121extern struct acpi_mcfg_allocation *pci_mmcfg_config; 119extern struct acpi_mcfg_allocation *pci_mmcfg_config;
122extern int pci_mmcfg_config_num; 120extern int pci_mmcfg_config_num;
@@ -124,12 +122,6 @@ extern int pci_mmcfg_config_num;
124extern int sbf_port; 122extern int sbf_port;
125extern unsigned long acpi_realmode_flags; 123extern unsigned long acpi_realmode_flags;
126 124
127#else /* !CONFIG_ACPI */
128
129#define acpi_mp_config 0
130
131#endif /* !CONFIG_ACPI */
132
133int acpi_register_gsi (u32 gsi, int triggering, int polarity); 125int acpi_register_gsi (u32 gsi, int triggering, int polarity);
134int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); 126int 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 */
146void acpi_unregister_gsi (u32 gsi); 138void acpi_unregister_gsi (u32 gsi);
147 139
148#ifdef CONFIG_ACPI
149
150struct acpi_prt_entry { 140struct 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 {
179int acpi_pci_register_driver(struct acpi_pci_driver *driver); 169int acpi_pci_register_driver(struct acpi_pci_driver *driver);
180void acpi_pci_unregister_driver(struct acpi_pci_driver *driver); 170void 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
186extern int ec_read(u8 addr, u8 *val); 174extern 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
185typedef void (*wmi_notify_handler) (u32 value, void *context);
186
187extern 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);
191extern acpi_status wmi_query_block(const char *guid, u8 instance,
192 struct acpi_buffer *out);
193extern acpi_status wmi_set_block(const char *guid, u8 instance,
194 const struct acpi_buffer *in);
195extern acpi_status wmi_install_notify_handler(const char *guid,
196 wmi_notify_handler handler, void *data);
197extern acpi_status wmi_remove_notify_handler(const char *guid);
198extern acpi_status wmi_get_event_data(u32 event, struct acpi_buffer *out);
199extern bool wmi_has_guid(const char *guid);
200
201#endif /* CONFIG_ACPI_WMI */
202
195extern int acpi_blacklisted(void); 203extern int acpi_blacklisted(void);
196#ifdef CONFIG_DMI 204#ifdef CONFIG_DMI
197extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d); 205extern 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
228int acpi_check_resource_conflict(struct resource *res);
229
230int acpi_check_region(resource_size_t start, resource_size_t n,
231 const char *name);
232int 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
222static inline int acpi_boot_init(void) 237static 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
247static inline int acpi_check_resource_conflict(struct resource *res)
248{
249 return 0;
250}
251
252static inline int acpi_check_region(resource_size_t start, resource_size_t n,
253 const char *name)
254{
255 return 0;
256}
257
258static 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*/