diff options
author | Graf Yang <graf.yang@analog.com> | 2009-01-07 23:14:39 +0800 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2009-01-07 23:14:39 +0800 |
commit | f994607a2e118aedf1116a58ecd16126dbb83d28 (patch) | |
tree | 2b1764e2a037c904aa1358a54852eeb6e349cf6f /arch/blackfin/oprofile | |
parent | 6f985294f7df30c0caa80a795ca10fb6f8466702 (diff) | |
download | op-kernel-dev-f994607a2e118aedf1116a58ecd16126dbb83d28.zip op-kernel-dev-f994607a2e118aedf1116a58ecd16126dbb83d28.tar.gz |
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.c | 14 | ||||
-rw-r--r-- | arch/blackfin/oprofile/op_blackfin.h | 2 | ||||
-rw-r--r-- | arch/blackfin/oprofile/op_model_bf533.c | 4 |
3 files changed, 6 insertions, 14 deletions
diff --git a/arch/blackfin/oprofile/common.c b/arch/blackfin/oprofile/common.c index f34795a..cf8f488 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) int __init oprofile_arch_init(struct oprofile_operations *ops) { #ifdef CONFIG_HARDWARE_PM - unsigned int dspid; - mutex_init(&pfmon_lock); - dspid = bfin_dspid(); - - printk(KERN_INFO "Oprofile got the cpu id is 0x%x. \n", dspid); - switch (dspid) { - case BFIN_533_ID: - model = &op_model_bfin533; - model->num_counters = 2; - break; - case BFIN_537_ID: + switch (bfin_read_CHIPID() & CHIPID_MANUFACTURE) { + case 0xca: + printk(KERN_INFO "Oprofile: cpu vendor is Analog Devices.\n"); model = &op_model_bfin533; model->num_counters = 2; break; diff --git a/arch/blackfin/oprofile/op_blackfin.h b/arch/blackfin/oprofile/op_blackfin.h index 05dd08c..37aec0e 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) CSYNC(); } -extern int pm_overflow_handler(int irq, struct pt_regs *regs); +extern int pm_overflow_handler(struct pt_regs *regs); #endif diff --git a/arch/blackfin/oprofile/op_model_bf533.c b/arch/blackfin/oprofile/op_model_bf533.c index d1c698b..0e34df1 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]; static int bfin533_reg_setup(struct op_counter_config *ctr) { - unsigned int pfctl = ctr_read(); + unsigned int pfctl = 0; unsigned int count[2]; /* set Blackfin perf monitor regs with ctr */ @@ -118,7 +118,7 @@ static int get_kernel(void) return is_kernel; } -int pm_overflow_handler(int irq, struct pt_regs *regs) +int pm_overflow_handler(struct pt_regs *regs) { int is_kernel; int i, cpu; |