diff options
author | Len Brown <len.brown@intel.com> | 2005-08-05 00:31:42 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-08-05 00:31:42 -0400 |
commit | 1d492eb41371d9a5145651e8eb64bea1042a4057 (patch) | |
tree | 2a66a8fd347cf8dd8a665c4575b30d873035a5a4 | |
parent | 5d2a22079c825669d91a3a200332f1053b4b61b0 (diff) | |
parent | cbfc1bae55bbd053308ef0fa6b6448cd1ddf3e67 (diff) |
[ACPI] Merge acpi-2.6.12 branch into 2.6.13-rc3
Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r-- | arch/i386/kernel/acpi/boot.c | 6 | ||||
-rw-r--r-- | arch/ia64/kernel/acpi.c | 6 | ||||
-rw-r--r-- | arch/ia64/kernel/iosapic.c | 24 | ||||
-rw-r--r-- | drivers/acpi/Kconfig | 8 | ||||
-rw-r--r-- | drivers/acpi/pci_irq.c | 9 | ||||
-rw-r--r-- | drivers/acpi/pci_link.c | 3 | ||||
-rw-r--r-- | drivers/acpi/video.c | 7 | ||||
-rw-r--r-- | drivers/char/hpet.c | 8 | ||||
-rw-r--r-- | drivers/pnp/pnpacpi/rsparser.c | 2 | ||||
-rw-r--r-- | drivers/serial/8250_acpi.c | 20 | ||||
-rw-r--r-- | include/asm-ia64/acpi-ext.h | 1 | ||||
-rw-r--r-- | include/linux/acpi.h | 24 |
12 files changed, 81 insertions, 37 deletions
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c index b7808a89d945..55c0fbd68956 100644 --- a/arch/i386/kernel/acpi/boot.c +++ b/arch/i386/kernel/acpi/boot.c | |||
@@ -484,7 +484,11 @@ int acpi_gsi_to_irq(u32 gsi, unsigned int *irq) | |||
484 | return 0; | 484 | return 0; |
485 | } | 485 | } |
486 | 486 | ||
487 | unsigned int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low) | 487 | /* |
488 | * success: return IRQ number (>=0) | ||
489 | * failure: return < 0 | ||
490 | */ | ||
491 | int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low) | ||
488 | { | 492 | { |
489 | unsigned int irq; | 493 | unsigned int irq; |
490 | unsigned int plat_gsi = gsi; | 494 | unsigned int plat_gsi = gsi; |
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index 9609f243e5d0..d362ecf5381b 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
@@ -563,7 +563,11 @@ acpi_numa_arch_fixup (void) | |||
563 | } | 563 | } |
564 | #endif /* CONFIG_ACPI_NUMA */ | 564 | #endif /* CONFIG_ACPI_NUMA */ |
565 | 565 | ||
566 | unsigned int | 566 | /* |
567 | * success: return IRQ number (>=0) | ||
568 | * failure: return < 0 | ||
569 | */ | ||
570 | int | ||
567 | acpi_register_gsi (u32 gsi, int edge_level, int active_high_low) | 571 | acpi_register_gsi (u32 gsi, int edge_level, int active_high_low) |
568 | { | 572 | { |
569 | if (has_8259 && gsi < 16) | 573 | if (has_8259 && gsi < 16) |
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c index 7936b62f7a2e..8f53915f4ae6 100644 --- a/arch/ia64/kernel/iosapic.c +++ b/arch/ia64/kernel/iosapic.c | |||
@@ -561,7 +561,7 @@ static inline int vector_is_shared (int vector) | |||
561 | return (iosapic_intr_info[vector].count > 1); | 561 | return (iosapic_intr_info[vector].count > 1); |
562 | } | 562 | } |
563 | 563 | ||
564 | static void | 564 | static int |
565 | register_intr (unsigned int gsi, int vector, unsigned char delivery, | 565 | register_intr (unsigned int gsi, int vector, unsigned char delivery, |
566 | unsigned long polarity, unsigned long trigger) | 566 | unsigned long polarity, unsigned long trigger) |
567 | { | 567 | { |
@@ -576,7 +576,7 @@ register_intr (unsigned int gsi, int vector, unsigned char delivery, | |||
576 | index = find_iosapic(gsi); | 576 | index = find_iosapic(gsi); |
577 | if (index < 0) { | 577 | if (index < 0) { |
578 | printk(KERN_WARNING "%s: No IOSAPIC for GSI %u\n", __FUNCTION__, gsi); | 578 | printk(KERN_WARNING "%s: No IOSAPIC for GSI %u\n", __FUNCTION__, gsi); |
579 | return; | 579 | return -ENODEV; |
580 | } | 580 | } |
581 | 581 | ||
582 | iosapic_address = iosapic_lists[index].addr; | 582 | iosapic_address = iosapic_lists[index].addr; |
@@ -587,7 +587,7 @@ register_intr (unsigned int gsi, int vector, unsigned char delivery, | |||
587 | rte = iosapic_alloc_rte(); | 587 | rte = iosapic_alloc_rte(); |
588 | if (!rte) { | 588 | if (!rte) { |
589 | printk(KERN_WARNING "%s: cannot allocate memory\n", __FUNCTION__); | 589 | printk(KERN_WARNING "%s: cannot allocate memory\n", __FUNCTION__); |
590 | return; | 590 | return -ENOMEM; |
591 | } | 591 | } |
592 | 592 | ||
593 | rte_index = gsi - gsi_base; | 593 | rte_index = gsi - gsi_base; |
@@ -603,7 +603,7 @@ register_intr (unsigned int gsi, int vector, unsigned char delivery, | |||
603 | struct iosapic_intr_info *info = &iosapic_intr_info[vector]; | 603 | struct iosapic_intr_info *info = &iosapic_intr_info[vector]; |
604 | if (info->trigger != trigger || info->polarity != polarity) { | 604 | if (info->trigger != trigger || info->polarity != polarity) { |
605 | printk (KERN_WARNING "%s: cannot override the interrupt\n", __FUNCTION__); | 605 | printk (KERN_WARNING "%s: cannot override the interrupt\n", __FUNCTION__); |
606 | return; | 606 | return -EINVAL; |
607 | } | 607 | } |
608 | } | 608 | } |
609 | 609 | ||
@@ -623,6 +623,7 @@ register_intr (unsigned int gsi, int vector, unsigned char delivery, | |||
623 | __FUNCTION__, vector, idesc->handler->typename, irq_type->typename); | 623 | __FUNCTION__, vector, idesc->handler->typename, irq_type->typename); |
624 | idesc->handler = irq_type; | 624 | idesc->handler = irq_type; |
625 | } | 625 | } |
626 | return 0; | ||
626 | } | 627 | } |
627 | 628 | ||
628 | static unsigned int | 629 | static unsigned int |
@@ -710,7 +711,7 @@ int | |||
710 | iosapic_register_intr (unsigned int gsi, | 711 | iosapic_register_intr (unsigned int gsi, |
711 | unsigned long polarity, unsigned long trigger) | 712 | unsigned long polarity, unsigned long trigger) |
712 | { | 713 | { |
713 | int vector, mask = 1; | 714 | int vector, mask = 1, err; |
714 | unsigned int dest; | 715 | unsigned int dest; |
715 | unsigned long flags; | 716 | unsigned long flags; |
716 | struct iosapic_rte_info *rte; | 717 | struct iosapic_rte_info *rte; |
@@ -734,11 +735,11 @@ again: | |||
734 | spin_unlock_irqrestore(&iosapic_lock, flags); | 735 | spin_unlock_irqrestore(&iosapic_lock, flags); |
735 | 736 | ||
736 | /* If vector is running out, we try to find a sharable vector */ | 737 | /* If vector is running out, we try to find a sharable vector */ |
737 | vector = assign_irq_vector(AUTO_ASSIGN); | 738 | vector = assign_irq_vector_nopanic(AUTO_ASSIGN); |
738 | if (vector < 0) { | 739 | if (vector < 0) { |
739 | vector = iosapic_find_sharable_vector(trigger, polarity); | 740 | vector = iosapic_find_sharable_vector(trigger, polarity); |
740 | if (vector < 0) | 741 | if (vector < 0) |
741 | panic("%s: out of interrupt vectors!\n", __FUNCTION__); | 742 | Return -ENOSPC; |
742 | } | 743 | } |
743 | 744 | ||
744 | spin_lock_irqsave(&irq_descp(vector)->lock, flags); | 745 | spin_lock_irqsave(&irq_descp(vector)->lock, flags); |
@@ -753,8 +754,13 @@ again: | |||
753 | } | 754 | } |
754 | 755 | ||
755 | dest = get_target_cpu(gsi, vector); | 756 | dest = get_target_cpu(gsi, vector); |
756 | register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY, | 757 | err = register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY, |
757 | polarity, trigger); | 758 | polarity, trigger); |
759 | if (err < 0) { | ||
760 | spin_unlock(&iosapic_lock); | ||
761 | spin_unlock_irqrestore(&irq_descp(vector)->lock, flags); | ||
762 | return err; | ||
763 | } | ||
758 | 764 | ||
759 | /* | 765 | /* |
760 | * If the vector is shared and already unmasked for | 766 | * If the vector is shared and already unmasked for |
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index ba13896cae40..66c60982ba46 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig | |||
@@ -154,12 +154,10 @@ config ACPI_PROCESSOR | |||
154 | support it. | 154 | support it. |
155 | 155 | ||
156 | config ACPI_HOTPLUG_CPU | 156 | config ACPI_HOTPLUG_CPU |
157 | bool "Processor Hotplug (EXPERIMENTAL)" | 157 | bool |
158 | depends on ACPI_PROCESSOR && HOTPLUG_CPU && EXPERIMENTAL | 158 | depends on ACPI_PROCESSOR && HOTPLUG_CPU |
159 | select ACPI_CONTAINER | 159 | select ACPI_CONTAINER |
160 | default n | 160 | default y |
161 | ---help--- | ||
162 | Select this option if your platform support physical CPU hotplug. | ||
163 | 161 | ||
164 | config ACPI_THERMAL | 162 | config ACPI_THERMAL |
165 | tristate "Thermal Zone" | 163 | tristate "Thermal Zone" |
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c index bb973d2109a1..c885300579ec 100644 --- a/drivers/acpi/pci_irq.c +++ b/drivers/acpi/pci_irq.c | |||
@@ -424,6 +424,7 @@ acpi_pci_irq_enable ( | |||
424 | int edge_level = ACPI_LEVEL_SENSITIVE; | 424 | int edge_level = ACPI_LEVEL_SENSITIVE; |
425 | int active_high_low = ACPI_ACTIVE_LOW; | 425 | int active_high_low = ACPI_ACTIVE_LOW; |
426 | char *link = NULL; | 426 | char *link = NULL; |
427 | int rc; | ||
427 | 428 | ||
428 | ACPI_FUNCTION_TRACE("acpi_pci_irq_enable"); | 429 | ACPI_FUNCTION_TRACE("acpi_pci_irq_enable"); |
429 | 430 | ||
@@ -476,7 +477,13 @@ acpi_pci_irq_enable ( | |||
476 | } | 477 | } |
477 | } | 478 | } |
478 | 479 | ||
479 | dev->irq = acpi_register_gsi(irq, edge_level, active_high_low); | 480 | rc = acpi_register_gsi(irq, edge_level, active_high_low); |
481 | if (rc < 0) { | ||
482 | printk(KERN_WARNING PREFIX "PCI Interrupt %s[%c]: failed " | ||
483 | "to register GSI\n", pci_name(dev), ('A' + pin)); | ||
484 | return_VALUE(rc); | ||
485 | } | ||
486 | dev->irq = rc; | ||
480 | 487 | ||
481 | printk(KERN_INFO PREFIX "PCI Interrupt %s[%c] -> ", | 488 | printk(KERN_INFO PREFIX "PCI Interrupt %s[%c] -> ", |
482 | pci_name(dev), 'A' + pin); | 489 | pci_name(dev), 'A' + pin); |
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c index 834c2ceff1aa..26aa3829f1de 100644 --- a/drivers/acpi/pci_link.c +++ b/drivers/acpi/pci_link.c | |||
@@ -804,8 +804,7 @@ acpi_pci_link_resume( | |||
804 | */ | 804 | */ |
805 | int acpi_in_resume; | 805 | int acpi_in_resume; |
806 | static int | 806 | static int |
807 | irqrouter_resume( | 807 | irqrouter_resume(struct sys_device *dev) |
808 | struct sys_device *dev) | ||
809 | { | 808 | { |
810 | struct list_head *node = NULL; | 809 | struct list_head *node = NULL; |
811 | struct acpi_pci_link *link = NULL; | 810 | struct acpi_pci_link *link = NULL; |
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 2cf264fd52e0..7b10a7b070c9 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -1665,6 +1665,7 @@ static int | |||
1665 | acpi_video_bus_put_one_device( | 1665 | acpi_video_bus_put_one_device( |
1666 | struct acpi_video_device *device) | 1666 | struct acpi_video_device *device) |
1667 | { | 1667 | { |
1668 | acpi_status status; | ||
1668 | struct acpi_video_bus *video; | 1669 | struct acpi_video_bus *video; |
1669 | 1670 | ||
1670 | ACPI_FUNCTION_TRACE("acpi_video_bus_put_one_device"); | 1671 | ACPI_FUNCTION_TRACE("acpi_video_bus_put_one_device"); |
@@ -1679,6 +1680,12 @@ acpi_video_bus_put_one_device( | |||
1679 | up(&video->sem); | 1680 | up(&video->sem); |
1680 | acpi_video_device_remove_fs(device->dev); | 1681 | acpi_video_device_remove_fs(device->dev); |
1681 | 1682 | ||
1683 | status = acpi_remove_notify_handler(device->handle, | ||
1684 | ACPI_DEVICE_NOTIFY, acpi_video_device_notify); | ||
1685 | if (ACPI_FAILURE(status)) | ||
1686 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | ||
1687 | "Error removing notify handler\n")); | ||
1688 | |||
1682 | return_VALUE(0); | 1689 | return_VALUE(0); |
1683 | } | 1690 | } |
1684 | 1691 | ||
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index 762fa430fb5b..97feb7f7024d 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c | |||
@@ -906,11 +906,15 @@ static acpi_status hpet_resources(struct acpi_resource *res, void *data) | |||
906 | if (irqp->number_of_interrupts > 0) { | 906 | if (irqp->number_of_interrupts > 0) { |
907 | hdp->hd_nirqs = irqp->number_of_interrupts; | 907 | hdp->hd_nirqs = irqp->number_of_interrupts; |
908 | 908 | ||
909 | for (i = 0; i < hdp->hd_nirqs; i++) | 909 | for (i = 0; i < hdp->hd_nirqs; i++) { |
910 | hdp->hd_irq[i] = | 910 | int rc = |
911 | acpi_register_gsi(irqp->interrupts[i], | 911 | acpi_register_gsi(irqp->interrupts[i], |
912 | irqp->edge_level, | 912 | irqp->edge_level, |
913 | irqp->active_high_low); | 913 | irqp->active_high_low); |
914 | if (rc < 0) | ||
915 | return AE_ERROR; | ||
916 | hdp->hd_irq[i] = rc; | ||
917 | } | ||
914 | } | 918 | } |
915 | } | 919 | } |
916 | 920 | ||
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c index 75575f6c349c..1e296cbef004 100644 --- a/drivers/pnp/pnpacpi/rsparser.c +++ b/drivers/pnp/pnpacpi/rsparser.c | |||
@@ -81,7 +81,7 @@ pnpacpi_parse_allocated_irqresource(struct pnp_resource_table * res, int irq) | |||
81 | i++; | 81 | i++; |
82 | if (i < PNP_MAX_IRQ) { | 82 | if (i < PNP_MAX_IRQ) { |
83 | res->irq_resource[i].flags = IORESOURCE_IRQ; //Also clears _UNSET flag | 83 | res->irq_resource[i].flags = IORESOURCE_IRQ; //Also clears _UNSET flag |
84 | if (irq == -1) { | 84 | if (irq < 0) { |
85 | res->irq_resource[i].flags |= IORESOURCE_DISABLED; | 85 | res->irq_resource[i].flags |= IORESOURCE_DISABLED; |
86 | return; | 86 | return; |
87 | } | 87 | } |
diff --git a/drivers/serial/8250_acpi.c b/drivers/serial/8250_acpi.c index 6b9ead288517..a802bdce6e5d 100644 --- a/drivers/serial/8250_acpi.c +++ b/drivers/serial/8250_acpi.c | |||
@@ -47,18 +47,30 @@ static acpi_status acpi_serial_port(struct uart_port *port, | |||
47 | static acpi_status acpi_serial_ext_irq(struct uart_port *port, | 47 | static acpi_status acpi_serial_ext_irq(struct uart_port *port, |
48 | struct acpi_resource_ext_irq *ext_irq) | 48 | struct acpi_resource_ext_irq *ext_irq) |
49 | { | 49 | { |
50 | if (ext_irq->number_of_interrupts > 0) | 50 | int rc; |
51 | port->irq = acpi_register_gsi(ext_irq->interrupts[0], | 51 | |
52 | if (ext_irq->number_of_interrupts > 0) { | ||
53 | rc = acpi_register_gsi(ext_irq->interrupts[0], | ||
52 | ext_irq->edge_level, ext_irq->active_high_low); | 54 | ext_irq->edge_level, ext_irq->active_high_low); |
55 | if (rc < 0) | ||
56 | return AE_ERROR; | ||
57 | port->irq = rc; | ||
58 | } | ||
53 | return AE_OK; | 59 | return AE_OK; |
54 | } | 60 | } |
55 | 61 | ||
56 | static acpi_status acpi_serial_irq(struct uart_port *port, | 62 | static acpi_status acpi_serial_irq(struct uart_port *port, |
57 | struct acpi_resource_irq *irq) | 63 | struct acpi_resource_irq *irq) |
58 | { | 64 | { |
59 | if (irq->number_of_interrupts > 0) | 65 | int rc; |
60 | port->irq = acpi_register_gsi(irq->interrupts[0], | 66 | |
67 | if (irq->number_of_interrupts > 0) { | ||
68 | rc = acpi_register_gsi(irq->interrupts[0], | ||
61 | irq->edge_level, irq->active_high_low); | 69 | irq->edge_level, irq->active_high_low); |
70 | if (rc < 0) | ||
71 | return AE_ERROR; | ||
72 | port->irq = rc; | ||
73 | } | ||
62 | return AE_OK; | 74 | return AE_OK; |
63 | } | 75 | } |
64 | 76 | ||
diff --git a/include/asm-ia64/acpi-ext.h b/include/asm-ia64/acpi-ext.h index 9271d74c64cc..56d2ddc97b30 100644 --- a/include/asm-ia64/acpi-ext.h +++ b/include/asm-ia64/acpi-ext.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #define _ASM_IA64_ACPI_EXT_H | 11 | #define _ASM_IA64_ACPI_EXT_H |
12 | 12 | ||
13 | #include <linux/types.h> | 13 | #include <linux/types.h> |
14 | #include <acpi/actypes.h> | ||
14 | 15 | ||
15 | extern acpi_status hp_acpi_csr_space (acpi_handle, u64 *base, u64 *length); | 16 | extern acpi_status hp_acpi_csr_space (acpi_handle, u64 *base, u64 *length); |
16 | 17 | ||
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index b46a5205ee7b..fd48db320f5b 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -433,19 +433,9 @@ extern int sbf_port ; | |||
433 | 433 | ||
434 | #define acpi_mp_config 0 | 434 | #define acpi_mp_config 0 |
435 | 435 | ||
436 | static inline int acpi_boot_init(void) | ||
437 | { | ||
438 | return 0; | ||
439 | } | ||
440 | |||
441 | static inline int acpi_boot_table_init(void) | ||
442 | { | ||
443 | return 0; | ||
444 | } | ||
445 | |||
446 | #endif /*!CONFIG_ACPI_BOOT*/ | 436 | #endif /*!CONFIG_ACPI_BOOT*/ |
447 | 437 | ||
448 | unsigned int acpi_register_gsi (u32 gsi, int edge_level, int active_high_low); | 438 | int acpi_register_gsi (u32 gsi, int edge_level, int active_high_low); |
449 | int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); | 439 | int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); |
450 | 440 | ||
451 | /* | 441 | /* |
@@ -549,5 +539,17 @@ static inline int acpi_get_pxm(acpi_handle handle) | |||
549 | 539 | ||
550 | extern int pnpacpi_disabled; | 540 | extern int pnpacpi_disabled; |
551 | 541 | ||
542 | #else /* CONFIG_ACPI */ | ||
543 | |||
544 | static inline int acpi_boot_init(void) | ||
545 | { | ||
546 | return 0; | ||
547 | } | ||
548 | |||
549 | static inline int acpi_boot_table_init(void) | ||
550 | { | ||
551 | return 0; | ||
552 | } | ||
553 | |||
552 | #endif /* CONFIG_ACPI */ | 554 | #endif /* CONFIG_ACPI */ |
553 | #endif /*_LINUX_ACPI_H*/ | 555 | #endif /*_LINUX_ACPI_H*/ |