• Rafael J. Wysocki's avatar
    intel_idle: Add __initdata annotations to init time variables · 7f843dd7
    Rafael J. Wysocki authored
    Annotate static variables cpuidle_state_table and mwait_substates
    with __initdata, because they are only used during the initialization
    of the driver.
    
    Also notice that static variable icpu could be annotated analogously
    and the structure pointed to by it could be __initconst, but two of
    its fields are accessed via icpu in intel_idle_cpu_init() and
    auto_demotion_disable(), so introduce two new static variables,
    auto_demotion_disable_flags and disable_promotion_to_c1e, to hold
    the values of these fields, set them during the initialization and
    use them in those functions instead of accessing the source data
    structure via icpu.
    
    That allows icpu to be annotated with __initdata, so do that,
    and it will also allow some __initconst annotations to be added
    subsequently.
    
    No intentional functional impact.
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    7f843dd7
intel_idle.c 43 KB