]> Git Repo - linux.git/commitdiff
perf_counter: Fix the PARISC build
authorIngo Molnar <[email protected]>
Tue, 18 Aug 2009 09:32:24 +0000 (11:32 +0200)
committerIngo Molnar <[email protected]>
Tue, 18 Aug 2009 09:34:13 +0000 (11:34 +0200)
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 <[email protected]>
Cc: Helge Deller <[email protected]>
Cc: [email protected]
Cc: Peter Zijlstra <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <[email protected]>
kernel/perf_counter.c

index b8fe7397b9022d8b397c7532400b6383983d7e7f..36f65e2b8b5772f16e644bfa109f89393c893fd3 100644 (file)
@@ -2019,6 +2019,10 @@ int perf_counter_task_disable(void)
        return 0;
 }
 
+#ifndef PERF_COUNTER_INDEX_OFFSET
+# define PERF_COUNTER_INDEX_OFFSET 0
+#endif
+
 static int perf_counter_index(struct perf_counter *counter)
 {
        if (counter->state != PERF_COUNTER_STATE_ACTIVE)
This page took 0.060476 seconds and 4 git commands to generate.