diff options
author | Richard Braun <rbraun@sceen.net> | 2017-06-24 22:12:09 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2017-06-24 22:12:09 +0200 |
commit | 58401aa087399e0344b73e91f5708af2451b33e7 (patch) | |
tree | a2651576c09da835eafba4d06608ef956c641cf4 | |
parent | 7fc9d340e5ff385846c0c77fd24877c1b208a3bb (diff) |
Move the INTR_TABLE_SIZE macro to the x86/trap module
-rw-r--r-- | arch/x86/machine/param.h | 5 | ||||
-rw-r--r-- | arch/x86/machine/trap.h | 2 | ||||
-rw-r--r-- | kern/intr.c | 4 |
3 files changed, 4 insertions, 7 deletions
diff --git a/arch/x86/machine/param.h b/arch/x86/machine/param.h index db60c8fd..42133ab4 100644 --- a/arch/x86/machine/param.h +++ b/arch/x86/machine/param.h @@ -32,11 +32,6 @@ #define PAGE_MASK (PAGE_SIZE - 1) /* - * Maximum number of available interrupts. - */ -#define INTR_TABLE_SIZE 256 - -/* * Virtual memory properties. */ diff --git a/arch/x86/machine/trap.h b/arch/x86/machine/trap.h index c2885c59..94639c0f 100644 --- a/arch/x86/machine/trap.h +++ b/arch/x86/machine/trap.h @@ -65,6 +65,8 @@ #define TRAP_NR_VECTORS 256 +#define TRAP_INTR_TABLE_SIZE 256 + #define TRAP_STACK_SIZE PAGE_SIZE #ifndef __ASSEMBLER__ diff --git a/kern/intr.c b/kern/intr.c index ca733e29..6590fca0 100644 --- a/kern/intr.c +++ b/kern/intr.c @@ -33,10 +33,10 @@ #include <kern/log.h> #include <kern/macros.h> #include <kern/panic.h> -#include <kern/param.h> #include <kern/spinlock.h> #include <kern/thread.h> #include <machine/cpu.h> +#include <machine/trap.h> struct intr_handler { struct list node; @@ -76,7 +76,7 @@ struct intr_entry { /* * Interrupt table. */ -static struct intr_entry intr_table[INTR_TABLE_SIZE]; +static struct intr_entry intr_table[TRAP_INTR_TABLE_SIZE]; /* * List of registered controllers. |