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>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
This commit is contained in:
Laura Abbott
2012-11-27 10:17:24 -08:00
committed by Stephen Boyd
parent 39832ef865
commit 9fa56006b4
2 changed files with 7 additions and 0 deletions

View File

@@ -62,9 +62,11 @@ enum {
};
#ifdef CONFIG_CMA
bool is_cma_pageblock(struct page *page);
# define is_migrate_cma(migratetype) unlikely((migratetype) == MIGRATE_CMA)
# define cma_wmark_pages(zone) zone->min_cma_pages
#else
# define is_cma_pageblock(page) false
# define is_migrate_cma(migratetype) false
# define cma_wmark_pages(zone) 0
#endif

View File

@@ -758,6 +758,11 @@ void __meminit __free_pages_bootmem(struct page *page, unsigned int order)
}
#ifdef CONFIG_CMA
bool is_cma_pageblock(struct page *page)
{
return get_pageblock_migratetype(page) == MIGRATE_CMA;
}
/* Free whole pageblock and set it's migration type to MIGRATE_CMA. */
void __init init_cma_reserved_pageblock(struct page *page)
{