]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/kernel/irq.c
ALSA: make snd_ac97_add_vmaster() static
[linux-2.6-omap-h63xx.git] / arch / powerpc / kernel / irq.c
index 425616f92d18a6b94ab94aad0f22634a043b0cb6..dcc946e670991c7f972141ee162b814789fd4435 100644 (file)
@@ -98,7 +98,7 @@ EXPORT_SYMBOL(irq_desc);
 
 int distribute_irqs = 1;
 
-static inline unsigned long get_hard_enabled(void)
+static inline notrace unsigned long get_hard_enabled(void)
 {
        unsigned long enabled;
 
@@ -108,13 +108,13 @@ static inline unsigned long get_hard_enabled(void)
        return enabled;
 }
 
-static inline void set_soft_enabled(unsigned long enable)
+static inline notrace void set_soft_enabled(unsigned long enable)
 {
        __asm__ __volatile__("stb %0,%1(13)"
        : : "r" (enable), "i" (offsetof(struct paca_struct, soft_enabled)));
 }
 
-void raw_local_irq_restore(unsigned long en)
+notrace void raw_local_irq_restore(unsigned long en)
 {
        /*
         * get_paca()->soft_enabled = en;
@@ -307,6 +307,7 @@ void do_IRQ(struct pt_regs *regs)
                if (curtp != irqtp) {
                        struct irq_desc *desc = irq_desc + irq;
                        void *handler = desc->handle_irq;
+                       unsigned long saved_sp_limit = current->thread.ksp_limit;
                        if (handler == NULL)
                                handler = &__do_IRQ;
                        irqtp->task = curtp->task;
@@ -319,7 +320,10 @@ void do_IRQ(struct pt_regs *regs)
                                (irqtp->preempt_count & ~SOFTIRQ_MASK) |
                                (curtp->preempt_count & SOFTIRQ_MASK);
 
+                       current->thread.ksp_limit = (unsigned long)irqtp +
+                               _ALIGN_UP(sizeof(struct thread_info), 16);
                        call_handle_irq(irq, desc, irqtp, handler);
+                       current->thread.ksp_limit = saved_sp_limit;
                        irqtp->task = NULL;
 
 
@@ -352,9 +356,7 @@ void __init init_IRQ(void)
 {
        if (ppc_md.init_IRQ)
                ppc_md.init_IRQ();
-#ifdef CONFIG_PPC64
        irq_ctx_init();
-#endif
 }
 
 
@@ -383,11 +385,15 @@ void irq_ctx_init(void)
 static inline void do_softirq_onstack(void)
 {
        struct thread_info *curtp, *irqtp;
+       unsigned long saved_sp_limit = current->thread.ksp_limit;
 
        curtp = current_thread_info();
        irqtp = softirq_ctx[smp_processor_id()];
        irqtp->task = curtp->task;
+       current->thread.ksp_limit = (unsigned long)irqtp +
+                                   _ALIGN_UP(sizeof(struct thread_info), 16);
        call_do_softirq(irqtp);
+       current->thread.ksp_limit = saved_sp_limit;
        irqtp->task = NULL;
 }
 
@@ -1067,7 +1073,7 @@ static const struct file_operations virq_debug_fops = {
 static int __init irq_debugfs_init(void)
 {
        if (debugfs_create_file("virq_mapping", S_IRUGO, powerpc_debugfs_root,
-                                NULL, &virq_debug_fops))
+                                NULL, &virq_debug_fops) == NULL)
                return -ENOMEM;
 
        return 0;