aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/pseries/xics.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/pseries/xics.c')
-rw-r--r--arch/powerpc/platforms/pseries/xics.c34
1 files changed, 14 insertions, 20 deletions
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c
index 756421049441..1eab4688be17 100644
--- a/arch/powerpc/platforms/pseries/xics.c
+++ b/arch/powerpc/platforms/pseries/xics.c
@@ -502,16 +502,9 @@ static int xics_host_match(struct irq_host *h, struct device_node *node)
502} 502}
503 503
504static int xics_host_map_direct(struct irq_host *h, unsigned int virq, 504static int xics_host_map_direct(struct irq_host *h, unsigned int virq,
505 irq_hw_number_t hw, unsigned int flags) 505 irq_hw_number_t hw)
506{ 506{
507 unsigned int sense = flags & IRQ_TYPE_SENSE_MASK; 507 pr_debug("xics: map_direct virq %d, hwirq 0x%lx\n", virq, hw);
508
509 pr_debug("xics: map_direct virq %d, hwirq 0x%lx, flags: 0x%x\n",
510 virq, hw, flags);
511
512 if (sense && sense != IRQ_TYPE_LEVEL_LOW)
513 printk(KERN_WARNING "xics: using unsupported sense 0x%x"
514 " for irq %d (h: 0x%lx)\n", flags, virq, hw);
515 508
516 get_irq_desc(virq)->status |= IRQ_LEVEL; 509 get_irq_desc(virq)->status |= IRQ_LEVEL;
517 set_irq_chip_and_handler(virq, &xics_pic_direct, handle_fasteoi_irq); 510 set_irq_chip_and_handler(virq, &xics_pic_direct, handle_fasteoi_irq);
@@ -519,16 +512,9 @@ static int xics_host_map_direct(struct irq_host *h, unsigned int virq,
519} 512}
520 513
521static int xics_host_map_lpar(struct irq_host *h, unsigned int virq, 514static int xics_host_map_lpar(struct irq_host *h, unsigned int virq,
522 irq_hw_number_t hw, unsigned int flags) 515 irq_hw_number_t hw)
523{ 516{
524 unsigned int sense = flags & IRQ_TYPE_SENSE_MASK; 517 pr_debug("xics: map_direct virq %d, hwirq 0x%lx\n", virq, hw);
525
526 pr_debug("xics: map_lpar virq %d, hwirq 0x%lx, flags: 0x%x\n",
527 virq, hw, flags);
528
529 if (sense && sense != IRQ_TYPE_LEVEL_LOW)
530 printk(KERN_WARNING "xics: using unsupported sense 0x%x"
531 " for irq %d (h: 0x%lx)\n", flags, virq, hw);
532 518
533 get_irq_desc(virq)->status |= IRQ_LEVEL; 519 get_irq_desc(virq)->status |= IRQ_LEVEL;
534 set_irq_chip_and_handler(virq, &xics_pic_lpar, handle_fasteoi_irq); 520 set_irq_chip_and_handler(virq, &xics_pic_lpar, handle_fasteoi_irq);
@@ -757,7 +743,7 @@ void xics_request_IPIs(void)
757{ 743{
758 unsigned int ipi; 744 unsigned int ipi;
759 745
760 ipi = irq_create_mapping(xics_host, XICS_IPI, 0); 746 ipi = irq_create_mapping(xics_host, XICS_IPI);
761 BUG_ON(ipi == NO_IRQ); 747 BUG_ON(ipi == NO_IRQ);
762 748
763 /* 749 /*
@@ -783,6 +769,14 @@ void xics_teardown_cpu(int secondary)
783 xics_set_cpu_priority(cpu, 0); 769 xics_set_cpu_priority(cpu, 0);
784 770
785 /* 771 /*
772 * Clear IPI
773 */
774 if (firmware_has_feature(FW_FEATURE_LPAR))
775 lpar_qirr_info(cpu, 0xff);
776 else
777 direct_qirr_info(cpu, 0xff);
778
779 /*
786 * we need to EOI the IPI if we got here from kexec down IPI 780 * we need to EOI the IPI if we got here from kexec down IPI
787 * 781 *
788 * probably need to check all the other interrupts too 782 * probably need to check all the other interrupts too
@@ -795,7 +789,7 @@ void xics_teardown_cpu(int secondary)
795 return; 789 return;
796 desc = get_irq_desc(ipi); 790 desc = get_irq_desc(ipi);
797 if (desc->chip && desc->chip->eoi) 791 if (desc->chip && desc->chip->eoi)
798 desc->chip->eoi(XICS_IPI); 792 desc->chip->eoi(ipi);
799 793
800 /* 794 /*
801 * Some machines need to have at least one cpu in the GIQ, 795 * Some machines need to have at least one cpu in the GIQ,