<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/remoteproc/qcom_sysmon.c, branch linux-6.5.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.5.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.5.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-12-28T15:47:21Z</updated>
<entry>
<title>remoteproc: move from strlcpy with unused retval to strscpy</title>
<updated>2022-12-28T15:47:21Z</updated>
<author>
<name>Wolfram Sang</name>
</author>
<published>2022-08-18T21:00:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1b0f00d3b1fc25525e1fcd8c5845e362f5688849'/>
<id>urn:sha1:1b0f00d3b1fc25525e1fcd8c5845e362f5688849</id>
<content type='text'>
Follow the advice of the below link and prefer 'strscpy' in this
subsystem. Conversion is 1:1 because the return value is not used.
Generated by a coccinelle script.

Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/
Signed-off-by: Wolfram Sang &lt;wsa+renesas@sang-engineering.com&gt;
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
Link: https://lore.kernel.org/r/20220818210059.7253-1-wsa+renesas@sang-engineering.com
</content>
</entry>
<entry>
<title>remoteproc: sysmon: fix memory leak in qcom_add_sysmon_subdev()</title>
<updated>2022-12-07T04:09:56Z</updated>
<author>
<name>Gaosheng Cui</name>
</author>
<published>2022-11-29T10:56:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e01ce676aaef3b13d02343d7e70f9637d93a3367'/>
<id>urn:sha1:e01ce676aaef3b13d02343d7e70f9637d93a3367</id>
<content type='text'>
The kfree() should be called when of_irq_get_byname() fails or
devm_request_threaded_irq() fails in qcom_add_sysmon_subdev(),
otherwise there will be a memory leak, so add kfree() to fix it.

Fixes: 027045a6e2b7 ("remoteproc: qcom: Add shutdown-ack irq")
Signed-off-by: Gaosheng Cui &lt;cuigaosheng1@huawei.com&gt;
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
Link: https://lore.kernel.org/r/20221129105650.1539187-1-cuigaosheng1@huawei.com
</content>
</entry>
<entry>
<title>remoteproc: sysmon: Make QMI message rules const</title>
<updated>2022-12-07T04:09:42Z</updated>
<author>
<name>Jeff Johnson</name>
</author>
<published>2022-09-14T23:47:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7bd156cbbd0add4b869a7d997d057b76c329f4e5'/>
<id>urn:sha1:7bd156cbbd0add4b869a7d997d057b76c329f4e5</id>
<content type='text'>
Commit ff6d365898d4 ("soc: qcom: qmi: use const for struct
qmi_elem_info") allows QMI message encoding/decoding rules to be
const, so do that for sysmon.

Signed-off-by: Jeff Johnson &lt;quic_jjohnson@quicinc.com&gt;
Reviewed-by: Alex Elder &lt;elder@linaro.org&gt;
Reviewed-by: Sibi Sankar &lt;quic_sibis@quicinc.com&gt;
Signed-off-by: Bjorn Andersson &lt;andersson@kernel.org&gt;
Link: https://lore.kernel.org/r/20220914234705.28405-3-quic_jjohnson@quicinc.com
</content>
</entry>
<entry>
<title>remoteproc: sysmon: Send sysmon state only for running rprocs</title>
<updated>2022-07-18T20:32:34Z</updated>
<author>
<name>Siddharth Gupta</name>
</author>
<published>2022-07-05T12:08:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fd75c2d01a50d877b375786abbeb179564ea8ffc'/>
<id>urn:sha1:fd75c2d01a50d877b375786abbeb179564ea8ffc</id>
<content type='text'>
When a new remoteproc boots up, send the sysmon state notification
of only running remoteprocs. Sending state of remoteprocs booting
up in parallel can cause a race between SSR clients of the remoteproc
that is booting up and the sysmon notification for the same remoteproc,
resulting in an inconsistency between which state the remoteproc that
is booting up in parallel.

For example - if remoteproc A and B crash one after the other, after
remoteproc A boots up, if the remoteproc A tries to get the state of
remoteproc B before the sysmon subdevice for B is invoked but after
the ssr subdevice of B has been invoked, clients on remoteproc A
might get confused when the sysmon notification indicates a different
state.

Signed-off-by: Siddharth Gupta &lt;sidgup@codeaurora.org&gt;
Signed-off-by: Sibi Sankar &lt;quic_sibis@quicinc.com&gt;
Reviewed-by: Konrad Dybcio &lt;konrad.dybcio@somainline.org&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Link: https://lore.kernel.org/r/1657022900-2049-8-git-send-email-quic_sibis@quicinc.com
</content>
</entry>
<entry>
<title>remoteproc: sysmon: Wait for SSCTL service to come up</title>
<updated>2022-07-18T20:32:34Z</updated>
<author>
<name>Sibi Sankar</name>
</author>
<published>2022-07-05T12:08:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=47c04e00eff86a81cd357c3feed04c86089bcb85'/>
<id>urn:sha1:47c04e00eff86a81cd357c3feed04c86089bcb85</id>
<content type='text'>
The SSCTL service comes up after a finite time when the remote Q6 comes
out of reset. Any graceful shutdowns requested during this period will
be a NOP and abrupt tearing down of the glink channel might lead to pending
transactions on the remote Q6 side and will ultimately lead to a fatal
error. Fix this by waiting for the SSCTL service when a graceful shutdown
is requested.

Fixes: 1fb82ee806d1 ("remoteproc: qcom: Introduce sysmon")
Reviewed-by: Matthias Kaehlcke &lt;mka@chromium.org&gt;
Signed-off-by: Sibi Sankar &lt;quic_sibis@quicinc.com&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Link: https://lore.kernel.org/r/1657022900-2049-7-git-send-email-quic_sibis@quicinc.com
</content>
</entry>
<entry>
<title>remoteproc: sysmon: fix shutdown_acked state</title>
<updated>2020-12-04T22:40:52Z</updated>
<author>
<name>Arnd Bergmann</name>
</author>
<published>2020-12-04T19:37:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9d7b4a40387d0f91512a74caed6654ffa23d5ce4'/>
<id>urn:sha1:9d7b4a40387d0f91512a74caed6654ffa23d5ce4</id>
<content type='text'>
The latest version of sysmon_stop() starts by initializing
the sysmon-&gt;shutdown_acked variable, but then overwrites it
with an uninitialized variable later:

drivers/remoteproc/qcom_sysmon.c:551:11: error: variable 'acked' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
        else if (sysmon-&gt;ept)
                 ^~~~~~~~~~~
drivers/remoteproc/qcom_sysmon.c:554:27: note: uninitialized use occurs here
        sysmon-&gt;shutdown_acked = acked;
                                 ^~~~~

Remove the local 'acked' variable again and set the state directly.

Fixes: 5c212aaf5457 ("remoteproc: sysmon: Expose the shutdown result")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Link: https://lore.kernel.org/r/20201204193740.3162065-1-arnd@kernel.org
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>remoteproc: sysmon: Improve error messages</title>
<updated>2020-11-26T05:05:24Z</updated>
<author>
<name>Bjorn Andersson</name>
</author>
<published>2020-11-22T05:41:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0ac72f909ffe37d829deb1d18d057c83bec5e3b1'/>
<id>urn:sha1:0ac72f909ffe37d829deb1d18d057c83bec5e3b1</id>
<content type='text'>
Improve the style of a few of the error messages printed by the sysmon
implementation and fix the copy-pasted shutdown error in the send-event
function.

Tested-by: Steev Klimaszewski &lt;steev@kali.org&gt;
Reviewed-by: Rishabh Bhatnagar &lt;rishabhb@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20201122054135.802935-5-bjorn.andersson@linaro.org
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>remoteproc: sysmon: Expose the shutdown result</title>
<updated>2020-11-26T00:03:30Z</updated>
<author>
<name>Bjorn Andersson</name>
</author>
<published>2020-11-22T05:41:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5c212aaf5457ca5bd99aba3ad29a4a17f8129939'/>
<id>urn:sha1:5c212aaf5457ca5bd99aba3ad29a4a17f8129939</id>
<content type='text'>
A graceful shutdown of the Qualcomm remote processors where
traditionally performed by invoking a shared memory state signal and
waiting for the associated ack.

This was later superseded by the "sysmon" mechanism, where some form of
shared memory bus is used to send a "graceful shutdown request" message
and one of more signals comes back to indicate its success.

But when this newer mechanism is in effect the firmware is shut down by
the time the older mechanism, implemented in the remoteproc drivers,
attempts to perform a graceful shutdown - and as such it will never
receive an ack back.

This patch therefor track the success of the latest shutdown attempt in
sysmon and exposes a new function in the API that the remoteproc driver
can use to query the success and the necessity of invoking the older
mechanism.

Tested-by: Steev Klimaszewski &lt;steev@kali.org&gt;
Reviewed-by: Rishabh Bhatnagar &lt;rishabhb@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20201122054135.802935-3-bjorn.andersson@linaro.org
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>remoteproc: sysmon: Ensure remote notification ordering</title>
<updated>2020-11-26T00:03:19Z</updated>
<author>
<name>Bjorn Andersson</name>
</author>
<published>2020-11-22T05:41:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=138a6428ba9023ae29e103e87a223575fbc3d2b7'/>
<id>urn:sha1:138a6428ba9023ae29e103e87a223575fbc3d2b7</id>
<content type='text'>
The reliance on the remoteproc's state for determining when to send
sysmon notifications to a remote processor is racy with regard to
concurrent remoteproc operations.

Further more the advertisement of the state of other remote processor to
a newly started remote processor might not only send the wrong state,
but might result in a stream of state changes that are out of order.

Address this by introducing state tracking within the sysmon instances
themselves and extend the locking to ensure that the notifications are
consistent with this state.

Fixes: 1f36ab3f6e3b ("remoteproc: sysmon: Inform current rproc about all active rprocs")
Fixes: 1877f54f75ad ("remoteproc: sysmon: Add notifications for events")
Fixes: 1fb82ee806d1 ("remoteproc: qcom: Introduce sysmon")
Cc: stable@vger.kernel.org
Reviewed-by: Rishabh Bhatnagar &lt;rishabhb@codeaurora.org&gt;
Link: https://lore.kernel.org/r/20201122054135.802935-2-bjorn.andersson@linaro.org
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
<entry>
<title>remoteproc: qcom_sysmon: Constify qmi_indication_handler</title>
<updated>2020-11-24T04:02:37Z</updated>
<author>
<name>Rikard Falkeborn</name>
</author>
<published>2020-11-22T23:45:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dd8f52660cb1f6fac0b4cc8adb3f008edd2c14d2'/>
<id>urn:sha1:dd8f52660cb1f6fac0b4cc8adb3f008edd2c14d2</id>
<content type='text'>
The only usage of qmi_indication_handler[] is to pass its address to
qmi_handle_init() which accepts a const pointer. Make it const to allow
the compiler to put it in read-only memory.

Signed-off-by: Rikard Falkeborn &lt;rikard.falkeborn@gmail.com&gt;
Link: https://lore.kernel.org/r/20201122234540.34623-1-rikard.falkeborn@gmail.com
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
</content>
</entry>
</feed>
