Changeset 8cbf1c3 in mainline for kernel/test/mm/falloc2.c


Ignore:
Timestamp:
2013-09-09T23:13:10Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e2a0d76
Parents:
c67dbd6
Message:

prepare the public API of the frame allocator for the new backend
remove FRAME_KA (can be easily implemented explicitly)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/test/mm/falloc2.c

    rc67dbd6 r8cbf1c3  
    5353        uint8_t val = THREAD->tid % THREADS;
    5454       
    55         void **frames = (void **)
    56             malloc(MAX_FRAMES * sizeof(void *), FRAME_ATOMIC);
     55        uintptr_t *frames = (uintptr_t *)
     56            malloc(MAX_FRAMES * sizeof(uintptr_t), FRAME_ATOMIC);
    5757        if (frames == NULL) {
    5858                TPRINTF("Thread #%" PRIu64 " (cpu%u): "
     
    7474                        for (unsigned int i = 0; i < (MAX_FRAMES >> order); i++) {
    7575                                frames[allocated] =
    76                                     frame_alloc(order, FRAME_ATOMIC | FRAME_KA);
     76                                    PA2KA(frame_alloc(order, FRAME_ATOMIC, 0));
    7777                                if (frames[allocated]) {
    78                                         memsetb(frames[allocated], FRAME_SIZE << order, val);
     78                                        memsetb((void *) frames[allocated], FRAME_SIZE << order, val);
    7979                                        allocated++;
    8080                                } else
     
    9393                                        if (((uint8_t *) frames[i])[k] != val) {
    9494                                                TPRINTF("Thread #%" PRIu64 " (cpu%u): "
    95                                                     "Unexpected data (%c) in block %p offset %zu\n",
     95                                                    "Unexpected data (%c) in block %zu offset %zu\n",
    9696                                                    THREAD->tid, CPU->id, ((char *) frames[i])[k],
    9797                                                    frames[i], k);
Note: See TracChangeset for help on using the changeset viewer.