Home | History | Annotate | Download | only in asm
      1 #ifndef _X86_64_PAGE_H
      2 #define _X86_64_PAGE_H
      3 
      4 #include <linux/const.h>
      5 
      6 /* PAGE_SHIFT determines the page size */
      7 #define PAGE_SHIFT	12
      8 #define PAGE_SIZE	(_AC(1,UL) << PAGE_SHIFT)
      9 #define PAGE_MASK	(~(PAGE_SIZE-1))
     10 #define PHYSICAL_PAGE_MASK	(~(PAGE_SIZE-1) & __PHYSICAL_MASK)
     11 
     12 #define THREAD_ORDER 1
     13 #define THREAD_SIZE  (PAGE_SIZE << THREAD_ORDER)
     14 #define CURRENT_MASK (~(THREAD_SIZE-1))
     15 
     16 #define EXCEPTION_STACK_ORDER 0
     17 #define EXCEPTION_STKSZ (PAGE_SIZE << EXCEPTION_STACK_ORDER)
     18 
     19 #define DEBUG_STACK_ORDER (EXCEPTION_STACK_ORDER + 1)
     20 #define DEBUG_STKSZ (PAGE_SIZE << DEBUG_STACK_ORDER)
     21 
     22 #define IRQSTACK_ORDER 2
     23 #define IRQSTACKSIZE (PAGE_SIZE << IRQSTACK_ORDER)
     24 
     25 #define STACKFAULT_STACK 1
     26 #define DOUBLEFAULT_STACK 2
     27 #define NMI_STACK 3
     28 #define DEBUG_STACK 4
     29 #define MCE_STACK 5
     30 #define N_EXCEPTION_STACKS 5  /* hw limit: 7 */
     31 
     32 #define LARGE_PAGE_MASK (~(LARGE_PAGE_SIZE-1))
     33 #define LARGE_PAGE_SIZE (_AC(1,UL) << PMD_SHIFT)
     34 
     35 #define HPAGE_SHIFT PMD_SHIFT
     36 #define HPAGE_SIZE	(_AC(1,UL) << HPAGE_SHIFT)
     37 #define HPAGE_MASK	(~(HPAGE_SIZE - 1))
     38 #define HUGETLB_PAGE_ORDER	(HPAGE_SHIFT - PAGE_SHIFT)
     39 
     40 
     41 #endif /* _X86_64_PAGE_H */
     42