• Xu Yilun's avatar
    fpga: dfl: afu: add AFU interrupt support · 09d86150
    Xu Yilun authored
    AFU (Accelerated Function Unit) is dynamic region of the DFL based FPGA,
    and always defined by users. Some DFL based FPGA cards allow users to
    implement their own interrupts in AFU. In order to support this,
    hardware implements a new UINT (AFU Interrupt) private feature with
    related capability register which describes the number of supported
    AFU interrupts as well as the local index of the interrupts for
    software enumeration, and from software side, driver follows the common
    DFL interrupt notification and handling mechanism, and it implements
    two ioctls below for user to query number of irqs supported and set/unset
    interrupt triggers.
    
     Ioctls:
     * DFL_FPGA_PORT_UINT_GET_IRQ_NUM
       get the number of irqs, which is used to determine how many interrupts
       UINT feature supports.
    
     * DFL_FPGA_PORT_UINT_SET_IRQ
       set/unset eventfds as AFU interrupt triggers.
    Signed-off-by: default avatarLuwei Kang <luwei.kang@intel.com>
    Signed-off-by: default avatarWu Hao <hao.wu@intel.com>
    Signed-off-by: default avatarXu Yilun <yilun.xu@intel.com>
    Reviewed-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
    Acked-by: default avatarWu Hao <hao.wu@intel.com>
    Signed-off-by: default avatarMoritz Fischer <mdf@kernel.org>
    09d86150
dfl-afu-main.c 22.9 KB