Blame view
include/linux/hugetlb.h
12.6 KB
1da177e4c Linux-2.6.12-rc2 |
1 2 |
#ifndef _LINUX_HUGETLB_H #define _LINUX_HUGETLB_H |
be93d8cfb Fix build with !H... |
3 |
#include <linux/mm_types.h> |
309381fea mm: dump page whe... |
4 |
#include <linux/mmdebug.h> |
4e950f6f0 Remove fs.h from ... |
5 |
#include <linux/fs.h> |
8edf344c6 hugetlb: move def... |
6 |
#include <linux/hugetlb_inline.h> |
abb8206cb hugetlb/cgroup: a... |
7 |
#include <linux/cgroup.h> |
9119a41e9 mm, hugetlb: unif... |
8 9 |
#include <linux/list.h> #include <linux/kref.h> |
4e950f6f0 Remove fs.h from ... |
10 |
|
e9ea0e2d1 hugetlb_file_setu... |
11 12 |
struct ctl_table; struct user_struct; |
24669e584 hugetlb: use mmu_... |
13 |
struct mmu_gather; |
e9ea0e2d1 hugetlb_file_setu... |
14 |
|
1da177e4c Linux-2.6.12-rc2 |
15 16 17 |
#ifdef CONFIG_HUGETLB_PAGE #include <linux/mempolicy.h> |
516dffdcd [PATCH] Fix get_u... |
18 |
#include <linux/shm.h> |
63551ae0f [PATCH] Hugepage ... |
19 |
#include <asm/tlbflush.h> |
1da177e4c Linux-2.6.12-rc2 |
20 |
|
90481622d hugepages: fix us... |
21 22 23 24 25 |
struct hugepage_subpool { spinlock_t lock; long count; long max_hpages, used_hpages; }; |
9119a41e9 mm, hugetlb: unif... |
26 27 |
struct resv_map { struct kref refs; |
7b24d8616 mm, hugetlb: fix ... |
28 |
spinlock_t lock; |
9119a41e9 mm, hugetlb: unif... |
29 30 31 32 |
struct list_head regions; }; extern struct resv_map *resv_map_alloc(void); void resv_map_release(struct kref *ref); |
c3f38a387 hugetlb: make som... |
33 34 35 36 |
extern spinlock_t hugetlb_lock; extern int hugetlb_max_hstate __read_mostly; #define for_each_hstate(h) \ for ((h) = hstates; (h) < &hstates[hugetlb_max_hstate]; (h)++) |
90481622d hugepages: fix us... |
37 38 |
struct hugepage_subpool *hugepage_new_subpool(long nr_blocks); void hugepage_put_subpool(struct hugepage_subpool *spool); |
20a0307c0 mm: introduce Pag... |
39 |
int PageHuge(struct page *page); |
a1e78772d hugetlb: reserve ... |
40 |
void reset_vma_resv_huge_pages(struct vm_area_struct *vma); |
8d65af789 sysctl: remove "s... |
41 42 43 |
int hugetlb_sysctl_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *); int hugetlb_overcommit_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *); int hugetlb_treat_movable_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *); |
06808b082 hugetlb: derive h... |
44 45 46 47 48 |
#ifdef CONFIG_NUMA int hugetlb_mempolicy_sysctl_handler(struct ctl_table *, int, void __user *, size_t *, loff_t *); #endif |
1da177e4c Linux-2.6.12-rc2 |
49 |
int copy_hugetlb_page_range(struct mm_struct *, struct mm_struct *, struct vm_area_struct *); |
28a35716d mm: use long type... |
50 51 52 |
long follow_hugetlb_page(struct mm_struct *, struct vm_area_struct *, struct page **, struct vm_area_struct **, unsigned long *, unsigned long *, long, unsigned int); |
04f2cbe35 hugetlb: guarante... |
53 |
void unmap_hugepage_range(struct vm_area_struct *, |
24669e584 hugetlb: use mmu_... |
54 |
unsigned long, unsigned long, struct page *); |
d833352a4 mm: hugetlbfs: cl... |
55 56 57 58 |
void __unmap_hugepage_range_final(struct mmu_gather *tlb, struct vm_area_struct *vma, unsigned long start, unsigned long end, struct page *ref_page); |
24669e584 hugetlb: use mmu_... |
59 60 61 |
void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma, unsigned long start, unsigned long end, struct page *ref_page); |
e1759c215 proc: switch /pro... |
62 |
void hugetlb_report_meminfo(struct seq_file *); |
1da177e4c Linux-2.6.12-rc2 |
63 |
int hugetlb_report_node_meminfo(int, char *); |
949f7ec57 mm, hugetlb: incl... |
64 |
void hugetlb_show_meminfo(void); |
1da177e4c Linux-2.6.12-rc2 |
65 |
unsigned long hugetlb_total_pages(void); |
ac9b9c667 [PATCH] Fix handl... |
66 |
int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, |
788c7df45 hugetlb: fault fl... |
67 |
unsigned long address, unsigned int flags); |
a1e78772d hugetlb: reserve ... |
68 |
int hugetlb_reserve_pages(struct inode *inode, long from, long to, |
5a6fe1259 Do not account fo... |
69 |
struct vm_area_struct *vma, |
ca16d140a mm: don't access ... |
70 |
vm_flags_t vm_flags); |
a43a8c39b [PATCH] tightenin... |
71 |
void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed); |
6de2b1aab HWPOISON, hugetlb... |
72 |
int dequeue_hwpoisoned_huge_page(struct page *page); |
31caf665e mm: migrate: make... |
73 74 |
bool isolate_huge_page(struct page *page, struct list_head *list); void putback_active_hugepage(struct page *page); |
c8721bbbd mm: memory-hotplu... |
75 |
bool is_hugepage_active(struct page *page); |
8f1d26d0e kexec: export fre... |
76 |
void free_huge_page(struct page *page); |
1da177e4c Linux-2.6.12-rc2 |
77 |
|
3212b535f mm: hugetlb: Copy... |
78 79 80 |
#ifdef CONFIG_ARCH_WANT_HUGE_PMD_SHARE pte_t *huge_pmd_share(struct mm_struct *mm, unsigned long addr, pud_t *pud); #endif |
396faf030 Allow huge page a... |
81 |
extern unsigned long hugepages_treat_as_movable; |
1da177e4c Linux-2.6.12-rc2 |
82 |
extern int sysctl_hugetlb_shm_group; |
53ba51d21 hugetlb: allow ar... |
83 |
extern struct list_head huge_boot_pages; |
1da177e4c Linux-2.6.12-rc2 |
84 |
|
63551ae0f [PATCH] Hugepage ... |
85 |
/* arch callbacks */ |
a55164389 hugetlb: modular ... |
86 87 |
pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr, unsigned long sz); |
63551ae0f [PATCH] Hugepage ... |
88 |
pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr); |
39dde65c9 [PATCH] shared pa... |
89 |
int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep); |
63551ae0f [PATCH] Hugepage ... |
90 91 92 93 |
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, pmd_t *pmd, int write); |
ceb868796 hugetlb: introduc... |
94 95 |
struct page *follow_huge_pud(struct mm_struct *mm, unsigned long address, pud_t *pud, int write); |
63551ae0f [PATCH] Hugepage ... |
96 |
int pmd_huge(pmd_t pmd); |
ceb868796 hugetlb: introduc... |
97 |
int pud_huge(pud_t pmd); |
7da4d641c mm: Count the num... |
98 |
unsigned long hugetlb_change_protection(struct vm_area_struct *vma, |
8f860591f [PATCH] Enable mp... |
99 |
unsigned long address, unsigned long end, pgprot_t newprot); |
63551ae0f [PATCH] Hugepage ... |
100 |
|
1da177e4c Linux-2.6.12-rc2 |
101 |
#else /* !CONFIG_HUGETLB_PAGE */ |
20a0307c0 mm: introduce Pag... |
102 103 104 105 |
static inline int PageHuge(struct page *page) { return 0; } |
a1e78772d hugetlb: reserve ... |
106 107 108 |
static inline void reset_vma_resv_huge_pages(struct vm_area_struct *vma) { } |
1da177e4c Linux-2.6.12-rc2 |
109 110 111 112 |
static inline unsigned long hugetlb_total_pages(void) { return 0; } |
5b23dbe81 hugetlb: follow_h... |
113 |
#define follow_hugetlb_page(m,v,p,vs,a,b,i,w) ({ BUG(); 0; }) |
1da177e4c Linux-2.6.12-rc2 |
114 115 |
#define follow_huge_addr(mm, addr, write) ERR_PTR(-EINVAL) #define copy_hugetlb_page_range(src, dst, vma) ({ BUG(); 0; }) |
e1759c215 proc: switch /pro... |
116 117 118 |
static inline void hugetlb_report_meminfo(struct seq_file *m) { } |
1da177e4c Linux-2.6.12-rc2 |
119 |
#define hugetlb_report_node_meminfo(n, buf) 0 |
949f7ec57 mm, hugetlb: incl... |
120 121 122 |
static inline void hugetlb_show_meminfo(void) { } |
1da177e4c Linux-2.6.12-rc2 |
123 |
#define follow_huge_pmd(mm, addr, pmd, write) NULL |
ceb868796 hugetlb: introduc... |
124 |
#define follow_huge_pud(mm, addr, pud, write) NULL |
a55164389 hugetlb: modular ... |
125 |
#define prepare_hugepage_range(file, addr, len) (-EINVAL) |
1da177e4c Linux-2.6.12-rc2 |
126 |
#define pmd_huge(x) 0 |
ceb868796 hugetlb: introduc... |
127 |
#define pud_huge(x) 0 |
1da177e4c Linux-2.6.12-rc2 |
128 |
#define is_hugepage_only_range(mm, addr, len) 0 |
9da61aef0 [PATCH] hugepage:... |
129 |
#define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) |
788c7df45 hugetlb: fault fl... |
130 |
#define hugetlb_fault(mm, vma, addr, flags) ({ BUG(); 0; }) |
0fe6e20b9 hugetlb, rmap: ad... |
131 |
#define huge_pte_offset(mm, address) 0 |
24669e584 hugetlb: use mmu_... |
132 133 134 135 |
static inline int dequeue_hwpoisoned_huge_page(struct page *page) { return 0; } |
f40386a4e include/linux/hug... |
136 137 138 139 |
static inline bool isolate_huge_page(struct page *page, struct list_head *list) { return false; } |
31caf665e mm: migrate: make... |
140 |
#define putback_active_hugepage(p) do {} while (0) |
c8721bbbd mm: memory-hotplu... |
141 |
#define is_hugepage_active(x) false |
1da177e4c Linux-2.6.12-rc2 |
142 |
|
7da4d641c mm: Count the num... |
143 144 145 146 147 |
static inline unsigned long hugetlb_change_protection(struct vm_area_struct *vma, unsigned long address, unsigned long end, pgprot_t newprot) { return 0; } |
8f860591f [PATCH] Enable mp... |
148 |
|
d833352a4 mm: hugetlbfs: cl... |
149 150 151 152 153 154 |
static inline void __unmap_hugepage_range_final(struct mmu_gather *tlb, struct vm_area_struct *vma, unsigned long start, unsigned long end, struct page *ref_page) { BUG(); } |
24669e584 hugetlb: use mmu_... |
155 156 157 158 159 160 |
static inline void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma, unsigned long start, unsigned long end, struct page *ref_page) { BUG(); } |
1da177e4c Linux-2.6.12-rc2 |
161 |
#endif /* !CONFIG_HUGETLB_PAGE */ |
4e52780d4 hugetlb: add MAP_... |
162 |
#define HUGETLB_ANON_FILE "anon_hugepage" |
6bfde05bf hugetlbfs: allow ... |
163 164 165 166 167 168 |
enum { /* * The file will be used as an shm file so shmfs accounting rules * apply */ HUGETLB_SHMFS_INODE = 1, |
4e52780d4 hugetlb: add MAP_... |
169 170 171 172 173 |
/* * The file is being created on the internal vfs mount and shmfs * accounting rules do not apply */ HUGETLB_ANONHUGE_INODE = 2, |
6bfde05bf hugetlbfs: allow ... |
174 |
}; |
1da177e4c Linux-2.6.12-rc2 |
175 |
#ifdef CONFIG_HUGETLBFS |
1da177e4c Linux-2.6.12-rc2 |
176 |
struct hugetlbfs_sb_info { |
1da177e4c Linux-2.6.12-rc2 |
177 178 179 |
long max_inodes; /* inodes allowed */ long free_inodes; /* inodes free */ spinlock_t stat_lock; |
a137e1cc6 hugetlbfs: per mo... |
180 |
struct hstate *hstate; |
90481622d hugepages: fix us... |
181 |
struct hugepage_subpool *spool; |
1da177e4c Linux-2.6.12-rc2 |
182 |
}; |
1da177e4c Linux-2.6.12-rc2 |
183 184 185 186 |
static inline struct hugetlbfs_sb_info *HUGETLBFS_SB(struct super_block *sb) { return sb->s_fs_info; } |
4b6f5d20b [PATCH] Make most... |
187 |
extern const struct file_operations hugetlbfs_file_operations; |
f0f37e2f7 const: mark struc... |
188 |
extern const struct vm_operations_struct hugetlb_vm_ops; |
af73e4d95 hugetlbfs: fix mm... |
189 |
struct file *hugetlb_file_setup(const char *name, size_t size, vm_flags_t acct, |
42d7395fe mm: support more ... |
190 191 |
struct user_struct **user, int creat_flags, int page_size_log); |
1da177e4c Linux-2.6.12-rc2 |
192 193 194 |
static inline int is_file_hugepages(struct file *file) { |
516dffdcd [PATCH] Fix get_u... |
195 196 197 198 199 200 |
if (file->f_op == &hugetlbfs_file_operations) return 1; if (is_file_shm_hugepages(file)) return 1; return 0; |
1da177e4c Linux-2.6.12-rc2 |
201 |
} |
42d7395fe mm: support more ... |
202 |
|
1da177e4c Linux-2.6.12-rc2 |
203 |
#else /* !CONFIG_HUGETLBFS */ |
1db8508cf hugetlbfs: fix bu... |
204 |
#define is_file_hugepages(file) 0 |
40716e292 hugetlbfs: fix al... |
205 |
static inline struct file * |
af73e4d95 hugetlbfs: fix mm... |
206 207 |
hugetlb_file_setup(const char *name, size_t size, vm_flags_t acctflag, struct user_struct **user, int creat_flags, |
42d7395fe mm: support more ... |
208 |
int page_size_log) |
e9ea0e2d1 hugetlb_file_setu... |
209 210 211 |
{ return ERR_PTR(-ENOSYS); } |
1da177e4c Linux-2.6.12-rc2 |
212 213 |
#endif /* !CONFIG_HUGETLBFS */ |
d2ba27e80 proper prototype ... |
214 215 216 217 218 |
#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 */ |
a55164389 hugetlb: modular ... |
219 |
#ifdef CONFIG_HUGETLB_PAGE |
a34378701 hugetlb: new sysf... |
220 |
#define HSTATE_NAME_LEN 32 |
a55164389 hugetlb: modular ... |
221 222 |
/* Defines one hugetlb page size */ struct hstate { |
e8c5c8249 hugetlb: balance ... |
223 224 |
int next_nid_to_alloc; int next_nid_to_free; |
a55164389 hugetlb: modular ... |
225 226 227 228 229 230 231 232 |
unsigned int order; unsigned long mask; unsigned long max_huge_pages; unsigned long nr_huge_pages; unsigned long free_huge_pages; unsigned long resv_huge_pages; unsigned long surplus_huge_pages; unsigned long nr_overcommit_huge_pages; |
0edaecfab hugetlb: add a li... |
233 |
struct list_head hugepage_activelist; |
a55164389 hugetlb: modular ... |
234 235 236 237 |
struct list_head hugepage_freelists[MAX_NUMNODES]; unsigned int nr_huge_pages_node[MAX_NUMNODES]; unsigned int free_huge_pages_node[MAX_NUMNODES]; unsigned int surplus_huge_pages_node[MAX_NUMNODES]; |
abb8206cb hugetlb/cgroup: a... |
238 239 240 241 |
#ifdef CONFIG_CGROUP_HUGETLB /* cgroup control files */ struct cftype cgroup_files[5]; #endif |
a34378701 hugetlb: new sysf... |
242 |
char name[HSTATE_NAME_LEN]; |
a55164389 hugetlb: modular ... |
243 |
}; |
53ba51d21 hugetlb: allow ar... |
244 245 246 |
struct huge_bootmem_page { struct list_head list; struct hstate *hstate; |
ee8f248d2 hugetlb: add phys... |
247 248 249 |
#ifdef CONFIG_HIGHMEM phys_addr_t phys; #endif |
53ba51d21 hugetlb: allow ar... |
250 |
}; |
bf50bab2b hugetlb: add allo... |
251 |
struct page *alloc_huge_page_node(struct hstate *h, int nid); |
74060e4d7 mm: mbind: add hu... |
252 253 |
struct page *alloc_huge_page_noerr(struct vm_area_struct *vma, unsigned long addr, int avoid_reserve); |
bf50bab2b hugetlb: add allo... |
254 |
|
53ba51d21 hugetlb: allow ar... |
255 256 |
/* arch callback */ int __init alloc_bootmem_huge_page(struct hstate *h); |
e5ff21594 hugetlb: multiple... |
257 258 259 260 261 262 263 264 265 266 267 |
void __init hugetlb_add_hstate(unsigned order); struct hstate *size_to_hstate(unsigned long size); #ifndef HUGE_MAX_HSTATE #define HUGE_MAX_HSTATE 1 #endif extern struct hstate hstates[HUGE_MAX_HSTATE]; extern unsigned int default_hstate_idx; #define default_hstate (hstates[default_hstate_idx]) |
a55164389 hugetlb: modular ... |
268 |
|
a137e1cc6 hugetlbfs: per mo... |
269 |
static inline struct hstate *hstate_inode(struct inode *i) |
a55164389 hugetlb: modular ... |
270 |
{ |
a137e1cc6 hugetlbfs: per mo... |
271 272 273 |
struct hugetlbfs_sb_info *hsb; hsb = HUGETLBFS_SB(i->i_sb); return hsb->hstate; |
a55164389 hugetlb: modular ... |
274 275 276 277 |
} static inline struct hstate *hstate_file(struct file *f) { |
496ad9aa8 new helper: file_... |
278 |
return hstate_inode(file_inode(f)); |
a55164389 hugetlb: modular ... |
279 |
} |
af73e4d95 hugetlbfs: fix mm... |
280 281 282 283 284 285 |
static inline struct hstate *hstate_sizelog(int page_size_log) { if (!page_size_log) return &default_hstate; return size_to_hstate(1 << page_size_log); } |
a137e1cc6 hugetlbfs: per mo... |
286 |
static inline struct hstate *hstate_vma(struct vm_area_struct *vma) |
a55164389 hugetlb: modular ... |
287 |
{ |
a137e1cc6 hugetlbfs: per mo... |
288 |
return hstate_file(vma->vm_file); |
a55164389 hugetlb: modular ... |
289 290 291 292 293 294 |
} static inline unsigned long huge_page_size(struct hstate *h) { return (unsigned long)PAGE_SIZE << h->order; } |
08fba6998 mm: report the pa... |
295 |
extern unsigned long vma_kernel_pagesize(struct vm_area_struct *vma); |
3340289dd mm: report the MM... |
296 |
extern unsigned long vma_mmu_pagesize(struct vm_area_struct *vma); |
a55164389 hugetlb: modular ... |
297 298 299 300 301 302 303 304 305 306 307 308 309 310 |
static inline unsigned long huge_page_mask(struct hstate *h) { return h->mask; } static inline unsigned int huge_page_order(struct hstate *h) { return h->order; } static inline unsigned huge_page_shift(struct hstate *h) { return h->order + PAGE_SHIFT; } |
bae7f4ae1 hugetlb: add hsta... |
311 312 313 314 |
static inline bool hstate_is_gigantic(struct hstate *h) { return huge_page_order(h) >= MAX_ORDER; } |
a55164389 hugetlb: modular ... |
315 316 317 318 319 320 321 322 323 324 325 |
static inline unsigned int pages_per_huge_page(struct hstate *h) { return 1 << h->order; } static inline unsigned int blocks_per_huge_page(struct hstate *h) { return huge_page_size(h) / 512; } #include <asm/hugetlb.h> |
d9ed9faac mm: add new arch_... |
326 327 328 329 330 331 332 |
#ifndef arch_make_huge_pte static inline pte_t arch_make_huge_pte(pte_t entry, struct vm_area_struct *vma, struct page *page, int writable) { return entry; } #endif |
e5ff21594 hugetlb: multiple... |
333 334 |
static inline struct hstate *page_hstate(struct page *page) { |
309381fea mm: dump page whe... |
335 |
VM_BUG_ON_PAGE(!PageHuge(page), page); |
e5ff21594 hugetlb: multiple... |
336 337 |
return size_to_hstate(PAGE_SIZE << compound_order(page)); } |
aa50d3a7a Encode huge page ... |
338 339 340 341 |
static inline unsigned hstate_index_to_shift(unsigned index) { return hstates[index].order + PAGE_SHIFT; } |
972dc4de1 hugetlb: add an i... |
342 343 344 345 |
static inline int hstate_index(struct hstate *h) { return h - hstates; } |
13d60f4b6 futex: Take hugep... |
346 347 348 349 350 351 352 353 354 355 |
pgoff_t __basepage_index(struct page *page); /* Return page->index in PAGE_SIZE units */ static inline pgoff_t basepage_index(struct page *page) { if (!PageCompound(page)) return page->index; return __basepage_index(page); } |
c8721bbbd mm: memory-hotplu... |
356 357 |
extern void dissolve_free_huge_pages(unsigned long start_pfn, unsigned long end_pfn); |
100873d7a hugetlb: rename h... |
358 |
static inline int hugepage_migration_supported(struct hstate *h) |
83467efbd mm: migrate: chec... |
359 |
{ |
c177c81e0 hugetlb: restrict... |
360 361 362 363 364 |
#ifdef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION return huge_page_shift(h) == PMD_SHIFT; #else return 0; #endif |
83467efbd mm: migrate: chec... |
365 |
} |
c8721bbbd mm: memory-hotplu... |
366 |
|
cb900f412 mm, hugetlb: conv... |
367 368 369 370 371 372 373 374 |
static inline spinlock_t *huge_pte_lockptr(struct hstate *h, struct mm_struct *mm, pte_t *pte) { if (huge_page_size(h) == PMD_SIZE) return pmd_lockptr(mm, (pmd_t *) pte); VM_BUG_ON(huge_page_size(h) == PAGE_SIZE); return &mm->page_table_lock; } |
457c1b27e hugetlb: ensure h... |
375 376 377 378 379 380 381 382 383 |
static inline bool hugepages_supported(void) { /* * Some platform decide whether they support huge pages at boot * time. On these, such as powerpc, HPAGE_SHIFT is set to 0 when * there is no such support */ return HPAGE_SHIFT != 0; } |
af73e4d95 hugetlbfs: fix mm... |
384 |
#else /* CONFIG_HUGETLB_PAGE */ |
a55164389 hugetlb: modular ... |
385 |
struct hstate {}; |
bf50bab2b hugetlb: add allo... |
386 |
#define alloc_huge_page_node(h, nid) NULL |
74060e4d7 mm: mbind: add hu... |
387 |
#define alloc_huge_page_noerr(v, a, r) NULL |
53ba51d21 hugetlb: allow ar... |
388 |
#define alloc_bootmem_huge_page(h) NULL |
a55164389 hugetlb: modular ... |
389 |
#define hstate_file(f) NULL |
af73e4d95 hugetlbfs: fix mm... |
390 |
#define hstate_sizelog(s) NULL |
a55164389 hugetlb: modular ... |
391 392 |
#define hstate_vma(v) NULL #define hstate_inode(i) NULL |
cb900f412 mm, hugetlb: conv... |
393 |
#define page_hstate(page) NULL |
a55164389 hugetlb: modular ... |
394 395 |
#define huge_page_size(h) PAGE_SIZE #define huge_page_mask(h) PAGE_MASK |
08fba6998 mm: report the pa... |
396 |
#define vma_kernel_pagesize(v) PAGE_SIZE |
3340289dd mm: report the MM... |
397 |
#define vma_mmu_pagesize(v) PAGE_SIZE |
a55164389 hugetlb: modular ... |
398 399 |
#define huge_page_order(h) 0 #define huge_page_shift(h) PAGE_SHIFT |
510a35d4a hugetlb: remove u... |
400 401 402 403 |
static inline unsigned int pages_per_huge_page(struct hstate *h) { return 1; } |
aa50d3a7a Encode huge page ... |
404 |
#define hstate_index_to_shift(index) 0 |
972dc4de1 hugetlb: add an i... |
405 |
#define hstate_index(h) 0 |
13d60f4b6 futex: Take hugep... |
406 407 408 409 410 |
static inline pgoff_t basepage_index(struct page *page) { return page->index; } |
c8721bbbd mm: memory-hotplu... |
411 |
#define dissolve_free_huge_pages(s, e) do {} while (0) |
100873d7a hugetlb: rename h... |
412 |
#define hugepage_migration_supported(h) 0 |
cb900f412 mm, hugetlb: conv... |
413 414 415 416 417 418 |
static inline spinlock_t *huge_pte_lockptr(struct hstate *h, struct mm_struct *mm, pte_t *pte) { return &mm->page_table_lock; } |
af73e4d95 hugetlbfs: fix mm... |
419 |
#endif /* CONFIG_HUGETLB_PAGE */ |
a55164389 hugetlb: modular ... |
420 |
|
cb900f412 mm, hugetlb: conv... |
421 422 423 424 425 426 427 428 429 |
static inline spinlock_t *huge_pte_lock(struct hstate *h, struct mm_struct *mm, pte_t *pte) { spinlock_t *ptl; ptl = huge_pte_lockptr(h, mm, pte); spin_lock(ptl); return ptl; } |
1da177e4c Linux-2.6.12-rc2 |
430 |
#endif /* _LINUX_HUGETLB_H */ |