patch-2.3.51 linux/arch/ia64/hp/hpsim_irq.c

Next file: linux/arch/ia64/ia32/binfmt_elf32.c
Previous file: linux/arch/ia64/dig/iosapic.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.50/linux/arch/ia64/hp/hpsim_irq.c linux/arch/ia64/hp/hpsim_irq.c
@@ -1,83 +1,42 @@
 /*
  * Platform dependent support for HP simulator.
  *
- * Copyright (C) 1998, 1999 Hewlett-Packard Co
- * Copyright (C) 1998, 1999 David Mosberger-Tang <davidm@hpl.hp.com>
- * Copyright (C) 1999 Vijay Chander <vijay@engr.sgi.com>
+ * Copyright (C) 1998-2000 Hewlett-Packard Co
+ * Copyright (C) 1998-2000 David Mosberger-Tang <davidm@hpl.hp.com>
  */
-#include <linux/init.h>
-#include <linux/kernel.h>
-#include <linux/param.h>
-#include <linux/string.h>
-#include <linux/types.h>
-#include <linux/kdev_t.h>
-#include <linux/console.h>
-
-#include <asm/delay.h>
-#include <asm/irq.h>
-#include <asm/pal.h>
-#include <asm/machvec.h>
-#include <asm/pgtable.h>
-#include <asm/sal.h>
 
+#include <linux/init.h>
+#include <linux/irq.h>
 
-static int
-irq_hp_sim_handle_irq (unsigned int irq, struct pt_regs *regs)
+static unsigned int
+hpsim_irq_startup (unsigned int irq)
 {
-	struct irqaction *action = 0;
-	struct irq_desc *id = irq_desc + irq;
-	unsigned int status;
-	int retval;
-
-	spin_lock(&irq_controller_lock);
-	{
-		status = id->status;
-		if ((status & IRQ_INPROGRESS) == 0 && (status & IRQ_ENABLED) != 0) {
-			action = id->action;
-			status |= IRQ_INPROGRESS;
-		}
-		id->status = status & ~(IRQ_REPLAY | IRQ_WAITING);
-	}
-	spin_unlock(&irq_controller_lock);
-
-	if (!action) {
-		if (!(id->status & IRQ_AUTODETECT))
-			printk("irq_hpsim_handle_irq: unexpected interrupt %u\n", irq);
-		return 0;
-	}
-
-	retval = invoke_irq_handlers(irq, regs, action);
-
-	spin_lock(&irq_controller_lock);
-	{
-		id->status &= ~IRQ_INPROGRESS;
-	}
-	spin_unlock(&irq_controller_lock);
-
-	return retval;
+	return 0;
 }
 
 static void
-irq_hp_sim_noop (unsigned int irq)
+hpsim_irq_noop (unsigned int irq)
 {
 }
 
 static struct hw_interrupt_type irq_type_hp_sim = {
-	"hp_sim",
-	(void (*)(unsigned long)) irq_hp_sim_noop,	/* init */
-	irq_hp_sim_noop,				/* startup */
-	irq_hp_sim_noop,				/* shutdown */
-	irq_hp_sim_handle_irq,				/* handle */
-	irq_hp_sim_noop,				/* enable */
-	irq_hp_sim_noop,				/* disable */
+	typename:	"hpsim",
+	startup:	hpsim_irq_startup,
+	shutdown:	hpsim_irq_noop,
+	enable:		hpsim_irq_noop,
+	disable:	hpsim_irq_noop,
+	ack:		hpsim_irq_noop,
+	end:		hpsim_irq_noop,
+	set_affinity:	(void (*)(unsigned int, unsigned long)) hpsim_irq_noop,
 };
 
-void
-hpsim_irq_init (struct irq_desc desc[NR_IRQS])
+void __init
+hpsim_irq_init (void)
 {
 	int i;
 
 	for (i = IA64_MIN_VECTORED_IRQ; i <= IA64_MAX_VECTORED_IRQ; ++i) {
-		irq_desc[i].handler = &irq_type_hp_sim;
+		if (irq_desc[i].handler == &no_irq_type)
+			irq_desc[i].handler = &irq_type_hp_sim;
 	}
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)