Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] mm: correct _PAGE_FILE comment

_PAGE_FILE does not indicate whether a file is in page / swap cache, it is
set just for non-linear PTE's. Correct the comment for i386, x86_64, UML.
Also clearify _PAGE_NONE.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Paolo 'Blaisorblade' Giarrusso and committed by
Linus Torvalds
9b4ee40e 4944e76d

+11 -9
+5 -5
include/asm-i386/pgtable.h
··· 86 86 #endif 87 87 88 88 /* 89 - * The 4MB page is guessing.. Detailed in the infamous "Chapter H" 90 - * of the Pentium details, but assuming intel did the straightforward 91 - * thing, this bit set in the page directory entry just means that 89 + * _PAGE_PSE set in the page directory entry just means that 92 90 * the page directory entry points directly to a 4MB-aligned block of 93 91 * memory. 94 92 */ ··· 117 119 #define _PAGE_UNUSED2 0x400 118 120 #define _PAGE_UNUSED3 0x800 119 121 120 - #define _PAGE_FILE 0x040 /* set:pagecache unset:swap */ 121 - #define _PAGE_PROTNONE 0x080 /* If not present */ 122 + /* If _PAGE_PRESENT is clear, we use these: */ 123 + #define _PAGE_FILE 0x040 /* nonlinear file mapping, saved PTE; unset:swap */ 124 + #define _PAGE_PROTNONE 0x080 /* if the user mapped it with PROT_NONE; 125 + pte_present gives true */ 122 126 #ifdef CONFIG_X86_PAE 123 127 #define _PAGE_NX (1ULL<<_PAGE_BIT_NX) 124 128 #else
+5 -3
include/asm-um/pgtable.h
··· 16 16 17 17 #define _PAGE_PRESENT 0x001 18 18 #define _PAGE_NEWPAGE 0x002 19 - #define _PAGE_NEWPROT 0x004 20 - #define _PAGE_FILE 0x008 /* set:pagecache unset:swap */ 21 - #define _PAGE_PROTNONE 0x010 /* If not present */ 19 + #define _PAGE_NEWPROT 0x004 22 20 #define _PAGE_RW 0x020 23 21 #define _PAGE_USER 0x040 24 22 #define _PAGE_ACCESSED 0x080 25 23 #define _PAGE_DIRTY 0x100 24 + /* If _PAGE_PRESENT is clear, we use these: */ 25 + #define _PAGE_FILE 0x008 /* nonlinear file mapping, saved PTE; unset:swap */ 26 + #define _PAGE_PROTNONE 0x010 /* if the user mapped it with PROT_NONE; 27 + pte_present gives true */ 26 28 27 29 #ifdef CONFIG_3_LEVEL_PGTABLES 28 30 #include "asm/pgtable-3level.h"
+1 -1
include/asm-x86_64/pgtable.h
··· 143 143 #define _PAGE_ACCESSED 0x020 144 144 #define _PAGE_DIRTY 0x040 145 145 #define _PAGE_PSE 0x080 /* 2MB page */ 146 - #define _PAGE_FILE 0x040 /* set:pagecache, unset:swap */ 146 + #define _PAGE_FILE 0x040 /* nonlinear file mapping, saved PTE; unset:swap */ 147 147 #define _PAGE_GLOBAL 0x100 /* Global TLB entry */ 148 148 149 149 #define _PAGE_PROTNONE 0x080 /* If not present */