Skip to content

Commit

Permalink
m68knommu: fix rename of pt_regs offset defines breakage
Browse files Browse the repository at this point in the history
Commit f159ee7 ("locking,
m68k/asm-offsets: Rename pt_regs offset defines") breaks the
m68knommu entry code that relies on these define names.
Fix the files to match the new define names.

Signed-off-by: Greg Ungerer <[email protected]>
  • Loading branch information
gregungerer committed Sep 30, 2009
1 parent 6333513 commit c84b564
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 51 deletions.
28 changes: 14 additions & 14 deletions arch/m68knommu/kernel/asm-offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,25 +45,25 @@ int main(void)
DEFINE(THREAD_FPSTATE, offsetof(struct thread_struct, fpstate));

/* offsets into the pt_regs */
DEFINE(PT_D0, offsetof(struct pt_regs, d0));
DEFINE(PT_ORIG_D0, offsetof(struct pt_regs, orig_d0));
DEFINE(PT_D1, offsetof(struct pt_regs, d1));
DEFINE(PT_D2, offsetof(struct pt_regs, d2));
DEFINE(PT_D3, offsetof(struct pt_regs, d3));
DEFINE(PT_D4, offsetof(struct pt_regs, d4));
DEFINE(PT_D5, offsetof(struct pt_regs, d5));
DEFINE(PT_A0, offsetof(struct pt_regs, a0));
DEFINE(PT_A1, offsetof(struct pt_regs, a1));
DEFINE(PT_A2, offsetof(struct pt_regs, a2));
DEFINE(PT_PC, offsetof(struct pt_regs, pc));
DEFINE(PT_SR, offsetof(struct pt_regs, sr));
DEFINE(PT_OFF_D0, offsetof(struct pt_regs, d0));
DEFINE(PT_OFF_ORIG_D0, offsetof(struct pt_regs, orig_d0));
DEFINE(PT_OFF_D1, offsetof(struct pt_regs, d1));
DEFINE(PT_OFF_D2, offsetof(struct pt_regs, d2));
DEFINE(PT_OFF_D3, offsetof(struct pt_regs, d3));
DEFINE(PT_OFF_D4, offsetof(struct pt_regs, d4));
DEFINE(PT_OFF_D5, offsetof(struct pt_regs, d5));
DEFINE(PT_OFF_A0, offsetof(struct pt_regs, a0));
DEFINE(PT_OFF_A1, offsetof(struct pt_regs, a1));
DEFINE(PT_OFF_A2, offsetof(struct pt_regs, a2));
DEFINE(PT_OFF_PC, offsetof(struct pt_regs, pc));
DEFINE(PT_OFF_SR, offsetof(struct pt_regs, sr));

#ifdef CONFIG_COLDFIRE
/* bitfields are a bit difficult */
DEFINE(PT_FORMATVEC, offsetof(struct pt_regs, sr) - 2);
DEFINE(PT_OFF_FORMATVEC, offsetof(struct pt_regs, sr) - 2);
#else
/* bitfields are a bit difficult */
DEFINE(PT_VECTOR, offsetof(struct pt_regs, pc) + 4);
DEFINE(PT_OFF_VECTOR, offsetof(struct pt_regs, pc) + 4);
#endif

/* signal defines */
Expand Down
6 changes: 3 additions & 3 deletions arch/m68knommu/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
ENTRY(buserr)
SAVE_ALL
moveq #-1,%d0
movel %d0,%sp@(PT_ORIG_D0)
movel %d0,%sp@(PT_OFF_ORIG_D0)
movel %sp,%sp@- /* stack frame pointer argument */
jsr buserr_c
addql #4,%sp
Expand All @@ -55,7 +55,7 @@ ENTRY(buserr)
ENTRY(trap)
SAVE_ALL
moveq #-1,%d0
movel %d0,%sp@(PT_ORIG_D0)
movel %d0,%sp@(PT_OFF_ORIG_D0)
movel %sp,%sp@- /* stack frame pointer argument */
jsr trap_c
addql #4,%sp
Expand All @@ -67,7 +67,7 @@ ENTRY(trap)
ENTRY(dbginterrupt)
SAVE_ALL
moveq #-1,%d0
movel %d0,%sp@(PT_ORIG_D0)
movel %d0,%sp@(PT_OFF_ORIG_D0)
movel %sp,%sp@- /* stack frame pointer argument */
jsr dbginterrupt_c
addql #4,%sp
Expand Down
32 changes: 16 additions & 16 deletions arch/m68knommu/platform/68328/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,25 @@
.globl inthandler7

badsys:
movel #-ENOSYS,%sp@(PT_D0)
movel #-ENOSYS,%sp@(PT_OFF_D0)
jra ret_from_exception

do_trace:
movel #-ENOSYS,%sp@(PT_D0) /* needed for strace*/
movel #-ENOSYS,%sp@(PT_OFF_D0) /* needed for strace*/
subql #4,%sp
SAVE_SWITCH_STACK
jbsr syscall_trace
RESTORE_SWITCH_STACK
addql #4,%sp
movel %sp@(PT_ORIG_D0),%d1
movel %sp@(PT_OFF_ORIG_D0),%d1
movel #-ENOSYS,%d0
cmpl #NR_syscalls,%d1
jcc 1f
lsl #2,%d1
lea sys_call_table, %a0
jbsr %a0@(%d1)

1: movel %d0,%sp@(PT_D0) /* save the return value */
1: movel %d0,%sp@(PT_OFF_D0) /* save the return value */
subql #4,%sp /* dummy return address */
SAVE_SWITCH_STACK
jbsr syscall_trace
Expand All @@ -75,7 +75,7 @@ ENTRY(system_call)
jbsr set_esp0
addql #4,%sp

movel %sp@(PT_ORIG_D0),%d0
movel %sp@(PT_OFF_ORIG_D0),%d0

movel %sp,%d1 /* get thread_info pointer */
andl #-THREAD_SIZE,%d1
Expand All @@ -88,10 +88,10 @@ ENTRY(system_call)
lea sys_call_table,%a0
movel %a0@(%d0), %a0
jbsr %a0@
movel %d0,%sp@(PT_D0) /* save the return value*/
movel %d0,%sp@(PT_OFF_D0) /* save the return value*/

ret_from_exception:
btst #5,%sp@(PT_SR) /* check if returning to kernel*/
btst #5,%sp@(PT_OFF_SR) /* check if returning to kernel*/
jeq Luser_return /* if so, skip resched, signals*/

Lkernel_return:
Expand Down Expand Up @@ -133,7 +133,7 @@ Lreturn:
*/
inthandler1:
SAVE_ALL
movew %sp@(PT_VECTOR), %d0
movew %sp@(PT_OFF_VECTOR), %d0
and #0x3ff, %d0

movel %sp,%sp@-
Expand All @@ -144,7 +144,7 @@ inthandler1:

inthandler2:
SAVE_ALL
movew %sp@(PT_VECTOR), %d0
movew %sp@(PT_OFF_VECTOR), %d0
and #0x3ff, %d0

movel %sp,%sp@-
Expand All @@ -155,7 +155,7 @@ inthandler2:

inthandler3:
SAVE_ALL
movew %sp@(PT_VECTOR), %d0
movew %sp@(PT_OFF_VECTOR), %d0
and #0x3ff, %d0

movel %sp,%sp@-
Expand All @@ -166,7 +166,7 @@ inthandler3:

inthandler4:
SAVE_ALL
movew %sp@(PT_VECTOR), %d0
movew %sp@(PT_OFF_VECTOR), %d0
and #0x3ff, %d0

movel %sp,%sp@-
Expand All @@ -177,7 +177,7 @@ inthandler4:

inthandler5:
SAVE_ALL
movew %sp@(PT_VECTOR), %d0
movew %sp@(PT_OFF_VECTOR), %d0
and #0x3ff, %d0

movel %sp,%sp@-
Expand All @@ -188,7 +188,7 @@ inthandler5:

inthandler6:
SAVE_ALL
movew %sp@(PT_VECTOR), %d0
movew %sp@(PT_OFF_VECTOR), %d0
and #0x3ff, %d0

movel %sp,%sp@-
Expand All @@ -199,7 +199,7 @@ inthandler6:

inthandler7:
SAVE_ALL
movew %sp@(PT_VECTOR), %d0
movew %sp@(PT_OFF_VECTOR), %d0
and #0x3ff, %d0

movel %sp,%sp@-
Expand All @@ -210,7 +210,7 @@ inthandler7:

inthandler:
SAVE_ALL
movew %sp@(PT_VECTOR), %d0
movew %sp@(PT_OFF_VECTOR), %d0
and #0x3ff, %d0

movel %sp,%sp@-
Expand All @@ -224,7 +224,7 @@ ret_from_interrupt:
2:
RESTORE_ALL
1:
moveb %sp@(PT_SR), %d0
moveb %sp@(PT_OFF_SR), %d0
and #7, %d0
jhi 2b

Expand Down
16 changes: 8 additions & 8 deletions arch/m68knommu/platform/68360/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,25 @@
.globl inthandler

badsys:
movel #-ENOSYS,%sp@(PT_D0)
movel #-ENOSYS,%sp@(PT_OFF_D0)
jra ret_from_exception

do_trace:
movel #-ENOSYS,%sp@(PT_D0) /* needed for strace*/
movel #-ENOSYS,%sp@(PT_OFF_D0) /* needed for strace*/
subql #4,%sp
SAVE_SWITCH_STACK
jbsr syscall_trace
RESTORE_SWITCH_STACK
addql #4,%sp
movel %sp@(PT_ORIG_D0),%d1
movel %sp@(PT_OFF_ORIG_D0),%d1
movel #-ENOSYS,%d0
cmpl #NR_syscalls,%d1
jcc 1f
lsl #2,%d1
lea sys_call_table, %a0
jbsr %a0@(%d1)

1: movel %d0,%sp@(PT_D0) /* save the return value */
1: movel %d0,%sp@(PT_OFF_D0) /* save the return value */
subql #4,%sp /* dummy return address */
SAVE_SWITCH_STACK
jbsr syscall_trace
Expand All @@ -79,10 +79,10 @@ ENTRY(system_call)
lea sys_call_table,%a0
movel %a0@(%d0), %a0
jbsr %a0@
movel %d0,%sp@(PT_D0) /* save the return value*/
movel %d0,%sp@(PT_OFF_D0) /* save the return value*/

ret_from_exception:
btst #5,%sp@(PT_SR) /* check if returning to kernel*/
btst #5,%sp@(PT_OFF_SR) /* check if returning to kernel*/
jeq Luser_return /* if so, skip resched, signals*/

Lkernel_return:
Expand Down Expand Up @@ -124,7 +124,7 @@ Lreturn:
*/
inthandler:
SAVE_ALL
movew %sp@(PT_VECTOR), %d0
movew %sp@(PT_OFF_VECTOR), %d0
and.l #0x3ff, %d0
lsr.l #0x02, %d0

Expand All @@ -139,7 +139,7 @@ ret_from_interrupt:
2:
RESTORE_ALL
1:
moveb %sp@(PT_SR), %d0
moveb %sp@(PT_OFF_SR), %d0
and #7, %d0
jhi 2b
/* check if we need to do software interrupts */
Expand Down
20 changes: 10 additions & 10 deletions arch/m68knommu/platform/coldfire/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,19 @@ ENTRY(system_call)

movel %d3,%a0
jbsr %a0@
movel %d0,%sp@(PT_D0) /* save the return value */
movel %d0,%sp@(PT_OFF_D0) /* save the return value */
jra ret_from_exception
1:
movel #-ENOSYS,%d2 /* strace needs -ENOSYS in PT_D0 */
movel %d2,PT_D0(%sp) /* on syscall entry */
movel #-ENOSYS,%d2 /* strace needs -ENOSYS in PT_OFF_D0 */
movel %d2,PT_OFF_D0(%sp) /* on syscall entry */
subql #4,%sp
SAVE_SWITCH_STACK
jbsr syscall_trace
RESTORE_SWITCH_STACK
addql #4,%sp
movel %d3,%a0
jbsr %a0@
movel %d0,%sp@(PT_D0) /* save the return value */
movel %d0,%sp@(PT_OFF_D0) /* save the return value */
subql #4,%sp /* dummy return address */
SAVE_SWITCH_STACK
jbsr syscall_trace
Expand All @@ -104,7 +104,7 @@ ret_from_signal:

ret_from_exception:
move #0x2700,%sr /* disable intrs */
btst #5,%sp@(PT_SR) /* check if returning to kernel */
btst #5,%sp@(PT_OFF_SR) /* check if returning to kernel */
jeq Luser_return /* if so, skip resched, signals */

#ifdef CONFIG_PREEMPT
Expand Down Expand Up @@ -142,8 +142,8 @@ Luser_return:
Lreturn:
move #0x2700,%sr /* disable intrs */
movel sw_usp,%a0 /* get usp */
movel %sp@(PT_PC),%a0@- /* copy exception program counter */
movel %sp@(PT_FORMATVEC),%a0@-/* copy exception format/vector/sr */
movel %sp@(PT_OFF_PC),%a0@- /* copy exception program counter */
movel %sp@(PT_OFF_FORMATVEC),%a0@- /* copy exception format/vector/sr */
moveml %sp@,%d1-%d5/%a0-%a2
lea %sp@(32),%sp /* space for 8 regs */
movel %sp@+,%d0
Expand Down Expand Up @@ -181,9 +181,9 @@ Lsignal_return:
ENTRY(inthandler)
SAVE_ALL
moveq #-1,%d0
movel %d0,%sp@(PT_ORIG_D0)
movel %d0,%sp@(PT_OFF_ORIG_D0)

movew %sp@(PT_FORMATVEC),%d0 /* put exception # in d0 */
movew %sp@(PT_OFF_FORMATVEC),%d0 /* put exception # in d0 */
andl #0x03fc,%d0 /* mask out vector only */

movel %sp,%sp@- /* push regs arg */
Expand All @@ -203,7 +203,7 @@ ENTRY(inthandler)
ENTRY(fasthandler)
SAVE_LOCAL

movew %sp@(PT_FORMATVEC),%d0
movew %sp@(PT_OFF_FORMATVEC),%d0
andl #0x03fc,%d0 /* mask out vector only */

movel %sp,%sp@- /* push regs arg */
Expand Down

0 comments on commit c84b564

Please sign in to comment.