mm: Add is_cma_pageblock definition
Bring back the is_cma_pageblock definition for determining if a page is CMA or not. Change-Id: I39fd546e22e240b752244832c79514f109c8e84b Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
This commit is contained in:
parent
8918861861
commit
e48a20a27c
2 changed files with 7 additions and 0 deletions
|
@ -64,8 +64,10 @@ enum {
|
|||
};
|
||||
|
||||
#ifdef CONFIG_CMA
|
||||
bool is_cma_pageblock(struct page *page);
|
||||
# define is_migrate_cma(migratetype) unlikely((migratetype) == MIGRATE_CMA)
|
||||
#else
|
||||
# define is_cma_pageblock(page) false
|
||||
# define is_migrate_cma(migratetype) false
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1265,6 +1265,11 @@ void __init page_alloc_init_late(void)
|
|||
#endif /* CONFIG_DEFERRED_STRUCT_PAGE_INIT */
|
||||
|
||||
#ifdef CONFIG_CMA
|
||||
bool is_cma_pageblock(struct page *page)
|
||||
{
|
||||
return get_pageblock_migratetype(page) == MIGRATE_CMA;
|
||||
}
|
||||
|
||||
/* Free whole pageblock and set its migration type to MIGRATE_CMA. */
|
||||
void __init init_cma_reserved_pageblock(struct page *page)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue