]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
In agp(4) avoid the need to flush all cpu caches with wbinvd between
authorTijl Coosemans <tijl@FreeBSD.org>
Sun, 2 Nov 2014 11:26:37 +0000 (11:26 +0000)
committerTijl Coosemans <tijl@FreeBSD.org>
Sun, 2 Nov 2014 11:26:37 +0000 (11:26 +0000)
commit4e612cddb918e81e48897f8c3fff2aa8c048eba1
treed8d9ed987cdc34314c951cc17d56288470aaa1bf
parent6e2c3e85621c617291a79ddbbe10e0dea1d3c4fd
In agp(4) avoid the need to flush all cpu caches with wbinvd between
updating the GTT and flushing the AGP TLB by storing the GTT in
write-combining memory.

On x86 flushing the AGP TLB is done by an I/O operation or a store to a
MMIO register in uncacheable memory.  Both cases imply that WC buffers are
flushed so no memory barriers are needed.

On powerpc there is no WC memory type.  It maps to uncacheable memory and
two stores to uncacheable memory, such as to the GTT and then to an MMIO
register, are strongly ordered, so no memory barriers are needed either.

MFC after: 1 month
sys/dev/agp/agp.c
sys/dev/agp/agp_amd.c
sys/dev/agp/agp_amd64.c
sys/dev/agp/agp_apple.c
sys/dev/agp/agp_ati.c
sys/dev/agp/agp_i810.c
sys/dev/agp/agppriv.h