Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
tlb.c File Reference
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/types.h>
#include <linux/ptrace.h>
#include <linux/mman.h>
#include <linux/mm.h>
#include <linux/init.h>
#include <asm/segment.h>
#include <asm/tlbflush.h>
#include <asm/pgtable.h>
#include <asm/mmu_context.h>
#include <asm/spr_defs.h>

Go to the source code of this file.

Macros

#define NO_CONTEXT   -1
 
#define NUM_DTLB_SETS
 
#define NUM_ITLB_SETS
 
#define DTLB_OFFSET(addr)   (((addr) >> PAGE_SHIFT) & (NUM_DTLB_SETS-1))
 
#define ITLB_OFFSET(addr)   (((addr) >> PAGE_SHIFT) & (NUM_ITLB_SETS-1))
 
#define have_dtlbeir   (mfspr(SPR_DMMUCFGR) & SPR_DMMUCFGR_TEIRI)
 
#define have_itlbeir   (mfspr(SPR_IMMUCFGR) & SPR_IMMUCFGR_TEIRI)
 
#define flush_dtlb_page_eir(addr)   mtspr(SPR_DTLBEIR, addr)
 
#define flush_dtlb_page_no_eir(addr)   mtspr_off(SPR_DTLBMR_BASE(0), DTLB_OFFSET(addr), 0);
 
#define flush_itlb_page_eir(addr)   mtspr(SPR_ITLBEIR, addr)
 
#define flush_itlb_page_no_eir(addr)   mtspr_off(SPR_ITLBMR_BASE(0), ITLB_OFFSET(addr), 0);
 

Functions

void flush_tlb_all (void)
 
void flush_tlb_page (struct vm_area_struct *vma, unsigned long addr)
 
void flush_tlb_range (struct vm_area_struct *vma, unsigned long start, unsigned long end)
 
void flush_tlb_mm (struct mm_struct *mm)
 
void switch_mm (struct mm_struct *prev, struct mm_struct *next, struct task_struct *next_tsk)
 
int init_new_context (struct task_struct *tsk, struct mm_struct *mm)
 
void destroy_context (struct mm_struct *mm)
 
void __init tlb_init (void)
 

Macro Definition Documentation

#define DTLB_OFFSET (   addr)    (((addr) >> PAGE_SHIFT) & (NUM_DTLB_SETS-1))

Definition at line 41 of file tlb.c.

#define flush_dtlb_page_eir (   addr)    mtspr(SPR_DTLBEIR, addr)

Definition at line 81 of file tlb.c.

#define flush_dtlb_page_no_eir (   addr)    mtspr_off(SPR_DTLBMR_BASE(0), DTLB_OFFSET(addr), 0);

Definition at line 82 of file tlb.c.

#define flush_itlb_page_eir (   addr)    mtspr(SPR_ITLBEIR, addr)

Definition at line 85 of file tlb.c.

#define flush_itlb_page_no_eir (   addr)    mtspr_off(SPR_ITLBMR_BASE(0), ITLB_OFFSET(addr), 0);

Definition at line 86 of file tlb.c.

#define have_dtlbeir   (mfspr(SPR_DMMUCFGR) & SPR_DMMUCFGR_TEIRI)

Definition at line 67 of file tlb.c.

#define have_itlbeir   (mfspr(SPR_IMMUCFGR) & SPR_IMMUCFGR_TEIRI)

Definition at line 68 of file tlb.c.

#define ITLB_OFFSET (   addr)    (((addr) >> PAGE_SHIFT) & (NUM_ITLB_SETS-1))

Definition at line 42 of file tlb.c.

#define NO_CONTEXT   -1

Definition at line 35 of file tlb.c.

#define NUM_DTLB_SETS
Value:

Definition at line 37 of file tlb.c.

#define NUM_ITLB_SETS
Value:

Definition at line 39 of file tlb.c.

Function Documentation

void destroy_context ( struct mm_struct mm)
inline

Definition at line 179 of file tlb.c.

void flush_tlb_all ( void  )

flush_tlb_all - Completely invalidate TLBs on all CPUs

Definition at line 52 of file tlb.c.

void flush_tlb_mm ( struct mm_struct mm)

flush_tlb_mm - Invalidate TLB of specified VM context : The VM context to invalidate.

Definition at line 132 of file tlb.c.

void flush_tlb_page ( struct vm_area_struct vma,
unsigned long  addr 
)

flush_tlb_page - Invalidate TLB of page : The VM context to invalidate the page for. : The virtual address of the page to invalidate.

Definition at line 89 of file tlb.c.

void flush_tlb_range ( struct vm_area_struct vma,
unsigned long  start,
unsigned long  end 
)

Definition at line 102 of file tlb.c.

int init_new_context ( struct task_struct tsk,
struct mm_struct mm 
)

Definition at line 168 of file tlb.c.

void switch_mm ( struct mm_struct prev,
struct mm_struct next,
struct task_struct next_tsk 
)

Definition at line 143 of file tlb.c.

void __init tlb_init ( void  )

Definition at line 187 of file tlb.c.