Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 372124
b: refs/heads/master
c: b008848
h: refs/heads/master
v: v3
  • Loading branch information
Kevin Hilman authored and Russell King committed Apr 3, 2013
1 parent b006571 commit b756db3
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4fd75911f6970478444eece952dacb2db9d1e5a5
refs/heads/master: b00884802043d9102ecc2abfdc37a7b35b30e52a
1 change: 1 addition & 0 deletions trunk/arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ config ARM
select CLONE_BACKWARDS
select OLD_SIGSUSPEND3
select OLD_SIGACTION
select HAVE_CONTEXT_TRACKING
help
The ARM series is a line of low-power-consumption RISC chip designs
licensed by ARM Ltd and targeted at embedded applications and
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/include/asm/thread_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *,
#define TIF_SYSCALL_AUDIT 9
#define TIF_SYSCALL_TRACEPOINT 10
#define TIF_SECCOMP 11 /* seccomp syscall filtering active */
#define TIF_NOHZ 12 /* in adaptive nohz mode */
#define TIF_USING_IWMMXT 17
#define TIF_MEMDIE 18 /* is terminating due to OOM killer */
#define TIF_RESTORE_SIGMASK 20
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/arm/kernel/entry-armv.S
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ ENDPROC(__pabt_svc)
#ifdef CONFIG_IRQSOFF_TRACER
bl trace_hardirqs_off
#endif
ct_user_exit save = 0
.endm

.macro kuser_cmpxchg_check
Expand Down
3 changes: 3 additions & 0 deletions trunk/arch/arm/kernel/entry-common.S
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ ret_fast_syscall:

/* perform architecture specific actions before user return */
arch_ret_to_user r1, lr
ct_user_enter

restore_user_regs fast = 1, offset = S_OFF
UNWIND(.fnend )
Expand Down Expand Up @@ -76,6 +77,7 @@ no_work_pending:
#endif
/* perform architecture specific actions before user return */
arch_ret_to_user r1, lr
ct_user_enter save = 0

restore_user_regs fast = 0, offset = 0
ENDPROC(ret_to_user_from_irq)
Expand Down Expand Up @@ -394,6 +396,7 @@ ENTRY(vector_swi)
mcr p15, 0, ip, c1, c0 @ update control register
#endif
enable_irq
ct_user_exit

get_thread_info tsk
adr tbl, sys_call_table @ load syscall table pointer
Expand Down
28 changes: 28 additions & 0 deletions trunk/arch/arm/kernel/entry-header.S
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,34 @@
.endm
#endif /* !CONFIG_THUMB2_KERNEL */

/*
* Context tracking subsystem. Used to instrument transitions
* between user and kernel mode.
*/
.macro ct_user_exit, save = 1
#ifdef CONFIG_CONTEXT_TRACKING
.if \save
stmdb sp!, {r0-r3, ip, lr}
bl user_exit
ldmia sp!, {r0-r3, ip, lr}
.else
bl user_exit
.endif
#endif
.endm

.macro ct_user_enter, save = 1
#ifdef CONFIG_CONTEXT_TRACKING
.if \save
stmdb sp!, {r0-r3, ip, lr}
bl user_enter
ldmia sp!, {r0-r3, ip, lr}
.else
bl user_enter
.endif
#endif
.endm

/*
* These are the registers used in the syscall handler, and allow us to
* have in theory up to 7 arguments to a function - r0 to r6.
Expand Down

0 comments on commit b756db3

Please sign in to comment.