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: <20221001160025.GB9324@wunner.de>
Date:   Sat, 1 Oct 2022 18:00:25 +0200
From:   Lukas Wunner <lukas@...ner.de>
To:     Vidya Sagar <vidyas@...dia.com>
Cc:     bhelgaas@...gle.com, robh+dt@...nel.org,
        krzysztof.kozlowski+dt@...aro.org, lpieralisi@...nel.org,
        kw@...ux.com, thierry.reding@...il.com, jonathanh@...dia.com,
        mani@...nel.org, Sergey.Semin@...kalelectronics.ru,
        jszhang@...nel.org, linux-pci@...r.kernel.org,
        linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org,
        devicetree@...r.kernel.org, kthota@...dia.com,
        mmaddireddy@...dia.com, sagar.tv@...il.com,
        Marek Behún <kabel@...nel.org>,
        Pali Rohár <pali@...nel.org>,
        Jon Derrick <jonathan.derrick@...ux.dev>
Subject: Re: [PATCH V1 0/4] GPIO based PCIe Hot-Plug support

Adding Marek, Pali & Jon to cc as they've worked on somewhat similar
functionality:

https://lore.kernel.org/linux-pci/20220927141926.8895-1-kabel@kernel.org/
https://lore.kernel.org/linux-pci/1581120007-5280-1-git-send-email-jonathan.derrick@intel.com/

On Sat, Oct 01, 2022 at 12:57:43AM +0530, Vidya Sagar wrote:
> To support the Hot-plug feature, PCIe spec has a well-defined model for 
> hardware implementation and software programming interface. There are also
> some architectures/platforms where the Hot-plug feature is implemented in a
> non-standard way and software support for the respective implementations is
> available with the kernel. This patch series attempts to add support for one
> such non-standard way of supporting the Hot-plug feature where a single GPIO
> is used to detect and report the Hot-Plug and Unplug events to the SW.
> The platforms that can use this piece of software need to have GPIO routed
> from the slot to the controller which can indicate the presence/absence of
> the downstream device through its state. This GPIO should also have the
> capability to interrupt the system when the connection/disconnection event
> takes place.
> A GPIO Hot-plug framework is written which looks for a "hotplug-gpios" named
> GPIO entry in the corresponding device-tree entry of the controller and
> registers a hot-pluggable slot with the Hot-plug framework.
> The platform drivers of the PCIe host bridges/root ports can register with the
> aforementioned GPIO Hot-Plug framework along with ops to perform any platform
> specific tasks during Hot-Plug/Unplug events.
> 
> Oza Pawandeep made an attempt to upstream support for a similar Hot-plug
> feature implementation at a platform level, but the implementation as such
> was very specific to that platform (at least the way I understood it).
> https://patchwork.kernel.org/project/linux-pci/patch/1504155029-24729-2-git-send-email-oza.oza@broadcom.com/
> https://patchwork.kernel.org/project/linux-pci/patch/1504155029-24729-3-git-send-email-oza.oza@broadcom.com/
> https://patchwork.kernel.org/project/linux-pci/patch/1504155029-24729-4-git-send-email-oza.oza@broadcom.com/
> This current series also attempts to address that by extracting out all the
> common code to do with GPIO and Hot-plug core framework and expecting the
> platform drivers to only register/unregister with the GPIO framework. So,
> @Oza, could you try using the GPIO framework from this series and enable
> Hot-plug support for your platform if it still makes sense?
> 
> @Rob,
> Regarding the DT documentation change to add about 'hotplug-gpios, I'm not
> sure if pci.txt is the right place or the dt-schema repository
> i.e https://github.com/devicetree-org/dt-schema
> But, in the interest of keeping all the changes related to this feature in the
> the same repository, I made the changes to the pci.txt file in this repo itself.
> Please let me know if the documentation change needs to be moved to the other
> repo.
> 
> The Changes have been tested on the Tegra234 platform.
> 
> Vidya Sagar (4):
>   dt-bindings: Add "hotplug-gpios" PCIe property
>   PCI/hotplug: Add GPIO PCIe hotplug driver
>   PCI: tegra194: Add support to configure a pluggable slot
>   PCI: tegra194: Enable GPIO based Hot-Plug support
> 
>  Documentation/devicetree/bindings/pci/pci.txt |   4 +
>  drivers/pci/controller/dwc/pcie-tegra194.c    |  85 +++++++-
>  drivers/pci/hotplug/Kconfig                   |  11 +
>  drivers/pci/hotplug/Makefile                  |   1 +
>  drivers/pci/hotplug/gpio_php.c                | 200 ++++++++++++++++++
>  drivers/pci/hotplug/gpiophp.h                 |  40 ++++
>  6 files changed, 334 insertions(+), 7 deletions(-)
>  create mode 100644 drivers/pci/hotplug/gpio_php.c
>  create mode 100644 drivers/pci/hotplug/gpiophp.h
> 
> -- 
> 2.17.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ