aboutsummaryrefslogtreecommitdiffstats
path: root/bsp/qemu-ppc32/qemuppc-irq-disable-fixups.patch
blob: a8b5e05f89aca13f9939dc6c87b625d63b5f260d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From 11d9dbd47954597b215e75af246bcfeb4c0ca62e Mon Sep 17 00:00:00 2001
From: Bruce Ashfield <bruce.ashfield@windriver.com>
Date: Wed, 15 Jun 2011 16:12:17 -0400
Subject: [PATCH] qemuppc: irq disable fixups

Mapping the qemuppc interupt handling to the new interrupt
routines means that we call irq_state_clr_disabled
to enable irqs, not disable them.  So we should modify function
"irq_state_set_disabled" with our custom qemppc mods.

Signed-off-by: Liming Wang <liming.wang@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 kernel/irq/chip.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index a813b57..c997226 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -141,19 +141,17 @@ EXPORT_SYMBOL_GPL(irq_get_irq_data);
 
 static void irq_state_clr_disabled(struct irq_desc *desc)
 {
-#ifdef CONFIG_PPC_QEMU
-	struct irq_desc *desc = irq_data_to_desc(irq);
-
-	if (!(desc->status & IRQ_DELAYED_DISABLE))
-		desc->chip->mask(irq);
-#else
 	irqd_clear(&desc->irq_data, IRQD_IRQ_DISABLED);
-#endif /* CONFIG_PPC_QEMU */
 }
 
 static void irq_state_set_disabled(struct irq_desc *desc)
 {
+#ifdef CONFIG_PPC_QEMU
+	if (!(desc->status_use_accessors & IRQ_DELAYED_DISABLE))
+		desc->irq_data.chip->irq_mask(&desc->irq_data);
+#else
 	irqd_set(&desc->irq_data, IRQD_IRQ_DISABLED);
+#endif /* CONFIG_PPC_QEMU */
 }
 
 static void irq_state_clr_masked(struct irq_desc *desc)
-- 
1.7.4.1