Message ID | 20230119013602.607466-13-tianfei.zhang@intel.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | add FPGA hotplug manager driver | expand |
On Wed, Jan 18, 2023 at 08:36:02PM -0500, Tianfei Zhang wrote: > +=========================== > +FPGA Hotplug Manager Driver > +=========================== > + > +Authors: > + > +- Tianfei Zhang <tianfei.zhang@intel.com> > + > +There are some board managements for PCIe-based FPGA card like burning the entire > +image, loading a new FPGA image or BMC firmware in FPGA deployment of data center > +or cloud. For example, loading a new FPGA image, the driver needs to remove all of > +PCI devices like PFs/VFs and as well as any other types of devices (platform, etc.) > +defined within the FPGA. After triggering the image load of the FPGA card via BMC, > +the driver reconfigures the PCI bus. The FPGA Hotplug Manager (fpgahp) driver manages > +those devices and functions leveraging the PCI hotplug framework to deal with the > +reconfiguration of the PCI bus and removal/probe of PCI devices below the FPGA card. > + > +This fpgahp driver adds 2 new callbacks to extend the hotplug mechanism to > +allow selecting and loading a new FPGA image. > + > + - available_images: Optional: called to return the available images of a FPGA card. > + - image_load: Optional: called to load a new image for a FPGA card. > + > +In general, the fpgahp driver provides some sysfs files:: > + > + /sys/bus/pci/slots/<X-X>/available_images > + /sys/bus/pci/slots/<X-X>/image_load The doc reads a rather confused to me, so I have to make wording improv: ---- >8 ---- diff --git a/Documentation/fpga/fpgahp.rst b/Documentation/fpga/fpgahp.rst index 3ec34bbffde10c..73f1b53de1cf85 100644 --- a/Documentation/fpga/fpgahp.rst +++ b/Documentation/fpga/fpgahp.rst @@ -8,22 +8,22 @@ Authors: - Tianfei Zhang <tianfei.zhang@intel.com> -There are some board managements for PCIe-based FPGA card like burning the entire -image, loading a new FPGA image or BMC firmware in FPGA deployment of data center -or cloud. For example, loading a new FPGA image, the driver needs to remove all of -PCI devices like PFs/VFs and as well as any other types of devices (platform, etc.) -defined within the FPGA. After triggering the image load of the FPGA card via BMC, -the driver reconfigures the PCI bus. The FPGA Hotplug Manager (fpgahp) driver manages -those devices and functions leveraging the PCI hotplug framework to deal with the -reconfiguration of the PCI bus and removal/probe of PCI devices below the FPGA card. -This fpgahp driver adds 2 new callbacks to extend the hotplug mechanism to -allow selecting and loading a new FPGA image. +The FPGA Hotplug Manager (fpgahp) manages PCIe-based FPGA card devices. +The PCI bus reconfiguration and device probe for devices below the FPGA +card are done by leveraging the PCI hotplug framework. - - available_images: Optional: called to return the available images of a FPGA card. - - image_load: Optional: called to load a new image for a FPGA card. +The driver can be helpful in device management tasks like burning the entire +image and loading a new FPGA image or BMC firmware in FPGA deployment of data +center or cloud. For example, when loading the image, the driver needs to +remove all of PCI devices like PFs/VFs and as well as any other types of +devices (platform, etc.) defined within the FPGA. After triggering the image +load of the FPGA card via BMC, the driver reconfigures the appropriate PCI bus. -In general, the fpgahp driver provides some sysfs files:: +The driver adds 2 new sysfs callbacks to extend the hotplug mechanism to +allow selecting and loading a new FPGA image: + + - ``/sys/bus/pci/slots/<X-X>/available_images``: list available images for + a FPGA card. + - ``/sys/bus/pci/slots/<X-X>/image_load``: load the image. - /sys/bus/pci/slots/<X-X>/available_images - /sys/bus/pci/slots/<X-X>/image_load Thanks.
diff --git a/Documentation/fpga/fpgahp.rst b/Documentation/fpga/fpgahp.rst new file mode 100644 index 000000000000..3ec34bbffde1 --- /dev/null +++ b/Documentation/fpga/fpgahp.rst @@ -0,0 +1,29 @@ +.. SPDX-License-Identifier: GPL-2.0 + +=========================== +FPGA Hotplug Manager Driver +=========================== + +Authors: + +- Tianfei Zhang <tianfei.zhang@intel.com> + +There are some board managements for PCIe-based FPGA card like burning the entire +image, loading a new FPGA image or BMC firmware in FPGA deployment of data center +or cloud. For example, loading a new FPGA image, the driver needs to remove all of +PCI devices like PFs/VFs and as well as any other types of devices (platform, etc.) +defined within the FPGA. After triggering the image load of the FPGA card via BMC, +the driver reconfigures the PCI bus. The FPGA Hotplug Manager (fpgahp) driver manages +those devices and functions leveraging the PCI hotplug framework to deal with the +reconfiguration of the PCI bus and removal/probe of PCI devices below the FPGA card. + +This fpgahp driver adds 2 new callbacks to extend the hotplug mechanism to +allow selecting and loading a new FPGA image. + + - available_images: Optional: called to return the available images of a FPGA card. + - image_load: Optional: called to load a new image for a FPGA card. + +In general, the fpgahp driver provides some sysfs files:: + + /sys/bus/pci/slots/<X-X>/available_images + /sys/bus/pci/slots/<X-X>/image_load diff --git a/Documentation/fpga/index.rst b/Documentation/fpga/index.rst index f80f95667ca2..8973a8a3f066 100644 --- a/Documentation/fpga/index.rst +++ b/Documentation/fpga/index.rst @@ -8,6 +8,7 @@ fpga :maxdepth: 1 dfl + fpgahp .. only:: subproject and html diff --git a/MAINTAINERS b/MAINTAINERS index 85d4e3a0e986..569c7f680229 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8169,6 +8169,7 @@ L: linux-fpga@vger.kernel.org L: linux-pci@vger.kernel.org S: Maintained F: Documentation/ABI/testing/sysfs-driver-fpgahp +F: Documentation/fpga/fpgahp.rst F: drivers/pci/hotplug/fpgahp.c F: include/linux/fpga/fpgahp_manager.h
Add the description of fpgahp driver. Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com> --- Documentation/fpga/fpgahp.rst | 29 +++++++++++++++++++++++++++++ Documentation/fpga/index.rst | 1 + MAINTAINERS | 1 + 3 files changed, 31 insertions(+) create mode 100644 Documentation/fpga/fpgahp.rst