aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2007-03-09 23:17:39 -0500
committerLen Brown <len.brown@intel.com>2007-03-09 23:17:39 -0500
commitc207908fcc451e31d7fbba31541bd04f93787eb4 (patch)
tree8b320d98527591e505d8408ab1f8b0f9fc8ff972 /arch/ia64
parenta967e127d0233f2472af64597de3f3920872310c (diff)
parent3fd0b2d9ad7612f249e5516d887ab7c61b24ddb9 (diff)
Pull altix into release branch
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/sn/kernel/io_acpi_init.c44
-rw-r--r--arch/ia64/sn/kernel/setup.c2
2 files changed, 24 insertions, 22 deletions
diff --git a/arch/ia64/sn/kernel/io_acpi_init.c b/arch/ia64/sn/kernel/io_acpi_init.c
index 8c331ca6e5c9..c6216f454ffb 100644
--- a/arch/ia64/sn/kernel/io_acpi_init.c
+++ b/arch/ia64/sn/kernel/io_acpi_init.c
@@ -53,12 +53,15 @@ sal_ioif_init(u64 *result)
53} 53}
54 54
55/* 55/*
56 * sn_hubdev_add - The 'add' function of the acpi_sn_hubdev_driver. 56 * sn_acpi_hubdev_init() - This function is called by acpi_ns_get_device_callback()
57 * Called for every "SGIHUB" or "SGITIO" device defined 57 * for all SGIHUB and SGITIO acpi devices defined in the
58 * in the ACPI namespace. 58 * DSDT. It obtains the hubdev_info pointer from the
59 * ACPI vendor resource, which the PROM setup, and sets up the
60 * hubdev_info in the pda.
59 */ 61 */
60static int __init 62
61sn_hubdev_add(struct acpi_device *device) 63static acpi_status __init
64sn_acpi_hubdev_init(acpi_handle handle, u32 depth, void *context, void **ret)
62{ 65{
63 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 66 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
64 u64 addr; 67 u64 addr;
@@ -67,18 +70,19 @@ sn_hubdev_add(struct acpi_device *device)
67 int i; 70 int i;
68 u64 nasid; 71 u64 nasid;
69 struct acpi_resource *resource; 72 struct acpi_resource *resource;
70 int ret = 0;
71 acpi_status status; 73 acpi_status status;
72 struct acpi_resource_vendor_typed *vendor; 74 struct acpi_resource_vendor_typed *vendor;
73 extern void sn_common_hubdev_init(struct hubdev_info *); 75 extern void sn_common_hubdev_init(struct hubdev_info *);
74 76
75 status = acpi_get_vendor_resource(device->handle, METHOD_NAME__CRS, 77 status = acpi_get_vendor_resource(handle, METHOD_NAME__CRS,
76 &sn_uuid, &buffer); 78 &sn_uuid, &buffer);
77 if (ACPI_FAILURE(status)) { 79 if (ACPI_FAILURE(status)) {
78 printk(KERN_ERR 80 printk(KERN_ERR
79 "sn_hubdev_add: acpi_get_vendor_resource() failed: %d\n", 81 "sn_acpi_hubdev_init: acpi_get_vendor_resource() "
80 status); 82 "(0x%x) failed for: ", status);
81 return 1; 83 acpi_ns_print_node_pathname(handle, NULL);
84 printk("\n");
85 return AE_OK; /* Continue walking namespace */
82 } 86 }
83 87
84 resource = buffer.pointer; 88 resource = buffer.pointer;
@@ -86,9 +90,10 @@ sn_hubdev_add(struct acpi_device *device)
86 if ((vendor->byte_length - sizeof(struct acpi_vendor_uuid)) != 90 if ((vendor->byte_length - sizeof(struct acpi_vendor_uuid)) !=
87 sizeof(struct hubdev_info *)) { 91 sizeof(struct hubdev_info *)) {
88 printk(KERN_ERR 92 printk(KERN_ERR
89 "sn_hubdev_add: Invalid vendor data length: %d\n", 93 "sn_acpi_hubdev_init: Invalid vendor data length: %d for: ",
90 vendor->byte_length); 94 vendor->byte_length);
91 ret = 1; 95 acpi_ns_print_node_pathname(handle, NULL);
96 printk("\n");
92 goto exit; 97 goto exit;
93 } 98 }
94 99
@@ -103,7 +108,7 @@ sn_hubdev_add(struct acpi_device *device)
103 108
104exit: 109exit:
105 kfree(buffer.pointer); 110 kfree(buffer.pointer);
106 return ret; 111 return AE_OK; /* Continue walking namespace */
107} 112}
108 113
109/* 114/*
@@ -441,14 +446,6 @@ sn_acpi_slot_fixup(struct pci_dev *dev)
441 446
442EXPORT_SYMBOL(sn_acpi_slot_fixup); 447EXPORT_SYMBOL(sn_acpi_slot_fixup);
443 448
444static struct acpi_driver acpi_sn_hubdev_driver = {
445 .name = "SGI HUBDEV Driver",
446 .ids = "SGIHUB,SGITIO",
447 .ops = {
448 .add = sn_hubdev_add,
449 },
450};
451
452 449
453/* 450/*
454 * sn_acpi_bus_fixup - Perform SN specific setup of software structs 451 * sn_acpi_bus_fixup - Perform SN specific setup of software structs
@@ -492,7 +489,10 @@ sn_io_acpi_init(void)
492 /* SN Altix does not follow the IOSAPIC IRQ routing model */ 489 /* SN Altix does not follow the IOSAPIC IRQ routing model */
493 acpi_irq_model = ACPI_IRQ_MODEL_PLATFORM; 490 acpi_irq_model = ACPI_IRQ_MODEL_PLATFORM;
494 491
495 acpi_bus_register_driver(&acpi_sn_hubdev_driver); 492 /* Setup hubdev_info for all SGIHUB/SGITIO devices */
493 acpi_get_devices("SGIHUB", sn_acpi_hubdev_init, NULL, NULL);
494 acpi_get_devices("SGITIO", sn_acpi_hubdev_init, NULL, NULL);
495
496 status = sal_ioif_init(&result); 496 status = sal_ioif_init(&result);
497 if (status || result) 497 if (status || result)
498 panic("sal_ioif_init failed: [%lx] %s\n", 498 panic("sal_ioif_init failed: [%lx] %s\n",
diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c
index 8571e52c2efd..bd5373d593e1 100644
--- a/arch/ia64/sn/kernel/setup.c
+++ b/arch/ia64/sn/kernel/setup.c
@@ -397,6 +397,8 @@ void __init sn_setup(char **cmdline_p)
397 ia64_sn_set_os_feature(OSF_PCISEGMENT_ENABLE); 397 ia64_sn_set_os_feature(OSF_PCISEGMENT_ENABLE);
398 ia64_sn_set_os_feature(OSF_ACPI_ENABLE); 398 ia64_sn_set_os_feature(OSF_ACPI_ENABLE);
399 399
400 /* Load the new DSDT and SSDT tables into the global table list. */
401 acpi_table_init();
400 402
401#if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE) 403#if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE)
402 /* 404 /*