aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/oprofile/op_model_p4.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/oprofile/op_model_p4.c')
-rw-r--r--arch/x86/oprofile/op_model_p4.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/x86/oprofile/op_model_p4.c b/arch/x86/oprofile/op_model_p4.c
index 7cc80df330d5..182558dd5515 100644
--- a/arch/x86/oprofile/op_model_p4.c
+++ b/arch/x86/oprofile/op_model_p4.c
@@ -404,7 +404,7 @@ static void p4_shutdown(struct op_msrs const * const msrs)
404 } 404 }
405} 405}
406 406
407static void p4_fill_in_addresses(struct op_msrs * const msrs) 407static int p4_fill_in_addresses(struct op_msrs * const msrs)
408{ 408{
409 unsigned int i; 409 unsigned int i;
410 unsigned int addr, cccraddr, stag; 410 unsigned int addr, cccraddr, stag;
@@ -486,6 +486,18 @@ static void p4_fill_in_addresses(struct op_msrs * const msrs)
486 msrs->controls[i++].addr = MSR_P4_CRU_ESCR5; 486 msrs->controls[i++].addr = MSR_P4_CRU_ESCR5;
487 } 487 }
488 } 488 }
489
490 for (i = 0; i < num_counters; ++i) {
491 if (!counter_config[i].enabled)
492 continue;
493 if (msrs->controls[i].addr)
494 continue;
495 op_x86_warn_reserved(i);
496 p4_shutdown(msrs);
497 return -EBUSY;
498 }
499
500 return 0;
489} 501}
490 502
491 503