Changeset ef67bab in mainline for genarch/src/mm/page_ht.c
- Timestamp:
- 2006-02-01T00:02:16Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 071a8ae6
- Parents:
- fc1e4f6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
genarch/src/mm/page_ht.c
rfc1e4f6 ref67bab 39 39 #include <arch.h> 40 40 #include <debug.h> 41 #include <memstr.h> 41 42 42 43 /** 43 * This lock protects the page hash table. Note that software must 44 * be still careful about ordering of writes to ensure consistent 45 * view of the page hash table for hardware helpers such as VHPT 46 * walker on ia64. 44 * This lock protects the page hash table. 47 45 */ 48 46 SPINLOCK_INITIALIZE(page_ht_lock); … … 54 52 pte_t *page_ht = NULL; 55 53 56 static void ht_mapping_insert(as_t *as, __address page, __address frame, int flags , __address root);57 static pte_t *ht_mapping_find(as_t *as, __address page , __address root);54 static void ht_mapping_insert(as_t *as, __address page, __address frame, int flags); 55 static pte_t *ht_mapping_find(as_t *as, __address page); 58 56 59 57 page_operations_t page_ht_operations = { 60 58 .mapping_insert = ht_mapping_insert, 61 .mapping_find = ht_mapping_find 59 .mapping_find = ht_mapping_find, 62 60 }; 63 61 … … 65 63 * 66 64 * Map virtual address 'page' to physical address 'frame' 67 * using 'flags'. In order not to disturb hardware searching, 68 * new mappings are appended to the end of the collision 69 * chain. 65 * using 'flags'. 70 66 * 71 * @param as Address space to which page belongs. Must be locked prior the call. 67 * The address space must be locked and interruptsmust be disabled. 68 * 69 * @param as Address space to which page belongs. 72 70 * @param page Virtual address of the page to be mapped. 73 71 * @param frame Physical address of memory frame to which the mapping is done. 74 72 * @param flags Flags to be used for mapping. 75 * @param root Ignored.76 73 */ 77 void ht_mapping_insert(as_t *as, __address page, __address frame, int flags , __address root)74 void ht_mapping_insert(as_t *as, __address page, __address frame, int flags) 78 75 { 79 76 pte_t *t, *u; … … 122 119 * Find mapping for virtual page. 123 120 * 124 * Interrupts must be disabled.121 * The address space must be locked and interrupts must be disabled. 125 122 * 126 * @param as Address space to wich page belongs. Must be locked prior the call.123 * @param as Address space to wich page belongs. 127 124 * @param page Virtual page. 128 * @param root Ignored.129 125 * 130 126 * @return NULL if there is no such mapping; requested mapping otherwise. 131 127 */ 132 pte_t *ht_mapping_find(as_t *as, __address page , __address root)128 pte_t *ht_mapping_find(as_t *as, __address page) 133 129 { 134 130 pte_t *t;
Note:
See TracChangeset
for help on using the changeset viewer.