Commit f03b14cd authored by Greg Banks's avatar Greg Banks Committed by Linus Torvalds

[PATCH] oprofile: update arm for api changes

oprofile arm arch updates, including some internal API changes.
Signed-off-by: default avatarJohn Levon <levon@movementarian.org>
Signed-off-by: default avatarGreg Banks <gnb@melbourne.sgi.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 4852f082
......@@ -24,14 +24,6 @@ static int pmu_setup(void);
static void pmu_stop(void);
static int pmu_create_files(struct super_block *, struct dentry *);
static struct oprofile_operations pmu_ops = {
.create_files = pmu_create_files,
.setup = pmu_setup,
.shutdown = pmu_stop,
.start = pmu_start,
.stop = pmu_stop,
};
#ifdef CONFIG_PM
static struct sys_device device_oprofile = {
.id = 0,
......@@ -113,19 +105,22 @@ static void pmu_stop(void)
up(&pmu_sem);
}
int __init pmu_init(struct oprofile_operations **ops, struct op_arm_model_spec *spec)
void __init pmu_init(struct oprofile_operations *ops, struct op_arm_model_spec *spec)
{
init_MUTEX(&pmu_sem);
if (spec->init() < 0)
return -ENODEV;
return;
pmu_model = spec;
init_driverfs();
*ops = &pmu_ops;
pmu_ops.cpu_type = pmu_model->name;
ops->create_files = pmu_create_files;
ops->setup = pmu_setup;
ops->shutdown = pmu_stop;
ops->start = pmu_start;
ops->stop = pmu_stop;
ops->cpu_type = pmu_model->name;
printk(KERN_INFO "oprofile: using %s PMU\n", spec->name);
return 0;
}
void pmu_exit(void)
......
......@@ -12,14 +12,11 @@
#include <linux/errno.h>
#include "op_arm_model.h"
int __init oprofile_arch_init(struct oprofile_operations **ops)
void __init oprofile_arch_init(struct oprofile_operations *ops)
{
int ret = -ENODEV;
#ifdef CONFIG_CPU_XSCALE
ret = pmu_init(ops, &op_xscale_spec);
pmu_init(ops, &op_xscale_spec);
#endif
return ret;
}
void oprofile_arch_exit(void)
......
......@@ -343,8 +343,7 @@ static void inline __xsc2_check_ctrs(void)
static irqreturn_t xscale_pmu_interrupt(int irq, void *arg, struct pt_regs *regs)
{
unsigned long pc = profile_pc(regs);
int i, is_kernel = !user_mode(regs);
int i;
u32 pmnc;
if (pmu->id == PMU_XSC1)
......@@ -357,7 +356,7 @@ static irqreturn_t xscale_pmu_interrupt(int irq, void *arg, struct pt_regs *regs
continue;
write_counter(i, -(u32)results[i].reset_counter);
oprofile_add_sample(pc, is_kernel, i, smp_processor_id());
oprofile_add_sample(regs, i);
results[i].ovf--;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment