diff options
Diffstat (limited to 'arch/sh/kernel/irq.c')
| -rw-r--r-- | arch/sh/kernel/irq.c | 75 | 
1 files changed, 22 insertions, 53 deletions
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c index 063af10ff3c..65a1ecd77f9 100644 --- a/arch/sh/kernel/irq.c +++ b/arch/sh/kernel/irq.c @@ -149,47 +149,32 @@ void irq_ctx_exit(int cpu)  	hardirq_ctx[cpu] = NULL;  } -asmlinkage void do_softirq(void) +void do_softirq_own_stack(void)  { -	unsigned long flags;  	struct thread_info *curctx;  	union irq_ctx *irqctx;  	u32 *isp; -	if (in_interrupt()) -		return; - -	local_irq_save(flags); - -	if (local_softirq_pending()) { -		curctx = current_thread_info(); -		irqctx = softirq_ctx[smp_processor_id()]; -		irqctx->tinfo.task = curctx->task; -		irqctx->tinfo.previous_sp = current_stack_pointer; - -		/* build the stack frame on the softirq stack */ -		isp = (u32 *)((char *)irqctx + sizeof(*irqctx)); - -		__asm__ __volatile__ ( -			"mov	r15, r9		\n" -			"jsr	@%0		\n" -			/* switch to the softirq stack */ -			" mov	%1, r15		\n" -			/* restore the thread stack */ -			"mov	r9, r15		\n" -			: /* no outputs */ -			: "r" (__do_softirq), "r" (isp) -			: "memory", "r0", "r1", "r2", "r3", "r4", -			  "r5", "r6", "r7", "r8", "r9", "r15", "t", "pr" -		); - -		/* -		 * Shouldn't happen, we returned above if in_interrupt(): -		 */ -		WARN_ON_ONCE(softirq_count()); -	} - -	local_irq_restore(flags); +	curctx = current_thread_info(); +	irqctx = softirq_ctx[smp_processor_id()]; +	irqctx->tinfo.task = curctx->task; +	irqctx->tinfo.previous_sp = current_stack_pointer; + +	/* build the stack frame on the softirq stack */ +	isp = (u32 *)((char *)irqctx + sizeof(*irqctx)); + +	__asm__ __volatile__ ( +		"mov	r15, r9		\n" +		"jsr	@%0		\n" +		/* switch to the softirq stack */ +		" mov	%1, r15		\n" +		/* restore the thread stack */ +		"mov	r9, r15		\n" +		: /* no outputs */ +		: "r" (__do_softirq), "r" (isp) +		: "memory", "r0", "r1", "r2", "r3", "r4", +		  "r5", "r6", "r7", "r8", "r9", "r15", "t", "pr" +	);  }  #else  static inline void handle_one_irq(unsigned int irq) @@ -232,19 +217,6 @@ void __init init_IRQ(void)  }  #ifdef CONFIG_HOTPLUG_CPU -static void route_irq(struct irq_data *data, unsigned int irq, unsigned int cpu) -{ -	struct irq_desc *desc = irq_to_desc(irq); -	struct irq_chip *chip = irq_data_get_irq_chip(data); - -	printk(KERN_INFO "IRQ%u: moving from cpu%u to cpu%u\n", -	       irq, data->node, cpu); - -	raw_spin_lock_irq(&desc->lock); -	chip->irq_set_affinity(data, cpumask_of(cpu), false); -	raw_spin_unlock_irq(&desc->lock); -} -  /*   * The CPU has been marked offline.  Migrate IRQs off this CPU.  If   * the affinity settings do not allow other CPUs, force them onto any @@ -265,11 +237,8 @@ void migrate_irqs(void)  						    irq, cpu);  				cpumask_setall(data->affinity); -				newcpu = cpumask_any_and(data->affinity, -							 cpu_online_mask);  			} - -			route_irq(data, irq, newcpu); +			irq_set_affinity(irq, data->affinity);  		}  	}  }  | 
