"Naveen N. Rao" <naveen.n....@linux.vnet.ibm.com> writes:

> On 2017/06/19 03:21PM, Aneesh Kumar K.V wrote:
>> > @@ -1445,8 +1446,8 @@ do_hash_page:
>> >  handle_page_fault:
>> >    andis.  r0,r4,DSISR_DABRMATCH@h
>> >    bne-    handle_dabr_fault
>> > -  ld      r4,_DAR(r1)
>> > -  ld      r5,_DSISR(r1)
>> > +  mr      r5,r4
>> > +  mr      r4,r3
>> >    addi    r3,r1,STACK_FRAME_OVERHEAD
>> >    bl      do_page_fault
>> >    cmpdi   r3,0
>> 
>> 
>> Can we avoid that if we rearrange args of other functions calls, so that
>> we can use r3 and r4 as it is ?
>
> Here's a version that does that. Again, boot tested with radix and 
> disable_radix.
>
> Thanks,
> Naveen
>
> -
> Change data_access_common() and instruction_access_common() to load the
> trap number in r3, DAR in r4 and DSISR in r5 (rather than in r5, r3 and
> r4 respectively). This change allows us to eliminate a few un-necessary
> memory loads and register move operations in handle_page_fault(),
> handle_dabr_fault() and label '77'.
>
> Signed-off-by: Naveen N. Rao <naveen.n....@linux.vnet.ibm.com>
> ---
>  arch/powerpc/kernel/exceptions-64s.S | 38 
> +++++++++++++++++-------------------
>  1 file changed, 18 insertions(+), 20 deletions(-)

Sorry I missed this and now it doesn't apply. Do you mind rebasing.

cheers

Reply via email to