Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1cf9ec20 authored by Laura Abbott's avatar Laura Abbott Committed by Matt Wagantall
Browse files

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: default avatarLaura Abbott <lauraa@codeaurora.org>
parent a558f6c1
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -72,8 +72,10 @@ enum {
extern int *get_migratetype_fallbacks(int mtype);

#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

+5 −0
Original line number Diff line number Diff line
@@ -817,6 +817,11 @@ void __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 its migration type to MIGRATE_CMA. */
void __init init_cma_reserved_pageblock(struct page *page)
{