Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Variables
mcf_pgtable.h File Reference
#include <asm/mcfmmu.h>
#include <asm/page.h>

Go to the source code of this file.

Macros

#define CF_PAGE_LOCKED   MMUDR_LK /* 0x00000002 */
 
#define CF_PAGE_EXEC   MMUDR_X /* 0x00000004 */
 
#define CF_PAGE_WRITABLE   MMUDR_W /* 0x00000008 */
 
#define CF_PAGE_READABLE   MMUDR_R /* 0x00000010 */
 
#define CF_PAGE_SYSTEM   MMUDR_SP /* 0x00000020 */
 
#define CF_PAGE_COPYBACK   MMUDR_CM_CCB /* 0x00000040 */
 
#define CF_PAGE_NOCACHE   MMUDR_CM_NCP /* 0x00000080 */
 
#define CF_CACHEMASK   (~MMUDR_CM_CCB)
 
#define CF_PAGE_MMUDR_MASK   0x000000fe
 
#define _PAGE_NOCACHE030   CF_PAGE_NOCACHE
 
#define CF_PAGE_MMUTR_MASK   0x00000c00
 
#define CF_PAGE_MMUTR_SHIFT   10
 
#define CF_PAGE_VALID   (MMUTR_V << CF_PAGE_MMUTR_SHIFT)
 
#define CF_PAGE_SHARED   (MMUTR_SG << CF_PAGE_MMUTR_SHIFT)
 
#define CF_PAGE_DIRTY   0x00000001
 
#define CF_PAGE_FILE   0x00000200
 
#define CF_PAGE_ACCESSED   0x00001000
 
#define _PAGE_CACHE040   0x020 /* 68040 cache mode, cachable, copyback */
 
#define _PAGE_NOCACHE_S   0x040 /* 68040 no-cache mode, serialized */
 
#define _PAGE_NOCACHE   0x060 /* 68040 cache mode, non-serialized */
 
#define _PAGE_CACHE040W   0x000 /* 68040 cache mode, cachable, write-through */
 
#define _DESCTYPE_MASK   0x003
 
#define _CACHEMASK040   (~0x060)
 
#define _PAGE_GLOBAL040   0x400 /* 68040 global bit, used for kva descs */
 
#define _PAGE_PRESENT   (CF_PAGE_VALID)
 
#define _PAGE_ACCESSED   (CF_PAGE_ACCESSED)
 
#define _PAGE_DIRTY   (CF_PAGE_DIRTY)
 
#define _PAGE_READWRITE
 
#define PAGE_NONE
 
#define PAGE_SHARED
 
#define PAGE_INIT
 
#define PAGE_KERNEL
 
#define PAGE_COPY
 
#define __P000   PAGE_NONE
 
#define __P001
 
#define __P010
 
#define __P011
 
#define __P100
 
#define __P101
 
#define __P110
 
#define __P111
 
#define __S000   PAGE_NONE
 
#define __S001
 
#define __S010   PAGE_SHARED
 
#define __S011
 
#define __S100
 
#define __S101
 
#define __S110
 
#define __S111
 
#define PTE_MASK   PAGE_MASK
 
#define CF_PAGE_CHG_MASK   (PTE_MASK | CF_PAGE_ACCESSED | CF_PAGE_DIRTY)
 
#define mk_pte(page, pgprot)   pfn_pte(page_to_pfn(page), (pgprot))
 
#define pmd_set(pmdp, ptep)   do {} while (0)
 
#define __pte_page(pte)   ((unsigned long) (pte_val(pte) & PAGE_MASK))
 
#define __pmd_page(pmd)   ((unsigned long) (pmd_val(pmd)))
 
#define pte_pagenr(pte)   ((__pte_page(pte) - PAGE_OFFSET) >> PAGE_SHIFT)
 
#define pte_page(pte)   virt_to_page(__pte_page(pte))
 
#define pmd_none(pmd)   pmd_none2(&(pmd))
 
#define pmd_bad(pmd)   pmd_bad2(&(pmd))
 
#define pmd_present(pmd)   (!pmd_none2(&(pmd)))
 
#define pte_ERROR(e)
 
#define pmd_ERROR(e)
 
#define pgd_ERROR(e)
 
#define swapper_pg_dir   kernel_pg_dir
 
#define pgd_index(address)   ((address) >> PGDIR_SHIFT)
 
#define pgd_offset(mm, address)   ((mm)->pgd + pgd_index(address))
 
#define pgd_offset_k(address)   pgd_offset(&init_mm, address)
 
#define __pte_offset(address)   ((address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
 
#define pte_offset_kernel(dir, address)   ((pte_t *) __pmd_page(*(dir)) + __pte_offset(address))
 
#define PTE_FILE_MAX_BITS   21
 
#define PTE_FILE_SHIFT   11
 
#define __swp_type(x)   ((x).val & 0xFF)
 
#define __swp_offset(x)   ((x).val >> PTE_FILE_SHIFT)
 
#define __swp_entry(typ, off)
 
#define __pte_to_swp_entry(pte)   ((swp_entry_t) { pte_val(pte) })
 
#define __swp_entry_to_pte(x)   (__pte((x).val))
 
#define pmd_page(pmd)   (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT))
 
#define pte_offset_map(pmdp, addr)
 
#define pte_unmap(pte)   ((void) 0)
 
#define pfn_pte(pfn, prot)   __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
 
#define pte_pfn(pte)   (pte_val(pte) >> PAGE_SHIFT)
 

Variables

pgd_t kernel_pg_dir [PTRS_PER_PGD]
 

Macro Definition Documentation

#define __P000   PAGE_NONE

Definition at line 94 of file mcf_pgtable.h.

#define __P001
Value:

Definition at line 95 of file mcf_pgtable.h.

#define __P010
Value:

Definition at line 98 of file mcf_pgtable.h.

#define __P011
#define __P100
Value:

Definition at line 105 of file mcf_pgtable.h.

#define __P101
Value:

Definition at line 108 of file mcf_pgtable.h.

#define __P110
Value:

Definition at line 112 of file mcf_pgtable.h.

#define __P111
#define __pmd_page (   pmd)    ((unsigned long) (pmd_val(pmd)))

Definition at line 173 of file mcf_pgtable.h.

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

Definition at line 358 of file mcf_pgtable.h.

#define __pte_page (   pte)    ((unsigned long) (pte_val(pte) & PAGE_MASK))

Definition at line 172 of file mcf_pgtable.h.

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

Definition at line 414 of file mcf_pgtable.h.

#define __S000   PAGE_NONE

Definition at line 122 of file mcf_pgtable.h.

#define __S001
Value:

Definition at line 123 of file mcf_pgtable.h.

#define __S010   PAGE_SHARED

Definition at line 126 of file mcf_pgtable.h.

#define __S011
#define __S100
Value:

Definition at line 131 of file mcf_pgtable.h.

#define __S101
Value:

Definition at line 134 of file mcf_pgtable.h.

#define __S110
Value:

Definition at line 138 of file mcf_pgtable.h.

#define __S111
#define __swp_entry (   typ,
  off 
)
Value:
((swp_entry_t) { (typ) | \
(off << PTE_FILE_SHIFT) })

Definition at line 412 of file mcf_pgtable.h.

#define __swp_entry_to_pte (   x)    (__pte((x).val))

Definition at line 415 of file mcf_pgtable.h.

#define __swp_offset (   x)    ((x).val >> PTE_FILE_SHIFT)

Definition at line 411 of file mcf_pgtable.h.

#define __swp_type (   x)    ((x).val & 0xFF)

Definition at line 410 of file mcf_pgtable.h.

#define _CACHEMASK040   (~0x060)

Definition at line 46 of file mcf_pgtable.h.

#define _DESCTYPE_MASK   0x003

Definition at line 45 of file mcf_pgtable.h.

#define _PAGE_ACCESSED   (CF_PAGE_ACCESSED)

Definition at line 53 of file mcf_pgtable.h.

#define _PAGE_CACHE040   0x020 /* 68040 cache mode, cachable, copyback */

Definition at line 41 of file mcf_pgtable.h.

#define _PAGE_CACHE040W   0x000 /* 68040 cache mode, cachable, write-through */

Definition at line 44 of file mcf_pgtable.h.

#define _PAGE_DIRTY   (CF_PAGE_DIRTY)

Definition at line 54 of file mcf_pgtable.h.

#define _PAGE_GLOBAL040   0x400 /* 68040 global bit, used for kva descs */

Definition at line 47 of file mcf_pgtable.h.

#define _PAGE_NOCACHE   0x060 /* 68040 cache mode, non-serialized */

Definition at line 43 of file mcf_pgtable.h.

#define _PAGE_NOCACHE030   CF_PAGE_NOCACHE

Definition at line 22 of file mcf_pgtable.h.

#define _PAGE_NOCACHE_S   0x040 /* 68040 no-cache mode, serialized */

Definition at line 42 of file mcf_pgtable.h.

#define _PAGE_PRESENT   (CF_PAGE_VALID)

Definition at line 52 of file mcf_pgtable.h.

#define _PAGE_READWRITE
Value:

Definition at line 55 of file mcf_pgtable.h.

#define CF_CACHEMASK   (~MMUDR_CM_CCB)

Definition at line 19 of file mcf_pgtable.h.

#define CF_PAGE_ACCESSED   0x00001000

Definition at line 39 of file mcf_pgtable.h.

#define CF_PAGE_CHG_MASK   (PTE_MASK | CF_PAGE_ACCESSED | CF_PAGE_DIRTY)

Definition at line 149 of file mcf_pgtable.h.

#define CF_PAGE_COPYBACK   MMUDR_CM_CCB /* 0x00000040 */

Definition at line 16 of file mcf_pgtable.h.

#define CF_PAGE_DIRTY   0x00000001

Definition at line 37 of file mcf_pgtable.h.

#define CF_PAGE_EXEC   MMUDR_X /* 0x00000004 */

Definition at line 12 of file mcf_pgtable.h.

#define CF_PAGE_FILE   0x00000200

Definition at line 38 of file mcf_pgtable.h.

#define CF_PAGE_LOCKED   MMUDR_LK /* 0x00000002 */

Definition at line 11 of file mcf_pgtable.h.

#define CF_PAGE_MMUDR_MASK   0x000000fe

Definition at line 20 of file mcf_pgtable.h.

#define CF_PAGE_MMUTR_MASK   0x00000c00

Definition at line 27 of file mcf_pgtable.h.

#define CF_PAGE_MMUTR_SHIFT   10

Definition at line 28 of file mcf_pgtable.h.

#define CF_PAGE_NOCACHE   MMUDR_CM_NCP /* 0x00000080 */

Definition at line 17 of file mcf_pgtable.h.

#define CF_PAGE_READABLE   MMUDR_R /* 0x00000010 */

Definition at line 14 of file mcf_pgtable.h.

#define CF_PAGE_SHARED   (MMUTR_SG << CF_PAGE_MMUTR_SHIFT)

Definition at line 31 of file mcf_pgtable.h.

#define CF_PAGE_SYSTEM   MMUDR_SP /* 0x00000020 */

Definition at line 15 of file mcf_pgtable.h.

#define CF_PAGE_VALID   (MMUTR_V << CF_PAGE_MMUTR_SHIFT)

Definition at line 30 of file mcf_pgtable.h.

#define CF_PAGE_WRITABLE   MMUDR_W /* 0x00000008 */

Definition at line 13 of file mcf_pgtable.h.

#define mk_pte (   page,
  pgprot 
)    pfn_pte(page_to_pfn(page), (pgprot))

Definition at line 157 of file mcf_pgtable.h.

#define PAGE_COPY
Value:

Definition at line 84 of file mcf_pgtable.h.

#define PAGE_INIT
#define PAGE_KERNEL
#define PAGE_NONE
Value:

Definition at line 63 of file mcf_pgtable.h.

#define PAGE_SHARED
Value:

Definition at line 66 of file mcf_pgtable.h.

#define pfn_pte (   pfn,
  prot 
)    __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))

Definition at line 422 of file mcf_pgtable.h.

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

Definition at line 212 of file mcf_pgtable.h.

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

Definition at line 339 of file mcf_pgtable.h.

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

Definition at line 340 of file mcf_pgtable.h.

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

Definition at line 345 of file mcf_pgtable.h.

#define pmd_bad (   pmd)    pmd_bad2(&(pmd))

Definition at line 197 of file mcf_pgtable.h.

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

Definition at line 209 of file mcf_pgtable.h.

#define pmd_none (   pmd)    pmd_none2(&(pmd))

Definition at line 195 of file mcf_pgtable.h.

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

Definition at line 417 of file mcf_pgtable.h.

#define pmd_present (   pmd)    (!pmd_none2(&(pmd)))

Definition at line 198 of file mcf_pgtable.h.

#define pmd_set (   pmdp,
  ptep 
)    do {} while (0)

Definition at line 165 of file mcf_pgtable.h.

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

Definition at line 206 of file mcf_pgtable.h.

#define PTE_FILE_MAX_BITS   21

Definition at line 394 of file mcf_pgtable.h.

#define PTE_FILE_SHIFT   11

Definition at line 395 of file mcf_pgtable.h.

#define PTE_MASK   PAGE_MASK

Definition at line 148 of file mcf_pgtable.h.

#define pte_offset_kernel (   dir,
  address 
)    ((pte_t *) __pmd_page(*(dir)) + __pte_offset(address))

Definition at line 359 of file mcf_pgtable.h.

#define pte_offset_map (   pmdp,
  addr 
)
Value:
((pte_t *)__pmd_page(*pmdp) + \
__pte_offset(addr))

Definition at line 419 of file mcf_pgtable.h.

#define pte_page (   pte)    virt_to_page(__pte_page(pte))

Definition at line 192 of file mcf_pgtable.h.

#define pte_pagenr (   pte)    ((__pte_page(pte) - PAGE_OFFSET) >> PAGE_SHIFT)

Definition at line 191 of file mcf_pgtable.h.

#define pte_pfn (   pte)    (pte_val(pte) >> PAGE_SHIFT)

Definition at line 423 of file mcf_pgtable.h.

#define pte_unmap (   pte)    ((void) 0)

Definition at line 421 of file mcf_pgtable.h.

#define swapper_pg_dir   kernel_pg_dir

Definition at line 333 of file mcf_pgtable.h.

Variable Documentation

pgd_t kernel_pg_dir[PTRS_PER_PGD]