~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/x86/include/asm/page_types.h

Version: ~ [ linux-5.4-rc7 ] ~ [ linux-5.3.11 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.84 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.154 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.201 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.201 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.77 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef _ASM_X86_PAGE_DEFS_H
  2 #define _ASM_X86_PAGE_DEFS_H
  3 
  4 #include <linux/const.h>
  5 #include <linux/types.h>
  6 
  7 /* PAGE_SHIFT determines the page size */
  8 #define PAGE_SHIFT      12
  9 #define PAGE_SIZE       (_AC(1,UL) << PAGE_SHIFT)
 10 #define PAGE_MASK       (~(PAGE_SIZE-1))
 11 
 12 #define __PHYSICAL_MASK         ((phys_addr_t)((1ULL << __PHYSICAL_MASK_SHIFT) - 1))
 13 #define __VIRTUAL_MASK          ((1UL << __VIRTUAL_MASK_SHIFT) - 1)
 14 
 15 /* Cast PAGE_MASK to a signed type so that it is sign-extended if
 16    virtual addresses are 32-bits but physical addresses are larger
 17    (ie, 32-bit PAE). */
 18 #define PHYSICAL_PAGE_MASK      (((signed long)PAGE_MASK) & __PHYSICAL_MASK)
 19 
 20 #define PMD_PAGE_SIZE           (_AC(1, UL) << PMD_SHIFT)
 21 #define PMD_PAGE_MASK           (~(PMD_PAGE_SIZE-1))
 22 
 23 #define HPAGE_SHIFT             PMD_SHIFT
 24 #define HPAGE_SIZE              (_AC(1,UL) << HPAGE_SHIFT)
 25 #define HPAGE_MASK              (~(HPAGE_SIZE - 1))
 26 #define HUGETLB_PAGE_ORDER      (HPAGE_SHIFT - PAGE_SHIFT)
 27 
 28 #define HUGE_MAX_HSTATE 2
 29 
 30 #define PAGE_OFFSET             ((unsigned long)__PAGE_OFFSET)
 31 
 32 #define VM_DATA_DEFAULT_FLAGS \
 33         (((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0 ) | \
 34          VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
 35 
 36 #define __PHYSICAL_START        ALIGN(CONFIG_PHYSICAL_START, \
 37                                       CONFIG_PHYSICAL_ALIGN)
 38 
 39 #define __START_KERNEL          (__START_KERNEL_map + __PHYSICAL_START)
 40 
 41 #ifdef CONFIG_X86_64
 42 #include <asm/page_64_types.h>
 43 #define IOREMAP_MAX_ORDER       (PUD_SHIFT)
 44 #else
 45 #include <asm/page_32_types.h>
 46 #define IOREMAP_MAX_ORDER       (PMD_SHIFT)
 47 #endif  /* CONFIG_X86_64 */
 48 
 49 #ifndef __ASSEMBLY__
 50 
 51 extern int devmem_is_allowed(unsigned long pagenr);
 52 
 53 extern unsigned long max_low_pfn_mapped;
 54 extern unsigned long max_pfn_mapped;
 55 
 56 static inline phys_addr_t get_max_mapped(void)
 57 {
 58         return (phys_addr_t)max_pfn_mapped << PAGE_SHIFT;
 59 }
 60 
 61 bool pfn_range_is_mapped(unsigned long start_pfn, unsigned long end_pfn);
 62 
 63 extern unsigned long init_memory_mapping(unsigned long start,
 64                                          unsigned long end);
 65 
 66 extern void initmem_init(void);
 67 
 68 #endif  /* !__ASSEMBLY__ */
 69 
 70 #endif  /* _ASM_X86_PAGE_DEFS_H */
 71 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp