Ignore:
File:
1 edited

Legend:

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

    r49eb681 r402eda5  
    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.
    78  * @param count Number of pages, 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.
     78 * @param count         Number of pages, if required by type.
    7979 *
    8080 * @return The interrupt priority level as it existed prior to this call.
    81  *
    8281 */
    8382ipl_t tlb_shootdown_start(tlb_invalidate_type_t type, asid_t asid,
    8483    uintptr_t page, size_t count)
    8584{
    86         ipl_t ipl = interrupts_disable();
     85        ipl_t ipl;
     86
     87        ipl = interrupts_disable();
    8788        CPU->tlb_active = false;
    8889        irq_spinlock_lock(&tlblock, false);
     
    9091        size_t i;
    9192        for (i = 0; i < config.cpu_count; i++) {
     93                cpu_t *cpu;
     94               
    9295                if (i == CPU->id)
    9396                        continue;
    9497               
    95                 cpu_t *cpu = &cpus[i];
    96                
     98                cpu = &cpus[i];
    9799                irq_spinlock_lock(&cpu->lock, false);
    98100                if (cpu->tlb_messages_count == TLB_MESSAGE_QUEUE_LEN) {
     
    122124       
    123125busy_wait:
    124         for (i = 0; i < config.cpu_count; i++) {
     126        for (i = 0; i < config.cpu_count; i++)
    125127                if (cpus[i].tlb_active)
    126128                        goto busy_wait;
    127         }
    128        
     129
    129130        return ipl;
    130131}
     
    132133/** Finish TLB shootdown sequence.
    133134 *
    134  * @param ipl Previous interrupt priority level.
    135  *
     135 * @param ipl           Previous interrupt priority level.
    136136 */
    137137void tlb_shootdown_finalize(ipl_t ipl)
Note: See TracChangeset for help on using the changeset viewer.