Re: [PATCH] platform/chrome: cros_ec: trigger kernel_restart on EC_HOST_EVENT_PANIC
From: Tzung-Bi Shih
Date: Mon Oct 19 2026 - 20:45:07 EST
On Mon, Oct 19, 2026 at 03:12:37PM -0700, Scott Collyer wrote:
> On Sun, Oct 18, 2026 at 7:50 PM Tzung-Bi Shih <tzungbi@xxxxxxxxxx> wrote:
> We would like to drop kernel_restart() entirely and instead focus only on
> surfacing the EC_HOST_EVENT_PANIC event so that userspace crash reporting
> daemons can collect the panic dump and handle recovery policy.
>
> Specifically, for non-ACPI/LPC transports (e.g. MKBP host events
> over ISHTP/SPI),
> we would:
> 1. Register a subscriber on ec_dev->event_notifier (e.g., in cros_ec_dev) to
> listen for EC_HOST_EVENT_PANIC.
> 2. Trigger the existing ec_dev->panic_notifier chain so debugfs flushes any
> pending console logs.
> 3. Emit a kobject_uevent (e.g. ERROR=PANIC) on the cros_ec device kobject to
> notify userspace crash collectors.
>
> Does this separation of mechanism and policy align with what you'd like to
> see upstream? If so, would you prefer the event notifier subscriber in
> cros_ec_dev, or is there another location you'd recommend?
IIUC, this patch is specifically for ISHTP. I'd expect cros_ec_ishtp.c
to register the event notifier and check if the incoming event is
EC_HOST_EVENT_PANIC.