Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18547
b: refs/heads/master
c: 2dede2d
h: refs/heads/master
i:
  18545: 570c876
  18543: a31af7d
v: v3
  • Loading branch information
Nicolas Pitre authored and Russell King committed Jan 14, 2006
1 parent 17b6629 commit af0b57c
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: da2b1cd61903c8e9796e76be2d606584f26a78e5
refs/heads/master: 2dede2d8e925f4c2cb4e136b14df127685e15dd3
17 changes: 17 additions & 0 deletions trunk/arch/arm/kernel/entry-armv.S
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,24 @@ common_invalid:
/*
* SVC mode handlers
*/

#if defined(CONFIG_AEABI) && (__LINUX_ARM_ARCH__ >= 5)
#define SPFIX(code...) code
#else
#define SPFIX(code...)
#endif

.macro svc_entry
sub sp, sp, #S_FRAME_SIZE
SPFIX( tst sp, #4 )
SPFIX( bicne sp, sp, #4 )
stmib sp, {r1 - r12}

ldmia r0, {r1 - r3}
add r5, sp, #S_SP @ here for interlock avoidance
mov r4, #-1 @ "" "" "" ""
add r0, sp, #S_FRAME_SIZE @ "" "" "" ""
SPFIX( addne r0, r0, #4 )
str r1, [sp] @ save the "real" r0 copied
@ from the exception stack

Expand Down Expand Up @@ -303,7 +313,14 @@ __pabt_svc:

/*
* User mode handlers
*
* EABI note: sp_svc is always 64-bit aligned here, so should S_FRAME_SIZE
*/

#if defined(CONFIG_AEABI) && (__LINUX_ARM_ARCH__ >= 5) && (S_FRAME_SIZE & 7)
#error "sizeof(struct pt_regs) must be a multiple of 8"
#endif

.macro usr_entry
sub sp, sp, #S_FRAME_SIZE
stmib sp, {r1 - r12}
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/kernel/entry-header.S
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
@
@ Most of the stack format comes from struct pt_regs, but with
@ the addition of 8 bytes for storing syscall args 5 and 6.
@ This _must_ remain a multiple of 8 for EABI.
@
#define S_OFF 8

Expand Down
8 changes: 5 additions & 3 deletions trunk/include/asm-arm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,11 @@

#ifndef __ASSEMBLY__

/* this struct defines the way the registers are stored on the
stack during a system call. */

/*
* This struct defines the way the registers are stored on the
* stack during a system call. Note that sizeof(struct pt_regs)
* has to be a multiple of 8.
*/
struct pt_regs {
long uregs[18];
};
Expand Down

0 comments on commit af0b57c

Please sign in to comment.