Re: [PATCH v9 3/4] intel_idle: Provide the default enter_dead() handler

From: Dave Hansen
Date: Mon Feb 03 2025 - 19:19:46 EST


On 1/10/25 03:59, Patryk Wlazlyn wrote:
> +static __cpuidle void intel_idle_enter_dead(struct cpuidle_device *dev,
> + int index)
> +{
> + struct cpuidle_driver *drv = cpuidle_get_cpu_driver(dev);
> + struct cpuidle_state *state = &drv->states[index];
> + unsigned long eax = flg2MWAIT(state->flags);
> +
> + mwait_play_dead(eax);
> +}

The __cpuidle marks this as noinstr, but cpuidle_get_cpu_driver() is not
noinstr, so the objtool complains:

vmlinux.o: warning: objtool: intel_idle_enter_dead+0x7: call to
cpuidle_get_cpu_driver() leaves .noinstr.text section

Patryk, can you fix this up, resync against 6.14-rc1 (there are some
minor merge conflicts) and resubmit, please?

I assume that it's OK to just make cpuidle_get_cpu_driver() __cpuidle
too. It doesn't do much.