]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/hugetlb.h
firewire: add Kconfig help on building both stacks
[linux-2.6-omap-h63xx.git] / include / linux / hugetlb.h
index ace64e57e17f4291a813c7a9f61d1779fb560d43..2c13715e9ddea9f643c6a66c613ffcabee091f1c 100644 (file)
@@ -4,6 +4,7 @@
 #ifdef CONFIG_HUGETLB_PAGE
 
 #include <linux/mempolicy.h>
+#include <linux/shm.h>
 #include <asm/tlbflush.h>
 
 struct ctl_table;
@@ -35,6 +36,7 @@ extern int sysctl_hugetlb_shm_group;
 
 pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr);
 pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr);
+int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep);
 struct page *follow_huge_addr(struct mm_struct *mm, unsigned long address,
                              int write);
 struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address,
@@ -161,13 +163,18 @@ static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb)
 
 extern const struct file_operations hugetlbfs_file_operations;
 extern struct vm_operations_struct hugetlb_vm_ops;
-struct file *hugetlb_zero_setup(size_t);
+struct file *hugetlb_file_setup(const char *name, size_t);
 int hugetlb_get_quota(struct address_space *mapping);
 void hugetlb_put_quota(struct address_space *mapping);
 
 static inline int is_file_hugepages(struct file *file)
 {
-       return file->f_op == &hugetlbfs_file_operations;
+       if (file->f_op == &hugetlbfs_file_operations)
+               return 1;
+       if (is_file_shm_hugepages(file))
+               return 1;
+
+       return 0;
 }
 
 static inline void set_file_hugepages(struct file *file)
@@ -178,8 +185,14 @@ static inline void set_file_hugepages(struct file *file)
 
 #define is_file_hugepages(file)                0
 #define set_file_hugepages(file)       BUG()
-#define hugetlb_zero_setup(size)       ERR_PTR(-ENOSYS)
+#define hugetlb_file_setup(name,size)  ERR_PTR(-ENOSYS)
 
 #endif /* !CONFIG_HUGETLBFS */
 
+#ifdef HAVE_ARCH_HUGETLB_UNMAPPED_AREA
+unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
+                                       unsigned long len, unsigned long pgoff,
+                                       unsigned long flags);
+#endif /* HAVE_ARCH_HUGETLB_UNMAPPED_AREA */
+
 #endif /* _LINUX_HUGETLB_H */