Skip to contentSkip to conversation

x86, perf: Fix __initconst declaration in rapl perf driver

PATCH New Andi Kleen 2 participants 3 messages Nov 30, 2015 – Dec 6, 2015

Subsystems (2)
lore
Share & tools
lore

Andi Kleen

author
#0 lore raw

PATCH 1/1 x86, perf: Fix __initconst declaration in rapl perf driver

From: Andi Kleen <[email protected]>

Fix a definition in the perf rapl driver. __initconst must be applied to a const object, but to declare a const pointer you need to use * const ..., not const ... *

This fixes a section attribute conflict with LTO builds.

---
 arch/x86/kernel/cpu/perf_event_intel_rapl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/cpu/perf_event_intel_rapl.c +1 -1
index ed446bd..fb5843d 100644
@@ -63,7 +63,7 @@
 #define INTEL_RAPL_PP1		0x4	/* pseudo-encoding */
 
 #define NR_RAPL_DOMAINS         0x4
-static const char *rapl_domain_names[NR_RAPL_DOMAINS] __initconst = {
+static const char *const rapl_domain_names[NR_RAPL_DOMAINS] __initconst = {
 	"pp0-core",
 	"package",
 	"dram",
Signature · 1 line
2.4.3
#1 lore raw

[tip:perf/core] perf/x86/intel: Fix __initconst declaration in the RAPL perf driver

perf/x86/intel: Fix __initconst declaration in the RAPL perf driver
Commit-ID:  e2c99f678be372d5324fd57a4d557f232870a311
Gitweb:     http://git.kernel.org/tip/e2c99f678be372d5324fd57a4d557f232870a311
Author:     Andi Kleen <[email protected]>
AuthorDate: Mon, 30 Nov 2015 09:48:42 -0800
Committer:  Ingo Molnar <[email protected]>
CommitDate: Fri, 4 Dec 2015 10:58:33 +0100

perf/x86/intel: Fix __initconst declaration in the RAPL perf driver

Fix a definition in the perf rapl driver. __initconst must be applied to a const object, but to declare a const pointer you need to use * const ..., not const ... *

This fixes a section attribute conflict with LTO builds.

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Stephane Eranian <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Vince Weaver <[email protected]>
---
 arch/x86/kernel/cpu/perf_event_intel_rapl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/cpu/perf_event_intel_rapl.c +1 -1
index ed446bd..fb5843d 100644
@@ -63,7 +63,7 @@
 #define INTEL_RAPL_PP1		0x4	/* pseudo-encoding */
 
 #define NR_RAPL_DOMAINS         0x4
-static const char *rapl_domain_names[NR_RAPL_DOMAINS] __initconst = {
+static const char *const rapl_domain_names[NR_RAPL_DOMAINS] __initconst = {
 	"pp0-core",
 	"package",
 	"dram",
#2 lore raw

[tip:perf/core] perf/x86/intel: Fix __initconst declaration in the RAPL perf driver

In reply to Andi Kleen
perf/x86/intel: Fix __initconst declaration in the RAPL perf driver
Commit-ID:  da008ee72cabdee0ee98d3a3580ca5cfb8d2d1f1
Gitweb:     http://git.kernel.org/tip/da008ee72cabdee0ee98d3a3580ca5cfb8d2d1f1
Author:     Andi Kleen <[email protected]>
AuthorDate: Mon, 30 Nov 2015 09:48:42 -0800
Committer:  Ingo Molnar <[email protected]>
CommitDate: Sun, 6 Dec 2015 12:55:53 +0100

perf/x86/intel: Fix __initconst declaration in the RAPL perf driver

Fix a definition in the perf rapl driver. __initconst must be applied to a const object, but to declare a const pointer you need to use * const ..., not const ... *

This fixes a section attribute conflict with LTO builds.

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Stephane Eranian <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Vince Weaver <[email protected]>
---
 arch/x86/kernel/cpu/perf_event_intel_rapl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/cpu/perf_event_intel_rapl.c +1 -1
index ed446bd..fb5843d 100644
@@ -63,7 +63,7 @@
 #define INTEL_RAPL_PP1		0x4	/* pseudo-encoding */
 
 #define NR_RAPL_DOMAINS         0x4
-static const char *rapl_domain_names[NR_RAPL_DOMAINS] __initconst = {
+static const char *const rapl_domain_names[NR_RAPL_DOMAINS] __initconst = {
 	"pp0-core",
 	"package",
 	"dram",