All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powercap / RAPL: mark rapl_ids array as __initconst
@ 2015-03-25 21:15 Mathias Krause
  2015-03-30 19:17 ` Rafael J. Wysocki
  0 siblings, 1 reply; 5+ messages in thread
From: Mathias Krause @ 2015-03-25 21:15 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: linux-pm, Mathias Krause, Jacob Pan, Srinivas Pandruvada

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.

Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Mathias Krause <minipli@googlemail.com>
---
 drivers/powercap/intel_rapl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/powercap/intel_rapl.c b/drivers/powercap/intel_rapl.c
index 63d4033eb683..62f9b322fde0 100644
--- a/drivers/powercap/intel_rapl.c
+++ b/drivers/powercap/intel_rapl.c
@@ -1054,7 +1054,7 @@ static const struct rapl_defaults rapl_defaults_atom = {
 		.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(0x2d, rapl_defaults_core),/* Sandy Bridge EP */
 	RAPL_CPU(0x37, rapl_defaults_atom),/* Valleyview */
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-04-08 18:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-25 21:15 [PATCH] powercap / RAPL: mark rapl_ids array as __initconst Mathias Krause
2015-03-30 19:17 ` Rafael J. Wysocki
2015-03-30 22:46   ` Jacob Pan
2015-03-31  5:17     ` Mathias Krause
2015-04-08 18:41     ` Mathias Krause

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.