blob: 313a04d7c009d8447b08dc198e41476b17e4e904 (
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
|
From 209ea269a862451a4bed62f2930c4ba82aaf5368 Mon Sep 17 00:00:00 2001
From: Jason Wessel <jason.wessel@windriver.com>
Date: Wed, 3 Feb 2010 13:51:19 -0500
Subject: [PATCH] qemu, powerpc: work around for qemu powerpc 32 interrupts
Workaround for QEMU powerpc 32 to force interrupt acknoledgement
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
diff --git a/arch/powerpc/platforms/qemu/Kconfig b/arch/powerpc/platforms/qemu/Kconfig
index d64ed92..366e50c 100644
--- a/arch/powerpc/platforms/qemu/Kconfig
+++ b/arch/powerpc/platforms/qemu/Kconfig
@@ -1,6 +1,6 @@
config PPC_QEMU
bool "QEMU emulated PowerPC Reference Platform (PReP) system"
- depends on PPC_MULTIPLATFORM && PPC32
+ depends on PPC32
select PPC_I8259
select PPC_INDIRECT_PCI
select PPC_UDBG_16550
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 616ec1c..4a22fa6 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -137,9 +137,18 @@ struct irq_data *irq_get_irq_data(unsigned int irq)
}
EXPORT_SYMBOL_GPL(irq_get_irq_data);
+#define IRQ_DELAYED_DISABLE 0x10000000 /* IRQ disable (masking) happens delayed. */
+
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)
|