hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/powerpc/kernel/trace/ftrace_64_mprofile.S
....@@ -1,10 +1,6 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * 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.
84 */
95
106 #include <linux/magic.h>
....@@ -229,7 +225,7 @@
229225 * - r0, r11 & r12 are free
230226 */
231227 livepatch_handler:
232
- CURRENT_THREAD_INFO(r12, r1)
228
+ ld r12, PACA_THREAD_INFO(r13)
233229
234230 /* Allocate 3 x 8 bytes */
235231 ld r11, TI_livepatch_sp(r12)
....@@ -256,7 +252,7 @@
256252 * restore it.
257253 */
258254
259
- CURRENT_THREAD_INFO(r12, r1)
255
+ ld r12, PACA_THREAD_INFO(r13)
260256
261257 ld r11, TI_livepatch_sp(r12)
262258
....@@ -273,7 +269,7 @@
273269 ld r2, -24(r11)
274270
275271 /* Pop livepatch stack frame */
276
- CURRENT_THREAD_INFO(r12, r1)
272
+ ld r12, PACA_THREAD_INFO(r13)
277273 subi r11, r11, 24
278274 std r11, TI_livepatch_sp(r12)
279275
....@@ -298,6 +294,7 @@
298294 std r2, 24(r1)
299295 ld r2, PACATOC(r13) /* get kernel TOC in r2 */
300296
297
+ addi r5, r1, 112
301298 mfctr r4 /* ftrace_caller has moved local addr here */
302299 std r4, 40(r1)
303300 mflr r3 /* ftrace_caller has restored LR from stack */