diff options
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 11 |
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 | ||
17 | struct mempolicy; | 18 | struct mempolicy; |
18 | struct anon_vma; | 19 | struct anon_vma; |
19 | struct file_ra_state; | 20 | struct file_ra_state; |
20 | struct user_struct; | 21 | struct user_struct; |
21 | struct writeback_control; | 22 | struct writeback_control; |
22 | struct 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 */ |
25 | extern unsigned long max_mapnr; | 25 | extern 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); | |||
335 | void put_pages_list(struct list_head *pages); | 338 | void put_pages_list(struct list_head *pages); |
336 | 339 | ||
337 | void split_page(struct page *page, unsigned int order); | 340 | void split_page(struct page *page, unsigned int order); |
341 | int 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 | ||
593 | static __always_inline void *lowmem_page_address(struct page *page) | 597 | static __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, | |||
1449 | int vmemmap_populate(struct page *start_page, unsigned long pages, int node); | 1453 | int vmemmap_populate(struct page *start_page, unsigned long pages, int node); |
1450 | void vmemmap_populate_print_last(void); | 1454 | void vmemmap_populate_print_last(void); |
1451 | 1455 | ||
1452 | extern int account_locked_memory(struct mm_struct *mm, struct rlimit *rlim, | ||
1453 | size_t size); | ||
1454 | extern void refund_locked_memory(struct mm_struct *mm, size_t size); | ||
1455 | 1456 | ||
1456 | enum mf_flags { | 1457 | enum mf_flags { |
1457 | MF_COUNT_INCREASED = 1 << 0, | 1458 | MF_COUNT_INCREASED = 1 << 0, |