aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
authorAnton Vorontsov <avorontsov@ru.mvista.com>2009-09-22 19:49:27 -0400
committerAnton Vorontsov <avorontsov@ru.mvista.com>2009-09-22 19:49:27 -0400
commitf056878332a91ed984a116bad4e7d49aefff9e6e (patch)
tree572f4757c8e7811d45e0be0c2ae529c78fb63441 /include/linux/mm.h
parent3961f7c3cf247eee5df7fabadc7a40f2deeb98f3 (diff)
parent7fa07729e439a6184bd824746d06a49cca553f15 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: drivers/power/wm97xx_battery.c
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h34
1 files changed, 8 insertions, 26 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index ba3a7cb1eaa0..5946e2ff9fe8 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -25,6 +25,7 @@ extern unsigned long max_mapnr;
25#endif 25#endif
26 26
27extern unsigned long num_physpages; 27extern unsigned long num_physpages;
28extern unsigned long totalram_pages;
28extern void * high_memory; 29extern void * high_memory;
29extern int page_cluster; 30extern int page_cluster;
30 31
@@ -34,8 +35,6 @@ extern int sysctl_legacy_va_layout;
34#define sysctl_legacy_va_layout 0 35#define sysctl_legacy_va_layout 0
35#endif 36#endif
36 37
37extern unsigned long mmap_min_addr;
38
39#include <asm/page.h> 38#include <asm/page.h>
40#include <asm/pgtable.h> 39#include <asm/pgtable.h>
41#include <asm/processor.h> 40#include <asm/processor.h>
@@ -105,6 +104,7 @@ extern unsigned int kobjsize(const void *objp);
105#define VM_MIXEDMAP 0x10000000 /* Can contain "struct page" and pure PFN pages */ 104#define VM_MIXEDMAP 0x10000000 /* Can contain "struct page" and pure PFN pages */
106#define VM_SAO 0x20000000 /* Strong Access Ordering (powerpc) */ 105#define VM_SAO 0x20000000 /* Strong Access Ordering (powerpc) */
107#define VM_PFN_AT_MMAP 0x40000000 /* PFNMAP vma that is fully mapped at mmap time */ 106#define VM_PFN_AT_MMAP 0x40000000 /* PFNMAP vma that is fully mapped at mmap time */
107#define VM_MERGEABLE 0x80000000 /* KSM may merge identical pages */
108 108
109#ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */ 109#ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */
110#define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS 110#define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS
@@ -575,19 +575,6 @@ static inline void set_page_links(struct page *page, enum zone_type zone,
575} 575}
576 576
577/* 577/*
578 * If a hint addr is less than mmap_min_addr change hint to be as
579 * low as possible but still greater than mmap_min_addr
580 */
581static inline unsigned long round_hint_to_min(unsigned long hint)
582{
583 hint &= PAGE_MASK;
584 if (((void *)hint != NULL) &&
585 (hint < mmap_min_addr))
586 return PAGE_ALIGN(mmap_min_addr);
587 return hint;
588}
589
590/*
591 * Some inline functions in vmstat.h depend on page_zone() 578 * Some inline functions in vmstat.h depend on page_zone()
592 */ 579 */
593#include <linux/vmstat.h> 580#include <linux/vmstat.h>
@@ -715,17 +702,8 @@ extern void pagefault_out_of_memory(void);
715 702
716extern void show_free_areas(void); 703extern void show_free_areas(void);
717 704
718#ifdef CONFIG_SHMEM 705int shmem_lock(struct file *file, int lock, struct user_struct *user);
719extern int shmem_lock(struct file *file, int lock, struct user_struct *user);
720#else
721static inline int shmem_lock(struct file *file, int lock,
722 struct user_struct *user)
723{
724 return 0;
725}
726#endif
727struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags); 706struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags);
728
729int shmem_zero_setup(struct vm_area_struct *); 707int shmem_zero_setup(struct vm_area_struct *);
730 708
731#ifndef CONFIG_MMU 709#ifndef CONFIG_MMU
@@ -830,6 +808,7 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
830 struct page **pages, struct vm_area_struct **vmas); 808 struct page **pages, struct vm_area_struct **vmas);
831int get_user_pages_fast(unsigned long start, int nr_pages, int write, 809int get_user_pages_fast(unsigned long start, int nr_pages, int write,
832 struct page **pages); 810 struct page **pages);
811struct page *get_dump_page(unsigned long addr);
833 812
834extern int try_to_release_page(struct page * page, gfp_t gfp_mask); 813extern int try_to_release_page(struct page * page, gfp_t gfp_mask);
835extern void do_invalidatepage(struct page *page, unsigned long offset); 814extern void do_invalidatepage(struct page *page, unsigned long offset);
@@ -1073,6 +1052,8 @@ extern void setup_per_cpu_pageset(void);
1073static inline void setup_per_cpu_pageset(void) {} 1052static inline void setup_per_cpu_pageset(void) {}
1074#endif 1053#endif
1075 1054
1055extern void zone_pcp_update(struct zone *zone);
1056
1076/* nommu.c */ 1057/* nommu.c */
1077extern atomic_long_t mmap_pages_allocated; 1058extern atomic_long_t mmap_pages_allocated;
1078 1059
@@ -1241,7 +1222,8 @@ struct page *follow_page(struct vm_area_struct *, unsigned long address,
1241#define FOLL_WRITE 0x01 /* check pte is writable */ 1222#define FOLL_WRITE 0x01 /* check pte is writable */
1242#define FOLL_TOUCH 0x02 /* mark page accessed */ 1223#define FOLL_TOUCH 0x02 /* mark page accessed */
1243#define FOLL_GET 0x04 /* do get_page on page */ 1224#define FOLL_GET 0x04 /* do get_page on page */
1244#define FOLL_ANON 0x08 /* give ZERO_PAGE if no pgtable */ 1225#define FOLL_DUMP 0x08 /* give error on hole if it would be zero */
1226#define FOLL_FORCE 0x10 /* get_user_pages read/write w/o permission */
1245 1227
1246typedef int (*pte_fn_t)(pte_t *pte, pgtable_t token, unsigned long addr, 1228typedef int (*pte_fn_t)(pte_t *pte, pgtable_t token, unsigned long addr,
1247 void *data); 1229 void *data);