Commit cef1392
firmware/psci: Don't register with debugfs if PSCI isn't available
Contrary to popular belief, PSCI is not a universal property of an
ARM/arm64 system. There is a garden variety of systems out there
that don't (or even cannot) implement it.
I'm the first one deplore such a situation, but hey...
On such systems, a "cat /sys/kernel/debug/psci" results in
fireworks, as no invocation callback is registered.
Check for the invoke_psci_fn and psci_ops.get_version pointers
before registering with the debugfs subsystem, avoiding the
issue altogether.
Fixes: 3137f2e ("firmware/psci: Add debugfs support to ease debugging")
Reported-by: Hector Martin <[email protected]>
Signed-off-by: Marc Zyngier <[email protected]>
Cc: Dmitry Baryshkov <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: Ulf Hansson <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Lorenzo Pieralisi <[email protected]>
Reviewed-by: Hector Martin <[email protected]>
Acked-by: Dmitry Baryshkov <[email protected]>
Acked-by: Mark Rutland <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>1 parent f3dc61c commit cef1392
1 file changed
+3
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
440 | 440 | | |
441 | 441 | | |
442 | 442 | | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
443 | 446 | | |
444 | 447 | | |
445 | 448 | | |
| |||
0 commit comments