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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250716144937.GA2531969@bhelgaas>
Date: Wed, 16 Jul 2025 09:49:37 -0500
From: Bjorn Helgaas <helgaas@...nel.org>
To: Nam Cao <namcao@...utronix.de>, Jiri Slaby <jirislaby@...nel.org>
Cc: linux-kernel@...r.kernel.org, tglx@...utronix.de,
	Bjorn Helgaas <bhelgaas@...gle.com>, linux-pci@...r.kernel.org,
	Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH] pci/controller: Use dev_fwnode()

[+cc Arnd]

On Wed, Jul 16, 2025 at 09:59:42AM +0200, Nam Cao wrote:
> On Tue, Jul 15, 2025 at 01:49:17PM -0500, Bjorn Helgaas wrote:
> > On Wed, Jun 11, 2025 at 12:43:44PM +0200, Jiri Slaby (SUSE) wrote:
> > > irq_domain_create_simple() takes fwnode as the first argument. It can be
> > > extracted from the struct device using dev_fwnode() helper instead of
> > > using of_node with of_fwnode_handle().
> > > 
> > > So use the dev_fwnode() helper.
> > > 
> > > Signed-off-by: Jiri Slaby (SUSE) <jirislaby@...nel.org>
> > > Cc: Bjorn Helgaas <bhelgaas@...gle.com>
> > > Cc: linux-pci@...r.kernel.org
> > > ---
> > >  drivers/pci/controller/mobiveil/pcie-mobiveil-host.c | 5 ++---
> > >  drivers/pci/controller/pcie-mediatek-gen3.c          | 3 +--
> > 
> > I think the pcie-mediatek-gen3.c part of this is no longer relevant
> > after Nam's series [1].
> 
> fwnode is still needed after my patch. As part of
> struct irq_domain_info info = { ... }
> 
> You could squash this one into my patch. I personally would leave it be.
> But fine to me either way.

Oh, I think I see what happened:

  - Jiri replaced of_fwnode_handle() with dev_fwnode() in the
    irq_domain_create_linear() call [1]

  - On top of that, Nam replaced irq_domain_create_linear() with
    msi_create_parent_irq_domain(), and moved the dev_fwnode() to the
    struct irq_domain_info [2]

  - I rebuilt pci/next with Nam's series merged *before* Jiri's,
    resulting in a conflict (of_fwnode_handle() was still used in the
    irq_domain_create_linear() call) which I resolved by using
    dev_fwnode() when building struct irq_domain_info [3]

I think the result [4] is OK, but it's not ideal because a
dev_fwnode() conversion got inserted into Nam's patch without
explanation.

So I think I'll put Jiri's patches (along with Arnd's similar altera
patch [5]) on a branch and merge them before Nam's.

Jiri, question for you: even after all this, there are still several
uses in drivers/pci/ of of_fwnode_handle() to extract the
fwnode_handle for a struct device * [6,7,8,9,10,11,12].

Should these also be changed?

Bjorn

[1] https://lore.kernel.org/r/20250611104348.192092-16-jirislaby@kernel.org
[2] https://patch.msgid.link/bfbd2e375269071b69e1aa85e629ee4b7c99518f.1750858083.git.namcao@linutronix.de
[3] https://git.kernel.org/cgit/linux/kernel/git/pci/pci.git/commit/?id=dd6fad415071
[4] https://git.kernel.org/cgit/linux/kernel/git/pci/pci.git/tree/drivers/pci/controller/pcie-mediatek-gen3.c?id=beedc9eb3114#n750
[5] https://lore.kernel.org/r/20250611104348.192092-2-jirislaby@kernel.org

[6] https://git.kernel.org/cgit/linux/kernel/git/pci/pci.git/tree/drivers/pci/controller/dwc/pcie-designware-host.c?id=beedc9eb3114#n217
[7] https://git.kernel.org/cgit/linux/kernel/git/pci/pci.git/tree/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c?id=beedc9eb3114#n442
[8] https://git.kernel.org/cgit/linux/kernel/git/pci/pci.git/tree/drivers/pci/controller/pcie-altera-msi.c?id=beedc9eb3114#n169
[9] https://git.kernel.org/cgit/linux/kernel/git/pci/pci.git/tree/drivers/pci/controller/pcie-mediatek.c?id=beedc9eb3114#n490
[10] https://git.kernel.org/cgit/linux/kernel/git/pci/pci.git/tree/drivers/pci/controller/pcie-xilinx-dma-pl.c?id=beedc9eb3114#n468
[11] https://git.kernel.org/cgit/linux/kernel/git/pci/pci.git/tree/drivers/pci/controller/pcie-xilinx-nwl.c?id=beedc9eb3114#n501
[12] https://git.kernel.org/cgit/linux/kernel/git/pci/pci.git/tree/drivers/pci/controller/plda/pcie-plda-host.c?id=beedc9eb3114#n156

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ