Skip to contentSkip to conversation

common: dma-mapping: Store page array in vm_struct

PATCH New Laura Abbott 1 participant 1 message Sep 16, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 common: dma-mapping: Store page array in vm_struct

Commit 54329ac (common: dma-mapping: introduce common remapping functions) factored out common code for remapping arrays of pages. The code before the refactor relied on setting area->pages with the array of mapped pages for easy access later. The refactor dropped this, breaking parts of the ARM DMA API. Fix this by setting the page array in the same place.

---
 drivers/base/dma-mapping.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/base/dma-mapping.c +2 -0
index 3a6af66..9e8bbdd 100644
@@ -285,6 +285,8 @@ void *dma_common_pages_remap(struct page **pages, size_t size,
 	if (!area)
 		return NULL;
 
+	area->pages = pages;
+
 	if (map_vm_area(area, prot, pages)) {
 		vunmap(area->addr);
 		return NULL;
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation