[patch] __syncicache: eliminate D-cache flush
Marcel Moolenaar
xcllnt at mac.com
Thu May 21 17:37:50 UTC 2009
On May 21, 2009, at 10:25 AM, Peter Grehan wrote:
> Hi Marcel,
>
>> I'd like to commit the following change, which basically
>> removes the D-cache flush from syncicache.
>
> Isn't that required so that future instruction fetches will
> always pull in the value from memory and not have it sitting
> in the d-cache waiting to be flushed ?
We make sure that D-caches are flushed elsewhere. On the
one hand we have DMA-based I/O, for which the platform
guarantees coherency (if not, then busdma(9) fills the gap).
On the other hand we have md(4), NFS, etc, which use bcopy(9).
For those I recently added cpu_flush_dcache() so that they
flush the D-cache explicitly (needed because you sometimes
need to flush the D-cache based on the VA used for the copy)
At this time cpu_flush_dcache() is not implemented for AIM
nor booke. So far it doesn't look like it's needed on my
Xserve G4, but the email was to make sure that I have the
full picture. We may need to implement cpu_flush_dcache()
for G3 or G5 processors...
The bottomline is that D-caches are already flushed (if
needed) and all we need to do is synchronize the I-cache.
FYI,
--
Marcel Moolenaar
xcllnt at mac.com
More information about the freebsd-ppc
mailing list