public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yoshinori Sato <ysato@users.sourceforge.jp>
To: Linus Torvalds <torvalds@osdl.org>
Cc: linux kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] H8/300 support update (2/3) - entry.S cleanup
Date: Tue, 06 Apr 2004 20:00:14 +0900	[thread overview]
Message-ID: <m28yh9l6bl.wl%ysato@users.sourceforge.jp> (raw)

- cleanup define

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

diff -Nru -X .exclude-diff linux-2.6.5/arch/h8300/kernel/asm-offsets.c linux-2.6.5-h8300/arch/h8300/kernel/asm-offsets.c
--- linux-2.6.5/arch/h8300/kernel/asm-offsets.c	2004-01-09 15:59:06.000000000 +0900
+++ linux-2.6.5-h8300/arch/h8300/kernel/asm-offsets.c	2004-04-06 17:00:23.000000000 +0900
@@ -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 @@
 	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 -Nru -X .exclude-diff linux-2.6.5/arch/h8300/platform/h8300h/entry.S linux-2.6.5-h8300/arch/h8300/platform/h8300h/entry.S
--- linux-2.6.5/arch/h8300/platform/h8300h/entry.S	2004-04-06 17:10:56.000000000 +0900
+++ linux-2.6.5-h8300/arch/h8300/platform/h8300h/entry.S	2004-04-06 17:00:23.000000000 +0900
@@ -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 @@
 	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 -Nru -X .exclude-diff linux-2.6.5/arch/h8300/platform/h8s/entry.S linux-2.6.5-h8300/arch/h8300/platform/h8s/entry.S
--- linux-2.6.5/arch/h8300/platform/h8s/entry.S	2004-04-06 17:10:56.000000000 +0900
+++ linux-2.6.5-h8300/arch/h8300/platform/h8s/entry.S	2004-04-06 19:44:57.000000000 +0900
@@ -22,28 +22,8 @@
 #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
 
 /* CPU context save/restore macros. */
@@ -186,7 +166,7 @@
 	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:

                 reply	other threads:[~2004-04-06 11:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m28yh9l6bl.wl%ysato@users.sourceforge.jp \
    --to=ysato@users.sourceforge.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox