linux-4.4.1/dma_contiguous_reserve()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#zc032c09]
#backlinks
*説明 [#zd445570]
-パス: [[linux-4.4.1/drivers/base/dma-contiguous.c]]
-FIXME: これは何?
--説明
**引数 [#hfd05d97]
-phys_addr_t limit
--
--[[linux-4.4.1/phys_addr_t]]
**返り値 [#w012b78a]
-void
**参考 [#n0705a6b]
*実装 [#j6d349ab]
/**
* dma_contiguous_reserve() - reserve area(s) for contig...
* @limit: End address of the reserved memory (optional,...
*
* This function reserves memory from early allocator. I...
* called by arch specific code once the early allocator...
* has been activated and all other subsystems have alre...
* memory.
*/
void __init dma_contiguous_reserve(phys_addr_t limit)
{
phys_addr_t selected_size = 0;
phys_addr_t selected_base = 0;
phys_addr_t selected_limit = limit;
bool fixed = false;
pr_debug("%s(limit %08lx)\n", __func__, (unsigned long)...
-
--[[linux-4.4.1/pr_debug()]]
if (size_cmdline != -1) {
selected_size = size_cmdline;
selected_base = base_cmdline;
selected_limit = min_not_zero(limit_cmdline, limit);
if (base_cmdline + size_cmdline == limit_cmdline)
fixed = true;
-
--[[linux-4.4.1/min_not_zero()]]
--[[linux-4.4.1/size_cmdline(global)]]
--[[linux-4.4.1/base_cmdline(global)]]
--[[linux-4.4.1/limit_cmdline(global)]]
} else {
#ifdef CONFIG_CMA_SIZE_SEL_MBYTES
selected_size = size_bytes;
#elif defined(CONFIG_CMA_SIZE_SEL_PERCENTAGE)
selected_size = cma_early_percent_memory();
#elif defined(CONFIG_CMA_SIZE_SEL_MIN)
selected_size = min(size_bytes, cma_early_percent_memo...
#elif defined(CONFIG_CMA_SIZE_SEL_MAX)
selected_size = max(size_bytes, cma_early_percent_memo...
#endif
-
--[[linux-4.4.1/CONFIG_CMA_SIZE_SEL_MBYTES]]
--[[linux-4.4.1/size_bytes(global)]]
--[[linux-4.4.1/CONFIG_CMA_SIZE_SEL_PERCENTAGE()]]
--[[linux-4.4.1/cma_early_percent_memory()]]
--[[linux-4.4.1/CONFIG_CMA_SIZE_SEL_MIN]]
--[[linux-4.4.1/CONFIG_CMA_SIZE_SEL_MAX]]
}
if (selected_size && !dma_contiguous_default_area) {
pr_debug("%s: reserving %ld MiB for global area\n", __...
(unsigned long)selected_size / SZ_1M);
-
--[[linux-4.4.1/dma_contiguous_default_area(global)]]
dma_contiguous_reserve_area(selected_size, selected_ba...
selected_limit,
&dma_contiguous_default_area,
fixed);
}
-
--[[linux-4.4.1/dma_contiguous_reserve_area()]]
}
*コメント [#u2722247]
終了行:
*参照元 [#zc032c09]
#backlinks
*説明 [#zd445570]
-パス: [[linux-4.4.1/drivers/base/dma-contiguous.c]]
-FIXME: これは何?
--説明
**引数 [#hfd05d97]
-phys_addr_t limit
--
--[[linux-4.4.1/phys_addr_t]]
**返り値 [#w012b78a]
-void
**参考 [#n0705a6b]
*実装 [#j6d349ab]
/**
* dma_contiguous_reserve() - reserve area(s) for contig...
* @limit: End address of the reserved memory (optional,...
*
* This function reserves memory from early allocator. I...
* called by arch specific code once the early allocator...
* has been activated and all other subsystems have alre...
* memory.
*/
void __init dma_contiguous_reserve(phys_addr_t limit)
{
phys_addr_t selected_size = 0;
phys_addr_t selected_base = 0;
phys_addr_t selected_limit = limit;
bool fixed = false;
pr_debug("%s(limit %08lx)\n", __func__, (unsigned long)...
-
--[[linux-4.4.1/pr_debug()]]
if (size_cmdline != -1) {
selected_size = size_cmdline;
selected_base = base_cmdline;
selected_limit = min_not_zero(limit_cmdline, limit);
if (base_cmdline + size_cmdline == limit_cmdline)
fixed = true;
-
--[[linux-4.4.1/min_not_zero()]]
--[[linux-4.4.1/size_cmdline(global)]]
--[[linux-4.4.1/base_cmdline(global)]]
--[[linux-4.4.1/limit_cmdline(global)]]
} else {
#ifdef CONFIG_CMA_SIZE_SEL_MBYTES
selected_size = size_bytes;
#elif defined(CONFIG_CMA_SIZE_SEL_PERCENTAGE)
selected_size = cma_early_percent_memory();
#elif defined(CONFIG_CMA_SIZE_SEL_MIN)
selected_size = min(size_bytes, cma_early_percent_memo...
#elif defined(CONFIG_CMA_SIZE_SEL_MAX)
selected_size = max(size_bytes, cma_early_percent_memo...
#endif
-
--[[linux-4.4.1/CONFIG_CMA_SIZE_SEL_MBYTES]]
--[[linux-4.4.1/size_bytes(global)]]
--[[linux-4.4.1/CONFIG_CMA_SIZE_SEL_PERCENTAGE()]]
--[[linux-4.4.1/cma_early_percent_memory()]]
--[[linux-4.4.1/CONFIG_CMA_SIZE_SEL_MIN]]
--[[linux-4.4.1/CONFIG_CMA_SIZE_SEL_MAX]]
}
if (selected_size && !dma_contiguous_default_area) {
pr_debug("%s: reserving %ld MiB for global area\n", __...
(unsigned long)selected_size / SZ_1M);
-
--[[linux-4.4.1/dma_contiguous_default_area(global)]]
dma_contiguous_reserve_area(selected_size, selected_ba...
selected_limit,
&dma_contiguous_default_area,
fixed);
}
-
--[[linux-4.4.1/dma_contiguous_reserve_area()]]
}
*コメント [#u2722247]
ページ名: