Update of DaVinci realtime patch to most recent -rt patch patch-2.6.23-rt1.

As ususal, use recent DaVinci git (2.6.23-davinci1) as starting point, then
apply patch-2.6.23-rt1 [1] ignoring conflicts, and on top of this
patch in attachment.

Cheers,

Dirk

[1] http://www.kernel.org/pub/linux/kernel/projects/rt/

Index: linux-davinci/kernel/irq/manage.c
===================================================================
--- linux-davinci.orig/kernel/irq/manage.c
+++ linux-davinci/kernel/irq/manage.c
@@ -637,6 +637,7 @@ static void thread_simple_irq(irq_desc_t
        unsigned int irq = desc - irq_desc;
        irqreturn_t action_ret;
 
+       restart:
        if (action && !desc->depth) {
                spin_unlock(&desc->lock);
                action_ret = handle_IRQ_event(irq, action);
@@ -645,6 +646,19 @@ static void thread_simple_irq(irq_desc_t
                if (!noirqdebug)
                        note_interrupt(irq, desc, action_ret);
        }
+
+       /*
+        * Some boards will disable an interrupt when it
+        * sets IRQ_PENDING . So we have to remove the flag
+        * and re-enable to handle it.
+        */
+       if (desc->status & IRQ_PENDING) {
+               desc->status &= ~IRQ_PENDING;
+               if (desc->chip)
+                       desc->chip->enable(irq);
+               goto restart;
+       }
+
        desc->status &= ~IRQ_INPROGRESS;
 }
 
Index: linux-davinci/sound/oss/davinci-audio-aic33.c
===================================================================
--- linux-davinci.orig/sound/oss/davinci-audio-aic33.c
+++ linux-davinci/sound/oss/davinci-audio-aic33.c
@@ -238,7 +238,7 @@ static audio_state_t aic33_state = {
        .hw_remove = __exit_p(davinci_aic33_remove),
        .hw_suspend = davinci_aic33_suspend,
        .hw_resume = davinci_aic33_resume,
-       .sem = __SEMAPHORE_INIT(aic33_state.sem, 1),
+       .sem = __COMPAT_SEMAPHORE_INITIALIZER(aic33_state.sem, 1),
 };
 
 /* This will be defined in the audio.h */
Index: linux-davinci/sound/oss/davinci-audio.h
===================================================================
--- linux-davinci.orig/sound/oss/davinci-audio.h
+++ linux-davinci/sound/oss/davinci-audio.h
@@ -91,7 +91,7 @@ typedef struct {
        int (*hw_suspend) (void);
        int (*hw_resume) (void);
        struct pm_dev *pm_dev;
-       struct semaphore sem;   /* to protect against races in attach() */
+       struct compat_semaphore sem;    /* to protect against races in attach() 
*/
 } audio_state_t;
 
 #ifdef AUDIO_PM
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to