Ignore:
File:
1 edited

Legend:

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

    re2a0d76 rb0c2075  
    6363{
    6464#ifdef CONFIG_TSB
    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));
     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));
    7469        if (!tsb)
    7570                return -1;
    7671       
    7772        as->arch.itsb = (tsb_entry_t *) tsb;
    78         as->arch.dtsb = (tsb_entry_t *) (tsb + ITSB_ENTRY_COUNT *
    79             sizeof(tsb_entry_t));
     73        as->arch.dtsb = (tsb_entry_t *) (tsb +
     74            ITSB_ENTRY_COUNT * sizeof(tsb_entry_t));
    8075       
    8176        memsetb(as->arch.itsb,
Note: See TracChangeset for help on using the changeset viewer.