mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-19 06:44:31 +00:00
Remove PAGE_SIZE_4K, PAGE_SIZE_8K and PAGE_SIZE_16K and replace them
with LOG2_PAGE_SIZE. A single option is better to LINT than multiple mutual exclusive ones.
This commit is contained in:
parent
6ff26c064f
commit
9539d5b4f6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=119347
|
@ -107,23 +107,11 @@
|
|||
#define ALIGN(p) _ALIGN(p)
|
||||
#define ALIGNED_POINTER(p,t) _ALIGNED_POINTER(p,t)
|
||||
|
||||
#if !defined(PAGE_SIZE_4K) && !defined(PAGE_SIZE_8K) && !defined(PAGE_SIZE_16K)
|
||||
#define PAGE_SIZE_8K
|
||||
#ifndef LOG2_PAGE_SIZE
|
||||
#define LOG2_PAGE_SIZE 13 /* 8K pages by default. */
|
||||
#endif
|
||||
|
||||
#ifdef PAGE_SIZE_4K
|
||||
#define PAGE_SIZE 4096 /* bytes/page */
|
||||
#define PAGE_SHIFT 12
|
||||
#endif
|
||||
#ifdef PAGE_SIZE_8K
|
||||
#define PAGE_SIZE 8192 /* bytes/page */
|
||||
#define PAGE_SHIFT 13
|
||||
#endif
|
||||
#ifdef PAGE_SIZE_16K
|
||||
#define PAGE_SIZE 16384 /* bytes/page */
|
||||
#define PAGE_SHIFT 14
|
||||
#endif
|
||||
|
||||
#define PAGE_SHIFT (LOG2_PAGE_SIZE)
|
||||
#define PAGE_SIZE (1<<(LOG2_PAGE_SIZE))
|
||||
#define PAGE_MASK (PAGE_SIZE-1)
|
||||
#define NPTEPG (PAGE_SIZE/(sizeof (pt_entry_t)))
|
||||
|
||||
|
|
Loading…
Reference in a new issue