Changeset 1d79c04 in mainline


Ignore:
Timestamp:
2007-03-28T21:56:15Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7e2432b
Parents:
29fc8e0
Message:

Fix TSB size.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/mm/as.c

    r29fc8e0 r1d79c04  
    6262{
    6363#ifdef CONFIG_TSB
     64        /*
     65         * The order must be calculated with respect to the emulated
     66         * 16K page size.
     67         */
    6468        int order = fnzb32(((ITSB_ENTRY_COUNT + DTSB_ENTRY_COUNT) *
    65                 sizeof(tsb_entry_t)) >> MMU_FRAME_WIDTH);
     69            sizeof(tsb_entry_t)) >> FRAME_WIDTH);
    6670        uintptr_t tsb = (uintptr_t) frame_alloc(order, flags | FRAME_KA);
    6771
     
    7175        as->arch.itsb = (tsb_entry_t *) tsb;
    7276        as->arch.dtsb = (tsb_entry_t *) (tsb + ITSB_ENTRY_COUNT *
    73                 sizeof(tsb_entry_t));
     77            sizeof(tsb_entry_t));
    7478        memsetb((uintptr_t) as->arch.itsb,
    7579            (ITSB_ENTRY_COUNT + DTSB_ENTRY_COUNT) * sizeof(tsb_entry_t), 0);
     
    8185{
    8286#ifdef CONFIG_TSB
     87        /*
     88         * The count must be calculated with respect to the emualted 16K page
     89         * size.
     90         */
    8391        count_t cnt = ((ITSB_ENTRY_COUNT + DTSB_ENTRY_COUNT) *
    84                 sizeof(tsb_entry_t)) >> MMU_FRAME_WIDTH;
     92            sizeof(tsb_entry_t)) >> FRAME_WIDTH;
    8593        frame_free(KA2PA((uintptr_t) as->arch.itsb));
    8694        return cnt;
Note: See TracChangeset for help on using the changeset viewer.