aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/processor.h
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2012-11-13 12:36:07 -0500
committerCatalin Marinas <catalin.marinas@arm.com>2012-11-13 12:36:07 -0500
commit6097a07411005c0184cf90256743c784079198fc (patch)
tree0c6496aa7de5f00a60ed8e7bac4b34f5acc7e30a /arch/arm64/include/asm/processor.h
parent6a872777ffff6184f4ac10bd71d926d5e6f2491e (diff)
parent77b67063bb6bce6d475e910d3b886a606d0d91f7 (diff)
Merge tag 'v3.7-rc5' into execve
Linux 3.7-rc5 Conflicts: arch/arm64/kernel/process.c
Diffstat (limited to 'arch/arm64/include/asm/processor.h')
-rw-r--r--arch/arm64/include/asm/processor.h12
1 files changed, 2 insertions, 10 deletions
diff --git a/arch/arm64/include/asm/processor.h b/arch/arm64/include/asm/processor.h
index d6331acaf64e..ab239b2c456f 100644
--- a/arch/arm64/include/asm/processor.h
+++ b/arch/arm64/include/asm/processor.h
@@ -43,6 +43,8 @@
43#else 43#else
44#define STACK_TOP STACK_TOP_MAX 44#define STACK_TOP STACK_TOP_MAX
45#endif /* CONFIG_COMPAT */ 45#endif /* CONFIG_COMPAT */
46
47#define ARCH_LOW_ADDRESS_LIMIT PHYS_MASK
46#endif /* __KERNEL__ */ 48#endif /* __KERNEL__ */
47 49
48struct debug_info { 50struct debug_info {
@@ -92,30 +94,20 @@ static inline void start_thread_common(struct pt_regs *regs, unsigned long pc)
92static inline void start_thread(struct pt_regs *regs, unsigned long pc, 94static inline void start_thread(struct pt_regs *regs, unsigned long pc,
93 unsigned long sp) 95 unsigned long sp)
94{ 96{
95 unsigned long *stack = (unsigned long *)sp;
96
97 start_thread_common(regs, pc); 97 start_thread_common(regs, pc);
98 regs->pstate = PSR_MODE_EL0t; 98 regs->pstate = PSR_MODE_EL0t;
99 regs->sp = sp; 99 regs->sp = sp;
100 regs->regs[2] = stack[2]; /* x2 (envp) */
101 regs->regs[1] = stack[1]; /* x1 (argv) */
102 regs->regs[0] = stack[0]; /* x0 (argc) */
103} 100}
104 101
105#ifdef CONFIG_COMPAT 102#ifdef CONFIG_COMPAT
106static inline void compat_start_thread(struct pt_regs *regs, unsigned long pc, 103static inline void compat_start_thread(struct pt_regs *regs, unsigned long pc,
107 unsigned long sp) 104 unsigned long sp)
108{ 105{
109 unsigned int *stack = (unsigned int *)sp;
110
111 start_thread_common(regs, pc); 106 start_thread_common(regs, pc);
112 regs->pstate = COMPAT_PSR_MODE_USR; 107 regs->pstate = COMPAT_PSR_MODE_USR;
113 if (pc & 1) 108 if (pc & 1)
114 regs->pstate |= COMPAT_PSR_T_BIT; 109 regs->pstate |= COMPAT_PSR_T_BIT;
115 regs->compat_sp = sp; 110 regs->compat_sp = sp;
116 regs->regs[2] = stack[2]; /* x2 (envp) */
117 regs->regs[1] = stack[1]; /* x1 (argv) */
118 regs->regs[0] = stack[0]; /* x0 (argc) */
119} 111}
120#endif 112#endif
121 113