<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/fpga, branch v6.6.132</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-06-12T09:12:23+00:00</updated>
<entry>
<title>fpga: region: add owner module and take its refcount</title>
<updated>2024-06-12T09:12:23+00:00</updated>
<author>
<name>Marco Pagani</name>
<email>marpagan@redhat.com</email>
</author>
<published>2024-04-19T08:35:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4d7d12b643c00e7eea51b49a60a2ead182633ec8'/>
<id>urn:sha1:4d7d12b643c00e7eea51b49a60a2ead182633ec8</id>
<content type='text'>
[ Upstream commit b7c0e1ecee403a43abc89eb3e75672b01ff2ece9 ]

The current implementation of the fpga region assumes that the low-level
module registers a driver for the parent device and uses its owner pointer
to take the module's refcount. This approach is problematic since it can
lead to a null pointer dereference while attempting to get the region
during programming if the parent device does not have a driver.

To address this problem, add a module owner pointer to the fpga_region
struct and use it to take the module's refcount. Modify the functions for
registering a region to take an additional owner module parameter and
rename them to avoid conflicts. Use the old function names for helper
macros that automatically set the module that registers the region as the
owner. This ensures compatibility with existing low-level control modules
and reduces the chances of registering a region without setting the owner.

Also, update the documentation to keep it consistent with the new interface
for registering an fpga region.

Fixes: 0fa20cdfcc1f ("fpga: fpga-region: device tree control for FPGA")
Suggested-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Suggested-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Reviewed-by: Russ Weight &lt;russ.weight@linux.dev&gt;
Signed-off-by: Marco Pagani &lt;marpagan@redhat.com&gt;
Acked-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Link: https://lore.kernel.org/r/20240419083601.77403-1-marpagan@redhat.com
Signed-off-by: Xu Yilun &lt;yilun.xu@linux.intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>fpga: bridge: add owner module and take its refcount</title>
<updated>2024-06-12T09:12:14+00:00</updated>
<author>
<name>Marco Pagani</name>
<email>marpagan@redhat.com</email>
</author>
<published>2024-03-22T17:18:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d7c4081c54a1d4068de9440957303a76f9e5c95b'/>
<id>urn:sha1:d7c4081c54a1d4068de9440957303a76f9e5c95b</id>
<content type='text'>
[ Upstream commit 1da11f822042eb6ef4b6064dc048f157a7852529 ]

The current implementation of the fpga bridge assumes that the low-level
module registers a driver for the parent device and uses its owner pointer
to take the module's refcount. This approach is problematic since it can
lead to a null pointer dereference while attempting to get the bridge if
the parent device does not have a driver.

To address this problem, add a module owner pointer to the fpga_bridge
struct and use it to take the module's refcount. Modify the function for
registering a bridge to take an additional owner module parameter and
rename it to avoid conflicts. Use the old function name for a helper macro
that automatically sets the module that registers the bridge as the owner.
This ensures compatibility with existing low-level control modules and
reduces the chances of registering a bridge without setting the owner.

Also, update the documentation to keep it consistent with the new interface
for registering an fpga bridge.

Other changes: opportunistically move put_device() from __fpga_bridge_get()
to fpga_bridge_get() and of_fpga_bridge_get() to improve code clarity since
the bridge device is taken in these functions.

Fixes: 21aeda950c5f ("fpga: add fpga bridge framework")
Suggested-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Suggested-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Reviewed-by: Russ Weight &lt;russ.weight@linux.dev&gt;
Signed-off-by: Marco Pagani &lt;marpagan@redhat.com&gt;
Acked-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Link: https://lore.kernel.org/r/20240322171839.233864-1-marpagan@redhat.com
Signed-off-by: Xu Yilun &lt;yilun.xu@linux.intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>fpga: manager: add owner module and take its refcount</title>
<updated>2024-06-12T09:12:14+00:00</updated>
<author>
<name>Marco Pagani</name>
<email>marpagan@redhat.com</email>
</author>
<published>2024-03-05T19:29:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2da62a139a6221a345db4eb9f4f1c4b0937c89ad'/>
<id>urn:sha1:2da62a139a6221a345db4eb9f4f1c4b0937c89ad</id>
<content type='text'>
[ Upstream commit 4d4d2d4346857bf778fafaa97d6f76bb1663e3c9 ]

The current implementation of the fpga manager assumes that the low-level
module registers a driver for the parent device and uses its owner pointer
to take the module's refcount. This approach is problematic since it can
lead to a null pointer dereference while attempting to get the manager if
the parent device does not have a driver.

To address this problem, add a module owner pointer to the fpga_manager
struct and use it to take the module's refcount. Modify the functions for
registering the manager to take an additional owner module parameter and
rename them to avoid conflicts. Use the old function names for helper
macros that automatically set the module that registers the manager as the
owner. This ensures compatibility with existing low-level control modules
and reduces the chances of registering a manager without setting the owner.

Also, update the documentation to keep it consistent with the new interface
for registering an fpga manager.

Other changes: opportunistically move put_device() from __fpga_mgr_get() to
fpga_mgr_get() and of_fpga_mgr_get() to improve code clarity since the
manager device is taken in these functions.

Fixes: 654ba4cc0f3e ("fpga manager: ensure lifetime with of_fpga_mgr_get")
Suggested-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Suggested-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Signed-off-by: Marco Pagani &lt;marpagan@redhat.com&gt;
Acked-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Link: https://lore.kernel.org/r/20240305192926.84886-1-marpagan@redhat.com
Signed-off-by: Xu Yilun &lt;yilun.xu@linux.intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>fpga: fpga-mgr: support bitstream offset in image buffer</title>
<updated>2022-06-24T04:11:18+00:00</updated>
<author>
<name>Ivan Bornyakov</name>
<email>i.bornyakov@metrotek.ru</email>
</author>
<published>2022-06-23T16:32:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3cc624beba6310a8a534fb00841f22445a200d54'/>
<id>urn:sha1:3cc624beba6310a8a534fb00841f22445a200d54</id>
<content type='text'>
At the moment FPGA manager core loads to the device entire image
provided to fpga_mgr_load(). But it is not always whole FPGA image
buffer meant to be written to the device. In particular, .dat formatted
image for Microchip MPF contains meta info in the header that is not
meant to be written to the device. This is issue for those low level
drivers that loads data to the device with write() fpga_manager_ops
callback, since write() can be called in iterator over scatter-gather
table, not only linear image buffer. On the other hand, write_sg()
callback is provided with whole image in scatter-gather form and can
decide itself which part should be sent to the device.

Add header_size and data_size to the fpga_image_info struct, add
skip_header to the fpga_manager_ops struct and adjust fpga_mgr_write()
callers with respect to them.

  * info-&gt;header_size indicates part at the beginning of image buffer
    that contains some meta info. It is optional and can be 0,
    initialized with mops-&gt;initial_header_size.

  * mops-&gt;skip_header tells fpga-mgr core whether write should start
    from the beginning of image buffer or at the offset of header_size.

  * info-&gt;data_size is the size of bitstream data that is meant to be
    written to the device. It is also optional and can be 0, which
    means bitstream data is up to the end of image buffer.

Also add parse_header() callback to fpga_manager_ops, which purpose is
to set info-&gt;header_size and info-&gt;data_size. At least
initial_header_size bytes of image buffer will be passed into
parse_header() first time. If it is not enough, parse_header() should
set desired size into info-&gt;header_size and return -EAGAIN, then it will
be called again with greater part of image buffer on the input.

Suggested-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Signed-off-by: Ivan Bornyakov &lt;i.bornyakov@metrotek.ru&gt;
Acked-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Link: https://lore.kernel.org/r/20220623163248.3672-2-i.bornyakov@metrotek.ru
Signed-off-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
</content>
</entry>
<entry>
<title>fpga: fix for coding style issues</title>
<updated>2022-05-10T08:03:52+00:00</updated>
<author>
<name>Nava kishore Manne</name>
<email>nava.manne@xilinx.com</email>
</author>
<published>2022-04-23T17:02:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=57ce2e406fe1fa005e8fdbf20936c791252ac7bc'/>
<id>urn:sha1:57ce2e406fe1fa005e8fdbf20936c791252ac7bc</id>
<content type='text'>
fixes the below checks reported by checkpatch.pl:
- Lines should not end with a '('
- Alignment should match open parenthesis

Signed-off-by: Nava kishore Manne &lt;nava.manne@xilinx.com&gt;
Link: https://lore.kernel.org/r/20220423170235.2115479-3-nava.manne@xilinx.com
Signed-off-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
</content>
</entry>
<entry>
<title>fpga: region: Use standard dev_release for class driver</title>
<updated>2021-11-28T22:02:41+00:00</updated>
<author>
<name>Russ Weight</name>
<email>russell.h.weight@intel.com</email>
</author>
<published>2021-11-19T01:55:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8886a579744fbfa53e69aa453ed10ae3b1f9abac'/>
<id>urn:sha1:8886a579744fbfa53e69aa453ed10ae3b1f9abac</id>
<content type='text'>
The FPGA region class driver data structure is being treated as a
managed resource instead of using the standard dev_release call-back
function to release the class data structure. This change removes the
managed resource code and combines the create() and register()
functions into a single register() or register_full() function.

The register_full() function accepts an info data structure to provide
flexibility in passing optional parameters. The register() function
supports the current parameter list for users that don't require the
use of optional parameters.

Signed-off-by: Russ Weight &lt;russell.h.weight@intel.com&gt;
Reviewed-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Acked-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Signed-off-by: Moritz Fischer &lt;mdf@kernel.org&gt;
</content>
</entry>
<entry>
<title>fpga: bridge: Use standard dev_release for class driver</title>
<updated>2021-11-28T22:02:13+00:00</updated>
<author>
<name>Russ Weight</name>
<email>russell.h.weight@intel.com</email>
</author>
<published>2021-11-19T01:55:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0d70af3c2530a70f1b2c197feaa63fbd3548ce34'/>
<id>urn:sha1:0d70af3c2530a70f1b2c197feaa63fbd3548ce34</id>
<content type='text'>
The FPGA bridge class driver data structure is being treated as a
managed resource instead of using the standard dev_release call-back
function to release the class data structure. This change removes
the managed resource code and combines the create() and register()
functions into a single register() function.

Signed-off-by: Russ Weight &lt;russell.h.weight@intel.com&gt;
Reviewed-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Acked-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Signed-off-by: Moritz Fischer &lt;mdf@kernel.org&gt;
</content>
</entry>
<entry>
<title>fpga: mgr: Use standard dev_release for class driver</title>
<updated>2021-11-28T21:59:13+00:00</updated>
<author>
<name>Russ Weight</name>
<email>russell.h.weight@intel.com</email>
</author>
<published>2021-11-19T01:55:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4ba0b2c294fe691921271372f7b59e5cc2ce4b0f'/>
<id>urn:sha1:4ba0b2c294fe691921271372f7b59e5cc2ce4b0f</id>
<content type='text'>
The FPGA manager class driver data structure is being treated as a
managed resource instead of using the standard dev_release call-back
function to release the class data structure. This change removes
the managed resource code for the freeing of the class data structure
and combines the create() and register() functions into a single
register() or register_full() function.

The register_full() function accepts an info data structure to provide
flexibility in passing optional parameters. The register() function
supports the current parameter list for users that don't require the
use of optional parameters.

The devm_fpga_mgr_register() function is retained, and the
devm_fpga_mgr_register_full() function is added.

Signed-off-by: Russ Weight &lt;russell.h.weight@intel.com&gt;
Reviewed-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Acked-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Signed-off-by: Moritz Fischer &lt;mdf@kernel.org&gt;
</content>
</entry>
<entry>
<title>fpga: fix spelling mistakes</title>
<updated>2021-07-22T02:54:21+00:00</updated>
<author>
<name>Tom Rix</name>
<email>trix@redhat.com</email>
</author>
<published>2021-05-19T16:30:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=580e3137318edb39d2c6efa5dad51e3fbd7e2536'/>
<id>urn:sha1:580e3137318edb39d2c6efa5dad51e3fbd7e2536</id>
<content type='text'>
Run the fpga subsystem through aspell.

Signed-off-by: Tom Rix &lt;trix@redhat.com&gt;
Reviewed-by: Fernando Pacheco &lt;fpacheco@redhat.com&gt;
Signed-off-by: Moritz Fischer &lt;mdf@kernel.org&gt;
</content>
</entry>
<entry>
<title>fpga: altera-pr-ip: Remove function alt_pr_unregister</title>
<updated>2021-06-15T07:27:35+00:00</updated>
<author>
<name>Russ Weight</name>
<email>russell.h.weight@intel.com</email>
</author>
<published>2021-06-14T17:09:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=341466b64f301dabaed791c5862d2ae5a9e72849'/>
<id>urn:sha1:341466b64f301dabaed791c5862d2ae5a9e72849</id>
<content type='text'>
Remove the alt_pr_unregister() function; it is no longer used.

Signed-off-by: Russ Weight &lt;russell.h.weight@intel.com&gt;
Reviewed-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Signed-off-by: Moritz Fischer &lt;mdf@kernel.org&gt;
Link: https://lore.kernel.org/r/20210614170909.232415-2-mdf@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
