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

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

Signed-off-by: Alistair Strachan <astrachan@google.com>
[sent upstream via staging https://patchwork.kernel.org/patch/10376965/]
Bug: 702147120
Change-Id: If587b4f26abaa3580b889b04dbb655f8d5b4a8ee
This commit is contained in:
Alistair Strachan 2018-05-02 12:02:40 -07:00
parent 1fe7e9202e
commit c4fd9a102b
2 changed files with 1 additions and 4 deletions

View file

@ -31,7 +31,6 @@ vsoc.c, uapi/vsoc_shm.h
waiting threads. We should eventually use multiple queues and select the waiting threads. We should eventually use multiple queues and select the
queue based on the region. queue based on the region.
- Add debugfs support for examining the permissions of regions. - 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 - Remove VSOC_WAIT_FOR_INCOMING_INTERRUPT ioctl. This functionality has been
superseded by the futex and is there for legacy reasons. superseded by the futex and is there for legacy reasons.

View file

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