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: <7c8ebe5d-a5be-6aba-1b84-15dd2f32b52f@linux.intel.com>
Date: Wed, 14 May 2025 14:29:42 +0300 (EEST)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: Lukas Wunner <lukas@...ner.de>
cc: Bjorn Helgaas <bhelgaas@...gle.com>, LKML <linux-kernel@...r.kernel.org>, 
    linux-pci@...r.kernel.org
Subject: Re: [PATCH 1/1] PCI: Move reset and restore related code to
 reset-restore.c

On Wed, 14 May 2025, Lukas Wunner wrote:

> On Mon, May 12, 2025 at 03:08:57PM +0300, Ilpo Järvinen wrote:
> > There are quite many reset and restore related functions in pci.c that
> > barely depend on the other functions in pci.c. Create reset-restore.c
> > for reset and restore related logic to keep those 1k lines in one place.
> > 
> > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
> 
> Hm, could I get a:
> 
> Suggested-by: Lukas Wunner <lukas@...ner.de>
> 
> ... per:
> 
> https://lore.kernel.org/r/Z7hZZNT5NHYncZ3c@wunner.de/

Ah, I hadn't even noticed you suggested it (I recall reading the first 
paragraph of that but not the last one which made the suggestion). I made 
this patch first back in 2024 and have just sit on top of the change until 
there seems to be reasonably conflict free window.

> >  drivers/pci/Makefile        |    4 +-
> >  drivers/pci/pci.c           | 1015 +----------------------------------
> >  drivers/pci/pci.h           |   10 +
> >  drivers/pci/reset-restore.c | 1014 ++++++++++++++++++++++++++++++++++
> 
> I'd prefer reset.c for succinctness.

I initially had reset.c but was worried the name is too narrow scoped,
I can change back to reset.c.

> That said, this patch conflicts with Mani's slot reset patches
> which a lot of people seem to be interested in:
> 
> https://lore.kernel.org/r/20250508-pcie-reset-slot-v4-0-7050093e2b50@linaro.org/
> 
> Maybe it's better to give Mani's series the advantage and defer
> this patch here to the next cycle.

Fine for me but those conflicts looks quite simple. Next cycle will 
have its own share of conflicts, I'm sure :-).

> > --- a/drivers/pci/pci.c
> > +++ b/drivers/pci/pci.c
> > @@ -69,15 +69,7 @@ struct pci_pme_device {
> >   */
> >  #define PCI_RESET_WAIT 1000 /* msec */
> 
> I'd move PCI_RESET_WAIT, pci_dev_wait() and
> pci_bridge_wait_for_secondary_bus() to reset.c as well.
> Then pci_dev_d3_sleep() is the only function which is no longer static.

Okay I'll move those as well but that static statement is not exactly 
true, I'll these need to do these as well:

- move pci_bus_max_d3cold_delay() along with 
  pci_bridge_wait_for_secondary_bus() to keep that static, or turn that
  into a non-static.

- make pcie_wait_for_link_delay() non-static.

-- 
 i.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ