diff options
Diffstat (limited to 'arch/ia64')
-rw-r--r-- | arch/ia64/kernel/acpi-ext.c | 6 | ||||
-rw-r--r-- | arch/ia64/kernel/acpi.c | 6 | ||||
-rw-r--r-- | arch/ia64/kernel/module.c | 6 | ||||
-rw-r--r-- | arch/ia64/mm/fault.c | 2 | ||||
-rw-r--r-- | arch/ia64/pci/pci.c | 62 |
5 files changed, 35 insertions, 47 deletions
diff --git a/arch/ia64/kernel/acpi-ext.c b/arch/ia64/kernel/acpi-ext.c index 8b9318d311a0..bd09bf74f187 100644 --- a/arch/ia64/kernel/acpi-ext.c +++ b/arch/ia64/kernel/acpi-ext.c | |||
@@ -69,10 +69,10 @@ static acpi_status find_csr_space(struct acpi_resource *resource, void *data) | |||
69 | status = acpi_resource_to_address64(resource, &addr); | 69 | status = acpi_resource_to_address64(resource, &addr); |
70 | if (ACPI_SUCCESS(status) && | 70 | if (ACPI_SUCCESS(status) && |
71 | addr.resource_type == ACPI_MEMORY_RANGE && | 71 | addr.resource_type == ACPI_MEMORY_RANGE && |
72 | addr.address_length && | 72 | addr.address.address_length && |
73 | addr.producer_consumer == ACPI_CONSUMER) { | 73 | addr.producer_consumer == ACPI_CONSUMER) { |
74 | space->base = addr.minimum; | 74 | space->base = addr.address.minimum; |
75 | space->length = addr.address_length; | 75 | space->length = addr.address.address_length; |
76 | return AE_CTRL_TERMINATE; | 76 | return AE_CTRL_TERMINATE; |
77 | } | 77 | } |
78 | return AE_OK; /* keep looking */ | 78 | return AE_OK; /* keep looking */ |
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index e795cb848154..2c4498919d3c 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
@@ -380,9 +380,6 @@ static void __init acpi_madt_oem_check(char *oem_id, char *oem_table_id) | |||
380 | 380 | ||
381 | static int __init acpi_parse_madt(struct acpi_table_header *table) | 381 | static int __init acpi_parse_madt(struct acpi_table_header *table) |
382 | { | 382 | { |
383 | if (!table) | ||
384 | return -EINVAL; | ||
385 | |||
386 | acpi_madt = (struct acpi_table_madt *)table; | 383 | acpi_madt = (struct acpi_table_madt *)table; |
387 | 384 | ||
388 | acpi_madt_rev = acpi_madt->header.revision; | 385 | acpi_madt_rev = acpi_madt->header.revision; |
@@ -645,9 +642,6 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table) | |||
645 | struct acpi_table_header *fadt_header; | 642 | struct acpi_table_header *fadt_header; |
646 | struct acpi_table_fadt *fadt; | 643 | struct acpi_table_fadt *fadt; |
647 | 644 | ||
648 | if (!table) | ||
649 | return -EINVAL; | ||
650 | |||
651 | fadt_header = (struct acpi_table_header *)table; | 645 | fadt_header = (struct acpi_table_header *)table; |
652 | if (fadt_header->revision != 3) | 646 | if (fadt_header->revision != 3) |
653 | return -ENODEV; /* Only deal with ACPI 2.0 FADT */ | 647 | return -ENODEV; /* Only deal with ACPI 2.0 FADT */ |
diff --git a/arch/ia64/kernel/module.c b/arch/ia64/kernel/module.c index 24603be24c14..29754aae5177 100644 --- a/arch/ia64/kernel/module.c +++ b/arch/ia64/kernel/module.c | |||
@@ -305,14 +305,12 @@ plt_target (struct plt_entry *plt) | |||
305 | #endif /* !USE_BRL */ | 305 | #endif /* !USE_BRL */ |
306 | 306 | ||
307 | void | 307 | void |
308 | module_free (struct module *mod, void *module_region) | 308 | module_arch_freeing_init (struct module *mod) |
309 | { | 309 | { |
310 | if (mod && mod->arch.init_unw_table && | 310 | if (mod->arch.init_unw_table) { |
311 | module_region == mod->module_init) { | ||
312 | unw_remove_unwind_table(mod->arch.init_unw_table); | 311 | unw_remove_unwind_table(mod->arch.init_unw_table); |
313 | mod->arch.init_unw_table = NULL; | 312 | mod->arch.init_unw_table = NULL; |
314 | } | 313 | } |
315 | vfree(module_region); | ||
316 | } | 314 | } |
317 | 315 | ||
318 | /* Have we already seen one of these relocations? */ | 316 | /* Have we already seen one of these relocations? */ |
diff --git a/arch/ia64/mm/fault.c b/arch/ia64/mm/fault.c index 7225dad87094..ba5ba7accd0d 100644 --- a/arch/ia64/mm/fault.c +++ b/arch/ia64/mm/fault.c | |||
@@ -172,6 +172,8 @@ retry: | |||
172 | */ | 172 | */ |
173 | if (fault & VM_FAULT_OOM) { | 173 | if (fault & VM_FAULT_OOM) { |
174 | goto out_of_memory; | 174 | goto out_of_memory; |
175 | } else if (fault & VM_FAULT_SIGSEGV) { | ||
176 | goto bad_area; | ||
175 | } else if (fault & VM_FAULT_SIGBUS) { | 177 | } else if (fault & VM_FAULT_SIGBUS) { |
176 | signal = SIGBUS; | 178 | signal = SIGBUS; |
177 | goto bad_area; | 179 | goto bad_area; |
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index 291a582777cf..48cc65705db4 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c | |||
@@ -188,12 +188,12 @@ static u64 add_io_space(struct pci_root_info *info, | |||
188 | 188 | ||
189 | name = (char *)(iospace + 1); | 189 | name = (char *)(iospace + 1); |
190 | 190 | ||
191 | min = addr->minimum; | 191 | min = addr->address.minimum; |
192 | max = min + addr->address_length - 1; | 192 | max = min + addr->address.address_length - 1; |
193 | if (addr->info.io.translation_type == ACPI_SPARSE_TRANSLATION) | 193 | if (addr->info.io.translation_type == ACPI_SPARSE_TRANSLATION) |
194 | sparse = 1; | 194 | sparse = 1; |
195 | 195 | ||
196 | space_nr = new_space(addr->translation_offset, sparse); | 196 | space_nr = new_space(addr->address.translation_offset, sparse); |
197 | if (space_nr == ~0) | 197 | if (space_nr == ~0) |
198 | goto free_resource; | 198 | goto free_resource; |
199 | 199 | ||
@@ -247,7 +247,7 @@ static acpi_status resource_to_window(struct acpi_resource *resource, | |||
247 | if (ACPI_SUCCESS(status) && | 247 | if (ACPI_SUCCESS(status) && |
248 | (addr->resource_type == ACPI_MEMORY_RANGE || | 248 | (addr->resource_type == ACPI_MEMORY_RANGE || |
249 | addr->resource_type == ACPI_IO_RANGE) && | 249 | addr->resource_type == ACPI_IO_RANGE) && |
250 | addr->address_length && | 250 | addr->address.address_length && |
251 | addr->producer_consumer == ACPI_PRODUCER) | 251 | addr->producer_consumer == ACPI_PRODUCER) |
252 | return AE_OK; | 252 | return AE_OK; |
253 | 253 | ||
@@ -284,7 +284,7 @@ static acpi_status add_window(struct acpi_resource *res, void *data) | |||
284 | if (addr.resource_type == ACPI_MEMORY_RANGE) { | 284 | if (addr.resource_type == ACPI_MEMORY_RANGE) { |
285 | flags = IORESOURCE_MEM; | 285 | flags = IORESOURCE_MEM; |
286 | root = &iomem_resource; | 286 | root = &iomem_resource; |
287 | offset = addr.translation_offset; | 287 | offset = addr.address.translation_offset; |
288 | } else if (addr.resource_type == ACPI_IO_RANGE) { | 288 | } else if (addr.resource_type == ACPI_IO_RANGE) { |
289 | flags = IORESOURCE_IO; | 289 | flags = IORESOURCE_IO; |
290 | root = &ioport_resource; | 290 | root = &ioport_resource; |
@@ -297,8 +297,8 @@ static acpi_status add_window(struct acpi_resource *res, void *data) | |||
297 | resource = &info->res[info->res_num]; | 297 | resource = &info->res[info->res_num]; |
298 | resource->name = info->name; | 298 | resource->name = info->name; |
299 | resource->flags = flags; | 299 | resource->flags = flags; |
300 | resource->start = addr.minimum + offset; | 300 | resource->start = addr.address.minimum + offset; |
301 | resource->end = resource->start + addr.address_length - 1; | 301 | resource->end = resource->start + addr.address.address_length - 1; |
302 | info->res_offset[info->res_num] = offset; | 302 | info->res_offset[info->res_num] = offset; |
303 | 303 | ||
304 | if (insert_resource(root, resource)) { | 304 | if (insert_resource(root, resource)) { |
@@ -487,45 +487,39 @@ int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge) | |||
487 | return 0; | 487 | return 0; |
488 | } | 488 | } |
489 | 489 | ||
490 | static int is_valid_resource(struct pci_dev *dev, int idx) | 490 | void pcibios_fixup_device_resources(struct pci_dev *dev) |
491 | { | 491 | { |
492 | unsigned int i, type_mask = IORESOURCE_IO | IORESOURCE_MEM; | 492 | int idx; |
493 | struct resource *devr = &dev->resource[idx], *busr; | ||
494 | 493 | ||
495 | if (!dev->bus) | 494 | if (!dev->bus) |
496 | return 0; | 495 | return; |
497 | |||
498 | pci_bus_for_each_resource(dev->bus, busr, i) { | ||
499 | if (!busr || ((busr->flags ^ devr->flags) & type_mask)) | ||
500 | continue; | ||
501 | if ((devr->start) && (devr->start >= busr->start) && | ||
502 | (devr->end <= busr->end)) | ||
503 | return 1; | ||
504 | } | ||
505 | return 0; | ||
506 | } | ||
507 | 496 | ||
508 | static void pcibios_fixup_resources(struct pci_dev *dev, int start, int limit) | 497 | for (idx = 0; idx < PCI_BRIDGE_RESOURCES; idx++) { |
509 | { | 498 | struct resource *r = &dev->resource[idx]; |
510 | int i; | ||
511 | 499 | ||
512 | for (i = start; i < limit; i++) { | 500 | if (!r->flags || r->parent || !r->start) |
513 | if (!dev->resource[i].flags) | ||
514 | continue; | 501 | continue; |
515 | if ((is_valid_resource(dev, i))) | ||
516 | pci_claim_resource(dev, i); | ||
517 | } | ||
518 | } | ||
519 | 502 | ||
520 | void pcibios_fixup_device_resources(struct pci_dev *dev) | 503 | pci_claim_resource(dev, idx); |
521 | { | 504 | } |
522 | pcibios_fixup_resources(dev, 0, PCI_BRIDGE_RESOURCES); | ||
523 | } | 505 | } |
524 | EXPORT_SYMBOL_GPL(pcibios_fixup_device_resources); | 506 | EXPORT_SYMBOL_GPL(pcibios_fixup_device_resources); |
525 | 507 | ||
526 | static void pcibios_fixup_bridge_resources(struct pci_dev *dev) | 508 | static void pcibios_fixup_bridge_resources(struct pci_dev *dev) |
527 | { | 509 | { |
528 | pcibios_fixup_resources(dev, PCI_BRIDGE_RESOURCES, PCI_NUM_RESOURCES); | 510 | int idx; |
511 | |||
512 | if (!dev->bus) | ||
513 | return; | ||
514 | |||
515 | for (idx = PCI_BRIDGE_RESOURCES; idx < PCI_NUM_RESOURCES; idx++) { | ||
516 | struct resource *r = &dev->resource[idx]; | ||
517 | |||
518 | if (!r->flags || r->parent || !r->start) | ||
519 | continue; | ||
520 | |||
521 | pci_claim_bridge_resource(dev, idx); | ||
522 | } | ||
529 | } | 523 | } |
530 | 524 | ||
531 | /* | 525 | /* |