aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/oprofile/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/oprofile/common.c')
-rw-r--r--arch/powerpc/oprofile/common.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/arch/powerpc/oprofile/common.c b/arch/powerpc/oprofile/common.c
index fd0bbbe7a4de..b6d82390b6a6 100644
--- a/arch/powerpc/oprofile/common.c
+++ b/arch/powerpc/oprofile/common.c
@@ -34,6 +34,11 @@ static void op_handle_interrupt(struct pt_regs *regs)
34 model->handle_interrupt(regs, ctr); 34 model->handle_interrupt(regs, ctr);
35} 35}
36 36
37static void op_powerpc_cpu_setup(void *dummy)
38{
39 model->cpu_setup(ctr);
40}
41
37static int op_powerpc_setup(void) 42static int op_powerpc_setup(void)
38{ 43{
39 int err; 44 int err;
@@ -47,7 +52,7 @@ static int op_powerpc_setup(void)
47 model->reg_setup(ctr, &sys, model->num_counters); 52 model->reg_setup(ctr, &sys, model->num_counters);
48 53
49 /* Configure the registers on all cpus. */ 54 /* Configure the registers on all cpus. */
50 on_each_cpu(model->cpu_setup, NULL, 0, 1); 55 on_each_cpu(op_powerpc_cpu_setup, NULL, 0, 1);
51 56
52 return 0; 57 return 0;
53} 58}
@@ -64,7 +69,10 @@ static void op_powerpc_cpu_start(void *dummy)
64 69
65static int op_powerpc_start(void) 70static int op_powerpc_start(void)
66{ 71{
67 on_each_cpu(op_powerpc_cpu_start, NULL, 0, 1); 72 if (model->global_start)
73 model->global_start(ctr);
74 if (model->start)
75 on_each_cpu(op_powerpc_cpu_start, NULL, 0, 1);
68 return 0; 76 return 0;
69} 77}
70 78
@@ -75,7 +83,10 @@ static inline void op_powerpc_cpu_stop(void *dummy)
75 83
76static void op_powerpc_stop(void) 84static void op_powerpc_stop(void)
77{ 85{
78 on_each_cpu(op_powerpc_cpu_stop, NULL, 0, 1); 86 if (model->stop)
87 on_each_cpu(op_powerpc_cpu_stop, NULL, 0, 1);
88 if (model->global_stop)
89 model->global_stop();
79} 90}
80 91
81static int op_powerpc_create_files(struct super_block *sb, struct dentry *root) 92static int op_powerpc_create_files(struct super_block *sb, struct dentry *root)
@@ -136,13 +147,19 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
136 147
137 switch (cur_cpu_spec->oprofile_type) { 148 switch (cur_cpu_spec->oprofile_type) {
138#ifdef CONFIG_PPC64 149#ifdef CONFIG_PPC64
150#ifdef CONFIG_PPC_CELL_NATIVE
151 case PPC_OPROFILE_CELL:
152 model = &op_model_cell;
153 break;
154#endif
139 case PPC_OPROFILE_RS64: 155 case PPC_OPROFILE_RS64:
140 model = &op_model_rs64; 156 model = &op_model_rs64;
141 break; 157 break;
142 case PPC_OPROFILE_POWER4: 158 case PPC_OPROFILE_POWER4:
143 model = &op_model_power4; 159 model = &op_model_power4;
144 break; 160 break;
145#else 161#endif
162#ifdef CONFIG_6xx
146 case PPC_OPROFILE_G4: 163 case PPC_OPROFILE_G4:
147 model = &op_model_7450; 164 model = &op_model_7450;
148 break; 165 break;