aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 462acaf36f3a..b969efb03787 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -13,13 +13,13 @@
13#include <linux/debug_locks.h> 13#include <linux/debug_locks.h>
14#include <linux/mm_types.h> 14#include <linux/mm_types.h>
15#include <linux/range.h> 15#include <linux/range.h>
16#include <linux/pfn.h>
16 17
17struct mempolicy; 18struct mempolicy;
18struct anon_vma; 19struct anon_vma;
19struct file_ra_state; 20struct file_ra_state;
20struct user_struct; 21struct user_struct;
21struct writeback_control; 22struct writeback_control;
22struct rlimit;
23 23
24#ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */ 24#ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */
25extern unsigned long max_mapnr; 25extern unsigned long max_mapnr;
@@ -107,6 +107,9 @@ extern unsigned int kobjsize(const void *objp);
107#define VM_PFN_AT_MMAP 0x40000000 /* PFNMAP vma that is fully mapped at mmap time */ 107#define VM_PFN_AT_MMAP 0x40000000 /* PFNMAP vma that is fully mapped at mmap time */
108#define VM_MERGEABLE 0x80000000 /* KSM may merge identical pages */ 108#define VM_MERGEABLE 0x80000000 /* KSM may merge identical pages */
109 109
110/* Bits set in the VMA until the stack is in its final location */
111#define VM_STACK_INCOMPLETE_SETUP (VM_RAND_READ | VM_SEQ_READ)
112
110#ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */ 113#ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */
111#define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS 114#define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS
112#endif 115#endif
@@ -335,6 +338,7 @@ void put_page(struct page *page);
335void put_pages_list(struct list_head *pages); 338void put_pages_list(struct list_head *pages);
336 339
337void split_page(struct page *page, unsigned int order); 340void split_page(struct page *page, unsigned int order);
341int split_free_page(struct page *page);
338 342
339/* 343/*
340 * Compound pages have a destructor function. Provide a 344 * Compound pages have a destructor function. Provide a
@@ -592,7 +596,7 @@ static inline void set_page_links(struct page *page, enum zone_type zone,
592 596
593static __always_inline void *lowmem_page_address(struct page *page) 597static __always_inline void *lowmem_page_address(struct page *page)
594{ 598{
595 return __va(page_to_pfn(page) << PAGE_SHIFT); 599 return __va(PFN_PHYS(page_to_pfn(page)));
596} 600}
597 601
598#if defined(CONFIG_HIGHMEM) && !defined(WANT_PAGE_VIRTUAL) 602#if defined(CONFIG_HIGHMEM) && !defined(WANT_PAGE_VIRTUAL)
@@ -1449,9 +1453,6 @@ int vmemmap_populate_basepages(struct page *start_page,
1449int vmemmap_populate(struct page *start_page, unsigned long pages, int node); 1453int vmemmap_populate(struct page *start_page, unsigned long pages, int node);
1450void vmemmap_populate_print_last(void); 1454void vmemmap_populate_print_last(void);
1451 1455
1452extern int account_locked_memory(struct mm_struct *mm, struct rlimit *rlim,
1453 size_t size);
1454extern void refund_locked_memory(struct mm_struct *mm, size_t size);
1455 1456
1456enum mf_flags { 1457enum mf_flags {
1457 MF_COUNT_INCREASED = 1 << 0, 1458 MF_COUNT_INCREASED = 1 << 0,