瀏覽代碼

MIPS: Oprofile: Print error message if the CPU happen to have no counters.

Signed-off-by: Ralf Baechle <ralf@ongar.mips.com>

Ralf Baechle 19 年之前
父節點
當前提交
9efeae9a5c
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      arch/mips/oprofile/op_model_mipsxx.c

+ 3 - 1
arch/mips/oprofile/op_model_mipsxx.c

@@ -180,8 +180,10 @@ static int __init mipsxx_init(void)
 	int counters;
 	int counters;
 
 
 	counters = n_counters();
 	counters = n_counters();
-	if (counters == 0)
+	if (counters == 0) {
+		printk(KERN_ERR "Oprofile: CPU has no performance counters\n");
 		return -ENODEV;
 		return -ENODEV;
+	}
 
 
 	reset_counters(counters);
 	reset_counters(counters);