diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2014-03-05 07:42:14 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2014-03-05 07:42:14 -0500 |
commit | 76d388cd72ab08c2c56b1e2bd430e7422fc40168 (patch) | |
tree | 6c8c49799b8f20d7a47434ede9552121cf1ba23e /drivers/hv | |
parent | abcfc543bec803a53c5bd2925d3293df4ede84b0 (diff) |
x86: hyperv: Fixup the (brain) damage caused by the irq cleanup
Compiling last minute changes without setting the proper config
options is not really clever.
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/hv')
-rw-r--r-- | drivers/hv/vmbus_drv.c | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 5a6909fff1c1..3f0a95290e14 100644 --- a/drivers/hv/vmbus_drv.c +++ b/drivers/hv/vmbus_drv.c | |||
@@ -615,7 +615,7 @@ static void vmbus_on_msg_dpc(unsigned long data) | |||
615 | } | 615 | } |
616 | } | 616 | } |
617 | 617 | ||
618 | static irqreturn_t vmbus_isr(int irq, void *dev_id) | 618 | static void vmbus_isr(void) |
619 | { | 619 | { |
620 | int cpu = smp_processor_id(); | 620 | int cpu = smp_processor_id(); |
621 | void *page_addr; | 621 | void *page_addr; |
@@ -625,7 +625,7 @@ static irqreturn_t vmbus_isr(int irq, void *dev_id) | |||
625 | 625 | ||
626 | page_addr = hv_context.synic_event_page[cpu]; | 626 | page_addr = hv_context.synic_event_page[cpu]; |
627 | if (page_addr == NULL) | 627 | if (page_addr == NULL) |
628 | return IRQ_NONE; | 628 | return; |
629 | 629 | ||
630 | event = (union hv_synic_event_flags *)page_addr + | 630 | event = (union hv_synic_event_flags *)page_addr + |
631 | VMBUS_MESSAGE_SINT; | 631 | VMBUS_MESSAGE_SINT; |
@@ -661,15 +661,8 @@ static irqreturn_t vmbus_isr(int irq, void *dev_id) | |||
661 | msg = (struct hv_message *)page_addr + VMBUS_MESSAGE_SINT; | 661 | msg = (struct hv_message *)page_addr + VMBUS_MESSAGE_SINT; |
662 | 662 | ||
663 | /* Check if there are actual msgs to be processed */ | 663 | /* Check if there are actual msgs to be processed */ |
664 | if (msg->header.message_type != HVMSG_NONE) { | 664 | if (msg->header.message_type != HVMSG_NONE) |
665 | handled = true; | ||
666 | tasklet_schedule(&msg_dpc); | 665 | tasklet_schedule(&msg_dpc); |
667 | } | ||
668 | |||
669 | if (handled) | ||
670 | return IRQ_HANDLED; | ||
671 | else | ||
672 | return IRQ_NONE; | ||
673 | } | 666 | } |
674 | 667 | ||
675 | /* | 668 | /* |
@@ -698,12 +691,7 @@ static int vmbus_bus_init(int irq) | |||
698 | if (ret) | 691 | if (ret) |
699 | goto err_cleanup; | 692 | goto err_cleanup; |
700 | 693 | ||
701 | ret = hv_setup_vmbus_irq(irq, vmbus_isr, hv_acpi_dev); | 694 | hv_setup_vmbus_irq(vmbus_isr); |
702 | |||
703 | if (ret != 0) { | ||
704 | pr_err("Unable to request IRQ %d\n", irq); | ||
705 | goto err_unregister; | ||
706 | } | ||
707 | 695 | ||
708 | ret = hv_synic_alloc(); | 696 | ret = hv_synic_alloc(); |
709 | if (ret) | 697 | if (ret) |
@@ -723,9 +711,8 @@ static int vmbus_bus_init(int irq) | |||
723 | 711 | ||
724 | err_alloc: | 712 | err_alloc: |
725 | hv_synic_free(); | 713 | hv_synic_free(); |
726 | hv_remove_vmbus_irq(irq, hv_acpi_dev); | 714 | hv_remove_vmbus_irq(); |
727 | 715 | ||
728 | err_unregister: | ||
729 | bus_unregister(&hv_bus); | 716 | bus_unregister(&hv_bus); |
730 | 717 | ||
731 | err_cleanup: | 718 | err_cleanup: |
@@ -917,7 +904,6 @@ static int __init hv_acpi_init(void) | |||
917 | /* | 904 | /* |
918 | * Get irq resources first. | 905 | * Get irq resources first. |
919 | */ | 906 | */ |
920 | |||
921 | ret = acpi_bus_register_driver(&vmbus_acpi_driver); | 907 | ret = acpi_bus_register_driver(&vmbus_acpi_driver); |
922 | 908 | ||
923 | if (ret) | 909 | if (ret) |
@@ -948,7 +934,7 @@ cleanup: | |||
948 | 934 | ||
949 | static void __exit vmbus_exit(void) | 935 | static void __exit vmbus_exit(void) |
950 | { | 936 | { |
951 | hv_remove_vmbus_irq(irq, hv_acpi_dev); | 937 | hv_remove_vmbus_irq(); |
952 | vmbus_free_channels(); | 938 | vmbus_free_channels(); |
953 | bus_unregister(&hv_bus); | 939 | bus_unregister(&hv_bus); |
954 | hv_cleanup(); | 940 | hv_cleanup(); |