Changes in kernel/generic/src/mm/tlb.c [49eb681:da1bafb] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/tlb.c
r49eb681 rda1bafb 73 73 * to all other processors. 74 74 * 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. 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. 78 80 * @param count Number of pages, if required by type. 79 81 * 80 * @return The interrupt priority level as it existed prior to this call.81 *82 82 */ 83 ipl_ttlb_shootdown_start(tlb_invalidate_type_t type, asid_t asid,83 void 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();87 86 CPU->tlb_active = false; 88 87 irq_spinlock_lock(&tlblock, false); … … 90 89 size_t i; 91 90 for (i = 0; i < config.cpu_count; i++) { 91 cpu_t *cpu; 92 92 93 if (i == CPU->id) 93 94 continue; 94 95 95 cpu_t *cpu = &cpus[i]; 96 96 cpu = &cpus[i]; 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;130 127 } 131 128 132 129 /** Finish TLB shootdown sequence. 133 130 * 134 * @param ipl Previous interrupt priority level.135 *136 131 */ 137 void tlb_shootdown_finalize( ipl_t ipl)132 void tlb_shootdown_finalize(void) 138 133 { 139 134 irq_spinlock_unlock(&tlblock, false); 140 135 CPU->tlb_active = true; 141 interrupts_restore(ipl);142 136 } 143 137
Note:
See TracChangeset
for help on using the changeset viewer.