Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a69d100f authored by Alistair Strachan's avatar Alistair Strachan
Browse files

FROMLIST: staging: vsoc: Create wc kernel mapping for region shm.



Map the region shm as write-combining instead of uncacheable.

Signed-off-by: default avatarAlistair Strachan <astrachan@google.com>
[sent upstream via staging TODO]
Bug: 702147120
Change-Id: If587b4f26abaa3580b889b04dbb655f8d5b4a8ee
parent c50e5cb3
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ vsoc.c, uapi/vsoc_shm.h
   waiting threads. We should eventually use multiple queues and select the
   queue based on the region.
 - Add debugfs support for examining the permissions of regions.
 - Use ioremap_wc instead of ioremap_nocache.
 - Remove VSOC_WAIT_FOR_INCOMING_INTERRUPT ioctl. This functionality has been
   superseded by the futex and is there for legacy reasons.

+1 −3
Original line number Diff line number Diff line
@@ -802,9 +802,7 @@ static int vsoc_probe_device(struct pci_dev *pdev,

	dev_info(&pdev->dev, "shared memory @ DMA %p size=0x%zx\n",
		 (void *)vsoc_dev.shm_phys_start, vsoc_dev.shm_size);
	/* TODO(ghartman): ioremap_wc should work here */
	vsoc_dev.kernel_mapped_shm = ioremap_nocache(
			vsoc_dev.shm_phys_start, vsoc_dev.shm_size);
	vsoc_dev.kernel_mapped_shm = pci_iomap_wc(pdev, SHARED_MEMORY_BAR, 0);
	if (!vsoc_dev.kernel_mapped_shm) {
		dev_err(&vsoc_dev.dev->dev, "cannot iomap region\n");
		vsoc_remove_device(pdev);