Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
pgtable-ppc32.h File Reference
#include <asm-generic/pgtable-nopmd.h>
#include <linux/sched.h>
#include <linux/threads.h>
#include <asm/io.h>
#include <asm/pte-hash32.h>
#include <asm/pte-common.h>

Go to the source code of this file.

Macros

#define PGDIR_SHIFT   (PAGE_SHIFT + PTE_SHIFT)
 
#define PGDIR_SIZE   (1UL << PGDIR_SHIFT)
 
#define PGDIR_MASK   (~(PGDIR_SIZE-1))
 
#define PTE_TABLE_SIZE   (sizeof(pte_t) << PTE_SHIFT)
 
#define PGD_TABLE_SIZE   (sizeof(pgd_t) << (32 - PGDIR_SHIFT))
 
#define PTRS_PER_PTE   (1 << PTE_SHIFT)
 
#define PTRS_PER_PMD   1
 
#define PTRS_PER_PGD   (1 << (32 - PGDIR_SHIFT))
 
#define USER_PTRS_PER_PGD   (TASK_SIZE / PGDIR_SIZE)
 
#define FIRST_USER_ADDRESS   0
 
#define pte_ERROR(e)
 
#define pgd_ERROR(e)   printk("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e))
 
#define KVIRT_TOP   (0xfe000000UL) /* for now, could be FIXMAP_BASE ? */
 
#define IOREMAP_TOP   KVIRT_TOP
 
#define VMALLOC_OFFSET   (0x1000000) /* 16M */
 
#define VMALLOC_START   ((((long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)))
 
#define VMALLOC_END   ioremap_bot
 
#define pte_clear(mm, addr, ptep)   do { pte_update(ptep, ~_PAGE_HASHPTE, 0); } while (0)
 
#define pmd_none(pmd)   (!pmd_val(pmd))
 
#define pmd_bad(pmd)   (pmd_val(pmd) & _PMD_BAD)
 
#define pmd_present(pmd)   (pmd_val(pmd) & _PMD_PRESENT_MASK)
 
#define pmd_clear(pmdp)   do { pmd_val(*(pmdp)) = 0; } while (0)
 
#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
 
#define ptep_test_and_clear_young(__vma, __addr, __ptep)   __ptep_test_and_clear_young((__vma)->vm_mm->context.id, __addr, __ptep)
 
#define __HAVE_ARCH_PTEP_GET_AND_CLEAR
 
#define __HAVE_ARCH_PTEP_SET_WRPROTECT
 
#define __HAVE_ARCH_PTE_SAME
 
#define pte_same(A, B)   (((pte_val(A) ^ pte_val(B)) & ~_PAGE_HASHPTE) == 0)
 
#define pmd_page_vaddr(pmd)   ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK))
 
#define pmd_page(pmd)   pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)
 
#define pgd_offset_k(address)   pgd_offset(&init_mm, address)
 
#define pgd_index(address)   ((address) >> PGDIR_SHIFT)
 
#define pgd_offset(mm, address)   ((mm)->pgd + pgd_index(address))
 
#define pte_index(address)   (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
 
#define pte_offset_kernel(dir, addr)   ((pte_t *) pmd_page_vaddr(*(dir)) + pte_index(addr))
 
#define pte_offset_map(dir, addr)   ((pte_t *) kmap_atomic(pmd_page(*(dir))) + pte_index(addr))
 
#define pte_unmap(pte)   kunmap_atomic(pte)
 
#define __swp_type(entry)   ((entry).val & 0x1f)
 
#define __swp_offset(entry)   ((entry).val >> 5)
 
#define __swp_entry(type, offset)   ((swp_entry_t) { (type) | ((offset) << 5) })
 
#define __pte_to_swp_entry(pte)   ((swp_entry_t) { pte_val(pte) >> 3 })
 
#define __swp_entry_to_pte(x)   ((pte_t) { (x).val << 3 })
 
#define PTE_FILE_MAX_BITS   29
 
#define pte_to_pgoff(pte)   (pte_val(pte) >> 3)
 
#define pgoff_to_pte(off)   ((pte_t) { ((off) << 3) | _PAGE_FILE })
 
#define pgtable_cache_init()   do { } while (0)
 

Functions

unsigned long va_to_phys (unsigned long address)
 
pte_tva_to_pte (unsigned long address)
 
int flush_hash_pages (unsigned context, unsigned long va, unsigned long pmdval, int count)
 
void add_hash_page (unsigned context, unsigned long va, unsigned long pmdval)
 
void flush_hash_entry (struct mm_struct *mm, pte_t *ptep, unsigned long address)
 
int get_pteptr (struct mm_struct *mm, unsigned long addr, pte_t **ptep, pmd_t **pmdp)
 

Variables

unsigned long ioremap_bot
 

Macro Definition Documentation

#define __HAVE_ARCH_PTE_SAME

Definition at line 276 of file pgtable-ppc32.h.

#define __HAVE_ARCH_PTEP_GET_AND_CLEAR

Definition at line 249 of file pgtable-ppc32.h.

#define __HAVE_ARCH_PTEP_SET_WRPROTECT

Definition at line 256 of file pgtable-ppc32.h.

#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG

Definition at line 233 of file pgtable-ppc32.h.

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

Definition at line 323 of file pgtable-ppc32.h.

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

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

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

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

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

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

#define __swp_type (   entry)    ((entry).val & 0x1f)

Definition at line 320 of file pgtable-ppc32.h.

#define FIRST_USER_ADDRESS   0

Definition at line 50 of file pgtable-ppc32.h.

#define IOREMAP_TOP   KVIRT_TOP

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

#define KVIRT_TOP   (0xfe000000UL) /* for now, could be FIXMAP_BASE ? */

Definition at line 66 of file pgtable-ppc32.h.

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

Definition at line 55 of file pgtable-ppc32.h.

#define pgd_index (   address)    ((address) >> PGDIR_SHIFT)

Definition at line 302 of file pgtable-ppc32.h.

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

Definition at line 303 of file pgtable-ppc32.h.

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

Definition at line 299 of file pgtable-ppc32.h.

#define PGD_TABLE_SIZE   (sizeof(pgd_t) << (32 - PGDIR_SHIFT))

Definition at line 42 of file pgtable-ppc32.h.

#define PGDIR_MASK   (~(PGDIR_SIZE-1))

Definition at line 34 of file pgtable-ppc32.h.

#define PGDIR_SHIFT   (PAGE_SHIFT + PTE_SHIFT)

Definition at line 32 of file pgtable-ppc32.h.

#define PGDIR_SIZE   (1UL << PGDIR_SHIFT)

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

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

Definition at line 329 of file pgtable-ppc32.h.

#define pgtable_cache_init (   void)    do { } while (0)

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

#define pmd_bad (   pmd)    (pmd_val(pmd) & _PMD_BAD)

Definition at line 133 of file pgtable-ppc32.h.

#define pmd_clear (   pmdp)    do { pmd_val(*(pmdp)) = 0; } while (0)

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

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

Definition at line 132 of file pgtable-ppc32.h.

#define pmd_page (   pmd)    pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)

Definition at line 289 of file pgtable-ppc32.h.

#define pmd_page_vaddr (   pmd)    ((unsigned long) __va(pmd_val(pmd) & PAGE_MASK))

Definition at line 287 of file pgtable-ppc32.h.

#define pmd_present (   pmd)    (pmd_val(pmd) & _PMD_PRESENT_MASK)

Definition at line 134 of file pgtable-ppc32.h.

#define pte_clear (   mm,
  addr,
  ptep 
)    do { pte_update(ptep, ~_PAGE_HASHPTE, 0); } while (0)

Definition at line 129 of file pgtable-ppc32.h.

#define pte_ERROR (   e)
Value:
printk("%s:%d: bad pte %llx.\n", __FILE__, __LINE__, \
(unsigned long long)pte_val(e))

Definition at line 52 of file pgtable-ppc32.h.

#define PTE_FILE_MAX_BITS   29

Definition at line 327 of file pgtable-ppc32.h.

#define pte_index (   address)    (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))

Definition at line 306 of file pgtable-ppc32.h.

#define pte_offset_kernel (   dir,
  addr 
)    ((pte_t *) pmd_page_vaddr(*(dir)) + pte_index(addr))

Definition at line 308 of file pgtable-ppc32.h.

#define pte_offset_map (   dir,
  addr 
)    ((pte_t *) kmap_atomic(pmd_page(*(dir))) + pte_index(addr))

Definition at line 310 of file pgtable-ppc32.h.

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

Definition at line 277 of file pgtable-ppc32.h.

#define PTE_TABLE_SIZE   (sizeof(pte_t) << PTE_SHIFT)

Definition at line 41 of file pgtable-ppc32.h.

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

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

#define pte_unmap (   pte)    kunmap_atomic(pte)

Definition at line 312 of file pgtable-ppc32.h.

#define ptep_test_and_clear_young (   __vma,
  __addr,
  __ptep 
)    __ptep_test_and_clear_young((__vma)->vm_mm->context.id, __addr, __ptep)

Definition at line 246 of file pgtable-ppc32.h.

#define PTRS_PER_PGD   (1 << (32 - PGDIR_SHIFT))

Definition at line 47 of file pgtable-ppc32.h.

#define PTRS_PER_PMD   1

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

#define PTRS_PER_PTE   (1 << PTE_SHIFT)

Definition at line 45 of file pgtable-ppc32.h.

#define USER_PTRS_PER_PGD   (TASK_SIZE / PGDIR_SIZE)

Definition at line 49 of file pgtable-ppc32.h.

#define VMALLOC_END   ioremap_bot

Definition at line 103 of file pgtable-ppc32.h.

#define VMALLOC_OFFSET   (0x1000000) /* 16M */

Definition at line 97 of file pgtable-ppc32.h.

#define VMALLOC_START   ((((long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1)))

Definition at line 101 of file pgtable-ppc32.h.

Function Documentation

void add_hash_page ( unsigned  context,
unsigned long  va,
unsigned long  pmdval 
)
void flush_hash_entry ( struct mm_struct mm,
pte_t ptep,
unsigned long  address 
)

Definition at line 40 of file tlb_hash32.c.

int flush_hash_pages ( unsigned  context,
unsigned long  va,
unsigned long  pmdval,
int  count 
)
int get_pteptr ( struct mm_struct mm,
unsigned long  addr,
pte_t **  ptep,
pmd_t **  pmdp 
)

Definition at line 357 of file pgtable_32.c.

unsigned long va_to_phys ( unsigned long  address)
pte_t* va_to_pte ( unsigned long  address)

Variable Documentation

unsigned long ioremap_bot

Definition at line 45 of file pgtable.c.