<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/fpga, branch v6.7</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-11-04T00:51:08Z</updated>
<entry>
<title>Merge tag 'char-misc-6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc</title>
<updated>2023-11-04T00:51:08Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-11-04T00:51:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d99b91a99be430be45413052bb428107c435918b'/>
<id>urn:sha1:d99b91a99be430be45413052bb428107c435918b</id>
<content type='text'>
Pull char/misc updates from Greg KH:
 "Here is the big set of char/misc and other small driver subsystem
  changes for 6.7-rc1. Included in here are:

   - IIO subsystem driver updates and additions (largest part of this
     pull request)

   - FPGA subsystem driver updates

   - Counter subsystem driver updates

   - ICC subsystem driver updates

   - extcon subsystem driver updates

   - mei driver updates and additions

   - nvmem subsystem driver updates and additions

   - comedi subsystem dependency fixes

   - parport driver fixups

   - cdx subsystem driver and core updates

   - splice support for /dev/zero and /dev/full

   - other smaller driver cleanups

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'char-misc-6.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (326 commits)
  cdx: add sysfs for subsystem, class and revision
  cdx: add sysfs for bus reset
  cdx: add support for bus enable and disable
  cdx: Register cdx bus as a device on cdx subsystem
  cdx: Create symbol namespaces for cdx subsystem
  cdx: Introduce lock to protect controller ops
  cdx: Remove cdx controller list from cdx bus system
  dts: ti: k3-am625-beagleplay: Add beaglecc1352
  greybus: Add BeaglePlay Linux Driver
  dt-bindings: net: Add ti,cc1352p7
  dt-bindings: eeprom: at24: allow NVMEM cells based on old syntax
  dt-bindings: nvmem: SID: allow NVMEM cells based on old syntax
  Revert "nvmem: add new config option"
  MAINTAINERS: coresight: Add missing Coresight files
  misc: pci_endpoint_test: Add deviceID for J721S2 PCIe EP device support
  firmware: xilinx: Move EXPORT_SYMBOL_GPL next to zynqmp_pm_feature definition
  uacce: make uacce_class constant
  ocxl: make ocxl_class constant
  cxl: make cxl_class constant
  misc: phantom: make phantom_class constant
  ...
</content>
</entry>
<entry>
<title>fpga: Fix memory leak for fpga_region_test_class_find()</title>
<updated>2023-10-24T17:32:39Z</updated>
<author>
<name>Jinjie Ruan</name>
<email>ruanjinjie@huawei.com</email>
</author>
<published>2023-10-23T03:28:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=28926daf731f72d0537767fdbab2a3e06e31190a'/>
<id>urn:sha1:28926daf731f72d0537767fdbab2a3e06e31190a</id>
<content type='text'>
fpga_region_class_find() in fpga_region_test_class_find() will call
get_device() if the data is matched, which will increment refcount for
dev-&gt;kobj, so it should call put_device() to decrement refcount for
dev-&gt;kobj to free the region, because fpga_region_unregister() will call
fpga_region_dev_release() only when the refcount for dev-&gt;kobj is zero
but fpga_region_test_init() call device_register() in
fpga_region_register_full(), which also increment refcount.

So call put_device() after calling fpga_region_class_find() in
fpga_region_test_class_find(). After applying this patch, the following
memory leak is never detected.

unreferenced object 0xffff88810c8ef000 (size 1024):
  comm "kunit_try_catch", pid 1875, jiffies 4294715298 (age 836.836s)
  hex dump (first 32 bytes):
    b8 d1 fb 05 81 88 ff ff 08 f0 8e 0c 81 88 ff ff  ................
    08 f0 8e 0c 81 88 ff ff 00 00 00 00 00 00 00 00  ................
  backtrace:
    [&lt;ffffffff817ebad7&gt;] kmalloc_trace+0x27/0xa0
    [&lt;ffffffffa02385e1&gt;] fpga_region_register_full+0x51/0x430 [fpga_region]
    [&lt;ffffffffa0228e47&gt;] 0xffffffffa0228e47
    [&lt;ffffffff829c479d&gt;] kunit_try_run_case+0xdd/0x250
    [&lt;ffffffff829c9f2a&gt;] kunit_generic_run_threadfn_adapter+0x4a/0x90
    [&lt;ffffffff81238b85&gt;] kthread+0x2b5/0x380
    [&lt;ffffffff81097ded&gt;] ret_from_fork+0x2d/0x70
    [&lt;ffffffff810034d1&gt;] ret_from_fork_asm+0x11/0x20
unreferenced object 0xffff888105fbd1b8 (size 8):
  comm "kunit_try_catch", pid 1875, jiffies 4294715298 (age 836.836s)
  hex dump (first 8 bytes):
    72 65 67 69 6f 6e 30 00                          region0.
  backtrace:
    [&lt;ffffffff817ec023&gt;] __kmalloc_node_track_caller+0x53/0x150
    [&lt;ffffffff82995590&gt;] kvasprintf+0xb0/0x130
    [&lt;ffffffff83f713b1&gt;] kobject_set_name_vargs+0x41/0x110
    [&lt;ffffffff8304ac1b&gt;] dev_set_name+0xab/0xe0
    [&lt;ffffffffa02388a2&gt;] fpga_region_register_full+0x312/0x430 [fpga_region]
    [&lt;ffffffffa0228e47&gt;] 0xffffffffa0228e47
    [&lt;ffffffff829c479d&gt;] kunit_try_run_case+0xdd/0x250
    [&lt;ffffffff829c9f2a&gt;] kunit_generic_run_threadfn_adapter+0x4a/0x90
    [&lt;ffffffff81238b85&gt;] kthread+0x2b5/0x380
    [&lt;ffffffff81097ded&gt;] ret_from_fork+0x2d/0x70
    [&lt;ffffffff810034d1&gt;] ret_from_fork_asm+0x11/0x20
unreferenced object 0xffff88810b3b8a00 (size 256):
  comm "kunit_try_catch", pid 1875, jiffies 4294715298 (age 836.836s)
  hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 08 8a 3b 0b 81 88 ff ff  ..........;.....
    08 8a 3b 0b 81 88 ff ff e0 ac 04 83 ff ff ff ff  ..;.............
  backtrace:
    [&lt;ffffffff817ebad7&gt;] kmalloc_trace+0x27/0xa0
    [&lt;ffffffff83056d7a&gt;] device_add+0xa2a/0x15e0
    [&lt;ffffffffa02388b1&gt;] fpga_region_register_full+0x321/0x430 [fpga_region]
    [&lt;ffffffffa0228e47&gt;] 0xffffffffa0228e47
    [&lt;ffffffff829c479d&gt;] kunit_try_run_case+0xdd/0x250
    [&lt;ffffffff829c9f2a&gt;] kunit_generic_run_threadfn_adapter+0x4a/0x90
    [&lt;ffffffff81238b85&gt;] kthread+0x2b5/0x380
    [&lt;ffffffff81097ded&gt;] ret_from_fork+0x2d/0x70
    [&lt;ffffffff810034d1&gt;] ret_from_fork_asm+0x11/0x20

Fixes: 64a5f972c93d ("fpga: add an initial KUnit suite for the FPGA Region")
Signed-off-by: Jinjie Ruan &lt;ruanjinjie@huawei.com&gt;
Reviewed-by: Marco Pagani &lt;marpagan@redhat.com&gt;
Acked-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Link: https://lore.kernel.org/r/20231007094321.3447084-1-ruanjinjie@huawei.com
[yilun.xu@intel.com: slightly changes the commit message]
Signed-off-by: Xu Yilun &lt;yilun.xu@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20231023032857.902699-3-yilun.xu@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>fpga: disable KUnit test suites when module support is enabled</title>
<updated>2023-10-21T10:31:25Z</updated>
<author>
<name>Marco Pagani</name>
<email>marpagan@redhat.com</email>
</author>
<published>2023-10-18T16:38:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a3fad2e92c76587fe262a1a4a122045b29885354'/>
<id>urn:sha1:a3fad2e92c76587fe262a1a4a122045b29885354</id>
<content type='text'>
The fpga core currently assumes that all manager, bridge, and region
devices have a parent device associated with a driver that can be used
to take the module's refcount. This behavior causes the fpga test suites
to crash with a null-ptr-deref since parent fake devices do not have a
driver. This patch disables all fpga KUnit test suites when loadable
module support is enabled until the fpga core is fixed. Test suites
can still be run using the KUnit default UML kernel.

Signed-off-by: Marco Pagani &lt;marpagan@redhat.com&gt;
Acked-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Fixes: ccbc1c302115 ("fpga: add an initial KUnit suite for the FPGA Manager")
Link: https://lore.kernel.org/r/20231018163814.100803-1-marpagan@redhat.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>fpga: versal: Add support for 44-bit DMA operations</title>
<updated>2023-10-16T02:32:00Z</updated>
<author>
<name>Nava kishore Manne</name>
<email>nava.kishore.manne@amd.com</email>
</author>
<published>2023-10-03T07:14:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d79eed22ba97c3031b2ef86f8b7ed0be2da5667d'/>
<id>urn:sha1:d79eed22ba97c3031b2ef86f8b7ed0be2da5667d</id>
<content type='text'>
The existing implementation support only 32-bit DMA operation.
So, it fails to load the bitstream for the high DDR designs(Beyond 4GB).
To fix this issue update the DMA mask handling logic to support 44-bit
DMA operations.

Signed-off-by: Nava kishore Manne &lt;nava.kishore.manne@amd.com&gt;
Reviewed-by: Radhey Shyam Pandey &lt;radhey.shyam.pandey@amd.com&gt;
Acked-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Link: https://lore.kernel.org/r/20231003071409.4165149-1-nava.kishore.manne@amd.com
Signed-off-by: Xu Yilun &lt;yilun.xu@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>fpga: altera-ps-spi: Use spi_get_device_match_data()</title>
<updated>2023-10-16T02:19:51Z</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2023-10-06T22:46:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3b08f52c256189b7c0d5cf1a031fa464ec20393b'/>
<id>urn:sha1:3b08f52c256189b7c0d5cf1a031fa464ec20393b</id>
<content type='text'>
Use preferred spi_get_device_match_data() instead of of_match_device() and
spi_get_device_id() to get the driver match data. With this, adjust the
includes to explicitly include the correct headers.

Also drop of_match_ptr for of_ef_match, which is not necessary because DT
is always used for this driver.

Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Acked-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Link: https://lore.kernel.org/r/20231006224624.444857-1-robh@kernel.org
[yilun.xu@intel.com: drop of_match_ptr for of_ef_match]
Signed-off-by: Xu Yilun &lt;yilun.xu@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>fpga: Use device_get_match_data()</title>
<updated>2023-10-13T15:17:16Z</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2023-10-06T22:46:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4e807eb05dff41d500822f81744ec5f9c0591aa5'/>
<id>urn:sha1:4e807eb05dff41d500822f81744ec5f9c0591aa5</id>
<content type='text'>
Use preferred device_get_match_data() instead of of_match_device() to
get the driver match data. With this, adjust the includes to explicitly
include the correct headers.

Also drop of_match_ptr for xlnx_pr_decoupler_of_match, which is not
necessary because DT is always used for this driver.

Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Acked-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Link: https://lore.kernel.org/r/20231006224633.445035-1-robh@kernel.org
[yilun.xu@intel.com: merge the fix 20231012192149.1546368-1-robh@kernel.org]
Link: https://lore.kernel.org/r/20231012192149.1546368-1-robh@kernel.org
Signed-off-by: Xu Yilun &lt;yilun.xu@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>fpga: region: make fpga_region_class a static const structure</title>
<updated>2023-08-11T15:04:21Z</updated>
<author>
<name>Ivan Orlov</name>
<email>ivan.orlov0322@gmail.com</email>
</author>
<published>2023-08-11T07:30:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1a22ec09a2c1d367a43cb7f837c7a8719e7fe975'/>
<id>urn:sha1:1a22ec09a2c1d367a43cb7f837c7a8719e7fe975</id>
<content type='text'>
Now that the driver core allows for struct class to be in read-only
memory, move the fpga_region_class structure to be declared at build
time placing it into read-only memory, instead of having to be
dynamically allocated at boot time.

Suggested-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Ivan Orlov &lt;ivan.orlov0322@gmail.com&gt;
Acked-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Link: https://lore.kernel.org/r/20230811073043.52808-3-ivan.orlov0322@gmail.com
Signed-off-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
</content>
</entry>
<entry>
<title>fpga: fpga-mgr: make fpga_mgr_class a static const structure</title>
<updated>2023-08-11T15:04:03Z</updated>
<author>
<name>Ivan Orlov</name>
<email>ivan.orlov0322@gmail.com</email>
</author>
<published>2023-08-11T07:30:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=909960e2e29d9ebda8ef303e338e43c03b3d1faf'/>
<id>urn:sha1:909960e2e29d9ebda8ef303e338e43c03b3d1faf</id>
<content type='text'>
Now that the driver core allows for struct class to be in read-only
memory, move the fpga_mgr_class structure to be declared at build time
placing it into read-only memory, instead of having to be dynamically
allocated at boot time.

Suggested-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Ivan Orlov &lt;ivan.orlov0322@gmail.com&gt;
Acked-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Link: https://lore.kernel.org/r/20230811073043.52808-2-ivan.orlov0322@gmail.com
Signed-off-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
</content>
</entry>
<entry>
<title>fpga: bridge: make fpga_bridge_class a static const structure</title>
<updated>2023-08-11T15:03:37Z</updated>
<author>
<name>Ivan Orlov</name>
<email>ivan.orlov0322@gmail.com</email>
</author>
<published>2023-08-11T07:30:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7bb2d2190d43264eea34d71de7627117db79f9c1'/>
<id>urn:sha1:7bb2d2190d43264eea34d71de7627117db79f9c1</id>
<content type='text'>
Now that the driver core allows for struct class to be in read-only
memory, move the fpga_bridge_class structure to be declared at build
time placing it into read-only memory, instead of having to be
dynamically allocated at boot time.

Suggested-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Ivan Orlov &lt;ivan.orlov0322@gmail.com&gt;
Acked-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Link: https://lore.kernel.org/r/20230811073043.52808-1-ivan.orlov0322@gmail.com
Signed-off-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
</content>
</entry>
<entry>
<title>fpga: dfl-pci: Use pci_find_vsec_capability() to simplify the code</title>
<updated>2023-08-07T10:21:40Z</updated>
<author>
<name>Xiongfeng Wang</name>
<email>wangxiongfeng2@huawei.com</email>
</author>
<published>2023-08-02T08:07:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8607d9c1bd57da0a2d5f8ab2ec32b6ef7d85e66a'/>
<id>urn:sha1:8607d9c1bd57da0a2d5f8ab2ec32b6ef7d85e66a</id>
<content type='text'>
PCI core add pci_find_vsec_capability() to query VSEC. We can use that
core API to simplify the code.

Signed-off-by: Xiongfeng Wang &lt;wangxiongfeng2@huawei.com&gt;
Acked-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
Link: https://lore.kernel.org/r/20230802080726.178194-1-wangxiongfeng2@huawei.com
Signed-off-by: Xu Yilun &lt;yilun.xu@intel.com&gt;
</content>
</entry>
</feed>
