Lines Matching full:addr

32 	char *addr;  in sense_support()  local
35 addr = mmap(0, pagesize, PROT_READ | PROT_WRITE, in sense_support()
37 if (!addr) in sense_support()
40 ret = madvise(addr, pagesize, MADV_POPULATE_READ); in sense_support()
44 ret = madvise(addr, pagesize, MADV_POPULATE_WRITE); in sense_support()
48 munmap(addr, pagesize); in sense_support()
53 char *addr; in test_prot_read() local
58 addr = mmap(0, SIZE, PROT_READ, MAP_ANONYMOUS | MAP_PRIVATE, 0, 0); in test_prot_read()
59 if (addr == MAP_FAILED) in test_prot_read()
62 ret = madvise(addr, SIZE, MADV_POPULATE_READ); in test_prot_read()
65 ret = madvise(addr, SIZE, MADV_POPULATE_WRITE); in test_prot_read()
69 munmap(addr, SIZE); in test_prot_read()
74 char *addr; in test_prot_write() local
79 addr = mmap(0, SIZE, PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, 0, 0); in test_prot_write()
80 if (addr == MAP_FAILED) in test_prot_write()
83 ret = madvise(addr, SIZE, MADV_POPULATE_READ); in test_prot_write()
87 ret = madvise(addr, SIZE, MADV_POPULATE_WRITE); in test_prot_write()
90 munmap(addr, SIZE); in test_prot_write()
95 char *addr; in test_holes() local
100 addr = mmap(0, SIZE, PROT_READ | PROT_WRITE, in test_holes()
102 if (addr == MAP_FAILED) in test_holes()
104 ret = munmap(addr + pagesize, pagesize); in test_holes()
109 ret = madvise(addr, SIZE, MADV_POPULATE_READ); in test_holes()
112 ret = madvise(addr, SIZE, MADV_POPULATE_WRITE); in test_holes()
117 ret = madvise(addr, 2 * pagesize, MADV_POPULATE_READ); in test_holes()
120 ret = madvise(addr, 2 * pagesize, MADV_POPULATE_WRITE); in test_holes()
125 ret = madvise(addr + pagesize, pagesize, MADV_POPULATE_READ); in test_holes()
128 ret = madvise(addr + pagesize, pagesize, MADV_POPULATE_WRITE); in test_holes()
132 munmap(addr, SIZE); in test_holes()
165 char *addr; in test_populate_read() local
170 addr = mmap(0, SIZE, PROT_READ | PROT_WRITE, in test_populate_read()
172 if (addr == MAP_FAILED) in test_populate_read()
174 ksft_test_result(range_is_not_populated(addr, SIZE), in test_populate_read()
177 ret = madvise(addr, SIZE, MADV_POPULATE_READ); in test_populate_read()
179 ksft_test_result(range_is_populated(addr, SIZE), in test_populate_read()
182 munmap(addr, SIZE); in test_populate_read()
187 char *addr; in test_populate_write() local
192 addr = mmap(0, SIZE, PROT_READ | PROT_WRITE, in test_populate_write()
194 if (addr == MAP_FAILED) in test_populate_write()
196 ksft_test_result(range_is_not_populated(addr, SIZE), in test_populate_write()
199 ret = madvise(addr, SIZE, MADV_POPULATE_WRITE); in test_populate_write()
201 ksft_test_result(range_is_populated(addr, SIZE), in test_populate_write()
204 munmap(addr, SIZE); in test_populate_write()
237 char *addr; in test_softdirty() local
242 addr = mmap(0, SIZE, PROT_READ | PROT_WRITE, in test_softdirty()
244 if (addr == MAP_FAILED) in test_softdirty()
249 ksft_test_result(range_is_not_softdirty(addr, SIZE), in test_softdirty()
253 ret = madvise(addr, SIZE, MADV_POPULATE_READ); in test_softdirty()
255 ksft_test_result(range_is_not_softdirty(addr, SIZE), in test_softdirty()
259 ret = madvise(addr, SIZE, MADV_POPULATE_WRITE); in test_softdirty()
261 ksft_test_result(range_is_softdirty(addr, SIZE), in test_softdirty()
264 munmap(addr, SIZE); in test_softdirty()