Pull thermal into release branch
[linux-drm-fsl-dcu.git] / arch / powerpc / kernel / irq.c
index 0bd8c7665834bf39b5a5b32485e6cc279856f9f5..9ed4931af1641253cce9dfce6c52fd6deb91c230 100644 (file)
@@ -67,6 +67,7 @@
 #ifdef CONFIG_PPC64
 #include <asm/paca.h>
 #include <asm/firmware.h>
+#include <asm/lv1call.h>
 #endif
 
 int __irq_offset_value;
@@ -162,6 +163,16 @@ void local_irq_restore(unsigned long en)
        local_paca->hard_enabled = en;
        if ((int)mfspr(SPRN_DEC) < 0)
                mtspr(SPRN_DEC, 1);
+
+       /*
+        * Force the delivery of pending soft-disabled interrupts on PS3.
+        * Any HV call will have this side effect.
+        */
+       if (firmware_has_feature(FW_FEATURE_PS3_LV1)) {
+               u64 tmp;
+               lv1_get_version_info(&tmp);
+       }
+
        hard_irq_enable();
 }
 #endif /* CONFIG_PPC64 */
@@ -281,10 +292,10 @@ void do_IRQ(struct pt_regs *regs)
 
        /*
         * Every platform is required to implement ppc_md.get_irq.
-        * This function will either return an irq number or -1 to
+        * This function will either return an irq number or NO_IRQ to
         * indicate there are no more pending.
-        * The value -2 is for buggy hardware and means that this IRQ
-        * has already been handled. -- Tom
+        * The value NO_IRQ_IGNORE is for buggy hardware and means that this
+        * IRQ has already been handled. -- Tom
         */
        irq = ppc_md.get_irq();
 
@@ -394,7 +405,7 @@ EXPORT_SYMBOL(do_softirq);
 #ifdef CONFIG_PPC_MERGE
 
 static LIST_HEAD(irq_hosts);
-static spinlock_t irq_big_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(irq_big_lock);
 static DEFINE_PER_CPU(unsigned int, irq_radix_reader);
 static unsigned int irq_radix_writer;
 struct irq_map_entry irq_map[NR_IRQS];
@@ -604,6 +615,8 @@ unsigned int irq_create_mapping(struct irq_host *host,
         */
        virq = irq_find_mapping(host, hwirq);
        if (virq != IRQ_NONE) {
+               if (host->ops->remap)
+                       host->ops->remap(host, virq, hwirq);
                pr_debug("irq: -> existing mapping on virq %d\n", virq);
                return virq;
        }
@@ -945,34 +958,6 @@ arch_initcall(irq_late_init);
 
 #endif /* CONFIG_PPC_MERGE */
 
-#ifdef CONFIG_PCI_MSI
-int pci_enable_msi(struct pci_dev * pdev)
-{
-       if (ppc_md.enable_msi)
-               return ppc_md.enable_msi(pdev);
-       else
-               return -1;
-}
-EXPORT_SYMBOL(pci_enable_msi);
-
-void pci_disable_msi(struct pci_dev * pdev)
-{
-       if (ppc_md.disable_msi)
-               ppc_md.disable_msi(pdev);
-}
-EXPORT_SYMBOL(pci_disable_msi);
-
-void pci_scan_msi_device(struct pci_dev *dev) {}
-int pci_enable_msix(struct pci_dev* dev, struct msix_entry *entries, int nvec) {return -1;}
-void pci_disable_msix(struct pci_dev *dev) {}
-void msi_remove_pci_irq_vectors(struct pci_dev *dev) {}
-void disable_msi_mode(struct pci_dev *dev, int pos, int type) {}
-void pci_no_msi(void) {}
-EXPORT_SYMBOL(pci_enable_msix);
-EXPORT_SYMBOL(pci_disable_msix);
-
-#endif
-
 #ifdef CONFIG_PPC64
 static int __init setup_noirqdistrib(char *str)
 {