projects
/
dragonfly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
0228974
)
cachealign: Fix __VM_CACHELINE_ALIGN
author
Sepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 11 Oct 2012 05:54:08 +0000 (13:54 +0800)
committer
Sepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 11 Oct 2012 05:54:08 +0000 (13:54 +0800)
With-Input-from: dillon@
sys/sys/cdefs.h
patch
|
blob
|
blame
|
history
diff --git
a/sys/sys/cdefs.h
b/sys/sys/cdefs.h
index
8d5e8d7
..
086a957
100644
(file)
--- a/
sys/sys/cdefs.h
+++ b/
sys/sys/cdefs.h
@@
-76,8
+76,9
@@
* header, but currently, we do need such a hierarchy.
*/
#define __VM_CACHELINE_SIZE 64
+#define __VM_CACHELINE_MASK (__VM_CACHELINE_SIZE - 1)
#define __VM_CACHELINE_ALIGN(n) \
- (((n) + __VM_CACHELINE_SIZE - 1) / __VM_CACHELINE_SIZE)
+ (((n) + __VM_CACHELINE_MASK) & ~__VM_CACHELINE_MASK)
/*
* The __CONCAT macro is used to concatenate parts of symbol names, e.g.