linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Linux Kernel Development <linux-kernel@vger.kernel.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH] M68k IRQ API updates [6/20]
Date: Mon, 12 May 2003 11:54:37 +0200	[thread overview]
Message-ID: <200305120954.h4C9sb83000985@callisto.of.borg> (raw)

M68k HP9000/300: Update to the new irq API (from Roman Zippel and me) [6/20]

--- linux-2.5.69/arch/m68k/hp300/config.c	Sat Oct 12 19:20:00 2002
+++ linux-m68k-2.5.69/arch/m68k/hp300/config.c	Tue May  6 13:50:49 2003
@@ -23,7 +23,7 @@
 #include "time.h"
 
 extern void hp300_reset(void);
-extern void (*hp300_default_handler[])(int, void *, struct pt_regs *);
+extern irqreturn_t (*hp300_default_handler[])(int, void *, struct pt_regs *);
 extern int show_hp300_interrupts(struct seq_file *, void *);
 
 #ifdef CONFIG_HEARTBEAT
--- linux-2.5.69/arch/m68k/hp300/ints.c	Thu Jul 25 12:53:33 2002
+++ linux-m68k-2.5.69/arch/m68k/hp300/ints.c	Tue May  6 13:50:49 2003
@@ -42,7 +42,7 @@
 static spinlock_t irqlist_lock;
 
 /* This handler receives all interrupts, dispatching them to the registered handlers */
-static void hp300_int_handler(int irq, void *dev_id, struct pt_regs *fp)
+static irqreturn_t hp300_int_handler(int irq, void *dev_id, struct pt_regs *fp)
 {
         irq_node_t *t;
         /* We just give every handler on the chain an opportunity to handle
@@ -54,9 +54,10 @@
          * etc, in here. Note that currently we can't tell whether or not
          * a handler handles the interrupt, though. 
          */
+	return IRQ_HANDLED;
 }
 
-void (*hp300_default_handler[SYS_IRQS])(int, void *, struct pt_regs *) = {
+irqreturn_t (*hp300_default_handler[SYS_IRQS])(int, void *, struct pt_regs *) = {
 	hp300_int_handler, hp300_int_handler, hp300_int_handler, hp300_int_handler,
 	hp300_int_handler, hp300_int_handler, hp300_int_handler, NULL
 };
@@ -70,7 +71,7 @@
  * matters (eg the dreaded FIFOless UART...)
  */
 int hp300_request_irq(unsigned int irq,
-                      void (*handler) (int, void *, struct pt_regs *),
+                      irqreturn_t (*handler) (int, void *, struct pt_regs *),
                       unsigned long flags, const char *devname, void *dev_id)
 {
         irq_node_t *t, *n = new_irq_node();
--- linux-2.5.69/arch/m68k/hp300/ints.h	Wed Sep  2 18:39:18 1998
+++ linux-m68k-2.5.69/arch/m68k/hp300/ints.h	Tue May  6 13:50:49 2003
@@ -2,7 +2,7 @@
 extern void (*hp300_handlers[8])(int, void *, struct pt_regs *);
 extern void hp300_free_irq(unsigned int irq, void *dev_id);
 extern int hp300_request_irq(unsigned int irq,
-		void (*handler) (int, void *, struct pt_regs *),
+		irqreturn_t (*handler) (int, void *, struct pt_regs *),
 		unsigned long flags, const char *devname, void *dev_id);
 
 /* number of interrupts, includes 0 (what's that?) */
--- linux-2.5.69/arch/m68k/hp300/time.c	Tue Nov  5 10:09:41 2002
+++ linux-m68k-2.5.69/arch/m68k/hp300/time.c	Tue May  6 13:50:49 2003
@@ -36,13 +36,13 @@
 
 #define INTVAL ((10000 / 4) - 1)
 
-static void hp300_tick(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t hp300_tick(int irq, void *dev_id, struct pt_regs *regs)
 {
   unsigned long tmp;
-  void (*vector)(int, void *, struct pt_regs *) = dev_id;
+  irqreturn_t (*vector)(int, void *, struct pt_regs *) = dev_id;
   in_8(CLOCKBASE + CLKSR);
   asm volatile ("movpw %1@(5),%0" : "=d" (tmp) : "a" (CLOCKBASE));
-  vector(irq, NULL, regs);
+  return vector(irq, NULL, regs);
 }
 
 unsigned long hp300_gettimeoffset(void)
@@ -61,7 +61,7 @@
   return (USECS_PER_JIFFY * ticks) / INTVAL;
 }
 
-void __init hp300_sched_init(void (*vector)(int, void *, struct pt_regs *))
+void __init hp300_sched_init(irqreturn_t (*vector)(int, void *, struct pt_regs *))
 {
   out_8(CLOCKBASE + CLKCR2, 0x1);		/* select CR1 */
   out_8(CLOCKBASE + CLKCR1, 0x1);		/* reset */
--- linux-2.5.69/arch/m68k/hp300/time.h	Sat Jun 13 22:14:31 1998
+++ linux-m68k-2.5.69/arch/m68k/hp300/time.h	Tue May  6 13:50:49 2003
@@ -1,4 +1,4 @@
-extern void hp300_sched_init(void (*vector)(int, void *, struct pt_regs *));
+extern void hp300_sched_init(irqreturn_t (*vector)(int, void *, struct pt_regs *));
 extern unsigned long hp300_gettimeoffset (void);
 
 

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

                 reply	other threads:[~2003-05-12  9:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200305120954.h4C9sb83000985@callisto.of.borg \
    --to=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /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).