Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4456b18b authored by Steven Cahail's avatar Steven Cahail
Browse files

soc: qcom: glink: Increase SSR timeout, notify RPM in single-threaded mode



In some cases, delays in context switching can cause SSR notifications
to take a long time to send. This can cause responses from remote
processors to be received after the half-second timeout has expired. In the
case of RPM, the delay is further increased because the notification is
sent in the "request intent" mode, which queues a work item to send the
notification rather than sending it in the same context. If the RPM fails
to respond in time, a kernel panic is initiated.

Increase the SSR timeout to one second and send notifications to RPM in
single-threaded mode to ensure that responses can be received in time.

Change-Id: I987e3970c7bdf4e677f046cc7a3d39c8586871fa
Signed-off-by: default avatarSteven Cahail <scahail@codeaurora.org>
parent 3b74bf1e
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@
#include <soc/qcom/subsystem_restart.h>
#include "glink_private.h"

#define GLINK_SSR_REPLY_TIMEOUT	(HZ / 2)
#define GLINK_SSR_REPLY_TIMEOUT	HZ
#define GLINK_SSR_EVENT_INIT ~0
#define NUM_LOG_PAGES 3

@@ -535,9 +535,17 @@ int notify_for_subsystem(struct subsys_info *ss_info)
			continue;
		}

		ret = glink_tx(handle, (void *)ss_leaf_entry->cb_data,
				(void *)do_cleanup_data,
				sizeof(struct do_cleanup_msg), true);
		if (strcmp(ss_leaf_entry->ssr_name, "rpm"))
			ret = glink_tx(handle, ss_leaf_entry->cb_data,
					do_cleanup_data,
					sizeof(*do_cleanup_data),
					GLINK_TX_REQ_INTENT);
		else
			ret = glink_tx(handle, ss_leaf_entry->cb_data,
					do_cleanup_data,
					sizeof(*do_cleanup_data),
					GLINK_TX_SINGLE_THREADED);

		if (ret) {
			GLINK_SSR_ERR("<SSR> %s: tx failed, ret[%d], %s[%d]\n",
					__func__, ret, "resp. remaining",