linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch v3 0/2] memory: tegra: Skip restricted register access from Guest
@ 2024-04-12 13:05 Sumit Gupta
  2024-04-12 13:05 ` [Patch v3 1/2] dt-bindings: make sid and broadcast reg optional Sumit Gupta
  2024-04-12 13:05 ` [Patch v3 2/2] memory: tegra: make sid and broadcast regions optional Sumit Gupta
  0 siblings, 2 replies; 22+ messages in thread
From: Sumit Gupta @ 2024-04-12 13:05 UTC (permalink / raw)
  To: krzysztof.kozlowski, robh, conor+dt, maz, mark.rutland, treding,
	jonathanh
  Cc: devicetree, linux-kernel, linux-tegra, amhetre, bbasu, sumitg

MC SID and Broadbast channel register access is restricted for Guest VM.
But the Tegra MC driver is considering both these regions as mandatory
and causes error on access. Change that to consider both the regions as
optional in SoC's from Tegra186 onwards. Then skip access to the
restricted registers from Guest if its region is not present in Guest DT
and hence not mapped.
Previously, the solution in [1] was not accepted. Now, handled the
problem with this alternate solution.

---
v2[2] -> v3:
- fix the yaml error.
- add null check for ch_regs in mc_ch_readl() causing error in old SoC's
- remove unused populate label reported by kernel test robot.
- fix existing compile warning about length of name in tegra186_mc_probe.

v1[1] -> v2:
- consider broadcast channel registers also as restricted along with sid
- make sid and broadcast regions optional and access if present in dt.
- update the yaml file.

Sumit Gupta (2):
  dt-bindings: make sid and broadcast reg optional
  memory: tegra: make sid and broadcast regions optional

 .../nvidia,tegra186-mc.yaml                   | 95 ++++++++++---------
 drivers/memory/tegra/mc.c                     |  9 +-
 drivers/memory/tegra/mc.h                     | 22 +++--
 drivers/memory/tegra/tegra186.c               | 25 ++---
 4 files changed, 82 insertions(+), 69 deletions(-)

[1]https://lore.kernel.org/lkml/20240206114852.8472-1-sumitg@nvidia.com/
[2]https://lore.kernel.org/lkml/20240402132626.24693-1-sumitg@nvidia.com/

-- 
2.17.1


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2024-04-25 15:51 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-12 13:05 [Patch v3 0/2] memory: tegra: Skip restricted register access from Guest Sumit Gupta
2024-04-12 13:05 ` [Patch v3 1/2] dt-bindings: make sid and broadcast reg optional Sumit Gupta
2024-04-22  7:02   ` Krzysztof Kozlowski
2024-04-24 16:26     ` Thierry Reding
2024-04-24 17:04       ` Thierry Reding
2024-04-25  7:52         ` Krzysztof Kozlowski
2024-04-25  9:39           ` Thierry Reding
2024-04-25  9:45             ` Krzysztof Kozlowski
2024-04-25 15:03               ` Thierry Reding
2024-04-25 15:16                 ` Krzysztof Kozlowski
2024-04-25 15:51                   ` Thierry Reding
2024-04-25  7:51       ` Krzysztof Kozlowski
2024-04-25  7:52   ` Krzysztof Kozlowski
2024-04-12 13:05 ` [Patch v3 2/2] memory: tegra: make sid and broadcast regions optional Sumit Gupta
2024-04-22  7:12   ` Krzysztof Kozlowski
2024-04-22 14:36     ` Sumit Gupta
2024-04-23 14:41       ` Krzysztof Kozlowski
2024-04-23 19:46         ` Sumit Gupta
2024-04-24  4:09           ` Krzysztof Kozlowski
2024-04-24  5:27             ` Sumit Gupta
2024-04-24  5:44               ` Krzysztof Kozlowski
2024-04-24  6:27                 ` Sumit Gupta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).