powerpc/fsl-msi: use a different lockclass for the cascade interrupt
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Tue, 2 Apr 2013 13:33:36 +0000 (15:33 +0200)
committerKumar Gala <galak@kernel.crashing.org>
Wed, 3 Apr 2013 16:42:48 +0000 (11:42 -0500)
lockdep thinks that it might deadlock because it grabs a lock of the
same class while calling the generic_irq_handler(). This annotation will
inform lockdep that it will not.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/sysdev/fsl_msi.c

index 178c99427b1c5b511568a0288fa95d45b6a53f70..ab02db3d02d8f89cd684b0f370db403c5a24d1e3 100644 (file)
@@ -333,6 +333,8 @@ static int fsl_of_msi_remove(struct platform_device *ofdev)
        return 0;
 }
 
+static struct lock_class_key fsl_msi_irq_class;
+
 static int fsl_msi_setup_hwirq(struct fsl_msi *msi, struct platform_device *dev,
                               int offset, int irq_index)
 {
@@ -351,7 +353,7 @@ static int fsl_msi_setup_hwirq(struct fsl_msi *msi, struct platform_device *dev,
                dev_err(&dev->dev, "No memory for MSI cascade data\n");
                return -ENOMEM;
        }
-
+       irq_set_lockdep_class(virt_msir, &fsl_msi_irq_class);
        msi->msi_virqs[irq_index] = virt_msir;
        cascade_data->index = offset;
        cascade_data->msi_data = msi;