Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 2 | * acpi.h - ACPI Interface |
| 3 | * |
| 4 | * Copyright (C) 2001 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com> |
| 5 | * |
| 6 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by |
| 10 | * the Free Software Foundation; either version 2 of the License, or |
| 11 | * (at your option) any later version. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License |
| 19 | * along with this program; if not, write to the Free Software |
| 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 21 | * |
| 22 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 23 | */ |
| 24 | |
| 25 | #ifndef _LINUX_ACPI_H |
| 26 | #define _LINUX_ACPI_H |
| 27 | |
David Mosberger | 3f5948f | 2005-06-06 15:50:09 -0700 | [diff] [blame] | 28 | |
Len Brown | 25be5e6 | 2005-05-27 04:21:50 -0400 | [diff] [blame] | 29 | #ifdef CONFIG_ACPI |
| 30 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | #ifndef _LINUX |
| 32 | #define _LINUX |
| 33 | #endif |
| 34 | |
| 35 | #include <linux/list.h> |
| 36 | |
| 37 | #include <acpi/acpi.h> |
| 38 | #include <acpi/acpi_bus.h> |
| 39 | #include <acpi/acpi_drivers.h> |
Yasunori Goto | 762834e | 2006-06-23 02:03:19 -0700 | [diff] [blame] | 40 | #include <acpi/acpi_numa.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 41 | #include <asm/acpi.h> |
| 42 | |
| 43 | |
Len Brown | 888ba6c | 2005-08-24 12:07:20 -0400 | [diff] [blame] | 44 | #ifdef CONFIG_ACPI |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 45 | |
| 46 | enum acpi_irq_model_id { |
| 47 | ACPI_IRQ_MODEL_PIC = 0, |
| 48 | ACPI_IRQ_MODEL_IOAPIC, |
| 49 | ACPI_IRQ_MODEL_IOSAPIC, |
John Keller | 3948ec9 | 2006-12-22 11:50:04 -0600 | [diff] [blame] | 50 | ACPI_IRQ_MODEL_PLATFORM, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 51 | ACPI_IRQ_MODEL_COUNT |
| 52 | }; |
| 53 | |
| 54 | extern enum acpi_irq_model_id acpi_irq_model; |
| 55 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 56 | typedef struct { |
| 57 | u8 type; |
| 58 | u8 length; |
| 59 | } __attribute__ ((packed)) acpi_table_entry_header; |
| 60 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 61 | /* Multiple APIC Description Table (MADT) */ |
| 62 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 63 | enum acpi_madt_entry_id { |
| 64 | ACPI_MADT_LAPIC = 0, |
| 65 | ACPI_MADT_IOAPIC, |
| 66 | ACPI_MADT_INT_SRC_OVR, |
| 67 | ACPI_MADT_NMI_SRC, |
| 68 | ACPI_MADT_LAPIC_NMI, |
| 69 | ACPI_MADT_LAPIC_ADDR_OVR, |
| 70 | ACPI_MADT_IOSAPIC, |
| 71 | ACPI_MADT_LSAPIC, |
| 72 | ACPI_MADT_PLAT_INT_SRC, |
| 73 | ACPI_MADT_ENTRY_COUNT |
| 74 | }; |
| 75 | |
| 76 | typedef struct { |
| 77 | u16 polarity:2; |
| 78 | u16 trigger:2; |
| 79 | u16 reserved:12; |
| 80 | } __attribute__ ((packed)) acpi_interrupt_flags; |
| 81 | |
| 82 | struct acpi_table_lapic { |
| 83 | acpi_table_entry_header header; |
| 84 | u8 acpi_id; |
| 85 | u8 id; |
| 86 | struct { |
| 87 | u32 enabled:1; |
| 88 | u32 reserved:31; |
| 89 | } flags; |
| 90 | } __attribute__ ((packed)); |
| 91 | |
| 92 | struct acpi_table_ioapic { |
| 93 | acpi_table_entry_header header; |
| 94 | u8 id; |
| 95 | u8 reserved; |
| 96 | u32 address; |
| 97 | u32 global_irq_base; |
| 98 | } __attribute__ ((packed)); |
| 99 | |
| 100 | struct acpi_table_int_src_ovr { |
| 101 | acpi_table_entry_header header; |
| 102 | u8 bus; |
| 103 | u8 bus_irq; |
| 104 | u32 global_irq; |
| 105 | acpi_interrupt_flags flags; |
| 106 | } __attribute__ ((packed)); |
| 107 | |
| 108 | struct acpi_table_nmi_src { |
| 109 | acpi_table_entry_header header; |
| 110 | acpi_interrupt_flags flags; |
| 111 | u32 global_irq; |
| 112 | } __attribute__ ((packed)); |
| 113 | |
| 114 | struct acpi_table_lapic_nmi { |
| 115 | acpi_table_entry_header header; |
| 116 | u8 acpi_id; |
| 117 | acpi_interrupt_flags flags; |
| 118 | u8 lint; |
| 119 | } __attribute__ ((packed)); |
| 120 | |
| 121 | struct acpi_table_lapic_addr_ovr { |
| 122 | acpi_table_entry_header header; |
| 123 | u8 reserved[2]; |
| 124 | u64 address; |
| 125 | } __attribute__ ((packed)); |
| 126 | |
| 127 | struct acpi_table_iosapic { |
| 128 | acpi_table_entry_header header; |
| 129 | u8 id; |
| 130 | u8 reserved; |
| 131 | u32 global_irq_base; |
| 132 | u64 address; |
| 133 | } __attribute__ ((packed)); |
| 134 | |
| 135 | struct acpi_table_lsapic { |
| 136 | acpi_table_entry_header header; |
| 137 | u8 acpi_id; |
| 138 | u8 id; |
| 139 | u8 eid; |
| 140 | u8 reserved[3]; |
| 141 | struct { |
| 142 | u32 enabled:1; |
| 143 | u32 reserved:31; |
| 144 | } flags; |
| 145 | } __attribute__ ((packed)); |
| 146 | |
| 147 | struct acpi_table_plat_int_src { |
| 148 | acpi_table_entry_header header; |
| 149 | acpi_interrupt_flags flags; |
| 150 | u8 type; /* See acpi_interrupt_type */ |
| 151 | u8 id; |
| 152 | u8 eid; |
| 153 | u8 iosapic_vector; |
| 154 | u32 global_irq; |
Ashok Raj | 55e59c5 | 2005-03-31 22:51:10 -0500 | [diff] [blame] | 155 | struct { |
| 156 | u32 cpei_override_flag:1; |
| 157 | u32 reserved:31; |
| 158 | } plint_flags; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 159 | } __attribute__ ((packed)); |
| 160 | |
| 161 | enum acpi_interrupt_id { |
| 162 | ACPI_INTERRUPT_PMI = 1, |
| 163 | ACPI_INTERRUPT_INIT, |
| 164 | ACPI_INTERRUPT_CPEI, |
| 165 | ACPI_INTERRUPT_COUNT |
| 166 | }; |
| 167 | |
| 168 | #define ACPI_SPACE_MEM 0 |
| 169 | |
| 170 | struct acpi_gen_regaddr { |
| 171 | u8 space_id; |
| 172 | u8 bit_width; |
| 173 | u8 bit_offset; |
| 174 | u8 resv; |
| 175 | u32 addrl; |
| 176 | u32 addrh; |
| 177 | } __attribute__ ((packed)); |
| 178 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 179 | /* |
| 180 | * Simple Boot Flags |
| 181 | * http://www.microsoft.com/whdc/hwdev/resources/specs/simp_bios.mspx |
| 182 | */ |
| 183 | struct acpi_table_sbf |
| 184 | { |
| 185 | u8 sbf_signature[4]; |
| 186 | u32 sbf_len; |
| 187 | u8 sbf_revision; |
| 188 | u8 sbf_csum; |
| 189 | u8 sbf_oemid[6]; |
| 190 | u8 sbf_oemtable[8]; |
| 191 | u8 sbf_revdata[4]; |
| 192 | u8 sbf_creator[4]; |
| 193 | u8 sbf_crearev[4]; |
| 194 | u8 sbf_cmos; |
| 195 | u8 sbf_spare[3]; |
| 196 | } __attribute__ ((packed)); |
| 197 | |
| 198 | /* |
| 199 | * System Resource Affinity Table (SRAT) |
| 200 | * http://www.microsoft.com/whdc/hwdev/platform/proc/SRAT.mspx |
| 201 | */ |
| 202 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 203 | enum acpi_srat_entry_id { |
| 204 | ACPI_SRAT_PROCESSOR_AFFINITY = 0, |
| 205 | ACPI_SRAT_MEMORY_AFFINITY, |
| 206 | ACPI_SRAT_ENTRY_COUNT |
| 207 | }; |
| 208 | |
| 209 | struct acpi_table_processor_affinity { |
| 210 | acpi_table_entry_header header; |
| 211 | u8 proximity_domain; |
| 212 | u8 apic_id; |
| 213 | struct { |
| 214 | u32 enabled:1; |
| 215 | u32 reserved:31; |
| 216 | } flags; |
| 217 | u8 lsapic_eid; |
| 218 | u8 reserved[7]; |
| 219 | } __attribute__ ((packed)); |
| 220 | |
| 221 | struct acpi_table_memory_affinity { |
| 222 | acpi_table_entry_header header; |
| 223 | u8 proximity_domain; |
| 224 | u8 reserved1[5]; |
| 225 | u32 base_addr_lo; |
| 226 | u32 base_addr_hi; |
| 227 | u32 length_lo; |
| 228 | u32 length_hi; |
| 229 | u32 memory_type; /* See acpi_address_range_id */ |
| 230 | struct { |
| 231 | u32 enabled:1; |
| 232 | u32 hot_pluggable:1; |
| 233 | u32 reserved:30; |
| 234 | } flags; |
| 235 | u64 reserved2; |
| 236 | } __attribute__ ((packed)); |
| 237 | |
| 238 | enum acpi_address_range_id { |
| 239 | ACPI_ADDRESS_RANGE_MEMORY = 1, |
| 240 | ACPI_ADDRESS_RANGE_RESERVED = 2, |
| 241 | ACPI_ADDRESS_RANGE_ACPI = 3, |
| 242 | ACPI_ADDRESS_RANGE_NVS = 4, |
| 243 | ACPI_ADDRESS_RANGE_COUNT |
| 244 | }; |
| 245 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 246 | |
| 247 | /* PCI MMCONFIG */ |
| 248 | |
Greg Kroah-Hartman | 5454939 | 2005-06-23 17:35:56 -0700 | [diff] [blame] | 249 | /* Defined in PCI Firmware Specification 3.0 */ |
| 250 | struct acpi_table_mcfg_config { |
| 251 | u32 base_address; |
| 252 | u32 base_reserved; |
| 253 | u16 pci_segment_group_number; |
| 254 | u8 start_bus_number; |
| 255 | u8 end_bus_number; |
| 256 | u8 reserved[4]; |
| 257 | } __attribute__ ((packed)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 258 | |
| 259 | /* Table Handlers */ |
| 260 | |
| 261 | enum acpi_table_id { |
| 262 | ACPI_TABLE_UNKNOWN = 0, |
| 263 | ACPI_APIC, |
| 264 | ACPI_BOOT, |
| 265 | ACPI_DBGP, |
| 266 | ACPI_DSDT, |
| 267 | ACPI_ECDT, |
| 268 | ACPI_ETDT, |
| 269 | ACPI_FADT, |
| 270 | ACPI_FACS, |
| 271 | ACPI_OEMX, |
| 272 | ACPI_PSDT, |
| 273 | ACPI_SBST, |
| 274 | ACPI_SLIT, |
| 275 | ACPI_SPCR, |
| 276 | ACPI_SRAT, |
| 277 | ACPI_SSDT, |
| 278 | ACPI_SPMI, |
| 279 | ACPI_HPET, |
| 280 | ACPI_MCFG, |
| 281 | ACPI_TABLE_COUNT |
| 282 | }; |
| 283 | |
Alexey Starikovskiy | ceb6c46 | 2007-02-02 19:48:22 +0300 | [diff] [blame] | 284 | typedef int (*acpi_table_handler) (struct acpi_table_header *header); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 285 | |
| 286 | extern acpi_table_handler acpi_table_ops[ACPI_TABLE_COUNT]; |
| 287 | |
| 288 | typedef int (*acpi_madt_entry_handler) (acpi_table_entry_header *header, const unsigned long end); |
| 289 | |
| 290 | char * __acpi_map_table (unsigned long phys_addr, unsigned long size); |
| 291 | unsigned long acpi_find_rsdp (void); |
| 292 | int acpi_boot_init (void); |
| 293 | int acpi_boot_table_init (void); |
| 294 | int acpi_numa_init (void); |
| 295 | |
| 296 | int acpi_table_init (void); |
Alexey Starikovskiy | ceb6c46 | 2007-02-02 19:48:22 +0300 | [diff] [blame] | 297 | int acpi_table_parse (char *id, acpi_table_handler handler); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 298 | int acpi_table_parse_madt (enum acpi_madt_entry_id id, acpi_madt_entry_handler handler, unsigned int max_entries); |
| 299 | int acpi_table_parse_srat (enum acpi_srat_entry_id id, acpi_madt_entry_handler handler, unsigned int max_entries); |
Alexey Starikovskiy | ceb6c46 | 2007-02-02 19:48:22 +0300 | [diff] [blame] | 300 | int acpi_parse_mcfg (struct acpi_table_header *header); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 301 | void acpi_table_print (struct acpi_table_header *header, unsigned long phys_addr); |
| 302 | void acpi_table_print_madt_entry (acpi_table_entry_header *madt); |
| 303 | void acpi_table_print_srat_entry (acpi_table_entry_header *srat); |
| 304 | |
| 305 | /* the following four functions are architecture-dependent */ |
Yasunori Goto | 762834e | 2006-06-23 02:03:19 -0700 | [diff] [blame] | 306 | #ifdef CONFIG_HAVE_ARCH_PARSE_SRAT |
| 307 | #define NR_NODE_MEMBLKS MAX_NUMNODES |
| 308 | #define acpi_numa_slit_init(slit) do {} while (0) |
| 309 | #define acpi_numa_processor_affinity_init(pa) do {} while (0) |
| 310 | #define acpi_numa_memory_affinity_init(ma) do {} while (0) |
| 311 | #define acpi_numa_arch_fixup() do {} while (0) |
| 312 | #else |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 313 | void acpi_numa_slit_init (struct acpi_table_slit *slit); |
| 314 | void acpi_numa_processor_affinity_init (struct acpi_table_processor_affinity *pa); |
| 315 | void acpi_numa_memory_affinity_init (struct acpi_table_memory_affinity *ma); |
| 316 | void acpi_numa_arch_fixup(void); |
Yasunori Goto | 762834e | 2006-06-23 02:03:19 -0700 | [diff] [blame] | 317 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 318 | |
| 319 | #ifdef CONFIG_ACPI_HOTPLUG_CPU |
| 320 | /* Arch dependent functions for cpu hotplug support */ |
| 321 | int acpi_map_lsapic(acpi_handle handle, int *pcpu); |
| 322 | int acpi_unmap_lsapic(int cpu); |
| 323 | #endif /* CONFIG_ACPI_HOTPLUG_CPU */ |
| 324 | |
Kenji Kaneshige | b1bb248 | 2005-04-28 00:25:58 -0700 | [diff] [blame] | 325 | int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base); |
| 326 | int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base); |
| 327 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 328 | extern int acpi_mp_config; |
| 329 | |
Greg Kroah-Hartman | 5454939 | 2005-06-23 17:35:56 -0700 | [diff] [blame] | 330 | extern struct acpi_table_mcfg_config *pci_mmcfg_config; |
| 331 | extern int pci_mmcfg_config_num; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 332 | |
Pavel Machek | c255d84 | 2006-02-20 18:27:58 -0800 | [diff] [blame] | 333 | extern int sbf_port; |
| 334 | extern unsigned long acpi_video_flags; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 335 | |
Len Brown | 888ba6c | 2005-08-24 12:07:20 -0400 | [diff] [blame] | 336 | #else /* !CONFIG_ACPI */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 337 | |
| 338 | #define acpi_mp_config 0 |
| 339 | |
Len Brown | 888ba6c | 2005-08-24 12:07:20 -0400 | [diff] [blame] | 340 | #endif /* !CONFIG_ACPI */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 341 | |
Bob Moore | 50eca3e | 2005-09-30 19:03:00 -0400 | [diff] [blame] | 342 | int acpi_register_gsi (u32 gsi, int triggering, int polarity); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 343 | int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); |
| 344 | |
| 345 | /* |
| 346 | * This function undoes the effect of one call to acpi_register_gsi(). |
| 347 | * If this matches the last registration, any IRQ resources for gsi |
| 348 | * are freed. |
| 349 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 350 | void acpi_unregister_gsi (u32 gsi); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 351 | |
Len Brown | 6153df7b | 2005-08-25 12:27:09 -0400 | [diff] [blame] | 352 | #ifdef CONFIG_ACPI |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 353 | |
| 354 | struct acpi_prt_entry { |
| 355 | struct list_head node; |
| 356 | struct acpi_pci_id id; |
| 357 | u8 pin; |
| 358 | struct { |
| 359 | acpi_handle handle; |
| 360 | u32 index; |
| 361 | } link; |
| 362 | u32 irq; |
| 363 | }; |
| 364 | |
| 365 | struct acpi_prt_list { |
| 366 | int count; |
| 367 | struct list_head entries; |
| 368 | }; |
| 369 | |
| 370 | struct pci_dev; |
| 371 | |
| 372 | int acpi_pci_irq_enable (struct pci_dev *dev); |
David Shaohua Li | c9c3e45 | 2005-04-01 00:07:31 -0500 | [diff] [blame] | 373 | void acpi_penalize_isa_irq(int irq, int active); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 374 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 375 | void acpi_pci_irq_disable (struct pci_dev *dev); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 376 | |
| 377 | struct acpi_pci_driver { |
| 378 | struct acpi_pci_driver *next; |
| 379 | int (*add)(acpi_handle handle); |
| 380 | void (*remove)(acpi_handle handle); |
| 381 | }; |
| 382 | |
| 383 | int acpi_pci_register_driver(struct acpi_pci_driver *driver); |
| 384 | void acpi_pci_unregister_driver(struct acpi_pci_driver *driver); |
| 385 | |
Len Brown | 6153df7b | 2005-08-25 12:27:09 -0400 | [diff] [blame] | 386 | #endif /* CONFIG_ACPI */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 387 | |
| 388 | #ifdef CONFIG_ACPI_EC |
| 389 | |
| 390 | extern int ec_read(u8 addr, u8 *val); |
| 391 | extern int ec_write(u8 addr, u8 val); |
Lennart Poettering | d7a76e4 | 2006-09-05 12:12:24 -0400 | [diff] [blame] | 392 | extern int ec_transaction(u8 command, |
| 393 | const u8 *wdata, unsigned wdata_len, |
| 394 | u8 *rdata, unsigned rdata_len); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 395 | |
| 396 | #endif /*CONFIG_ACPI_EC*/ |
| 397 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 398 | extern int acpi_blacklisted(void); |
| 399 | extern void acpi_bios_year(char *s); |
| 400 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 401 | #define ACPI_CSTATE_LIMIT_DEFINED /* for driver builds */ |
| 402 | #ifdef CONFIG_ACPI |
| 403 | |
| 404 | /* |
| 405 | * Set highest legal C-state |
| 406 | * 0: C0 okay, but not C1 |
| 407 | * 1: C1 okay, but not C2 |
| 408 | * 2: C2 okay, but not C3 etc. |
| 409 | */ |
| 410 | |
| 411 | extern unsigned int max_cstate; |
| 412 | |
| 413 | static inline unsigned int acpi_get_cstate_limit(void) |
| 414 | { |
| 415 | return max_cstate; |
| 416 | } |
| 417 | static inline void acpi_set_cstate_limit(unsigned int new_limit) |
| 418 | { |
| 419 | max_cstate = new_limit; |
| 420 | return; |
| 421 | } |
| 422 | #else |
| 423 | static inline unsigned int acpi_get_cstate_limit(void) { return 0; } |
| 424 | static inline void acpi_set_cstate_limit(unsigned int new_limit) { return; } |
| 425 | #endif |
| 426 | |
| 427 | #ifdef CONFIG_ACPI_NUMA |
| 428 | int acpi_get_pxm(acpi_handle handle); |
Yasunori Goto | 1e3590e | 2006-06-27 02:53:31 -0700 | [diff] [blame] | 429 | int acpi_get_node(acpi_handle *handle); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 430 | #else |
| 431 | static inline int acpi_get_pxm(acpi_handle handle) |
| 432 | { |
| 433 | return 0; |
| 434 | } |
Yasunori Goto | 1e3590e | 2006-06-27 02:53:31 -0700 | [diff] [blame] | 435 | static inline int acpi_get_node(acpi_handle *handle) |
| 436 | { |
| 437 | return 0; |
| 438 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 439 | #endif |
Yasunori Goto | 1e3590e | 2006-06-27 02:53:31 -0700 | [diff] [blame] | 440 | extern int acpi_paddr_to_node(u64 start_addr, u64 size); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 441 | |
| 442 | extern int pnpacpi_disabled; |
| 443 | |
Andrew Morton | 53de49f | 2005-07-30 04:18:00 -0400 | [diff] [blame] | 444 | #else /* CONFIG_ACPI */ |
| 445 | |
| 446 | static inline int acpi_boot_init(void) |
| 447 | { |
| 448 | return 0; |
| 449 | } |
| 450 | |
| 451 | static inline int acpi_boot_table_init(void) |
| 452 | { |
| 453 | return 0; |
| 454 | } |
| 455 | |
Len Brown | 25be5e6 | 2005-05-27 04:21:50 -0400 | [diff] [blame] | 456 | #endif /* CONFIG_ACPI */ |
| 457 | #endif /*_LINUX_ACPI_H*/ |