aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/oprofile
diff options
context:
space:
mode:
authorGraf Yang <graf.yang@analog.com>2009-01-07 10:14:39 -0500
committerBryan Wu <cooloney@kernel.org>2009-01-07 10:14:39 -0500
commitf994607a2e118aedf1116a58ecd16126dbb83d28 (patch)
tree2b1764e2a037c904aa1358a54852eeb6e349cf6f /arch/blackfin/oprofile
parent6f985294f7df30c0caa80a795ca10fb6f8466702 (diff)
Blackfin arch: get oprofile work for user space
Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/oprofile')
-rw-r--r--arch/blackfin/oprofile/common.c14
-rw-r--r--arch/blackfin/oprofile/op_blackfin.h2
-rw-r--r--arch/blackfin/oprofile/op_model_bf533.c4
3 files changed, 6 insertions, 14 deletions
diff --git a/arch/blackfin/oprofile/common.c b/arch/blackfin/oprofile/common.c
index f34795a2e481..cf8f48848d1b 100644
--- a/arch/blackfin/oprofile/common.c
+++ b/arch/blackfin/oprofile/common.c
@@ -126,20 +126,12 @@ static int op_bfin_create_files(struct super_block *sb, struct dentry *root)
126int __init oprofile_arch_init(struct oprofile_operations *ops) 126int __init oprofile_arch_init(struct oprofile_operations *ops)
127{ 127{
128#ifdef CONFIG_HARDWARE_PM 128#ifdef CONFIG_HARDWARE_PM
129 unsigned int dspid;
130
131 mutex_init(&pfmon_lock); 129 mutex_init(&pfmon_lock);
132 130
133 dspid = bfin_dspid();
134
135 printk(KERN_INFO "Oprofile got the cpu id is 0x%x. \n", dspid);
136 131
137 switch (dspid) { 132 switch (bfin_read_CHIPID() & CHIPID_MANUFACTURE) {
138 case BFIN_533_ID: 133 case 0xca:
139 model = &op_model_bfin533; 134 printk(KERN_INFO "Oprofile: cpu vendor is Analog Devices.\n");
140 model->num_counters = 2;
141 break;
142 case BFIN_537_ID:
143 model = &op_model_bfin533; 135 model = &op_model_bfin533;
144 model->num_counters = 2; 136 model->num_counters = 2;
145 break; 137 break;
diff --git a/arch/blackfin/oprofile/op_blackfin.h b/arch/blackfin/oprofile/op_blackfin.h
index 05dd08c9d154..37aec0eb00d0 100644
--- a/arch/blackfin/oprofile/op_blackfin.h
+++ b/arch/blackfin/oprofile/op_blackfin.h
@@ -93,6 +93,6 @@ static inline void count_write(unsigned int *count)
93 CSYNC(); 93 CSYNC();
94} 94}
95 95
96extern int pm_overflow_handler(int irq, struct pt_regs *regs); 96extern int pm_overflow_handler(struct pt_regs *regs);
97 97
98#endif 98#endif
diff --git a/arch/blackfin/oprofile/op_model_bf533.c b/arch/blackfin/oprofile/op_model_bf533.c
index d1c698bb9ee5..0e34df169b2d 100644
--- a/arch/blackfin/oprofile/op_model_bf533.c
+++ b/arch/blackfin/oprofile/op_model_bf533.c
@@ -52,7 +52,7 @@ static unsigned curr_pfctl, curr_count[2];
52 52
53static int bfin533_reg_setup(struct op_counter_config *ctr) 53static int bfin533_reg_setup(struct op_counter_config *ctr)
54{ 54{
55 unsigned int pfctl = ctr_read(); 55 unsigned int pfctl = 0;
56 unsigned int count[2]; 56 unsigned int count[2];
57 57
58 /* set Blackfin perf monitor regs with ctr */ 58 /* set Blackfin perf monitor regs with ctr */
@@ -118,7 +118,7 @@ static int get_kernel(void)
118 return is_kernel; 118 return is_kernel;
119} 119}
120 120
121int pm_overflow_handler(int irq, struct pt_regs *regs) 121int pm_overflow_handler(struct pt_regs *regs)
122{ 122{
123 int is_kernel; 123 int is_kernel;
124 int i, cpu; 124 int i, cpu;