public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RESEND PATCH 1/2] perf, cpu hotplug: Run CPU_STARTING notifiers with irqs disabled
@ 2012-10-16  7:58 Srivatsa S. Bhat
  2012-10-16  7:58 ` [RESEND PATCH 2/2] perf, cpu hotplug: Use cached value of smp_processor_id() Srivatsa S. Bhat
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Srivatsa S. Bhat @ 2012-10-16  7:58 UTC (permalink / raw)
  To: peterz, acme; +Cc: mingo, tglx, akpm, paulmck, srivatsa.bhat, linux-kernel

The CPU_STARTING notifiers are supposed to be run with irqs disabled. But the
perf_cpu_notifier() macro invokes them without doing that. Fix it.

Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
---

 include/linux/perf_event.h |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 2e90235..0647805 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -803,10 +803,13 @@ static inline void perf_event_task_tick(void)				{ }
 do {									\
 	static struct notifier_block fn##_nb __cpuinitdata =		\
 		{ .notifier_call = fn, .priority = CPU_PRI_PERF };	\
+	unsigned long flags;						\
 	fn(&fn##_nb, (unsigned long)CPU_UP_PREPARE,			\
 		(void *)(unsigned long)smp_processor_id());		\
+	local_irq_save(flags);						\
 	fn(&fn##_nb, (unsigned long)CPU_STARTING,			\
 		(void *)(unsigned long)smp_processor_id());		\
+	local_irq_restore(flags);					\
 	fn(&fn##_nb, (unsigned long)CPU_ONLINE,				\
 		(void *)(unsigned long)smp_processor_id());		\
 	register_cpu_notifier(&fn##_nb);				\


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

end of thread, other threads:[~2012-10-24  9:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-16  7:58 [RESEND PATCH 1/2] perf, cpu hotplug: Run CPU_STARTING notifiers with irqs disabled Srivatsa S. Bhat
2012-10-16  7:58 ` [RESEND PATCH 2/2] perf, cpu hotplug: Use cached value of smp_processor_id() Srivatsa S. Bhat
2012-10-16 16:32   ` Paul E. McKenney
2012-10-24  9:40   ` [tip:perf/core] " tip-bot for Srivatsa S. Bhat
2012-10-16 16:31 ` [RESEND PATCH 1/2] perf, cpu hotplug: Run CPU_STARTING notifiers with irqs disabled Paul E. McKenney
2012-10-16 16:37   ` Srivatsa S. Bhat
2012-10-16 18:34     ` Paul E. McKenney
2012-10-17  4:48       ` Srivatsa S. Bhat
2012-10-24  9:39 ` [tip:perf/core] " tip-bot for Srivatsa S. Bhat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox