2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-18 02:04:05 +08:00

drm/gpu: Fix Memory barrier without comment Issue

-Issue found using checkpatch.pl
-Insert comments for memory barrier usage

Signed-off-by: Bhanusree <bhanusreemahesh@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1571984858-4644-1-git-send-email-bhanusreemahesh@gmail.com
This commit is contained in:
Bhanusree 2019-10-25 11:57:38 +05:30 committed by Daniel Vetter
parent e109c6db52
commit c6a5f8daff

View File

@ -126,10 +126,10 @@ drm_clflush_sg(struct sg_table *st)
if (static_cpu_has(X86_FEATURE_CLFLUSH)) {
struct sg_page_iter sg_iter;
mb();
mb(); /*CLFLUSH is ordered only by using memory barriers*/
for_each_sg_page(st->sgl, &sg_iter, st->nents, 0)
drm_clflush_page(sg_page_iter_page(&sg_iter));
mb();
mb(); /*Make sure that all cache line entry is flushed*/
return;
}
@ -160,11 +160,11 @@ drm_clflush_virt_range(void *addr, unsigned long length)
void *end = addr + length;
addr = (void *)(((unsigned long)addr) & -size);
mb();
mb(); /*CLFLUSH is only ordered with a full memory barrier*/
for (; addr < end; addr += size)
clflushopt(addr);
clflushopt(end - 1); /* force serialisation */
mb();
mb(); /*Ensure that evry data cache line entry is flushed*/
return;
}