Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cff7b8ba authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull CMA and DMA-mapping fixes from Marek Szyprowski:
 "This consists mainly of a set of one-liner fixes and cleanups for a
  few minor issues identified in both Contiguous Memory Allocator code
  and ARM DMA-mapping subsystem."

* 'fixes_for_linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping:
  ARM: mm: Remove unused arm_vmregion priv field
  ARM: dma-mapping: fix build warning in __dma_alloc()
  ARM: dma-mapping: support debug_dma_mapping_error
  mm: cma: alloc_contig_range: return early for err path
  drivers: cma: Fix wrong CMA selected region size default value
  drivers: dma-coherent: Fix typo in dma_mmap_from_coherent documentation
  drivers: dma-contiguous: Don't redefine SZ_1M
parents 4864ccbb 4e85fb83
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -91,6 +91,7 @@ static inline dma_addr_t virt_to_dma(struct device *dev, void *addr)
 */
static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
{
	debug_dma_mapping_error(dev, dma_addr);
	return dma_addr == DMA_ERROR_CODE;
}

+1 −1
Original line number Diff line number Diff line
@@ -610,7 +610,7 @@ static void *__dma_alloc(struct device *dev, size_t size, dma_addr_t *handle,
			 gfp_t gfp, pgprot_t prot, bool is_coherent, const void *caller)
{
	u64 mask = get_coherent_dma_mask(dev);
	struct page *page;
	struct page *page = NULL;
	void *addr;

#ifdef CONFIG_DMA_API_DEBUG
+0 −1
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@ struct arm_vmregion {
	struct list_head	vm_list;
	unsigned long		vm_start;
	unsigned long		vm_end;
	void			*priv;
	int			vm_active;
	const void		*caller;
};
+1 −1
Original line number Diff line number Diff line
@@ -236,7 +236,7 @@ config CMA_SIZE_PERCENTAGE

choice
	prompt "Selected region size"
	default CMA_SIZE_SEL_ABSOLUTE
	default CMA_SIZE_SEL_MBYTES

config CMA_SIZE_SEL_MBYTES
	bool "Use mega bytes value only"
+2 −3
Original line number Diff line number Diff line
@@ -191,9 +191,8 @@ EXPORT_SYMBOL(dma_release_from_coherent);
 * This checks whether the memory was allocated from the per-device
 * coherent memory pool and if so, maps that memory to the provided vma.
 *
 * Returns 1 if we correctly mapped the memory, or 0 if
 * dma_release_coherent() should proceed with mapping memory from
 * generic pools.
 * Returns 1 if we correctly mapped the memory, or 0 if the caller should
 * proceed with mapping memory from generic pools.
 */
int dma_mmap_from_coherent(struct device *dev, struct vm_area_struct *vma,
			   void *vaddr, size_t size, int *ret)
Loading