Thread (8 messages) flat view 8 messages, 5 authors, 2021-04-19

Re: [PATCH] powerpc/64s: power4 nap fixup in C

From: Christophe Leroy <hidden>
Date: 2021-03-29 09:05:47


Le 29/03/2021 à 10:33, Benjamin Herrenschmidt a écrit :
On Fri, 2021-03-12 at 11:20 +1000, Nicholas Piggin wrote:
quoted
+static inline void nap_adjust_return(struct pt_regs *regs)

+{

+#ifdef CONFIG_PPC_970_NAP

+       if (unlikely(test_thread_local_flags(_TLF_NAPPING))) {
+               /* Can avoid a test-and-clear because NMIs do not call this */
+               clear_thread_local_flags(_TLF_NAPPING);
+               regs->nip = (unsigned long)power4_idle_nap_return;
+       }
Is this a pointer to a function descriptor or the actual code ?
--- a/arch/powerpc/kernel/idle_book3s.S
+++ b/arch/powerpc/kernel/idle_book3s.S
@@ -209,4 +209,8 @@ _GLOBAL(power4_idle_nap)
  	mtmsrd	r7
  	isync
  	b	1b
+
+	.globl power4_idle_nap_return
+power4_idle_nap_return:
+	blr
  #endif
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help