Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/mm/tlb.c

    r49eb681 rda1bafb  
    7373 * to all other processors.
    7474 *
    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.
    7880 * @param count Number of pages, if required by type.
    7981 *
    80  * @return The interrupt priority level as it existed prior to this call.
    81  *
    8282 */
    83 ipl_t tlb_shootdown_start(tlb_invalidate_type_t type, asid_t asid,
     83void tlb_shootdown_start(tlb_invalidate_type_t type, asid_t asid,
    8484    uintptr_t page, size_t count)
    8585{
    86         ipl_t ipl = interrupts_disable();
    8786        CPU->tlb_active = false;
    8887        irq_spinlock_lock(&tlblock, false);
     
    9089        size_t i;
    9190        for (i = 0; i < config.cpu_count; i++) {
     91                cpu_t *cpu;
     92               
    9293                if (i == CPU->id)
    9394                        continue;
    9495               
    95                 cpu_t *cpu = &cpus[i];
    96                
     96                cpu = &cpus[i];
    9797                irq_spinlock_lock(&cpu->lock, false);
    9898                if (cpu->tlb_messages_count == TLB_MESSAGE_QUEUE_LEN) {
     
    122122       
    123123busy_wait:
    124         for (i = 0; i < config.cpu_count; i++) {
     124        for (i = 0; i < config.cpu_count; i++)
    125125                if (cpus[i].tlb_active)
    126126                        goto busy_wait;
    127         }
    128        
    129         return ipl;
    130127}
    131128
    132129/** Finish TLB shootdown sequence.
    133130 *
    134  * @param ipl Previous interrupt priority level.
    135  *
    136131 */
    137 void tlb_shootdown_finalize(ipl_t ipl)
     132void tlb_shootdown_finalize(void)
    138133{
    139134        irq_spinlock_unlock(&tlblock, false);
    140135        CPU->tlb_active = true;
    141         interrupts_restore(ipl);
    142136}
    143137
Note: See TracChangeset for help on using the changeset viewer.