Skip to content

Commit

Permalink
fpga: dfl-cxl-cache: flush cache for new NUMA buffer mapping
Browse files Browse the repository at this point in the history
To avoid caching conflicts between the Acceleration Functional
Unit in the dfl-cxl-cache and the host processor, flush the
cache for newly mapped NUMA buffers.

Signed-off-by: Matthew Gerlach <[email protected]>
(cherry picked from commit f3fef7fec30a1c9dc08e293c6ae1c38b5b90db6e)
  • Loading branch information
matthew-gerlach authored and pcolberg committed Dec 13, 2023
1 parent c41b7d8 commit cf1af08
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/fpga/dfl-cxl-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ static long cxl_cache_ioctl_numa_buffer_map(struct dfl_cxl_cache *cxl_cache, voi
goto out_unpin_pages;
}

clflush_cache_range(page_address(region->pages[0]), region->length);

region->phys = page_to_phys(region->pages[0]);

for (i = 0; i < DFL_ARRAY_MAX_SIZE; i++) {
Expand Down

0 comments on commit cf1af08

Please sign in to comment.