diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2015-06-25 08:52:13 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2015-07-01 03:34:39 -0400 |
commit | a215c8fbde8600d133f122691d0f8c30de6dda02 (patch) | |
tree | 696419903195208ee0b704006f1e74411a9b217c | |
parent | a313bdc5310dd807655d3ca3eb2219cd65dfe45a (diff) |
s390/oprofile: fix compile error
Fix these errors when compiling with CONFIG_OPROFILE=y and
CONFIG_PERF_EVENTS=n:
arch/s390/oprofile/init.c: In function ‘oprofile_hwsampler_start’:
arch/s390/oprofile/init.c:93:2: error: implicit declaration of function 'perf_reserve_sampling' [-Werror=implicit-function-declaration]
retval = perf_reserve_sampling();
^
arch/s390/oprofile/init.c:99:3: error: implicit declaration of function 'perf_release_sampling' [-Werror=implicit-function-declaration]
perf_release_sampling();
^
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r-- | arch/s390/include/asm/perf_event.h | 8 | ||||
-rw-r--r-- | arch/s390/oprofile/init.c | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/arch/s390/include/asm/perf_event.h b/arch/s390/include/asm/perf_event.h index 4cb19fe76dd9..f897ec73dc8c 100644 --- a/arch/s390/include/asm/perf_event.h +++ b/arch/s390/include/asm/perf_event.h | |||
@@ -87,7 +87,15 @@ struct sf_raw_sample { | |||
87 | } __packed; | 87 | } __packed; |
88 | 88 | ||
89 | /* Perf hardware reserve and release functions */ | 89 | /* Perf hardware reserve and release functions */ |
90 | #ifdef CONFIG_PERF_EVENTS | ||
90 | int perf_reserve_sampling(void); | 91 | int perf_reserve_sampling(void); |
91 | void perf_release_sampling(void); | 92 | void perf_release_sampling(void); |
93 | #else /* CONFIG_PERF_EVENTS */ | ||
94 | static inline int perf_reserve_sampling(void) | ||
95 | { | ||
96 | return 0; | ||
97 | } | ||
98 | static inline void perf_release_sampling(void) {} | ||
99 | #endif /* CONFIG_PERF_EVENTS */ | ||
92 | 100 | ||
93 | #endif /* _ASM_S390_PERF_EVENT_H */ | 101 | #endif /* _ASM_S390_PERF_EVENT_H */ |
diff --git a/arch/s390/oprofile/init.c b/arch/s390/oprofile/init.c index bc927a09a172..9cfa2ffaa9d6 100644 --- a/arch/s390/oprofile/init.c +++ b/arch/s390/oprofile/init.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/fs.h> | 16 | #include <linux/fs.h> |
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <asm/processor.h> | 18 | #include <asm/processor.h> |
19 | #include <asm/perf_event.h> | ||
19 | 20 | ||
20 | #include "../../../drivers/oprofile/oprof.h" | 21 | #include "../../../drivers/oprofile/oprof.h" |
21 | 22 | ||