diff options
author | Alistair Strachan <astrachan@google.com> | 2018-05-02 21:45:21 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-05-03 13:53:03 -0700 |
commit | 085f88710f6eb7c6438bf4d99460dff91161aa47 (patch) | |
tree | 2415669a4ffc4ca103f7eb8fa00006399cde134d /drivers/staging/android/vsoc.c | |
parent | 03420865e10d05d60d592fe8649e4853dc69ca5a (diff) |
staging: Android: vsoc: Create wc kernel mapping for region shm.
Map the region shm as write-combining instead of uncachable.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Todd Kjos <tkjos@android.com>
Cc: Martijn Coenen <maco@android.com>
Cc: Greg Hartman <ghartman@google.com>
Cc: devel@driverdev.osuosl.org
Cc: kernel-team@android.com
Signed-off-by: Alistair Strachan <astrachan@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/android/vsoc.c')
-rw-r--r-- | drivers/staging/android/vsoc.c | 4 |
1 files changed, 1 insertions, 3 deletions
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); |