x86/xsaves: Fix xstate offset and size calculation in compact  formated xsave area

setup_xstate_comp() calculates xstate offsets and sizes in compact formated xsave
area. But it is called so late that standard formated offsets and sizes read
from cpuid are freed from bootmem. This causes incorrect calculation of compacted
formated offsets and sizes.

The right place to call setup_xstate_comp() is after pcntxt_mask is ready and
before offsets and sizes are freed from bootmem. It's also a good change to set
setup_xstate_comp() as static and __init.

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
3 files changed