Lines Matching defs:block_size
21 int block_size, test_block_size = 4 * MAX_DCBZL_SZB, err;
34 for (block_size = 0, p = rb; (p - rb) < test_block_size; p++)
36 block_size++;
37 assert(block_size == 16 || block_size == 32 || block_size == 64 || block_size == 128);
40 return block_size;
44 static void test_dcbzl_at(char *addr, char *buffer, int block_size)
48 /* Note: Assumption is that the length of buffer is three times the block_size. */
49 memset(buffer, 0xff, 3 * block_size);
51 for (i = 0; i < block_size; i++) {
53 assert(buffer[block_size + i] == 0x00);
54 assert(buffer[2 * block_size + i] == 0xff);
64 int block_size;
66 block_size = query_block_size();
67 assert(block_size == 16 || block_size == 32 || block_size == 64 || block_size == 128);
68 buffer_size = 3 * block_size;
69 err = posix_memalign((void **) &buffer, block_size, buffer_size);
76 test_dcbzl_at(&buffer[block_size], buffer, block_size);
79 /* check at un-aligned (1 modulo block_size) address within the test block */
80 test_dcbzl_at(&buffer[block_size+1], buffer, block_size);
81 fprintf(stdout, "Passed dcbzl test at un-aligned (1 modulo block_size) address within the test block.\n");
83 /* check at un-aligned ((block_size - 1) modulo block_size) address within the test block */
84 test_dcbzl_at(&buffer[2 * block_size - 1], buffer, block_size);
85 fprintf(stdout, "Passed dcbzl test at un-aligned ((block_size - 1) modulo block_size) address within the test block.\n");