Skip to content

Commit ab1a852

Browse files
committed
intel_idle: Annotate init time data structures
Add __initdata or __initconst annotations to the static data structures that are only used during the initialization of the driver. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 7f843dd commit ab1a852

File tree

1 file changed

+39
-39
lines changed

1 file changed

+39
-39
lines changed

drivers/idle/intel_idle.c

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ static __cpuidle void intel_idle_s2idle(struct cpuidle_device *dev,
192192
* which is also the index into the MWAIT hint array.
193193
* Thus C0 is a dummy.
194194
*/
195-
static struct cpuidle_state nehalem_cstates[] = {
195+
static struct cpuidle_state nehalem_cstates[] __initdata = {
196196
{
197197
.name = "C1",
198198
.desc = "MWAIT 0x00",
@@ -229,7 +229,7 @@ static struct cpuidle_state nehalem_cstates[] = {
229229
.enter = NULL }
230230
};
231231

232-
static struct cpuidle_state snb_cstates[] = {
232+
static struct cpuidle_state snb_cstates[] __initdata = {
233233
{
234234
.name = "C1",
235235
.desc = "MWAIT 0x00",
@@ -274,7 +274,7 @@ static struct cpuidle_state snb_cstates[] = {
274274
.enter = NULL }
275275
};
276276

277-
static struct cpuidle_state byt_cstates[] = {
277+
static struct cpuidle_state byt_cstates[] __initdata = {
278278
{
279279
.name = "C1",
280280
.desc = "MWAIT 0x00",
@@ -319,7 +319,7 @@ static struct cpuidle_state byt_cstates[] = {
319319
.enter = NULL }
320320
};
321321

322-
static struct cpuidle_state cht_cstates[] = {
322+
static struct cpuidle_state cht_cstates[] __initdata = {
323323
{
324324
.name = "C1",
325325
.desc = "MWAIT 0x00",
@@ -364,7 +364,7 @@ static struct cpuidle_state cht_cstates[] = {
364364
.enter = NULL }
365365
};
366366

367-
static struct cpuidle_state ivb_cstates[] = {
367+
static struct cpuidle_state ivb_cstates[] __initdata = {
368368
{
369369
.name = "C1",
370370
.desc = "MWAIT 0x00",
@@ -409,7 +409,7 @@ static struct cpuidle_state ivb_cstates[] = {
409409
.enter = NULL }
410410
};
411411

412-
static struct cpuidle_state ivt_cstates[] = {
412+
static struct cpuidle_state ivt_cstates[] __initdata = {
413413
{
414414
.name = "C1",
415415
.desc = "MWAIT 0x00",
@@ -446,7 +446,7 @@ static struct cpuidle_state ivt_cstates[] = {
446446
.enter = NULL }
447447
};
448448

449-
static struct cpuidle_state ivt_cstates_4s[] = {
449+
static struct cpuidle_state ivt_cstates_4s[] __initdata = {
450450
{
451451
.name = "C1",
452452
.desc = "MWAIT 0x00",
@@ -483,7 +483,7 @@ static struct cpuidle_state ivt_cstates_4s[] = {
483483
.enter = NULL }
484484
};
485485

486-
static struct cpuidle_state ivt_cstates_8s[] = {
486+
static struct cpuidle_state ivt_cstates_8s[] __initdata = {
487487
{
488488
.name = "C1",
489489
.desc = "MWAIT 0x00",
@@ -520,7 +520,7 @@ static struct cpuidle_state ivt_cstates_8s[] = {
520520
.enter = NULL }
521521
};
522522

523-
static struct cpuidle_state hsw_cstates[] = {
523+
static struct cpuidle_state hsw_cstates[] __initdata = {
524524
{
525525
.name = "C1",
526526
.desc = "MWAIT 0x00",
@@ -588,7 +588,7 @@ static struct cpuidle_state hsw_cstates[] = {
588588
{
589589
.enter = NULL }
590590
};
591-
static struct cpuidle_state bdw_cstates[] = {
591+
static struct cpuidle_state bdw_cstates[] __initdata = {
592592
{
593593
.name = "C1",
594594
.desc = "MWAIT 0x00",
@@ -657,7 +657,7 @@ static struct cpuidle_state bdw_cstates[] = {
657657
.enter = NULL }
658658
};
659659

660-
static struct cpuidle_state skl_cstates[] = {
660+
static struct cpuidle_state skl_cstates[] __initdata = {
661661
{
662662
.name = "C1",
663663
.desc = "MWAIT 0x00",
@@ -726,7 +726,7 @@ static struct cpuidle_state skl_cstates[] = {
726726
.enter = NULL }
727727
};
728728

729-
static struct cpuidle_state skx_cstates[] = {
729+
static struct cpuidle_state skx_cstates[] __initdata = {
730730
{
731731
.name = "C1",
732732
.desc = "MWAIT 0x00",
@@ -755,7 +755,7 @@ static struct cpuidle_state skx_cstates[] = {
755755
.enter = NULL }
756756
};
757757

758-
static struct cpuidle_state atom_cstates[] = {
758+
static struct cpuidle_state atom_cstates[] __initdata = {
759759
{
760760
.name = "C1E",
761761
.desc = "MWAIT 0x00",
@@ -791,7 +791,7 @@ static struct cpuidle_state atom_cstates[] = {
791791
{
792792
.enter = NULL }
793793
};
794-
static struct cpuidle_state tangier_cstates[] = {
794+
static struct cpuidle_state tangier_cstates[] __initdata = {
795795
{
796796
.name = "C1",
797797
.desc = "MWAIT 0x00",
@@ -835,7 +835,7 @@ static struct cpuidle_state tangier_cstates[] = {
835835
{
836836
.enter = NULL }
837837
};
838-
static struct cpuidle_state avn_cstates[] = {
838+
static struct cpuidle_state avn_cstates[] __initdata = {
839839
{
840840
.name = "C1",
841841
.desc = "MWAIT 0x00",
@@ -855,7 +855,7 @@ static struct cpuidle_state avn_cstates[] = {
855855
{
856856
.enter = NULL }
857857
};
858-
static struct cpuidle_state knl_cstates[] = {
858+
static struct cpuidle_state knl_cstates[] __initdata = {
859859
{
860860
.name = "C1",
861861
.desc = "MWAIT 0x00",
@@ -876,7 +876,7 @@ static struct cpuidle_state knl_cstates[] = {
876876
.enter = NULL }
877877
};
878878

879-
static struct cpuidle_state bxt_cstates[] = {
879+
static struct cpuidle_state bxt_cstates[] __initdata = {
880880
{
881881
.name = "C1",
882882
.desc = "MWAIT 0x00",
@@ -937,7 +937,7 @@ static struct cpuidle_state bxt_cstates[] = {
937937
.enter = NULL }
938938
};
939939

940-
static struct cpuidle_state dnv_cstates[] = {
940+
static struct cpuidle_state dnv_cstates[] __initdata = {
941941
{
942942
.name = "C1",
943943
.desc = "MWAIT 0x00",
@@ -966,116 +966,116 @@ static struct cpuidle_state dnv_cstates[] = {
966966
.enter = NULL }
967967
};
968968

969-
static const struct idle_cpu idle_cpu_nehalem = {
969+
static const struct idle_cpu idle_cpu_nehalem __initconst = {
970970
.state_table = nehalem_cstates,
971971
.auto_demotion_disable_flags = NHM_C1_AUTO_DEMOTE | NHM_C3_AUTO_DEMOTE,
972972
.disable_promotion_to_c1e = true,
973973
};
974974

975-
static const struct idle_cpu idle_cpu_nhx = {
975+
static const struct idle_cpu idle_cpu_nhx __initconst = {
976976
.state_table = nehalem_cstates,
977977
.auto_demotion_disable_flags = NHM_C1_AUTO_DEMOTE | NHM_C3_AUTO_DEMOTE,
978978
.disable_promotion_to_c1e = true,
979979
.use_acpi = true,
980980
};
981981

982-
static const struct idle_cpu idle_cpu_atom = {
982+
static const struct idle_cpu idle_cpu_atom __initconst = {
983983
.state_table = atom_cstates,
984984
};
985985

986-
static const struct idle_cpu idle_cpu_tangier = {
986+
static const struct idle_cpu idle_cpu_tangier __initconst = {
987987
.state_table = tangier_cstates,
988988
};
989989

990-
static const struct idle_cpu idle_cpu_lincroft = {
990+
static const struct idle_cpu idle_cpu_lincroft __initconst = {
991991
.state_table = atom_cstates,
992992
.auto_demotion_disable_flags = ATM_LNC_C6_AUTO_DEMOTE,
993993
};
994994

995-
static const struct idle_cpu idle_cpu_snb = {
995+
static const struct idle_cpu idle_cpu_snb __initconst = {
996996
.state_table = snb_cstates,
997997
.disable_promotion_to_c1e = true,
998998
};
999999

1000-
static const struct idle_cpu idle_cpu_snx = {
1000+
static const struct idle_cpu idle_cpu_snx __initconst = {
10011001
.state_table = snb_cstates,
10021002
.disable_promotion_to_c1e = true,
10031003
.use_acpi = true,
10041004
};
10051005

1006-
static const struct idle_cpu idle_cpu_byt = {
1006+
static const struct idle_cpu idle_cpu_byt __initconst = {
10071007
.state_table = byt_cstates,
10081008
.disable_promotion_to_c1e = true,
10091009
.byt_auto_demotion_disable_flag = true,
10101010
};
10111011

1012-
static const struct idle_cpu idle_cpu_cht = {
1012+
static const struct idle_cpu idle_cpu_cht __initconst = {
10131013
.state_table = cht_cstates,
10141014
.disable_promotion_to_c1e = true,
10151015
.byt_auto_demotion_disable_flag = true,
10161016
};
10171017

1018-
static const struct idle_cpu idle_cpu_ivb = {
1018+
static const struct idle_cpu idle_cpu_ivb __initconst = {
10191019
.state_table = ivb_cstates,
10201020
.disable_promotion_to_c1e = true,
10211021
};
10221022

1023-
static const struct idle_cpu idle_cpu_ivt = {
1023+
static const struct idle_cpu idle_cpu_ivt __initconst = {
10241024
.state_table = ivt_cstates,
10251025
.disable_promotion_to_c1e = true,
10261026
.use_acpi = true,
10271027
};
10281028

1029-
static const struct idle_cpu idle_cpu_hsw = {
1029+
static const struct idle_cpu idle_cpu_hsw __initconst = {
10301030
.state_table = hsw_cstates,
10311031
.disable_promotion_to_c1e = true,
10321032
};
10331033

1034-
static const struct idle_cpu idle_cpu_hsx = {
1034+
static const struct idle_cpu idle_cpu_hsx __initconst = {
10351035
.state_table = hsw_cstates,
10361036
.disable_promotion_to_c1e = true,
10371037
.use_acpi = true,
10381038
};
10391039

1040-
static const struct idle_cpu idle_cpu_bdw = {
1040+
static const struct idle_cpu idle_cpu_bdw __initconst = {
10411041
.state_table = bdw_cstates,
10421042
.disable_promotion_to_c1e = true,
10431043
};
10441044

1045-
static const struct idle_cpu idle_cpu_bdx = {
1045+
static const struct idle_cpu idle_cpu_bdx __initconst = {
10461046
.state_table = bdw_cstates,
10471047
.disable_promotion_to_c1e = true,
10481048
.use_acpi = true,
10491049
};
10501050

1051-
static const struct idle_cpu idle_cpu_skl = {
1051+
static const struct idle_cpu idle_cpu_skl __initconst = {
10521052
.state_table = skl_cstates,
10531053
.disable_promotion_to_c1e = true,
10541054
};
10551055

1056-
static const struct idle_cpu idle_cpu_skx = {
1056+
static const struct idle_cpu idle_cpu_skx __initconst = {
10571057
.state_table = skx_cstates,
10581058
.disable_promotion_to_c1e = true,
10591059
.use_acpi = true,
10601060
};
10611061

1062-
static const struct idle_cpu idle_cpu_avn = {
1062+
static const struct idle_cpu idle_cpu_avn __initconst = {
10631063
.state_table = avn_cstates,
10641064
.disable_promotion_to_c1e = true,
10651065
.use_acpi = true,
10661066
};
10671067

1068-
static const struct idle_cpu idle_cpu_knl = {
1068+
static const struct idle_cpu idle_cpu_knl __initconst = {
10691069
.state_table = knl_cstates,
10701070
.use_acpi = true,
10711071
};
10721072

1073-
static const struct idle_cpu idle_cpu_bxt = {
1073+
static const struct idle_cpu idle_cpu_bxt __initconst = {
10741074
.state_table = bxt_cstates,
10751075
.disable_promotion_to_c1e = true,
10761076
};
10771077

1078-
static const struct idle_cpu idle_cpu_dnv = {
1078+
static const struct idle_cpu idle_cpu_dnv __initconst = {
10791079
.state_table = dnv_cstates,
10801080
.disable_promotion_to_c1e = true,
10811081
.use_acpi = true,

0 commit comments

Comments
 (0)