From: Marc Zyngier <marc.zyngier@arm.com>
To: Jose Rivera <German.Rivera@freescale.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"arnd@arndb.de" <arnd@arndb.de>,
"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Stuart Yoder <stuart.yoder@freescale.com>,
Katz Itai <itai.katz@freescale.com>,
Lijun Pan <Lijun.Pan@freescale.com>, Li Leo <LeoLi@freescale.com>,
Scott Wood <scottwood@freescale.com>,
"agraf@suse.de" <agraf@suse.de>,
Hamciuc Bogdan <bhamciu1@freescale.com>,
Marginean Alexandru <R89243@freescale.com>,
Sharma Bhupesh <bhupesh.sharma@freescale.com>,
Erez Nir <nir.erez@freescale.com>,
Richard Schmitt <richard.schmitt@freescale.com>,
"dan.carpenter@oracle.com" <dan.carpenter@oracle.com>,
"jiang.liu@linux.intel.com" <jiang.liu@linux.intel.com>
Subject: Re: [PATCH v2 03/11] staging: fsl-mc: Added generic MSI support for FSL-MC devices
Date: Mon, 09 Nov 2015 10:45:59 +0000 [thread overview]
Message-ID: <56407967.1030506@arm.com> (raw)
In-Reply-To: <DM2PR0301MB13097ADC9AC3E511B7FC9352FE280@DM2PR0301MB1309.namprd03.prod.outlook.com>
On 06/11/15 23:20, Jose Rivera wrote:
[...]
>>> +static void __fsl_mc_msi_write_msg(struct fsl_mc_device *mc_bus_dev,
>>> + struct fsl_mc_device_irq *mc_dev_irq) {
>>> + int error;
>>> + struct fsl_mc_device *owner_mc_dev = mc_dev_irq->mc_dev;
>>> + struct msi_desc *msi_desc = mc_dev_irq->msi_desc;
>>> + struct dprc_irq_cfg irq_cfg;
[...]
>>> + /*
>>> + * DPRCs and other objects use different commands to set up IRQs,
>>> + * so we have to differentiate them here.
>>> + */
>>> + if (owner_mc_dev == mc_bus_dev) {
>>> + /*
>>> + * IRQ is for the mc_bus_dev's DPRC itself
>>> + */
>>> + error = dprc_set_irq(mc_bus_dev->mc_io,
>>> + MC_CMD_FLAG_INTR_DIS | MC_CMD_FLAG_PRI,
>>> + mc_bus_dev->mc_handle,
>>> + mc_dev_irq->dev_irq_index,
>>> + &irq_cfg);
>>> + if (error < 0) {
>>> + dev_err(&owner_mc_dev->dev,
>>> + "dprc_set_irq() failed: %d\n", error);
>>> + }
>>> + } else {
>>> + error = dprc_set_obj_irq(mc_bus_dev->mc_io,
>>> + MC_CMD_FLAG_INTR_DIS | MC_CMD_FLAG_PRI,
>>> + mc_bus_dev->mc_handle,
>>> + owner_mc_dev->obj_desc.type,
>>> + owner_mc_dev->obj_desc.id,
>>> + mc_dev_irq->dev_irq_index,
>>> + &irq_cfg);
>>> + if (error < 0) {
>>> + dev_err(&owner_mc_dev->dev,
>>> + "dprc_obj_set_irq() failed: %d\n", error);
>>> + }
>>> + }
>>
>> It feels a bit odd that you have all of this under a single MSI umbrella,
>> and yet have to differentiate between them. Do they have a different
>> programming interface? Or is that because these dprc_set_*_irq functions
>> do some other stuff behind the scene (I'm too lazy to check...)?
>>
> Due to MC firmware API limitations, dprc_set_obj_irq can only be used
> to set IRQs for the DPRC's children not for the DPRC itself.
Right. So this makes me wonder whether or not you have the right
approach here. The logic behind the bus type was that devices with a
common programming interface would share a bus type (the odd duck being
platform which is used to implement anything else).
Your description seems to suggest that only devices behind the DPRC
share that programming interface, and that the DPRC itself is the local
weirdo. Should it be using the platform-msi subsystem instead? Or is it
just a matter of firmware oddity?
This is probably not a big deal, but it is worth keeping it in mind,
specially if that has visible consequences (in your device tree, for
example).
Thanks,
M.
--
Jazz is not dead. It just smells funny...
next prev parent reply other threads:[~2015-11-09 10:46 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 [this message]
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 ` [PATCH v2 06/11] staging: fsl-mc: Changed DPRC built-in portal's mc_io to be atomic J. German Rivera
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=56407967.1030506@arm.com \
--to=marc.zyngier@arm.com \
--cc=German.Rivera@freescale.com \
--cc=LeoLi@freescale.com \
--cc=Lijun.Pan@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=linux-kernel@vger.kernel.org \
--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