Warning, not an OOPS.
The kernel code has loads of WARN_ON lines to log issues, whereas BUG_ON crashes the kernel for fatal things.
It tells you where in the source code triggered the WARN.
https://github.com/raspberrypi/linux/bl ... rp1.h#L543bad_params_if includes a WARN_ON if warnings are enabled.
So pwm_pio_rp1_apply has called pio_sm_set_enabled, but the state machine number is invalid.
The state machine number is stored in ppwm->sm, which is set during probe.
Slightly odd that pio_claim_unused_sm is called with the required parameter set to false, although that appears to only control logging. I suspect that there is something off in the error handling there. It seems a little odd that pio_claim_unused_sm returns an int, when all other uses of sm are for uint.
Probably one for PhilE when he's back in the office.
The kernel code has loads of WARN_ON lines to log issues, whereas BUG_ON crashes the kernel for fatal things.
It tells you where in the source code triggered the WARN.
https://github.com/raspberrypi/linux/bl ... rp1.h#L543
Code:
if (bad_params_if(client, sm >= NUM_PIO_STATE_MACHINES))return -EINVAL;So pwm_pio_rp1_apply has called pio_sm_set_enabled, but the state machine number is invalid.
The state machine number is stored in ppwm->sm, which is set during probe.
Slightly odd that pio_claim_unused_sm is called with the required parameter set to false, although that appears to only control logging. I suspect that there is something off in the error handling there. It seems a little odd that pio_claim_unused_sm returns an int, when all other uses of sm are for uint.
Probably one for PhilE when he's back in the office.
Statistics: Posted by 6by9 — Wed Jul 23, 2025 11:32 am