diff options
author | 2011-05-18 21:00:09 +0000 | |
---|---|---|
committer | 2011-05-18 21:00:09 +0000 | |
commit | 30d346dc650821a75e710e17789fa58352c7add9 (patch) | |
tree | f00eead1f3ad81f845c04c97d2059a19417953cb | |
parent | Off-by-two in PMAP_PREFER_ALIGN definition; found the hard way by matthieu@ (diff) | |
download | wireguard-openbsd-30d346dc650821a75e710e17789fa58352c7add9.tar.xz wireguard-openbsd-30d346dc650821a75e710e17789fa58352c7add9.zip |
Better make PMAP_PREFER_ALIGN() a rounded value, as done on other arches;
while there fix PMAP_PREFER_OFFSET() for good too, after discussion with ariane@
-rw-r--r-- | sys/arch/sparc64/include/pmap.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/sparc64/include/pmap.h b/sys/arch/sparc64/include/pmap.h index 7d2913a3fdb..e379bf15248 100644 --- a/sys/arch/sparc64/include/pmap.h +++ b/sys/arch/sparc64/include/pmap.h @@ -170,9 +170,9 @@ void pmap_bootstrap(u_long, u_long, u_int, u_int); #define PMAP_PREFER(pa, va) ((va) + (((va) ^ (pa)) & VA_ALIAS_MASK)) /* pmap prefer alignment */ -#define PMAP_PREFER_ALIGN() (VA_ALIAS_MASK - 1) +#define PMAP_PREFER_ALIGN() (VA_ALIAS_MASK) /* pmap prefer offset in alignment */ -#define PMAP_PREFER_OFFSET(of) ((of) & VA_ALIAS_MASK) +#define PMAP_PREFER_OFFSET(of) ((of) & (VA_ALIAS_MASK - 1)) #define PMAP_GROWKERNEL /* turn on pmap_growkernel interface */ |