<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/misc/xilinx_sdfec.c, branch v6.6.141</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.141</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.141'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-08-04T13:39:04+00:00</updated>
<entry>
<title>misc: Explicitly include correct DT includes</title>
<updated>2023-08-04T13:39:04+00:00</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2023-07-18T14:31:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d9c58aeb408100647b624e1244aec7b871e859b1'/>
<id>urn:sha1:d9c58aeb408100647b624e1244aec7b871e859b1</id>
<content type='text'>
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Acked-by: Andrew Donnellan &lt;ajd@linux.ibm.com&gt; # cxl
Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Link: https://lore.kernel.org/r/20230718143102.1065481-1-robh@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc/xilinx_sdfec: Convert to devm_platform_ioremap_resource()</title>
<updated>2023-08-04T13:38:45+00:00</updated>
<author>
<name>Yangtao Li</name>
<email>frank.li@vivo.com</email>
</author>
<published>2023-07-07T02:42:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=190d1f226407d4a08e193136e26c1ac967f67b9c'/>
<id>urn:sha1:190d1f226407d4a08e193136e26c1ac967f67b9c</id>
<content type='text'>
Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li &lt;frank.li@vivo.com&gt;
Reviewed-by: Michal Simek &lt;michal.simek@amd.com&gt;
Link: https://lore.kernel.org/r/20230707024224.78907-2-frank.li@vivo.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc/xilinx_sdfec: remove redundant _{open, release} function</title>
<updated>2023-05-31T17:59:56+00:00</updated>
<author>
<name>Bo Svangård</name>
<email>bo.svangard@sylog.se</email>
</author>
<published>2023-04-22T19:59:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f5070bf0e7e70e1ed3aaf422f8ae54ce70aa1bbe'/>
<id>urn:sha1:f5070bf0e7e70e1ed3aaf422f8ae54ce70aa1bbe</id>
<content type='text'>
The functions are redundant as they are empty and performed by the misc
driver.

Signed-off-by: Bo Svangård &lt;bo.svangard@sylog.se&gt;
Acked-by: Michal Simek &lt;michal.simek@amd.com&gt;
Link: https://lore.kernel.org/r/20230422195933.523874-1-bo.svangard@sylog.se
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc/xilinx_sdfec: Replace kmap() with kmap_local_page()</title>
<updated>2022-09-09T08:22:36+00:00</updated>
<author>
<name>Fabio M. De Francesco</name>
<email>fmdefrancesco@gmail.com</email>
</author>
<published>2022-09-01T15:44:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=eb3b3c93afc4a4244590f7d1e715e8b6749585a9'/>
<id>urn:sha1:eb3b3c93afc4a4244590f7d1e715e8b6749585a9</id>
<content type='text'>
kmap() is being deprecated in favor of kmap_local_page().

There are two main problems with kmap(): (1) It comes with an overhead as
the mapping space is restricted and protected by a global lock for
synchronization and (2) it also requires global TLB invalidation when the
kmap’s pool wraps and it might block when the mapping space is fully
utilized until a slot becomes available.

With kmap_local_page() the mappings are per thread, CPU local, can take
page faults, and can be called from any context (including interrupts).
It is faster than kmap() in kernels with HIGHMEM enabled. Furthermore,
the tasks can be preempted and, when they are scheduled to run again, the
kernel virtual addresses are restored and still valid.

Since its use in xilinx_sdfec.c is safe, replace kmap()i / kunmap() with
kmap_local_page() / kunmap_local().

Cc: "Venkataramanan, Anirudh" &lt;anirudh.venkataramanan@intel.com&gt;
Suggested-by: Ira Weiny &lt;ira.weiny@intel.com&gt;
Signed-off-by: Fabio M. De Francesco &lt;fmdefrancesco@gmail.com&gt;
Link: https://lore.kernel.org/r/20220901154408.23984-3-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc/xilinx_sdfec: Call kunmap() on pages mapped with kmap()</title>
<updated>2022-09-09T08:22:36+00:00</updated>
<author>
<name>Fabio M. De Francesco</name>
<email>fmdefrancesco@gmail.com</email>
</author>
<published>2022-09-01T15:44:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e01b08d7f6d36f20533b7510ea3af90756125f35'/>
<id>urn:sha1:e01b08d7f6d36f20533b7510ea3af90756125f35</id>
<content type='text'>
Pages in an array are mapped in a loop but, after the code is done with
the virtual addresses, these pages are never unmapped.

Therefore, call kunmap() to unmap pages[i].

Cc: "Venkataramanan, Anirudh" &lt;anirudh.venkataramanan@intel.com&gt;
Cc: Ira Weiny &lt;ira.weiny@intel.com&gt;
Signed-off-by: Fabio M. De Francesco &lt;fmdefrancesco@gmail.com&gt;
Link: https://lore.kernel.org/r/20220901154408.23984-2-fmdefrancesco@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: xilinx-sdfec: Drop unnecessary NULL check after container_of</title>
<updated>2021-05-21T20:14:48+00:00</updated>
<author>
<name>Guenter Roeck</name>
<email>linux@roeck-us.net</email>
</author>
<published>2021-05-21T20:04:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=78429edfeed8da0562243e876be46d700f9ed13c'/>
<id>urn:sha1:78429edfeed8da0562243e876be46d700f9ed13c</id>
<content type='text'>
container_of() only returns NULL if the passed pointer is NULL _and_ if
the embedded element is the first element of the structure. Even if that
is the case, testing against it is misleading and possibly dangerous
because the position of the embedded element may change. In this case,
the check is unnecessary since it is known that file-&gt;private_data is
never NULL for an open file, and container_of() will therefore also
never be NULL. Drop the check.

Acked-by: Dragan Cvetic &lt;dragan.cvetic@xilinx.com&gt;
Signed-off-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Link: https://lore.kernel.org/r/20210521200457.2112041-1-linux@roeck-us.net
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: xilinx-sdfec: remove check for ioctl cmd and argument.</title>
<updated>2020-11-03T09:11:48+00:00</updated>
<author>
<name>Harshal Chaudhari</name>
<email>harshalchau04@gmail.com</email>
</author>
<published>2020-11-01T17:09:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c78c95f919539cad0308e7de0d5d0d656e4a8e98'/>
<id>urn:sha1:c78c95f919539cad0308e7de0d5d0d656e4a8e98</id>
<content type='text'>
if (_IOC_TYPE(cmd) != PP_IOCTL)
        return -ENOTTY;

Invalid ioctl command check normally performs by “default” case.

if (_IOC_DIR(cmd) != _IOC_NONE) {
       argp = (void __user *)arg;
       if (!argp)
             return -EINVAL; }

And for checking ioctl arguments, copy_from_user()/copy_to_user()
checks are enough.

Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Harshal Chaudhari &lt;harshalchau04@gmail.com&gt;
Link: https://lore.kernel.org/r/20201101170949.18616-1-harshalchau04@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: xilinx_sdfec: add compat_ptr_ioctl()</title>
<updated>2020-10-29T07:37:36+00:00</updated>
<author>
<name>Harshal Chaudhari</name>
<email>harshalchau04@gmail.com</email>
</author>
<published>2020-10-26T15:58:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3f7566f4947834db9b36aeb8b308e91448ba74fc'/>
<id>urn:sha1:3f7566f4947834db9b36aeb8b308e91448ba74fc</id>
<content type='text'>
Driver has a trivial helper function to convert
the pointer argument and then call the native ioctl handler.
But now we have a generic implementation for that, so we can use it.

Signed-off-by: Harshal Chaudhari &lt;harshalchau04@gmail.com&gt;
Link: https://lore.kernel.org/r/20201026155801.16053-1-harshalchau04@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: xilinx-sdfec: convert get_user_pages() --&gt; pin_user_pages()</title>
<updated>2020-05-27T09:09:26+00:00</updated>
<author>
<name>John Hubbard</name>
<email>jhubbard@nvidia.com</email>
</author>
<published>2020-05-27T01:26:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=03358b0f7bc7b5868bbb30f47224a937e2e4d6d3'/>
<id>urn:sha1:03358b0f7bc7b5868bbb30f47224a937e2e4d6d3</id>
<content type='text'>
This code was using get_user_pages*(), in approximately a "Case 1"
scenario (Direct IO), using the categorization from [1]. That means
that it's time to convert the get_user_pages*() + put_page() calls to
pin_user_pages*() + unpin_user_pages() calls.

There is some helpful background in [2]: basically, this is a small
part of fixing a long-standing disconnect between pinning pages, and
file systems' use of those pages.

[1] Documentation/core-api/pin_user_pages.rst

[2] "Explicit pinning of user-space pages":
    https://lwn.net/Articles/807108/

Cc: Derek Kiernan &lt;derek.kiernan@xilinx.com&gt;
Cc: Dragan Cvetic &lt;dragan.cvetic@xilinx.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Michal Simek &lt;michal.simek@xilinx.com&gt;
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: John Hubbard &lt;jhubbard@nvidia.com&gt;
Link: https://lore.kernel.org/r/20200527012628.1100649-4-jhubbard@nvidia.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: xilinx-sdfec: cleanup return value in xsdfec_table_write()</title>
<updated>2020-05-27T09:09:26+00:00</updated>
<author>
<name>John Hubbard</name>
<email>jhubbard@nvidia.com</email>
</author>
<published>2020-05-27T01:26:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d25594d764613ad58656bbe74a86706204813a9f'/>
<id>urn:sha1:d25594d764613ad58656bbe74a86706204813a9f</id>
<content type='text'>
Return 0 for success, rather than the value of an incrementing
"reg" index. The reg value was never actually used, so this
simplifies the caller slightly.

Cc: Derek Kiernan &lt;derek.kiernan@xilinx.com&gt;
Cc: Dragan Cvetic &lt;dragan.cvetic@xilinx.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Michal Simek &lt;michal.simek@xilinx.com&gt;
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: John Hubbard &lt;jhubbard@nvidia.com&gt;
Link: https://lore.kernel.org/r/20200527012628.1100649-3-jhubbard@nvidia.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
