Lines Matching +full:mem +full:- +full:base
1 // SPDX-License-Identifier: GPL-2.0-only
5 * Run with 'taskset -c <cpu-list> cbo' to only execute hwprobe on a
24 static char mem[4096] __aligned(4096) = { [0 ... 4095] = 0xa5 }; variable
30 unsigned long *regs = (unsigned long *)&((ucontext_t *)context)->uc_mcontext; in sigill_handler()
39 #define cbo_insn(base, fn) \ argument
45 : : "r" (base), "i" (fn), "i" (MK_CBO(fn)) : "a0", "a1", "memory"); \
48 static void cbo_inval(char *base) { cbo_insn(base, 0); } in cbo_inval() argument
49 static void cbo_clean(char *base) { cbo_insn(base, 1); } in cbo_clean() argument
50 static void cbo_flush(char *base) { cbo_insn(base, 2); } in cbo_flush() argument
51 static void cbo_zero(char *base) { cbo_insn(base, 4); } in cbo_zero() argument
58 cbo_clean(&mem[0]); in test_no_zicbom()
62 cbo_flush(&mem[0]); in test_no_zicbom()
66 cbo_inval(&mem[0]); in test_no_zicbom()
75 cbo_zero(&mem[0]); in test_no_zicboz()
81 return n != 0 && (n & (n - 1)) == 0; in is_power_of_2()
101 cbo_zero(&mem[block_size]); in test_zicboz()
113 cbo_zero(&mem[i * block_size]); in test_zicboz()
120 if (mem[i * block_size + j] != expected) { in test_zicboz()
122 ksft_print_msg("cbo.zero check: mem[%llu] != 0x%x\n", in test_zicboz()
187 if (argc > 1 && !strcmp(argv[1], "--sigill")) { in main()