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: <69f8c45c-29b4-4090-8034-8c5a19efa4f8@ti.com>
Date: Thu, 25 Jul 2024 10:50:13 +0530
From: Siddharth Vadapalli <s-vadapalli@...com>
To: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
CC: Siddharth Vadapalli <s-vadapalli@...com>, <bhelgaas@...gle.com>,
        <lpieralisi@...nel.org>, <kw@...ux.com>, <robh@...nel.org>,
        <vigneshr@...com>, <kishon@...nel.org>, <linux-pci@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>,
        <stable@...r.kernel.org>, <ahalaney@...hat.com>, <srk@...com>
Subject: Re: [PATCH] PCI: j721e: Set .map_irq and .swizzle_irq to NULL

On Wed, Jul 24, 2024 at 09:49:16PM +0530, Manivannan Sadhasivam wrote:
> On Wed, Jul 24, 2024 at 12:20:48PM +0530, Siddharth Vadapalli wrote:
> > Since the configuration of Legacy Interrupts (INTx) is not supported, set
> > the .map_irq and .swizzle_irq callbacks to NULL. This fixes the error:
> >   of_irq_parse_pci: failed with rc=-22
> > due to the absence of Legacy Interrupts in the device-tree.
> > 
> 
> Do you really need to set 'swizzle_irq' to NULL? pci_assign_irq() will bail out
> if 'map_irq' is set to NULL.

While 'swizzle_irq' won't be invoked if 'map_irq' is NULL, having a
non-NULL 'swizzle_irq' (pci_common_swizzle in this case) with a NULL
'map_irq' seems inconsistent to me though the code-path may never invoke
it. Wouldn't a non-NULL 'swizzle_irq' imply that Legacy Interrupts are
supported, while a NULL 'map_irq' indicates that they aren't? Since they
are always described in pairs, whether it is in the initial commit that
added support for the Cadence PCIe Host controller (used by pci-j721e.c):
https://github.com/torvalds/linux/commit/1b79c5284439
OR the commit which moved the shared 'map_irq' and 'swizzle_irq' defaults
from all the host drivers into the common 'devm_of_pci_bridge_init()'
function:
https://github.com/torvalds/linux/commit/b64aa11eb2dd
I have set both of them to NULL for the sake of consistency.

Regards,
Siddharth.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ