Skip to content

Commit b83ce5e

Browse files
kirylIngo Molnar
authored andcommitted
x86/mm/64: Make __PHYSICAL_MASK_SHIFT always 52
__PHYSICAL_MASK_SHIFT is used to define the mask that helps to extract physical address from a page table entry. Although real physical address space available may differ between machines, it's safe to use 52 as __PHYSICAL_MASK_SHIFT. Unused bits above log2(MAXPHYADDR) up to bit 51 are reserved and must be 0. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@suse.de> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20180214111656.88514-2-kirill.shutemov@linux.intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 116fef6 commit b83ce5e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

arch/x86/include/asm/page_64_types.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,12 @@
5252
#define __START_KERNEL_map _AC(0xffffffff80000000, UL)
5353

5454
/* See Documentation/x86/x86_64/mm.txt for a description of the memory map. */
55-
#ifdef CONFIG_X86_5LEVEL
55+
5656
#define __PHYSICAL_MASK_SHIFT 52
57+
58+
#ifdef CONFIG_X86_5LEVEL
5759
#define __VIRTUAL_MASK_SHIFT 56
5860
#else
59-
#define __PHYSICAL_MASK_SHIFT 46
6061
#define __VIRTUAL_MASK_SHIFT 47
6162
#endif
6263

0 commit comments

Comments
 (0)