[PATCH v2 0/3] soc: samsung: exynos-pmu: gs101: avoid SError for inaccessible registers

André Draszik posted 3 patches 2 months, 1 week ago
MAINTAINERS                                 |   1 +
drivers/soc/samsung/Makefile                |   3 +-
drivers/soc/samsung/exynos-pmu.c            | 136 +--------
drivers/soc/samsung/exynos-pmu.h            |  37 +++
drivers/soc/samsung/gs101-pmu.c             | 446 ++++++++++++++++++++++++++++
include/linux/soc/samsung/exynos-regs-pmu.h | 343 ++++++++++++++++++++-
6 files changed, 824 insertions(+), 142 deletions(-)
[PATCH v2 0/3] soc: samsung: exynos-pmu: gs101: avoid SError for inaccessible registers
Posted by André Draszik 2 months, 1 week ago
Accessing non-existent PMU registers causes an SError, halting the
system and rendering it unuseable.

For gs101, we can avoid that by creating the underlying PMU regmap with
the read- and writable register ranges in place, because on gs101 this
driver controls creation of the regmap.

This series updates the Exynos PMU driver and gs101 in particular to do
just that. For gs101 this is easy, as the exynos-pmu driver creates a
regmap and we can update the regmap config to pass in the registers.
For other SoCs it's not as straight forward, as syscon_node_to_regmap()
is used which doesn't allow passing a custom regmap config - those SoCs
are out of scope for this series.

With this in place, invalid registers (by drivers, or even plain
debugfs), are now simply skipped by regmap, leaving the system useable
in that case.

Cheers,
Andre'

Signed-off-by: André Draszik <andre.draszik@linaro.org>
---
Changes in v2:
- Sam:
  - add regmap_access_table forward declaration
  - add kerneldoc for struct exynos_pmu_data
  - update gs101-pmu.c header to C-style (Sam)
  - ctx -> context
- update commit messages as appropriate
- collect tags
- Link to v1: https://lore.kernel.org/r/20251002-gs101-pmu-regmap-tables-v1-0-1f96f0920eb3@linaro.org

---
André Draszik (3):
      soc: samsung: exynos-pmu: allow specifying read & write access tables for secure regmap
      soc: samsung: exynos-pmu: move some gs101 related code into new file
      soc: samsung: gs101-pmu: implement access tables for read and write

 MAINTAINERS                                 |   1 +
 drivers/soc/samsung/Makefile                |   3 +-
 drivers/soc/samsung/exynos-pmu.c            | 136 +--------
 drivers/soc/samsung/exynos-pmu.h            |  37 +++
 drivers/soc/samsung/gs101-pmu.c             | 446 ++++++++++++++++++++++++++++
 include/linux/soc/samsung/exynos-regs-pmu.h | 343 ++++++++++++++++++++-
 6 files changed, 824 insertions(+), 142 deletions(-)
---
base-commit: 78578f59c6d2d7ece395fa438c7c82a25c9ed9e7
change-id: 20251001-gs101-pmu-regmap-tables-8726ac9f853e

Best regards,
-- 
André Draszik <andre.draszik@linaro.org>

Re: [PATCH v2 0/3] soc: samsung: exynos-pmu: gs101: avoid SError for inaccessible registers
Posted by Krzysztof Kozlowski 1 month, 4 weeks ago
On Thu, 09 Oct 2025 10:31:24 +0100, André Draszik wrote:
> Accessing non-existent PMU registers causes an SError, halting the
> system and rendering it unuseable.
> 
> For gs101, we can avoid that by creating the underlying PMU regmap with
> the read- and writable register ranges in place, because on gs101 this
> driver controls creation of the regmap.
> 
> [...]

Applied, thanks!

[1/3] soc: samsung: exynos-pmu: allow specifying read & write access tables for secure regmap
      https://git.kernel.org/krzk/linux/c/1fce7e4d6c42c8164e6e36d8600e16663066c1b2
[2/3] soc: samsung: exynos-pmu: move some gs101 related code into new file
      https://git.kernel.org/krzk/linux/c/b320711e4c377b0e2ce0b296ba9485cf3f9eb10d
[3/3] soc: samsung: gs101-pmu: implement access tables for read and write
      https://git.kernel.org/krzk/linux/c/8b9cd112f1ac8d72244b189654e693012ea8dfe0

Best regards,
-- 
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>