csum_partial() and csum_partial_copy_generic() in badly optimized?

Paul Mackerras paulus at samba.org
Tue Nov 19 14:31:10 EST 2002


Gabriel Paubert writes:

> I don't know this code, whether it is correct or not depends on what you
> pass in r4. If it is invalidate_dcache_range(start, start+len), the code
> is correct since start+len is one byte beyond the buffer. If it is
> invalidate_dcache_range(first, last), then it is buggy. The former
> definition of parameters is more frequent in practice.

That is correct, the `stop' parameter is the address of the first byte
after the end of the range that you want invalidated.

> This said, the first instruction can be removed:
> _GLOBAL(invalidate_dcache_range)
>   	rlwinm	r3,r3,0,~(L1_CACHE_LINE_SIZE-1)

Huh?  I'm guessing you really mean to say:

	rlwinm	r3,r3,0,0,31-LG_L1_CACHE_LINE_SIZE

Regards,
Paul.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-dev mailing list