diff options
-rw-r--r-- | include/linux/mm.h | 7 | ||||
-rw-r--r-- | mm/page_alloc.c | 9 |
2 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index d064c73c925e..43b70d5f8201 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1303,6 +1303,13 @@ extern void free_initmem(void); | |||
1303 | */ | 1303 | */ |
1304 | extern unsigned long free_reserved_area(unsigned long start, unsigned long end, | 1304 | extern unsigned long free_reserved_area(unsigned long start, unsigned long end, |
1305 | int poison, char *s); | 1305 | int poison, char *s); |
1306 | #ifdef CONFIG_HIGHMEM | ||
1307 | /* | ||
1308 | * Free a highmem page into the buddy system, adjusting totalhigh_pages | ||
1309 | * and totalram_pages. | ||
1310 | */ | ||
1311 | extern void free_highmem_page(struct page *page); | ||
1312 | #endif | ||
1306 | 1313 | ||
1307 | static inline void adjust_managed_page_count(struct page *page, long count) | 1314 | static inline void adjust_managed_page_count(struct page *page, long count) |
1308 | { | 1315 | { |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 5c660f5ba3d3..72da11c6804d 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -5141,6 +5141,15 @@ unsigned long free_reserved_area(unsigned long start, unsigned long end, | |||
5141 | return pages; | 5141 | return pages; |
5142 | } | 5142 | } |
5143 | 5143 | ||
5144 | #ifdef CONFIG_HIGHMEM | ||
5145 | void free_highmem_page(struct page *page) | ||
5146 | { | ||
5147 | __free_reserved_page(page); | ||
5148 | totalram_pages++; | ||
5149 | totalhigh_pages++; | ||
5150 | } | ||
5151 | #endif | ||
5152 | |||
5144 | /** | 5153 | /** |
5145 | * set_dma_reserve - set the specified number of pages reserved in the first zone | 5154 | * set_dma_reserve - set the specified number of pages reserved in the first zone |
5146 | * @new_dma_reserve: The number of pages to mark reserved | 5155 | * @new_dma_reserve: The number of pages to mark reserved |