]> git.baikalelectronics.ru Git - kernel.git/commit
intel_idle: Add __initdata annotations to init time variables
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 6 Feb 2020 17:41:24 +0000 (18:41 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 11 Feb 2020 22:34:57 +0000 (23:34 +0100)
commitbddb803f4446e21d7e01ba96ebb5a918e6782ab7
tree0547e29c643bfc271886191f95e4edd2f7b0b4e5
parenta68da48a03ed4b87f2c555c0f3d83fb9d49e2a70
intel_idle: Add __initdata annotations to init time variables

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: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/idle/intel_idle.c