diff options
author | Alistair Strachan <astrachan@google.com> | 2018-05-02 12:02:40 -0700 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2018-05-20 16:43:18 +0530 |
commit | 70bdc053d35c35e8a4752e4fcfef9e53cde8adda (patch) | |
tree | 47a8fe1b7f06a431e7457ccb6caf15cd789809ec /drivers/staging | |
parent | 2462c6f138cd3470c537a4144803b657236c3081 (diff) |
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
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/android/TODO | 1 | ||||
-rw-r--r-- | drivers/staging/android/vsoc.c | 4 |
2 files changed, 1 insertions, 4 deletions
diff --git a/drivers/staging/android/TODO b/drivers/staging/android/TODO index 0c32c00fa700..2188bc395a48 100644 --- a/drivers/staging/android/TODO +++ b/drivers/staging/android/TODO @@ -31,7 +31,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. diff --git a/drivers/staging/android/vsoc.c b/drivers/staging/android/vsoc.c index 587c66d709b9..794137b7751f 100644 --- a/drivers/staging/android/vsoc.c +++ b/drivers/staging/android/vsoc.c @@ -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); |