patch-2.4.21 linux-2.4.21/include/asm-x86_64/hw_irq.h
Next file: linux-2.4.21/include/asm-x86_64/i387.h
Previous file: linux-2.4.21/include/asm-x86_64/hdreg.h
Back to the patch index
Back to the overall index
- Lines: 125
- Date:
2003-06-13 07:51:38.000000000 -0700
- Orig file:
linux-2.4.20/include/asm-x86_64/hw_irq.h
- Orig date:
2002-11-28 15:53:15.000000000 -0800
diff -urN linux-2.4.20/include/asm-x86_64/hw_irq.h linux-2.4.21/include/asm-x86_64/hw_irq.h
@@ -1,6 +1,7 @@
#ifndef _ASM_HW_IRQ_H
#define _ASM_HW_IRQ_H
+#ifndef __ASSEMBLY__
/*
* linux/include/asm/hw_irq.h
*
@@ -13,13 +14,16 @@
*
* hacked by Andi Kleen for x86-64.
*
- * $Id: hw_irq.h,v 1.29 2002/04/15 23:43:12 ak Exp $
+ * $Id: hw_irq.h,v 1.31 2003/02/18 18:35:55 ak Exp $
*/
#include <linux/config.h>
+#include <linux/stddef.h>
#include <asm/atomic.h>
#include <asm/irq.h>
+#endif
+
/*
* IDT vectors usable for external interrupt sources start
* at 0x20:
@@ -27,7 +31,6 @@
#define FIRST_EXTERNAL_VECTOR 0x20
#define IA32_SYSCALL_VECTOR 0x80
-#define KDBENTER_VECTOR 0x81
/*
@@ -47,9 +50,8 @@
#define ERROR_APIC_VECTOR 0xfe
#define INVALIDATE_TLB_VECTOR 0xfd
#define RESCHEDULE_VECTOR 0xfc
-#define KDB_VECTOR 0xfa
+/* 0xfa free */
#define CALL_FUNCTION_VECTOR 0xfb
-#define KDB_VECTOR 0xfa
/*
* Local APIC timer IRQ vector is on a different priority level,
@@ -66,6 +68,7 @@
#define FIRST_DEVICE_VECTOR 0x31
#define FIRST_SYSTEM_VECTOR 0xef
+#ifndef __ASSEMBLY__
extern int irq_vector[NR_IRQS];
#define IO_APIC_VECTOR(irq) irq_vector[irq]
@@ -100,58 +103,18 @@
#define IO_APIC_IRQ(x) (((x) >= 16) || ((1<<(x)) & io_apic_irqs))
-#define __STR(x) #x
-#define STR(x) __STR(x)
-
#include <asm/ptrace.h>
-#ifndef ASM_OFFSET_H
-#include <asm/offset.h>
-#endif
-/* IF:off, stack contains irq number on origrax */
-#define IRQ_ENTER \
-" cld ;" \
-" pushq %rdi ;" \
-" pushq %rsi ;" \
-" pushq %rdx ;" \
-" pushq %rcx ;" \
-" pushq %rax ;" \
-" pushq %r8 ;" \
-" pushq %r9 ;" \
-" pushq %r10 ;" \
-" pushq %r11 ;" \
-" leaq -48(%rsp),%rdi ;" \
-" testl $3,136(%rdi) ;" \
-" je 1f ;" \
-" swapgs ;" \
-"1: addl $1,%gs: " STR(pda_irqcount) ";" \
-" movq %gs: " STR(pda_irqstackptr) ",%rax ;" \
-" cmoveq %rax,%rsp ;" \
-" pushq %rdi ;"
+extern void reschedule_interrupt(void);
+extern void invalidate_interrupt(void);
+extern void call_function_interrupt(void);
+extern void apic_timer_interrupt(void);
+extern void spurious_interrupt(void);
+extern void error_interrupt(void);
#define IRQ_NAME2(nr) nr##_interrupt(void)
#define IRQ_NAME(nr) IRQ_NAME2(IRQ##nr)
-/*
- * SMP has a few special interrupts for IPI messages
- */
-
- /* there is a second layer of macro just to get the symbolic
- name for the vector evaluated. This change is for RTLinux */
-#define BUILD_SMP_INTERRUPT(x,v) XBUILD_SMP_INTERRUPT(x,v)
-#define XBUILD_SMP_INTERRUPT(x,v)\
-asmlinkage void x(void); \
-asmlinkage void call_##x(void); \
-__asm__( \
-"\n"__ALIGN_STR"\n" \
-SYMBOL_NAME_STR(x) ":\n\t" \
- "push $" #v "-256;" \
- IRQ_ENTER \
- "call " SYMBOL_NAME_STR(smp_##x) " ; " \
- "jmp ret_from_intr")
-
-#define BUILD_COMMON_IRQ()
-
#define BUILD_IRQ(nr) \
asmlinkage void IRQ_NAME(nr); \
__asm__( \
@@ -202,4 +165,6 @@
static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {}
#endif
+#endif
+
#endif /* _ASM_HW_IRQ_H */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)