x86/mwait_idle: remove assumption of one C-state per MWAIT flag
authorLen Brown <len.brown@intel.com>
Fri, 30 Aug 2013 08:58:21 +0000 (10:58 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 30 Aug 2013 08:58:21 +0000 (10:58 +0200)
commit3642ba0f692cfa9319fdeca82268238daba23794
tree5a9306754e307342515d6fcb6f6751bf645eb2df
parentc6066e78f4a66005b0d5d86c6ade32e2ab78923a
x86/mwait_idle: remove assumption of one C-state per MWAIT flag

Remove the assumption that cstate_tables are indexed by MWAIT flag
values. Each entry identifies itself via its own flags value. This
change is needed to support multiple states that share the same MWAIT
flags.

Note that this can have an effect on what state is described by 'N' on
cmdline max_cstate=N on some systems.

Signed-off-by: Len Brown <len.brown@intel.com>
Avoided the effect of changing the meaning of "max_cstate=".
Drop MWAIT_MAX_NUM_CSTATES (done differently in a prior patch on
Linux).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/x86/cpu/mwait-idle.c
xen/include/asm-x86/mwait.h