From 4e518950b8955c55a9dde06968f84b5f927ee7b1 Mon Sep 17 00:00:00 2001 From: Robert Richter Date: Mon, 6 Jul 2009 14:43:55 +0200 Subject: [PATCH] --- yaml --- r: 158239 b: refs/heads/master c: 52471c67ee2fa5ed6f700ef57bf27833c63b2192 h: refs/heads/master i: 158237: d58deebe0e57a1482315d56388a7930d646cc28f 158235: b680674f3ef11aa4fa91a08a6cb977df159f8c49 158231: 4a74463278f59c2437dd5cbe0d1e9aacd991d791 158223: f673fe11a88e2495a8e732ed85b9db1b4dc088ea 158207: 09c818ffd82f75cdad1376b6f2cbc9b05d5de57e v: v3 --- [refs] | 2 +- trunk/arch/x86/oprofile/nmi_int.c | 3 +++ trunk/arch/x86/oprofile/op_model_p4.c | 2 -- trunk/arch/x86/oprofile/op_model_ppro.c | 1 - 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index c254ae56feb4..855a7d262263 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2904a527575344a804fdd82b1f8d09a8731d8d49 +refs/heads/master: 52471c67ee2fa5ed6f700ef57bf27833c63b2192 diff --git a/trunk/arch/x86/oprofile/nmi_int.c b/trunk/arch/x86/oprofile/nmi_int.c index 826f391b4229..82ee29517f16 100644 --- a/trunk/arch/x86/oprofile/nmi_int.c +++ b/trunk/arch/x86/oprofile/nmi_int.c @@ -674,6 +674,9 @@ int __init op_nmi_init(struct oprofile_operations *ops) if (ret) return ret; + if (!model->num_virt_counters) + model->num_virt_counters = model->num_counters; + init_sysfs(); using_nmi = 1; printk(KERN_INFO "oprofile: using NMI interrupt.\n"); diff --git a/trunk/arch/x86/oprofile/op_model_p4.c b/trunk/arch/x86/oprofile/op_model_p4.c index 0a4f2deb9e8f..ac6b354becdf 100644 --- a/trunk/arch/x86/oprofile/op_model_p4.c +++ b/trunk/arch/x86/oprofile/op_model_p4.c @@ -698,7 +698,6 @@ static void p4_shutdown(struct op_msrs const * const msrs) struct op_x86_model_spec op_p4_ht2_spec = { .num_counters = NUM_COUNTERS_HT2, .num_controls = NUM_CONTROLS_HT2, - .num_virt_counters = NUM_COUNTERS_HT2, .fill_in_addresses = &p4_fill_in_addresses, .setup_ctrs = &p4_setup_ctrs, .check_ctrs = &p4_check_ctrs, @@ -711,7 +710,6 @@ struct op_x86_model_spec op_p4_ht2_spec = { struct op_x86_model_spec op_p4_spec = { .num_counters = NUM_COUNTERS_NON_HT, .num_controls = NUM_CONTROLS_NON_HT, - .num_virt_counters = NUM_COUNTERS_NON_HT, .fill_in_addresses = &p4_fill_in_addresses, .setup_ctrs = &p4_setup_ctrs, .check_ctrs = &p4_check_ctrs, diff --git a/trunk/arch/x86/oprofile/op_model_ppro.c b/trunk/arch/x86/oprofile/op_model_ppro.c index 753a02ab215b..4899215999de 100644 --- a/trunk/arch/x86/oprofile/op_model_ppro.c +++ b/trunk/arch/x86/oprofile/op_model_ppro.c @@ -206,7 +206,6 @@ static void ppro_shutdown(struct op_msrs const * const msrs) struct op_x86_model_spec op_ppro_spec = { .num_counters = 2, .num_controls = 2, - .num_virt_counters = 2, .reserved = MSR_PPRO_EVENTSEL_RESERVED, .fill_in_addresses = &ppro_fill_in_addresses, .setup_ctrs = &ppro_setup_ctrs,