aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/hp/common/sba_iommu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/hp/common/sba_iommu.c')
-rw-r--r--arch/ia64/hp/common/sba_iommu.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c
index bcda5b2d121a..d43daf192b21 100644
--- a/arch/ia64/hp/common/sba_iommu.c
+++ b/arch/ia64/hp/common/sba_iommu.c
@@ -2042,7 +2042,8 @@ sba_map_ioc_to_node(struct ioc *ioc, acpi_handle handle)
2042#endif 2042#endif
2043 2043
2044static int __init 2044static int __init
2045acpi_sba_ioc_add(struct acpi_device *device) 2045acpi_sba_ioc_add(struct acpi_device *device,
2046 const struct acpi_device_id *not_used)
2046{ 2047{
2047 struct ioc *ioc; 2048 struct ioc *ioc;
2048 acpi_status status; 2049 acpi_status status;
@@ -2090,14 +2091,18 @@ static const struct acpi_device_id hp_ioc_iommu_device_ids[] = {
2090 {"HWP0004", 0}, 2091 {"HWP0004", 0},
2091 {"", 0}, 2092 {"", 0},
2092}; 2093};
2093static struct acpi_driver acpi_sba_ioc_driver = { 2094static struct acpi_scan_handler acpi_sba_ioc_handler = {
2094 .name = "IOC IOMMU Driver", 2095 .ids = hp_ioc_iommu_device_ids,
2095 .ids = hp_ioc_iommu_device_ids, 2096 .attach = acpi_sba_ioc_add,
2096 .ops = {
2097 .add = acpi_sba_ioc_add,
2098 },
2099}; 2097};
2100 2098
2099static int __init acpi_sba_ioc_init_acpi(void)
2100{
2101 return acpi_scan_add_handler(&acpi_sba_ioc_handler);
2102}
2103/* This has to run before acpi_scan_init(). */
2104arch_initcall(acpi_sba_ioc_init_acpi);
2105
2101extern struct dma_map_ops swiotlb_dma_ops; 2106extern struct dma_map_ops swiotlb_dma_ops;
2102 2107
2103static int __init 2108static int __init
@@ -2122,7 +2127,10 @@ sba_init(void)
2122 } 2127 }
2123#endif 2128#endif
2124 2129
2125 acpi_bus_register_driver(&acpi_sba_ioc_driver); 2130 /*
2131 * ioc_list should be populated by the acpi_sba_ioc_handler's .attach()
2132 * routine, but that only happens if acpi_scan_init() has already run.
2133 */
2126 if (!ioc_list) { 2134 if (!ioc_list) {
2127#ifdef CONFIG_IA64_GENERIC 2135#ifdef CONFIG_IA64_GENERIC
2128 /* 2136 /*