Rev 1658 | Rev 1767 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1658 | Rev 1760 | ||
---|---|---|---|
Line 63... | Line 63... | ||
63 | for (run = 0; run < THREAD_RUNS; run++) { |
63 | for (run = 0; run < THREAD_RUNS; run++) { |
64 | for (order = 0; order <= MAX_ORDER; order++) { |
64 | for (order = 0; order <= MAX_ORDER; order++) { |
65 | printf("Thread #%d (cpu%d): Allocating %d frames blocks ... \n", THREAD->tid, CPU->id, 1 << order); |
65 | printf("Thread #%d (cpu%d): Allocating %d frames blocks ... \n", THREAD->tid, CPU->id, 1 << order); |
66 | allocated = 0; |
66 | allocated = 0; |
67 | for (i = 0; i < (MAX_FRAMES >> order); i++) { |
67 | for (i = 0; i < (MAX_FRAMES >> order); i++) { |
68 | frames[allocated] = PA2KA(PFN2ADDR(frame_alloc_rc(order, FRAME_ATOMIC | FRAME_KA, &status))); |
68 | frames[allocated] = frame_alloc_rc(order, FRAME_ATOMIC | FRAME_KA, &status); |
69 | if (status == 0) { |
69 | if (status == 0) { |
70 | memsetb(frames[allocated], FRAME_SIZE << order, val); |
70 | memsetb(frames[allocated], FRAME_SIZE << order, val); |
71 | allocated++; |
71 | allocated++; |
72 | } else { |
72 | } else { |
73 | break; |
73 | break; |
Line 81... | Line 81... | ||
81 | if (((__u8 *) frames[i])[k] != val) { |
81 | if (((__u8 *) frames[i])[k] != val) { |
82 | printf("Thread #%d (cpu%d): Unexpected data (%d) in block %p offset %#zx\n", THREAD->tid, CPU->id, ((char *) frames[i])[k], frames[i], k); |
82 | printf("Thread #%d (cpu%d): Unexpected data (%d) in block %p offset %#zx\n", THREAD->tid, CPU->id, ((char *) frames[i])[k], frames[i], k); |
83 | failed(); |
83 | failed(); |
84 | } |
84 | } |
85 | } |
85 | } |
86 | frame_free(ADDR2PFN(KA2PA(frames[i]))); |
86 | frame_free(KA2PA(frames[i])); |
87 | } |
87 | } |
88 | printf("Thread #%d (cpu%d): Finished run.\n", THREAD->tid, CPU->id); |
88 | printf("Thread #%d (cpu%d): Finished run.\n", THREAD->tid, CPU->id); |
89 | } |
89 | } |
90 | } |
90 | } |
91 | 91 |