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] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZjxaP_BNWVufJb_X@finisterre.sirena.org.uk>
Date: Thu, 9 May 2024 07:08:15 +0200
From: Mark Brown <broonie@...nel.org>
To: Matti Vaittinen <mazziesaccount@...il.com>
Cc: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>,
	Lee Jones <lee@...nel.org>, Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Liam Girdwood <lgirdwood@...il.com>,
	Wim Van Sebroeck <wim@...ux-watchdog.org>,
	Guenter Roeck <linux@...ck-us.net>, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-watchdog@...r.kernel.org,
	Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [RFC PATCH 0/6] Support ROHM BD96801 scalable PMIC

On Mon, Apr 22, 2024 at 01:52:27PM +0300, Matti Vaittinen wrote:
> On 4/5/24 12:19, Matti Vaittinen wrote:
> > On 4/4/24 16:15, Matti Vaittinen wrote:

> > > > I would expect each parent interrupt to show up as a separate remap_irq.

> > > > So if we arrange to supply a name when we register multiple domains
> > > > things should work fine?

> > After my latest findings, yes, I think so. How to do this correctly is
> > beyond me though. The __irq_domain_create() seems to me that the name is
> > meant to be the dt-node name when the controller is backed by a real
> > dt-node. Naming of the irq_domain_alloc_named_fwnode() sounds to me like

..

> If we wanted to support multiple HWIRQs / regmap-IRQ controller, it would
> require us to duplicate almost everything in the struct regmap_irq_chip for
> every new parent IRQ. The status/mask register information, IRQ type, etc.
> Naturally, it would require also duplicating lot of the data contained in
> the struct regmap_irq_chip_data. I am not sure if this could be done so the
> change is not reflected in the existing IRQ data initialization macros etc.
> Furthermore, some API changes would be required like changes to
> regmap_irq_get_domain().

I don't understand what the difficulty is here - we're creating multiple
interrupt controllers so I'd expect to have to have full definitions of
each, and since everything is referenced by name from the root
regmap_irq_chip which gets registered it's just a case of supplying
different names and all the helpers should be fine?

> Thus, forcing the regmap-IRQ to support multiple parents instead of having
> own regmap-IRQ instance / parent IRQ feels like fitting square item to a
> round hole. I am sure fixing all the bugs I caused would give donate a lot
> of EXP-points though :rolleyes:

Right, my suggestion is to register multiple regmap_irq instrances - one
per parent - and supply a name that allows all the display/debugfs stuff
that currently uses the dev_name() to deduplicate.  You'd end up
sticking -primary, -secondary or whatever name was supplied onto the
names we currently use.

> Another option I see, is trying to think if irq-domain name could be
> changed. (This is what the RFC v3 does, [ab]using the
> irq_domain_update_bus_token()). I was a bit put off by the idea of
> 'instantiating' multiple domains (or regmap-IRQ controllers) from a single
> node, but more I think of this, more I lean towards it. Besides, this is not

Yes, register mutliple controllers with different names.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ