Changeset f56e897f in mainline for kernel/generic/src/mm/tlb.c


Ignore:
Timestamp:
2010-06-29T17:43:38Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6473d41
Parents:
e4a4b44 (diff), 793cf029 (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.
Message:

Merge mainlnie changes.

File:
1 edited

Legend:

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

    re4a4b44 rf56e897f  
    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 *
    8182 */
    8283ipl_t tlb_shootdown_start(tlb_invalidate_type_t type, asid_t asid,
    8384    uintptr_t page, size_t count)
    8485{
    85         ipl_t ipl;
    86 
    87         ipl = interrupts_disable();
     86        ipl_t ipl = interrupts_disable();
    8887        CPU->tlb_active = false;
    8988        irq_spinlock_lock(&tlblock, false);
     
    9190        size_t i;
    9291        for (i = 0; i < config.cpu_count; i++) {
    93                 cpu_t *cpu;
    94                
    9592                if (i == CPU->id)
    9693                        continue;
    9794               
    98                 cpu = &cpus[i];
     95                cpu_t *cpu = &cpus[i];
     96               
    9997                irq_spinlock_lock(&cpu->lock, false);
    10098                if (cpu->tlb_messages_count == TLB_MESSAGE_QUEUE_LEN) {
     
    124122       
    125123busy_wait:
    126         for (i = 0; i < config.cpu_count; i++)
     124        for (i = 0; i < config.cpu_count; i++) {
    127125                if (cpus[i].tlb_active)
    128126                        goto busy_wait;
    129 
     127        }
     128       
    130129        return ipl;
    131130}
     
    133132/** Finish TLB shootdown sequence.
    134133 *
    135  * @param ipl           Previous interrupt priority level.
     134 * @param ipl Previous interrupt priority level.
     135 *
    136136 */
    137137void tlb_shootdown_finalize(ipl_t ipl)
Note: See TracChangeset for help on using the changeset viewer.