Thread (14 messages) 14 messages, 2 authors, 2022-07-29
STALE1405d LANDED

[PATCH 05/13] selftests/powerpc: Don't save TOC by default in asm helpers

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2022-06-27 14:03:21
Subsystem: kernel selftest framework, the rest · Maintainers: Shuah Khan, Linus Torvalds

Thare are some asm helpers for creating/popping stack frames in
basic_asm.h. They always save/restore r2 (TOC pointer), but none of the
selftests change r2, so it's unnecessary to save it by default.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 tools/testing/selftests/powerpc/include/basic_asm.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/tools/testing/selftests/powerpc/include/basic_asm.h b/tools/testing/selftests/powerpc/include/basic_asm.h
index faec7b11c041..be380aa779f8 100644
--- a/tools/testing/selftests/powerpc/include/basic_asm.h
+++ b/tools/testing/selftests/powerpc/include/basic_asm.h
@@ -58,11 +58,9 @@
 #define PUSH_BASIC_STACK(_extra) \
 	mflr	r0; \
 	std	r0, STACK_FRAME_LR_POS(%r1); \
-	stdu	%r1, -(((_extra + 15) & ~15) + STACK_FRAME_MIN_SIZE)(%r1); \
-	std	%r2, STACK_FRAME_TOC_POS(%r1);
+	stdu	%r1, -(((_extra + 15) & ~15) + STACK_FRAME_MIN_SIZE)(%r1);
 
 #define POP_BASIC_STACK(_extra) \
-	ld	%r2, STACK_FRAME_TOC_POS(%r1); \
 	addi	%r1, %r1, (((_extra + 15) & ~15) + STACK_FRAME_MIN_SIZE); \
 	ld	r0, STACK_FRAME_LR_POS(%r1); \
 	mtlr	r0;
-- 
2.35.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help