

- cleanup define

-- 
Yoshinori Sato
<ysato@users.sourceforge.jp>



---

 25-akpm/arch/h8300/kernel/asm-offsets.c    |   17 +++++++++++++++++
 25-akpm/arch/h8300/platform/h8300h/entry.S |   23 ++---------------------
 25-akpm/arch/h8300/platform/h8s/entry.S    |   24 ++----------------------
 3 files changed, 21 insertions(+), 43 deletions(-)

diff -puN arch/h8300/kernel/asm-offsets.c~h8300-entry_s-cleanup arch/h8300/kernel/asm-offsets.c
--- 25/arch/h8300/kernel/asm-offsets.c~h8300-entry_s-cleanup	Tue Apr  6 17:49:01 2004
+++ 25-akpm/arch/h8300/kernel/asm-offsets.c	Tue Apr  6 17:49:01 2004
@@ -15,6 +15,7 @@
 #include <asm/bootinfo.h>
 #include <asm/irq.h>
 #include <asm/hardirq.h>
+#include <asm/ptrace.h>
 
 #define DEFINE(sym, val) \
         asm volatile("\n->" #sym " %0 " #val : : "i" (val))
@@ -41,6 +42,22 @@ int main(void)
 	DEFINE(THREAD_USP, offsetof(struct thread_struct, usp));
 	DEFINE(THREAD_CCR, offsetof(struct thread_struct, ccr));
 
+	/* offsets into the pt_regs struct */
+	DEFINE(LER0,  offsetof(struct pt_regs, er0)      - sizeof(long));
+	DEFINE(LER1,  offsetof(struct pt_regs, er1)      - sizeof(long));
+	DEFINE(LER2,  offsetof(struct pt_regs, er2)      - sizeof(long));
+	DEFINE(LER3,  offsetof(struct pt_regs, er3)      - sizeof(long));
+	DEFINE(LER4,  offsetof(struct pt_regs, er4)      - sizeof(long));
+	DEFINE(LER5,  offsetof(struct pt_regs, er5)      - sizeof(long));
+	DEFINE(LER6,  offsetof(struct pt_regs, er6)      - sizeof(long));
+	DEFINE(LORIG, offsetof(struct pt_regs, orig_er0) - sizeof(long));
+	DEFINE(LCCR,  offsetof(struct pt_regs, ccr)      - sizeof(long));
+	DEFINE(LVEC,  offsetof(struct pt_regs, vector)   - sizeof(long));
+#if defined(__H8300S__)
+	DEFINE(LEXR,  offsetof(struct pt_regs, exr)      - sizeof(long));
+#endif
+	DEFINE(LRET,  offsetof(struct pt_regs, pc)       - sizeof(long));
+
 	DEFINE(PT_PTRACED, PT_PTRACED);
 	DEFINE(PT_DTRACE, PT_DTRACE);
 
diff -puN arch/h8300/platform/h8300h/entry.S~h8300-entry_s-cleanup arch/h8300/platform/h8300h/entry.S
--- 25/arch/h8300/platform/h8300h/entry.S~h8300-entry_s-cleanup	Tue Apr  6 17:49:01 2004
+++ 25-akpm/arch/h8300/platform/h8300h/entry.S	Tue Apr  6 17:49:01 2004
@@ -21,26 +21,7 @@
 #include <asm/linkage.h>
 #include <asm/asm-offsets.h>
 #include <asm/thread_info.h>
-			
-ENOSYS = 38
-
-LSIGTRAP = 5
-
-SOFTIRQ_PENDING = 0
-		
-/* the following macro is used when enabling interrupts */
-
-LER4	=	0
-LER5	=	4
-LER6	=	8
-LER3	=	12
-LER2	=	16
-LER1	=	20
-LORIG	=	24
-LCCR	=	28
-LER0	=	30
-LVEC	=	34
-LRET	=	38
+#include <asm/errno.h>
 
 	.h8300h
 
@@ -188,7 +169,7 @@ SYMBOL_NAME_LABEL(interrupt_entry)
 	mov.l	sp,er1
 	subs	#4,er1				/* adjust ret_pc */
 	jsr	@SYMBOL_NAME(process_int)
-	mov.l	@SYMBOL_NAME(irq_stat)+SOFTIRQ_PENDING,er0
+	mov.l	@SYMBOL_NAME(irq_stat)+CPUSTAT_SOFTIRQ_PENDING,er0
 	beq	1f
 	jsr	@SYMBOL_NAME(do_softirq)
 1:
diff -puN arch/h8300/platform/h8s/entry.S~h8300-entry_s-cleanup arch/h8300/platform/h8s/entry.S
--- 25/arch/h8300/platform/h8s/entry.S~h8300-entry_s-cleanup	Tue Apr  6 17:49:01 2004
+++ 25-akpm/arch/h8300/platform/h8s/entry.S	Tue Apr  6 17:49:01 2004
@@ -22,27 +22,7 @@
 #include <asm/linkage.h>
 #include <asm/asm-offsets.h>
 #include <asm/thread_info.h>
-
-ENOSYS = 38
-
-LSIGTRAP = 5
-
-SOFTIRQ_PENDING = 0
-		
-/* the following macro is used when enabling interrupts */
-
-LER4	=	0
-LER5	=	4
-LER6	=	8
-LER3	=	12
-LER2	=	16
-LER1	=	20
-LORIG	=	24
-LCCR	=	28
-LER0	=	30
-LVEC	=	34
-LEXR	=	38
-LRET	=	40
+#include <asm/errno.h>
 
 	.h8300s
 
@@ -186,7 +166,7 @@ SYMBOL_NAME_LABEL(interrupt_entry)
 	mov.l	sp,er1
 	subs	#4,er1				/* adjust ret_pc */
 	jsr	@SYMBOL_NAME(process_int)
-	mov.l	@SYMBOL_NAME(irq_stat)+SOFTIRQ_PENDING,er0
+	mov.l	@SYMBOL_NAME(irq_stat)+CPU_SOFTIRQ_PENDING,er0
 	beq	1f
 	jsr	@SYMBOL_NAME(do_softirq)
 1:

_
