Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
pgtable_64.h File Reference
#include <linux/compiler.h>
#include <linux/const.h>
#include <asm/types.h>
#include <asm/spitfire.h>
#include <asm/asi.h>
#include <asm/page.h>
#include <asm/processor.h>
#include <asm-generic/pgtable-nopud.h>
#include <linux/sched.h>
#include <asm-generic/pgtable.h>

Go to the source code of this file.

Macros

#define TLBTEMP_BASE   _AC(0x0000000006000000,UL)
 
#define TSBMAP_BASE   _AC(0x0000000008000000,UL)
 
#define MODULES_VADDR   _AC(0x0000000010000000,UL)
 
#define MODULES_LEN   _AC(0x00000000e0000000,UL)
 
#define MODULES_END   _AC(0x00000000f0000000,UL)
 
#define LOW_OBP_ADDRESS   _AC(0x00000000f0000000,UL)
 
#define HI_OBP_ADDRESS   _AC(0x0000000100000000,UL)
 
#define VMALLOC_START   _AC(0x0000000100000000,UL)
 
#define VMALLOC_END   _AC(0x0000010000000000,UL)
 
#define VMEMMAP_BASE   _AC(0x0000010000000000,UL)
 
#define vmemmap   ((struct page *)VMEMMAP_BASE)
 
#define PMD_SHIFT   (PAGE_SHIFT + (PAGE_SHIFT-4))
 
#define PMD_SIZE   (_AC(1,UL) << PMD_SHIFT)
 
#define PMD_MASK   (~(PMD_SIZE-1))
 
#define PMD_BITS   (PAGE_SHIFT - 2)
 
#define PGDIR_SHIFT   (PAGE_SHIFT + (PAGE_SHIFT-4) + PMD_BITS)
 
#define PGDIR_SIZE   (_AC(1,UL) << PGDIR_SHIFT)
 
#define PGDIR_MASK   (~(PGDIR_SIZE-1))
 
#define PGDIR_BITS   (PAGE_SHIFT - 2)
 
#define PMD_PADDR   _AC(0xfffffffe,UL)
 
#define PMD_PADDR_SHIFT   _AC(11,UL)
 
#define PGD_PADDR   _AC(0xfffffffc,UL)
 
#define PGD_PADDR_SHIFT   _AC(11,UL)
 
#define PTRS_PER_PTE   (1UL << (PAGE_SHIFT-4))
 
#define PTRS_PER_PMD   (1UL << PMD_BITS)
 
#define PTRS_PER_PGD   (1UL << PGDIR_BITS)
 
#define FIRST_USER_ADDRESS   0
 
#define pte_ERROR(e)   __builtin_trap()
 
#define pmd_ERROR(e)   __builtin_trap()
 
#define pgd_ERROR(e)   __builtin_trap()
 
#define _PAGE_VALID   _AC(0x8000000000000000,UL) /* Valid TTE */
 
#define _PAGE_R   _AC(0x8000000000000000,UL) /* Keep ref bit uptodate*/
 
#define _PAGE_SPECIAL   _AC(0x0200000000000000,UL) /* Special page */
 
#define __HAVE_ARCH_PTE_SPECIAL
 
#define _PAGE_SZ4MB_4U   _AC(0x6000000000000000,UL) /* 4MB Page */
 
#define _PAGE_SZ512K_4U   _AC(0x4000000000000000,UL) /* 512K Page */
 
#define _PAGE_SZ64K_4U   _AC(0x2000000000000000,UL) /* 64K Page */
 
#define _PAGE_SZ8K_4U   _AC(0x0000000000000000,UL) /* 8K Page */
 
#define _PAGE_NFO_4U   _AC(0x1000000000000000,UL) /* No Fault Only */
 
#define _PAGE_IE_4U   _AC(0x0800000000000000,UL) /* Invert Endianness */
 
#define _PAGE_SOFT2_4U   _AC(0x07FC000000000000,UL) /* Software bits, set 2 */
 
#define _PAGE_SPECIAL_4U   _AC(0x0200000000000000,UL) /* Special page */
 
#define _PAGE_RES1_4U   _AC(0x0002000000000000,UL) /* Reserved */
 
#define _PAGE_SZ32MB_4U   _AC(0x0001000000000000,UL) /* (Panther) 32MB page */
 
#define _PAGE_SZ256MB_4U   _AC(0x2001000000000000,UL) /* (Panther) 256MB page */
 
#define _PAGE_SZALL_4U   _AC(0x6001000000000000,UL) /* All pgsz bits */
 
#define _PAGE_SN_4U   _AC(0x0000800000000000,UL) /* (Cheetah) Snoop */
 
#define _PAGE_RES2_4U   _AC(0x0000780000000000,UL) /* Reserved */
 
#define _PAGE_PADDR_4U   _AC(0x000007FFFFFFE000,UL) /* (Cheetah) pa[42:13] */
 
#define _PAGE_SOFT_4U   _AC(0x0000000000001F80,UL) /* Software bits: */
 
#define _PAGE_EXEC_4U   _AC(0x0000000000001000,UL) /* Executable SW bit */
 
#define _PAGE_MODIFIED_4U   _AC(0x0000000000000800,UL) /* Modified (dirty) */
 
#define _PAGE_FILE_4U   _AC(0x0000000000000800,UL) /* Pagecache page */
 
#define _PAGE_ACCESSED_4U   _AC(0x0000000000000400,UL) /* Accessed (ref'd) */
 
#define _PAGE_READ_4U   _AC(0x0000000000000200,UL) /* Readable SW Bit */
 
#define _PAGE_WRITE_4U   _AC(0x0000000000000100,UL) /* Writable SW Bit */
 
#define _PAGE_PRESENT_4U   _AC(0x0000000000000080,UL) /* Present */
 
#define _PAGE_L_4U   _AC(0x0000000000000040,UL) /* Locked TTE */
 
#define _PAGE_CP_4U   _AC(0x0000000000000020,UL) /* Cacheable in P-Cache */
 
#define _PAGE_CV_4U   _AC(0x0000000000000010,UL) /* Cacheable in V-Cache */
 
#define _PAGE_E_4U   _AC(0x0000000000000008,UL) /* side-Effect */
 
#define _PAGE_P_4U   _AC(0x0000000000000004,UL) /* Privileged Page */
 
#define _PAGE_W_4U   _AC(0x0000000000000002,UL) /* Writable */
 
#define _PAGE_NFO_4V   _AC(0x4000000000000000,UL) /* No Fault Only */
 
#define _PAGE_SOFT2_4V   _AC(0x3F00000000000000,UL) /* Software bits, set 2 */
 
#define _PAGE_MODIFIED_4V   _AC(0x2000000000000000,UL) /* Modified (dirty) */
 
#define _PAGE_ACCESSED_4V   _AC(0x1000000000000000,UL) /* Accessed (ref'd) */
 
#define _PAGE_READ_4V   _AC(0x0800000000000000,UL) /* Readable SW Bit */
 
#define _PAGE_WRITE_4V   _AC(0x0400000000000000,UL) /* Writable SW Bit */
 
#define _PAGE_SPECIAL_4V   _AC(0x0200000000000000,UL) /* Special page */
 
#define _PAGE_PADDR_4V   _AC(0x00FFFFFFFFFFE000,UL) /* paddr[55:13] */
 
#define _PAGE_IE_4V   _AC(0x0000000000001000,UL) /* Invert Endianness */
 
#define _PAGE_E_4V   _AC(0x0000000000000800,UL) /* side-Effect */
 
#define _PAGE_CP_4V   _AC(0x0000000000000400,UL) /* Cacheable in P-Cache */
 
#define _PAGE_CV_4V   _AC(0x0000000000000200,UL) /* Cacheable in V-Cache */
 
#define _PAGE_P_4V   _AC(0x0000000000000100,UL) /* Privileged Page */
 
#define _PAGE_EXEC_4V   _AC(0x0000000000000080,UL) /* Executable Page */
 
#define _PAGE_W_4V   _AC(0x0000000000000040,UL) /* Writable */
 
#define _PAGE_SOFT_4V   _AC(0x0000000000000030,UL) /* Software bits */
 
#define _PAGE_FILE_4V   _AC(0x0000000000000020,UL) /* Pagecache page */
 
#define _PAGE_PRESENT_4V   _AC(0x0000000000000010,UL) /* Present */
 
#define _PAGE_RESV_4V   _AC(0x0000000000000008,UL) /* Reserved */
 
#define _PAGE_SZ16GB_4V   _AC(0x0000000000000007,UL) /* 16GB Page */
 
#define _PAGE_SZ2GB_4V   _AC(0x0000000000000006,UL) /* 2GB Page */
 
#define _PAGE_SZ256MB_4V   _AC(0x0000000000000005,UL) /* 256MB Page */
 
#define _PAGE_SZ32MB_4V   _AC(0x0000000000000004,UL) /* 32MB Page */
 
#define _PAGE_SZ4MB_4V   _AC(0x0000000000000003,UL) /* 4MB Page */
 
#define _PAGE_SZ512K_4V   _AC(0x0000000000000002,UL) /* 512K Page */
 
#define _PAGE_SZ64K_4V   _AC(0x0000000000000001,UL) /* 64K Page */
 
#define _PAGE_SZ8K_4V   _AC(0x0000000000000000,UL) /* 8K Page */
 
#define _PAGE_SZALL_4V   _AC(0x0000000000000007,UL) /* All pgsz bits */
 
#define _PAGE_SZBITS_4U   _PAGE_SZ8K_4U
 
#define _PAGE_SZBITS_4V   _PAGE_SZ8K_4V
 
#define _PAGE_SZHUGE_4U   _PAGE_SZ4MB_4U
 
#define _PAGE_SZHUGE_4V   _PAGE_SZ4MB_4V
 
#define __P000   __pgprot(0)
 
#define __P001   __pgprot(0)
 
#define __P010   __pgprot(0)
 
#define __P011   __pgprot(0)
 
#define __P100   __pgprot(0)
 
#define __P101   __pgprot(0)
 
#define __P110   __pgprot(0)
 
#define __P111   __pgprot(0)
 
#define __S000   __pgprot(0)
 
#define __S001   __pgprot(0)
 
#define __S010   __pgprot(0)
 
#define __S011   __pgprot(0)
 
#define __S100   __pgprot(0)
 
#define __S101   __pgprot(0)
 
#define __S110   __pgprot(0)
 
#define __S111   __pgprot(0)
 
#define ZERO_PAGE(vaddr)   (mem_map_zero)
 
#define mk_pte(page, pgprot)   pfn_pte(page_to_pfn(page), (pgprot))
 
#define pte_page(x)   pfn_to_page(pte_pfn(x))
 
#define pgprot_noncached   pgprot_noncached
 
#define pmd_none(pmd)   (!pmd_val(pmd))
 
#define pud_set(pudp, pmdp)   (pud_val(*(pudp)) = (__pa((unsigned long) (pmdp)) >> PGD_PADDR_SHIFT))
 
#define pmd_page(pmd)   virt_to_page((void *)__pmd_page(pmd))
 
#define pud_page_vaddr(pud)   ((unsigned long) __va((((unsigned long)pud_val(pud))<<PGD_PADDR_SHIFT)))
 
#define pud_page(pud)   virt_to_page((void *)pud_page_vaddr(pud))
 
#define pmd_bad(pmd)   (0)
 
#define pmd_clear(pmdp)   (pmd_val(*(pmdp)) = 0U)
 
#define pud_none(pud)   (!pud_val(pud))
 
#define pud_bad(pud)   (0)
 
#define pud_present(pud)   (pud_val(pud) != 0U)
 
#define pud_clear(pudp)   (pud_val(*(pudp)) = 0U)
 
#define pte_none(pte)   (!pte_val(pte))
 
#define pgd_index(address)   (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1))
 
#define pgd_offset(mm, address)   ((mm)->pgd + pgd_index(address))
 
#define pgd_offset_k(address)   pgd_offset(&init_mm, address)
 
#define pmd_offset(pudp, address)
 
#define pte_index(dir, address)
 
#define pte_offset_kernel   pte_index
 
#define pte_offset_map   pte_index
 
#define pte_unmap(pte)   do { } while (0)
 
#define __HAVE_ARCH_PMDP_GET_AND_CLEAR
 
#define set_pte_at(mm, addr, ptep, pte)   __set_pte_at((mm), (addr), (ptep), (pte), 0)
 
#define pte_clear(mm, addr, ptep)   set_pte_at((mm), (addr), (ptep), __pte(0UL))
 
#define __HAVE_ARCH_PTE_CLEAR_NOT_PRESENT_FULL
 
#define pte_clear_not_present_full(mm, addr, ptep, fullmm)   __set_pte_at((mm), (addr), (ptep), __pte(0UL), (fullmm))
 
#define __swp_type(entry)   (((entry).val >> PAGE_SHIFT) & 0xffUL)
 
#define __swp_offset(entry)   ((entry).val >> (PAGE_SHIFT + 8UL))
 
#define __swp_entry(type, offset)
 
#define __pte_to_swp_entry(pte)   ((swp_entry_t) { pte_val(pte) })
 
#define __swp_entry_to_pte(x)   ((pte_t) { (x).val })
 
#define pte_to_pgoff(pte)   (pte_val(pte) >> PAGE_SHIFT)
 
#define PTE_FILE_MAX_BITS   (64UL - PAGE_SHIFT - 1UL)
 
#define MK_IOSPACE_PFN(space, pfn)   (pfn | (space << (BITS_PER_LONG - 4)))
 
#define GET_IOSPACE(pfn)   (pfn >> (BITS_PER_LONG - 4))
 
#define GET_PFN(pfn)   (pfn & 0x0fffffffffffffffUL)
 
#define HAVE_ARCH_UNMAPPED_AREA
 
#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN
 
#define HAVE_ARCH_FB_UNMAPPED_AREA
 

Functions

pte_t mk_pte_io (unsigned long, pgprot_t, int, unsigned long)
 
unsigned long pte_sz_bits (unsigned long size)
 
void tlb_batch_add (struct mm_struct *mm, unsigned long vaddr, pte_t *ptep, pte_t orig, int fullmm)
 
void paging_init (void)
 
unsigned long find_ecache_flush_span (unsigned long size)
 
void mmu_info (struct seq_file *)
 
void update_mmu_cache (struct vm_area_struct *, unsigned long, pte_t *)
 
int page_in_phys_avail (unsigned long paddr)
 
int remap_pfn_range (struct vm_area_struct *, unsigned long, unsigned long, unsigned long, pgprot_t)
 
unsigned long get_fb_unmapped_area (struct file *filp, unsigned long, unsigned long, unsigned long, unsigned long)
 
void pgtable_cache_init (void)
 
void sun4v_register_fault_status (void)
 
void sun4v_ktsb_register (void)
 
void __init cheetah_ecache_flush_init (void)
 
void sun4v_patch_tlb_handlers (void)
 
asmlinkage void do_sparc64_fault (struct pt_regs *regs)
 

Variables

pgprot_t PAGE_KERNEL
 
pgprot_t PAGE_KERNEL_LOCKED
 
pgprot_t PAGE_COPY
 
pgprot_t PAGE_SHARED
 
unsigned long _PAGE_IE
 
unsigned long _PAGE_E
 
unsigned long _PAGE_CACHE
 
unsigned long pg_iobits
 
unsigned long _PAGE_ALL_SZ_BITS
 
struct pagemem_map_zero
 
pgd_t swapper_pg_dir [2048]
 
pmd_t swapper_low_pmd_dir [2048]
 
unsigned long sparc64_valid_addr_bitmap []
 
unsigned long cmdline_memory_size
 

Macro Definition Documentation

#define __HAVE_ARCH_PMDP_GET_AND_CLEAR

Definition at line 782 of file pgtable_64.h.

#define __HAVE_ARCH_PTE_CLEAR_NOT_PRESENT_FULL

Definition at line 815 of file pgtable_64.h.

#define __HAVE_ARCH_PTE_SPECIAL

Definition at line 119 of file pgtable_64.h.

#define __P000   __pgprot(0)

Definition at line 189 of file pgtable_64.h.

#define __P001   __pgprot(0)

Definition at line 190 of file pgtable_64.h.

#define __P010   __pgprot(0)

Definition at line 191 of file pgtable_64.h.

#define __P011   __pgprot(0)

Definition at line 192 of file pgtable_64.h.

#define __P100   __pgprot(0)

Definition at line 193 of file pgtable_64.h.

#define __P101   __pgprot(0)

Definition at line 194 of file pgtable_64.h.

#define __P110   __pgprot(0)

Definition at line 195 of file pgtable_64.h.

#define __P111   __pgprot(0)

Definition at line 196 of file pgtable_64.h.

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

Definition at line 867 of file pgtable_64.h.

#define __S000   __pgprot(0)

Definition at line 198 of file pgtable_64.h.

#define __S001   __pgprot(0)

Definition at line 199 of file pgtable_64.h.

#define __S010   __pgprot(0)

Definition at line 200 of file pgtable_64.h.

#define __S011   __pgprot(0)

Definition at line 201 of file pgtable_64.h.

#define __S100   __pgprot(0)

Definition at line 202 of file pgtable_64.h.

#define __S101   __pgprot(0)

Definition at line 203 of file pgtable_64.h.

#define __S110   __pgprot(0)

Definition at line 204 of file pgtable_64.h.

#define __S111   __pgprot(0)

Definition at line 205 of file pgtable_64.h.

#define __swp_entry (   type,
  offset 
)
Value:
{ \
(((long)(type) << PAGE_SHIFT) | \
((long)(offset) << (PAGE_SHIFT + 8UL))) \
} )

Definition at line 861 of file pgtable_64.h.

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

Definition at line 868 of file pgtable_64.h.

#define __swp_offset (   entry)    ((entry).val >> (PAGE_SHIFT + 8UL))

Definition at line 860 of file pgtable_64.h.

#define __swp_type (   entry)    (((entry).val >> PAGE_SHIFT) & 0xffUL)

Definition at line 859 of file pgtable_64.h.

#define _PAGE_ACCESSED_4U   _AC(0x0000000000000400,UL) /* Accessed (ref'd) */

Definition at line 141 of file pgtable_64.h.

#define _PAGE_ACCESSED_4V   _AC(0x1000000000000000,UL) /* Accessed (ref'd) */

Definition at line 156 of file pgtable_64.h.

#define _PAGE_CP_4U   _AC(0x0000000000000020,UL) /* Cacheable in P-Cache */

Definition at line 146 of file pgtable_64.h.

#define _PAGE_CP_4V   _AC(0x0000000000000400,UL) /* Cacheable in P-Cache */

Definition at line 163 of file pgtable_64.h.

#define _PAGE_CV_4U   _AC(0x0000000000000010,UL) /* Cacheable in V-Cache */

Definition at line 147 of file pgtable_64.h.

#define _PAGE_CV_4V   _AC(0x0000000000000200,UL) /* Cacheable in V-Cache */

Definition at line 164 of file pgtable_64.h.

#define _PAGE_E_4U   _AC(0x0000000000000008,UL) /* side-Effect */

Definition at line 148 of file pgtable_64.h.

#define _PAGE_E_4V   _AC(0x0000000000000800,UL) /* side-Effect */

Definition at line 162 of file pgtable_64.h.

#define _PAGE_EXEC_4U   _AC(0x0000000000001000,UL) /* Executable SW bit */

Definition at line 138 of file pgtable_64.h.

#define _PAGE_EXEC_4V   _AC(0x0000000000000080,UL) /* Executable Page */

Definition at line 166 of file pgtable_64.h.

#define _PAGE_FILE_4U   _AC(0x0000000000000800,UL) /* Pagecache page */

Definition at line 140 of file pgtable_64.h.

#define _PAGE_FILE_4V   _AC(0x0000000000000020,UL) /* Pagecache page */

Definition at line 169 of file pgtable_64.h.

#define _PAGE_IE_4U   _AC(0x0800000000000000,UL) /* Invert Endianness */

Definition at line 127 of file pgtable_64.h.

#define _PAGE_IE_4V   _AC(0x0000000000001000,UL) /* Invert Endianness */

Definition at line 161 of file pgtable_64.h.

#define _PAGE_L_4U   _AC(0x0000000000000040,UL) /* Locked TTE */

Definition at line 145 of file pgtable_64.h.

#define _PAGE_MODIFIED_4U   _AC(0x0000000000000800,UL) /* Modified (dirty) */

Definition at line 139 of file pgtable_64.h.

#define _PAGE_MODIFIED_4V   _AC(0x2000000000000000,UL) /* Modified (dirty) */

Definition at line 155 of file pgtable_64.h.

#define _PAGE_NFO_4U   _AC(0x1000000000000000,UL) /* No Fault Only */

Definition at line 126 of file pgtable_64.h.

#define _PAGE_NFO_4V   _AC(0x4000000000000000,UL) /* No Fault Only */

Definition at line 153 of file pgtable_64.h.

#define _PAGE_P_4U   _AC(0x0000000000000004,UL) /* Privileged Page */

Definition at line 149 of file pgtable_64.h.

#define _PAGE_P_4V   _AC(0x0000000000000100,UL) /* Privileged Page */

Definition at line 165 of file pgtable_64.h.

#define _PAGE_PADDR_4U   _AC(0x000007FFFFFFE000,UL) /* (Cheetah) pa[42:13] */

Definition at line 136 of file pgtable_64.h.

#define _PAGE_PADDR_4V   _AC(0x00FFFFFFFFFFE000,UL) /* paddr[55:13] */

Definition at line 160 of file pgtable_64.h.

#define _PAGE_PRESENT_4U   _AC(0x0000000000000080,UL) /* Present */

Definition at line 144 of file pgtable_64.h.

#define _PAGE_PRESENT_4V   _AC(0x0000000000000010,UL) /* Present */

Definition at line 170 of file pgtable_64.h.

#define _PAGE_R   _AC(0x8000000000000000,UL) /* Keep ref bit uptodate*/

Definition at line 115 of file pgtable_64.h.

#define _PAGE_READ_4U   _AC(0x0000000000000200,UL) /* Readable SW Bit */

Definition at line 142 of file pgtable_64.h.

#define _PAGE_READ_4V   _AC(0x0800000000000000,UL) /* Readable SW Bit */

Definition at line 157 of file pgtable_64.h.

#define _PAGE_RES1_4U   _AC(0x0002000000000000,UL) /* Reserved */

Definition at line 130 of file pgtable_64.h.

#define _PAGE_RES2_4U   _AC(0x0000780000000000,UL) /* Reserved */

Definition at line 135 of file pgtable_64.h.

#define _PAGE_RESV_4V   _AC(0x0000000000000008,UL) /* Reserved */

Definition at line 171 of file pgtable_64.h.

#define _PAGE_SN_4U   _AC(0x0000800000000000,UL) /* (Cheetah) Snoop */

Definition at line 134 of file pgtable_64.h.

#define _PAGE_SOFT2_4U   _AC(0x07FC000000000000,UL) /* Software bits, set 2 */

Definition at line 128 of file pgtable_64.h.

#define _PAGE_SOFT2_4V   _AC(0x3F00000000000000,UL) /* Software bits, set 2 */

Definition at line 154 of file pgtable_64.h.

#define _PAGE_SOFT_4U   _AC(0x0000000000001F80,UL) /* Software bits: */

Definition at line 137 of file pgtable_64.h.

#define _PAGE_SOFT_4V   _AC(0x0000000000000030,UL) /* Software bits */

Definition at line 168 of file pgtable_64.h.

#define _PAGE_SPECIAL   _AC(0x0200000000000000,UL) /* Special page */

Definition at line 116 of file pgtable_64.h.

#define _PAGE_SPECIAL_4U   _AC(0x0200000000000000,UL) /* Special page */

Definition at line 129 of file pgtable_64.h.

#define _PAGE_SPECIAL_4V   _AC(0x0200000000000000,UL) /* Special page */

Definition at line 159 of file pgtable_64.h.

#define _PAGE_SZ16GB_4V   _AC(0x0000000000000007,UL) /* 16GB Page */

Definition at line 172 of file pgtable_64.h.

#define _PAGE_SZ256MB_4U   _AC(0x2001000000000000,UL) /* (Panther) 256MB page */

Definition at line 132 of file pgtable_64.h.

#define _PAGE_SZ256MB_4V   _AC(0x0000000000000005,UL) /* 256MB Page */

Definition at line 174 of file pgtable_64.h.

#define _PAGE_SZ2GB_4V   _AC(0x0000000000000006,UL) /* 2GB Page */

Definition at line 173 of file pgtable_64.h.

#define _PAGE_SZ32MB_4U   _AC(0x0001000000000000,UL) /* (Panther) 32MB page */

Definition at line 131 of file pgtable_64.h.

#define _PAGE_SZ32MB_4V   _AC(0x0000000000000004,UL) /* 32MB Page */

Definition at line 175 of file pgtable_64.h.

#define _PAGE_SZ4MB_4U   _AC(0x6000000000000000,UL) /* 4MB Page */

Definition at line 122 of file pgtable_64.h.

#define _PAGE_SZ4MB_4V   _AC(0x0000000000000003,UL) /* 4MB Page */

Definition at line 176 of file pgtable_64.h.

#define _PAGE_SZ512K_4U   _AC(0x4000000000000000,UL) /* 512K Page */

Definition at line 123 of file pgtable_64.h.

#define _PAGE_SZ512K_4V   _AC(0x0000000000000002,UL) /* 512K Page */

Definition at line 177 of file pgtable_64.h.

#define _PAGE_SZ64K_4U   _AC(0x2000000000000000,UL) /* 64K Page */

Definition at line 124 of file pgtable_64.h.

#define _PAGE_SZ64K_4V   _AC(0x0000000000000001,UL) /* 64K Page */

Definition at line 178 of file pgtable_64.h.

#define _PAGE_SZ8K_4U   _AC(0x0000000000000000,UL) /* 8K Page */

Definition at line 125 of file pgtable_64.h.

#define _PAGE_SZ8K_4V   _AC(0x0000000000000000,UL) /* 8K Page */

Definition at line 179 of file pgtable_64.h.

#define _PAGE_SZALL_4U   _AC(0x6001000000000000,UL) /* All pgsz bits */

Definition at line 133 of file pgtable_64.h.

#define _PAGE_SZALL_4V   _AC(0x0000000000000007,UL) /* All pgsz bits */

Definition at line 180 of file pgtable_64.h.

#define _PAGE_SZBITS_4U   _PAGE_SZ8K_4U

Definition at line 182 of file pgtable_64.h.

#define _PAGE_SZBITS_4V   _PAGE_SZ8K_4V

Definition at line 183 of file pgtable_64.h.

#define _PAGE_SZHUGE_4U   _PAGE_SZ4MB_4U

Definition at line 185 of file pgtable_64.h.

#define _PAGE_SZHUGE_4V   _PAGE_SZ4MB_4V

Definition at line 186 of file pgtable_64.h.

#define _PAGE_VALID   _AC(0x8000000000000000,UL) /* Valid TTE */

Definition at line 114 of file pgtable_64.h.

#define _PAGE_W_4U   _AC(0x0000000000000002,UL) /* Writable */

Definition at line 150 of file pgtable_64.h.

#define _PAGE_W_4V   _AC(0x0000000000000040,UL) /* Writable */

Definition at line 167 of file pgtable_64.h.

#define _PAGE_WRITE_4U   _AC(0x0000000000000100,UL) /* Writable SW Bit */

Definition at line 143 of file pgtable_64.h.

#define _PAGE_WRITE_4V   _AC(0x0400000000000000,UL) /* Writable SW Bit */

Definition at line 158 of file pgtable_64.h.

#define FIRST_USER_ADDRESS   0

Definition at line 105 of file pgtable_64.h.

#define GET_IOSPACE (   pfn)    (pfn >> (BITS_PER_LONG - 4))

Definition at line 895 of file pgtable_64.h.

#define GET_PFN (   pfn)    (pfn & 0x0fffffffffffffffUL)

Definition at line 896 of file pgtable_64.h.

#define HAVE_ARCH_FB_UNMAPPED_AREA

Definition at line 928 of file pgtable_64.h.

#define HAVE_ARCH_UNMAPPED_AREA

Definition at line 919 of file pgtable_64.h.

#define HAVE_ARCH_UNMAPPED_AREA_TOPDOWN

Definition at line 920 of file pgtable_64.h.

#define HI_OBP_ADDRESS   _AC(0x0000000100000000,UL)

Definition at line 41 of file pgtable_64.h.

#define LOW_OBP_ADDRESS   _AC(0x00000000f0000000,UL)

Definition at line 40 of file pgtable_64.h.

#define MK_IOSPACE_PFN (   space,
  pfn 
)    (pfn | (space << (BITS_PER_LONG - 4)))

Definition at line 894 of file pgtable_64.h.

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

Definition at line 241 of file pgtable_64.h.

#define MODULES_END   _AC(0x00000000f0000000,UL)

Definition at line 39 of file pgtable_64.h.

#define MODULES_LEN   _AC(0x00000000e0000000,UL)

Definition at line 38 of file pgtable_64.h.

#define MODULES_VADDR   _AC(0x0000000010000000,UL)

Definition at line 37 of file pgtable_64.h.

#define pgd_ERROR (   e)    __builtin_trap()

Definition at line 109 of file pgtable_64.h.

#define pgd_index (   address)    (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD - 1))

Definition at line 759 of file pgtable_64.h.

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

Definition at line 760 of file pgtable_64.h.

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

Definition at line 763 of file pgtable_64.h.

#define PGD_PADDR   _AC(0xfffffffc,UL)

Definition at line 92 of file pgtable_64.h.

#define PGD_PADDR_SHIFT   _AC(11,UL)

Definition at line 93 of file pgtable_64.h.

#define PGDIR_BITS   (PAGE_SHIFT - 2)

Definition at line 60 of file pgtable_64.h.

#define PGDIR_MASK   (~(PGDIR_SIZE-1))

Definition at line 59 of file pgtable_64.h.

#define PGDIR_SHIFT   (PAGE_SHIFT + (PAGE_SHIFT-4) + PMD_BITS)

Definition at line 57 of file pgtable_64.h.

#define PGDIR_SIZE   (_AC(1,UL) << PGDIR_SHIFT)

Definition at line 58 of file pgtable_64.h.

#define pgprot_noncached   pgprot_noncached

Definition at line 360 of file pgtable_64.h.

#define pmd_bad (   pmd)    (0)

Definition at line 748 of file pgtable_64.h.

#define PMD_BITS   (PAGE_SHIFT - 2)

Definition at line 54 of file pgtable_64.h.

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

Definition at line 749 of file pgtable_64.h.

#define pmd_ERROR (   e)    __builtin_trap()

Definition at line 108 of file pgtable_64.h.

#define PMD_MASK   (~(PMD_SIZE-1))

Definition at line 53 of file pgtable_64.h.

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

Definition at line 712 of file pgtable_64.h.

#define pmd_offset (   pudp,
  address 
)
Value:
((pmd_t *) pud_page_vaddr(*(pudp)) + \
(((address) >> PMD_SHIFT) & (PTRS_PER_PMD-1)))

Definition at line 766 of file pgtable_64.h.

#define PMD_PADDR   _AC(0xfffffffe,UL)

Definition at line 71 of file pgtable_64.h.

#define PMD_PADDR_SHIFT   _AC(11,UL)

Definition at line 72 of file pgtable_64.h.

#define pmd_page (   pmd)    virt_to_page((void *)__pmd_page(pmd))

Definition at line 744 of file pgtable_64.h.

#define PMD_SHIFT   (PAGE_SHIFT + (PAGE_SHIFT-4))

Definition at line 51 of file pgtable_64.h.

#define PMD_SIZE   (_AC(1,UL) << PMD_SHIFT)

Definition at line 52 of file pgtable_64.h.

#define pte_clear (   mm,
  addr,
  ptep 
)    set_pte_at((mm), (addr), (ptep), __pte(0UL))

Definition at line 812 of file pgtable_64.h.

#define pte_clear_not_present_full (   mm,
  addr,
  ptep,
  fullmm 
)    __set_pte_at((mm), (addr), (ptep), __pte(0UL), (fullmm))

Definition at line 816 of file pgtable_64.h.

#define pte_ERROR (   e)    __builtin_trap()

Definition at line 107 of file pgtable_64.h.

#define PTE_FILE_MAX_BITS   (64UL - PAGE_SHIFT - 1UL)

Definition at line 874 of file pgtable_64.h.

#define pte_index (   dir,
  address 
)
Value:
((pte_t *) __pmd_page(*(dir)) + \

Definition at line 771 of file pgtable_64.h.

#define pte_none (   pte)    (!pte_val(pte))

Definition at line 756 of file pgtable_64.h.

#define pte_offset_kernel   pte_index

Definition at line 774 of file pgtable_64.h.

#define pte_offset_map   pte_index

Definition at line 775 of file pgtable_64.h.

#define pte_page (   x)    pfn_to_page(pte_pfn(x))

Definition at line 276 of file pgtable_64.h.

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

Definition at line 872 of file pgtable_64.h.

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

Definition at line 776 of file pgtable_64.h.

#define PTRS_PER_PGD   (1UL << PGDIR_BITS)

Definition at line 102 of file pgtable_64.h.

#define PTRS_PER_PMD   (1UL << PMD_BITS)

Definition at line 101 of file pgtable_64.h.

#define PTRS_PER_PTE   (1UL << (PAGE_SHIFT-4))

Definition at line 100 of file pgtable_64.h.

#define pud_bad (   pud)    (0)

Definition at line 751 of file pgtable_64.h.

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

Definition at line 753 of file pgtable_64.h.

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

Definition at line 750 of file pgtable_64.h.

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

Definition at line 747 of file pgtable_64.h.

#define pud_page_vaddr (   pud)    ((unsigned long) __va((((unsigned long)pud_val(pud))<<PGD_PADDR_SHIFT)))

Definition at line 745 of file pgtable_64.h.

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

Definition at line 752 of file pgtable_64.h.

#define pud_set (   pudp,
  pmdp 
)    (pud_val(*(pudp)) = (__pa((unsigned long) (pmdp)) >> PGD_PADDR_SHIFT))

Definition at line 732 of file pgtable_64.h.

#define set_pte_at (   mm,
  addr,
  ptep,
  pte 
)    __set_pte_at((mm), (addr), (ptep), (pte), 0)

Definition at line 809 of file pgtable_64.h.

#define TLBTEMP_BASE   _AC(0x0000000006000000,UL)

Definition at line 35 of file pgtable_64.h.

#define TSBMAP_BASE   _AC(0x0000000008000000,UL)

Definition at line 36 of file pgtable_64.h.

#define VMALLOC_END   _AC(0x0000010000000000,UL)

Definition at line 43 of file pgtable_64.h.

#define VMALLOC_START   _AC(0x0000000100000000,UL)

Definition at line 42 of file pgtable_64.h.

#define vmemmap   ((struct page *)VMEMMAP_BASE)

Definition at line 46 of file pgtable_64.h.

#define VMEMMAP_BASE   _AC(0x0000010000000000,UL)

Definition at line 44 of file pgtable_64.h.

#define ZERO_PAGE (   vaddr)    (mem_map_zero)

Definition at line 227 of file pgtable_64.h.

Function Documentation

void __init cheetah_ecache_flush_init ( void  )

Definition at line 814 of file traps_64.c.

asmlinkage void do_sparc64_fault ( struct pt_regs regs)

Definition at line 273 of file fault_64.c.

unsigned long find_ecache_flush_span ( unsigned long  size)

Definition at line 1536 of file init_64.c.

unsigned long get_fb_unmapped_area ( struct file filp,
unsigned  long,
unsigned  long,
unsigned  long,
unsigned  long 
)

Definition at line 299 of file sys_sparc_64.c.

pte_t mk_pte_io ( unsigned  long,
pgprot_t  ,
int  ,
unsigned  long 
)

Definition at line 2395 of file init_64.c.

void mmu_info ( struct seq_file )

Definition at line 431 of file init_64.c.

int page_in_phys_avail ( unsigned long  paddr)

Definition at line 1934 of file init_64.c.

void paging_init ( void  )

paging_init - setup page tables

paging_init() sets up the page tables for each node of the system and frees the bootmem allocator memory for general use.

Definition at line 238 of file init.c.

void pgtable_cache_init ( void  )

Definition at line 145 of file pgalloc.c.

unsigned long pte_sz_bits ( unsigned long  size)

Definition at line 2366 of file init_64.c.

int remap_pfn_range ( struct vm_area_struct vma,
unsigned long  addr,
unsigned long  pfn,
unsigned long  size,
pgprot_t  prot 
)

remap_pfn_range - remap kernel memory to userspace : user vma to map to : target user address to start at : physical address of kernel memory : size of map area : page protection flags for this mapping

Note: this is only safe if the mm semaphore is held when called.

Definition at line 2292 of file memory.c.

void sun4v_ktsb_register ( void  )

Definition at line 1685 of file init_64.c.

void sun4v_patch_tlb_handlers ( void  )
void sun4v_register_fault_status ( void  )
void tlb_batch_add ( struct mm_struct mm,
unsigned long  vaddr,
pte_t ptep,
pte_t  orig,
int  fullmm 
)

Definition at line 74 of file tlb.c.

void update_mmu_cache ( struct vm_area_struct ,
unsigned  long,
pte_t  
)
inline

Definition at line 330 of file pgtable.h.

Variable Documentation

unsigned long _PAGE_ALL_SZ_BITS
unsigned long _PAGE_CACHE
unsigned long _PAGE_E
unsigned long _PAGE_IE
unsigned long cmdline_memory_size

Definition at line 85 of file setup_64.c.

struct page* mem_map_zero
pgprot_t PAGE_COPY
pgprot_t PAGE_KERNEL
pgprot_t PAGE_KERNEL_LOCKED
pgprot_t PAGE_SHARED
unsigned long pg_iobits
unsigned long sparc64_valid_addr_bitmap[]

Definition at line 167 of file init_64.c.

pmd_t swapper_low_pmd_dir[2048]
pgd_t swapper_pg_dir[2048]

Definition at line 36 of file init.c.