Changeset 91d6d28 in mainline


Ignore:
Timestamp:
2006-11-20T19:19:54Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f5926ad9
Parents:
aa802679
Message:

Take the possible difference between kernel and physical address into account in TSB and userspace window buffer
allocation and deallocation code.

Location:
kernel/arch/sparc64/src
Files:
2 edited

Legend:

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

    raa802679 r91d6d28  
    6363#ifdef CONFIG_TSB
    6464        int order = fnzb32(((ITSB_ENTRY_COUNT+DTSB_ENTRY_COUNT)*sizeof(tsb_entry_t))>>FRAME_WIDTH);
    65         uintptr_t tsb = (uintptr_t) frame_alloc(order, flags);
     65        uintptr_t tsb = (uintptr_t) frame_alloc(order, flags | FRAME_KA);
    6666
    6767        if (!tsb)
     
    7979#ifdef CONFIG_TSB
    8080        count_t cnt = ((ITSB_ENTRY_COUNT+DTSB_ENTRY_COUNT)*sizeof(tsb_entry_t))>>FRAME_WIDTH;
    81         frame_free((uintptr_t) as->arch.itsb);
     81        frame_free(KA2PA((uintptr_t) as->arch.itsb));
    8282        return cnt;
    8383#else
  • kernel/arch/sparc64/src/proc/thread.c

    raa802679 r91d6d28  
    5555                 * belonging to a killed thread.
    5656                 */
    57                 frame_free(ALIGN_DOWN((uintptr_t) t->arch.uspace_window_buffer, PAGE_SIZE));
     57                frame_free(KA2PA(ALIGN_DOWN((uintptr_t) t->arch.uspace_window_buffer, PAGE_SIZE)));
    5858        }
    5959}
     
    6666                 * returned from the slab allocator doesn't have any.
    6767                 */
    68                 t->arch.uspace_window_buffer = frame_alloc(ONE_FRAME, 0);
     68                t->arch.uspace_window_buffer = frame_alloc(ONE_FRAME, FRAME_KA);
    6969        } else {
    7070                uintptr_t uw_buf = (uintptr_t) t->arch.uspace_window_buffer;
Note: See TracChangeset for help on using the changeset viewer.