linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. German Rivera" <German.Rivera@freescale.com>
To: <gregkh@linuxfoundation.org>, <arnd@arndb.de>,
	<devel@driverdev.osuosl.org>, <linux-kernel@vger.kernel.org>
Cc: <stuart.yoder@freescale.com>, <itai.katz@freescale.com>,
	<lijun.pan@freescale.com>, <leoli@freescale.com>,
	<scottwood@freescale.com>, <agraf@suse.de>,
	<bhamciu1@freescale.com>, <R89243@freescale.com>,
	<bhupesh.sharma@freescale.com>, <nir.erez@freescale.com>,
	<richard.schmitt@freescale.com>, <dan.carpenter@oracle.com>,
	<marc.zyngier@arm.com>, <jiang.liu@linux.intel.com>,
	"J. German Rivera" <German.Rivera@freescale.com>
Subject: [PATCH v2 06/11] staging: fsl-mc: Changed DPRC built-in portal's mc_io to be atomic
Date: Fri, 30 Oct 2015 14:43:32 -0500	[thread overview]
Message-ID: <1446234217-25512-7-git-send-email-German.Rivera@freescale.com> (raw)
In-Reply-To: <1446234217-25512-1-git-send-email-German.Rivera@freescale.com>

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>
---
Changes in v2: none

 drivers/staging/fsl-mc/bus/dprc-driver.c | 4 +++-
 drivers/staging/fsl-mc/bus/mc-bus.c      | 3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/fsl-mc/bus/dprc-driver.c b/drivers/staging/fsl-mc/bus/dprc-driver.c
index a9ead0d..7bb30dd 100644
--- a/drivers/staging/fsl-mc/bus/dprc-driver.c
+++ b/drivers/staging/fsl-mc/bus/dprc-driver.c
@@ -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;
 	}
diff --git a/drivers/staging/fsl-mc/bus/mc-bus.c b/drivers/staging/fsl-mc/bus/mc-bus.c
index 84db55b..d34f1af 100644
--- a/drivers/staging/fsl-mc/bus/mc-bus.c
+++ b/drivers/staging/fsl-mc/bus/mc-bus.c
@@ -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;

--
2.3.3


  parent reply	other threads:[~2015-10-30 20:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-30 19:43 [PATCH v2 00/11] staging: fsl-mc: MC bus MSI support J. German Rivera
2015-10-30 19:43 ` [PATCH v2 01/11] irqdomain: Added domain bus token DOMAIN_BUS_FSL_MC_MSI J. German Rivera
2015-11-06  1:56   ` Jiang Liu
2015-10-30 19:43 ` [PATCH v2 02/11] fsl-mc: msi: Added FSL-MC-specific member to the msi_desc's union J. German Rivera
2015-11-06  1:59   ` Jiang Liu
2015-10-30 19:43 ` [PATCH v2 03/11] staging: fsl-mc: Added generic MSI support for FSL-MC devices J. German Rivera
2015-11-06 17:50   ` Marc Zyngier
2015-11-06 23:20     ` Jose Rivera
2015-11-09 10:45       ` Marc Zyngier
2015-11-09 21:18         ` Jose Rivera
2015-10-30 19:43 ` [PATCH v2 04/11] staging: fsl-mc: Added GICv3-ITS support for FSL-MC MSIs J. German Rivera
2015-10-30 19:43 ` [PATCH v2 05/11] staging: fsl-mc: Extended MC bus allocator to include IRQs J. German Rivera
2015-10-30 19:43 ` J. German Rivera [this message]
2015-10-30 19:43 ` [PATCH v2 07/11] staging: fsl-mc: Populate the IRQ pool for an MC bus instance J. German Rivera
2015-10-30 19:43 ` [PATCH v2 08/11] staging: fsl-mc: set MSI domain for DPRC objects J. German Rivera
2015-10-30 19:43 ` [PATCH v2 09/11] staging: fsl-mc: Fixed bug in dprc_probe() error path J. German Rivera
2015-10-30 19:43 ` [PATCH v2 10/11] staging: fsl-mc: Added DPRC interrupt handler J. German Rivera
2015-10-30 19:43 ` [PATCH v2 11/11] staging: fsl-mc: Added MSI support to the MC bus driver J. German Rivera

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1446234217-25512-7-git-send-email-German.Rivera@freescale.com \
    --to=german.rivera@freescale.com \
    --cc=R89243@freescale.com \
    --cc=agraf@suse.de \
    --cc=arnd@arndb.de \
    --cc=bhamciu1@freescale.com \
    --cc=bhupesh.sharma@freescale.com \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=itai.katz@freescale.com \
    --cc=jiang.liu@linux.intel.com \
    --cc=leoli@freescale.com \
    --cc=lijun.pan@freescale.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=nir.erez@freescale.com \
    --cc=richard.schmitt@freescale.com \
    --cc=scottwood@freescale.com \
    --cc=stuart.yoder@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).