Re: [PATCH] soc: renesas: rz-sysc: Populate readable_reg/writeable_reg in regmap config
From: Claudiu Beznea
Date: Wed Sep 24 2025 - 11:45:28 EST
Hi, Geert,
On 9/24/25 16:44, Geert Uytterhoeven wrote:
> Hi Claudiu,
>
> On Mon, 22 Sept 2025 at 09:41, Claudiu <claudiu.beznea@xxxxxxxxx> wrote:
>> From: Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx>
>>
>> Not all system controller registers are accessible from Linux. Accessing
>> such registers generates synchronous external abort. Populate the
>> readable_reg and writeable_reg members of the regmap config to inform the
>> regmap core which registers can be accessed. The list will need to be
>> updated whenever new system controller functionality is exported through
>> regmap.
>>
>> Fixes: 2da2740fb9c8 ("soc: renesas: rz-sysc: Add syscon/regmap support")
>> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@xxxxxxxxxxxxxx>
>
> Thanks for your patch!
>
> How can this be triggered?
I found this issue by reading the exported regmap debug file:
cat /sys/kernel/debug/regmap/11020000.system-controller-rz_sysc_regs/registers
Thank you,
Claudiu
> AFAIU, registers are only accessed as
> obtained from syscon_regmap_lookup_by_phandle_args(), i.e. based on the
> register offset stored in the DTB. If the offset in the DTB is wrong,
> there is not much we can do ("garbage in, garbage out"), and the DTB
> should be fixed instead.
>
> Is there another way the user can access these non-existing registers?
> Thanks!
>
> Gr{oetje,eeting}s,
>
> Geert
>
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds