Skip to content

Fix hang due to CPU BW request as BPMP suspended

Sumit Gupta linux-tegra lkml 1 version Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 6 repliesApplied

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2firmware: tegra: add suspend hook and reset BPMP IPC early on resumedrivers/firmware/tegra/bpmp.c include/soc/tegra/bpmp.h+36 -01 reply
2/2memory: tegra: set BPMP msg flags to reset IPC channelsdrivers/memory/tegra/tegra234.c+4 -03 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchThierry RedingKrzysztof Kozlowski
1/2A-b
2/2A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [Patch v2 0/2] Fix hang due to CPU BW request as BPMP suspended

This patch set fixes hang during system resume which started coming after adding Memory Interconnect and OPP support to the Tegra194 CPUFREQ in below change:
f41e1442ac5b ("cpufreq: tegra194: add OPP support and set bandwidth").

Tegra194 CPUFREQ driver uses 'CPUFREQ_NEED_INITIAL_FREQ_CHECK' flag which causes a CPU frequency set request from the 'cpuhp_cpufreq_online' hotplug notifier during resume. The CPU frequency set call also triggers a DRAM bandwidth set request but the BPMP driver hasn't resumed yet which results in hang during resume.

Fix this by resetting the BPMP IPC channels inside tegra_bpmp_transfer*() API if the bandwidth request came from CPU clusters and the BPMP driver is still suspended.

---
v[1] -> v2:
- add suspend hook instead of reset hook based approach.
- add suspended instead of needs_reset flag in 'struct tegra_bpmp'.
- add flags field to 'struct tegra_bpmp_message'.
- set TEGRA_BPMP_MESSAGE_RESET flag from MC driver for CPU BW request.
- use suspended and flags to reset BPMP IPC early on resume.

Sumit Gupta (1):
firmware: tegra: add suspend hook and reset BPMP IPC early on resume

Thierry Reding (1):
memory: tegra: set BPMP msg flags to reset IPC channels

 drivers/firmware/tegra/bpmp.c   | 30 ++++++++++++++++++++++++++++++
 drivers/memory/tegra/tegra234.c |  4 ++++
 include/soc/tegra/bpmp.h        |  6 ++++++
 3 files changed, 40 insertions(+)

[1] https://lore.kernel.org/linux-tegra/[email protected]/

Signature · 1 line
2.17.1