Lines Matching refs:code
9 #include <asm/code-patching.h>
27 pr_err("code-patching: test failed at line %d\n", __LINE__); \
161 /* All condition code bits set & link */
352 u32 code[32];
379 ppc_inst_write(code, inst64);
380 check(!patch_instructions((u32 *)(addr64 + 1), code, 24, true));
392 for (int i = 0; i < ARRAY_SIZE(code); i++)
393 code[i] = i + 1;
395 check(!patch_instructions(addr32 + 1, code, sizeof(code), false));
398 check(!memcmp(&addr32[1], code, sizeof(code)));
399 check(addr32[ARRAY_SIZE(code) + 1] == 0);
416 ppc_inst_write(code, inst64);
417 check(!patch_instructions((u32 *)(addr64 + 1), code, 24, true));
429 for (int i = 0; i < ARRAY_SIZE(code); i++)
430 code[i] = i + 1;
432 check(!patch_instructions(addr32 + 1, code, sizeof(code), false));
435 check(!memcmp(&addr32[1], code, sizeof(code)));
436 check(addr32[ARRAY_SIZE(code) + 1] == 0);
443 pr_info("Running code patching self-tests ...\n");