]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
perf_counter, powerpc, sparc: Fix compilation after perf_counter_overflow() change
authorPaul Mackerras <paulus@samba.org>
Mon, 21 Sep 2009 06:44:32 +0000 (16:44 +1000)
committerIngo Molnar <mingo@elte.hu>
Mon, 21 Sep 2009 07:28:40 +0000 (09:28 +0200)
Commit 5622f295 ("x86, perf_counter, bts: Optimize BTS overflow
handling") removed the regs field from struct perf_sample_data and
added a regs parameter to perf_counter_overflow().  This breaks the
build on powerpc (and Sparc) as reported by Sachin Sant:

  arch/powerpc/kernel/perf_counter.c: In function 'record_and_restart':
  arch/powerpc/kernel/perf_counter.c:1165: error: unknown field 'regs' specified in initializer

This adjusts arch/powerpc/kernel/perf_counter.c to correspond with the
new struct perf_sample_data and perf_counter_overflow().

[ v2: also fix Sparc, Markus Metzger <markus.t.metzger@intel.com> ]

Reported-by: Sachin Sant <sachinp@in.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Cc: Markus Metzger <markus.t.metzger@intel.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: benh@kernel.crashing.org
Cc: linuxppc-dev@ozlabs.org
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <19127.8400.376239.586120@drongo.ozlabs.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/powerpc/kernel/perf_counter.c
arch/sparc/kernel/perf_counter.c
include/linux/perf_counter.h

index 7ceefaf3a7f5e51af1fb44dff457117d7034f4f4..5ccf9bca96c0cabf28aef62c53daa19e2c398b44 100644 (file)
@@ -1162,7 +1162,6 @@ static void record_and_restart(struct perf_counter *counter, unsigned long val,
         */
        if (record) {
                struct perf_sample_data data = {
-                       .regs   = regs,
                        .addr   = 0,
                        .period = counter->hw.last_period,
                };
@@ -1170,7 +1169,7 @@ static void record_and_restart(struct perf_counter *counter, unsigned long val,
                if (counter->attr.sample_type & PERF_SAMPLE_ADDR)
                        perf_get_data_addr(regs, &data.addr);
 
-               if (perf_counter_overflow(counter, nmi, &data)) {
+               if (perf_counter_overflow(counter, nmi, &data, regs)) {
                        /*
                         * Interrupts are coming too fast - throttle them
                         * by setting the counter to 0, so it will be
index 09de4035eaa97e101c4ac9cf5f5131918cb55ed3..b1265ce8a053faa3e5d6756d0bc3e53b33bafa2a 100644 (file)
@@ -493,7 +493,6 @@ static int __kprobes perf_counter_nmi_handler(struct notifier_block *self,
 
        regs = args->regs;
 
-       data.regs = regs;
        data.addr = 0;
 
        cpuc = &__get_cpu_var(cpu_hw_counters);
@@ -513,7 +512,7 @@ static int __kprobes perf_counter_nmi_handler(struct notifier_block *self,
                if (!sparc_perf_counter_set_period(counter, hwc, idx))
                        continue;
 
-               if (perf_counter_overflow(counter, 1, &data))
+               if (perf_counter_overflow(counter, 1, &data, regs))
                        sparc_pmu_disable_counter(hwc, idx);
        }
 
index bd341007c4fca1abe1968993778a74a71a08306a..740caad09a448ecba5e4b2db8167d6163b9f9dfa 100644 (file)
@@ -849,23 +849,6 @@ static inline void perf_counter_comm(struct task_struct *tsk)              { }
 static inline void perf_counter_fork(struct task_struct *tsk)          { }
 static inline void perf_counter_init(void)                             { }
 
-static inline int
-perf_output_begin(struct perf_output_handle *handle, struct perf_counter *c,
-                 unsigned int size, int nmi, int sample)               { }
-static inline void perf_output_end(struct perf_output_handle *handle)  { }
-static inline void
-perf_output_copy(struct perf_output_handle *handle,
-                const void *buf, unsigned int len)                     { }
-static inline void
-perf_output_sample(struct perf_output_handle *handle,
-                  struct perf_event_header *header,
-                  struct perf_sample_data *data,
-                  struct perf_counter *counter)                        { }
-static inline void
-perf_prepare_sample(struct perf_event_header *header,
-                   struct perf_sample_data *data,
-                   struct perf_counter *counter,
-                   struct pt_regs *regs)                               { }
 #endif
 
 #define perf_output_put(handle, x) \