Commit 4280119e authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] H8/300 support update (2/3) - entry.S cleanup

From: Yoshinori Sato <ysato@users.sourceforge.jp>

- cleanup define
parent 4f9ad28f
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <asm/bootinfo.h> #include <asm/bootinfo.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/hardirq.h> #include <asm/hardirq.h>
#include <asm/ptrace.h>
#define DEFINE(sym, val) \ #define DEFINE(sym, val) \
asm volatile("\n->" #sym " %0 " #val : : "i" (val)) asm volatile("\n->" #sym " %0 " #val : : "i" (val))
...@@ -41,6 +42,22 @@ int main(void) ...@@ -41,6 +42,22 @@ int main(void)
DEFINE(THREAD_USP, offsetof(struct thread_struct, usp)); DEFINE(THREAD_USP, offsetof(struct thread_struct, usp));
DEFINE(THREAD_CCR, offsetof(struct thread_struct, ccr)); 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_PTRACED, PT_PTRACED);
DEFINE(PT_DTRACE, PT_DTRACE); DEFINE(PT_DTRACE, PT_DTRACE);
......
...@@ -21,26 +21,7 @@ ...@@ -21,26 +21,7 @@
#include <asm/linkage.h> #include <asm/linkage.h>
#include <asm/asm-offsets.h> #include <asm/asm-offsets.h>
#include <asm/thread_info.h> #include <asm/thread_info.h>
#include <asm/errno.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
.h8300h .h8300h
...@@ -188,7 +169,7 @@ SYMBOL_NAME_LABEL(interrupt_entry) ...@@ -188,7 +169,7 @@ SYMBOL_NAME_LABEL(interrupt_entry)
mov.l sp,er1 mov.l sp,er1
subs #4,er1 /* adjust ret_pc */ subs #4,er1 /* adjust ret_pc */
jsr @SYMBOL_NAME(process_int) 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 beq 1f
jsr @SYMBOL_NAME(do_softirq) jsr @SYMBOL_NAME(do_softirq)
1: 1:
......
...@@ -22,27 +22,7 @@ ...@@ -22,27 +22,7 @@
#include <asm/linkage.h> #include <asm/linkage.h>
#include <asm/asm-offsets.h> #include <asm/asm-offsets.h>
#include <asm/thread_info.h> #include <asm/thread_info.h>
#include <asm/errno.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
.h8300s .h8300s
...@@ -186,7 +166,7 @@ SYMBOL_NAME_LABEL(interrupt_entry) ...@@ -186,7 +166,7 @@ SYMBOL_NAME_LABEL(interrupt_entry)
mov.l sp,er1 mov.l sp,er1
subs #4,er1 /* adjust ret_pc */ subs #4,er1 /* adjust ret_pc */
jsr @SYMBOL_NAME(process_int) 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 beq 1f
jsr @SYMBOL_NAME(do_softirq) jsr @SYMBOL_NAME(do_softirq)
1: 1:
......
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