vm: move arch-specific definitions to arch/
This commit is contained in:
13
arch/x86_64/include/socks/machine/vm.h
Normal file
13
arch/x86_64/include/socks/machine/vm.h
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
#ifndef SOCKS_X86_64_VM_H_
|
||||||
|
#define SOCKS_X86_64_VM_H_
|
||||||
|
|
||||||
|
#define VM_KERNEL_VOFFSET 0xFFFFFFFF80000000
|
||||||
|
|
||||||
|
#define VM_PAGE_SIZE 0x1000
|
||||||
|
#define VM_PAGE_MASK (VM_PAGE_SIZE-1)
|
||||||
|
#define VM_PAGE_SHIFT 12
|
||||||
|
|
||||||
|
#define VM_PAGE_MIN_ORDER VM_PAGE_4K
|
||||||
|
#define VM_PAGE_MAX_ORDER VM_PAGE_8M
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -6,6 +6,7 @@
|
|||||||
#include <socks/status.h>
|
#include <socks/status.h>
|
||||||
#include <socks/queue.h>
|
#include <socks/queue.h>
|
||||||
#include <socks/locks.h>
|
#include <socks/locks.h>
|
||||||
|
#include <socks/machine/vm.h>
|
||||||
|
|
||||||
/* maximum number of NUMA nodes */
|
/* maximum number of NUMA nodes */
|
||||||
#define VM_MAX_NODES 64
|
#define VM_MAX_NODES 64
|
||||||
@@ -15,8 +16,6 @@
|
|||||||
#define VM_MAX_PAGE_ORDERS (VM_PAGE_MAX_ORDER + 1)
|
#define VM_MAX_PAGE_ORDERS (VM_PAGE_MAX_ORDER + 1)
|
||||||
|
|
||||||
#define VM_CHECK_ALIGN(p, mask) ((((p) & (mask)) == (p)) ? 1 : 0)
|
#define VM_CHECK_ALIGN(p, mask) ((((p) & (mask)) == (p)) ? 1 : 0)
|
||||||
#define VM_PAGE_SIZE 0x1000
|
|
||||||
#define VM_PAGE_SHIFT 12
|
|
||||||
|
|
||||||
#define VM_CACHE_INITIALISED(c) ((c)->c_obj_count != 0)
|
#define VM_CACHE_INITIALISED(c) ((c)->c_obj_count != 0)
|
||||||
#define VM_PAGE_IS_FREE(pg) (((pg)->p_flags & (VM_PAGE_RESERVED | VM_PAGE_ALLOC)) == 0)
|
#define VM_PAGE_IS_FREE(pg) (((pg)->p_flags & (VM_PAGE_RESERVED | VM_PAGE_ALLOC)) == 0)
|
||||||
@@ -71,8 +70,6 @@ typedef enum vm_page_order {
|
|||||||
VM_PAGE_512M,
|
VM_PAGE_512M,
|
||||||
VM_PAGE_1G,
|
VM_PAGE_1G,
|
||||||
#endif
|
#endif
|
||||||
VM_PAGE_MIN_ORDER = VM_PAGE_4K,
|
|
||||||
VM_PAGE_MAX_ORDER = VM_PAGE_8M,
|
|
||||||
} vm_page_order_t;
|
} vm_page_order_t;
|
||||||
|
|
||||||
typedef enum vm_page_flags {
|
typedef enum vm_page_flags {
|
||||||
|
|||||||
Reference in New Issue
Block a user