Skip to contentSkip to conversation

System hang when reading clock controller sysfs 'registers' files

7.1-rc1 BUG Daniel J Blueman 3 participants 3 messages May 2 – May 5 Arm Qualcomm mailing list

lore
Share & tools
lore
#0 lore raw

On a Qualcomm X1 Hamoa-based Lenovo Slim7x with upstream 7.1-rc1, when reading any of the /sys/kernel/debug/regmap/*clock*/registers files
[1] (which could happen inadvertently with grep), we see a complete and immediate system hang.

If this relates to clock/power gating, it could be avoided by inhibiting that prior to the read. It also reproduces when booted with "clk_ignore_unused pd_ignore_unused".

Thanks,
Dan

-- [1]

/sys/kernel/debug/regmap/100000.clock-controller/registers /sys/kernel/debug/regmap/1fc0000.clock-controller/registers /sys/kernel/debug/regmap/3d90000.clock-controller/registers /sys/kernel/debug/regmap/6b6c000.clock-controller-lpass-audio-csr/registers /sys/kernel/debug/regmap/6ea0000.clock-controller-lpass-tcsr/registers /sys/kernel/debug/regmap/aaf0000.clock-controller/registers /sys/kernel/debug/regmap/af00000.clock-controller/registers /sys/kernel/debug/regmap/dummy-clock-controller@0x0000000001fc0000/registers --
Daniel J Blueman

#1 lore raw
Quoted 8 lines · Daniel J Blueman

On a Qualcomm X1 Hamoa-based Lenovo Slim7x with upstream 7.1-rc1, when reading any of the /sys/kernel/debug/regmap/*clock*/registers files
[1] (which could happen inadvertently with grep), we see a complete and immediate system hang.

If this relates to clock/power gating, it could be avoided by inhibiting that prior to the read. It also reproduces when booted with "clk_ignore_unused pd_ignore_unused".

Does this attempt to read the entire regmap-ped address space of the device?

If so, that's probably ""intended"", since there are TZ-only (and other forms of secure) registers sprinkled throughout the range

Konrad

Quoted 16 lines

Thanks,
Dan

-- [1]

/sys/kernel/debug/regmap/100000.clock-controller/registers /sys/kernel/debug/regmap/1fc0000.clock-controller/registers /sys/kernel/debug/regmap/3d90000.clock-controller/registers /sys/kernel/debug/regmap/6b6c000.clock-controller-lpass-audio-csr/registers /sys/kernel/debug/regmap/6ea0000.clock-controller-lpass-tcsr/registers /sys/kernel/debug/regmap/aaf0000.clock-controller/registers /sys/kernel/debug/regmap/af00000.clock-controller/registers /sys/kernel/debug/regmap/dummy-clock-controller@0x0000000001fc0000/registers --
Daniel J Blueman

#2 lore raw
Quoted 10 lines · Konrad Dybcio
Quoted 8 lines · Daniel J Blueman

On a Qualcomm X1 Hamoa-based Lenovo Slim7x with upstream 7.1-rc1, when reading any of the /sys/kernel/debug/regmap/*clock*/registers files
[1] (which could happen inadvertently with grep), we see a complete and immediate system hang.

If this relates to clock/power gating, it could be avoided by inhibiting that prior to the read. It also reproduces when booted with "clk_ignore_unused pd_ignore_unused".

Quoted 5 lines

Does this attempt to read the entire regmap-ped address space of the device?

If so, that's probably ""intended"", since there are TZ-only (and other forms of secure) registers sprinkled throughout the range

Yep. See also commit d81901a5406e ("clk: qcom: dispcc-sm8750: Allow dumping regmap").

We might need something similar for all other devices.

Best regards,
Krzysztof