Commit 4852f082 authored by Greg Banks's avatar Greg Banks Committed by Linus Torvalds

[PATCH] oprofile: update alpha for api changes

oprofile alpha 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 959879c7
...@@ -138,17 +138,8 @@ op_axp_create_files(struct super_block * sb, struct dentry * root) ...@@ -138,17 +138,8 @@ op_axp_create_files(struct super_block * sb, struct dentry * root)
return 0; return 0;
} }
static struct oprofile_operations oprof_axp_ops = { void __init
.create_files = op_axp_create_files, oprofile_arch_init(struct oprofile_operations *ops)
.setup = op_axp_setup,
.shutdown = op_axp_shutdown,
.start = op_axp_start,
.stop = op_axp_stop,
.cpu_type = NULL /* To be filled in below. */
};
int __init
oprofile_arch_init(struct oprofile_operations **ops)
{ {
struct op_axp_model *lmodel = NULL; struct op_axp_model *lmodel = NULL;
...@@ -175,16 +166,18 @@ oprofile_arch_init(struct oprofile_operations **ops) ...@@ -175,16 +166,18 @@ oprofile_arch_init(struct oprofile_operations **ops)
} }
if (!lmodel) if (!lmodel)
return -ENODEV; return;
model = lmodel; model = lmodel;
oprof_axp_ops.cpu_type = lmodel->cpu_type; ops->create_files = op_axp_create_files;
*ops = &oprof_axp_ops; ops->setup = op_axp_setup;
ops->shutdown = op_axp_shutdown;
ops->start = op_axp_start;
ops->stop = op_axp_stop;
ops->cpu_type = lmodel->cpu_type;
printk(KERN_INFO "oprofile: using %s performance monitoring.\n", printk(KERN_INFO "oprofile: using %s performance monitoring.\n",
lmodel->cpu_type); lmodel->cpu_type);
return 0;
} }
......
...@@ -101,8 +101,7 @@ ev4_handle_interrupt(unsigned long which, struct pt_regs *regs, ...@@ -101,8 +101,7 @@ ev4_handle_interrupt(unsigned long which, struct pt_regs *regs,
return; return;
/* Record the sample. */ /* Record the sample. */
oprofile_add_sample(regs->pc, !user_mode(regs), oprofile_add_sample(regs, which);
which, smp_processor_id());
} }
......
...@@ -186,8 +186,7 @@ ev5_handle_interrupt(unsigned long which, struct pt_regs *regs, ...@@ -186,8 +186,7 @@ ev5_handle_interrupt(unsigned long which, struct pt_regs *regs,
struct op_counter_config *ctr) struct op_counter_config *ctr)
{ {
/* Record the sample. */ /* Record the sample. */
oprofile_add_sample(regs->pc, !user_mode(regs), oprofile_add_sample(regs, which);
which, smp_processor_id());
} }
......
...@@ -88,8 +88,7 @@ ev6_handle_interrupt(unsigned long which, struct pt_regs *regs, ...@@ -88,8 +88,7 @@ ev6_handle_interrupt(unsigned long which, struct pt_regs *regs,
struct op_counter_config *ctr) struct op_counter_config *ctr)
{ {
/* Record the sample. */ /* Record the sample. */
oprofile_add_sample(regs->pc, !user_mode(regs), oprofile_add_sample(regs, which);
which, smp_processor_id());
} }
......
...@@ -138,8 +138,7 @@ op_add_pm(unsigned long pc, int kern, unsigned long counter, ...@@ -138,8 +138,7 @@ op_add_pm(unsigned long pc, int kern, unsigned long counter,
if (counter == 1) if (counter == 1)
fake_counter += PM_NUM_COUNTERS; fake_counter += PM_NUM_COUNTERS;
if (ctr[fake_counter].enabled) if (ctr[fake_counter].enabled)
oprofile_add_sample(pc, kern, fake_counter, oprofile_add_pc(pc, kern, fake_counter);
smp_processor_id());
} }
static void static void
...@@ -197,8 +196,7 @@ ev67_handle_interrupt(unsigned long which, struct pt_regs *regs, ...@@ -197,8 +196,7 @@ ev67_handle_interrupt(unsigned long which, struct pt_regs *regs,
to PALcode. Recognize ITB miss by PALcode to PALcode. Recognize ITB miss by PALcode
offset address, and get actual PC from offset address, and get actual PC from
EXC_ADDR. */ EXC_ADDR. */
oprofile_add_sample(regs->pc, kern, which, oprofile_add_pc(regs->pc, kern, which);
smp_processor_id());
if ((pmpc & ((1 << 15) - 1)) == 581) if ((pmpc & ((1 << 15) - 1)) == 581)
op_add_pm(regs->pc, kern, which, op_add_pm(regs->pc, kern, which,
ctr, PM_ITB_MISS); ctr, PM_ITB_MISS);
...@@ -241,7 +239,7 @@ ev67_handle_interrupt(unsigned long which, struct pt_regs *regs, ...@@ -241,7 +239,7 @@ ev67_handle_interrupt(unsigned long which, struct pt_regs *regs,
} }
} }
oprofile_add_sample(pmpc, kern, which, smp_processor_id()); oprofile_add_pc(pmpc, kern, which);
pctr_ctl = wrperfmon(5, 0); pctr_ctl = wrperfmon(5, 0);
if (pctr_ctl & (1UL << 27)) if (pctr_ctl & (1UL << 27))
......
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