Commit 8007f78e authored by Richard Henderson's avatar Richard Henderson

[OPROF] Update for change to cpu_type interface.

parent b997d2a0
...@@ -143,53 +143,46 @@ static struct oprofile_operations oprof_axp_ops = { ...@@ -143,53 +143,46 @@ static struct oprofile_operations oprof_axp_ops = {
.setup = op_axp_setup, .setup = op_axp_setup,
.shutdown = op_axp_shutdown, .shutdown = op_axp_shutdown,
.start = op_axp_start, .start = op_axp_start,
.stop = op_axp_stop .stop = op_axp_stop,
.cpu_type = NULL /* To be filled in below. */
}; };
int __init int __init
oprofile_arch_init(struct oprofile_operations **ops, enum oprofile_cpu *cpu) oprofile_arch_init(struct oprofile_operations **ops)
{ {
struct op_axp_model *lmodel = NULL; struct op_axp_model *lmodel = NULL;
const char *vername = NULL;
switch (implver()) { switch (implver()) {
case IMPLVER_EV4: case IMPLVER_EV4:
lmodel = &op_model_ev4; lmodel = &op_model_ev4;
vername = "EV4";
break; break;
case IMPLVER_EV5: case IMPLVER_EV5:
/* 21164PC has a slightly different set of events. /* 21164PC has a slightly different set of events.
Recognize the chip by the presence of the MAX insns. */ Recognize the chip by the presence of the MAX insns. */
if (!amask(AMASK_MAX)) { if (!amask(AMASK_MAX))
lmodel = &op_model_pca56; lmodel = &op_model_pca56;
vername = "PCA56"; else
} else {
lmodel = &op_model_ev5; lmodel = &op_model_ev5;
vername = "EV5";
}
break; break;
case IMPLVER_EV6: case IMPLVER_EV6:
/* 21264A supports ProfileMe. /* 21264A supports ProfileMe.
Recognize the chip by the presence of the CIX insns. */ Recognize the chip by the presence of the CIX insns. */
if (!amask(AMASK_CIX)) { if (!amask(AMASK_CIX))
lmodel = &op_model_ev67; lmodel = &op_model_ev67;
vername = "EV67"; else
} else {
lmodel = &op_model_ev6; lmodel = &op_model_ev6;
vername = "EV6";
}
break; break;
} }
if (!lmodel) if (!lmodel)
return ENODEV; return ENODEV;
model = lmodel; model = lmodel;
oprof_axp_ops.cpu_type = lmodel->cpu_type;
*ops = &oprof_axp_ops; *ops = &oprof_axp_ops;
*cpu = model->cpu;
printk(KERN_INFO "oprofile: using %s performance monitoring.\n", printk(KERN_INFO "oprofile: using %s performance monitoring.\n",
vername); lmodel->cpu_type);
return 0; return 0;
} }
...@@ -47,7 +47,7 @@ struct op_axp_model { ...@@ -47,7 +47,7 @@ struct op_axp_model {
void (*reset_ctr) (struct op_register_config *, unsigned long); void (*reset_ctr) (struct op_register_config *, unsigned long);
void (*handle_interrupt) (unsigned long, struct pt_regs *, void (*handle_interrupt) (unsigned long, struct pt_regs *,
struct op_counter_config *); struct op_counter_config *);
enum oprofile_cpu cpu; char *cpu_type;
unsigned char num_counters; unsigned char num_counters;
unsigned char can_set_proc_mode; unsigned char can_set_proc_mode;
}; };
......
...@@ -110,7 +110,7 @@ struct op_axp_model op_model_ev4 = { ...@@ -110,7 +110,7 @@ struct op_axp_model op_model_ev4 = {
.cpu_setup = ev4_cpu_setup, .cpu_setup = ev4_cpu_setup,
.reset_ctr = NULL, .reset_ctr = NULL,
.handle_interrupt = ev4_handle_interrupt, .handle_interrupt = ev4_handle_interrupt,
.cpu = OPROFILE_CPU_AXP_EV4, .cpu_type = "alpha/ev4",
.num_counters = 2, .num_counters = 2,
.can_set_proc_mode = 0, .can_set_proc_mode = 0,
}; };
...@@ -195,7 +195,7 @@ struct op_axp_model op_model_ev5 = { ...@@ -195,7 +195,7 @@ struct op_axp_model op_model_ev5 = {
.cpu_setup = ev5_cpu_setup, .cpu_setup = ev5_cpu_setup,
.reset_ctr = ev5_reset_ctr, .reset_ctr = ev5_reset_ctr,
.handle_interrupt = ev5_handle_interrupt, .handle_interrupt = ev5_handle_interrupt,
.cpu = OPROFILE_CPU_AXP_EV5, .cpu = "alpha/ev5",
.num_counters = 3, .num_counters = 3,
.can_set_proc_mode = 1, .can_set_proc_mode = 1,
}; };
...@@ -205,7 +205,7 @@ struct op_axp_model op_model_pca56 = { ...@@ -205,7 +205,7 @@ struct op_axp_model op_model_pca56 = {
.cpu_setup = ev5_cpu_setup, .cpu_setup = ev5_cpu_setup,
.reset_ctr = ev5_reset_ctr, .reset_ctr = ev5_reset_ctr,
.handle_interrupt = ev5_handle_interrupt, .handle_interrupt = ev5_handle_interrupt,
.cpu = OPROFILE_CPU_AXP_PCA56, .cpu = "alpha/pca56",
.num_counters = 3, .num_counters = 3,
.can_set_proc_mode = 1, .can_set_proc_mode = 1,
}; };
...@@ -97,7 +97,7 @@ struct op_axp_model op_model_ev6 = { ...@@ -97,7 +97,7 @@ struct op_axp_model op_model_ev6 = {
.cpu_setup = ev6_cpu_setup, .cpu_setup = ev6_cpu_setup,
.reset_ctr = ev6_reset_ctr, .reset_ctr = ev6_reset_ctr,
.handle_interrupt = ev6_handle_interrupt, .handle_interrupt = ev6_handle_interrupt,
.cpu = OPROFILE_CPU_AXP_EV6, .cpu = "alpha/ev6",
.num_counters = 2, .num_counters = 2,
.can_set_proc_mode = 0, .can_set_proc_mode = 0,
}; };
...@@ -257,7 +257,7 @@ struct op_axp_model op_model_ev67 = { ...@@ -257,7 +257,7 @@ struct op_axp_model op_model_ev67 = {
.cpu_setup = ev67_cpu_setup, .cpu_setup = ev67_cpu_setup,
.reset_ctr = ev67_reset_ctr, .reset_ctr = ev67_reset_ctr,
.handle_interrupt = ev67_handle_interrupt, .handle_interrupt = ev67_handle_interrupt,
.cpu = OPROFILE_CPU_AXP_EV67, .cpu = "alpha/ev67",
.num_counters = 20, .num_counters = 20,
.can_set_proc_mode = 0, .can_set_proc_mode = 0,
}; };
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