aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/oprofile
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-01-05 08:22:08 -0500
committerIngo Molnar <mingo@elte.hu>2011-01-05 08:22:10 -0500
commitaef1b9cef78ae65c6501850851cc3f61f9be477b (patch)
tree9769972983e84620df17c13b73f70a8341c4b125 /arch/x86/oprofile
parent20c457b8587bee4644d998331d9e13be82e05b4c (diff)
parent3c0eee3fe6a3a1c745379547c7e7c904aa64f6d5 (diff)
Merge commit 'v2.6.37' into perf/core
Merge reason: Add the final .37 tree. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/oprofile')
-rw-r--r--arch/x86/oprofile/op_model_amd.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/arch/x86/oprofile/op_model_amd.c b/arch/x86/oprofile/op_model_amd.c
index f2984d43a6b3..51104b33fd51 100644
--- a/arch/x86/oprofile/op_model_amd.c
+++ b/arch/x86/oprofile/op_model_amd.c
@@ -637,21 +637,29 @@ static int __init_ibs_nmi(void)
637 return 0; 637 return 0;
638} 638}
639 639
640/* initialize the APIC for the IBS interrupts if available */ 640/*
641 * check and reserve APIC extended interrupt LVT offset for IBS if
642 * available
643 *
644 * init_ibs() preforms implicitly cpu-local operations, so pin this
645 * thread to its current CPU
646 */
647
641static void init_ibs(void) 648static void init_ibs(void)
642{ 649{
643 ibs_caps = get_ibs_caps(); 650 preempt_disable();
644 651
652 ibs_caps = get_ibs_caps();
645 if (!ibs_caps) 653 if (!ibs_caps)
646 return; 654 goto out;
647 655
648 if (__init_ibs_nmi()) { 656 if (__init_ibs_nmi() < 0)
649 ibs_caps = 0; 657 ibs_caps = 0;
650 return; 658 else
651 } 659 printk(KERN_INFO "oprofile: AMD IBS detected (0x%08x)\n", ibs_caps);
652 660
653 printk(KERN_INFO "oprofile: AMD IBS detected (0x%08x)\n", 661out:
654 (unsigned)ibs_caps); 662 preempt_enable();
655} 663}
656 664
657static int (*create_arch_files)(struct super_block *sb, struct dentry *root); 665static int (*create_arch_files)(struct super_block *sb, struct dentry *root);