From patchwork Thu Sep 30 01:26:41 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: kyle mcmartin X-Patchwork-Id: 218422 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8U1RITW017651 for ; Thu, 30 Sep 2010 01:27:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752379Ab0I3B0t (ORCPT ); Wed, 29 Sep 2010 21:26:49 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:49421 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751857Ab0I3B0s (ORCPT ); Wed, 29 Sep 2010 21:26:48 -0400 Received: from kyle by bombadil.infradead.org with local (Exim 4.72 #1 (Red Hat Linux)) id 1P17uz-00053Z-JN; Thu, 30 Sep 2010 01:26:41 +0000 Date: Wed, 29 Sep 2010 21:26:41 -0400 From: Kyle McMartin To: Thomas Gleixner Cc: LKML , Linus Torvalds , Andrew Morton , Ingo Molnar , Peter Zijlstra , Christoph Hellwig , linux-alpha@vger.kernel.org, linux-cris-kernel@axis.com, Haavard Skinnemoen , Tony Luck , linux-ia64@vger.kernel.org, Yoshinori Sato , Hirokazu Takata , Greg Ungerer , Jeff Dike , linux-parisc@vger.kernel.org, Chris Zankel , linux-arch@vger.kernel.org, starvik@axis.com, jesper.nilsson@axis.com Subject: Re: [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Message-ID: <20100930012641.GA2604@bombadil.infradead.org> References: <20100908152036.643594727@linutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20100908152036.643594727@linutronix.de> User-Agent: Mutt/1.5.20 (2009-08-17) Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 30 Sep 2010 01:27:18 +0000 (UTC) diff --git a/arch/cris/arch-v10/kernel/irq.c b/arch/cris/arch-v10/kernel/irq.c index a0c0df8..07f17ce 100644 --- a/arch/cris/arch-v10/kernel/irq.c +++ b/arch/cris/arch-v10/kernel/irq.c @@ -104,16 +104,6 @@ static void (*interrupt[NR_IRQS])(void) = { IRQ31_interrupt }; -static void enable_crisv10_irq(unsigned int irq); - -static unsigned int startup_crisv10_irq(unsigned int irq) -{ - enable_crisv10_irq(irq); - return 0; -} - -#define shutdown_crisv10_irq disable_crisv10_irq - static void enable_crisv10_irq(unsigned int irq) { crisv10_unmask_irq(irq); @@ -124,22 +114,16 @@ static void disable_crisv10_irq(unsigned int irq) crisv10_mask_irq(irq); } -static void ack_crisv10_irq(unsigned int irq) -{ -} - -static void end_crisv10_irq(unsigned int irq) +static void crisv10_noop(unsigned int irq) { } static struct irq_chip crisv10_irq_type = { .name = "CRISv10", - .startup = startup_crisv10_irq, - .shutdown = shutdown_crisv10_irq, - .enable = enable_crisv10_irq, + .unmask = enable_crisv10_irq, + .mask = disable_crisv10_irq, .disable = disable_crisv10_irq, - .ack = ack_crisv10_irq, - .end = end_crisv10_irq, + .ack = crisv10_noop, .set_affinity = NULL }; @@ -221,7 +205,7 @@ init_IRQ(void) /* Initialize IRQ handler descriptors. */ for(i = 2; i < NR_IRQS; i++) { - irq_desc[i].chip = &crisv10_irq_type; + set_irq_chip_and_handler(i, &crisv10_irq_type, handle_simple_irq); set_int_vector(i, interrupt[i]); } diff --git a/arch/cris/arch-v32/kernel/irq.c b/arch/cris/arch-v32/kernel/irq.c index 2ed48ae..2efc98c 100644 --- a/arch/cris/arch-v32/kernel/irq.c +++ b/arch/cris/arch-v32/kernel/irq.c @@ -290,36 +290,6 @@ void crisv32_unmask_irq(int irq) unblock_irq(irq, irq_cpu(irq)); } - -static unsigned int startup_crisv32_irq(unsigned int irq) -{ - crisv32_unmask_irq(irq); - return 0; -} - -static void shutdown_crisv32_irq(unsigned int irq) -{ - crisv32_mask_irq(irq); -} - -static void enable_crisv32_irq(unsigned int irq) -{ - crisv32_unmask_irq(irq); -} - -static void disable_crisv32_irq(unsigned int irq) -{ - crisv32_mask_irq(irq); -} - -static void ack_crisv32_irq(unsigned int irq) -{ -} - -static void end_crisv32_irq(unsigned int irq) -{ -} - int set_affinity_crisv32_irq(unsigned int irq, const struct cpumask *dest) { unsigned long flags; @@ -330,14 +300,16 @@ int set_affinity_crisv32_irq(unsigned int irq, const struct cpumask *dest) return 0; } +static void crisv32_noop(unsigned int irq) +{ +} + static struct irq_chip crisv32_irq_type = { .name = "CRISv32", - .startup = startup_crisv32_irq, - .shutdown = shutdown_crisv32_irq, - .enable = enable_crisv32_irq, - .disable = disable_crisv32_irq, - .ack = ack_crisv32_irq, - .end = end_crisv32_irq, + .mask = crisv32_mask_irq, + .disable = crisv32_mask_irq, + .unmask = crisv32_unmask_irq, + .ack = crisv32_noop, .set_affinity = set_affinity_crisv32_irq }; @@ -472,15 +444,18 @@ init_IRQ(void) /* Point all IRQ's to bad handlers. */ for (i = FIRST_IRQ, j = 0; j < NR_IRQS; i++, j++) { - irq_desc[j].chip = &crisv32_irq_type; + set_irq_chip_and_handler(j, &crisv32_irq_type, + handle_simple_irq); set_exception_vector(i, interrupt[j]); } /* Mark Timer and IPI IRQs as CPU local */ irq_allocations[TIMER0_INTR_VECT - FIRST_IRQ].cpu = CPU_FIXED; irq_desc[TIMER0_INTR_VECT].status |= IRQ_PER_CPU; + set_irq_handler(TIMER0_INTR_VECT, handle_percpu_irq); irq_allocations[IPI_INTR_VECT - FIRST_IRQ].cpu = CPU_FIXED; irq_desc[IPI_INTR_VECT].status |= IRQ_PER_CPU; + set_irq_handler(IPI_INTR_VECT, handle_percpu_irq); set_exception_vector(0x00, nmi_interrupt); set_exception_vector(0x30, multiple_interrupt); diff --git a/arch/cris/kernel/irq.c b/arch/cris/kernel/irq.c index 469f7f9..14d9ce9 100644 --- a/arch/cris/kernel/irq.c +++ b/arch/cris/kernel/irq.c @@ -93,7 +93,7 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs) printk("do_IRQ: stack overflow: %lX\n", sp); show_stack(NULL, (unsigned long *)sp); } - __do_IRQ(irq); + generic_handle_irq(irq); irq_exit(); set_irq_regs(old_regs); }