diff options
author | Ralf Baechle <ralf@ongar.mips.com> | 2005-12-09 07:34:45 -0500 |
---|---|---|
committer | <ralf@denk.linux-mips.net> | 2006-01-10 08:39:07 -0500 |
commit | 9efeae9a5cae7e7bdacff666a1d689f5b2901c64 (patch) | |
tree | da7836d8ed54db4911aa6211a6b4408082bb0450 /arch | |
parent | ba339c03e2e8ede8ccd37ed6c4e564e3b1545495 (diff) |
MIPS: Oprofile: Print error message if the CPU happen to have no counters.
Signed-off-by: Ralf Baechle <ralf@ongar.mips.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/oprofile/op_model_mipsxx.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/mips/oprofile/op_model_mipsxx.c b/arch/mips/oprofile/op_model_mipsxx.c index a4a4aa99ab03..d97bbff031e5 100644 --- a/arch/mips/oprofile/op_model_mipsxx.c +++ b/arch/mips/oprofile/op_model_mipsxx.c | |||
@@ -180,8 +180,10 @@ static int __init mipsxx_init(void) | |||
180 | int counters; | 180 | int counters; |
181 | 181 | ||
182 | counters = n_counters(); | 182 | counters = n_counters(); |
183 | if (counters == 0) | 183 | if (counters == 0) { |
184 | printk(KERN_ERR "Oprofile: CPU has no performance counters\n"); | ||
184 | return -ENODEV; | 185 | return -ENODEV; |
186 | } | ||
185 | 187 | ||
186 | reset_counters(counters); | 188 | reset_counters(counters); |
187 | 189 | ||