diff options
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index bb793a4c8e9e..a0eec16eb0bd 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -437,15 +437,15 @@ static inline compound_page_dtor *get_compound_page_dtor(struct page *page) | |||
437 | /* NODE:ZONE or SECTION:ZONE is used to ID a zone for the buddy allcator */ | 437 | /* NODE:ZONE or SECTION:ZONE is used to ID a zone for the buddy allcator */ |
438 | #ifdef NODE_NOT_IN_PAGEFLAGS | 438 | #ifdef NODE_NOT_IN_PAGEFLAGS |
439 | #define ZONEID_SHIFT (SECTIONS_SHIFT + ZONES_SHIFT) | 439 | #define ZONEID_SHIFT (SECTIONS_SHIFT + ZONES_SHIFT) |
440 | #define ZONEID_PGOFF ((SECTIONS_PGOFF < ZONES_PGOFF)? \ | ||
441 | SECTIONS_PGOFF : ZONES_PGOFF) | ||
440 | #else | 442 | #else |
441 | #define ZONEID_SHIFT (NODES_SHIFT + ZONES_SHIFT) | 443 | #define ZONEID_SHIFT (NODES_SHIFT + ZONES_SHIFT) |
444 | #define ZONEID_PGOFF ((NODES_PGOFF < ZONES_PGOFF)? \ | ||
445 | NODES_PGOFF : ZONES_PGOFF) | ||
442 | #endif | 446 | #endif |
443 | 447 | ||
444 | #if ZONES_WIDTH > 0 | 448 | #define ZONEID_PGSHIFT (ZONEID_PGOFF * (ZONEID_SHIFT != 0)) |
445 | #define ZONEID_PGSHIFT ZONES_PGSHIFT | ||
446 | #else | ||
447 | #define ZONEID_PGSHIFT NODES_PGOFF | ||
448 | #endif | ||
449 | 449 | ||
450 | #if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED | 450 | #if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED |
451 | #error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED | 451 | #error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED |
@@ -471,7 +471,6 @@ static inline enum zone_type page_zonenum(struct page *page) | |||
471 | */ | 471 | */ |
472 | static inline int page_zone_id(struct page *page) | 472 | static inline int page_zone_id(struct page *page) |
473 | { | 473 | { |
474 | BUILD_BUG_ON(ZONEID_PGSHIFT == 0 && ZONEID_MASK); | ||
475 | return (page->flags >> ZONEID_PGSHIFT) & ZONEID_MASK; | 474 | return (page->flags >> ZONEID_PGSHIFT) & ZONEID_MASK; |
476 | } | 475 | } |
477 | 476 | ||
@@ -638,6 +637,7 @@ static inline int page_mapped(struct page *page) | |||
638 | */ | 637 | */ |
639 | #define NOPFN_SIGBUS ((unsigned long) -1) | 638 | #define NOPFN_SIGBUS ((unsigned long) -1) |
640 | #define NOPFN_OOM ((unsigned long) -2) | 639 | #define NOPFN_OOM ((unsigned long) -2) |
640 | #define NOPFN_REFAULT ((unsigned long) -3) | ||
641 | 641 | ||
642 | /* | 642 | /* |
643 | * Different kinds of faults, as returned by handle_mm_fault(). | 643 | * Different kinds of faults, as returned by handle_mm_fault(). |
@@ -786,6 +786,7 @@ extern int try_to_release_page(struct page * page, gfp_t gfp_mask); | |||
786 | extern void do_invalidatepage(struct page *page, unsigned long offset); | 786 | extern void do_invalidatepage(struct page *page, unsigned long offset); |
787 | 787 | ||
788 | int __set_page_dirty_nobuffers(struct page *page); | 788 | int __set_page_dirty_nobuffers(struct page *page); |
789 | int __set_page_dirty_no_writeback(struct page *page); | ||
789 | int redirty_page_for_writepage(struct writeback_control *wbc, | 790 | int redirty_page_for_writepage(struct writeback_control *wbc, |
790 | struct page *page); | 791 | struct page *page); |
791 | int FASTCALL(set_page_dirty(struct page *page)); | 792 | int FASTCALL(set_page_dirty(struct page *page)); |
@@ -1124,6 +1125,8 @@ unsigned long vmalloc_to_pfn(void *addr); | |||
1124 | int remap_pfn_range(struct vm_area_struct *, unsigned long addr, | 1125 | int remap_pfn_range(struct vm_area_struct *, unsigned long addr, |
1125 | unsigned long pfn, unsigned long size, pgprot_t); | 1126 | unsigned long pfn, unsigned long size, pgprot_t); |
1126 | int vm_insert_page(struct vm_area_struct *, unsigned long addr, struct page *); | 1127 | int vm_insert_page(struct vm_area_struct *, unsigned long addr, struct page *); |
1128 | int vm_insert_pfn(struct vm_area_struct *vma, unsigned long addr, | ||
1129 | unsigned long pfn); | ||
1127 | 1130 | ||
1128 | struct page *follow_page(struct vm_area_struct *, unsigned long address, | 1131 | struct page *follow_page(struct vm_area_struct *, unsigned long address, |
1129 | unsigned int foll_flags); | 1132 | unsigned int foll_flags); |