*参照元 [#c2c08032]
#backlinks

*説明 [#bfc1d62e]
-パス: 複数あり
--CONFIG_DMA_CMA 有効: [[linux-4.4.1/drivers/base/dma-contiguous.c]]
--CONFIG_DMA_CMA 無効: [[linux-4.4.1/include/linux/dma-contiguous.h]]
--[[linux-4.4.1/CONFIG_DMA_CMA]]

-FIXME: これは何?
--説明


**引数 [#s57a139a]
-phys_addr_t size
--
--[[linux-4.4.1/phys_addr_t]]
-phys_addr_t base
--
-phys_addr_t limit
--
-struct cma **res_cma
--
--[[linux-4.4.1/cma]]
-bool fixed
--


**返り値 [#ycd60c08]
-int
--


**参考 [#o6f6c5d9]


*実装 [#xa8ceff5]


**CONFIG_DMA_CMA 有効: linux-4.4.1/drivers/base/dma-contiguous.c [#v49842c3]
 /**
  * dma_contiguous_reserve_area() - reserve custom contiguous area
  * @size: Size of the reserved area (in bytes),
  * @base: Base address of the reserved area optional, use 0 for any
  * @limit: End address of the reserved memory (optional, 0 for any).
  * @res_cma: Pointer to store the created cma region.
  * @fixed: hint about where to place the reserved area
  *
  * This function reserves memory from early allocator. It should be
  * called by arch specific code once the early allocator (memblock or bootmem)
  * has been activated and all other subsystems have already allocated/reserved
  * memory. This function allows to create custom reserved areas for specific
  * devices.
  *
  * If @fixed is true, reserve contiguous area at exactly @base.  If false,
  * reserve in range from @base to @limit.
  */
 int __init dma_contiguous_reserve_area(phys_addr_t size, phys_addr_t base,
 				       phys_addr_t limit, struct cma **res_cma,
 				       bool fixed)
 {
 	int ret;
 
 	ret = cma_declare_contiguous(base, size, limit, 0, 0, fixed, res_cma);
 	if (ret)
 		return ret;
 
-
--[[linux-4.4.1/cma_declare_contiguous()]]

 	/* Architecture specific contiguous memory fixup. */
 	dma_contiguous_early_fixup(cma_get_base(*res_cma),
 				cma_get_size(*res_cma));
 
-
--[[linux-4.4.1/dma_contiguous_early_fixup()]]
--[[linux-4.4.1/cma_get_base()]]
--[[linux-4.4.1/cma_get_size()]]

 	return 0;
 }


**CONFIG_DMA_CMA 無効: linux-4.4.1/include/linux/dma-contiguous.h [#r20c159b]
 static inline int dma_contiguous_reserve_area(phys_addr_t size, phys_addr_t base,
 				       phys_addr_t limit, struct cma **res_cma,
 				       bool fixed)
 {
 	return -ENOSYS;
 }


*コメント [#z72d28d5]

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS