[patch 1/9] IRQ handle prepare for instrumentation

Mathieu Desnoyers
2009-03-24T16:24:45Z

[-- Attachment #1: irq-handle-prepare-for-instrumentation.patch --]
[-- Type: text/plain, Size: 2348 bytes --]

Rename handle_IRQ_event to _handle_IRQ_event and declare it static so it can be
embedded in its caller. Create a handle_IRQ_event wrapper (non-static) to still
show the symbol to arch-specific code still using it.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
---
kernel/irq/handle.c | 25 +++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)

Index: linux-2.6-lttng/kernel/irq/handle.c
===================================================================
--- linux-2.6-lttng.orig/kernel/irq/handle.c 2009-01-30 09:47:59.000000000 -0500
+++ linux-2.6-lttng/kernel/irq/handle.c 2009-01-30 10:38:14.000000000 -0500
@@ -316,14 +316,7 @@ irqreturn_t no_action(int cpl, void *dev
return IRQ_NONE;
}

-/**
- * handle_IRQ_event - irq action chain handler
- * @irq: the interrupt number
- * @action: the interrupt action chain for this irq
- *
- * Handles the action chain of an irq event
- */
-irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action)
+static irqreturn_t _handle_IRQ_event(unsigned int irq, struct irqaction *action)
{
irqreturn_t ret, retval = IRQ_NONE;
unsigned int status = 0;
@@ -346,6 +339,18 @@ irqreturn_t handle_IRQ_event(unsigned in
return retval;
}

+/**
+ * handle_IRQ_event - irq action chain handler
+ * @irq: the interrupt number
+ * @action: the interrupt action chain for this irq
+ *
+ * Handles the action chain of an irq event
+ */
+irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action)
+{
+ return _handle_IRQ_event(irq, action);
+}
+
#ifndef CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ
/**
* __do_IRQ - original all in one highlevel IRQ handler
@@ -378,7 +383,7 @@ unsigned int __do_IRQ(unsigned int irq)
desc = irq_remap_to_desc(irq, desc);
}
if (likely(!(desc->status & IRQ_DISABLED))) {
- action_ret = handle_IRQ_event(irq, desc->action);
+ action_ret = _handle_IRQ_event(irq, desc->action);
if (!noirqdebug)
note_interrupt(irq, desc, action_ret);
}
@@ -434,7 +439,7 @@ unsigned int __do_IRQ(unsigned int irq)

spin_unlock(&desc->lock);

- action_ret = handle_IRQ_event(irq, action);
+ action_ret = _handle_IRQ_event(irq, action);
if (!noirqdebug)
note_interrupt(irq, desc, action_ret);

--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68