Code Review
/
kvmfornfv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Upgrade to 4.4.50-rt62
[kvmfornfv.git]
/
kernel
/
arch
/
arm64
/
kernel
/
entry.S
diff --git
a/kernel/arch/arm64/kernel/entry.S
b/kernel/arch/arm64/kernel/entry.S
index
dd8fd31
..
cf92d4e
100644
(file)
--- a/
kernel/arch/arm64/kernel/entry.S
+++ b/
kernel/arch/arm64/kernel/entry.S
@@
-27,6
+27,7
@@
#include <asm/cpufeature.h>
#include <asm/errno.h>
#include <asm/esr.h>
#include <asm/cpufeature.h>
#include <asm/errno.h>
#include <asm/esr.h>
+#include <asm/memory.h>
#include <asm/thread_info.h>
#include <asm/unistd.h>
#include <asm/thread_info.h>
#include <asm/unistd.h>
@@
-93,7
+94,13
@@
disable_step_tsk x19, x20 // exceptions when scheduling.
.else
add x21, sp, #S_FRAME_SIZE
disable_step_tsk x19, x20 // exceptions when scheduling.
.else
add x21, sp, #S_FRAME_SIZE
- .endif
+ get_thread_info tsk
+ /* Save the task's original addr_limit and set USER_DS (TASK_SIZE_64) */
+ ldr x20, [tsk, #TI_ADDR_LIMIT]
+ str x20, [sp, #S_ORIG_ADDR_LIMIT]
+ mov x20, #TASK_SIZE_64
+ str x20, [tsk, #TI_ADDR_LIMIT]
+ .endif /* \el == 0 */
mrs x22, elr_el1
mrs x23, spsr_el1
stp lr, x21, [sp, #S_LR]
mrs x22, elr_el1
mrs x23, spsr_el1
stp lr, x21, [sp, #S_LR]
@@
-117,6
+124,12
@@
.endm
.macro kernel_exit, el
.endm
.macro kernel_exit, el
+ .if \el != 0
+ /* Restore the task's original addr_limit. */
+ ldr x20, [sp, #S_ORIG_ADDR_LIMIT]
+ str x20, [tsk, #TI_ADDR_LIMIT]
+ .endif
+
ldp x21, x22, [sp, #S_PC] // load ELR, SPSR
.if \el == 0
ct_user_enter
ldp x21, x22, [sp, #S_PC] // load ELR, SPSR
.if \el == 0
ct_user_enter
@@
-555,7
+568,7
@@
el0_inv:
mov x0, sp
mov x1, #BAD_SYNC
mov x2, x25
mov x0, sp
mov x1, #BAD_SYNC
mov x2, x25
- bl bad_
mode
+ bl bad_
el0_sync
b ret_to_user
ENDPROC(el0_sync)
b ret_to_user
ENDPROC(el0_sync)