Thread (10 messages) flat view 10 messages, 2 authors, 2012-07-17
STALE5134d

[RFC PATCH 3/4] ARM: arch_timers: give the virtual timer its own interrupt handler

From: Marc Zyngier <hidden>
Date: 2012-07-06 09:20:21
Subsystem: arm port, the rest · Maintainers: Russell King, Linus Torvalds

In order to prepare for the timer interrupt offloading to the hypervisor,
give the virtual timer its own interrupt handler.

Signed-off-by: Marc Zyngier <redacted>
---
 arch/arm/kernel/arch_timer.c |    8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/arch/arm/kernel/arch_timer.c b/arch/arm/kernel/arch_timer.c
index 2b5da66..4473f66 100644
--- a/arch/arm/kernel/arch_timer.c
+++ b/arch/arm/kernel/arch_timer.c
@@ -202,6 +202,11 @@ static irqreturn_t arch_timer_handler(int irq, void *dev_id)
 	return IRQ_NONE;
 }
 
+static irqreturn_t arch_timer_virt_handler(int irq, void *dev_id)
+{
+	return arch_timer_handler(irq, dev_id);
+}
+
 static void arch_timer_disable(void)
 {
 	unsigned long ctrl;
@@ -408,6 +413,9 @@ static int __init arch_timer_register(void)
 		if (!arch_timer_ppi[i])
 			continue;
 
+		if (i == VIRT_PPI)
+			handler = arch_timer_virt_handler;
+
 		err = request_percpu_irq(arch_timer_ppi[i], handler,
 					 "arch_timer", arch_timer_evt);
 		if (err) {
-- 
1.7.10.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help