linux/include
Ahmad Fatoum e016173f65 reboot: add support for configuring emergency hardware protection action
We currently leave the decision of whether to shutdown or reboot to
protect hardware in an emergency situation to the individual drivers.

This works out in some cases, where the driver detecting the critical
failure has inside knowledge: It binds to the system management controller
for example or is guided by hardware description that defines what to do.

In the general case, however, the driver detecting the issue can't know
what the appropriate course of action is and shouldn't be dictating the
policy of dealing with it.

Therefore, add a global hw_protection toggle that allows the user to
specify whether shutdown or reboot should be the default action when the
driver doesn't set policy.

This introduces no functional change yet as hw_protection_trigger() has no
callers, but these will be added in subsequent commits.

[arnd@arndb.de: hide unused hw_protection_attr]
  Link: https://lkml.kernel.org/r/20250224141849.1546019-1-arnd@kernel.org
Link: https://lkml.kernel.org/r/20250217-hw_protection-reboot-v3-7-e1c09b090c0c@pengutronix.de
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Cc: Benson Leung <bleung@chromium.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Fabio Estevam <festevam@denx.de>
Cc: Guenter Roeck <groeck@chromium.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Lukasz Luba <lukasz.luba@arm.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Matteo Croce <teknoraver@meta.com>
Cc: Matti Vaittinen <mazziesaccount@gmail.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Rob Herring (Arm) <robh@kernel.org>
Cc: Rui Zhang <rui.zhang@intel.com>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: "Serge E. Hallyn" <serge@hallyn.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-03-16 23:24:14 -07:00
..
acpi LoongArch changes for v6.14 2025-01-28 08:52:01 -08:00
asm-generic arm64 fixes for -rc5 2025-03-01 13:44:51 -08:00
clocksource KVM/arm64 updates for 6.14 2025-01-28 09:01:36 -08:00
crypto
cxl
drm drm: Fix DSC BPP increment decoding 2025-02-13 10:20:30 +02:00
dt-bindings dt-bindings: clock: qcom: Add CAMCC clocks for QCS8300 2025-02-02 20:59:04 -06:00
hyperv
keys
kunit
kvm
linux reboot: add support for configuring emergency hardware protection action 2025-03-16 23:24:14 -07:00
math-emu
media
memory
misc
net Including fixes from bluetooth. We didn't get netfilter or wireless PRs 2025-02-27 09:32:42 -08:00
pcmcia
ras
rdma
rv
scsi Driver core and debugfs updates 2025-01-28 12:25:12 -08:00
soc
sound ASoC: cs35l56: Prevent races when soft-resetting using SPI control 2025-02-25 15:06:58 +00:00
target
trace Including fixes from bluetooth. We didn't get netfilter or wireless PRs 2025-02-27 09:32:42 -08:00
uapi reboot: add support for configuring emergency hardware protection action 2025-03-16 23:24:14 -07:00
ufs scsi: ufs: core: Fix use-after free in init error and remove paths 2025-02-03 17:20:01 -05:00
vdso
video
xen