<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/fpga, branch v4.19.39</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.39</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.39'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2019-02-12T18:46:59+00:00</updated>
<entry>
<title>fpga: altera-cvp: fix 'bad IO access' on x86_64</title>
<updated>2019-02-12T18:46:59+00:00</updated>
<author>
<name>Anatolij Gustschin</name>
<email>agust@denx.de</email>
</author>
<published>2018-11-07T17:51:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f060c825c45517abdbf60c01ba30f7407342fb24'/>
<id>urn:sha1:f060c825c45517abdbf60c01ba30f7407342fb24</id>
<content type='text'>
[ Upstream commit 187fade88ca0ff2df9d360ca751d948d73db7095 ]

If mapping the CvP BAR fails, we still can configure the FPGA via
PCI config space access. In this case the iomap pointer is NULL.
On x86_64, passing NULL address to pci_iounmap() generates
"Bad IO access at port 0x0" output with stack call trace. Fix it.

Signed-off-by: Anatolij Gustschin &lt;agust@denx.de&gt;
Acked-by: Alan Tull &lt;atull@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>fpga: altera-cvp: Fix registration for CvP incapable devices</title>
<updated>2019-02-12T18:46:59+00:00</updated>
<author>
<name>Andreas Puhm</name>
<email>puhm@oregano.at</email>
</author>
<published>2018-11-07T17:51:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9f941e80e679b975f0f4a27ae8a537b4b35f55aa'/>
<id>urn:sha1:9f941e80e679b975f0f4a27ae8a537b4b35f55aa</id>
<content type='text'>
[ Upstream commit 68f60538daa4bc3da5d0764d46f391916fba20fd ]

The probe function needs to verify the CvP enable bit in order to
properly determine if FPGA Manager functionality can be safely
enabled.

Fixes: 34d1dc17ce97 ("fpga manager: Add Altera CvP driver")
Signed-off-by: Andreas Puhm &lt;puhm@oregano.at&gt;
Signed-off-by: Anatolij Gustschin &lt;agust@denx.de&gt;
Reviewed-by: Moritz Fischer &lt;mdf@kernel.org&gt;
Acked-by: Alan Tull &lt;atull@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>fpga: altera-cvp: fix probing for multiple FPGAs on the bus</title>
<updated>2019-01-26T08:32:36+00:00</updated>
<author>
<name>Anatolij Gustschin</name>
<email>agust@denx.de</email>
</author>
<published>2018-11-26T17:35:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e4c04fd44157828dc819071e35b8d372e0640823'/>
<id>urn:sha1:e4c04fd44157828dc819071e35b8d372e0640823</id>
<content type='text'>
[ Upstream commit 30522a951f9d02f261d0697c35cb42205b1fae17 ]

Currently registering CvP managers works only for first probed CvP
device, for all other devices it is refused due to duplicated chkcfg
sysfs entry:

fpga_manager fpga3: Altera CvP FPGA Manager @0000:0c:00.0 registered
sysfs: cannot create duplicate filename '/bus/pci/drivers/altera-cvp/chkcfg'
CPU: 0 PID: 3808 Comm: bash Tainted: G           O      4.19.0-custom+ #5
Call Trace:
  dump_stack+0x46/0x5b
  sysfs_warn_dup+0x53/0x60
  sysfs_add_file_mode_ns+0x16d/0x180
  sysfs_create_file_ns+0x51/0x60
  altera_cvp_probe+0x16f/0x2a0 [altera_cvp]
  local_pci_probe+0x3f/0xa0
  ? pci_match_device+0xb1/0xf0
  pci_device_probe+0x116/0x170
  really_probe+0x21b/0x2c0
  driver_probe_device+0x4b/0xe0
  bind_store+0xcb/0x130
  kernfs_fop_write+0xfd/0x180
  __vfs_write+0x21/0x150
  ? selinux_file_permission+0xdc/0x130
  vfs_write+0xa8/0x1a0
  ? find_vma+0xd/0x60
  ksys_write+0x3d/0x90
  do_syscall_64+0x44/0xf0
  entry_SYSCALL_64_after_hwframe+0x44/0xa9
  ...
 altera-cvp 0000:0c:00.0: Can't create sysfs chkcfg file
 fpga_manager fpga3: fpga_mgr_unregister Altera CvP FPGA Manager @0000:0c:00.0

Move chkcfg creation to module init as suggested by Alan.

Signed-off-by: Anatolij Gustschin &lt;agust@denx.de&gt;
Acked-by: Alan Tull &lt;atull@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>fpga: bridge: fix obvious function documentation error</title>
<updated>2018-09-30T15:49:55+00:00</updated>
<author>
<name>Alan Tull</name>
<email>atull@kernel.org</email>
</author>
<published>2018-09-12T14:43:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b4d9a0e5ca139640a45bcda87bc718f85d8008af'/>
<id>urn:sha1:b4d9a0e5ca139640a45bcda87bc718f85d8008af</id>
<content type='text'>
fpga_bridge_dev_match() returns a FPGA bridge struct, not a
FPGA manager struct so s/manager/bridge/.

Signed-off-by: Alan Tull &lt;atull@kernel.org&gt;
Acked-by: Moritz Fischer &lt;mdf@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>fpga: do not access region struct after fpga_region_unregister</title>
<updated>2018-09-30T15:49:55+00:00</updated>
<author>
<name>Alan Tull</name>
<email>atull@kernel.org</email>
</author>
<published>2018-09-12T14:43:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=34bd283396af1f05c43fa64d51378d38affb1cf1'/>
<id>urn:sha1:34bd283396af1f05c43fa64d51378d38affb1cf1</id>
<content type='text'>
A couple drivers were accessing the region struct after it had been
freed.  Save off the pointer to the mgr before the region struct gets
freed.

Signed-off-by: Alan Tull &lt;atull@kernel.org&gt;
Acked-by: Moritz Fischer &lt;mdf@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>fpga: dfl: fme: fix return value check in in pr_mgmt_init()</title>
<updated>2018-09-12T07:31:00+00:00</updated>
<author>
<name>Wei Yongjun</name>
<email>weiyongjun1@huawei.com</email>
</author>
<published>2018-08-16T19:42:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=029d727b4f5d7c82f78e0395a0d220271c2f92b8'/>
<id>urn:sha1:029d727b4f5d7c82f78e0395a0d220271c2f92b8</id>
<content type='text'>
In case of error, the function dfl_fme_create_region() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check should
be replaced with IS_ERR().

Fixes: 29de76240e86 ("fpga: dfl: fme: add partial reconfiguration sub feature support")
Signed-off-by: Wei Yongjun &lt;weiyongjun1@huawei.com&gt;
Acked-by: Moritz Fischer &lt;mdf@kernel.org&gt;
Acked-by: Alan Tull &lt;atull@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 4.18-rc5 into char-misc-next</title>
<updated>2018-07-16T07:04:54+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2018-07-16T07:04:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=83cf9cd6d50ed4f7e6ae265e80e38b235c792f5f'/>
<id>urn:sha1:83cf9cd6d50ed4f7e6ae265e80e38b235c792f5f</id>
<content type='text'>
We want the char-misc fixes in here as well.

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>fpga: dfl: afu: add DFL_FPGA_PORT_DMA_MAP/UNMAP ioctls support</title>
<updated>2018-07-15T11:55:47+00:00</updated>
<author>
<name>Wu Hao</name>
<email>hao.wu@intel.com</email>
</author>
<published>2018-06-30T00:53:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fa8dda1edef9ebc3af467c644c5533ac97171e12'/>
<id>urn:sha1:fa8dda1edef9ebc3af467c644c5533ac97171e12</id>
<content type='text'>
DMA memory regions are required for Accelerated Function Unit (AFU) usage.
These two ioctls allow user space applications to map user memory regions
for dma, and unmap them after use. Iova is returned from driver to user
space application via DFL_FPGA_PORT_DMA_MAP ioctl. Application needs to
unmap it after use, otherwise, driver will unmap them in device file
release operation.

Each AFU has its own rb tree to keep track of its mapped DMA regions.

Ioctl interfaces:
* DFL_FPGA_PORT_DMA_MAP
  Do the dma mapping per user_addr and length provided by user.
  Return iova in provided struct dfl_fpga_port_dma_map.

* DFL_FPGA_PORT_DMA_UNMAP
  Unmap the dma region per iova provided by user.

Signed-off-by: Tim Whisonant &lt;tim.whisonant@intel.com&gt;
Signed-off-by: Enno Luebbers &lt;enno.luebbers@intel.com&gt;
Signed-off-by: Shiva Rao &lt;shiva.rao@intel.com&gt;
Signed-off-by: Christopher Rauer &lt;christopher.rauer@intel.com&gt;
Signed-off-by: Xiao Guangrong &lt;guangrong.xiao@linux.intel.com&gt;
Signed-off-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>
<entry>
<title>fpga: dfl: afu: add afu sub feature support</title>
<updated>2018-07-15T11:55:47+00:00</updated>
<author>
<name>Xiao Guangrong</name>
<email>guangrong.xiao@linux.intel.com</email>
</author>
<published>2018-06-30T00:53:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=857a26222ff75eecf7d701ef0e91e4fbf6efa663'/>
<id>urn:sha1:857a26222ff75eecf7d701ef0e91e4fbf6efa663</id>
<content type='text'>
User Accelerated Function Unit sub feature exposes the MMIO region of
the AFU. After valid PR bitstream is programmed and the port is enabled,
then this MMIO region could be accessed.

This patch adds support to enumerate the AFU MMIO region and expose it
to userspace via mmap file operation. Below interfaces are exposed to user:

Sysfs interface:
* /sys/class/fpga_region/&lt;regionX&gt;/&lt;dfl-port.x&gt;/afu_id
  Read-only. Indicate which PR bitstream is programmed to this AFU.

Ioctl interfaces:
* DFL_FPGA_PORT_GET_INFO
  Provide info to userspace on the number of supported region.
  Only UAFU region is supported now.

* DFL_FPGA_PORT_GET_REGION_INFO
  Provide region information, including access permission, region size,
  offset from the start of device fd.

Signed-off-by: Tim Whisonant &lt;tim.whisonant@intel.com&gt;
Signed-off-by: Enno Luebbers &lt;enno.luebbers@intel.com&gt;
Signed-off-by: Shiva Rao &lt;shiva.rao@intel.com&gt;
Signed-off-by: Christopher Rauer &lt;christopher.rauer@intel.com&gt;
Signed-off-by: Xiao Guangrong &lt;guangrong.xiao@linux.intel.com&gt;
Signed-off-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>
<entry>
<title>fpga: dfl: afu: add DFL_FPGA_GET_API_VERSION/CHECK_EXTENSION ioctls support</title>
<updated>2018-07-15T11:55:47+00:00</updated>
<author>
<name>Wu Hao</name>
<email>hao.wu@intel.com</email>
</author>
<published>2018-06-30T00:53:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6fd893c409e5939ea2145b27796c155535988734'/>
<id>urn:sha1:6fd893c409e5939ea2145b27796c155535988734</id>
<content type='text'>
DFL_FPGA_GET_API_VERSION and DFL_FPGA_CHECK_EXTENSION ioctls are common
ones which need to be supported by all feature devices drivers including
FME and AFU. This patch implements above 2 ioctls in FPGA Accelerated
Function Unit (AFU) driver.

Signed-off-by: Tim Whisonant &lt;tim.whisonant@intel.com&gt;
Signed-off-by: Enno Luebbers &lt;enno.luebbers@intel.com&gt;
Signed-off-by: Shiva Rao &lt;shiva.rao@intel.com&gt;
Signed-off-by: Christopher Rauer &lt;christopher.rauer@intel.com&gt;
Signed-off-by: Xiao Guangrong &lt;guangrong.xiao@linux.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: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
