staging: fsl-mc: Changed DPRC built-in portal's mc_io to be atomic
authorJ. German Rivera <German.Rivera@freescale.com>
Wed, 6 Jan 2016 22:03:24 +0000 (16:03 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Feb 2016 03:10:12 +0000 (19:10 -0800)
The DPRC built-in portal's mc_io is used to send commands to the MC
to program MSIs for MC objects. This is done by the
fsl_mc_msi_write_msg() callback, which is invoked by the generic MSI
layer with interrupts disabled. As a result, the mc_io used in
fsl_mc_msi_write_msg needs to be an atomic mc_io.

Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fsl-mc/bus/dprc-driver.c
drivers/staging/fsl-mc/bus/mc-bus.c

index 2c4cd70b4cbb98a5fcb37fabae875cd084635866..767d437837e71517f9d2995af626a9a1bab1a487 100644 (file)
@@ -396,7 +396,9 @@ static int dprc_probe(struct fsl_mc_device *mc_dev)
                error = fsl_create_mc_io(&mc_dev->dev,
                                         mc_dev->regions[0].start,
                                         region_size,
-                                        NULL, 0, &mc_dev->mc_io);
+                                        NULL,
+                                        FSL_MC_IO_ATOMIC_CONTEXT_PORTAL,
+                                        &mc_dev->mc_io);
                if (error < 0)
                        return error;
        }
index 84db55b4dda5fef12f16e7dafbedc0a91581a830..d34f1af3974603936bbbc74c5b51960e7e63fbd5 100644 (file)
@@ -702,7 +702,8 @@ static int fsl_mc_bus_probe(struct platform_device *pdev)
        mc_portal_phys_addr = res.start;
        mc_portal_size = resource_size(&res);
        error = fsl_create_mc_io(&pdev->dev, mc_portal_phys_addr,
-                                mc_portal_size, NULL, 0, &mc_io);
+                                mc_portal_size, NULL,
+                                FSL_MC_IO_ATOMIC_CONTEXT_PORTAL, &mc_io);
        if (error < 0)
                return error;