Changeset cefb126 in mainline for kernel/generic/src/mm/tlb.c
- Timestamp:
- 2010-07-02T14:19:30Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 89c57b6
- Parents:
- fe7abd0 (diff), e3ee9b9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/tlb.c
rfe7abd0 rcefb126 73 73 * to all other processors. 74 74 * 75 * This function must be called with interrupts disabled. 76 * 77 * @param type Type describing scope of shootdown. 78 * @param asid Address space, if required by type. 79 * @param page Virtual page address, if required by type. 75 * @param type Type describing scope of shootdown. 76 * @param asid Address space, if required by type. 77 * @param page Virtual page address, if required by type. 80 78 * @param count Number of pages, if required by type. 81 79 * 80 * @return The interrupt priority level as it existed prior to this call. 81 * 82 82 */ 83 voidtlb_shootdown_start(tlb_invalidate_type_t type, asid_t asid,83 ipl_t tlb_shootdown_start(tlb_invalidate_type_t type, asid_t asid, 84 84 uintptr_t page, size_t count) 85 85 { 86 ipl_t ipl = interrupts_disable(); 86 87 CPU->tlb_active = false; 87 88 irq_spinlock_lock(&tlblock, false); … … 89 90 size_t i; 90 91 for (i = 0; i < config.cpu_count; i++) { 91 cpu_t *cpu;92 93 92 if (i == CPU->id) 94 93 continue; 95 94 96 cpu = &cpus[i]; 95 cpu_t *cpu = &cpus[i]; 96 97 97 irq_spinlock_lock(&cpu->lock, false); 98 98 if (cpu->tlb_messages_count == TLB_MESSAGE_QUEUE_LEN) { … … 122 122 123 123 busy_wait: 124 for (i = 0; i < config.cpu_count; i++) 124 for (i = 0; i < config.cpu_count; i++) { 125 125 if (cpus[i].tlb_active) 126 126 goto busy_wait; 127 } 128 129 return ipl; 127 130 } 128 131 129 132 /** Finish TLB shootdown sequence. 130 133 * 134 * @param ipl Previous interrupt priority level. 135 * 131 136 */ 132 void tlb_shootdown_finalize( void)137 void tlb_shootdown_finalize(ipl_t ipl) 133 138 { 134 139 irq_spinlock_unlock(&tlblock, false); 135 140 CPU->tlb_active = true; 141 interrupts_restore(ipl); 136 142 } 137 143
Note:
See TracChangeset
for help on using the changeset viewer.