Blackfin: merge Philippe's recent ipipe patch
authorPhilippe Gerum <rpm@xenomai.org>
Wed, 8 Apr 2009 07:41:55 +0000 (07:41 +0000)
committerMike Frysinger <vapier@gentoo.org>
Fri, 12 Jun 2009 10:03:46 +0000 (06:03 -0400)
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>
arch/blackfin/include/asm/ipipe.h
arch/blackfin/kernel/ipipe.c
arch/blackfin/mach-common/ints-priority.c

index 343b56361ec98db86252f75a3e0f01f07bbea7c1..51d0bf5e2899d4543810e344d842591057b210ee 100644 (file)
 #include <asm/atomic.h>
 #include <asm/traps.h>
 
-#define IPIPE_ARCH_STRING     "1.9-00"
+#define IPIPE_ARCH_STRING     "1.9-01"
 #define IPIPE_MAJOR_NUMBER    1
 #define IPIPE_MINOR_NUMBER    9
-#define IPIPE_PATCH_NUMBER    0
+#define IPIPE_PATCH_NUMBER    1
 
 #ifdef CONFIG_SMP
 #error "I-pipe/blackfin: SMP not implemented"
index a5de8d45424cda8b29f21d338e6224c94892cb1b..5fc424803a1788409a3b51d479c242d9ee16b6ae 100644 (file)
@@ -167,7 +167,7 @@ int __ipipe_check_root(void)
 void __ipipe_enable_irqdesc(struct ipipe_domain *ipd, unsigned irq)
 {
        struct irq_desc *desc = irq_to_desc(irq);
-       int prio = desc->ic_prio;
+       int prio = __ipipe_get_irq_priority(irq);
 
        desc->depth = 0;
        if (ipd != &ipipe_root &&
@@ -178,8 +178,7 @@ EXPORT_SYMBOL(__ipipe_enable_irqdesc);
 
 void __ipipe_disable_irqdesc(struct ipipe_domain *ipd, unsigned irq)
 {
-       struct irq_desc *desc = irq_to_desc(irq);
-       int prio = desc->ic_prio;
+       int prio = __ipipe_get_irq_priority(irq);
 
        if (ipd != &ipipe_root &&
            atomic_dec_and_test(&__ipipe_irq_lvdepth[prio]))
@@ -310,12 +309,16 @@ int ipipe_trigger_irq(unsigned irq)
 
 asmlinkage void __ipipe_sync_root(void)
 {
+       void (*irq_tail_hook)(void) = (void (*)(void))__ipipe_irq_tail_hook;
        unsigned long flags;
 
        BUG_ON(irqs_disabled());
 
        local_irq_save_hw(flags);
 
+       if (irq_tail_hook)
+               irq_tail_hook();
+
        clear_thread_flag(TIF_IRQ_SYNC);
 
        if (ipipe_root_cpudom_var(irqpend_himask) != 0)
index 3498a90979e5947a85381190373c49f206a5c222..389c5e8aa4565d3b2cb415392d03233a8326a46b 100644 (file)
@@ -1139,13 +1139,6 @@ int __init init_arch_irq(void)
        bfin_write_SIC_IWR(IWR_DISABLE_ALL);
 #endif
 
-#ifdef CONFIG_IPIPE
-       for (irq = 0; irq < NR_IRQS; irq++) {
-               struct irq_desc *desc = irq_to_desc(irq);
-               desc->ic_prio = __ipipe_get_irq_priority(irq);
-       }
-#endif /* CONFIG_IPIPE */
-
        return 0;
 }