Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
pat.c File Reference
#include <linux/seq_file.h>
#include <linux/bootmem.h>
#include <linux/debugfs.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/fs.h>
#include <linux/rbtree.h>
#include <asm/cacheflush.h>
#include <asm/processor.h>
#include <asm/tlbflush.h>
#include <asm/x86_init.h>
#include <asm/pgtable.h>
#include <asm/fcntl.h>
#include <asm/e820.h>
#include <asm/mtrr.h>
#include <asm/page.h>
#include <asm/msr.h>
#include <asm/pat.h>
#include <asm/io.h>
#include "pat_internal.h"

Go to the source code of this file.

Data Structures

struct  pagerange_state
 

Macros

#define PAT(x, y)   ((u64)PAT_ ## y << ((x)*8))
 

Enumerations

enum  {
  PAT_UC = 0, PAT_WC = 1, PAT_WT = 4, PAT_WP = 5,
  PAT_WB = 6, PAT_UC_MINUS = 7
}
 

Functions

 __setup ("debugpat", pat_debug_setup)
 
void pat_init (void)
 
int reserve_memtype (u64 start, u64 end, unsigned long req_type, unsigned long *new_type)
 
int free_memtype (u64 start, u64 end)
 
int io_reserve_memtype (resource_size_t start, resource_size_t end, unsigned long *type)
 
void io_free_memtype (resource_size_t start, resource_size_t end)
 
pgprot_t phys_mem_access_prot (struct file *file, unsigned long pfn, unsigned long size, pgprot_t vma_prot)
 
int phys_mem_access_prot_allowed (struct file *file, unsigned long pfn, unsigned long size, pgprot_t *vma_prot)
 
int kernel_map_sync_memtype (u64 base, unsigned long size, unsigned long flags)
 
int track_pfn_copy (struct vm_area_struct *vma)
 
int track_pfn_remap (struct vm_area_struct *vma, pgprot_t *prot, unsigned long pfn, unsigned long addr, unsigned long size)
 
int track_pfn_insert (struct vm_area_struct *vma, pgprot_t *prot, unsigned long pfn)
 
void untrack_pfn (struct vm_area_struct *vma, unsigned long pfn, unsigned long size)
 
pgprot_t pgprot_writecombine (pgprot_t prot)
 
 EXPORT_SYMBOL_GPL (pgprot_writecombine)
 

Variables

int pat_debug_enable
 

Macro Definition Documentation

#define PAT (   x,
  y 
)    ((u64)PAT_ ## y << ((x)*8))

Definition at line 78 of file pat.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
PAT_UC 
PAT_WC 
PAT_WT 
PAT_WP 
PAT_WB 
PAT_UC_MINUS 

Definition at line 69 of file pat.c.

Function Documentation

__setup ( "debugpat"  ,
pat_debug_setup   
)
EXPORT_SYMBOL_GPL ( pgprot_writecombine  )
int free_memtype ( u64  start,
u64  end 
)

Definition at line 350 of file pat.c.

void io_free_memtype ( resource_size_t  start,
resource_size_t  end 
)

io_free_memtype - Release a memory type mapping for a region of memory : start (physical address) of the region : end (physical address) of the region

Definition at line 479 of file pat.c.

int io_reserve_memtype ( resource_size_t  start,
resource_size_t  end,
unsigned long type 
)

io_reserve_memtype - Request a memory type mapping for a region of memory : start (physical address) of the region : end (physical address) of the region : A pointer to memtype, with requested type. On success, requested or any other compatible type that was available for the region is returned

On success, returns 0 On failure, returns non-zero

Definition at line 444 of file pat.c.

int kernel_map_sync_memtype ( u64  base,
unsigned long  size,
unsigned long  flags 
)

Definition at line 559 of file pat.c.

void pat_init ( void  )

Definition at line 80 of file pat.c.

pgprot_t pgprot_writecombine ( pgprot_t  prot)

Definition at line 784 of file pat.c.

pgprot_t phys_mem_access_prot ( struct file file,
unsigned long  pfn,
unsigned long  size,
pgprot_t  vma_prot 
)

Definition at line 484 of file pat.c.

int phys_mem_access_prot_allowed ( struct file file,
unsigned long  pfn,
unsigned long  size,
pgprot_t vma_prot 
)

Definition at line 520 of file pat.c.

int reserve_memtype ( u64  start,
u64  end,
unsigned long  req_type,
unsigned long new_type 
)

Definition at line 271 of file pat.c.

int track_pfn_copy ( struct vm_area_struct vma)

Definition at line 673 of file pat.c.

int track_pfn_insert ( struct vm_area_struct vma,
pgprot_t prot,
unsigned long  pfn 
)

Definition at line 740 of file pat.c.

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

Definition at line 701 of file pat.c.

void untrack_pfn ( struct vm_area_struct vma,
unsigned long  pfn,
unsigned long  size 
)

Definition at line 761 of file pat.c.

Variable Documentation

int pat_debug_enable

Definition at line 58 of file pat.c.