[PATCH v7 3/5] drivers: firmware: add riscv SSE support
Clément Léger
cleger at rivosinc.com
Wed Oct 29 08:35:14 PDT 2025
On 10/27/25 13:35, Himanshu Chauhan wrote:
>> +static int sse_pm_notifier(struct notifier_block *nb, unsigned long action,
>> + void *data)
>> +{
>> + WARN_ON_ONCE(preemptible());
>> +
>> + switch (action) {
>> + case CPU_PM_ENTER:
>> + sse_events_mask();
>> + break;
>> + case CPU_PM_EXIT:
>> + case CPU_PM_ENTER_FAILED:
>> + sse_events_unmask();
>> + break;
>> + default:
>> + return NOTIFY_DONE;
>> + }
>> +
>> + return NOTIFY_OK;
>> +}
>> +
>> +static struct notifier_block sse_pm_nb = {
>> + .notifier_call = sse_pm_notifier,
>> +};
>> +
>> +/*
>> + * Mask all CPUs and unregister all events on panic, reboot or kexec.
>> + */
>> +static int sse_reboot_notifier(struct notifier_block *nb, unsigned long action,
>> + void *data)
>> +{
>> + cpuhp_remove_state(sse_hp_state);
>> + sse_reset();
> Is this sse_reset required?
> I was running the poweroff command. The CPU teardown function is
> called and events are disabled & unregistered as part of it.
> when sse_reset is called, it again tries to call disable & unregister
> events for all cpus (nolock version). So I see errors from SBI that
> event is in invalid state. Commenting out sse_reset() wo
Hi Himanshu,
Yeah that is useless. I think it was there before you add PM support and
wasn't removed then. I'll remove it.
Thanks,
Clément
More information about the linux-riscv
mailing list