Ignore:
File:
1 edited

Legend:

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

    rb0c2075 re2a0d76  
    6363{
    6464#ifdef CONFIG_TSB
    65         size_t frames = SIZE2FRAMES((ITSB_ENTRY_COUNT + DTSB_ENTRY_COUNT) *
    66             sizeof(tsb_entry_t));
    67        
    68         uintptr_t tsb = PA2KA(frame_alloc(frames, flags, 0));
     65        /*
     66         * The order must be calculated with respect to the emulated
     67         * 16K page size.
     68         *
     69         */
     70        uint8_t order = fnzb32(((ITSB_ENTRY_COUNT + DTSB_ENTRY_COUNT) *
     71            sizeof(tsb_entry_t)) >> FRAME_WIDTH);
     72       
     73        uintptr_t tsb = PA2KA(frame_alloc(order, flags, 0));
    6974        if (!tsb)
    7075                return -1;
    7176       
    7277        as->arch.itsb = (tsb_entry_t *) tsb;
    73         as->arch.dtsb = (tsb_entry_t *) (tsb +
    74             ITSB_ENTRY_COUNT * sizeof(tsb_entry_t));
     78        as->arch.dtsb = (tsb_entry_t *) (tsb + ITSB_ENTRY_COUNT *
     79            sizeof(tsb_entry_t));
    7580       
    7681        memsetb(as->arch.itsb,
Note: See TracChangeset for help on using the changeset viewer.