Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
pgalloc.h File Reference
#include <linux/threads.h>
#include <linux/mm.h>
#include <linux/mmzone.h>
#include <asm/fixmap.h>
#include <asm/page.h>
#include <hv/hypervisor.h>

Go to the source code of this file.

Macros

#define L2_KERNEL_PGTABLE_SHIFT   _HV_LOG2_L2_SIZE(HPAGE_SHIFT, PAGE_SHIFT)
 
#define L2_KERNEL_PGTABLE_SIZE   (1UL << L2_KERNEL_PGTABLE_SHIFT)
 
#define L2_USER_PGTABLE_SHIFT   L2_KERNEL_PGTABLE_SHIFT
 
#define L2_USER_PGTABLE_ORDER   (L2_USER_PGTABLE_SHIFT - PAGE_SHIFT)
 
#define pmd_pgtable(pmd)   pmd_page(pmd)
 
#define check_pgt_cache()   do { } while (0)
 

Functions

pgd_tpgd_alloc (struct mm_struct *mm)
 
void pgd_free (struct mm_struct *mm, pgd_t *pgd)
 
pgtable_t pgtable_alloc_one (struct mm_struct *mm, unsigned long address, int order)
 
void pgtable_free (struct mm_struct *mm, struct page *pte, int order)
 
void __pgtable_free_tlb (struct mmu_gather *tlb, struct page *pte, unsigned long address, int order)
 
pte_tget_prealloc_pte (unsigned long pfn)
 
void shatter_pmd (pmd_t *pmd)
 
void shatter_huge_page (unsigned long addr)
 

Macro Definition Documentation

#define check_pgt_cache (   void)    do { } while (0)

Definition at line 108 of file pgalloc.h.

#define L2_KERNEL_PGTABLE_SHIFT   _HV_LOG2_L2_SIZE(HPAGE_SHIFT, PAGE_SHIFT)

Definition at line 26 of file pgalloc.h.

#define L2_KERNEL_PGTABLE_SIZE   (1UL << L2_KERNEL_PGTABLE_SHIFT)

Definition at line 29 of file pgalloc.h.

#define L2_USER_PGTABLE_ORDER   (L2_USER_PGTABLE_SHIFT - PAGE_SHIFT)

Definition at line 39 of file pgalloc.h.

#define L2_USER_PGTABLE_SHIFT   L2_KERNEL_PGTABLE_SHIFT

Definition at line 35 of file pgalloc.h.

#define pmd_pgtable (   pmd)    pmd_page(pmd)

Definition at line 86 of file pgalloc.h.

Function Documentation

void __pgtable_free_tlb ( struct mmu_gather tlb,
struct page pte,
unsigned long  address,
int  order 
)

Definition at line 326 of file pgtable.c.

pte_t* get_prealloc_pte ( unsigned long  pfn)

Definition at line 93 of file init.c.

pgd_t* pgd_alloc ( struct mm_struct mm)

Definition at line 40 of file init.c.

void pgd_free ( struct mm_struct mm,
pgd_t pgd 
)

Definition at line 107 of file pgd.c.

pgtable_t pgtable_alloc_one ( struct mm_struct mm,
unsigned long  address,
int  order 
)
read

Definition at line 283 of file pgtable.c.

void pgtable_free ( struct mm_struct mm,
struct page pte,
int  order 
)

Definition at line 313 of file pgtable.c.

void shatter_huge_page ( unsigned long  addr)

shatter_huge_page() - ensure a given address is mapped by a small page.

This function converts a huge PTE mapping kernel LOWMEM into a bunch of small PTEs with the same caching. No cache flush required, but we must do a global TLB flush.

Any caller that wishes to modify a kernel mapping that might have been made with a huge page should call this function, since doing so properly avoids race conditions with installing the newly-shattered page and then flushing all the TLB entries.

: Address at which to shatter any existing huge page.

Definition at line 149 of file pgtable.c.

void shatter_pmd ( pmd_t pmd)

Definition at line 147 of file init.c.