Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
pgtable-ppc64.h File Reference
#include <asm/pgtable-ppc64-4k.h>
#include <asm/pte-book3e.h>
#include <asm/pte-common.h>

Go to the source code of this file.

Macros

#define FIRST_USER_ADDRESS   0
 
#define PGTABLE_EADDR_SIZE
 
#define PGTABLE_RANGE   (ASM_CONST(1) << PGTABLE_EADDR_SIZE)
 
#define KERN_VIRT_START   ASM_CONST(0xD000000000000000)
 
#define KERN_VIRT_SIZE   ASM_CONST(0x0000100000000000)
 
#define VMALLOC_START   KERN_VIRT_START
 
#define VMALLOC_SIZE   (KERN_VIRT_SIZE >> 1)
 
#define VMALLOC_END   (VMALLOC_START + VMALLOC_SIZE)
 
#define KERN_IO_START   (KERN_VIRT_START + (KERN_VIRT_SIZE >> 1))
 
#define FULL_IO_SIZE   0x80000000ul
 
#define ISA_IO_BASE   (KERN_IO_START)
 
#define ISA_IO_END   (KERN_IO_START + 0x10000ul)
 
#define PHB_IO_BASE   (ISA_IO_END)
 
#define PHB_IO_END   (KERN_IO_START + FULL_IO_SIZE)
 
#define IOREMAP_BASE   (PHB_IO_END)
 
#define IOREMAP_END   (KERN_VIRT_START + KERN_VIRT_SIZE)
 
#define REGION_SHIFT   60UL
 
#define REGION_MASK   (0xfUL << REGION_SHIFT)
 
#define REGION_ID(ea)   (((unsigned long)(ea)) >> REGION_SHIFT)
 
#define VMALLOC_REGION_ID   (REGION_ID(VMALLOC_START))
 
#define KERNEL_REGION_ID   (REGION_ID(PAGE_OFFSET))
 
#define VMEMMAP_REGION_ID   (0xfUL) /* Server only */
 
#define USER_REGION_ID   (0UL)
 
#define VMEMMAP_BASE   (VMEMMAP_REGION_ID << REGION_SHIFT)
 
#define vmemmap   ((struct page *)VMEMMAP_BASE)
 
#define __real_pte(e, p)   (e)
 
#define __rpte_to_pte(r)   (__pte(r))
 
#define __rpte_to_hidx(r, index)   (pte_val(__rpte_to_pte(r)) >> 12)
 
#define pte_iterate_hashed_subpages(rpte, psize, va, index, shift)
 
#define pte_iterate_hashed_end()   } while(0)
 
#define pte_pagesize_index(mm, addr, pte)   MMU_PAGE_4K
 
#define PMD_BAD_BITS   (PTE_TABLE_SIZE-1)
 
#define PUD_BAD_BITS   (PMD_TABLE_SIZE-1)
 
#define pmd_set(pmdp, pmdval)   (pmd_val(*(pmdp)) = (pmdval))
 
#define pmd_none(pmd)   (!pmd_val(pmd))
 
#define pmd_bad(pmd)
 
#define pmd_present(pmd)   (pmd_val(pmd) != 0)
 
#define pmd_clear(pmdp)   (pmd_val(*(pmdp)) = 0)
 
#define pmd_page_vaddr(pmd)   (pmd_val(pmd) & ~PMD_MASKED_BITS)
 
#define pmd_page(pmd)   virt_to_page(pmd_page_vaddr(pmd))
 
#define pud_set(pudp, pudval)   (pud_val(*(pudp)) = (pudval))
 
#define pud_none(pud)   (!pud_val(pud))
 
#define pud_bad(pud)
 
#define pud_present(pud)   (pud_val(pud) != 0)
 
#define pud_clear(pudp)   (pud_val(*(pudp)) = 0)
 
#define pud_page_vaddr(pud)   (pud_val(pud) & ~PUD_MASKED_BITS)
 
#define pud_page(pud)   virt_to_page(pud_page_vaddr(pud))
 
#define pgd_set(pgdp, pudp)   ({pgd_val(*(pgdp)) = (unsigned long)(pudp);})
 
#define pgd_index(address)   (((address) >> (PGDIR_SHIFT)) & 0x1ff)
 
#define pgd_offset(mm, address)   ((mm)->pgd + pgd_index(address))
 
#define pmd_offset(pudp, addr)   (((pmd_t *) pud_page_vaddr(*(pudp))) + (((addr) >> PMD_SHIFT) & (PTRS_PER_PMD - 1)))
 
#define pte_offset_kernel(dir, addr)   (((pte_t *) pmd_page_vaddr(*(dir))) + (((addr) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)))
 
#define pte_offset_map(dir, addr)   pte_offset_kernel((dir), (addr))
 
#define pte_unmap(pte)   do { } while(0)
 
#define pgd_offset_k(address)   pgd_offset(&init_mm, address)
 
#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
 
#define ptep_test_and_clear_young(__vma, __addr, __ptep)
 
#define __HAVE_ARCH_PTEP_SET_WRPROTECT
 
#define __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH
 
#define ptep_clear_flush_young(__vma, __address, __ptep)
 
#define __HAVE_ARCH_PTEP_GET_AND_CLEAR
 
#define __HAVE_ARCH_PTE_SAME
 
#define pte_same(A, B)   (((pte_val(A) ^ pte_val(B)) & ~_PAGE_HPTEFLAGS) == 0)
 
#define pte_ERROR(e)   printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e))
 
#define pmd_ERROR(e)   printk("%s:%d: bad pmd %08lx.\n", __FILE__, __LINE__, pmd_val(e))
 
#define pgd_ERROR(e)   printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e))
 
#define __swp_type(entry)   (((entry).val >> 1) & 0x3f)
 
#define __swp_offset(entry)   ((entry).val >> 8)
 
#define __swp_entry(type, offset)   ((swp_entry_t){((type)<< 1)|((offset)<<8)})
 
#define __pte_to_swp_entry(pte)   ((swp_entry_t){pte_val(pte) >> PTE_RPN_SHIFT})
 
#define __swp_entry_to_pte(x)   ((pte_t) { (x).val << PTE_RPN_SHIFT })
 
#define pte_to_pgoff(pte)   (pte_val(pte) >> PTE_RPN_SHIFT)
 
#define pgoff_to_pte(off)   ((pte_t) {((off) << PTE_RPN_SHIFT)|_PAGE_FILE})
 
#define PTE_FILE_MAX_BITS   (BITS_PER_LONG - PTE_RPN_SHIFT)
 

Functions

void hpte_need_flush (struct mm_struct *mm, unsigned long addr, pte_t *ptep, unsigned long pte, int huge)
 
void pgtable_cache_add (unsigned shift, void(*ctor)(void *))
 
void pgtable_cache_init (void)
 

Macro Definition Documentation

#define __HAVE_ARCH_PTE_SAME

Definition at line 321 of file pgtable-ppc64.h.

#define __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH

Definition at line 271 of file pgtable-ppc64.h.

#define __HAVE_ARCH_PTEP_GET_AND_CLEAR

Definition at line 279 of file pgtable-ppc64.h.

#define __HAVE_ARCH_PTEP_SET_WRPROTECT

Definition at line 243 of file pgtable-ppc64.h.

#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG

Definition at line 235 of file pgtable-ppc64.h.

#define __pte_to_swp_entry (   pte)    ((swp_entry_t){pte_val(pte) >> PTE_RPN_SHIFT})

Definition at line 335 of file pgtable-ppc64.h.

#define __real_pte (   e,
  p 
)    (e)

Definition at line 120 of file pgtable-ppc64.h.

#define __rpte_to_hidx (   r,
  index 
)    (pte_val(__rpte_to_pte(r)) >> 12)

Definition at line 123 of file pgtable-ppc64.h.

#define __rpte_to_pte (   r)    (__pte(r))

Definition at line 121 of file pgtable-ppc64.h.

#define __swp_entry (   type,
  offset 
)    ((swp_entry_t){((type)<< 1)|((offset)<<8)})

Definition at line 334 of file pgtable-ppc64.h.

#define __swp_entry_to_pte (   x)    ((pte_t) { (x).val << PTE_RPN_SHIFT })

Definition at line 336 of file pgtable-ppc64.h.

#define __swp_offset (   entry)    ((entry).val >> 8)

Definition at line 333 of file pgtable-ppc64.h.

#define __swp_type (   entry)    (((entry).val >> 1) & 0x3f)

Definition at line 332 of file pgtable-ppc64.h.

#define FIRST_USER_ADDRESS   0

Definition at line 14 of file pgtable-ppc64.h.

#define FULL_IO_SIZE   0x80000000ul

Definition at line 58 of file pgtable-ppc64.h.

#define IOREMAP_BASE   (PHB_IO_END)

Definition at line 63 of file pgtable-ppc64.h.

#define IOREMAP_END   (KERN_VIRT_START + KERN_VIRT_SIZE)

Definition at line 64 of file pgtable-ppc64.h.

#define ISA_IO_BASE   (KERN_IO_START)

Definition at line 59 of file pgtable-ppc64.h.

#define ISA_IO_END   (KERN_IO_START + 0x10000ul)

Definition at line 60 of file pgtable-ppc64.h.

#define KERN_IO_START   (KERN_VIRT_START + (KERN_VIRT_SIZE >> 1))

Definition at line 57 of file pgtable-ppc64.h.

#define KERN_VIRT_SIZE   ASM_CONST(0x0000100000000000)

Definition at line 33 of file pgtable-ppc64.h.

#define KERN_VIRT_START   ASM_CONST(0xD000000000000000)

Definition at line 31 of file pgtable-ppc64.h.

#define KERNEL_REGION_ID   (REGION_ID(PAGE_OFFSET))

Definition at line 75 of file pgtable-ppc64.h.

#define pgd_ERROR (   e)    printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e))

Definition at line 328 of file pgtable-ppc64.h.

#define pgd_index (   address)    (((address) >> (PGDIR_SHIFT)) & 0x1ff)

Definition at line 171 of file pgtable-ppc64.h.

#define pgd_offset (   mm,
  address 
)    ((mm)->pgd + pgd_index(address))

Definition at line 173 of file pgtable-ppc64.h.

#define pgd_offset_k (   address)    pgd_offset(&init_mm, address)

Definition at line 186 of file pgtable-ppc64.h.

#define pgd_set (   pgdp,
  pudp 
)    ({pgd_val(*(pgdp)) = (unsigned long)(pudp);})

Definition at line 164 of file pgtable-ppc64.h.

#define pgoff_to_pte (   off)    ((pte_t) {((off) << PTE_RPN_SHIFT)|_PAGE_FILE})

Definition at line 338 of file pgtable-ppc64.h.

#define PGTABLE_EADDR_SIZE
Value:

Definition at line 19 of file pgtable-ppc64.h.

#define PGTABLE_RANGE   (ASM_CONST(1) << PGTABLE_EADDR_SIZE)

Definition at line 21 of file pgtable-ppc64.h.

#define PHB_IO_BASE   (ISA_IO_END)

Definition at line 61 of file pgtable-ppc64.h.

#define PHB_IO_END   (KERN_IO_START + FULL_IO_SIZE)

Definition at line 62 of file pgtable-ppc64.h.

#define pmd_bad (   pmd)
Value:

Definition at line 148 of file pgtable-ppc64.h.

#define PMD_BAD_BITS   (PTE_TABLE_SIZE-1)

Definition at line 143 of file pgtable-ppc64.h.

#define pmd_clear (   pmdp)    (pmd_val(*(pmdp)) = 0)

Definition at line 151 of file pgtable-ppc64.h.

#define pmd_ERROR (   e)    printk("%s:%d: bad pmd %08lx.\n", __FILE__, __LINE__, pmd_val(e))

Definition at line 326 of file pgtable-ppc64.h.

#define pmd_none (   pmd)    (!pmd_val(pmd))

Definition at line 147 of file pgtable-ppc64.h.

#define pmd_offset (   pudp,
  addr 
)    (((pmd_t *) pud_page_vaddr(*(pudp))) + (((addr) >> PMD_SHIFT) & (PTRS_PER_PMD - 1)))

Definition at line 175 of file pgtable-ppc64.h.

#define pmd_page (   pmd)    virt_to_page(pmd_page_vaddr(pmd))

Definition at line 153 of file pgtable-ppc64.h.

#define pmd_page_vaddr (   pmd)    (pmd_val(pmd) & ~PMD_MASKED_BITS)

Definition at line 152 of file pgtable-ppc64.h.

#define pmd_present (   pmd)    (pmd_val(pmd) != 0)

Definition at line 150 of file pgtable-ppc64.h.

#define pmd_set (   pmdp,
  pmdval 
)    (pmd_val(*(pmdp)) = (pmdval))

Definition at line 146 of file pgtable-ppc64.h.

#define pte_ERROR (   e)    printk("%s:%d: bad pte %08lx.\n", __FILE__, __LINE__, pte_val(e))

Definition at line 324 of file pgtable-ppc64.h.

#define PTE_FILE_MAX_BITS   (BITS_PER_LONG - PTE_RPN_SHIFT)

Definition at line 339 of file pgtable-ppc64.h.

#define pte_iterate_hashed_end ( )    } while(0)

Definition at line 130 of file pgtable-ppc64.h.

#define pte_iterate_hashed_subpages (   rpte,
  psize,
  va,
  index,
  shift 
)
Value:
do { \
index = 0; \
shift = mmu_psize_defs[psize].shift; \

Definition at line 125 of file pgtable-ppc64.h.

#define pte_offset_kernel (   dir,
  addr 
)    (((pte_t *) pmd_page_vaddr(*(dir))) + (((addr) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)))

Definition at line 178 of file pgtable-ppc64.h.

#define pte_offset_map (   dir,
  addr 
)    pte_offset_kernel((dir), (addr))

Definition at line 181 of file pgtable-ppc64.h.

#define pte_pagesize_index (   mm,
  addr,
  pte 
)    MMU_PAGE_4K

Definition at line 135 of file pgtable-ppc64.h.

#define pte_same (   A,
  B 
)    (((pte_val(A) ^ pte_val(B)) & ~_PAGE_HPTEFLAGS) == 0)

Definition at line 322 of file pgtable-ppc64.h.

#define pte_to_pgoff (   pte)    (pte_val(pte) >> PTE_RPN_SHIFT)

Definition at line 337 of file pgtable-ppc64.h.

#define pte_unmap (   pte)    do { } while(0)

Definition at line 182 of file pgtable-ppc64.h.

#define ptep_clear_flush_young (   __vma,
  __address,
  __ptep 
)
Value:
({ \
int __young = __ptep_test_and_clear_young((__vma)->vm_mm, __address, \
__ptep); \
__young; \
})

Definition at line 272 of file pgtable-ppc64.h.

#define ptep_test_and_clear_young (   __vma,
  __addr,
  __ptep 
)
Value:
({ \
int __r; \
__r = __ptep_test_and_clear_young((__vma)->vm_mm, __addr, __ptep); \
__r; \
})

Definition at line 236 of file pgtable-ppc64.h.

#define pud_bad (   pud)
Value:
|| (pud_val(pud) & PUD_BAD_BITS))

Definition at line 157 of file pgtable-ppc64.h.

#define PUD_BAD_BITS   (PMD_TABLE_SIZE-1)

Definition at line 144 of file pgtable-ppc64.h.

#define pud_clear (   pudp)    (pud_val(*(pudp)) = 0)

Definition at line 160 of file pgtable-ppc64.h.

#define pud_none (   pud)    (!pud_val(pud))

Definition at line 156 of file pgtable-ppc64.h.

#define pud_page (   pud)    virt_to_page(pud_page_vaddr(pud))

Definition at line 162 of file pgtable-ppc64.h.

#define pud_page_vaddr (   pud)    (pud_val(pud) & ~PUD_MASKED_BITS)

Definition at line 161 of file pgtable-ppc64.h.

#define pud_present (   pud)    (pud_val(pud) != 0)

Definition at line 159 of file pgtable-ppc64.h.

#define pud_set (   pudp,
  pudval 
)    (pud_val(*(pudp)) = (pudval))

Definition at line 155 of file pgtable-ppc64.h.

#define REGION_ID (   ea)    (((unsigned long)(ea)) >> REGION_SHIFT)

Definition at line 72 of file pgtable-ppc64.h.

#define REGION_MASK   (0xfUL << REGION_SHIFT)

Definition at line 71 of file pgtable-ppc64.h.

#define REGION_SHIFT   60UL

Definition at line 70 of file pgtable-ppc64.h.

#define USER_REGION_ID   (0UL)

Definition at line 77 of file pgtable-ppc64.h.

#define VMALLOC_END   (VMALLOC_START + VMALLOC_SIZE)

Definition at line 46 of file pgtable-ppc64.h.

#define VMALLOC_REGION_ID   (REGION_ID(VMALLOC_START))

Definition at line 74 of file pgtable-ppc64.h.

#define VMALLOC_SIZE   (KERN_VIRT_SIZE >> 1)

Definition at line 44 of file pgtable-ppc64.h.

#define VMALLOC_START   KERN_VIRT_START

Definition at line 40 of file pgtable-ppc64.h.

#define vmemmap   ((struct page *)VMEMMAP_BASE)

Definition at line 89 of file pgtable-ppc64.h.

#define VMEMMAP_BASE   (VMEMMAP_REGION_ID << REGION_SHIFT)

Definition at line 87 of file pgtable-ppc64.h.

#define VMEMMAP_REGION_ID   (0xfUL) /* Server only */

Definition at line 76 of file pgtable-ppc64.h.

Function Documentation

void hpte_need_flush ( struct mm_struct mm,
unsigned long  addr,
pte_t ptep,
unsigned long  pte,
int  huge 
)

Definition at line 42 of file tlb_hash64.c.

void pgtable_cache_add ( unsigned  shift,
void(*)(void *)  ctor 
)

Definition at line 103 of file init_64.c.

void pgtable_cache_init ( void  )

Definition at line 145 of file pgalloc.c.