git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add lunaix dynamic linker as submodule
[lunaix-os.git]
/
lunaix-os
/
includes
/
lunaix
/
mm
/
page.h
diff --git
a/lunaix-os/includes/lunaix/mm/page.h
b/lunaix-os/includes/lunaix/mm/page.h
index 38dcf71aaa8ffe5ab5316e2438c68c28041e3189..7b8ba223388d370d27ff9743a5b2801f822b63a8 100644
(file)
--- a/
lunaix-os/includes/lunaix/mm/page.h
+++ b/
lunaix-os/includes/lunaix/mm/page.h
@@
-13,7
+13,7
@@
#define PTE_NULL 0
#define PG_ALIGN(addr) ((ptr_t)(addr)&0xFFFFF000UL)
#define PTE_NULL 0
#define PG_ALIGN(addr) ((ptr_t)(addr)&0xFFFFF000UL)
-#define PG_MOD(addr) ((ptr_t)(addr) &
~PG_SIZE
)
+#define PG_MOD(addr) ((ptr_t)(addr) &
(PG_SIZE - 1)
)
#define PG_ALIGNED(addr) (!((ptr_t)(addr)&0x00000FFFUL))
#define PN(addr) (((ptr_t)(addr) >> 12))
#define PG_ALIGNED(addr) (!((ptr_t)(addr)&0x00000FFFUL))
#define PN(addr) (((ptr_t)(addr) >> 12))