[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1452739808-11871-5-git-send-email-ray.huang@amd.com>
Date: Thu, 14 Jan 2016 10:50:07 +0800
From: Huang Rui <ray.huang@....com>
To: Borislav Petkov <bp@...e.de>,
Peter Zijlstra <peterz@...radead.org>,
"Ingo Molnar" <mingo@...nel.org>,
Andy Lutomirski <luto@...capital.net>,
"Thomas Gleixner" <tglx@...utronix.de>,
Robert Richter <rric@...nel.org>,
Jacob Shin <jacob.w.shin@...il.com>,
John Stultz <john.stultz@...aro.org>,
Frédéric Weisbecker <fweisbec@...il.com>
CC: <linux-kernel@...r.kernel.org>, <spg_linux_kernel@....com>,
<x86@...nel.org>, Guenter Roeck <linux@...ck-us.net>,
Andreas Herrmann <herrmann.der.user@...glemail.com>,
Suravee Suthikulpanit <suravee.suthikulpanit@....com>,
Aravind Gopalakrishnan <Aravind.Gopalakrishnan@....com>,
Borislav Petkov <bp@...en8.de>,
"Fengguang Wu" <fengguang.wu@...el.com>,
Aaron Lu <aaron.lu@...el.com>, Huang Rui <ray.huang@....com>
Subject: [PATCH v2 4/5] perf/x86: Move events_sysfs_show outside CPU_SUP_INTEL
This patch moves events_sysfs_show outside CONFIG_CPU_SUP_INTEL,
because this interface will be also used on AMD power reporting
performance event.
Otherwise, below build error would be encountered:
All error/warnings (new ones prefixed by >>):
In file included from include/linux/kobject.h:21:0,
from include/linux/module.h:17,
from arch/x86/kernel/cpu/perf_event_amd_power.c:13:
>> arch/x86/kernel/cpu/perf_event.h:663:31: error: 'events_sysfs_show' undeclared here (not in a function)
.attr = __ATTR(_name, 0444, events_sysfs_show, NULL), \
^
include/linux/sysfs.h:103:10: note: in definition of macro '__ATTR'
.show = _show, \
^
>> arch/x86/kernel/cpu/perf_event_amd_power.c:244:1: note: in expansion of macro 'EVENT_ATTR_STR'
EVENT_ATTR_STR(power-pkg, power_pkg, "event=0x01");
^
Reported-by: build test robot <lkp@...el.com>
Signed-off-by: Huang Rui <ray.huang@....com>
---
arch/x86/kernel/cpu/perf_event.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/cpu/perf_event.h b/arch/x86/kernel/cpu/perf_event.h
index 799e6bd..986f6ba 100644
--- a/arch/x86/kernel/cpu/perf_event.h
+++ b/arch/x86/kernel/cpu/perf_event.h
@@ -793,6 +793,9 @@ ssize_t intel_event_sysfs_show(char *page, u64 config);
struct attribute **merge_attr(struct attribute **a, struct attribute **b);
+ssize_t events_sysfs_show(struct device *dev, struct device_attribute *attr,
+ char *page);
+
#ifdef CONFIG_CPU_SUP_AMD
int amd_pmu_init(void);
@@ -917,9 +920,6 @@ int p6_pmu_init(void);
int knc_pmu_init(void);
-ssize_t events_sysfs_show(struct device *dev, struct device_attribute *attr,
- char *page);
-
static inline int is_ht_workaround_enabled(void)
{
return !!(x86_pmu.flags & PMU_FL_EXCL_ENABLED);
--
1.9.1
Powered by blists - more mailing lists