]> err.no Git - linux-2.6/blobdiff - include/linux/mm.h
[POWERPC] 83xx: Add default config file for Wind River SBC8349 board
[linux-2.6] / include / linux / mm.h
index 292c6862375941e9644a661d90d1ced14d5ae7e2..1b7b95c67acaf5df2fd9cb860599931119ddc029 100644 (file)
 #include <linux/mmzone.h>
 #include <linux/rbtree.h>
 #include <linux/prio_tree.h>
-#include <linux/mutex.h>
 #include <linux/debug_locks.h>
-#include <linux/backing-dev.h>
 #include <linux/mm_types.h>
+#include <linux/security.h>
 
 struct mempolicy;
 struct anon_vma;
@@ -514,6 +513,21 @@ static inline void set_page_links(struct page *page, enum zone_type zone,
        set_page_section(page, pfn_to_section_nr(pfn));
 }
 
+/*
+ * If a hint addr is less than mmap_min_addr change hint to be as
+ * low as possible but still greater than mmap_min_addr
+ */
+static inline unsigned long round_hint_to_min(unsigned long hint)
+{
+#ifdef CONFIG_SECURITY
+       hint &= PAGE_MASK;
+       if (((void *)hint != NULL) &&
+           (hint < mmap_min_addr))
+               return PAGE_ALIGN(mmap_min_addr);
+#endif
+       return hint;
+}
+
 /*
  * Some inline functions in vmstat.h depend on page_zone()
  */
@@ -648,9 +662,6 @@ static inline int page_mapped(struct page *page)
 extern void show_free_areas(void);
 
 #ifdef CONFIG_SHMEM
-int shmem_set_policy(struct vm_area_struct *vma, struct mempolicy *new);
-struct mempolicy *shmem_get_policy(struct vm_area_struct *vma,
-                                       unsigned long addr);
 int shmem_lock(struct file *file, int lock, struct user_struct *user);
 #else
 static inline int shmem_lock(struct file *file, int lock,
@@ -658,18 +669,6 @@ static inline int shmem_lock(struct file *file, int lock,
 {
        return 0;
 }
-
-static inline int shmem_set_policy(struct vm_area_struct *vma,
-                                  struct mempolicy *new)
-{
-       return 0;
-}
-
-static inline struct mempolicy *shmem_get_policy(struct vm_area_struct *vma,
-                                                unsigned long addr)
-{
-       return NULL;
-}
 #endif
 struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags);
 
@@ -1147,7 +1146,7 @@ extern int randomize_va_space;
 
 const char * arch_vma_name(struct vm_area_struct *vma);
 
-struct page *sparse_early_mem_map_populate(unsigned long pnum, int nid);
+struct page *sparse_mem_map_populate(unsigned long pnum, int nid);
 pgd_t *vmemmap_pgd_populate(unsigned long addr, int node);
 pud_t *vmemmap_pud_populate(pgd_t *pgd, unsigned long addr, int node);
 pmd_t *vmemmap_pmd_populate(pud_t *pud, unsigned long addr, int node);