<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/remoteproc.h, branch linux-5.8.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-5.8.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-5.8.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2020-05-12T22:00:37+00:00</updated>
<entry>
<title>remoteproc: Replace zero-length array with flexible-array</title>
<updated>2020-05-12T22:00:37+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavoars@kernel.org</email>
</author>
<published>2020-05-07T19:19:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=529798bae7c155d38eec211436df736349dca2ee'/>
<id>urn:sha1:529798bae7c155d38eec211436df736349dca2ee</id>
<content type='text'>
The current codebase makes use of the zero-length array language
extension to the C90 standard, but the preferred mechanism to declare
variable-length types such as these ones is a flexible array member[1][2],
introduced in C99:

struct foo {
        int stuff;
        struct boo array[];
};

By making use of the mechanism above, we will get a compiler warning
in case the flexible array does not occur last in the structure, which
will help us prevent some kind of undefined behavior bugs from being
inadvertently introduced[3] to the codebase from now on.

Also, notice that, dynamic memory allocations won't be affected by
this change:

"Flexible array members have incomplete type, and so the sizeof operator
may not be applied. As a quirk of the original implementation of
zero-length arrays, sizeof evaluates to zero."[1]

sizeof(flexible-array-member) triggers a warning because flexible array
members have incomplete type[1]. There are some instances of code in
which the sizeof operator is being incorrectly/erroneously applied to
zero-length arrays and the result is zero. Such instances may be hiding
some bugs. So, this work (flexible-array member conversions) will also
help to get completely rid of those sorts of issues.

This issue was found with the help of Coccinelle.

[1] https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
[2] https://github.com/KSPP/linux/issues/21
[3] commit 76497732932f ("cxgb3/l2t: Fix undefined behaviour")

Signed-off-by: Gustavo A. R. Silva &lt;gustavoars@kernel.org&gt;
Link: https://lore.kernel.org/r/20200507191943.GA16033@embeddedor
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>remoteproc: Add prepare and unprepare ops</title>
<updated>2020-04-23T05:18:06+00:00</updated>
<author>
<name>Loic Pallardy</name>
<email>loic.pallardy@st.com</email>
</author>
<published>2020-04-17T00:20:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=33467ac3c8dc80575e1b158e78d0c30ab33c1b08'/>
<id>urn:sha1:33467ac3c8dc80575e1b158e78d0c30ab33c1b08</id>
<content type='text'>
On some SoC architecture, it is needed to enable HW like
clock, bus, regulator, memory region... before loading
co-processor firmware.

This patch introduces prepare and unprepare ops to execute
platform specific function before firmware loading and after
stop execution.

Signed-off-by: Loic Pallardy &lt;loic.pallardy@st.com&gt;
Signed-off-by: Suman Anna &lt;s-anna@ti.com&gt;
Reviewed-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Reviewed-by: Mathieu Poirier &lt;mathieu.poirier@linaro.org&gt;
Link: https://lore.kernel.org/r/20200417002036.24359-2-s-anna@ti.com
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>remoteproc: Add device-managed variants of rproc_alloc/rproc_add</title>
<updated>2020-04-21T02:54:29+00:00</updated>
<author>
<name>Paul Cercueil</name>
<email>paul@crapouillou.net</email>
</author>
<published>2020-04-17T17:00:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=305ac5a766b1d0dd8a4052c8c92e5464888eaa10'/>
<id>urn:sha1:305ac5a766b1d0dd8a4052c8c92e5464888eaa10</id>
<content type='text'>
Add API functions devm_rproc_alloc() and devm_rproc_add(), which behave
like rproc_alloc() and rproc_add() respectively, but register their
respective cleanup function to be called on driver detach.

Reviewed-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Signed-off-by: Paul Cercueil &lt;paul@crapouillou.net&gt;
Link: https://lore.kernel.org/r/20200417170040.174319-2-paul@crapouillou.net
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>remoteproc: Use kstrdup_const() rather than kstrdup()</title>
<updated>2020-04-21T02:29:29+00:00</updated>
<author>
<name>Mathieu Poirier</name>
<email>mathieu.poirier@linaro.org</email>
</author>
<published>2020-04-20T23:15:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1487deda19c82d30d1867277e89bc2d515b9d2d4'/>
<id>urn:sha1:1487deda19c82d30d1867277e89bc2d515b9d2d4</id>
<content type='text'>
For cases where @firmware is declared "const char *", use function
kstrdup_const() to avoid needlessly creating another copy on the
heap.

Suggested-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Signed-off-by: Mathieu Poirier &lt;mathieu.poirier@linaro.org&gt;
Reviewed-by: Alex Elder &lt;elder@linaro.org&gt;
Reviewed-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Link: https://lore.kernel.org/r/20200420231601.16781-2-mathieu.poirier@linaro.org
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>remoteproc: add rproc_coredump_set_elf_info</title>
<updated>2020-04-20T05:53:02+00:00</updated>
<author>
<name>Clement Leger</name>
<email>cleger@kalray.eu</email>
</author>
<published>2020-04-10T10:24:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=418fd78771220f5e522d02676758ed824c349fd5'/>
<id>urn:sha1:418fd78771220f5e522d02676758ed824c349fd5</id>
<content type='text'>
This function allows drivers to correctly setup the coredump output
elf information.

Reviewed-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Reviewed-by: Mathieu Poirier &lt;mathieu.poirier@linaro.org&gt;
Signed-off-by: Clement Leger &lt;cleger@kalray.eu&gt;
Link: https://lore.kernel.org/r/20200410102433.2672-2-cleger@kalray.eu
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>remoteproc: Introduce "panic" callback in ops</title>
<updated>2020-03-26T05:29:45+00:00</updated>
<author>
<name>Bjorn Andersson</name>
<email>bjorn.andersson@linaro.org</email>
</author>
<published>2020-03-24T05:29:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dc5192c449368eed3385f4405670aa3ed21d6270'/>
<id>urn:sha1:dc5192c449368eed3385f4405670aa3ed21d6270</id>
<content type='text'>
Introduce generic support for handling kernel panics in remoteproc
drivers, in order to allow operations needed for aiding in post mortem
system debugging, such as flushing caches etc.

The function can return a number of milliseconds needed by the remote to
"settle" and the core will wait the longest returned duration before
returning from the panic handler.

Reviewed-by: Mathieu Poirier &lt;mathieu.poirier@linaro.org&gt;
Link: https://lore.kernel.org/r/20200324052904.738594-3-bjorn.andersson@linaro.org
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>remoteproc: Adapt coredump to generate correct elf type</title>
<updated>2020-03-26T05:29:41+00:00</updated>
<author>
<name>Clement Leger</name>
<email>cleger@kalray.eu</email>
</author>
<published>2020-03-02T09:39:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8f4033507d856be9a7983921ab3d2a1d03b9a093'/>
<id>urn:sha1:8f4033507d856be9a7983921ab3d2a1d03b9a093</id>
<content type='text'>
Now that remoteproc can load an elf64, coredump elf class should be
the same as the loaded elf class. In order to do that, add a
elf_class field to rproc with default values. If an elf is loaded
successfully, this field will be updated with the loaded elf class.
Then, the coredump core code has been modified to use the generic elf
macro in order to create an elf file with correct class.

Reviewed-by: Mathieu Poirier &lt;mathieu.poirier@linaro.org&gt;
Reviewed-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Signed-off-by: Clement Leger &lt;cleger@kalray.eu&gt;
Link: https://lore.kernel.org/r/20200302093902.27849-9-cleger@kalray.eu
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>remoteproc: Use u64 type for boot_addr</title>
<updated>2020-03-26T05:29:39+00:00</updated>
<author>
<name>Clement Leger</name>
<email>cleger@kalray.eu</email>
</author>
<published>2020-03-02T09:38:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e4ae4b7d01699d0f3ea61bbef119f2d67e5455c0'/>
<id>urn:sha1:e4ae4b7d01699d0f3ea61bbef119f2d67e5455c0</id>
<content type='text'>
elf64 entry is defined as a u64. Since boot_addr is used to store the
elf entry point, change boot_addr type to u64 to support both elf32
and elf64. In the same time, fix users that were using this variable.

Reviewed-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Signed-off-by: Clement Leger &lt;cleger@kalray.eu&gt;
Link: https://lore.kernel.org/r/20200302093902.27849-4-cleger@kalray.eu
[bjorn: Fixes up return type of rproc_get_boot_addr()]
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>remoteproc: Use size_t instead of int for rproc_mem_entry len</title>
<updated>2020-03-26T05:29:39+00:00</updated>
<author>
<name>Clement Leger</name>
<email>cleger@kalray.eu</email>
</author>
<published>2020-03-02T09:38:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=096ee78669d2bc8fccc40117de8d4e838a0c80db'/>
<id>urn:sha1:096ee78669d2bc8fccc40117de8d4e838a0c80db</id>
<content type='text'>
Now that rproc_da_to_va uses a size_t for length, use a size_t for len
field of rproc_mem_entry. Function used to create such structures now
takes a size_t instead of int to allow full size range to be handled.

Reviewed-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Reviewed-by: Mathieu Poirier &lt;mathieu.poirier@linaro.org&gt;
Signed-off-by: Clement Leger &lt;cleger@kalray.eu&gt;
Link: https://lore.kernel.org/r/20200302093902.27849-3-cleger@kalray.eu
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>remoteproc: Use size_t type for len in da_to_va</title>
<updated>2020-03-26T05:29:38+00:00</updated>
<author>
<name>Clement Leger</name>
<email>cleger@kalray.eu</email>
</author>
<published>2020-03-02T09:38:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9ce3bf225e5a908756b90b8f7bbc38834427296b'/>
<id>urn:sha1:9ce3bf225e5a908756b90b8f7bbc38834427296b</id>
<content type='text'>
With upcoming changes in elf loader for elf64 support, section size will
be a u64. When used with da_to_va, this will potentially lead to
overflow if using the current "int" type for len argument. Change
da_to_va prototype to use a size_t for len and fix all users of this
function.

Reviewed-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Reviewed-by: Mathieu Poirier &lt;mathieu.poirier@linaro.org&gt;
Signed-off-by: Clement Leger &lt;cleger@kalray.eu&gt;
Link: https://lore.kernel.org/r/20200302093902.27849-2-cleger@kalray.eu
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
</feed>
