The issue is caused by the `get c0 compare int` function being called on a secondary CPU when a timer IRQ is installed, resulting in a warning about a sleeping function being called from an invalid context. This warning occurs at `kernel/locking/mutex.c:283`. The problem is resolved by not calling `get c0 compare int` if a timer IRQ is installed. Additionally, saving the IRQ number to `struct clock event device *cd` is skipped as it is never used by the clockevent core and is only meant for non-CPU local devices.