Loading arch/blackfin/Kconfig +0 −6 Original line number Diff line number Diff line Loading @@ -1007,12 +1007,6 @@ config EBIU_FCTLVAL hex "Flash Memory Bank Control Register" depends on BF54x default 6 config HARDWARE_PM bool "OProfile use hardware porformance monitor" depends on OPROFILE=y default n endmenu ############################################################################# Loading arch/blackfin/mach-common/interrupt.S +0 −22 Original line number Diff line number Diff line Loading @@ -165,16 +165,6 @@ ENTRY(_evt_ivhw) r0 = [p2]; [sp + PT_IPEND] = r0; #ifdef CONFIG_HARDWARE_PM r7 = [sp + PT_SEQSTAT]; r7 = r7 >>> 0xe; r6 = 0x1F; r7 = r7 & r6; r5 = 0x12; cc = r7 == r5; if cc jump .Lcall_do_ovf; /* deal with performance counter overflow */ #endif /* set the EXCAUSE to HWERR for trap_c */ r0 = [sp + PT_SEQSTAT]; R1.L = LO(VEC_HWERR); Loading @@ -200,18 +190,6 @@ ENTRY(_evt_ivhw) .Lcommon_restore_all_sys: RESTORE_ALL_SYS rti; #ifdef CONFIG_HARDWARE_PM .Lcall_do_ovf: R0 = SP; SP += -12; call _pm_overflow; SP += 12; jump .Lcommon_restore_all_sys; #endif ENDPROC(_evt_ivhw) /* Interrupt routine for evt2 (NMI). Loading arch/blackfin/mach-common/irqpanic.c +0 −12 Original line number Diff line number Diff line Loading @@ -33,8 +33,6 @@ #include <asm/traps.h> #include <asm/blackfin.h> #include "../oprofile/op_blackfin.h" #ifdef CONFIG_DEBUG_ICACHE_CHECK #define L1_ICACHE_START 0xffa10000 #define L1_ICACHE_END 0xffa13fff Loading Loading @@ -134,13 +132,3 @@ asmlinkage void irq_panic(int reason, struct pt_regs *regs) #endif } #ifdef CONFIG_HARDWARE_PM /* * call the handler of Performance overflow */ asmlinkage void pm_overflow(struct pt_regs *regs) { pm_overflow_handler(regs); } #endif arch/blackfin/oprofile/Makefile +0 −1 Original line number Diff line number Diff line Loading @@ -11,4 +11,3 @@ DRIVER_OBJS := $(addprefix ../../../drivers/oprofile/, \ timer_int.o ) oprofile-y := $(DRIVER_OBJS) common.o oprofile-$(CONFIG_HARDWARE_PM) += op_model_bf533.o arch/blackfin/oprofile/common.c +0 −119 Original line number Diff line number Diff line Loading @@ -30,129 +30,10 @@ #include <linux/oprofile.h> #include <linux/init.h> #include <linux/smp.h> #include <linux/errno.h> #include <linux/mutex.h> #include <linux/ptrace.h> #include <linux/irq.h> #include <linux/io.h> #include <asm/system.h> #include <asm/blackfin.h> #include "op_blackfin.h" #define BFIN_533_ID 0xE5040003 #define BFIN_537_ID 0xE5040002 static int pfmon_enabled; static struct mutex pfmon_lock; struct op_bfin533_model *model; struct op_counter_config ctr[OP_MAX_COUNTER]; static int op_bfin_setup(void) { int ret; /* Pre-compute the values to stuff in the hardware registers. */ spin_lock(&oprofilefs_lock); ret = model->reg_setup(ctr); spin_unlock(&oprofilefs_lock); return ret; } static void op_bfin_shutdown(void) { #if 0 /* what is the difference between shutdown and stop? */ #endif } static int op_bfin_start(void) { int ret = -EBUSY; printk(KERN_INFO "KSDBG:in %s\n", __func__); mutex_lock(&pfmon_lock); if (!pfmon_enabled) { ret = model->start(ctr); pfmon_enabled = !ret; } mutex_unlock(&pfmon_lock); return ret; } static void op_bfin_stop(void) { mutex_lock(&pfmon_lock); if (pfmon_enabled) { model->stop(); pfmon_enabled = 0; } mutex_unlock(&pfmon_lock); } static int op_bfin_create_files(struct super_block *sb, struct dentry *root) { int i; for (i = 0; i < model->num_counters; ++i) { struct dentry *dir; char buf[3]; printk(KERN_INFO "Oprofile: creating files... \n"); snprintf(buf, sizeof buf, "%d", i); dir = oprofilefs_mkdir(sb, root, buf); oprofilefs_create_ulong(sb, dir, "enabled", &ctr[i].enabled); oprofilefs_create_ulong(sb, dir, "event", &ctr[i].event); oprofilefs_create_ulong(sb, dir, "count", &ctr[i].count); /* * We dont support per counter user/kernel selection, but * we leave the entries because userspace expects them */ oprofilefs_create_ulong(sb, dir, "kernel", &ctr[i].kernel); oprofilefs_create_ulong(sb, dir, "user", &ctr[i].user); oprofilefs_create_ulong(sb, dir, "unit_mask", &ctr[i].unit_mask); } return 0; } int __init oprofile_arch_init(struct oprofile_operations *ops) { #ifdef CONFIG_HARDWARE_PM mutex_init(&pfmon_lock); 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; default: return -ENODEV; } ops->cpu_type = model->name; ops->create_files = op_bfin_create_files; ops->setup = op_bfin_setup; ops->shutdown = op_bfin_shutdown; ops->start = op_bfin_start; ops->stop = op_bfin_stop; printk(KERN_INFO "oprofile: using %s performance monitoring.\n", ops->cpu_type); return 0; #else return -1; #endif } void oprofile_arch_exit(void) Loading Loading
arch/blackfin/Kconfig +0 −6 Original line number Diff line number Diff line Loading @@ -1007,12 +1007,6 @@ config EBIU_FCTLVAL hex "Flash Memory Bank Control Register" depends on BF54x default 6 config HARDWARE_PM bool "OProfile use hardware porformance monitor" depends on OPROFILE=y default n endmenu ############################################################################# Loading
arch/blackfin/mach-common/interrupt.S +0 −22 Original line number Diff line number Diff line Loading @@ -165,16 +165,6 @@ ENTRY(_evt_ivhw) r0 = [p2]; [sp + PT_IPEND] = r0; #ifdef CONFIG_HARDWARE_PM r7 = [sp + PT_SEQSTAT]; r7 = r7 >>> 0xe; r6 = 0x1F; r7 = r7 & r6; r5 = 0x12; cc = r7 == r5; if cc jump .Lcall_do_ovf; /* deal with performance counter overflow */ #endif /* set the EXCAUSE to HWERR for trap_c */ r0 = [sp + PT_SEQSTAT]; R1.L = LO(VEC_HWERR); Loading @@ -200,18 +190,6 @@ ENTRY(_evt_ivhw) .Lcommon_restore_all_sys: RESTORE_ALL_SYS rti; #ifdef CONFIG_HARDWARE_PM .Lcall_do_ovf: R0 = SP; SP += -12; call _pm_overflow; SP += 12; jump .Lcommon_restore_all_sys; #endif ENDPROC(_evt_ivhw) /* Interrupt routine for evt2 (NMI). Loading
arch/blackfin/mach-common/irqpanic.c +0 −12 Original line number Diff line number Diff line Loading @@ -33,8 +33,6 @@ #include <asm/traps.h> #include <asm/blackfin.h> #include "../oprofile/op_blackfin.h" #ifdef CONFIG_DEBUG_ICACHE_CHECK #define L1_ICACHE_START 0xffa10000 #define L1_ICACHE_END 0xffa13fff Loading Loading @@ -134,13 +132,3 @@ asmlinkage void irq_panic(int reason, struct pt_regs *regs) #endif } #ifdef CONFIG_HARDWARE_PM /* * call the handler of Performance overflow */ asmlinkage void pm_overflow(struct pt_regs *regs) { pm_overflow_handler(regs); } #endif
arch/blackfin/oprofile/Makefile +0 −1 Original line number Diff line number Diff line Loading @@ -11,4 +11,3 @@ DRIVER_OBJS := $(addprefix ../../../drivers/oprofile/, \ timer_int.o ) oprofile-y := $(DRIVER_OBJS) common.o oprofile-$(CONFIG_HARDWARE_PM) += op_model_bf533.o
arch/blackfin/oprofile/common.c +0 −119 Original line number Diff line number Diff line Loading @@ -30,129 +30,10 @@ #include <linux/oprofile.h> #include <linux/init.h> #include <linux/smp.h> #include <linux/errno.h> #include <linux/mutex.h> #include <linux/ptrace.h> #include <linux/irq.h> #include <linux/io.h> #include <asm/system.h> #include <asm/blackfin.h> #include "op_blackfin.h" #define BFIN_533_ID 0xE5040003 #define BFIN_537_ID 0xE5040002 static int pfmon_enabled; static struct mutex pfmon_lock; struct op_bfin533_model *model; struct op_counter_config ctr[OP_MAX_COUNTER]; static int op_bfin_setup(void) { int ret; /* Pre-compute the values to stuff in the hardware registers. */ spin_lock(&oprofilefs_lock); ret = model->reg_setup(ctr); spin_unlock(&oprofilefs_lock); return ret; } static void op_bfin_shutdown(void) { #if 0 /* what is the difference between shutdown and stop? */ #endif } static int op_bfin_start(void) { int ret = -EBUSY; printk(KERN_INFO "KSDBG:in %s\n", __func__); mutex_lock(&pfmon_lock); if (!pfmon_enabled) { ret = model->start(ctr); pfmon_enabled = !ret; } mutex_unlock(&pfmon_lock); return ret; } static void op_bfin_stop(void) { mutex_lock(&pfmon_lock); if (pfmon_enabled) { model->stop(); pfmon_enabled = 0; } mutex_unlock(&pfmon_lock); } static int op_bfin_create_files(struct super_block *sb, struct dentry *root) { int i; for (i = 0; i < model->num_counters; ++i) { struct dentry *dir; char buf[3]; printk(KERN_INFO "Oprofile: creating files... \n"); snprintf(buf, sizeof buf, "%d", i); dir = oprofilefs_mkdir(sb, root, buf); oprofilefs_create_ulong(sb, dir, "enabled", &ctr[i].enabled); oprofilefs_create_ulong(sb, dir, "event", &ctr[i].event); oprofilefs_create_ulong(sb, dir, "count", &ctr[i].count); /* * We dont support per counter user/kernel selection, but * we leave the entries because userspace expects them */ oprofilefs_create_ulong(sb, dir, "kernel", &ctr[i].kernel); oprofilefs_create_ulong(sb, dir, "user", &ctr[i].user); oprofilefs_create_ulong(sb, dir, "unit_mask", &ctr[i].unit_mask); } return 0; } int __init oprofile_arch_init(struct oprofile_operations *ops) { #ifdef CONFIG_HARDWARE_PM mutex_init(&pfmon_lock); 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; default: return -ENODEV; } ops->cpu_type = model->name; ops->create_files = op_bfin_create_files; ops->setup = op_bfin_setup; ops->shutdown = op_bfin_shutdown; ops->start = op_bfin_start; ops->stop = op_bfin_stop; printk(KERN_INFO "oprofile: using %s performance monitoring.\n", ops->cpu_type); return 0; #else return -1; #endif } void oprofile_arch_exit(void) Loading