public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matti Vaittinen <mazziesaccount@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Cc: Mark Brown <broonie@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] regmap: Allow setting IRQ domain name suffix
Date: Thu, 8 Aug 2024 08:30:03 +0300	[thread overview]
Message-ID: <3bb91178-bc0a-4c93-a6f5-a685ff9a667c@gmail.com> (raw)
In-Reply-To: <87r0b02umj.ffs@tglx>

On 8/7/24 18:57, Thomas Gleixner wrote:
> Matti!
> 
> On Wed, Aug 07 2024 at 15:02, Thomas Gleixner wrote:
>> On Tue, Aug 06 2024 at 14:51, Matti Vaittinen wrote:
>>> Hence I'd rather learn from a small explanation (what is the
>>> expected .size) than by fixing this after I see regression reports from
>>> real users of the irq_domain_create_legacy() :)
>>
>> So the size of the domain is sum of the parameters @size and
>> @first_hwirq. That's so that the hardware interrupt is zero indexed for
>> an array based lookup.

Ah, thanks. This was what I expected, but wasn't really sure. Makes sense.

>> The association obviously wants only the @size parameter because that's
>> what the caller wants interrupts for as it obviously can't provide
>> interrupts below @first_hwirq.

Still makes sense :) I'll fix my patches based on this, thanks :)

> For more background.
> 
> The legacy domain is for configurations which have fixed interrupt
> numbers either in general or for parts of the interrupt space.
> 
> The trivial case is that there is a single interrupt domain with
> interrupt numbers from 0 to $MAX.
> 
> But there are cases which have the interrupt space devided into chunks:
> 
> hwirq	virq        domain
> 0-15    0-15        A
> 16-31   16-31       B
> ...
> 
> To support such configurations in the irq domain world, the legacy
> domain was added. Similar to that is the simple domain which allows the
> caller to specify a linux interrupt number from which the domain should
> start. See
> 
> 1bc04f2cf8c2 ("irq_domain: Add support for base irq and hwirq in legacy mappings")
> 781d0f46d81e ("irq_domain: Standardise legacy/linear domain selection")
> 
> for further enlightment.

Thomas - Thank You. I appreciate the time you took to explain this 
further. I didn't really expect it :) I was more afraid of getting a 
reply: "Please, go read the code and don't expect others to do your 
work." :) This explanation and the pointers to commits are very much 
appreciated!

I think I've seen code where some drivers used fixed IRQs - but this was 
a long long time ago in a galaxy far far away :)

Yours,
	-- Matti

-- 
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland

~~ When things go utterly wrong vim users can always type :help! ~~


      reply	other threads:[~2024-08-08  5:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-01 10:58 [PATCH 0/2] regmap IRQ support for devices with multiple IRQs Matti Vaittinen
2024-07-01 10:58 ` [PATCH 1/2] irqdomain: Allow giving name suffix for domain Matti Vaittinen
2024-07-01 10:59 ` [PATCH 2/2] regmap: Allow setting IRQ domain name suffix Matti Vaittinen
2024-07-07 18:13   ` Thomas Gleixner
2024-07-08 12:40     ` Matti Vaittinen
2024-07-13 12:22       ` Thomas Gleixner
2024-08-05 13:04         ` Matti Vaittinen
2024-08-05 13:11           ` Thomas Gleixner
2024-08-06  8:18             ` Matti Vaittinen
2024-08-06 11:51         ` Matti Vaittinen
2024-08-07 13:02           ` Thomas Gleixner
2024-08-07 15:57             ` Thomas Gleixner
2024-08-08  5:30               ` Matti Vaittinen [this message]

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=3bb91178-bc0a-4c93-a6f5-a685ff9a667c@gmail.com \
    --to=mazziesaccount@gmail.com \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matti.vaittinen@fi.rohmeurope.com \
    --cc=rafael@kernel.org \
    --cc=tglx@linutronix.de \
    /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