On 8/26/2014 2:22 PM, kbuild test robot wrote: > tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > head: 1c9e4561f3b2afffcda007eae9d0ddd25525f50e > commit: fa44abcad042144651fa9cd0f698c7c40a59d60f [2145/2346] common: dma-mapping: introduce common remapping functions > config: make ARCH=microblaze nommu_defconfig > > All error/warnings: > > drivers/built-in.o: In function `dma_common_pages_remap': >>> drivers/base/dma-mapping.c:311: undefined reference to `get_vm_area_caller' >>> drivers/base/dma-mapping.c:315: undefined reference to `map_vm_area' > drivers/built-in.o: In function `dma_common_free_remap': >>> drivers/base/dma-mapping.c:328: undefined reference to `find_vm_area' > > vim +311 drivers/base/dma-mapping.c > > 305 void *dma_common_pages_remap(struct page **pages, size_t size, > 306 unsigned long vm_flags, pgprot_t prot, > 307 const void *caller) > 308 { > 309 struct vm_struct *area; > 310 > > 311 area = get_vm_area_caller(size, vm_flags, caller); > 312 if (!area) > 313 return NULL; > 314 > 315 if (map_vm_area(area, prot, pages)) { > 316 vunmap(area->addr); > 317 return NULL; > 318 } > 319 > 320 return area->addr; > 321 } > 322 > 323 /* > 324 * unmaps a range previously mapped by dma_common_*_remap > 325 */ > 326 void dma_common_free_remap(void *cpu_addr, size_t size, unsigned long vm_flags) > 327 { > 328 struct vm_struct *area = find_vm_area(cpu_addr); > 329 > 330 if (!area || (area->flags & vm_flags) != vm_flags) { > 331 WARN(1, "trying to free invalid coherent area: %p\n", cpu_addr); > Based on top of my previous patch ----8<------ >From f811ce318438499fb03f1a0b147c82f01d9849d7 Mon Sep 17 00:00:00 2001 From: Laura Abbott <lauraa@xxxxxxxxxxxxxx> Date: Tue, 26 Aug 2014 13:05:41 -0700 Subject: [PATCH] common: dma-mapping: Protect remapping functions with CONFIG_MMU The dma remapping functions use vmalloc features which are not defined for CONFIG_MMU=n drivers/built-in.o: In function `dma_common_pages_remap': drivers/base/dma-mapping.c:311: undefined reference to `get_vm_area_caller' drivers/base/dma-mapping.c:315: undefined reference to `map_vm_area' drivers/built-in.o: In function `dma_common_free_remap': drivers/base/dma-mapping.c:328: undefined reference to `find_vm_area' These functions aren't applicable for nommu targets so protect them with #ifdef CONFIG_MMU Reported-by: kbuild test robot <fengguang.wu@xxxxxxxxx> Signed-off-by: Laura Abbott <lauraa@xxxxxxxxxxxxxx> --- drivers/base/dma-mapping.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/base/dma-mapping.c b/drivers/base/dma-mapping.c index 056fd46..3a6af66 100644 --- a/drivers/base/dma-mapping.c +++ b/drivers/base/dma-mapping.c @@ -270,6 +270,7 @@ int dma_common_mmap(struct device *dev, struct vm_area_struct *vma, } EXPORT_SYMBOL(dma_common_mmap); +#ifdef CONFIG_MMU /* * remaps an array of PAGE_SIZE pages into another vm_area * Cannot be used in non-sleeping contexts @@ -335,3 +336,4 @@ void dma_common_free_remap(void *cpu_addr, size_t size, unsigned long vm_flags) unmap_kernel_range((unsigned long)cpu_addr, size); vunmap(cpu_addr); } +#endif -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>