提交 ea85dbca 编写于 作者: M Mathias Krause 提交者: Rafael J. Wysocki

powercap / RAPL: mark rapl_ids array as __initconst

The RAPL ids are only tested in rapl_init() which is itself an __init
function. For the MODULE_DEVICE_TABLE() file2alias doesn't care about
the section, just about the symbol name. Therefore it's safe to mark the
rapl_ids[] array as __initconst so its memory can be released after
initialization is done.
Signed-off-by: NMathias Krause <minipli@googlemail.com>
Acked-by: NJacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 34dfa36c
...@@ -1054,7 +1054,7 @@ static const struct rapl_defaults rapl_defaults_atom = { ...@@ -1054,7 +1054,7 @@ static const struct rapl_defaults rapl_defaults_atom = {
.driver_data = (kernel_ulong_t)&_ops, \ .driver_data = (kernel_ulong_t)&_ops, \
} }
static const struct x86_cpu_id rapl_ids[] = { static const struct x86_cpu_id rapl_ids[] __initconst = {
RAPL_CPU(0x2a, rapl_defaults_core),/* Sandy Bridge */ RAPL_CPU(0x2a, rapl_defaults_core),/* Sandy Bridge */
RAPL_CPU(0x2d, rapl_defaults_core),/* Sandy Bridge EP */ RAPL_CPU(0x2d, rapl_defaults_core),/* Sandy Bridge EP */
RAPL_CPU(0x37, rapl_defaults_atom),/* Valleyview */ RAPL_CPU(0x37, rapl_defaults_atom),/* Valleyview */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册