aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-03 14:51:22 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-03 14:51:22 -0500
commit03ed6a3aa600c48593c3984812fda2d5945ddb46 (patch)
tree03d1357411424514943deffadbb9f287288998bd
parent4c37a4b53de2d08c469a6e4304cf2a17178200aa (diff)
parenta0a2b71bb750ffe9b3faa317cb6317f4ad109383 (diff)
Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: perf: Fix callchain hit bad cast on ascii display arch/x86/oprofile/op_model_amd.c: Perform initialisation on a single CPU watchdog: Improve initialisation error message and documentation
-rw-r--r--Documentation/kernel-parameters.txt2
-rw-r--r--arch/x86/oprofile/op_model_amd.c24
-rw-r--r--kernel/watchdog.c3
-rw-r--r--tools/perf/util/hist.c2
4 files changed, 20 insertions, 11 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 8b61c9360999..01ece1b9213e 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -1759,7 +1759,7 @@ and is between 256 and 4096 characters. It is defined in the file
1759 1759
1760 nousb [USB] Disable the USB subsystem 1760 nousb [USB] Disable the USB subsystem
1761 1761
1762 nowatchdog [KNL] Disable the lockup detector. 1762 nowatchdog [KNL] Disable the lockup detector (NMI watchdog).
1763 1763
1764 nowb [ARM] 1764 nowb [ARM]
1765 1765
diff --git a/arch/x86/oprofile/op_model_amd.c b/arch/x86/oprofile/op_model_amd.c
index a011bcc0f943..7d90d47655ba 100644
--- a/arch/x86/oprofile/op_model_amd.c
+++ b/arch/x86/oprofile/op_model_amd.c
@@ -630,21 +630,29 @@ static int __init_ibs_nmi(void)
630 return 0; 630 return 0;
631} 631}
632 632
633/* initialize the APIC for the IBS interrupts if available */ 633/*
634 * check and reserve APIC extended interrupt LVT offset for IBS if
635 * available
636 *
637 * init_ibs() preforms implicitly cpu-local operations, so pin this
638 * thread to its current CPU
639 */
640
634static void init_ibs(void) 641static void init_ibs(void)
635{ 642{
636 ibs_caps = get_ibs_caps(); 643 preempt_disable();
637 644
645 ibs_caps = get_ibs_caps();
638 if (!ibs_caps) 646 if (!ibs_caps)
639 return; 647 goto out;
640 648
641 if (__init_ibs_nmi()) { 649 if (__init_ibs_nmi() < 0)
642 ibs_caps = 0; 650 ibs_caps = 0;
643 return; 651 else
644 } 652 printk(KERN_INFO "oprofile: AMD IBS detected (0x%08x)\n", ibs_caps);
645 653
646 printk(KERN_INFO "oprofile: AMD IBS detected (0x%08x)\n", 654out:
647 (unsigned)ibs_caps); 655 preempt_enable();
648} 656}
649 657
650static int (*create_arch_files)(struct super_block *sb, struct dentry *root); 658static int (*create_arch_files)(struct super_block *sb, struct dentry *root);
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 6e3c41a4024c..5b082156cd21 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -364,7 +364,8 @@ static int watchdog_nmi_enable(int cpu)
364 goto out_save; 364 goto out_save;
365 } 365 }
366 366
367 printk(KERN_ERR "NMI watchdog failed to create perf event on cpu%i: %p\n", cpu, event); 367 printk(KERN_ERR "NMI watchdog disabled for cpu%i: unable to create perf event: %ld\n",
368 cpu, PTR_ERR(event));
368 return PTR_ERR(event); 369 return PTR_ERR(event);
369 370
370 /* success path */ 371 /* success path */
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 2022e8740994..76bcc35cf9b1 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -356,7 +356,7 @@ static size_t ipchain__fprintf_graph_line(FILE *fp, int depth, int depth_mask,
356 356
357static size_t ipchain__fprintf_graph(FILE *fp, struct callchain_list *chain, 357static size_t ipchain__fprintf_graph(FILE *fp, struct callchain_list *chain,
358 int depth, int depth_mask, int period, 358 int depth, int depth_mask, int period,
359 u64 total_samples, int hits, 359 u64 total_samples, u64 hits,
360 int left_margin) 360 int left_margin)
361{ 361{
362 int i; 362 int i;