<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/fpga/dfl.c, branch linux-5.9.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-5.9.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-5.9.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2020-06-28T19:43:16+00:00</updated>
<entry>
<title>fpga: dfl: introduce interrupt trigger setting API</title>
<updated>2020-06-28T19:43:16+00:00</updated>
<author>
<name>Xu Yilun</name>
<email>yilun.xu@intel.com</email>
</author>
<published>2020-06-16T04:08:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=322b598be4d9b9090cda560c4caab78704615ab4'/>
<id>urn:sha1:322b598be4d9b9090cda560c4caab78704615ab4</id>
<content type='text'>
FPGA user applications may be interested in interrupts generated by
DFL features. For example, users can implement their own FPGA
logics with interrupts enabled in AFU (Accelerated Function Unit,
dynamic region of DFL based FPGA). So user applications need to be
notified to handle these interrupts.

In order to allow userspace applications to monitor interrupts,
driver requires userspace to provide eventfds as interrupt
notification channels. Applications then poll/select on the eventfds
to get notified.

This patch introduces a generic helper functions to do eventfds binding
with given interrupts.

Sub feature drivers are expected to use XXX_GET_IRQ_NUM to query irq
info, and XXX_SET_IRQ to set eventfds for interrupts. This patch also
introduces helper functions for these 2 ioctls.

Signed-off-by: Luwei Kang &lt;luwei.kang@intel.com&gt;
Signed-off-by: Wu Hao &lt;hao.wu@intel.com&gt;
Signed-off-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Signed-off-by: Tom Rix &lt;trix@redhat.com&gt;
Reviewed-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
Acked-by: Wu Hao &lt;hao.wu@intel.com&gt;
Signed-off-by: Moritz Fischer &lt;mdf@kernel.org&gt;
</content>
</entry>
<entry>
<title>fpga: dfl: parse interrupt info for feature devices on enumeration</title>
<updated>2020-06-28T19:42:29+00:00</updated>
<author>
<name>Xu Yilun</name>
<email>yilun.xu@intel.com</email>
</author>
<published>2020-06-16T04:08:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8d021039cbb5e358c7c07c562811253a61c8d551'/>
<id>urn:sha1:8d021039cbb5e358c7c07c562811253a61c8d551</id>
<content type='text'>
DFL based FPGA devices could support interrupts for different purposes,
but current DFL framework only supports feature device enumeration with
given MMIO resources information via common DFL headers. This patch
introduces one new API dfl_fpga_enum_info_add_irq for low level bus
drivers (e.g. PCIe device driver) to pass its interrupt resources
information to DFL framework for enumeration, and also adds interrupt
enumeration code in framework to parse and assign interrupt resources
for enumerated feature devices and their own sub features.

With this patch, DFL framework enumerates interrupt resources for core
features, including PORT Error Reporting, FME (FPGA Management Engine)
Error Reporting and also AFU User Interrupts.

Signed-off-by: Luwei Kang &lt;luwei.kang@intel.com&gt;
Signed-off-by: Wu Hao &lt;hao.wu@intel.com&gt;
Signed-off-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Reviewed-by: Marcelo Tosatti &lt;mtosatti@redhat.com&gt;
Acked-by: Wu Hao &lt;hao.wu@intel.com&gt;
Signed-off-by: Moritz Fischer &lt;mdf@kernel.org&gt;
</content>
</entry>
<entry>
<title>fpga: dfl: Use struct_size() in kzalloc()</title>
<updated>2020-06-19T01:22:12+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavoars@kernel.org</email>
</author>
<published>2020-06-17T22:10:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e1d9ec3af3463c1721723f68403ee14214d0d2f6'/>
<id>urn:sha1:e1d9ec3af3463c1721723f68403ee14214d0d2f6</id>
<content type='text'>
Make use of the struct_size() helper instead of an open-coded version
in order to avoid any potential type mistakes. Also, remove unnecessary
function dfl_feature_platform_data_size().

This code was detected with the help of Coccinelle and, audited and
fixed manually.

Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Signed-off-by: Moritz Fischer &lt;mdf@kernel.org&gt;
</content>
</entry>
<entry>
<title>fpga: dfl: support multiple opens on feature device node.</title>
<updated>2020-04-30T03:37:07+00:00</updated>
<author>
<name>Xu Yilun</name>
<email>yilun.xu@intel.com</email>
</author>
<published>2019-11-18T05:20:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b6862193ca12e4bce6a18f31bb36eaa6d801b377'/>
<id>urn:sha1:b6862193ca12e4bce6a18f31bb36eaa6d801b377</id>
<content type='text'>
Each DFL functional block, e.g. AFU (Accelerated Function Unit) and FME
(FPGA Management Engine), could implement more than one function within
its region, but current driver only allows one user application to access
it by exclusive open on device node. So this is not convenient and
flexible for userspace applications, as they have to combine lots of
different functions into one single application.

This patch removes the limitation here to allow multiple opens to each
feature device node for AFU and FME from userspace applications. If user
still needs exclusive access to these device node, O_EXCL flag must be
issued together with open.

Signed-off-by: Wu Hao &lt;hao.wu@intel.com&gt;
Signed-off-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Signed-off-by: Moritz Fischer &lt;mdf@kernel.org&gt;
</content>
</entry>
<entry>
<title>fpga: dfl: make init callback optional</title>
<updated>2019-09-04T02:35:40+00:00</updated>
<author>
<name>Wu Hao</name>
<email>hao.wu@intel.com</email>
</author>
<published>2019-08-12T02:49:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=84b693e3786b92d2e7bb9108ca187253ffd02115'/>
<id>urn:sha1:84b693e3786b92d2e7bb9108ca187253ffd02115</id>
<content type='text'>
This patch makes init callback of sub features optional. With
this change, people don't need to prepare any empty init callback.

Signed-off-by: Wu Hao &lt;hao.wu@intel.com&gt;
Acked-by: Moritz Fischer &lt;mdf@kernel.org&gt;
Signed-off-by: Moritz Fischer &lt;mdf@kernel.org&gt;
</content>
</entry>
<entry>
<title>fpga: dfl: make uinit callback optional</title>
<updated>2019-08-05T16:02:18+00:00</updated>
<author>
<name>Wu Hao</name>
<email>hao.wu@intel.com</email>
</author>
<published>2019-08-04T10:20:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3c51ff772278d291117dae9cad09ddef07e0d504'/>
<id>urn:sha1:3c51ff772278d291117dae9cad09ddef07e0d504</id>
<content type='text'>
This patch makes uinit callback of sub features optional. With
this change, people don't need to prepare any empty uinit callback.

Signed-off-by: Wu Hao &lt;hao.wu@intel.com&gt;
Link: https://lore.kernel.org/r/1564914022-3710-9-git-send-email-hao.wu@intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>fpga: dfl: add id_table for dfl private feature driver</title>
<updated>2019-08-05T16:01:24+00:00</updated>
<author>
<name>Wu Hao</name>
<email>hao.wu@intel.com</email>
</author>
<published>2019-08-04T10:20:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=15bbb300fcef4e62e4f6063cc29e698796027b98'/>
<id>urn:sha1:15bbb300fcef4e62e4f6063cc29e698796027b98</id>
<content type='text'>
This patch adds id_table for each dfl private feature driver,
it allows to reuse same private feature driver to match and support
multiple dfl private features.

Signed-off-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Signed-off-by: Wu Hao &lt;hao.wu@intel.com&gt;
Acked-by: Moritz Fischer &lt;mdf@kernel.org&gt;
Acked-by: Alan Tull &lt;atull@kernel.org&gt;
Signed-off-by: Moritz Fischer &lt;mdf@kernel.org&gt;
Link: https://lore.kernel.org/r/1564914022-3710-6-git-send-email-hao.wu@intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>fpga: dfl: pci: enable SRIOV support.</title>
<updated>2019-08-05T15:56:46+00:00</updated>
<author>
<name>Wu Hao</name>
<email>hao.wu@intel.com</email>
</author>
<published>2019-08-04T10:20:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bdd4f307956ae7c80a831aed67b0ddd131537481'/>
<id>urn:sha1:bdd4f307956ae7c80a831aed67b0ddd131537481</id>
<content type='text'>
This patch enables the standard sriov support. It allows user to
enable SRIOV (and VFs), then user could pass through accelerators
(VFs) into virtual machine or use VFs directly in host.

Signed-off-by: Zhang Yi Z &lt;yi.z.zhang@intel.com&gt;
Signed-off-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Signed-off-by: Wu Hao &lt;hao.wu@intel.com&gt;
Acked-by: Alan Tull &lt;atull@kernel.org&gt;
Acked-by: Moritz Fischer &lt;mdf@kernel.org&gt;
Signed-off-by: Moritz Fischer &lt;mdf@kernel.org&gt;
Link: https://lore.kernel.org/r/1564914022-3710-3-git-send-email-hao.wu@intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>fpga: dfl: fme: add DFL_FPGA_FME_PORT_RELEASE/ASSIGN ioctl support.</title>
<updated>2019-08-05T15:56:46+00:00</updated>
<author>
<name>Wu Hao</name>
<email>hao.wu@intel.com</email>
</author>
<published>2019-08-04T10:20:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=69bb18ddfc4331ba1dea9db811caf93e95726408'/>
<id>urn:sha1:69bb18ddfc4331ba1dea9db811caf93e95726408</id>
<content type='text'>
In order to support virtualization usage via PCIe SRIOV, this patch
adds two ioctls under FPGA Management Engine (FME) to release and
assign back the port device. In order to safely turn Port from PF
into VF and enable PCIe SRIOV, it requires user to invoke this
PORT_RELEASE ioctl to release port firstly to remove userspace
interfaces, and then configure the PF/VF access register in FME.
After disable SRIOV, it requires user to invoke this PORT_ASSIGN
ioctl to attach the port back to PF.

 Ioctl interfaces:
 * DFL_FPGA_FME_PORT_RELEASE
   Release platform device of given port, it deletes port platform
   device to remove related userspace interfaces on PF. After this
   function, then it's safe to configure PF/VF access mode to VF,
   and enable VFs via SRIOV.

 * DFL_FPGA_FME_PORT_ASSIGN
   Assign platform device of given port back to PF. After configure
   PF/VF access mode to PF, this ioctl adds port platform device
   back to re-enable related userspace interfaces on PF.

Signed-off-by: Zhang Yi Z &lt;yi.z.zhang@intel.com&gt;
Signed-off-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Signed-off-by: Wu Hao &lt;hao.wu@intel.com&gt;
Acked-by: Alan Tull &lt;atull@kernel.org&gt;
Acked-by: Moritz Fischer &lt;mdf@kernel.org&gt;
Signed-off-by: Moritz Fischer &lt;mdf@kernel.org&gt;
Link: https://lore.kernel.org/r/1564914022-3710-2-git-send-email-hao.wu@intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>fpga: dfl: expand minor range when registering chrdev region</title>
<updated>2019-05-24T18:32:12+00:00</updated>
<author>
<name>Chengguang Xu</name>
<email>cgxu519@gmx.com</email>
</author>
<published>2019-05-09T21:08:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=de9a7f6f5f1967d275311cca9163b4a3ffe9b0ae'/>
<id>urn:sha1:de9a7f6f5f1967d275311cca9163b4a3ffe9b0ae</id>
<content type='text'>
Actually, total amount of available minor number
for a single major is MINORMASK + 1. So expand
minor range when registering chrdev region.

Signed-off-by: Chengguang Xu &lt;cgxu519@gmx.com&gt;
Acked-by: Wu Hao &lt;hao.wu@intel.com&gt;
Acked-by: Alan Tull &lt;atull@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
