.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Split from ftrace_64.S |
---|
3 | | - * |
---|
4 | | - * This program is free software; you can redistribute it and/or |
---|
5 | | - * modify it under the terms of the GNU General Public License |
---|
6 | | - * as published by the Free Software Foundation; either version |
---|
7 | | - * 2 of the License, or (at your option) any later version. |
---|
8 | 4 | */ |
---|
9 | 5 | |
---|
10 | 6 | #include <linux/magic.h> |
---|
.. | .. |
---|
229 | 225 | * - r0, r11 & r12 are free |
---|
230 | 226 | */ |
---|
231 | 227 | livepatch_handler: |
---|
232 | | - CURRENT_THREAD_INFO(r12, r1) |
---|
| 228 | + ld r12, PACA_THREAD_INFO(r13) |
---|
233 | 229 | |
---|
234 | 230 | /* Allocate 3 x 8 bytes */ |
---|
235 | 231 | ld r11, TI_livepatch_sp(r12) |
---|
.. | .. |
---|
256 | 252 | * restore it. |
---|
257 | 253 | */ |
---|
258 | 254 | |
---|
259 | | - CURRENT_THREAD_INFO(r12, r1) |
---|
| 255 | + ld r12, PACA_THREAD_INFO(r13) |
---|
260 | 256 | |
---|
261 | 257 | ld r11, TI_livepatch_sp(r12) |
---|
262 | 258 | |
---|
.. | .. |
---|
273 | 269 | ld r2, -24(r11) |
---|
274 | 270 | |
---|
275 | 271 | /* Pop livepatch stack frame */ |
---|
276 | | - CURRENT_THREAD_INFO(r12, r1) |
---|
| 272 | + ld r12, PACA_THREAD_INFO(r13) |
---|
277 | 273 | subi r11, r11, 24 |
---|
278 | 274 | std r11, TI_livepatch_sp(r12) |
---|
279 | 275 | |
---|
.. | .. |
---|
298 | 294 | std r2, 24(r1) |
---|
299 | 295 | ld r2, PACATOC(r13) /* get kernel TOC in r2 */ |
---|
300 | 296 | |
---|
| 297 | + addi r5, r1, 112 |
---|
301 | 298 | mfctr r4 /* ftrace_caller has moved local addr here */ |
---|
302 | 299 | std r4, 40(r1) |
---|
303 | 300 | mflr r3 /* ftrace_caller has restored LR from stack */ |
---|