]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Avoid the double clflush on the last cache line in drm_clflush_virt_range()
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 10 Jun 2015 14:58:01 +0000 (15:58 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 19 Jun 2015 15:25:17 +0000 (17:25 +0200)
commit581e2ab5c6cbbc0011ac9c0ac0d02551bbd529f0
tree523aeecbb69c5e5455b8f999dd76527b1e1d6b01
parent5f581efb8fbf709d6945af110d51ed39ca49199c
drm: Avoid the double clflush on the last cache line in drm_clflush_virt_range()

As the clflush operates on cache lines, and we can flush any byte
address, in order to flush all bytes given in the range we issue an
extra clflush on the last byte to ensure the last cacheline is flushed.
We can can the iteration to be over the actual cache lines to avoid this
double clflush on the last byte.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Imre Deak <imre.deak@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_cache.c