- 追加された行はこの色です。
- 削除された行はこの色です。
*参照元 [#c2c08032]
#backlinks
*説明 [#bfc1d62e]
-パス: [[linux-4.4.1/drivers/base/dma-contiguous.c]]
-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]
/**
* 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;
}
*コメント [#z72d28d5]