patch-2.4.10 linux/arch/ppc/kernel/open_pic.h

Next file: linux/arch/ppc/kernel/open_pic_defs.h
Previous file: linux/arch/ppc/kernel/open_pic.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.9/linux/arch/ppc/kernel/open_pic.h linux/arch/ppc/kernel/open_pic.h
@@ -1,5 +1,5 @@
 /*
- * BK Id: SCCS/s.open_pic.h 1.8 05/17/01 18:14:21 cort
+ * BK Id: SCCS/s.open_pic.h 1.12 08/20/01 22:33:28 paulus
  */
 /*
  *  arch/ppc/kernel/open_pic.h -- OpenPIC Interrupt Handling
@@ -19,6 +19,14 @@
 
 #define OPENPIC_SIZE	0x40000
 
+/*
+ *  Non-offset'ed vector numbers
+ */
+
+#define OPENPIC_VEC_TIMER	64	/* and up */
+#define OPENPIC_VEC_IPI		72	/* and up */
+#define OPENPIC_VEC_SPURIOUS	127
+
 /* OpenPIC IRQ controller structure */
 extern struct hw_interrupt_type open_pic;
 
@@ -33,16 +41,28 @@
 
 /* Exported functions */
 extern void openpic_init(int, int, unsigned char *, int);
+extern u_int openpic_irq(void);
+extern void openpic_eoi(void);
 extern void openpic_request_IPIs(void);
 extern void do_openpic_setup_cpu(void);
 extern int openpic_get_irq(struct pt_regs *regs);
 extern void openpic_init_processor(u_int cpumask);
 extern void openpic_setup_ISU(int isu_num, unsigned long addr);
 extern void openpic_cause_IPI(u_int ipi, u_int cpumask);
+extern void smp_openpic_message_pass(int target, int msg, unsigned long data,
+				     int wait);
 
 extern inline int openpic_to_irq(int irq)
 {
-	return irq += NUM_8259_INTERRUPTS;
+	/* IRQ 0 usually means 'disabled'.. don't mess with it 
+	 * exceptions to this (sandpoint maybe?) 
+	 * shouldn't use openpic_to_irq 
+	 */
+	if (irq != 0){
+		return irq += NUM_8259_INTERRUPTS;
+	} else {
+		return 0;
+	}
 }
 /*extern int open_pic_irq_offset;*/
 #endif /* _PPC_KERNEL_OPEN_PIC_H */

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