linux-alpha.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kyle McMartin <kyle@mcmartin.ca>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>,
	Christoph Hellwig <hch@infradead.org>,
	linux-alpha@vger.kernel.org, linux-cris-kernel@axis.com,
	Haavard Skinnemoen <hskinnemoen@atmel.com>,
	Tony Luck <tony.luck@intel.com>,
	linux-ia64@vger.kernel.org,
	Yoshinori Sato <ysato@users.sourceforge.jp>,
	Hirokazu Takata <takata@linux-m32r.org>,
	Greg Ungerer <gerg@uclinux.org>, Jeff Dike <jdike@addtoit.com>,
	linux-parisc@vger.kernel.org, Chris Zankel <chris@zankel.net>,
	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
Date: Wed, 29 Sep 2010 21:26:41 -0400	[thread overview]
Message-ID: <20100930012641.GA2604@bombadil.infradead.org> (raw)
In-Reply-To: <20100908152036.643594727@linutronix.de>

On Wed, Sep 08, 2010 at 06:14:14PM -0000, Thomas Gleixner wrote:
> __do_IRQ() has been deprecated after a two years migration phase in
> commit 0e57aa1. Since then another 18 month have gone by.
> 
>  The following architectures are still using __do_IRQ():
> 
>   alpha, cris, ia64, h8300, m32r, m68knommu, parisc, um
> 
> So now the question arises what to do with __do_IRQ().
> 

In penance while I finish testing what I can on parisc this week
(conversion is done, I just need to find time to plug in ancient crap
 and see if it still handles interrupts...) I've killed __do_IRQ on
cris. Sort of. I have no idea if it builds or anything, but it was
pretty low-hanging fruit since it does all its own masking in its
entry point, so as near as I can tell, aside from disabling spurious
irqs, none of the irq_chip handlers aside from affinity are needed
on cris.

(Since it's masking/unmasking itself, it looks like handle_simple_irq
 will work for the common irqs, and on v32 we can use handle_percpu_irq
 for the timer and ipi.)

Visual compilation at least gives me a logical flow that seems generally
sensible.

I'd appreciate a second pair of eyes, and if it's ok, I'll clean it up
and submit it.

regards, Kyle

---

 arch-v10/kernel/irq.c |   26 +++++---------------------
 arch-v32/kernel/irq.c |   49 ++++++++++++-------------------------------------
 kernel/irq.c          |    2 +-
 3 files changed, 18 insertions(+), 59 deletions(-)

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);
 }

  parent reply	other threads:[~2010-09-30  1:26 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-08 18:14 [RFC trollpatch 1/1] genirq: Remove the fits all and nothing __do_IRQ() code Thomas Gleixner
2010-09-08 18:51 ` James Bottomley
2010-09-08 19:34   ` Thomas Gleixner
2010-09-08 20:35     ` James Bottomley
2010-09-08 21:35       ` Thomas Gleixner
2010-09-08 20:28   ` Mike Frysinger
2010-09-08 18:58 ` Kyle McMartin
2010-09-08 20:36   ` Luck, Tony
2010-09-09  7:10 ` Mikael Starvik
2010-09-09 13:44   ` Dialup Jon Norstog
2010-09-09  7:21 ` Greg Ungerer
2010-09-09 14:09   ` Kyle McMartin
2010-09-09 23:17     ` Greg Ungerer
2010-09-27 17:36 ` Tony Luck
2010-09-27 18:01   ` Thomas Gleixner
2010-09-27 18:39     ` Luck, Tony
2010-09-27 18:49       ` Thomas Gleixner
2010-09-27 19:01         ` Luck, Tony
2010-09-29  0:46           ` Kyle McMartin
2010-09-29  4:55             ` Luck, Tony
2010-09-29 14:38               ` Kyle McMartin
2010-09-27 19:48 ` richard -rw- weinberger
2010-09-27 19:54   ` Thomas Gleixner
2010-09-30  1:26 ` Kyle McMartin [this message]
2010-09-30  2:41   ` Kyle McMartin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100930012641.GA2604@bombadil.infradead.org \
    --to=kyle@mcmartin.ca \
    --cc=akpm@linux-foundation.org \
    --cc=chris@zankel.net \
    --cc=gerg@uclinux.org \
    --cc=hch@infradead.org \
    --cc=hskinnemoen@atmel.com \
    --cc=jdike@addtoit.com \
    --cc=jesper.nilsson@axis.com \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-cris-kernel@axis.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=starvik@axis.com \
    --cc=takata@linux-m32r.org \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=torvalds@linux-foundation.org \
    --cc=ysato@users.sourceforge.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).