staging: Android: vsoc: Create wc kernel mapping for region shm.
PATCH 1/3 staging: Android: vsoc: Create wc kernel mapping for region shm.
Map the region shm as write-combining instead of uncachable.
Cc Greg Kroah-Hartman <[email protected]>
Cc Arve Hjønnevåg <[email protected]>
Cc Todd Kjos <[email protected]>
Cc Martijn Coenen <[email protected]>
Cc Greg Hartman <[email protected]>
Signed-off-by Alistair Strachan <[email protected]>
--- drivers/staging/android/TODO | 1 - drivers/staging/android/vsoc.c | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-)
drivers/staging/android/TODO +0 -1
@@ -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.
drivers/staging/android/vsoc.c +1 -3
@@ -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);
Quoted 1 line · Alistair Strachan' via kernel-team
Map the region shm as write-combining instead of uncachable.
I think more commit message is needed. Why is this done, what does it fix, etc. Its hard to know what the improvement is without a cover-letter either.
I am assuming the improvement is in performance by using the write-combining mode.
thanks,
- Joel
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel