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]
Date:   Mon, 12 Sep 2022 11:30:14 +0200
From:   Sergio Paracuellos <sergio.paracuellos@...il.com>
To:     Pali Rohár <pali@...nel.org>
Cc:     Bjorn Helgaas <bhelgaas@...gle.com>,
        Lorenzo Pieralisi <lpieralisi@...nel.org>,
        Rob Herring <robh@...nel.org>,
        Krzysztof Wilczyński <kw@...ux.com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        linux-pci <linux-pci@...r.kernel.org>
Subject: Re: [RFC PATCH 3/3] PCI: mt7621: Use PCI_CONF1_EXT_ADDRESS() macro

Hi Pali,

On Sun, Sep 11, 2022 at 1:21 PM Pali Rohár <pali@...nel.org> wrote:
>
> Simplify pcie-mt7621.c driver code and use new PCI_CONF1_EXT_ADDRESS()
> macro for accessing PCIe config space.
>
> Signed-off-by: Pali Rohár <pali@...nel.org>
> ---
>  drivers/pci/controller/pcie-mt7621.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/controller/pcie-mt7621.c b/drivers/pci/controller/pcie-mt7621.c
> index 33eb37a2225c..28cde116cd27 100644
> --- a/drivers/pci/controller/pcie-mt7621.c
> +++ b/drivers/pci/controller/pcie-mt7621.c
> @@ -25,6 +25,7 @@
>  #include <linux/of_pci.h>
>  #include <linux/of_platform.h>
>  #include <linux/pci.h>
> +#include <linux/pci-conf1.h>
>  #include <linux/phy/phy.h>
>  #include <linux/platform_device.h>
>  #include <linux/reset.h>
> @@ -123,8 +124,7 @@ static inline void pcie_port_write(struct mt7621_pcie_port *port,
>  static inline u32 mt7621_pcie_get_cfgaddr(unsigned int bus, unsigned int slot,
>                                          unsigned int func, unsigned int where)
>  {
> -       return (((where & 0xf00) >> 8) << 24) | (bus << 16) | (slot << 11) |
> -               (func << 8) | (where & 0xfc) | 0x80000000;
> +       return PCI_CONF1_EXT_ADDRESS(bus, slot, func, where);
>  }
>
>  static void __iomem *mt7621_pcie_map_bus(struct pci_bus *bus,
> --
> 2.20.1
>

I have just added you patches in the top of my 5.19 build:

commit 70cb6afe0e2ff1b7854d840978b1849bffb3ed21 (tag: v5.19.8,
stable/linux-5.19.y)

After building them and boot with your changes no regressions seem to
appear, so if this series are finally added to the tree, feel free to
add my:

Acked-by: Sergio Paracuellos <sergio.paracuellos@...il.com>
Tested-by: Sergio Paracuellos <sergio.paracuellos@...il.com>

Best regards,
    Sergio Paracuellos

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ