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

Christophe Leroy christophe.leroy at csgroup.eu
Mon Mar 29 20:04:52 AEDT 2021



Le 29/03/2021 à 10:33, Benjamin Herrenschmidt a écrit :
> On Fri, 2021-03-12 at 11:20 +1000, Nicholas Piggin wrote:
>>
>> +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



More information about the Linuxppc-dev mailing list