aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/blackfin/Kconfig10
-rw-r--r--arch/blackfin/mach-common/interrupt.S12
-rw-r--r--arch/blackfin/mach-common/irqpanic.c4
-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
6 files changed, 21 insertions, 25 deletions
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index 5f09d9349322..a394957ddaf4 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -60,10 +60,6 @@ config GENERIC_CALIBRATE_DELAY
60 bool 60 bool
61 default y 61 default y
62 62
63config HARDWARE_PM
64 def_bool y
65 depends on OPROFILE
66
67source "init/Kconfig" 63source "init/Kconfig"
68 64
69source "kernel/Kconfig.preempt" 65source "kernel/Kconfig.preempt"
@@ -1019,6 +1015,12 @@ config EBIU_FCTLVAL
1019 hex "Flash Memory Bank Control Register" 1015 hex "Flash Memory Bank Control Register"
1020 depends on BF54x 1016 depends on BF54x
1021 default 6 1017 default 6
1018
1019config HARDWARE_PM
1020 bool "OProfile use hardware porformance monitor"
1021 depends on OPROFILE
1022 default n
1023
1022endmenu 1024endmenu
1023 1025
1024############################################################################# 1026#############################################################################
diff --git a/arch/blackfin/mach-common/interrupt.S b/arch/blackfin/mach-common/interrupt.S
index 4a2ec7a9675a..2604b532897c 100644
--- a/arch/blackfin/mach-common/interrupt.S
+++ b/arch/blackfin/mach-common/interrupt.S
@@ -152,6 +152,12 @@ ENTRY(_evt_ivhw)
1521: 1521:
153#endif 153#endif
154 154
155 # We are going to dump something out, so make sure we print IPEND properly
156 p2.l = lo(IPEND);
157 p2.h = hi(IPEND);
158 r0 = [p2];
159 [sp + PT_IPEND] = r0;
160
155#ifdef CONFIG_HARDWARE_PM 161#ifdef CONFIG_HARDWARE_PM
156 r7 = [sp + PT_SEQSTAT]; 162 r7 = [sp + PT_SEQSTAT];
157 r7 = r7 >>> 0xe; 163 r7 = r7 >>> 0xe;
@@ -161,11 +167,6 @@ ENTRY(_evt_ivhw)
161 cc = r7 == r5; 167 cc = r7 == r5;
162 if cc jump .Lcall_do_ovf; /* deal with performance counter overflow */ 168 if cc jump .Lcall_do_ovf; /* deal with performance counter overflow */
163#endif 169#endif
164 # We are going to dump something out, so make sure we print IPEND properly
165 p2.l = lo(IPEND);
166 p2.h = hi(IPEND);
167 r0 = [p2];
168 [sp + PT_IPEND] = r0;
169 170
170 /* set the EXCAUSE to HWERR for trap_c */ 171 /* set the EXCAUSE to HWERR for trap_c */
171 r0 = [sp + PT_SEQSTAT]; 172 r0 = [sp + PT_SEQSTAT];
@@ -196,6 +197,7 @@ ENTRY(_evt_ivhw)
196#ifdef CONFIG_HARDWARE_PM 197#ifdef CONFIG_HARDWARE_PM
197.Lcall_do_ovf: 198.Lcall_do_ovf:
198 199
200 R0 = SP;
199 SP += -12; 201 SP += -12;
200 call _pm_overflow; 202 call _pm_overflow;
201 SP += 12; 203 SP += 12;
diff --git a/arch/blackfin/mach-common/irqpanic.c b/arch/blackfin/mach-common/irqpanic.c
index 606ded9ff4e1..7b69413c1556 100644
--- a/arch/blackfin/mach-common/irqpanic.c
+++ b/arch/blackfin/mach-common/irqpanic.c
@@ -139,8 +139,8 @@ asmlinkage void irq_panic(int reason, struct pt_regs *regs)
139/* 139/*
140 * call the handler of Performance overflow 140 * call the handler of Performance overflow
141 */ 141 */
142asmlinkage void pm_overflow(int irq, struct pt_regs *regs) 142asmlinkage void pm_overflow(struct pt_regs *regs)
143{ 143{
144 pm_overflow_handler(irq, regs); 144 pm_overflow_handler(regs);
145} 145}
146#endif 146#endif
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;