[RFC] inline hypercall implementation for pseries
Arnd Bergmann
arnd at arndb.de
Sun Sep 10 10:31:02 EST 2006
On Sunday 10 September 2006 00:42, Arnd Bergmann wrote:
> + /* get time and PURR snapshots after hcall */
> + mftb r14 /* timebase after */
> + subf r15,r15,r14 /* time delta */
> +BEGIN_FTR_SECTION
> + mfspr r14,SPRN_PURR /* PURR after */
> + subf r16,r16,r14 /* delta */
> +END_FTR_SECTION_IFCLR(CPU_FTR_PURR)
> +
> + /* update stats */
> + ld r14,HCALL_STAT_CALLS(r13) /* count */
> + addi r14,r14,1
> + std r14,HCALL_STAT_CALLS(r13)
> + ld r14,HCALL_STAT_TB(r13) /* timebase */
> + add r14,r14,r5
> + std r14,HCALL_STAT_TB(r13)
> +BEGIN_FTR_SECTION
> + ld r14,HCALL_STAT_PURR(r13)/* PURR */
> + add r14,r14,r6
> + std r14,HCALL_STAT_PURR(r13)
> +END_FTR_SECTION_IFCLR(CPU_FTR_PURR)
Hmm, seems I cut too much there, it should at least contain
a HVSC instruction, after the first END_FTR_SECTION. It may
also be better to use higher registers instead of r13...r16.
Arnd <><
More information about the Linuxppc-dev
mailing list