Changeset f9425006 in mainline for arch/mips32/src/mm/tlb.c


Ignore:
Timestamp:
2006-01-13T16:29:20Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
214e89e3
Parents:
20d50a1
Message:

Make various mips32 tlb manipulation functions preserve EntryHi register.

Cleanup and more precise comments for previous commit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/mips32/src/mm/tlb.c

    r20d50a1 rf9425006  
    400400        page_mask_t mask;
    401401        entry_lo_t lo0, lo1;
    402         entry_hi_t hi;
     402        entry_hi_t hi, hi_save;
    403403        int i;
     404
     405        hi_save.value = cp0_entry_hi_read();
    404406
    405407        printf("TLB:\n");
     
    418420                       lo1.g, lo1.v, lo1.d, lo1.c, lo1.pfn);
    419421        }
     422       
     423        cp0_entry_hi_write(hi_save.value);
    420424}
    421425
     
    425429        ipl_t ipl;
    426430        entry_lo_t lo0, lo1;
     431        entry_hi_t hi_save;
    427432        int i;
    428433
     434        hi_save.value = cp0_entry_hi_read();
    429435        ipl = interrupts_disable();
    430436
     
    446452       
    447453        interrupts_restore(ipl);
     454        cp0_entry_hi_write(hi_save.value);
    448455}
    449456
     
    456463        ipl_t ipl;
    457464        entry_lo_t lo0, lo1;
    458         entry_hi_t hi;
     465        entry_hi_t hi, hi_save;
    459466        int i;
    460467
    461468        ASSERT(asid != ASID_INVALID);
    462469
     470        hi_save.value = cp0_entry_hi_read();
    463471        ipl = interrupts_disable();
    464472       
     
    484492       
    485493        interrupts_restore(ipl);
     494        cp0_entry_hi_write(hi_save.value);
    486495}
    487496
     
    495504        ipl_t ipl;
    496505        entry_lo_t lo0, lo1;
    497         entry_hi_t hi;
     506        entry_hi_t hi, hi_save;
    498507        tlb_index_t index;
    499508
    500509        ASSERT(asid != ASID_INVALID);
    501510
     511        hi_save.value = cp0_entry_hi_read();
    502512        ipl = interrupts_disable();
    503513
     
    526536       
    527537        interrupts_restore(ipl);
    528 }
     538        cp0_entry_hi_write(hi_save.value);
     539}
Note: See TracChangeset for help on using the changeset viewer.