Module Name: src Committed By: maxv Date: Sat May 14 12:48:31 UTC 2016
Modified Files: src/sys/arch/amd64/include: pmap.h Log Message: KNF so it appears aligned on NXR, and fix a comment. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/arch/amd64/include/pmap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/amd64/include/pmap.h diff -u src/sys/arch/amd64/include/pmap.h:1.35 src/sys/arch/amd64/include/pmap.h:1.36 --- src/sys/arch/amd64/include/pmap.h:1.35 Fri Jan 9 01:08:49 2015 +++ src/sys/arch/amd64/include/pmap.h Sat May 14 12:48:31 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.35 2015/01/09 01:08:49 riastradh Exp $ */ +/* $NetBSD: pmap.h,v 1.36 2016/05/14 12:48:31 maxv Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -161,21 +161,20 @@ #define PDIR_SLOT_PTE L4_SLOT_PTE /* - * the following defines give the virtual addresses of various MMU + * The following defines give the virtual addresses of various MMU * data structures: * PTE_BASE: the base VA of the linear PTE mappings - * PTD_BASE: the base VA of the recursive mapping of the PTD + * PDP_BASE: the base VA of the recursive mapping of the PTD * PDP_PDE: the VA of the PDE that points back to the PDP - * */ -#define PTE_BASE ((pt_entry_t *) (L4_SLOT_PTE * NBPD_L4)) -#define KERN_BASE ((pt_entry_t *) (L4_SLOT_KERN * NBPD_L4)) +#define PTE_BASE ((pt_entry_t *)(L4_SLOT_PTE * NBPD_L4)) +#define KERN_BASE ((pt_entry_t *)(L4_SLOT_KERN * NBPD_L4)) -#define L1_BASE PTE_BASE -#define L2_BASE ((pd_entry_t *)((char *)L1_BASE + L4_SLOT_PTE * NBPD_L3)) -#define L3_BASE ((pd_entry_t *)((char *)L2_BASE + L4_SLOT_PTE * NBPD_L2)) -#define L4_BASE ((pd_entry_t *)((char *)L3_BASE + L4_SLOT_PTE * NBPD_L1)) +#define L1_BASE PTE_BASE +#define L2_BASE ((pd_entry_t *)((char *)L1_BASE + L4_SLOT_PTE * NBPD_L3)) +#define L3_BASE ((pd_entry_t *)((char *)L2_BASE + L4_SLOT_PTE * NBPD_L2)) +#define L4_BASE ((pd_entry_t *)((char *)L3_BASE + L4_SLOT_PTE * NBPD_L1)) #define PDP_PDE (L4_BASE + PDIR_SLOT_PTE) @@ -307,7 +306,7 @@ pmap_pte_setbits(volatile pt_entry_t *pt static __inline void pmap_pte_clearbits(volatile pt_entry_t *pte, pt_entry_t bits) -{ +{ mutex_enter(&pte_lock); xpq_queue_pte_update(xpmap_ptetomach(__UNVOLATILE(pte)), (*pte) & ~bits);