mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
- Cleanup whitespace and extra ()s in vtophys() macros.
- Move vtophys() macros next to vtopte() where vtopte() exists to match comments above vtopte(). - Remove references to the alternate address space in the comment above vtopte(). amd64 never had the alternate address space, and i386 lost it prior to PAE support being added. - s/entires/entries/ in comments. Reviewed by: alc
This commit is contained in:
parent
9b39b7cba6
commit
696effb697
6 changed files with 11 additions and 14 deletions
|
|
@ -126,6 +126,7 @@ extern pt_entry_t PTlev1pte; /* pte that maps lev1 page table */
|
|||
*/
|
||||
#define vtopte(va) (PTmap + (alpha_btop(va) \
|
||||
& ((1 << 3*ALPHA_PTSHIFT)-1)))
|
||||
#define vtophys(va) pmap_kextract((vm_offset_t)(va))
|
||||
|
||||
/*
|
||||
* Routine: pmap_kextract
|
||||
|
|
@ -145,8 +146,6 @@ pmap_kextract(vm_offset_t va)
|
|||
return pa;
|
||||
}
|
||||
|
||||
#define vtophys(va) pmap_kextract(((vm_offset_t) (va)))
|
||||
|
||||
static __inline vm_offset_t
|
||||
alpha_XXX_dmamap(vm_offset_t va)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
#define _MACHINE_PMAP_H_
|
||||
|
||||
/*
|
||||
* Page-directory and page-table entires follow this format, with a few
|
||||
* Page-directory and page-table entries follow this format, with a few
|
||||
* of the fields not present here and there, depending on a lot of things.
|
||||
*/
|
||||
/* ---- Intel Nomenclature ---- */
|
||||
|
|
@ -171,14 +171,12 @@ extern u_int64_t KPML4phys; /* physical address of kernel level 4 */
|
|||
#ifdef _KERNEL
|
||||
/*
|
||||
* virtual address to page table entry and
|
||||
* to physical address. Likewise for alternate address space.
|
||||
* to physical address.
|
||||
* Note: these work recursively, thus vtopte of a pte will give
|
||||
* the corresponding pde that in turn maps it.
|
||||
*/
|
||||
pt_entry_t *vtopte(vm_offset_t);
|
||||
vm_paddr_t pmap_kextract(vm_offset_t);
|
||||
|
||||
#define vtophys(va) pmap_kextract(((vm_offset_t) (va)))
|
||||
#define vtophys(va) pmap_kextract((vm_offset_t)(va))
|
||||
|
||||
static __inline pt_entry_t
|
||||
pte_load(pt_entry_t *ptep)
|
||||
|
|
@ -291,6 +289,7 @@ extern vm_offset_t virtual_end;
|
|||
void pmap_bootstrap(vm_paddr_t *);
|
||||
void pmap_kenter(vm_offset_t va, vm_paddr_t pa);
|
||||
void *pmap_kenter_temporary(vm_paddr_t pa, int i);
|
||||
vm_paddr_t pmap_kextract(vm_offset_t);
|
||||
void pmap_kremove(vm_offset_t);
|
||||
void *pmap_mapdev(vm_paddr_t, vm_size_t);
|
||||
void pmap_unmapdev(vm_offset_t, vm_size_t);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
#define _MACHINE_PMAP_H_
|
||||
|
||||
/*
|
||||
* Page-directory and page-table entires follow this format, with a few
|
||||
* Page-directory and page-table entries follow this format, with a few
|
||||
* of the fields not present here and there, depending on a lot of things.
|
||||
*/
|
||||
/* ---- Intel Nomenclature ---- */
|
||||
|
|
@ -177,11 +177,12 @@ extern pd_entry_t *IdlePTD; /* physical address of "Idle" state directory */
|
|||
#ifdef _KERNEL
|
||||
/*
|
||||
* virtual address to page table entry and
|
||||
* to physical address. Likewise for alternate address space.
|
||||
* to physical address.
|
||||
* Note: these work recursively, thus vtopte of a pte will give
|
||||
* the corresponding pde that in turn maps it.
|
||||
*/
|
||||
#define vtopte(va) (PTmap + i386_btop(va))
|
||||
#define vtophys(va) pmap_kextract((vm_offset_t)(va))
|
||||
|
||||
/*
|
||||
* Routine: pmap_kextract
|
||||
|
|
@ -203,8 +204,6 @@ pmap_kextract(vm_offset_t va)
|
|||
return pa;
|
||||
}
|
||||
|
||||
#define vtophys(va) pmap_kextract(((vm_offset_t) (va)))
|
||||
|
||||
#ifdef PAE
|
||||
|
||||
static __inline pt_entry_t
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
#endif
|
||||
#define MAXKPT (PAGE_SIZE/sizeof(vm_offset_t))
|
||||
|
||||
#define vtophys(va) pmap_kextract(((vm_offset_t) (va)))
|
||||
#define vtophys(va) pmap_kextract((vm_offset_t)(va))
|
||||
|
||||
#endif /* _KERNEL */
|
||||
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ int pmap_dev_direct_mapped(vm_offset_t, vm_size_t);
|
|||
|
||||
boolean_t pmap_mmu_install(char *name, int prio);
|
||||
|
||||
#define vtophys(va) pmap_kextract(((vm_offset_t)(va)))
|
||||
#define vtophys(va) pmap_kextract((vm_offset_t)(va))
|
||||
|
||||
#define PHYS_AVAIL_SZ 128
|
||||
extern vm_offset_t phys_avail[PHYS_AVAIL_SZ];
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ void pmap_map_tsb(void);
|
|||
|
||||
void pmap_clear_write(vm_page_t m);
|
||||
|
||||
#define vtophys(va) pmap_kextract(((vm_offset_t)(va)))
|
||||
#define vtophys(va) pmap_kextract((vm_offset_t)(va))
|
||||
|
||||
extern struct pmap kernel_pmap_store;
|
||||
#define kernel_pmap (&kernel_pmap_store)
|
||||
|
|
|
|||
Loading…
Reference in a new issue