aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilippe Gerum <rpm@xenomai.org>2009-04-08 03:41:55 -0400
committerMike Frysinger <vapier@gentoo.org>2009-06-12 06:03:46 -0400
commit51387009bd4d9fdbc9d4a91e45bd96cc8e3065de (patch)
tree281d370e031b5b89e913407f78998729fc5cf0dd
parentf75196c404246b371182bb7554eab695619cb36f (diff)
Blackfin: merge Philippe's recent ipipe patch
ipipe-2.6.28.9-blackfin-git95aafe6.patch Singed-off-by: Philippe Gerum <rpm@xenomai.org> Signed-off-by: Yi Li <yi.li@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r--arch/blackfin/include/asm/ipipe.h4
-rw-r--r--arch/blackfin/kernel/ipipe.c9
-rw-r--r--arch/blackfin/mach-common/ints-priority.c7
3 files changed, 8 insertions, 12 deletions
diff --git a/arch/blackfin/include/asm/ipipe.h b/arch/blackfin/include/asm/ipipe.h
index 343b56361ec9..51d0bf5e2899 100644
--- a/arch/blackfin/include/asm/ipipe.h
+++ b/arch/blackfin/include/asm/ipipe.h
@@ -35,10 +35,10 @@
35#include <asm/atomic.h> 35#include <asm/atomic.h>
36#include <asm/traps.h> 36#include <asm/traps.h>
37 37
38#define IPIPE_ARCH_STRING "1.9-00" 38#define IPIPE_ARCH_STRING "1.9-01"
39#define IPIPE_MAJOR_NUMBER 1 39#define IPIPE_MAJOR_NUMBER 1
40#define IPIPE_MINOR_NUMBER 9 40#define IPIPE_MINOR_NUMBER 9
41#define IPIPE_PATCH_NUMBER 0 41#define IPIPE_PATCH_NUMBER 1
42 42
43#ifdef CONFIG_SMP 43#ifdef CONFIG_SMP
44#error "I-pipe/blackfin: SMP not implemented" 44#error "I-pipe/blackfin: SMP not implemented"
diff --git a/arch/blackfin/kernel/ipipe.c b/arch/blackfin/kernel/ipipe.c
index a5de8d45424c..5fc424803a17 100644
--- a/arch/blackfin/kernel/ipipe.c
+++ b/arch/blackfin/kernel/ipipe.c
@@ -167,7 +167,7 @@ int __ipipe_check_root(void)
167void __ipipe_enable_irqdesc(struct ipipe_domain *ipd, unsigned irq) 167void __ipipe_enable_irqdesc(struct ipipe_domain *ipd, unsigned irq)
168{ 168{
169 struct irq_desc *desc = irq_to_desc(irq); 169 struct irq_desc *desc = irq_to_desc(irq);
170 int prio = desc->ic_prio; 170 int prio = __ipipe_get_irq_priority(irq);
171 171
172 desc->depth = 0; 172 desc->depth = 0;
173 if (ipd != &ipipe_root && 173 if (ipd != &ipipe_root &&
@@ -178,8 +178,7 @@ EXPORT_SYMBOL(__ipipe_enable_irqdesc);
178 178
179void __ipipe_disable_irqdesc(struct ipipe_domain *ipd, unsigned irq) 179void __ipipe_disable_irqdesc(struct ipipe_domain *ipd, unsigned irq)
180{ 180{
181 struct irq_desc *desc = irq_to_desc(irq); 181 int prio = __ipipe_get_irq_priority(irq);
182 int prio = desc->ic_prio;
183 182
184 if (ipd != &ipipe_root && 183 if (ipd != &ipipe_root &&
185 atomic_dec_and_test(&__ipipe_irq_lvdepth[prio])) 184 atomic_dec_and_test(&__ipipe_irq_lvdepth[prio]))
@@ -310,12 +309,16 @@ int ipipe_trigger_irq(unsigned irq)
310 309
311asmlinkage void __ipipe_sync_root(void) 310asmlinkage void __ipipe_sync_root(void)
312{ 311{
312 void (*irq_tail_hook)(void) = (void (*)(void))__ipipe_irq_tail_hook;
313 unsigned long flags; 313 unsigned long flags;
314 314
315 BUG_ON(irqs_disabled()); 315 BUG_ON(irqs_disabled());
316 316
317 local_irq_save_hw(flags); 317 local_irq_save_hw(flags);
318 318
319 if (irq_tail_hook)
320 irq_tail_hook();
321
319 clear_thread_flag(TIF_IRQ_SYNC); 322 clear_thread_flag(TIF_IRQ_SYNC);
320 323
321 if (ipipe_root_cpudom_var(irqpend_himask) != 0) 324 if (ipipe_root_cpudom_var(irqpend_himask) != 0)
diff --git a/arch/blackfin/mach-common/ints-priority.c b/arch/blackfin/mach-common/ints-priority.c
index 3498a90979e5..389c5e8aa456 100644
--- a/arch/blackfin/mach-common/ints-priority.c
+++ b/arch/blackfin/mach-common/ints-priority.c
@@ -1139,13 +1139,6 @@ int __init init_arch_irq(void)
1139 bfin_write_SIC_IWR(IWR_DISABLE_ALL); 1139 bfin_write_SIC_IWR(IWR_DISABLE_ALL);
1140#endif 1140#endif
1141 1141
1142#ifdef CONFIG_IPIPE
1143 for (irq = 0; irq < NR_IRQS; irq++) {
1144 struct irq_desc *desc = irq_to_desc(irq);
1145 desc->ic_prio = __ipipe_get_irq_priority(irq);
1146 }
1147#endif /* CONFIG_IPIPE */
1148
1149 return 0; 1142 return 0;
1150} 1143}
1151 1144