19 #include <linux/errno.h>
20 #include <asm/ptrace.h>
22 #include <asm/cputable.h>
26 static struct op_powerpc_model *model;
31 static int op_per_cpu_rc;
33 static void op_handle_interrupt(
struct pt_regs *
regs)
35 model->handle_interrupt(regs, ctr);
38 static void op_powerpc_cpu_setup(
void *
dummy)
42 ret = model->cpu_setup(ctr);
48 static int op_powerpc_setup(
void)
60 op_per_cpu_rc = model->reg_setup(ctr, &
sys, model->num_counters);
69 out:
if (op_per_cpu_rc) {
77 static void op_powerpc_shutdown(
void)
82 static void op_powerpc_cpu_start(
void *dummy)
90 ret = model->start(ctr);
95 static int op_powerpc_start(
void)
99 if (model->global_start)
100 return model->global_start(ctr);
103 return op_per_cpu_rc;
109 static inline void op_powerpc_cpu_stop(
void *dummy)
114 static void op_powerpc_stop(
void)
118 if (model->global_stop)
119 model->global_stop();
134 #ifdef CONFIG_OPROFILE_CELL
146 sys.cell_support = 0x1;
158 for (i = 0; i < model->num_counters; ++
i) {
186 sys.enable_kernel = 1;
198 #ifdef CONFIG_PPC_BOOK3S_64
199 #ifdef CONFIG_OPROFILE_CELL
201 if (firmware_has_feature(FW_FEATURE_LPAR))
223 #if defined(CONFIG_FSL_EMB_PERFMON)
236 ops->
setup = op_powerpc_setup;
237 ops->
shutdown = op_powerpc_shutdown;
238 ops->
start = op_powerpc_start;
239 ops->
stop = op_powerpc_stop;