[PATCH v3 14/16] powerpc/32: implement fast entry for syscalls on BOOKE

Christophe Leroy christophe.leroy at c-s.fr
Thu May 23 18:10:45 AEST 2019



Le 23/05/2019 à 09:00, Christophe Leroy a écrit :

[...]


> 
>>
>> arch/powerpc/kernel/head_fsl_booke.o: In function `SystemCall':
>> arch/powerpc/kernel/head_fsl_booke.S:416: undefined reference to 
>> `kvmppc_handler_BOOKE_INTERRUPT_SYSCALL_SPRN_SRR1'
>> Makefile:1052: recipe for target 'vmlinux' failed
>>
>>> +.macro SYSCALL_ENTRY trapno intno
>>> +    mfspr    r10, SPRN_SPRG_THREAD
>>> +#ifdef CONFIG_KVM_BOOKE_HV
>>> +BEGIN_FTR_SECTION
>>> +    mtspr    SPRN_SPRG_WSCRATCH0, r10
>>> +    stw    r11, THREAD_NORMSAVE(0)(r10)
>>> +    stw    r13, THREAD_NORMSAVE(2)(r10)
>>> +    mfcr    r13            /* save CR in r13 for now       */
>>> +    mfspr    r11, SPRN_SRR1
>>> +    mtocrf    0x80, r11    /* check MSR[GS] without clobbering reg */
>>> +    bf    3, 1975f
>>> +    b    kvmppc_handler_BOOKE_INTERRUPT_\intno\()_SPRN_SRR1
>>
>> It seems to me that the "_SPRN_SRR1" on the end of this line
>> isn't meant to be there...  However, it still fails to link with that
>> removed.

It looks like I missed the macro expansion.

The called function should be kvmppc_handler_8_0x01B

Seems like kisskb doesn't build any config like this.

Christophe

> 
> This SYSCALL_ENTRY macro is a slimmed version of NORMAL_EXCEPTION_PROLOG()
> 
> In NORMAL_EXCEPTION_PROLOG(), we have:
>      DO_KVM    BOOKE_INTERRUPT_##intno SPRN_SRR1;
> 
> The _SPRN_SRR1 comes from there
> 
> 
> Then in /arch/powerpc/include/asm/kvm_booke_hv_asm.h:
> 
> .macro DO_KVM intno srr1
> #ifdef CONFIG_KVM_BOOKE_HV
> BEGIN_FTR_SECTION
>      mtocrf    0x80, r11    /* check MSR[GS] without clobbering reg */
>      bf    3, 1975f
>      b    kvmppc_handler_\intno\()_\srr1
> 1975:
> END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV)
> #endif
> .endm
> 
> 
> Christophe


More information about the Linuxppc-dev mailing list