Skip to content

Commit f738eb1

Browse files
author
Ingo Molnar
committed
perf_counter: Fix the PARISC build
PARISC does not build: /home/mingo/tip/kernel/perf_counter.c: In function 'perf_counter_index': /home/mingo/tip/kernel/perf_counter.c:2016: error: 'PERF_COUNTER_INDEX_OFFSET' undeclared (first use in this function) /home/mingo/tip/kernel/perf_counter.c:2016: error: (Each undeclared identifier is reported only once /home/mingo/tip/kernel/perf_counter.c:2016: error: for each function it appears in.) As PERF_COUNTER_INDEX_OFFSET is not defined. Now, we could define it in the architecture - but lets also provide a core default of 0 (which happens to be what all but one architecture uses at the moment). Architectures that need a different index offset should set this value in their asm/perf_counter.h files. Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Helge Deller <deller@gmx.de> Cc: linux-parisc@vger.kernel.org Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
1 parent e1ac361 commit f738eb1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

kernel/perf_counter.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2019,6 +2019,10 @@ int perf_counter_task_disable(void)
20192019
return 0;
20202020
}
20212021

2022+
#ifndef PERF_COUNTER_INDEX_OFFSET
2023+
# define PERF_COUNTER_INDEX_OFFSET 0
2024+
#endif
2025+
20222026
static int perf_counter_index(struct perf_counter *counter)
20232027
{
20242028
if (counter->state != PERF_COUNTER_STATE_ACTIVE)

0 commit comments

Comments
 (0)