Thanks for reviewing Naveen.

"Naveen N. Rao" <naveen.n....@linux.vnet.ibm.com> writes:
> On 2017/09/18 09:23AM, Santosh Sivaraj wrote:
>> diff --git a/arch/powerpc/kernel/vdso64/gettimeofday.S 
>> b/arch/powerpc/kernel/vdso64/gettimeofday.S
>> index 382021324883..a0b4943811db 100644
>> --- a/arch/powerpc/kernel/vdso64/gettimeofday.S
>> +++ b/arch/powerpc/kernel/vdso64/gettimeofday.S
>> @@ -60,18 +60,20 @@ V_FUNCTION_END(__kernel_gettimeofday)
>>   */
>>  V_FUNCTION_BEGIN(__kernel_clock_gettime)
>>    .cfi_startproc
>> +    mr      r11,r4                  /* r11 saves tp */
>> +    mflr    r12                     /* r12 saves lr */
>> +    lis     r7,NSEC_PER_SEC@h       /* want nanoseconds */
>> +    ori     r7,r7,NSEC_PER_SEC@l
>> +
>>      /* Check for supported clock IDs */
>>      cmpwi   cr0,r3,CLOCK_REALTIME
>>      cmpwi   cr1,r3,CLOCK_MONOTONIC
>>      cror    cr0*4+eq,cr0*4+eq,cr1*4+eq
>> -    bne     cr0,99f
>> +    beq     cr0,49f
>> 
>> -    mflr    r12                     /* r12 saves lr */
>> +    b       99f             /* Fallback to syscall */
>
> 'beq', followed by a 'b' looks weird without considering the next patch.  
> I think this can be organized better to not have to update r7/r11/r12 if 
> using the system call. See next patch for my comments.
>
>>    .cfi_register lr,r12
>
> If you move the mflr, you should move the above line along with it.

s/should/must/.

It literally says "lr is saved in r12".

cheers

Reply via email to