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: <20211208155118.GW6385@nvidia.com>
Date:   Wed, 8 Dec 2021 11:51:18 -0400
From:   Jason Gunthorpe <jgg@...dia.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Bjorn Helgaas <helgaas@...nel.org>,
        Marc Zygnier <maz@...nel.org>,
        Alex Williamson <alex.williamson@...hat.com>,
        Kevin Tian <kevin.tian@...el.com>,
        Megha Dey <megha.dey@...el.com>,
        Ashok Raj <ashok.raj@...el.com>, linux-pci@...r.kernel.org,
        Cedric Le Goater <clg@...d.org>,
        xen-devel@...ts.xenproject.org, Juergen Gross <jgross@...e.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Will Deacon <will@...nel.org>,
        Santosh Shilimkar <ssantosh@...nel.org>,
        iommu@...ts.linux-foundation.org, dmaengine@...r.kernel.org,
        Stuart Yoder <stuyoder@...il.com>,
        Laurentiu Tudor <laurentiu.tudor@....com>,
        Nishanth Menon <nm@...com>, Tero Kristo <kristo@...nel.org>,
        linux-arm-kernel@...ts.infradead.org,
        Vinod Koul <vkoul@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Robin Murphy <robin.murphy@....com>,
        Sinan Kaya <okaya@...nel.org>
Subject: Re: [patch V2 24/36] powerpc/pseries/msi: Use MSI device properties

On Mon, Dec 06, 2021 at 11:39:34PM +0100, Thomas Gleixner wrote:
> instead of fiddling with MSI descriptors.
> 
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Reviewed-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Reviewed-by: Jason Gunthorpe <jgg@...dia.com>
>  arch/powerpc/platforms/pseries/msi.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> +++ b/arch/powerpc/platforms/pseries/msi.c
> @@ -447,9 +447,9 @@ static int rtas_prepare_msi_irqs(struct
>  static int pseries_msi_ops_prepare(struct irq_domain *domain, struct device *dev,
>  				   int nvec, msi_alloc_info_t *arg)
>  {
> +	bool is_msix = msi_device_has_property(dev, MSI_PROP_PCI_MSIX);
> +	int type = is_msix ? PCI_CAP_ID_MSIX : PCI_CAP_ID_MSI;
>  	struct pci_dev *pdev = to_pci_dev(dev);

We have the pci_dev here, why not just do something like

   bool is_msix = pdev->msix_enabled;

?

Jason

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ