Changeset f272cb8 in mainline for kernel/test/mm/mapping1.c
- Timestamp:
- 2006-12-11T19:19:28Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 70b6de1
- Parents:
- 50661ab
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
kernel/test/mm/mapping1.c
r50661ab rf272cb8 35 35 #include <debug.h> 36 36 37 #ifdef CONFIG_BENCH 38 #include <arch/cycle.h> 39 #endif 40 37 41 #define PAGE0 0x10000000 38 42 #define PAGE1 (PAGE0+PAGE_SIZE) … … 41 45 #define VALUE1 0x89abcdef 42 46 43 void test (void)47 void test_mapping1(void) 44 48 { 49 #ifdef CONFIG_BENCH 50 uint64_t t0 = get_cycle(); 51 #endif 45 52 uintptr_t frame0, frame1; 46 53 uint32_t v0, v1; … … 48 55 printf("Memory management test mapping #1\n"); 49 56 50 frame0 = frame_alloc(ONE_FRAME, FRAME_KA);51 frame1 = frame_alloc(ONE_FRAME, FRAME_KA);57 frame0 = (uintptr_t) frame_alloc(ONE_FRAME, FRAME_KA); 58 frame1 = (uintptr_t) frame_alloc(ONE_FRAME, FRAME_KA); 52 59 53 60 printf("Writing %#x to physical address %p.\n", VALUE0, KA2PA(frame0)); … … 82 89 83 90 printf("Test passed.\n"); 84 91 #ifdef CONFIG_BENCH 92 uint64_t dt = get_cycle() - t0; 93 printf("Time: %.*d cycles\n", sizeof(dt) * 2, dt); 94 #endif 85 95 }
Note:
See TracChangeset
for help on using the changeset viewer.