linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] oprofile: Disable oprofile NMI timer on ppc64
@ 2015-04-09  2:52 Anton Blanchard
  2015-04-09  2:52 ` [PATCH 2/2] powerpc: Add ppc64 hard lockup detector support Anton Blanchard
  2015-04-09  5:43 ` [PATCH 1/2] oprofile: Disable oprofile NMI timer on ppc64 Robert Richter
  0 siblings, 2 replies; 8+ messages in thread
From: Anton Blanchard @ 2015-04-09  2:52 UTC (permalink / raw)
  To: benh, paulus, mpe, rric; +Cc: linuxppc-dev, oprofile-list

We want to enable the hard lockup detector on ppc64, but right now
that enables the oprofile NMI timer too.

We'd prefer not to enable the oprofile NMI timer, it adds another
element to our PMU testing and it requires us to increase our
exported symbols (eg cpu_khz).

Modify the config entry for OPROFILE_NMI_TIMER to disable it on PPC64.

Signed-off-by: Anton Blanchard <anton@samba.org>
---
 arch/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/Kconfig b/arch/Kconfig
index 05d7a8a..0cc605d 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -32,7 +32,7 @@ config HAVE_OPROFILE
 
 config OPROFILE_NMI_TIMER
 	def_bool y
-	depends on PERF_EVENTS && HAVE_PERF_EVENTS_NMI
+	depends on PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !PPC64
 
 config KPROBES
 	bool "Kprobes"
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH 1/2] oprofile: Add HAVE_OPROFILE_NMI_TIMER
@ 2015-01-21  3:46 Anton Blanchard
  2015-01-21  3:46 ` [PATCH 2/2] powerpc: Add ppc64 hard lockup detector support Anton Blanchard
  0 siblings, 1 reply; 8+ messages in thread
From: Anton Blanchard @ 2015-01-21  3:46 UTC (permalink / raw)
  To: benh, paulus, mpe, rric; +Cc: linuxppc-dev, oprofile-list

HAVE_PERF_EVENTS_NMI is used for two things - the oprofile NMI timer
and the hardlockup detector.

Create HAVE_OPROFILE_NMI_TIMER so an architecture can select them
separately. On ppc64 we want to add the hardlockup detector, but not
the oprofile NMI timer fallback.

Signed-off-by: Anton Blanchard <anton@samba.org>
---
 arch/Kconfig     | 5 ++++-
 arch/x86/Kconfig | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/Kconfig b/arch/Kconfig
index 05d7a8a..3d50e42 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -30,9 +30,12 @@ config OPROFILE_EVENT_MULTIPLEX
 config HAVE_OPROFILE
 	bool
 
+config HAVE_OPROFILE_NMI_TIMER
+	bool
+
 config OPROFILE_NMI_TIMER
 	def_bool y
-	depends on PERF_EVENTS && HAVE_PERF_EVENTS_NMI
+	depends on PERF_EVENTS && HAVE_OPROFILE_NMI_TIMER
 
 config KPROBES
 	bool "Kprobes"
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index ba397bd..98d9c72 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -138,6 +138,7 @@ config X86
 	select HAVE_ACPI_APEI_NMI if ACPI
 	select ACPI_LEGACY_TABLES_LOOKUP if ACPI
 	select X86_FEATURE_NAMES if PROC_FS
+	select HAVE_OPROFILE_NMI_TIMER
 
 config INSTRUCTION_DECODER
 	def_bool y
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH 1/2] powerpc: Hard disable interrupts in xmon
@ 2014-08-05  4:55 Anton Blanchard
  2014-08-05  4:56 ` [PATCH 2/2] powerpc: Add ppc64 hard lockup detector support Anton Blanchard
  0 siblings, 1 reply; 8+ messages in thread
From: Anton Blanchard @ 2014-08-05  4:55 UTC (permalink / raw)
  To: benh, paulus, mpe, paulmck; +Cc: linuxppc-dev

xmon only soft disables interrupts. This seems like a bad idea - we
certainly don't want decrementer and PMU exceptions going off when
we are debugging something inside xmon.

This issue was uncovered when the hard lockup detector went off
inside xmon. To ensure we wont get a spurious hard lockup warning,
I also call touch_nmi_watchdog() when exiting xmon.

Signed-off-by: Anton Blanchard <anton@samba.org>
---

Index: b/arch/powerpc/xmon/xmon.c
===================================================================
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -24,6 +24,7 @@
 #include <linux/interrupt.h>
 #include <linux/irq.h>
 #include <linux/bug.h>
+#include <linux/nmi.h>
 
 #include <asm/ptrace.h>
 #include <asm/string.h>
@@ -374,6 +375,7 @@ static int xmon_core(struct pt_regs *reg
 #endif
 
 	local_irq_save(flags);
+	hard_irq_disable();
 
 	bp = in_breakpoint_table(regs->nip, &offset);
 	if (bp != NULL) {
@@ -558,6 +560,7 @@ static int xmon_core(struct pt_regs *reg
 #endif
 	insert_cpu_bpts();
 
+	touch_nmi_watchdog();
 	local_irq_restore(flags);
 
 	return cmd != 'X' && cmd != EOF;

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-04-09 23:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-09  2:52 [PATCH 1/2] oprofile: Disable oprofile NMI timer on ppc64 Anton Blanchard
2015-04-09  2:52 ` [PATCH 2/2] powerpc: Add ppc64 hard lockup detector support Anton Blanchard
2015-04-09 23:48   ` Scott Wood
2015-04-09  5:43 ` [PATCH 1/2] oprofile: Disable oprofile NMI timer on ppc64 Robert Richter
  -- strict thread matches above, loose matches on Subject: below --
2015-01-21  3:46 [PATCH 1/2] oprofile: Add HAVE_OPROFILE_NMI_TIMER Anton Blanchard
2015-01-21  3:46 ` [PATCH 2/2] powerpc: Add ppc64 hard lockup detector support Anton Blanchard
2014-08-05  4:55 [PATCH 1/2] powerpc: Hard disable interrupts in xmon Anton Blanchard
2014-08-05  4:56 ` [PATCH 2/2] powerpc: Add ppc64 hard lockup detector support Anton Blanchard
2014-08-11 23:31   ` Anton Blanchard
2014-08-11 23:42     ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).