Message ID | 20230420064721.1981956-1-dedekind1@gmail.com (mailing list archive) |
---|---|
State | Mainlined, archived |
Headers | show |
Series | None | expand |
On Thu, 2023-04-20 at 09:47 +0300, Artem Bityutskiy wrote: > From: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> > > This is a cleanup which improves code consistency. Move the > 'force_irq_on' > module parameter variable and definition to the same place where we > have > variables and definitions for other module parameters. > > Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Reviewed-by: Zhang Rui <rui.zhang@intel.com> thanks, rui > --- > drivers/idle/intel_idle.c | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > Changelog > * v2 > - Mention 'XSTATE' and 'IBRS' flags in the 'force_irq_on' > commentary > (feedback from Rui Zhang). > > diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c > index bff0d17aeda4..35bd284f7763 100644 > --- a/drivers/idle/intel_idle.c > +++ b/drivers/idle/intel_idle.c > @@ -68,6 +68,7 @@ static struct cpuidle_driver intel_idle_driver = { > static int max_cstate = CPUIDLE_STATE_MAX - 1; > static unsigned int disabled_states_mask; > static unsigned int preferred_states_mask; > +static bool force_irq_on __read_mostly; > > static struct cpuidle_device __percpu *intel_idle_cpuidle_devices; > > @@ -1838,9 +1839,6 @@ static bool __init > intel_idle_verify_cstate(unsigned int mwait_hint) > return true; > } > > -static bool force_irq_on __read_mostly; > -module_param(force_irq_on, bool, 0444); > - > static void __init intel_idle_init_cstates_icpu(struct > cpuidle_driver *drv) > { > int cstate; > @@ -2157,3 +2155,9 @@ MODULE_PARM_DESC(states_off, "Mask of disabled > idle states"); > */ > module_param_named(preferred_cstates, preferred_states_mask, uint, > 0444); > MODULE_PARM_DESC(preferred_cstates, "Mask of preferred idle > states"); > +/* > + * Debugging option that forces the driver to enter all C-states > with > + * interrupts enabled. Does not apply to C-states with > + * 'CPUIDLE_FLAG_INIT_XSTATE' and 'CPUIDLE_FLAG_IBRS' flags. > + */ > +module_param(force_irq_on, bool, 0444);
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c index bff0d17aeda4..35bd284f7763 100644 --- a/drivers/idle/intel_idle.c +++ b/drivers/idle/intel_idle.c @@ -68,6 +68,7 @@ static struct cpuidle_driver intel_idle_driver = { static int max_cstate = CPUIDLE_STATE_MAX - 1; static unsigned int disabled_states_mask; static unsigned int preferred_states_mask; +static bool force_irq_on __read_mostly; static struct cpuidle_device __percpu *intel_idle_cpuidle_devices; @@ -1838,9 +1839,6 @@ static bool __init intel_idle_verify_cstate(unsigned int mwait_hint) return true; } -static bool force_irq_on __read_mostly; -module_param(force_irq_on, bool, 0444); - static void __init intel_idle_init_cstates_icpu(struct cpuidle_driver *drv) { int cstate; @@ -2157,3 +2155,9 @@ MODULE_PARM_DESC(states_off, "Mask of disabled idle states"); */ module_param_named(preferred_cstates, preferred_states_mask, uint, 0444); MODULE_PARM_DESC(preferred_cstates, "Mask of preferred idle states"); +/* + * Debugging option that forces the driver to enter all C-states with + * interrupts enabled. Does not apply to C-states with + * 'CPUIDLE_FLAG_INIT_XSTATE' and 'CPUIDLE_FLAG_IBRS' flags. + */ +module_param(force_irq_on, bool, 0444);