diff options
author | Andrew Cooper <andrew.cooper3@citrix.com> | 2012-02-09 06:14:20 -0800 |
---|---|---|
committer | Andrew Cooper <andrew.cooper3@citrix.com> | 2012-02-09 06:14:20 -0800 |
commit | 36556194faa97929b06adf50cdd327ff5dae54e9 (patch) | |
tree | bad60cf93fd3a09451deb563714b2ac6e68f389c /xen/arch/x86/oprofile | |
parent | c15e8799eab113f28f343e68433b955ba7f77cbf (diff) | |
download | xen-36556194faa97929b06adf50cdd327ff5dae54e9.tar.gz xen-36556194faa97929b06adf50cdd327ff5dae54e9.tar.bz2 xen-36556194faa97929b06adf50cdd327ff5dae54e9.zip |
CONFIG: remove CONFIG_SMP #ifdefs
CONFIG_SMP is always enabled and !CONFIG_SMP is not supported. So
simplify the code a little by removing all #ifdefs.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/arch/x86/oprofile')
-rw-r--r-- | xen/arch/x86/oprofile/nmi_int.c | 7 | ||||
-rw-r--r-- | xen/arch/x86/oprofile/op_model_p4.c | 12 |
2 files changed, 2 insertions, 17 deletions
diff --git a/xen/arch/x86/oprofile/nmi_int.c b/xen/arch/x86/oprofile/nmi_int.c index 379046127d..774f67677f 100644 --- a/xen/arch/x86/oprofile/nmi_int.c +++ b/xen/arch/x86/oprofile/nmi_int.c @@ -304,11 +304,6 @@ static int __init p4_init(char ** cpu_type) return 0; } -#ifndef CONFIG_SMP - *cpu_type = "i386/p4", XENOPROF_CPU_TYPE_SIZE); - model = &op_p4_spec; - return 1; -#else switch (current_cpu_data.x86_num_siblings) { case 1: *cpu_type = "i386/p4"; @@ -320,7 +315,7 @@ static int __init p4_init(char ** cpu_type) model = &op_p4_ht2_spec; return 1; } -#endif + printk("Xenoprof ERROR: P4 HyperThreading detected with > 2 threads\n"); return 0; diff --git a/xen/arch/x86/oprofile/op_model_p4.c b/xen/arch/x86/oprofile/op_model_p4.c index fabff9aa0e..c9f832b3b1 100644 --- a/xen/arch/x86/oprofile/op_model_p4.c +++ b/xen/arch/x86/oprofile/op_model_p4.c @@ -40,19 +40,13 @@ static unsigned int num_counters = NUM_COUNTERS_NON_HT; kernel boot-time. */ static inline void setup_num_counters(void) { -#ifdef CONFIG_SMP if (boot_cpu_data.x86_num_siblings == 2) /* XXX */ num_counters = NUM_COUNTERS_HT2; -#endif } static int inline addr_increment(void) { -#ifdef CONFIG_SMP return boot_cpu_data.x86_num_siblings == 2 ? 2 : 1; -#else - return 1; -#endif } @@ -383,11 +377,8 @@ static const struct p4_event_binding p4_events[NUM_EVENTS] = { or "odd" part of all the divided resources. */ static unsigned int get_stagger(void) { -#ifdef CONFIG_SMP int cpu = smp_processor_id(); return (cpu != cpumask_first(per_cpu(cpu_sibling_mask, cpu))); -#endif - return 0; } @@ -709,7 +700,6 @@ static void p4_stop(struct op_msrs const * const msrs) } -#ifdef CONFIG_SMP struct op_x86_model_spec const op_p4_ht2_spec = { .num_counters = NUM_COUNTERS_HT2, .num_controls = NUM_CONTROLS_HT2, @@ -719,7 +709,7 @@ struct op_x86_model_spec const op_p4_ht2_spec = { .start = &p4_start, .stop = &p4_stop }; -#endif + struct op_x86_model_spec const op_p4_spec = { .num_counters = NUM_COUNTERS_NON_HT, |