From: Thomas Gleixner <tglx@linutronix.de>
To: Nipun Gupta <nipun.gupta@amd.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"maz@kernel.org" <maz@kernel.org>, "jgg@ziepe.ca" <jgg@ziepe.ca>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "git (AMD-Xilinx)" <git@amd.com>,
"Anand, Harpreet" <harpreet.anand@amd.com>,
"Jansen Van Vuuren, Pieter" <pieter.jansen-van-vuuren@amd.com>,
"Agarwal, Nikhil" <nikhil.agarwal@amd.com>,
"Simek, Michal" <michal.simek@amd.com>,
"Gangurde, Abhijit" <abhijit.gangurde@amd.com>,
"Cascon, Pablo" <pablo.cascon@amd.com>
Subject: Re: [PATCH] cdx: add MSI support for CDX bus
Date: Fri, 12 May 2023 20:15:05 +0200 [thread overview]
Message-ID: <875y8xbemu.ffs@tglx> (raw)
In-Reply-To: <182c4d7b-9e91-c00e-43ab-a2c0bd671828@amd.com>
Nipun!
On Fri, May 12 2023 at 19:50, Nipun Gupta wrote:
> On 5/11/2023 3:59 AM, Thomas Gleixner wrote:
>> CDX is not any different than PCI. The actual "interrupt chip" is not
>> part of the bus, it's part of the device and pretending that it is a bus
>> specific thing is just running in to the same cul-de-sac sooner than
>> later.
>
> I understand your viewpoint, but would state that CDX bus is somewhat
> different than PCI in the sense that firmware is a controller for
> all the devices and their configuration. CDX bus controller sends all
> the write_msi_msg commands to firmware running on RPU over the RPmsg and
> it is the firmware which interfaces with actual devices to pass this
> information to devices in a way agreed between firmware and device. The
> only way to pass MSI information to device is via firmware and CDX bus
> controller is only entity which can communicate with the firmware for
> this.
Fair enough, but we wouldn't had this dicussion if the above information
would have been part of the changelog. See?
>> IIRC, there is a gap vs. interrupt affinity setting from user space,
>> which is irrelevant for I2C, SPI etc. configured interrupt chips as they
>> raise interrupt via an SoC interrupt pin and that's the entity which
>> does the affinity management w/o requiring I2C/SPI. IIRC I posted a
>> patch snippet to that effect in one of those lengthy PCI/MSI/IMS threads
>> because that is also required for MSI storage which happens to be in
>> queue memory and needs to be synchronized via some command channel. But
>> I can't be bothered to search for it as it's a no-brainer to fix that
>> up.
>
> Thanks for this analysis and pointing the hidden crucial issues with the
> implementation. These needs to be fixed.
>
> As per your suggestion, we can add Firmware interaction code in the
> irq_bus_sync_xx APIs. Another option is to change the
> cdx_mcdi_rpc_async() API to atomic synchronous API.
I'm not a great fan of that. Depending on how long this update takes the
CPU will busy wait for it to complete with interrupts disabled and locks
held.
> We are evaluating both the solutions and will update the
> implementation accordingly.
Thanks,
tglx
next prev parent reply other threads:[~2023-05-12 18:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-08 14:09 [PATCH] cdx: add MSI support for CDX bus Nipun Gupta
2023-05-09 8:01 ` Thomas Gleixner
2023-05-09 11:06 ` Gupta, Nipun
2023-05-09 22:01 ` Thomas Gleixner
2023-05-10 14:04 ` Nipun Gupta
2023-05-10 22:29 ` Thomas Gleixner
2023-05-10 23:52 ` Thomas Gleixner
2023-05-12 14:20 ` Nipun Gupta
2023-05-12 18:15 ` Thomas Gleixner [this message]
2023-05-15 13:09 ` Nipun Gupta
2023-05-15 16:46 ` Thomas Gleixner
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=875y8xbemu.ffs@tglx \
--to=tglx@linutronix.de \
--cc=abhijit.gangurde@amd.com \
--cc=git@amd.com \
--cc=gregkh@linuxfoundation.org \
--cc=harpreet.anand@amd.com \
--cc=jgg@ziepe.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=michal.simek@amd.com \
--cc=nikhil.agarwal@amd.com \
--cc=nipun.gupta@amd.com \
--cc=pablo.cascon@amd.com \
--cc=pieter.jansen-van-vuuren@amd.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