Commit 640bba88 authored by Yoshinori Sato's avatar Yoshinori Sato Committed by Linus Torvalds

[PATCH] h8300 interrupt problem fix

typo fixed.
parent 7f70ae01
...@@ -57,17 +57,20 @@ static int use_kmalloc; ...@@ -57,17 +57,20 @@ static int use_kmalloc;
extern unsigned long *interrupt_redirect_table; extern unsigned long *interrupt_redirect_table;
#define CPU_VECTOR ((unsigned long *)0x000000)
#define ADDR_MASK (0xffffff)
static inline unsigned long *get_vector_address(void) static inline unsigned long *get_vector_address(void)
{ {
unsigned long *rom_vector = (unsigned long *)0x000000; unsigned long *rom_vector = CPU_VECTOR;
unsigned long base,tmp; unsigned long base,tmp;
int vec_no; int vec_no;
base = rom_vector[EXT_IRQ0]; base = rom_vector[EXT_IRQ0] & ADDR_MASK;
/* check romvector format */ /* check romvector format */
for (vec_no = EXT_IRQ1; vec_no <= EXT_IRQ5; vec_no++) { for (vec_no = EXT_IRQ1; vec_no <= EXT_IRQ5; vec_no++) {
if ((base+(vec_no - EXT_IRQ0)*4) != rom_vector[vec_no]) if ((base+(vec_no - EXT_IRQ0)*4) != (rom_vector[vec_no] & ADDR_MASK))
return NULL; return NULL;
} }
......
...@@ -95,17 +95,20 @@ static int use_kmalloc; ...@@ -95,17 +95,20 @@ static int use_kmalloc;
extern unsigned long *interrupt_redirect_table; extern unsigned long *interrupt_redirect_table;
#define CPU_VECTOR ((unsigned long *)0x000000)
#define ADDR_MASK (0xffffff)
static inline unsigned long *get_vector_address(void) static inline unsigned long *get_vector_address(void)
{ {
volatile unsigned long *rom_vector = (unsigned long *)0x000000; volatile unsigned long *rom_vector = CPU_VECTOR;
unsigned long base,tmp; unsigned long base,tmp;
int vec_no; int vec_no;
base = rom_vector[EXT_IRQ0]; base = rom_vector[EXT_IRQ0] & ADDR_MASK;
/* check romvector format */ /* check romvector format */
for (vec_no = EXT_IRQ1; vec_no <= EXT_IRQ15; vec_no++) { for (vec_no = EXT_IRQ1; vec_no <= EXT_IRQ15; vec_no++) {
if ((base+(vec_no - EXT_IRQ0)*4) != rom_vector[vec_no]) if ((base+(vec_no - EXT_IRQ0)*4) != (rom_vector[vec_no] & ADDR_MASK))
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment