mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
To: Charles Keepax <ckeepax@opensource.cirrus.com>
Cc: vkoul@kernel.org, broonie@kernel.org,
	yung-chuan.liao@linux.intel.com, lgirdwood@gmail.com,
	peter.ujfalusi@linux.intel.com, kai.vehmanen@linux.intel.com,
	linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	patches@opensource.cirrus.com
Subject: Re: [PATCH v4 1/4] ASoC: SOF: Intel: Add IRQ chip to distribute the SoundWire IRQ
Date: Tue, 24 Nov 2026 19:33:01 +0100	[thread overview]
Message-ID: <2751f03e-e93c-4889-ad41-c2d846212920@linux.dev> (raw)
In-Reply-To: <awXEJTvuD69pszTw@opensource.cirrus.com>

On 11/24/26 18:06, Charles Keepax wrote:
> On Tue, Nov 24, 2026 at 05:49:21PM +0100, Pierre-Louis Bossart wrote:
>> On 11/24/26 17:09, Charles Keepax wrote:
>>> Add an IRQ chip into the HDA code that can be used to trigger the
>>> SoundWire IRQ for each link. Currently, only the SoundWire IRQ
>>> is moved over to this IRQ chip, although in time the other IRQ
>>> functions could be too.
>>>
>>> This will allow refactoring such that the individual links each
>>> request and free their IRQs locally, rather than having to rely
>>> on looping over a list of links which is tricky to maintain while
>>> destroying the devices.
>>
>> Well, there's no such thing as a per-link SoundWire IRQ...
>>
>> The hardware is built in such a way that once a global interrupt is
>> received at the HDAudio controller level, the handler has to check if
>> this was an IPC, HDA, SoundWire interrupt - in that order. And in the
>> latter case there's no other way than iterating over each link.
> 
> Yeah, hence why we add the IRQ domain and claim a shared interrupt.
> I will reword a bit for the next spin.
> 
>> Using an abstraction to make each interrupt source 'self-contained'
>> would be fine and probably make the code cleaner, but then why stop at
>> SoundWire? I'd err on the side of 'go big or go home'...
> 
> Yeah this definitely could be expanded to the other handlers, as
> I note in one of the commit messages. But not really sure I want
> to go that far as it no longer relates to the issues I am trying
> to solve.

understand, this would probably need to be handled by Intel folks, since
it'd impact ALL platforms since GeminiLake - 2019.

>> At any rate this would be a significant change on both SOF/HDA and
>> SoundWire sides that should be handled as a well-tested prerequisite to
>> the series to allow for communication with the device during remove - it
>> doesn't seem right as a patch casually added in a v4...
> 
> I can split this patch out to a separate series if you prefer?

I guess it's more the Intel people who'd need to speak up on such an
invasive change. My recommendation would be to pick this patch and make
sure it's well tested with CI and daily tests. Whether it's part of the
same series or not is not really important, it's the test part that matters.

> Apologies, for the changes a few revisions in but I had generally
> imagined doing this would be too much work, hence the more hacky
> approach in the previous versions. But it turned out the rabbit
> hole was much shallower than I thought.
One open that I have is whether the dispatch of the shared interrupt
will deal with the links in the same order as with the explicit loop. If
not, there could be interesting timing issues that show up.

The other remark is that the free_irq() introduced in patch1 in
intel_link_remove() is moved in patch4.

  reply	other threads:[~2026-11-24 18:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 16:09 [PATCH v4 0/4] Allow SoundWire devices to communicate during remove Charles Keepax
2026-11-24 16:09 ` [PATCH v4 1/4] ASoC: SOF: Intel: Add IRQ chip to distribute the SoundWire IRQ Charles Keepax
2026-11-24 16:49   ` Pierre-Louis Bossart
2026-11-24 17:06     ` Charles Keepax
2026-11-24 18:33       ` Pierre-Louis Bossart [this message]
2026-11-24 16:09 ` [PATCH v4 2/4] soundwire: bus: Don't unassign dev_num before unregistering device Charles Keepax
2026-11-24 16:10 ` [PATCH v4 3/4] soundwire: bus: Expose a helper to remove devices from the bus Charles Keepax
2026-11-24 16:10 ` [PATCH v4 4/4] soundwire: intel_auxdevice: Don't disable IRQs before removing children Charles Keepax
2026-11-24 18:27   ` Pierre-Louis Bossart

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=2751f03e-e93c-4889-ad41-c2d846212920@linux.dev \
    --to=pierre-louis.bossart@linux.dev \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=vkoul@kernel.org \
    --cc=yung-chuan.liao@linux.intel.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

all inboxes | Powered by JetHome®