Rev 746 | Rev 792 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 746 | Rev 756 | ||
---|---|---|---|
Line 36... | Line 36... | ||
36 | #define __PAGE_HT_H__ |
36 | #define __PAGE_HT_H__ |
37 | 37 | ||
38 | #include <mm/page.h> |
38 | #include <mm/page.h> |
39 | #include <typedefs.h> |
39 | #include <typedefs.h> |
40 | 40 | ||
41 | /** Number of slots in page hash table. */ |
41 | /** Page hash table size. */ |
42 | #define HT_ENTRIES HT_ENTRIES_ARCH |
42 | #define HT_WIDTH HT_WIDTH_ARCH |
- | 43 | #define HT_SIZE (1<<HT_WIDTH) |
|
- | 44 | #define HT_ENTRIES (HT_SIZE/sizeof(pte_t)) |
|
43 | 45 | ||
44 | /** Hash function. |
46 | /** Hash function. |
45 | * |
47 | * |
46 | * @param page Virtual address. Only vpn bits will be used. |
48 | * @param page Virtual address. Only vpn bits will be used. |
47 | * @param asid Address space identifier. |
49 | * @param asid Address space identifier. |
Line 97... | Line 99... | ||
97 | * @param frame Physical address. Only pfn bits will be used. |
99 | * @param frame Physical address. Only pfn bits will be used. |
98 | * @param flags Flags. See mm/page.h. |
100 | * @param flags Flags. See mm/page.h. |
99 | */ |
101 | */ |
100 | #define HT_SET_RECORD(t, page, asid, frame, flags) HT_SET_RECORD_ARCH(t, page, asid, frame, flags) |
102 | #define HT_SET_RECORD(t, page, asid, frame, flags) HT_SET_RECORD_ARCH(t, page, asid, frame, flags) |
101 | 103 | ||
102 | - | ||
103 | extern page_operations_t page_ht_operations; |
104 | extern page_operations_t page_ht_operations; |
104 | extern spinlock_t page_ht_lock; |
105 | extern spinlock_t page_ht_lock; |
105 | 106 | ||
106 | extern pte_t *page_ht; |
107 | extern pte_t *page_ht; |
107 | 108 |