Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
srmmu.c File Reference
#include <linux/seq_file.h>
#include <linux/spinlock.h>
#include <linux/bootmem.h>
#include <linux/pagemap.h>
#include <linux/vmalloc.h>
#include <linux/kdebug.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/log2.h>
#include <linux/gfp.h>
#include <linux/fs.h>
#include <linux/mm.h>
#include <asm/mmu_context.h>
#include <asm/cacheflush.h>
#include <asm/tlbflush.h>
#include <asm/io-unit.h>
#include <asm/pgalloc.h>
#include <asm/pgtable.h>
#include <asm/bitext.h>
#include <asm/vaddrs.h>
#include <asm/cache.h>
#include <asm/traps.h>
#include <asm/oplib.h>
#include <asm/mbus.h>
#include <asm/page.h>
#include <asm/asi.h>
#include <asm/msi.h>
#include <asm/smp.h>
#include <asm/io.h>
#include <asm/turbosparc.h>
#include <asm/tsunami.h>
#include <asm/viking.h>
#include <asm/swift.h>
#include <asm/leon.h>
#include <asm/mxcc.h>
#include <asm/ross.h>
#include "srmmu.h"

Go to the source code of this file.

Data Structures

struct  ctx_list
 

Macros

#define FLUSH_BEGIN(mm)   if ((mm)->context != NO_CONTEXT) {
 
#define FLUSH_END   }
 
#define SRMMU_NOCACHE_BITMAP_SHIFT   (PAGE_SHIFT - 4)
 
#define SRMMU_NOCACHE_ALIGN_MAX   (sizeof(ctxd_t)*SRMMU_MAX_CONTEXTS)
 
#define NO_CONTEXT   -1
 
#define add_to_free_ctxlist(entry)   add_to_ctx_list(&ctx_free, entry)
 
#define add_to_used_ctxlist(entry)   add_to_ctx_list(&ctx_used, entry)
 
#define KERNEL_PTE(page_shifted)   ((page_shifted)|SRMMU_CACHE|SRMMU_PRIV|SRMMU_VALID)
 
#define SWIFT_MASKID_ADDR   0x10003018
 

Functions

void pmd_set (pmd_t *pmdp, pte_t *ptep)
 
void pmd_populate (struct mm_struct *mm, pmd_t *pmdp, struct page *ptep)
 
pte_tpte_offset_kernel (pmd_t *dir, unsigned long address)
 
voidsrmmu_get_nocache (int size, int align)
 
void srmmu_free_nocache (void *addr, int size)
 
pgd_tget_pgd_fast (void)
 
pgtable_t pte_alloc_one (struct mm_struct *mm, unsigned long address)
 
void pte_free (struct mm_struct *mm, pgtable_t pte)
 
void switch_mm (struct mm_struct *old_mm, struct mm_struct *mm, struct task_struct *tsk)
 
void srmmu_mapiorange (unsigned int bus, unsigned long xpa, unsigned long xva, unsigned int len)
 
void srmmu_unmapiorange (unsigned long virt_addr, unsigned int len)
 
void tsunami_flush_cache_all (void)
 
void tsunami_flush_cache_mm (struct mm_struct *mm)
 
void tsunami_flush_cache_range (struct vm_area_struct *vma, unsigned long start, unsigned long end)
 
void tsunami_flush_cache_page (struct vm_area_struct *vma, unsigned long page)
 
void tsunami_flush_page_to_ram (unsigned long page)
 
void tsunami_flush_page_for_dma (unsigned long page)
 
void tsunami_flush_sig_insns (struct mm_struct *mm, unsigned long insn_addr)
 
void tsunami_flush_tlb_all (void)
 
void tsunami_flush_tlb_mm (struct mm_struct *mm)
 
void tsunami_flush_tlb_range (struct vm_area_struct *vma, unsigned long start, unsigned long end)
 
void tsunami_flush_tlb_page (struct vm_area_struct *vma, unsigned long page)
 
void tsunami_setup_blockops (void)
 
void swift_flush_cache_all (void)
 
void swift_flush_cache_mm (struct mm_struct *mm)
 
void swift_flush_cache_range (struct vm_area_struct *vma, unsigned long start, unsigned long end)
 
void swift_flush_cache_page (struct vm_area_struct *vma, unsigned long page)
 
void swift_flush_page_to_ram (unsigned long page)
 
void swift_flush_page_for_dma (unsigned long page)
 
void swift_flush_sig_insns (struct mm_struct *mm, unsigned long insn_addr)
 
void swift_flush_tlb_all (void)
 
void swift_flush_tlb_mm (struct mm_struct *mm)
 
void swift_flush_tlb_range (struct vm_area_struct *vma, unsigned long start, unsigned long end)
 
void swift_flush_tlb_page (struct vm_area_struct *vma, unsigned long page)
 
void viking_flush_cache_all (void)
 
void viking_flush_cache_mm (struct mm_struct *mm)
 
void viking_flush_cache_range (struct vm_area_struct *vma, unsigned long start, unsigned long end)
 
void viking_flush_cache_page (struct vm_area_struct *vma, unsigned long page)
 
void viking_flush_page_to_ram (unsigned long page)
 
void viking_flush_page_for_dma (unsigned long page)
 
void viking_flush_sig_insns (struct mm_struct *mm, unsigned long addr)
 
void viking_flush_page (unsigned long page)
 
void viking_mxcc_flush_page (unsigned long page)
 
void viking_flush_tlb_all (void)
 
void viking_flush_tlb_mm (struct mm_struct *mm)
 
void viking_flush_tlb_range (struct vm_area_struct *vma, unsigned long start, unsigned long end)
 
void viking_flush_tlb_page (struct vm_area_struct *vma, unsigned long page)
 
void sun4dsmp_flush_tlb_all (void)
 
void sun4dsmp_flush_tlb_mm (struct mm_struct *mm)
 
void sun4dsmp_flush_tlb_range (struct vm_area_struct *vma, unsigned long start, unsigned long end)
 
void sun4dsmp_flush_tlb_page (struct vm_area_struct *vma, unsigned long page)
 
void hypersparc_flush_cache_all (void)
 
void hypersparc_flush_cache_mm (struct mm_struct *mm)
 
void hypersparc_flush_cache_range (struct vm_area_struct *vma, unsigned long start, unsigned long end)
 
void hypersparc_flush_cache_page (struct vm_area_struct *vma, unsigned long page)
 
void hypersparc_flush_page_to_ram (unsigned long page)
 
void hypersparc_flush_page_for_dma (unsigned long page)
 
void hypersparc_flush_sig_insns (struct mm_struct *mm, unsigned long insn_addr)
 
void hypersparc_flush_tlb_all (void)
 
void hypersparc_flush_tlb_mm (struct mm_struct *mm)
 
void hypersparc_flush_tlb_range (struct vm_area_struct *vma, unsigned long start, unsigned long end)
 
void hypersparc_flush_tlb_page (struct vm_area_struct *vma, unsigned long page)
 
void hypersparc_setup_blockops (void)
 
void mmu_info (struct seq_file *m)
 
int init_new_context (struct task_struct *tsk, struct mm_struct *mm)
 
void destroy_context (struct mm_struct *mm)
 
void __init load_mmu (void)
 

Variables

enum mbus_module srmmu_modtype
 
int vac_cache_size
 
int vac_line_size
 
struct resource sparc_iomap
 
unsigned long last_valid_pfn
 
struct sparc32_cachetlb_opssparc32_cachetlb_ops
 
int flush_page_for_dma_global = 1
 
charsrmmu_name
 
ctxd_tsrmmu_ctx_table_phys
 
int viking_mxcc_present
 
voidsrmmu_nocache_pool
 
voidsrmmu_nocache_bitmap
 
void(* poke_srmmu )(void)
 

Macro Definition Documentation

#define add_to_free_ctxlist (   entry)    add_to_ctx_list(&ctx_free, entry)

Definition at line 393 of file srmmu.c.

#define add_to_used_ctxlist (   entry)    add_to_ctx_list(&ctx_used, entry)

Definition at line 394 of file srmmu.c.

#define FLUSH_BEGIN (   mm)    if ((mm)->context != NO_CONTEXT) {

Definition at line 72 of file srmmu.c.

#define FLUSH_END   }

Definition at line 73 of file srmmu.c.

#define KERNEL_PTE (   page_shifted)    ((page_shifted)|SRMMU_CACHE|SRMMU_PRIV|SRMMU_VALID)

Definition at line 811 of file srmmu.c.

#define NO_CONTEXT   -1

Definition at line 365 of file srmmu.c.

#define SRMMU_NOCACHE_ALIGN_MAX   (sizeof(ctxd_t)*SRMMU_MAX_CONTEXTS)

Definition at line 98 of file srmmu.c.

#define SRMMU_NOCACHE_BITMAP_SHIFT   (PAGE_SHIFT - 4)

Definition at line 95 of file srmmu.c.

#define SWIFT_MASKID_ADDR   0x10003018

Definition at line 1145 of file srmmu.c.

Function Documentation

void destroy_context ( struct mm_struct mm)
inline

Definition at line 982 of file srmmu.c.

pgd_t* get_pgd_fast ( void  )

Definition at line 315 of file srmmu.c.

void hypersparc_flush_cache_all ( void  )
void hypersparc_flush_cache_mm ( struct mm_struct mm)
void hypersparc_flush_cache_page ( struct vm_area_struct vma,
unsigned long  page 
)
void hypersparc_flush_cache_range ( struct vm_area_struct vma,
unsigned long  start,
unsigned long  end 
)
void hypersparc_flush_page_for_dma ( unsigned long  page)
void hypersparc_flush_page_to_ram ( unsigned long  page)
void hypersparc_flush_sig_insns ( struct mm_struct mm,
unsigned long  insn_addr 
)
void hypersparc_flush_tlb_all ( void  )
void hypersparc_flush_tlb_mm ( struct mm_struct mm)
void hypersparc_flush_tlb_page ( struct vm_area_struct vma,
unsigned long  page 
)
void hypersparc_flush_tlb_range ( struct vm_area_struct vma,
unsigned long  start,
unsigned long  end 
)
void hypersparc_setup_blockops ( void  )
int init_new_context ( struct task_struct tsk,
struct mm_struct mm 
)

Definition at line 976 of file srmmu.c.

void __init load_mmu ( void  )

Definition at line 1765 of file srmmu.c.

void mmu_info ( struct seq_file m)

Definition at line 963 of file srmmu.c.

void pmd_populate ( struct mm_struct mm,
pmd_t pmdp,
struct page ptep 
)

Definition at line 123 of file srmmu.c.

void pmd_set ( pmd_t pmdp,
pte_t ptep 
)
inline

Definition at line 111 of file srmmu.c.

pgtable_t pte_alloc_one ( struct mm_struct mm,
unsigned long  address 
)
read

Definition at line 338 of file srmmu.c.

void pte_free ( struct mm_struct mm,
pgtable_t  pte 
)

Definition at line 350 of file srmmu.c.

pte_t* pte_offset_kernel ( pmd_t dir,
unsigned long  address 
)
inline

Definition at line 136 of file srmmu.c.

void srmmu_free_nocache ( void addr,
int  size 
)

Definition at line 193 of file srmmu.c.

void* srmmu_get_nocache ( int  size,
int  align 
)

Definition at line 181 of file srmmu.c.

void srmmu_mapiorange ( unsigned int  bus,
unsigned long  xpa,
unsigned long  xva,
unsigned int  len 
)

Definition at line 497 of file srmmu.c.

void srmmu_unmapiorange ( unsigned long  virt_addr,
unsigned int  len 
)

Definition at line 523 of file srmmu.c.

void sun4dsmp_flush_tlb_all ( void  )
void sun4dsmp_flush_tlb_mm ( struct mm_struct mm)
void sun4dsmp_flush_tlb_page ( struct vm_area_struct vma,
unsigned long  page 
)
void sun4dsmp_flush_tlb_range ( struct vm_area_struct vma,
unsigned long  start,
unsigned long  end 
)
void swift_flush_cache_all ( void  )
void swift_flush_cache_mm ( struct mm_struct mm)
void swift_flush_cache_page ( struct vm_area_struct vma,
unsigned long  page 
)
void swift_flush_cache_range ( struct vm_area_struct vma,
unsigned long  start,
unsigned long  end 
)
void swift_flush_page_for_dma ( unsigned long  page)
void swift_flush_page_to_ram ( unsigned long  page)
void swift_flush_sig_insns ( struct mm_struct mm,
unsigned long  insn_addr 
)
void swift_flush_tlb_all ( void  )
void swift_flush_tlb_mm ( struct mm_struct mm)
void swift_flush_tlb_page ( struct vm_area_struct vma,
unsigned long  page 
)
void swift_flush_tlb_range ( struct vm_area_struct vma,
unsigned long  start,
unsigned long  end 
)
void switch_mm ( struct mm_struct old_mm,
struct mm_struct mm,
struct task_struct tsk 
)

Definition at line 453 of file srmmu.c.

void tsunami_flush_cache_all ( void  )
void tsunami_flush_cache_mm ( struct mm_struct mm)
void tsunami_flush_cache_page ( struct vm_area_struct vma,
unsigned long  page 
)
void tsunami_flush_cache_range ( struct vm_area_struct vma,
unsigned long  start,
unsigned long  end 
)
void tsunami_flush_page_for_dma ( unsigned long  page)
void tsunami_flush_page_to_ram ( unsigned long  page)
void tsunami_flush_sig_insns ( struct mm_struct mm,
unsigned long  insn_addr 
)
void tsunami_flush_tlb_all ( void  )
void tsunami_flush_tlb_mm ( struct mm_struct mm)
void tsunami_flush_tlb_page ( struct vm_area_struct vma,
unsigned long  page 
)
void tsunami_flush_tlb_range ( struct vm_area_struct vma,
unsigned long  start,
unsigned long  end 
)
void tsunami_setup_blockops ( void  )
void viking_flush_cache_all ( void  )
void viking_flush_cache_mm ( struct mm_struct mm)
void viking_flush_cache_page ( struct vm_area_struct vma,
unsigned long  page 
)
void viking_flush_cache_range ( struct vm_area_struct vma,
unsigned long  start,
unsigned long  end 
)
void viking_flush_page ( unsigned long  page)
void viking_flush_page_for_dma ( unsigned long  page)
void viking_flush_page_to_ram ( unsigned long  page)
void viking_flush_sig_insns ( struct mm_struct mm,
unsigned long  addr 
)
void viking_flush_tlb_all ( void  )
void viking_flush_tlb_mm ( struct mm_struct mm)
void viking_flush_tlb_page ( struct vm_area_struct vma,
unsigned long  page 
)
void viking_flush_tlb_range ( struct vm_area_struct vma,
unsigned long  start,
unsigned long  end 
)
void viking_mxcc_flush_page ( unsigned long  page)

Variable Documentation

int flush_page_for_dma_global = 1

Definition at line 76 of file srmmu.c.

unsigned long last_valid_pfn

Definition at line 67 of file init_32.c.

void(* poke_srmmu)(void)

Definition at line 859 of file srmmu.c.

Definition at line 64 of file srmmu.c.

struct resource sparc_iomap

Definition at line 78 of file ioport.c.

ctxd_t* srmmu_ctx_table_phys

Definition at line 80 of file srmmu.c.

enum mbus_module srmmu_modtype

Definition at line 53 of file srmmu.c.

char* srmmu_name

Definition at line 78 of file srmmu.c.

void* srmmu_nocache_bitmap

Definition at line 101 of file srmmu.c.

void* srmmu_nocache_pool

Definition at line 100 of file srmmu.c.

int vac_cache_size

Definition at line 55 of file srmmu.c.

int vac_line_size

Definition at line 56 of file srmmu.c.

int viking_mxcc_present

Definition at line 83 of file srmmu.c.