public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] h8300 interrupt problem fix
@ 2003-08-25  9:18 Yoshinori Sato
  2003-08-27 15:42 ` Yoshinori Sato
  0 siblings, 1 reply; 2+ messages in thread
From: Yoshinori Sato @ 2003-08-25  9:18 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux kernel Mailing List

Fixed problem that it was not got interruption at specified condition.

diff -ru linux-2.6.0-test3/arch/h8300/platform/h8300h/ints.c linux-2.6.0-test3-h8300/arch/h8300/platform/h8300h/ints.c
--- linux-2.6.0-test3/arch/h8300/platform/h8300h/ints.c	2003-08-22 00:42:22.000000000 +0900
+++ uCdev/linux-2.6.0-test3/arch/h8300/platform/h8300h/ints.c	2003-08-23 20:16:36.000000000 +0900
@@ -57,17 +57,20 @@
 
 extern unsigned long *interrupt_redirect_table;
 
+#define CPU_VECTOR ((unsigned long *)0x000000)
+#define ADDR_MASK (0xffffff)
+
 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;
 	int vec_no;
 
-	base = rom_vector[EXT_IRQ0];
+	base = rom_vector[EXT_IRQ0] & ADDR_MASK;
 	
 	/* check romvector format */
 	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] & ADRR_MASK))
 			return NULL;
 	}
 
diff -ru linux-2.6.0-test3/arch/h8300/platform/h8s/ints.c linux-2.6.0-test3-h8300/arch/h8300/platform/h8s/ints.c
--- linux-2.6.0-test3/arch/h8300/platform/h8s/ints.c	2003-08-22 00:42:22.000000000 +0900
+++ linux-2.6.0-test3-h8300/arch/h8300/platform/h8s/ints.c	2003-08-23 20:15:41.000000000 +0900
@@ -95,17 +95,20 @@
 
 extern unsigned long *interrupt_redirect_table;
 
+#define CPU_VECTOR ((unsigned long *)0x000000)
+#define ADDR_MASK (0xffffff)
+
 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;
 	int vec_no;
 
-	base = rom_vector[EXT_IRQ0];
+	base = rom_vector[EXT_IRQ0] & ADDR_MASK;
 	
 	/* check romvector format */
 	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;
 	}
 
-- 
Yoshinori Sato
<ysato@users.sourceforge.jp>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] h8300 interrupt problem fix
  2003-08-25  9:18 [PATCH] h8300 interrupt problem fix Yoshinori Sato
@ 2003-08-27 15:42 ` Yoshinori Sato
  0 siblings, 0 replies; 2+ messages in thread
From: Yoshinori Sato @ 2003-08-27 15:42 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux kernel Mailing List

Sorry.
typo fixed.

diff -ru linux-2.6.0-test3/arch/h8300/platform/h8300h/ints.c linux-2.6.0-test3-h8300/arch/h8300/platform/h8300h/ints.c
--- linux-2.6.0-test3/arch/h8300/platform/h8300h/ints.c	2003-08-22 00:42:22.000000000 +0900
+++ uCdev/linux-2.6.0-test3/arch/h8300/platform/h8300h/ints.c	2003-08-23 20:16:36.000000000 +0900
@@ -57,17 +57,20 @@
 
 extern unsigned long *interrupt_redirect_table;
 
+#define CPU_VECTOR ((unsigned long *)0x000000)
+#define ADDR_MASK (0xffffff)
+
 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;
 	int vec_no;
 
-	base = rom_vector[EXT_IRQ0];
+	base = rom_vector[EXT_IRQ0] & ADDR_MASK;
 	
 	/* check romvector format */
 	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;
 	}
 
diff -ru linux-2.6.0-test3/arch/h8300/platform/h8s/ints.c linux-2.6.0-test3-h8300/arch/h8300/platform/h8s/ints.c
--- linux-2.6.0-test3/arch/h8300/platform/h8s/ints.c	2003-08-22 00:42:22.000000000 +0900
+++ linux-2.6.0-test3-h8300/arch/h8300/platform/h8s/ints.c	2003-08-23 20:15:41.000000000 +0900
@@ -95,17 +95,20 @@
 
 extern unsigned long *interrupt_redirect_table;
 
+#define CPU_VECTOR ((unsigned long *)0x000000)
+#define ADDR_MASK (0xffffff)
+
 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;
 	int vec_no;
 
-	base = rom_vector[EXT_IRQ0];
+	base = rom_vector[EXT_IRQ0] & ADDR_MASK;
 	
 	/* check romvector format */
 	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;
 	}
 
-- 
Yoshinori Sato
<ysato@users.sourceforge.jp>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-08-27 15:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-25  9:18 [PATCH] h8300 interrupt problem fix Yoshinori Sato
2003-08-27 15:42 ` Yoshinori Sato

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox