H8/300 support update (2/3) - entry.S cleanup
PATCH 1/1 H8/300 support update (2/3) - entry.S cleanup
- cleanup define
Signature · 120 lines
Yoshinori Sato <[email protected]> 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: