diff options
Diffstat (limited to 'arch/mn10300/kernel/irq.c')
-rw-r--r-- | arch/mn10300/kernel/irq.c | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/arch/mn10300/kernel/irq.c b/arch/mn10300/kernel/irq.c index 80f15725ecad..2f66a45dcd18 100644 --- a/arch/mn10300/kernel/irq.c +++ b/arch/mn10300/kernel/irq.c | |||
@@ -16,14 +16,6 @@ | |||
16 | #include <asm/setup.h> | 16 | #include <asm/setup.h> |
17 | #include <asm/serial-regs.h> | 17 | #include <asm/serial-regs.h> |
18 | 18 | ||
19 | #ifdef CONFIG_SMP | ||
20 | #undef GxICR | ||
21 | #define GxICR(X) CROSS_GxICR(X, irq_affinity_online[X]) | ||
22 | |||
23 | #undef GxICR_u8 | ||
24 | #define GxICR_u8(X) CROSS_GxICR_u8(X, irq_affinity_online[X]) | ||
25 | #endif /* CONFIG_SMP */ | ||
26 | |||
27 | unsigned long __mn10300_irq_enabled_epsw[NR_CPUS] __cacheline_aligned_in_smp = { | 19 | unsigned long __mn10300_irq_enabled_epsw[NR_CPUS] __cacheline_aligned_in_smp = { |
28 | [0 ... NR_CPUS - 1] = EPSW_IE | EPSW_IM_7 | 20 | [0 ... NR_CPUS - 1] = EPSW_IE | EPSW_IM_7 |
29 | }; | 21 | }; |
@@ -92,9 +84,11 @@ static void mn10300_cpupic_mask_ack(unsigned int irq) | |||
92 | GxICR(irq) = (tmp & GxICR_LEVEL); | 84 | GxICR(irq) = (tmp & GxICR_LEVEL); |
93 | tmp2 = GxICR(irq); | 85 | tmp2 = GxICR(irq); |
94 | 86 | ||
95 | irq_affinity_online[irq] = any_online_cpu(*irq_desc[irq].affinity); | 87 | irq_affinity_online[irq] = |
96 | GxICR(irq) = (tmp & (GxICR_LEVEL | GxICR_ENABLE)) | GxICR_DETECT; | 88 | any_online_cpu(*irq_desc[irq].affinity); |
97 | tmp = GxICR(irq); | 89 | CROSS_GxICR(irq, irq_affinity_online[irq]) = |
90 | (tmp & (GxICR_LEVEL | GxICR_ENABLE)) | GxICR_DETECT; | ||
91 | tmp = CROSS_GxICR(irq, irq_affinity_online[irq]); | ||
98 | } | 92 | } |
99 | 93 | ||
100 | arch_local_irq_restore(flags); | 94 | arch_local_irq_restore(flags); |
@@ -128,8 +122,8 @@ static void mn10300_cpupic_unmask_clear(unsigned int irq) | |||
128 | tmp = GxICR(irq); | 122 | tmp = GxICR(irq); |
129 | 123 | ||
130 | irq_affinity_online[irq] = any_online_cpu(*irq_desc[irq].affinity); | 124 | irq_affinity_online[irq] = any_online_cpu(*irq_desc[irq].affinity); |
131 | GxICR(irq) = (tmp & GxICR_LEVEL) | GxICR_ENABLE | GxICR_DETECT; | 125 | CROSS_GxICR(irq, irq_affinity_online[irq]) = (tmp & GxICR_LEVEL) | GxICR_ENABLE | GxICR_DETECT; |
132 | tmp = GxICR(irq); | 126 | tmp = CROSS_GxICR(irq, irq_affinity_online[irq]); |
133 | } | 127 | } |
134 | 128 | ||
135 | arch_local_irq_restore(flags); | 129 | arch_local_irq_restore(flags); |
@@ -217,7 +211,7 @@ static struct irq_chip mn10300_cpu_pic_level = { | |||
217 | .unmask = mn10300_cpupic_unmask_clear, | 211 | .unmask = mn10300_cpupic_unmask_clear, |
218 | #ifdef CONFIG_SMP | 212 | #ifdef CONFIG_SMP |
219 | .set_affinity = mn10300_cpupic_setaffinity, | 213 | .set_affinity = mn10300_cpupic_setaffinity, |
220 | #endif /* CONFIG_SMP */ | 214 | #endif |
221 | }; | 215 | }; |
222 | 216 | ||
223 | /* | 217 | /* |
@@ -235,7 +229,7 @@ static struct irq_chip mn10300_cpu_pic_edge = { | |||
235 | .unmask = mn10300_cpupic_unmask, | 229 | .unmask = mn10300_cpupic_unmask, |
236 | #ifdef CONFIG_SMP | 230 | #ifdef CONFIG_SMP |
237 | .set_affinity = mn10300_cpupic_setaffinity, | 231 | .set_affinity = mn10300_cpupic_setaffinity, |
238 | #endif /* CONFIG_SMP */ | 232 | #endif |
239 | }; | 233 | }; |
240 | 234 | ||
241 | /* | 235 | /* |
@@ -446,9 +440,9 @@ void migrate_irqs(void) | |||
446 | if (irq_affinity_online[irq] == self) { | 440 | if (irq_affinity_online[irq] == self) { |
447 | u16 x, tmp; | 441 | u16 x, tmp; |
448 | 442 | ||
449 | x = CROSS_GxICR(irq, self); | 443 | x = GxICR(irq); |
450 | CROSS_GxICR(irq, self) = x & GxICR_LEVEL; | 444 | GxICR(irq) = x & GxICR_LEVEL; |
451 | tmp = CROSS_GxICR(irq, self); | 445 | tmp = GxICR(irq); |
452 | 446 | ||
453 | new = any_online_cpu(irq_desc[irq].affinity); | 447 | new = any_online_cpu(irq_desc[irq].affinity); |
454 | irq_affinity_online[irq] = new; | 448 | irq_affinity_online[irq] = new; |
@@ -458,7 +452,7 @@ void migrate_irqs(void) | |||
458 | tmp = CROSS_GxICR(irq, new); | 452 | tmp = CROSS_GxICR(irq, new); |
459 | 453 | ||
460 | x &= GxICR_LEVEL | GxICR_ENABLE; | 454 | x &= GxICR_LEVEL | GxICR_ENABLE; |
461 | if (CROSS_GxICR(irq, self) & GxICR_REQUEST) | 455 | if (GxICR(irq) & GxICR_REQUEST) { |
462 | x |= GxICR_REQUEST | GxICR_DETECT; | 456 | x |= GxICR_REQUEST | GxICR_DETECT; |
463 | CROSS_GxICR(irq, new) = x; | 457 | CROSS_GxICR(irq, new) = x; |
464 | tmp = CROSS_GxICR(irq, new); | 458 | tmp = CROSS_GxICR(irq, new); |