diff options
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/include/asm/acpi-ext.h | 1 | ||||
-rw-r--r-- | arch/ia64/include/asm/sn/acpi.h | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/acpi.c | 1 | ||||
-rw-r--r-- | arch/ia64/sn/kernel/io_acpi_init.c | 103 | ||||
-rw-r--r-- | arch/ia64/sn/kernel/io_common.c | 5 |
5 files changed, 59 insertions, 53 deletions
diff --git a/arch/ia64/include/asm/acpi-ext.h b/arch/ia64/include/asm/acpi-ext.h index 734d137dda6e..7f8362b379eb 100644 --- a/arch/ia64/include/asm/acpi-ext.h +++ b/arch/ia64/include/asm/acpi-ext.h | |||
@@ -14,7 +14,6 @@ | |||
14 | #define _ASM_IA64_ACPI_EXT_H | 14 | #define _ASM_IA64_ACPI_EXT_H |
15 | 15 | ||
16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
17 | #include <acpi/actypes.h> | ||
18 | 17 | ||
19 | extern acpi_status hp_acpi_csr_space (acpi_handle, u64 *base, u64 *length); | 18 | extern acpi_status hp_acpi_csr_space (acpi_handle, u64 *base, u64 *length); |
20 | 19 | ||
diff --git a/arch/ia64/include/asm/sn/acpi.h b/arch/ia64/include/asm/sn/acpi.h index 9ce2801cbd57..fd480db25565 100644 --- a/arch/ia64/include/asm/sn/acpi.h +++ b/arch/ia64/include/asm/sn/acpi.h | |||
@@ -9,8 +9,6 @@ | |||
9 | #ifndef _ASM_IA64_SN_ACPI_H | 9 | #ifndef _ASM_IA64_SN_ACPI_H |
10 | #define _ASM_IA64_SN_ACPI_H | 10 | #define _ASM_IA64_SN_ACPI_H |
11 | 11 | ||
12 | #include "acpi/acglobal.h" | ||
13 | |||
14 | extern int sn_acpi_rev; | 12 | extern int sn_acpi_rev; |
15 | #define SN_ACPI_BASE_SUPPORT() (sn_acpi_rev >= 0x20101) | 13 | #define SN_ACPI_BASE_SUPPORT() (sn_acpi_rev >= 0x20101) |
16 | 14 | ||
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index 0553648b7595..d541671caf4a 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
@@ -65,6 +65,7 @@ EXPORT_SYMBOL(pm_idle); | |||
65 | void (*pm_power_off) (void); | 65 | void (*pm_power_off) (void); |
66 | EXPORT_SYMBOL(pm_power_off); | 66 | EXPORT_SYMBOL(pm_power_off); |
67 | 67 | ||
68 | u32 acpi_rsdt_forced; | ||
68 | unsigned int acpi_cpei_override; | 69 | unsigned int acpi_cpei_override; |
69 | unsigned int acpi_cpei_phys_cpuid; | 70 | unsigned int acpi_cpei_phys_cpuid; |
70 | 71 | ||
diff --git a/arch/ia64/sn/kernel/io_acpi_init.c b/arch/ia64/sn/kernel/io_acpi_init.c index bc610a6c7851..c5a214026a77 100644 --- a/arch/ia64/sn/kernel/io_acpi_init.c +++ b/arch/ia64/sn/kernel/io_acpi_init.c | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <asm/sn/sn_sal.h> | 13 | #include <asm/sn/sn_sal.h> |
14 | #include "xtalk/hubdev.h" | 14 | #include "xtalk/hubdev.h" |
15 | #include <linux/acpi.h> | 15 | #include <linux/acpi.h> |
16 | #include <acpi/acnamesp.h> | ||
17 | 16 | ||
18 | 17 | ||
19 | /* | 18 | /* |
@@ -64,6 +63,7 @@ static acpi_status __init | |||
64 | sn_acpi_hubdev_init(acpi_handle handle, u32 depth, void *context, void **ret) | 63 | sn_acpi_hubdev_init(acpi_handle handle, u32 depth, void *context, void **ret) |
65 | { | 64 | { |
66 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | 65 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; |
66 | struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | ||
67 | u64 addr; | 67 | u64 addr; |
68 | struct hubdev_info *hubdev; | 68 | struct hubdev_info *hubdev; |
69 | struct hubdev_info *hubdev_ptr; | 69 | struct hubdev_info *hubdev_ptr; |
@@ -77,11 +77,12 @@ sn_acpi_hubdev_init(acpi_handle handle, u32 depth, void *context, void **ret) | |||
77 | status = acpi_get_vendor_resource(handle, METHOD_NAME__CRS, | 77 | status = acpi_get_vendor_resource(handle, METHOD_NAME__CRS, |
78 | &sn_uuid, &buffer); | 78 | &sn_uuid, &buffer); |
79 | if (ACPI_FAILURE(status)) { | 79 | if (ACPI_FAILURE(status)) { |
80 | acpi_get_name(handle, ACPI_FULL_PATHNAME, &name_buffer); | ||
80 | printk(KERN_ERR | 81 | printk(KERN_ERR |
81 | "sn_acpi_hubdev_init: acpi_get_vendor_resource() " | 82 | "sn_acpi_hubdev_init: acpi_get_vendor_resource() " |
82 | "(0x%x) failed for: ", status); | 83 | "(0x%x) failed for: %s\n", status, |
83 | acpi_ns_print_node_pathname(handle, NULL); | 84 | (char *)name_buffer.pointer); |
84 | printk("\n"); | 85 | kfree(name_buffer.pointer); |
85 | return AE_OK; /* Continue walking namespace */ | 86 | return AE_OK; /* Continue walking namespace */ |
86 | } | 87 | } |
87 | 88 | ||
@@ -89,11 +90,12 @@ sn_acpi_hubdev_init(acpi_handle handle, u32 depth, void *context, void **ret) | |||
89 | vendor = &resource->data.vendor_typed; | 90 | vendor = &resource->data.vendor_typed; |
90 | if ((vendor->byte_length - sizeof(struct acpi_vendor_uuid)) != | 91 | if ((vendor->byte_length - sizeof(struct acpi_vendor_uuid)) != |
91 | sizeof(struct hubdev_info *)) { | 92 | sizeof(struct hubdev_info *)) { |
93 | acpi_get_name(handle, ACPI_FULL_PATHNAME, &name_buffer); | ||
92 | printk(KERN_ERR | 94 | printk(KERN_ERR |
93 | "sn_acpi_hubdev_init: Invalid vendor data length: %d for: ", | 95 | "sn_acpi_hubdev_init: Invalid vendor data length: " |
94 | vendor->byte_length); | 96 | "%d for: %s\n", |
95 | acpi_ns_print_node_pathname(handle, NULL); | 97 | vendor->byte_length, (char *)name_buffer.pointer); |
96 | printk("\n"); | 98 | kfree(name_buffer.pointer); |
97 | goto exit; | 99 | goto exit; |
98 | } | 100 | } |
99 | 101 | ||
@@ -120,6 +122,7 @@ sn_get_bussoft_ptr(struct pci_bus *bus) | |||
120 | { | 122 | { |
121 | u64 addr; | 123 | u64 addr; |
122 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | 124 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; |
125 | struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | ||
123 | acpi_handle handle; | 126 | acpi_handle handle; |
124 | struct pcibus_bussoft *prom_bussoft_ptr; | 127 | struct pcibus_bussoft *prom_bussoft_ptr; |
125 | struct acpi_resource *resource; | 128 | struct acpi_resource *resource; |
@@ -131,11 +134,11 @@ sn_get_bussoft_ptr(struct pci_bus *bus) | |||
131 | status = acpi_get_vendor_resource(handle, METHOD_NAME__CRS, | 134 | status = acpi_get_vendor_resource(handle, METHOD_NAME__CRS, |
132 | &sn_uuid, &buffer); | 135 | &sn_uuid, &buffer); |
133 | if (ACPI_FAILURE(status)) { | 136 | if (ACPI_FAILURE(status)) { |
137 | acpi_get_name(handle, ACPI_FULL_PATHNAME, &name_buffer); | ||
134 | printk(KERN_ERR "%s: " | 138 | printk(KERN_ERR "%s: " |
135 | "acpi_get_vendor_resource() failed (0x%x) for: ", | 139 | "acpi_get_vendor_resource() failed (0x%x) for: %s\n", |
136 | __func__, status); | 140 | __func__, status, (char *)name_buffer.pointer); |
137 | acpi_ns_print_node_pathname(handle, NULL); | 141 | kfree(name_buffer.pointer); |
138 | printk("\n"); | ||
139 | return NULL; | 142 | return NULL; |
140 | } | 143 | } |
141 | resource = buffer.pointer; | 144 | resource = buffer.pointer; |
@@ -168,6 +171,7 @@ sn_extract_device_info(acpi_handle handle, struct pcidev_info **pcidev_info, | |||
168 | { | 171 | { |
169 | u64 addr; | 172 | u64 addr; |
170 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | 173 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; |
174 | struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | ||
171 | struct sn_irq_info *irq_info, *irq_info_prom; | 175 | struct sn_irq_info *irq_info, *irq_info_prom; |
172 | struct pcidev_info *pcidev_ptr, *pcidev_prom_ptr; | 176 | struct pcidev_info *pcidev_ptr, *pcidev_prom_ptr; |
173 | struct acpi_resource *resource; | 177 | struct acpi_resource *resource; |
@@ -182,11 +186,11 @@ sn_extract_device_info(acpi_handle handle, struct pcidev_info **pcidev_info, | |||
182 | status = acpi_get_vendor_resource(handle, METHOD_NAME__CRS, | 186 | status = acpi_get_vendor_resource(handle, METHOD_NAME__CRS, |
183 | &sn_uuid, &buffer); | 187 | &sn_uuid, &buffer); |
184 | if (ACPI_FAILURE(status)) { | 188 | if (ACPI_FAILURE(status)) { |
189 | acpi_get_name(handle, ACPI_FULL_PATHNAME, &name_buffer); | ||
185 | printk(KERN_ERR | 190 | printk(KERN_ERR |
186 | "%s: acpi_get_vendor_resource() failed (0x%x) for: ", | 191 | "%s: acpi_get_vendor_resource() failed (0x%x) for: %s\n", |
187 | __func__, status); | 192 | __func__, status, (char *)name_buffer.pointer); |
188 | acpi_ns_print_node_pathname(handle, NULL); | 193 | kfree(name_buffer.pointer); |
189 | printk("\n"); | ||
190 | return 1; | 194 | return 1; |
191 | } | 195 | } |
192 | 196 | ||
@@ -194,11 +198,12 @@ sn_extract_device_info(acpi_handle handle, struct pcidev_info **pcidev_info, | |||
194 | vendor = &resource->data.vendor_typed; | 198 | vendor = &resource->data.vendor_typed; |
195 | if ((vendor->byte_length - sizeof(struct acpi_vendor_uuid)) != | 199 | if ((vendor->byte_length - sizeof(struct acpi_vendor_uuid)) != |
196 | sizeof(struct pci_devdev_info *)) { | 200 | sizeof(struct pci_devdev_info *)) { |
201 | acpi_get_name(handle, ACPI_FULL_PATHNAME, &name_buffer); | ||
197 | printk(KERN_ERR | 202 | printk(KERN_ERR |
198 | "%s: Invalid vendor data length: %d for: ", | 203 | "%s: Invalid vendor data length: %d for: %s\n", |
199 | __func__, vendor->byte_length); | 204 | __func__, vendor->byte_length, |
200 | acpi_ns_print_node_pathname(handle, NULL); | 205 | (char *)name_buffer.pointer); |
201 | printk("\n"); | 206 | kfree(name_buffer.pointer); |
202 | ret = 1; | 207 | ret = 1; |
203 | goto exit; | 208 | goto exit; |
204 | } | 209 | } |
@@ -239,6 +244,9 @@ get_host_devfn(acpi_handle device_handle, acpi_handle rootbus_handle) | |||
239 | acpi_handle parent; | 244 | acpi_handle parent; |
240 | int slot; | 245 | int slot; |
241 | acpi_status status; | 246 | acpi_status status; |
247 | struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | ||
248 | |||
249 | acpi_get_name(device_handle, ACPI_FULL_PATHNAME, &name_buffer); | ||
242 | 250 | ||
243 | /* | 251 | /* |
244 | * Do an upward search to find the root bus device, and | 252 | * Do an upward search to find the root bus device, and |
@@ -249,9 +257,8 @@ get_host_devfn(acpi_handle device_handle, acpi_handle rootbus_handle) | |||
249 | status = acpi_get_parent(child, &parent); | 257 | status = acpi_get_parent(child, &parent); |
250 | if (ACPI_FAILURE(status)) { | 258 | if (ACPI_FAILURE(status)) { |
251 | printk(KERN_ERR "%s: acpi_get_parent() failed " | 259 | printk(KERN_ERR "%s: acpi_get_parent() failed " |
252 | "(0x%x) for: ", __func__, status); | 260 | "(0x%x) for: %s\n", __func__, status, |
253 | acpi_ns_print_node_pathname(child, NULL); | 261 | (char *)name_buffer.pointer); |
254 | printk("\n"); | ||
255 | panic("%s: Unable to find host devfn\n", __func__); | 262 | panic("%s: Unable to find host devfn\n", __func__); |
256 | } | 263 | } |
257 | if (parent == rootbus_handle) | 264 | if (parent == rootbus_handle) |
@@ -259,22 +266,20 @@ get_host_devfn(acpi_handle device_handle, acpi_handle rootbus_handle) | |||
259 | child = parent; | 266 | child = parent; |
260 | } | 267 | } |
261 | if (!child) { | 268 | if (!child) { |
262 | printk(KERN_ERR "%s: Unable to find root bus for: ", | 269 | printk(KERN_ERR "%s: Unable to find root bus for: %s\n", |
263 | __func__); | 270 | __func__, (char *)name_buffer.pointer); |
264 | acpi_ns_print_node_pathname(device_handle, NULL); | ||
265 | printk("\n"); | ||
266 | BUG(); | 271 | BUG(); |
267 | } | 272 | } |
268 | 273 | ||
269 | status = acpi_evaluate_integer(child, METHOD_NAME__ADR, NULL, &adr); | 274 | status = acpi_evaluate_integer(child, METHOD_NAME__ADR, NULL, &adr); |
270 | if (ACPI_FAILURE(status)) { | 275 | if (ACPI_FAILURE(status)) { |
271 | printk(KERN_ERR "%s: Unable to get _ADR (0x%x) for: ", | 276 | printk(KERN_ERR "%s: Unable to get _ADR (0x%x) for: %s\n", |
272 | __func__, status); | 277 | __func__, status, (char *)name_buffer.pointer); |
273 | acpi_ns_print_node_pathname(child, NULL); | ||
274 | printk("\n"); | ||
275 | panic("%s: Unable to find host devfn\n", __func__); | 278 | panic("%s: Unable to find host devfn\n", __func__); |
276 | } | 279 | } |
277 | 280 | ||
281 | kfree(name_buffer.pointer); | ||
282 | |||
278 | slot = (adr >> 16) & 0xffff; | 283 | slot = (adr >> 16) & 0xffff; |
279 | function = adr & 0xffff; | 284 | function = adr & 0xffff; |
280 | devfn = PCI_DEVFN(slot, function); | 285 | devfn = PCI_DEVFN(slot, function); |
@@ -300,27 +305,28 @@ find_matching_device(acpi_handle handle, u32 lvl, void *context, void **rv) | |||
300 | int function; | 305 | int function; |
301 | int slot; | 306 | int slot; |
302 | struct sn_pcidev_match *info = context; | 307 | struct sn_pcidev_match *info = context; |
308 | struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | ||
303 | 309 | ||
304 | status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL, | 310 | status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL, |
305 | &adr); | 311 | &adr); |
306 | if (ACPI_SUCCESS(status)) { | 312 | if (ACPI_SUCCESS(status)) { |
307 | status = acpi_get_parent(handle, &parent); | 313 | status = acpi_get_parent(handle, &parent); |
308 | if (ACPI_FAILURE(status)) { | 314 | if (ACPI_FAILURE(status)) { |
315 | acpi_get_name(handle, ACPI_FULL_PATHNAME, &name_buffer); | ||
309 | printk(KERN_ERR | 316 | printk(KERN_ERR |
310 | "%s: acpi_get_parent() failed (0x%x) for: ", | 317 | "%s: acpi_get_parent() failed (0x%x) for: %s\n", |
311 | __func__, status); | 318 | __func__, status, (char *)name_buffer.pointer); |
312 | acpi_ns_print_node_pathname(handle, NULL); | 319 | kfree(name_buffer.pointer); |
313 | printk("\n"); | ||
314 | return AE_OK; | 320 | return AE_OK; |
315 | } | 321 | } |
316 | status = acpi_evaluate_integer(parent, METHOD_NAME__BBN, | 322 | status = acpi_evaluate_integer(parent, METHOD_NAME__BBN, |
317 | NULL, &bbn); | 323 | NULL, &bbn); |
318 | if (ACPI_FAILURE(status)) { | 324 | if (ACPI_FAILURE(status)) { |
325 | acpi_get_name(handle, ACPI_FULL_PATHNAME, &name_buffer); | ||
319 | printk(KERN_ERR | 326 | printk(KERN_ERR |
320 | "%s: Failed to find _BBN in parent of: ", | 327 | "%s: Failed to find _BBN in parent of: %s\n", |
321 | __func__); | 328 | __func__, (char *)name_buffer.pointer); |
322 | acpi_ns_print_node_pathname(handle, NULL); | 329 | kfree(name_buffer.pointer); |
323 | printk("\n"); | ||
324 | return AE_OK; | 330 | return AE_OK; |
325 | } | 331 | } |
326 | 332 | ||
@@ -350,24 +356,27 @@ sn_acpi_get_pcidev_info(struct pci_dev *dev, struct pcidev_info **pcidev_info, | |||
350 | acpi_handle rootbus_handle; | 356 | acpi_handle rootbus_handle; |
351 | unsigned long long segment; | 357 | unsigned long long segment; |
352 | acpi_status status; | 358 | acpi_status status; |
359 | struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | ||
353 | 360 | ||
354 | rootbus_handle = PCI_CONTROLLER(dev)->acpi_handle; | 361 | rootbus_handle = PCI_CONTROLLER(dev)->acpi_handle; |
355 | status = acpi_evaluate_integer(rootbus_handle, METHOD_NAME__SEG, NULL, | 362 | status = acpi_evaluate_integer(rootbus_handle, METHOD_NAME__SEG, NULL, |
356 | &segment); | 363 | &segment); |
357 | if (ACPI_SUCCESS(status)) { | 364 | if (ACPI_SUCCESS(status)) { |
358 | if (segment != pci_domain_nr(dev)) { | 365 | if (segment != pci_domain_nr(dev)) { |
366 | acpi_get_name(rootbus_handle, ACPI_FULL_PATHNAME, | ||
367 | &name_buffer); | ||
359 | printk(KERN_ERR | 368 | printk(KERN_ERR |
360 | "%s: Segment number mismatch, 0x%llx vs 0x%x for: ", | 369 | "%s: Segment number mismatch, 0x%llx vs 0x%x for: %s\n", |
361 | __func__, segment, pci_domain_nr(dev)); | 370 | __func__, segment, pci_domain_nr(dev), |
362 | acpi_ns_print_node_pathname(rootbus_handle, NULL); | 371 | (char *)name_buffer.pointer); |
363 | printk("\n"); | 372 | kfree(name_buffer.pointer); |
364 | return 1; | 373 | return 1; |
365 | } | 374 | } |
366 | } else { | 375 | } else { |
367 | printk(KERN_ERR "%s: Unable to get __SEG from: ", | 376 | acpi_get_name(rootbus_handle, ACPI_FULL_PATHNAME, &name_buffer); |
368 | __func__); | 377 | printk(KERN_ERR "%s: Unable to get __SEG from: %s\n", |
369 | acpi_ns_print_node_pathname(rootbus_handle, NULL); | 378 | __func__, (char *)name_buffer.pointer); |
370 | printk("\n"); | 379 | kfree(name_buffer.pointer); |
371 | return 1; | 380 | return 1; |
372 | } | 381 | } |
373 | 382 | ||
diff --git a/arch/ia64/sn/kernel/io_common.c b/arch/ia64/sn/kernel/io_common.c index 8a924a5661dd..0d4ffa4da1da 100644 --- a/arch/ia64/sn/kernel/io_common.c +++ b/arch/ia64/sn/kernel/io_common.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/acpi.h> | 26 | #include <linux/acpi.h> |
27 | #include <asm/sn/sn2/sn_hwperf.h> | 27 | #include <asm/sn/sn2/sn_hwperf.h> |
28 | #include <asm/sn/acpi.h> | 28 | #include <asm/sn/acpi.h> |
29 | #include "acpi/acglobal.h" | ||
30 | 29 | ||
31 | extern void sn_init_cpei_timer(void); | 30 | extern void sn_init_cpei_timer(void); |
32 | extern void register_sn_procfs(void); | 31 | extern void register_sn_procfs(void); |
@@ -473,7 +472,7 @@ sn_io_early_init(void) | |||
473 | { | 472 | { |
474 | struct acpi_table_header *header = NULL; | 473 | struct acpi_table_header *header = NULL; |
475 | 474 | ||
476 | acpi_get_table_by_index(ACPI_TABLE_INDEX_DSDT, &header); | 475 | acpi_get_table(ACPI_SIG_DSDT, 1, &header); |
477 | BUG_ON(header == NULL); | 476 | BUG_ON(header == NULL); |
478 | sn_acpi_rev = header->oem_revision; | 477 | sn_acpi_rev = header->oem_revision; |
479 | } | 478 | } |
@@ -505,7 +504,7 @@ sn_io_early_init(void) | |||
505 | 504 | ||
506 | { | 505 | { |
507 | struct acpi_table_header *header; | 506 | struct acpi_table_header *header; |
508 | (void)acpi_get_table_by_index(ACPI_TABLE_INDEX_DSDT, &header); | 507 | (void)acpi_get_table(ACPI_SIG_DSDT, 1, &header); |
509 | printk(KERN_INFO "ACPI DSDT OEM Rev 0x%x\n", | 508 | printk(KERN_INFO "ACPI DSDT OEM Rev 0x%x\n", |
510 | header->oem_revision); | 509 | header->oem_revision); |
511 | } | 510 | } |