lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3bb91178-bc0a-4c93-a6f5-a685ff9a667c@gmail.com>
Date: Thu, 8 Aug 2024 08:30:03 +0300
From: Matti Vaittinen <mazziesaccount@...il.com>
To: Thomas Gleixner <tglx@...utronix.de>,
 Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
Cc: Mark Brown <broonie@...nel.org>,
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
 "Rafael J. Wysocki" <rafael@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] regmap: Allow setting IRQ domain name suffix

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! ~~


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ