Skip to contentSkip to conversation

ARM: perf: reword comments relating to perf_event_do_pending

PATCH New Will Deacon 2 participants 3 messages Aug 16, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: perf: reword comments relating to perf_event_do_pending

This is purely a cosmetic change to the ARM perf backend because the current comments about the relationship between NMIs, interrupt context and perf_event_do_pending are misleading.

This patch updates the comments so that they reflect what the code actually does (which is in line with other architectures).

---
 arch/arm/include/asm/perf_event.h |    2 +-
 arch/arm/kernel/perf_event.c      |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
arch/arm/include/asm/perf_event.h +1 -1
index 48837e6..b5799a3 100644
@@ -17,7 +17,7 @@
  * counter interrupts are regular interrupts and not an NMI. This
  * means that when we receive the interrupt we can call
  * perf_event_do_pending() that handles all of the work with
- * interrupts enabled.
+ * interrupts disabled.
  */
 static inline void
 set_perf_event_pending(void)
arch/arm/kernel/perf_event.c +4 -4
index de12536..b93a8db 100644
@@ -1041,8 +1041,8 @@ armv6pmu_handle_irq(int irq_num,
 	/*
 	 * Handle the pending perf events.
 	 *
-	 * Note: this call *must* be run with interrupts enabled. For
-	 * platforms that can have the PMU interrupts raised as a PMI, this
+	 * Note: this call *must* be run with interrupts disabled. For
+	 * platforms that can have the PMU interrupts raised as an NMI, this
 	 * will not work.
 	 */
 	perf_event_do_pending();
@@ -2017,8 +2017,8 @@ static irqreturn_t armv7pmu_handle_irq(int irq_num, void *dev)
 	/*
 	 * Handle the pending perf events.
 	 *
-	 * Note: this call *must* be run with interrupts enabled. For
-	 * platforms that can have the PMU interrupts raised as a PMI, this
+	 * Note: this call *must* be run with interrupts disabled. For
+	 * platforms that can have the PMU interrupts raised as an NMI, this
 	 * will not work.
 	 */
 	perf_event_do_pending();
Signature · 1 line
1.6.3.3
#1 lore raw

PATCH 1/1 ARM: perf: reword comments relating to perf_event_do_pending

Quoted 9 lines · Will Deacon

This is purely a cosmetic change to the ARM perf backend because the current comments about the relationship between NMIs, interrupt context and perf_event_do_pending are misleading.

This patch updates the comments so that they reflect what the code actually does (which is in line with other architectures).

Yep, that makes much more sense!

Jamie

#2 lore raw

PATCH 1/1 ARM: perf: reword comments relating to perf_event_do_pending

Hi Jamie,

Quoted 5 lines · Will Deacon
Quoted 4 lines

This is purely a cosmetic change to the ARM perf backend because the current comments about the relationship between NMIs, interrupt context and perf_event_do_pending are misleading.

Quoted 8 lines
Quoted 5 lines

This patch updates the comments so that they reflect what the code actually does (which is in line with other architectures).

Yep, that makes much more sense!

Thanks for that. We could go a step further and remove the call to perf_event_do_pending entirely because we don't have NMI and therefore never queue up any pending events. I guess the caveat here is that we might hit subtle bugs in the future if pending events are used for things other than NMI (or if somebody crazy decides to use FIQ as a PMU interrupt).

I'll leave it in for the moment and submit this patch to the system.

Cheers,

Will