diff options
Diffstat (limited to 'arch/ia64/kernel/fsys.S')
-rw-r--r-- | arch/ia64/kernel/fsys.S | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/arch/ia64/kernel/fsys.S b/arch/ia64/kernel/fsys.S index 357b7e2adc63..c1625c7e1779 100644 --- a/arch/ia64/kernel/fsys.S +++ b/arch/ia64/kernel/fsys.S | |||
@@ -61,13 +61,29 @@ ENTRY(fsys_getpid) | |||
61 | .prologue | 61 | .prologue |
62 | .altrp b6 | 62 | .altrp b6 |
63 | .body | 63 | .body |
64 | add r17=IA64_TASK_GROUP_LEADER_OFFSET,r16 | ||
65 | ;; | ||
66 | ld8 r17=[r17] // r17 = current->group_leader | ||
64 | add r9=TI_FLAGS+IA64_TASK_SIZE,r16 | 67 | add r9=TI_FLAGS+IA64_TASK_SIZE,r16 |
65 | ;; | 68 | ;; |
66 | ld4 r9=[r9] | 69 | ld4 r9=[r9] |
67 | add r8=IA64_TASK_TGID_OFFSET,r16 | 70 | add r17=IA64_TASK_TGIDLINK_OFFSET,r17 |
68 | ;; | 71 | ;; |
69 | and r9=TIF_ALLWORK_MASK,r9 | 72 | and r9=TIF_ALLWORK_MASK,r9 |
70 | ld4 r8=[r8] // r8 = current->tgid | 73 | ld8 r17=[r17] // r17 = current->group_leader->pids[PIDTYPE_PID].pid |
74 | ;; | ||
75 | add r8=IA64_PID_LEVEL_OFFSET,r17 | ||
76 | ;; | ||
77 | ld4 r8=[r8] // r8 = pid->level | ||
78 | add r17=IA64_PID_UPID_OFFSET,r17 // r17 = &pid->numbers[0] | ||
79 | ;; | ||
80 | shl r8=r8,IA64_UPID_SHIFT | ||
81 | ;; | ||
82 | add r17=r17,r8 // r17 = &pid->numbers[pid->level] | ||
83 | ;; | ||
84 | ld4 r8=[r17] // r8 = pid->numbers[pid->level].nr | ||
85 | ;; | ||
86 | mov r17=0 | ||
71 | ;; | 87 | ;; |
72 | cmp.ne p8,p0=0,r9 | 88 | cmp.ne p8,p0=0,r9 |
73 | (p8) br.spnt.many fsys_fallback_syscall | 89 | (p8) br.spnt.many fsys_fallback_syscall |
@@ -126,15 +142,25 @@ ENTRY(fsys_set_tid_address) | |||
126 | .altrp b6 | 142 | .altrp b6 |
127 | .body | 143 | .body |
128 | add r9=TI_FLAGS+IA64_TASK_SIZE,r16 | 144 | add r9=TI_FLAGS+IA64_TASK_SIZE,r16 |
145 | add r17=IA64_TASK_TGIDLINK_OFFSET,r16 | ||
129 | ;; | 146 | ;; |
130 | ld4 r9=[r9] | 147 | ld4 r9=[r9] |
131 | tnat.z p6,p7=r32 // check argument register for being NaT | 148 | tnat.z p6,p7=r32 // check argument register for being NaT |
149 | ld8 r17=[r17] // r17 = current->pids[PIDTYPE_PID].pid | ||
132 | ;; | 150 | ;; |
133 | and r9=TIF_ALLWORK_MASK,r9 | 151 | and r9=TIF_ALLWORK_MASK,r9 |
134 | add r8=IA64_TASK_PID_OFFSET,r16 | 152 | add r8=IA64_PID_LEVEL_OFFSET,r17 |
135 | add r18=IA64_TASK_CLEAR_CHILD_TID_OFFSET,r16 | 153 | add r18=IA64_TASK_CLEAR_CHILD_TID_OFFSET,r16 |
136 | ;; | 154 | ;; |
137 | ld4 r8=[r8] | 155 | ld4 r8=[r8] // r8 = pid->level |
156 | add r17=IA64_PID_UPID_OFFSET,r17 // r17 = &pid->numbers[0] | ||
157 | ;; | ||
158 | shl r8=r8,IA64_UPID_SHIFT | ||
159 | ;; | ||
160 | add r17=r17,r8 // r17 = &pid->numbers[pid->level] | ||
161 | ;; | ||
162 | ld4 r8=[r17] // r8 = pid->numbers[pid->level].nr | ||
163 | ;; | ||
138 | cmp.ne p8,p0=0,r9 | 164 | cmp.ne p8,p0=0,r9 |
139 | mov r17=-1 | 165 | mov r17=-1 |
140 | ;; | 166 | ;; |