Ignore:
Timestamp:
2013-09-11T11:56:39Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1db5669
Parents:
43dd8028
Message:

due to the removal of FRAME_KA, the return value of frame_alloc*() needs to be checked before converting the physical address to kernel address

File:
1 edited

Legend:

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

    r43dd8028 rcd3b380  
    6666{
    6767#ifdef CONFIG_TSB
    68         size_t frames =
    69             SIZE2FRAMES(TSB_ENTRY_COUNT * sizeof(tsb_entry_t));
    70        
    71         uintptr_t tsb = frame_alloc(frames, flags, 0);
     68        uintptr_t tsb =
     69            frame_alloc(SIZE2FRAMES(TSB_ENTRY_COUNT * sizeof(tsb_entry_t)),
     70            flags, 0);
    7271        if (!tsb)
    7372                return -1;
     
    9190{
    9291#ifdef CONFIG_TSB
    93         size_t cnt = (TSB_ENTRY_COUNT * sizeof(tsb_entry_t)) >> FRAME_WIDTH;
    94         frame_free((uintptr_t) as->arch.tsb_description.tsb_base);
     92        size_t frames = SIZE2FRAMES(TSB_ENTRY_COUNT * sizeof(tsb_entry_t));
     93        frame_free(as->arch.tsb_description.tsb_base, frames);
    9594       
    96         return cnt;
     95        return frames;
    9796#else
    9897        return 0;
Note: See TracChangeset for help on using the changeset viewer.