Linux Kernel
3.7.1
|
Go to the source code of this file.
Macros | |
#define | pte_ERROR(e) printk("%s:%d: bad pte %016Lx.\n", __FILE__, __LINE__, pte_val(e)) |
#define | pgd_ERROR(e) printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e)) |
#define | set_pmd(pmdptr, pmdval) (*(pmdptr) = pmdval) |
#define | set_pte_at(mm, addr, ptep, pteval) set_pte(ptep,pteval) |
#define | pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1)) |
#define | __pgd_offset(address) pgd_index(address) |
#define | pgd_offset(mm, address) ((mm)->pgd+pgd_index(address)) |
#define | pgd_offset_k(address) pgd_offset(&init_mm, address) |
#define | __pud_offset(address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD-1)) |
#define | __pmd_offset(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1)) |
#define | _PMD_EMPTY 0x0 |
#define | pmd_present(pmd_entry) (pmd_val(pmd_entry) & _PAGE_PRESENT) |
#define | pmd_clear(pmd_entry_p) (set_pmd((pmd_entry_p), __pmd(_PMD_EMPTY))) |
#define | pmd_none(pmd_entry) (pmd_val((pmd_entry)) == _PMD_EMPTY) |
#define | pmd_bad(pmd_entry) ((pmd_val(pmd_entry) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE) |
#define | pmd_page_vaddr(pmd_entry) ((unsigned long) __va(pmd_val(pmd_entry) & PAGE_MASK)) |
#define | pmd_page(pmd) (virt_to_page(pmd_val(pmd))) |
#define | pte_index(address) ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) |
#define | __pte_offset(address) pte_index(address) |
#define | pte_offset_kernel(dir, addr) ((pte_t *) ((pmd_val(*(dir))) & PAGE_MASK) + pte_index((addr))) |
#define | pte_offset_map(dir, addr) pte_offset_kernel(dir, addr) |
#define | pte_unmap(pte) do { } while (0) |
#define | _PAGE_WT 0x001 /* CB0: if cacheable, 1->write-thru, 0->write-back */ |
#define | _PAGE_DEVICE 0x001 /* CB0: if uncacheable, 1->device (i.e. no write-combining or reordering at bus level) */ |
#define | _PAGE_CACHABLE 0x002 /* CB1: uncachable/cachable */ |
#define | _PAGE_PRESENT 0x004 /* software: page referenced */ |
#define | _PAGE_FILE 0x004 /* software: only when !present */ |
#define | _PAGE_SIZE0 0x008 /* SZ0-bit : size of page */ |
#define | _PAGE_SIZE1 0x010 /* SZ1-bit : size of page */ |
#define | _PAGE_SHARED 0x020 /* software: reflects PTEH's SH */ |
#define | _PAGE_READ 0x040 /* PR0-bit : read access allowed */ |
#define | _PAGE_EXECUTE 0x080 /* PR1-bit : execute access allowed */ |
#define | _PAGE_WRITE 0x100 /* PR2-bit : write access allowed */ |
#define | _PAGE_USER 0x200 /* PR3-bit : user space access allowed */ |
#define | _PAGE_DIRTY 0x400 /* software: page accessed in write */ |
#define | _PAGE_ACCESSED 0x800 /* software: page referenced */ |
#define | _PAGE_EXT(x) ((unsigned long long)(x) << 32) |
#define | _PAGE_WIRED _PAGE_EXT(0x001) /* software: wire the tlb entry */ |
#define | _PAGE_SPECIAL _PAGE_EXT(0x002) |
#define | _PAGE_CLEAR_FLAGS |
#define | _PAGE_FLAGS_HARDWARE_MASK (NEFF_MASK & ~(_PAGE_CLEAR_FLAGS)) |
#define | _PAGE_SZHUGE (0) |
#define | _KERNPG_TABLE |
#define | _PAGE_TABLE (_KERNPG_TABLE | _PAGE_USER) |
#define | _PAGE_CHG_MASK |
#define | _PAGE_COMMON |
#define | PAGE_NONE __pgprot(_PAGE_CACHABLE | _PAGE_ACCESSED) |
#define | PAGE_SHARED |
#define | PAGE_EXECREAD __pgprot(_PAGE_COMMON | _PAGE_READ | _PAGE_EXECUTE) |
#define | PAGE_COPY PAGE_EXECREAD |
#define | PAGE_READONLY __pgprot(_PAGE_COMMON | _PAGE_READ) |
#define | PAGE_WRITEONLY __pgprot(_PAGE_COMMON | _PAGE_WRITE) |
#define | PAGE_RWX |
#define | PAGE_KERNEL __pgprot(_KERNPG_TABLE) |
#define | PAGE_KERNEL_NOCACHE |
#define | pgprot_noncached(x) __pgprot(((x).pgprot & ~(_PAGE_CACHABLE)) | _PAGE_DEVICE) |
#define | pgprot_writecombine(prot) __pgprot(pgprot_val(prot) & ~_PAGE_CACHABLE) |
#define | _PTE_EMPTY 0x0 |
#define | pte_present(x) (pte_val(x) & _PAGE_PRESENT) |
#define | pte_clear(mm, addr, xp) (set_pte_at(mm, addr, xp, __pte(_PTE_EMPTY))) |
#define | pte_none(x) (pte_val(x) == _PTE_EMPTY) |
#define | pte_pagenr(x) |
#define | pte_page(x) (mem_map + pte_pagenr(x)) |
#define | pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) |
#define | mk_pte(page, pgprot) |
#define | mk_pte_phys(physpage, pgprot) ({ pte_t __pte; set_pte(&__pte, __pte(physpage | pgprot_val(pgprot))); __pte; }) |
#define | __swp_type(x) (((x).val & 3) + (((x).val >> 1) & 0x3c)) |
#define | __swp_offset(x) ((x).val >> 8) |
#define | __swp_entry(type, offset) ((swp_entry_t) { ((offset << 8) + ((type & 0x3c) << 1) + (type & 3)) }) |
#define | __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) |
#define | __swp_entry_to_pte(x) ((pte_t) { (x).val }) |
#define | PTE_FILE_MAX_BITS 29 |
#define | pte_to_pgoff(pte) (pte_val(pte)) |
#define | pgoff_to_pte(off) ((pte_t) { (off) | _PAGE_FILE }) |
#define | pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) |
#define | pfn_pmd(pfn, prot) __pmd(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) |
Definition at line 52 of file pgtable_64.h.
#define __pmd_offset | ( | address | ) | (((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1)) |
Definition at line 59 of file pgtable_64.h.
Definition at line 81 of file pgtable_64.h.
#define __pte_to_swp_entry | ( | pte | ) | ((swp_entry_t) { pte_val(pte) }) |
Definition at line 304 of file pgtable_64.h.
#define __pud_offset | ( | address | ) | (((address) >> PUD_SHIFT) & (PTRS_PER_PUD-1)) |
Definition at line 58 of file pgtable_64.h.
#define __swp_entry | ( | type, | |
offset | |||
) | ((swp_entry_t) { ((offset << 8) + ((type & 0x3c) << 1) + (type & 3)) }) |
Definition at line 303 of file pgtable_64.h.
Definition at line 302 of file pgtable_64.h.
Definition at line 301 of file pgtable_64.h.
#define _KERNPG_TABLE |
Definition at line 166 of file pgtable_64.h.
#define _PAGE_ACCESSED 0x800 /* software: page referenced */ |
Definition at line 119 of file pgtable_64.h.
#define _PAGE_CACHABLE 0x002 /* CB1: uncachable/cachable */ |
Definition at line 108 of file pgtable_64.h.
#define _PAGE_CHG_MASK |
Definition at line 174 of file pgtable_64.h.
#define _PAGE_CLEAR_FLAGS |
Definition at line 132 of file pgtable_64.h.
#define _PAGE_COMMON |
Definition at line 180 of file pgtable_64.h.
#define _PAGE_DEVICE 0x001 /* CB0: if uncacheable, 1->device (i.e. no write-combining or reordering at bus level) */ |
Definition at line 107 of file pgtable_64.h.
#define _PAGE_DIRTY 0x400 /* software: page accessed in write */ |
Definition at line 118 of file pgtable_64.h.
#define _PAGE_EXECUTE 0x080 /* PR1-bit : execute access allowed */ |
Definition at line 115 of file pgtable_64.h.
#define _PAGE_FILE 0x004 /* software: only when !present */ |
Definition at line 110 of file pgtable_64.h.
#define _PAGE_FLAGS_HARDWARE_MASK (NEFF_MASK & ~(_PAGE_CLEAR_FLAGS)) |
Definition at line 136 of file pgtable_64.h.
#define _PAGE_PRESENT 0x004 /* software: page referenced */ |
Definition at line 109 of file pgtable_64.h.
#define _PAGE_READ 0x040 /* PR0-bit : read access allowed */ |
Definition at line 114 of file pgtable_64.h.
#define _PAGE_SHARED 0x020 /* software: reflects PTEH's SH */ |
Definition at line 113 of file pgtable_64.h.
#define _PAGE_SIZE0 0x008 /* SZ0-bit : size of page */ |
Definition at line 111 of file pgtable_64.h.
#define _PAGE_SIZE1 0x010 /* SZ1-bit : size of page */ |
Definition at line 112 of file pgtable_64.h.
#define _PAGE_SPECIAL _PAGE_EXT(0x002) |
Definition at line 130 of file pgtable_64.h.
#define _PAGE_SZHUGE (0) |
Definition at line 154 of file pgtable_64.h.
#define _PAGE_TABLE (_KERNPG_TABLE | _PAGE_USER) |
Definition at line 172 of file pgtable_64.h.
#define _PAGE_USER 0x200 /* PR3-bit : user space access allowed */ |
Definition at line 117 of file pgtable_64.h.
#define _PAGE_WIRED _PAGE_EXT(0x001) /* software: wire the tlb entry */ |
Definition at line 129 of file pgtable_64.h.
#define _PAGE_WRITE 0x100 /* PR2-bit : write access allowed */ |
Definition at line 116 of file pgtable_64.h.
#define _PAGE_WT 0x001 /* CB0: if cacheable, 1->write-thru, 0->write-back */ |
Definition at line 106 of file pgtable_64.h.
#define _PMD_EMPTY 0x0 |
Definition at line 64 of file pgtable_64.h.
#define _PTE_EMPTY 0x0 |
Definition at line 229 of file pgtable_64.h.
Definition at line 281 of file pgtable_64.h.
#define mk_pte_phys | ( | physpage, | |
pgprot | |||
) | ({ pte_t __pte; set_pte(&__pte, __pte(physpage | pgprot_val(pgprot))); __pte; }) |
Definition at line 294 of file pgtable_64.h.
#define PAGE_COPY PAGE_EXECREAD |
Definition at line 192 of file pgtable_64.h.
#define PAGE_EXECREAD __pgprot(_PAGE_COMMON | _PAGE_READ | _PAGE_EXECUTE) |
Definition at line 186 of file pgtable_64.h.
#define PAGE_KERNEL __pgprot(_KERNPG_TABLE) |
Definition at line 198 of file pgtable_64.h.
#define PAGE_KERNEL_NOCACHE |
Definition at line 200 of file pgtable_64.h.
#define PAGE_NONE __pgprot(_PAGE_CACHABLE | _PAGE_ACCESSED) |
Definition at line 183 of file pgtable_64.h.
#define PAGE_READONLY __pgprot(_PAGE_COMMON | _PAGE_READ) |
Definition at line 194 of file pgtable_64.h.
#define PAGE_RWX |
Definition at line 196 of file pgtable_64.h.
#define PAGE_SHARED |
Definition at line 184 of file pgtable_64.h.
#define PAGE_WRITEONLY __pgprot(_PAGE_COMMON | _PAGE_WRITE) |
Definition at line 195 of file pgtable_64.h.
#define pages_to_mb | ( | x | ) | ((x) >> (20-PAGE_SHIFT)) |
Definition at line 255 of file pgtable_64.h.
#define pfn_pmd | ( | pfn, | |
prot | |||
) | __pmd(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) |
Definition at line 315 of file pgtable_64.h.
#define pfn_pte | ( | pfn, | |
prot | |||
) | __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) |
Definition at line 314 of file pgtable_64.h.
Definition at line 27 of file pgtable_64.h.
#define pgd_index | ( | address | ) | (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1)) |
Definition at line 51 of file pgtable_64.h.
Definition at line 53 of file pgtable_64.h.
#define pgd_offset_k | ( | address | ) | pgd_offset(&init_mm, address) |
Definition at line 56 of file pgtable_64.h.
#define pgoff_to_pte | ( | off | ) | ((pte_t) { (off) | _PAGE_FILE }) |
Definition at line 310 of file pgtable_64.h.
#define pgprot_noncached | ( | x | ) | __pgprot(((x).pgprot & ~(_PAGE_CACHABLE)) | _PAGE_DEVICE) |
Definition at line 207 of file pgtable_64.h.
#define pgprot_writecombine | ( | prot | ) | __pgprot(pgprot_val(prot) & ~_PAGE_CACHABLE) |
Definition at line 208 of file pgtable_64.h.
#define pmd_bad | ( | pmd_entry | ) | ((pmd_val(pmd_entry) & (~PAGE_MASK & ~_PAGE_USER)) != _KERNPG_TABLE) |
Definition at line 69 of file pgtable_64.h.
#define pmd_clear | ( | pmd_entry_p | ) | (set_pmd((pmd_entry_p), __pmd(_PMD_EMPTY))) |
Definition at line 67 of file pgtable_64.h.
#define pmd_none | ( | pmd_entry | ) | (pmd_val((pmd_entry)) == _PMD_EMPTY) |
Definition at line 68 of file pgtable_64.h.
#define pmd_page | ( | pmd | ) | (virt_to_page(pmd_val(pmd))) |
Definition at line 74 of file pgtable_64.h.
Definition at line 71 of file pgtable_64.h.
#define pmd_present | ( | pmd_entry | ) | (pmd_val(pmd_entry) & _PAGE_PRESENT) |
Definition at line 66 of file pgtable_64.h.
#define pte_clear | ( | mm, | |
addr, | |||
xp | |||
) | (set_pte_at(mm, addr, xp, __pte(_PTE_EMPTY))) |
Definition at line 231 of file pgtable_64.h.
Definition at line 25 of file pgtable_64.h.
#define PTE_FILE_MAX_BITS 29 |
Definition at line 308 of file pgtable_64.h.
#define pte_index | ( | address | ) | ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) |
Definition at line 78 of file pgtable_64.h.
#define pte_none | ( | x | ) | (pte_val(x) == _PTE_EMPTY) |
Definition at line 232 of file pgtable_64.h.
#define pte_offset_kernel | ( | dir, | |
addr | |||
) | ((pte_t *) ((pmd_val(*(dir))) & PAGE_MASK) + pte_index((addr))) |
Definition at line 83 of file pgtable_64.h.
#define pte_offset_map | ( | dir, | |
addr | |||
) | pte_offset_kernel(dir, addr) |
Definition at line 86 of file pgtable_64.h.
#define pte_page | ( | x | ) | (mem_map + pte_pagenr(x)) |
Definition at line 250 of file pgtable_64.h.
#define pte_pagenr | ( | x | ) |
Definition at line 244 of file pgtable_64.h.
#define pte_present | ( | x | ) | (pte_val(x) & _PAGE_PRESENT) |
Definition at line 230 of file pgtable_64.h.
Definition at line 309 of file pgtable_64.h.
#define pte_unmap | ( | pte | ) | do { } while (0) |
Definition at line 87 of file pgtable_64.h.
#define set_pmd | ( | pmdptr, | |
pmdval | |||
) | (*(pmdptr) = pmdval) |
Definition at line 33 of file pgtable_64.h.
Definition at line 44 of file pgtable_64.h.