Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1614262

Re: [PATCH 02/16] fpga: add FPGA device framework

From matthew.gerlach@linux.intel.com
Newsgroups linux.kernel
Subject Re: [PATCH 02/16] fpga: add FPGA device framework
Date 2017-03-31 21:10 +0200
Message-ID <tra5Q-eL-27@gated-at.bofh.it> (permalink)
References <tqHdv-69w-11@gated-at.bofh.it> <tqHdw-69w-35@gated-at.bofh.it> <tqXUZ-Kk-1@gated-at.bofh.it> <tqZDr-1Hf-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On Fri, 31 Mar 2017, Wu Hao wrote:

> On Fri, Mar 31, 2017 at 08:09:09AM +0200, Greg KH wrote:
>> On Thu, Mar 30, 2017 at 08:08:02PM +0800, Wu Hao wrote:
>>> During FPGA device (e.g PCI-based) discovery, platform devices are
>>> registered for different FPGA function units. But the device node path
>>> isn't quite friendly to applications.
>>>
>>> Consider this case, applications want to access child device's sysfs file
>>> for some information.
>>>
>>> 1) Access using bus-based path (e.g PCI)
>>>
>>>   /sys/bus/pci/devices/xxxxx/fpga_func_a.0/sysfs_file
>>>
>>>   From the path, it's clear which PCI device is the parent, but not perfect
>>>   solution for applications. PCI device BDF is not fixed, application may
>>>   need to search all PCI device to find the actual FPGA Device.
>>>
>>> 2) Or access using platform device path
>>>
>>>   /sys/bus/platform/devices/fpga_func_a.0/sysfs_file
>>>
>>>   Applications find the actual function by name easily, but no information
>>>   about which fpga device it belongs to. It's quite confusing if multiple
>>>   FPGA devices are in one system.
>>>
>>> 'FPGA Device' class is introduced to resolve this problem. Each node under
>>> this class represents a fpga device, which may have one or more child
>>> devices. Applications only need to search under this FPGA Device class
>>> folder to find the child device node it needs.
>>>
>>> For example, for the platform has 2 fpga devices, each fpga device has
>>> 3 child devices, the hierarchy looks like this.
>>>
>>> Two nodes are under /sys/class/fpga/:
>>> /sys/class/fpga/fpga.0
>>> /sys/class/fpga/fpga.1
>>>
>>> Each node has 1 function A device and 2 function B devices:
>>> /sys/class/fpga/fpga.0/func_a.0
>>> /sys/class/fpga/fpga.0/func_b.0
>>> /sys/class/fpga/fpga.0/func_b.1
>>>
>>> /sys/class/fpga/fpga.1/func_a.1
>>> /sys/class/fpga/fpga.1/func_b.2
>>> /sys/class/fpga/fpga.1/func_b.3
>>>
>>> This following APIs are provided by FPGA device framework:
>>> * fpga_dev_create
>>>   Create fpga device under the given parent device.
>>> * fpga_dev_destroy
>>>   Destroy fpga device
>>>
>>> The following sysfs files are created:
>>> * /sys/class/fpga/<fpga.x>/name
>>>   Name of the fpga device.
>>
>> How does this interact with the existing "fpga class" that is in the
>> kernel already?
>
> The fpga-dev introduced by this patch, is only a container device, and

I completely understand the need for a container device.  The fpga-region 
is also primarily a container, and in some cases the fpga-region may 
represent the entire fpga.  Over time this code may become redundant.

> drivers could register different functions under it. Per my understanding,
> the existing "fpga class", including fpga-region, fpga-bridge and
> fpga-manager, is used to provide reconfiguration function for FPGA. So
> driver can create child node using this existing "fpga class" to provide
> FPGA reconfiguration function, and more nodes under this container for
> different functions for given FPGA device.
>
> For Intel FPGA device, partial reconfiguration is only one function of
> Intel FPGA Management Engine (FME). FME driver creates fpga_manager under
> below path for partial reconfiguration, and other interfaces for more
> functions, e.g power management, virtualization support and etc.
>
> /sys/class/fpga/<fpga.x>/<intel-fpga-fme.x>/fpga_manager
>
> Thanks
> Hao
>
>>
>> thanks,
>>
>> greg k-h
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fpga" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/16] Intel FPGA Device Drivers Wu Hao <hao.wu@intel.com> - 2017-03-30 14:20 +0200
  [PATCH 02/16] fpga: add FPGA device framework Wu Hao <hao.wu@intel.com> - 2017-03-30 14:20 +0200
    Re: [PATCH 02/16] fpga: add FPGA device framework Greg KH <greg@kroah.com> - 2017-03-31 08:10 +0200
      Re: [PATCH 02/16] fpga: add FPGA device framework Wu Hao <hao.wu@intel.com> - 2017-03-31 10:00 +0200
        Re: [PATCH 02/16] fpga: add FPGA device framework Greg KH <greg@kroah.com> - 2017-03-31 11:10 +0200
          Re: [PATCH 02/16] fpga: add FPGA device framework Wu Hao <hao.wu@intel.com> - 2017-03-31 14:30 +0200
        Re: [PATCH 02/16] fpga: add FPGA device framework matthew.gerlach@linux.intel.com - 2017-03-31 21:10 +0200
          Re: [PATCH 02/16] fpga: add FPGA device framework Wu Hao <hao.wu@intel.com> - 2017-04-01 14:30 +0200
    Re: [PATCH 02/16] fpga: add FPGA device framework Greg KH <greg@kroah.com> - 2017-03-31 08:20 +0200
      Re: [PATCH 02/16] fpga: add FPGA device framework Wu Hao <hao.wu@intel.com> - 2017-03-31 15:40 +0200
        Re: [PATCH 02/16] fpga: add FPGA device framework Greg KH <greg@kroah.com> - 2017-03-31 16:20 +0200
          Re: [PATCH 02/16] fpga: add FPGA device framework Wu Hao <hao.wu@intel.com> - 2017-04-01 13:50 +0200
  [PATCH 03/16] fpga: intel: add FPGA PCIe device driver Wu Hao <hao.wu@intel.com> - 2017-03-30 14:20 +0200
    Re: [PATCH 03/16] fpga: intel: add FPGA PCIe device driver Moritz Fischer <mdf@kernel.org> - 2017-04-04 04:20 +0200
      RE: [PATCH 03/16] fpga: intel: add FPGA PCIe device driver "Wu, Hao" <hao.wu@intel.com> - 2017-04-05 15:20 +0200
  [PATCH 15/16] fpga: intel: afu: add user afu sub feature support Wu Hao <hao.wu@intel.com> - 2017-03-30 14:20 +0200
  [PATCH 12/16] fpga: intel: add FPGA Accelerated Function Unit driver basic framework Wu Hao <hao.wu@intel.com> - 2017-03-30 14:20 +0200
  [PATCH 09/16] fpga: intel: fme: add header sub feature support Wu Hao <hao.wu@intel.com> - 2017-03-30 14:20 +0200
  [PATCH 16/16] fpga: intel: afu: add FPGA_PORT_DMA_MAP/UNMAP ioctls support Wu Hao <hao.wu@intel.com> - 2017-03-30 14:20 +0200
  [PATCH 07/16] fpga: intel: add feature device infrastructure Wu Hao <hao.wu@intel.com> - 2017-03-30 14:20 +0200
  [PATCH 05/16] fpga: intel: pcie: add chardev support for feature devices Wu Hao <hao.wu@intel.com> - 2017-03-30 14:20 +0200
  [PATCH 04/16] fpga: intel: pcie: parse feature list and create platform device for features. Wu Hao <hao.wu@intel.com> - 2017-03-30 14:20 +0200
    Re: [PATCH 04/16] fpga: intel: pcie: parse feature list and create  platform device for features. Alan Tull <atull@kernel.org> - 2017-04-03 23:50 +0200
      Re: [PATCH 04/16] fpga: intel: pcie: parse feature list and create  platform device for features. Wu Hao <hao.wu@intel.com> - 2017-04-05 14:10 +0200
    Re: [PATCH 04/16] fpga: intel: pcie: parse feature list and create  platform device for features. Alan Tull <atull@kernel.org> - 2017-04-05 00:20 +0200
      Re: [PATCH 04/16] fpga: intel: pcie: parse feature list and create  platform device for features. Wu Hao <hao.wu@intel.com> - 2017-04-05 16:20 +0200
  [PATCH 10/16] fpga: intel: fme: add FPGA_GET_API_VERSION/CHECK_EXTENSION ioctls support Wu Hao <hao.wu@intel.com> - 2017-03-30 14:20 +0200
  [PATCH 14/16] fpga: intel: afu add FPGA_GET_API_VERSION/CHECK_EXTENSION ioctls support Wu Hao <hao.wu@intel.com> - 2017-03-30 14:20 +0200
  [PATCH 01/16] docs: fpga: add a document for Intel FPGA driver overview Wu Hao <hao.wu@intel.com> - 2017-03-30 14:20 +0200
    Re: [PATCH 01/16] docs: fpga: add a document for Intel FPGA driver  overview matthew.gerlach@linux.intel.com - 2017-03-31 20:30 +0200
      Re: [PATCH 01/16] docs: fpga: add a document for Intel FPGA driver overview Alan Tull <atull@kernel.org> - 2017-03-31 20:40 +0200
        Re: [PATCH 01/16] docs: fpga: add a document for Intel FPGA driver  overview Wu Hao <hao.wu@intel.com> - 2017-04-01 13:30 +0200
          Re: [PATCH 01/16] docs: fpga: add a document for Intel FPGA driver  overview Moritz Fischer <mdf@kernel.org> - 2017-04-02 16:50 +0200
            Re: [PATCH 01/16] docs: fpga: add a document for Intel FPGA driver overview Alan Tull <atull@kernel.org> - 2017-04-03 22:50 +0200
              Re: [PATCH 01/16] docs: fpga: add a document for Intel FPGA driver  overview Wu Hao <hao.wu@intel.com> - 2017-04-04 07:30 +0200
            Re: [PATCH 01/16] docs: fpga: add a document for Intel FPGA driver  overview Wu Hao <hao.wu@intel.com> - 2017-04-04 07:20 +0200
  [PATCH 06/16] fpga: intel: pcie: adds fpga_for_each_port callback for fme device Wu Hao <hao.wu@intel.com> - 2017-03-30 14:20 +0200
  [PATCH 13/16] fpga: intel: afu: add header sub feature support Wu Hao <hao.wu@intel.com> - 2017-03-30 14:20 +0200
  [PATCH 11/16] fpga: intel: fme: add partial reconfiguration sub feature support Wu Hao <hao.wu@intel.com> - 2017-03-30 14:20 +0200
    Re: [PATCH 11/16] fpga: intel: fme: add partial reconfiguration sub  feature support Alan Tull <atull@kernel.org> - 2017-03-30 22:40 +0200
      Re: [PATCH 11/16] fpga: intel: fme: add partial reconfiguration sub  feature support Xiao Guangrong <xiaoguangrong.eric@gmail.com> - 2017-03-31 06:20 +0200
        Re: [PATCH 11/16] fpga: intel: fme: add partial reconfiguration sub  feature support Wu Hao <hao.wu@intel.com> - 2017-03-31 11:00 +0200
          Re: [PATCH 11/16] fpga: intel: fme: add partial reconfiguration sub  feature support Alan Tull <atull@kernel.org> - 2017-04-03 22:30 +0200
            Re: [PATCH 11/16] fpga: intel: fme: add partial reconfiguration sub  feature support Wu Hao <hao.wu@intel.com> - 2017-04-04 07:40 +0200
    Re: [PATCH 11/16] fpga: intel: fme: add partial reconfiguration sub  feature support Alan Tull <atull@kernel.org> - 2017-03-31 21:20 +0200
      Re: [PATCH 11/16] fpga: intel: fme: add partial reconfiguration sub  feature support Wu Hao <hao.wu@intel.com> - 2017-04-01 13:20 +0200
        Re: [PATCH 11/16] fpga: intel: fme: add partial reconfiguration sub  feature support Alan Tull <atull@kernel.org> - 2017-04-03 18:40 +0200
          Re: [PATCH 11/16] fpga: intel: fme: add partial reconfiguration sub  feature support Wu Hao <hao.wu@intel.com> - 2017-04-04 08:20 +0200
            Re: [PATCH 11/16] fpga: intel: fme: add partial reconfiguration sub  feature support Alan Tull <atull@kernel.org> - 2017-04-05 00:40 +0200
              RE: [PATCH 11/16] fpga: intel: fme: add partial reconfiguration sub  feature support "Wu, Hao" <hao.wu@intel.com> - 2017-04-05 13:50 +0200
                Re: [PATCH 11/16] fpga: intel: fme: add partial reconfiguration sub  feature support Alan Tull <atull@kernel.org> - 2017-04-05 17:30 +0200
                Re: [PATCH 11/16] fpga: intel: fme: add partial reconfiguration sub  feature support Alan Tull <atull@kernel.org> - 2017-04-05 17:50 +0200
                Re: [PATCH 11/16] fpga: intel: fme: add partial reconfiguration sub  feature support Wu Hao <hao.wu@intel.com> - 2017-04-06 13:10 +0200
                Re: [PATCH 11/16] fpga: intel: fme: add partial reconfiguration sub  feature support Alan Tull <atull@kernel.org> - 2017-04-06 21:30 +0200
                Re: [PATCH 11/16] fpga: intel: fme: add partial reconfiguration sub  feature support Wu Hao <hao.wu@intel.com> - 2017-04-07 08:10 +0200
    Re: [PATCH 11/16] fpga: intel: fme: add partial reconfiguration sub  feature support Alan Tull <atull@kernel.org> - 2017-04-03 23:30 +0200
      Re: [PATCH 11/16] fpga: intel: fme: add partial reconfiguration sub  feature support matthew.gerlach@linux.intel.com - 2017-04-04 00:50 +0200
        Re: [PATCH 11/16] fpga: intel: fme: add partial reconfiguration sub  feature support Wu Hao <hao.wu@intel.com> - 2017-04-04 09:00 +0200
      Re: [PATCH 11/16] fpga: intel: fme: add partial reconfiguration sub  feature support Wu Hao <hao.wu@intel.com> - 2017-04-04 08:40 +0200
  Re: [PATCH 00/16] Intel FPGA Device Drivers Moritz Fischer <mdf@kernel.org> - 2017-03-30 19:20 +0200
  Re: [PATCH 00/16] Intel FPGA Device Drivers Jerome Glisse <jglisse@redhat.com> - 2017-04-06 22:30 +0200

csiph-web