• Home
  • Raw
  • Download

Lines Matching refs:insn

48 						       u32 insn);
239 static bool try_emulate_swp(struct pt_regs *regs, u32 insn) in try_emulate_swp() argument
245 if ((insn & 0x0fb00ff0) != 0x01000090) in try_emulate_swp()
248 return swp_handler(regs, insn) == 0; in try_emulate_swp()
322 static bool try_emulate_cp15_barrier(struct pt_regs *regs, u32 insn) in try_emulate_cp15_barrier() argument
327 if ((insn & 0x0fff0fdf) == 0x0e070f9a) in try_emulate_cp15_barrier()
328 return cp15barrier_handler(regs, insn) == 0; in try_emulate_cp15_barrier()
330 if ((insn & 0x0fff0fff) == 0x0e070f95) in try_emulate_cp15_barrier()
331 return cp15barrier_handler(regs, insn) == 0; in try_emulate_cp15_barrier()
359 char *insn; in compat_setend_handler() local
364 insn = "setend be"; in compat_setend_handler()
367 insn = "setend le"; in compat_setend_handler()
371 trace_instruction_emulation(insn, regs->pc); in compat_setend_handler()
392 static bool try_emulate_setend(struct pt_regs *regs, u32 insn) in try_emulate_setend() argument
395 (insn & 0xfffffff7) == 0x0000b650) in try_emulate_setend()
396 return t16_setend_handler(regs, insn) == 0; in try_emulate_setend()
399 (insn & 0xfffffdff) == 0xf1010000) in try_emulate_setend()
400 return a32_setend_handler(regs, insn) == 0; in try_emulate_setend()
429 struct insn_emulation *insn = (struct insn_emulation *)data; in enable_insn_hw_mode() local
430 if (insn->set_hw_mode) in enable_insn_hw_mode()
431 insn->set_hw_mode(true); in enable_insn_hw_mode()
436 struct insn_emulation *insn = (struct insn_emulation *)data; in disable_insn_hw_mode() local
437 if (insn->set_hw_mode) in disable_insn_hw_mode()
438 insn->set_hw_mode(false); in disable_insn_hw_mode()
442 static int run_all_cpu_set_hw_mode(struct insn_emulation *insn, bool enable) in run_all_cpu_set_hw_mode() argument
444 if (!insn->set_hw_mode) in run_all_cpu_set_hw_mode()
447 on_each_cpu(enable_insn_hw_mode, (void *)insn, true); in run_all_cpu_set_hw_mode()
449 on_each_cpu(disable_insn_hw_mode, (void *)insn, true); in run_all_cpu_set_hw_mode()
472 struct insn_emulation *insn = insn_emulations[i]; in run_all_insn_set_hw_mode() local
473 bool enable = READ_ONCE(insn->current_mode) == INSN_HW; in run_all_insn_set_hw_mode()
474 if (insn->set_hw_mode && insn->set_hw_mode(enable)) { in run_all_insn_set_hw_mode()
476 cpu, insn->name); in run_all_insn_set_hw_mode()
485 static int update_insn_emulation_mode(struct insn_emulation *insn, in update_insn_emulation_mode() argument
496 if (!run_all_cpu_set_hw_mode(insn, false)) in update_insn_emulation_mode()
497 pr_notice("Disabled %s support\n", insn->name); in update_insn_emulation_mode()
501 switch (insn->current_mode) { in update_insn_emulation_mode()
507 ret = run_all_cpu_set_hw_mode(insn, true); in update_insn_emulation_mode()
509 pr_notice("Enabled %s support\n", insn->name); in update_insn_emulation_mode()
521 struct insn_emulation *insn = container_of(table->data, struct insn_emulation, current_mode); in emulation_proc_handler() local
522 enum insn_emulation_mode prev_mode = insn->current_mode; in emulation_proc_handler()
527 if (ret || !write || prev_mode == insn->current_mode) in emulation_proc_handler()
530 ret = update_insn_emulation_mode(insn, prev_mode); in emulation_proc_handler()
533 WRITE_ONCE(insn->current_mode, prev_mode); in emulation_proc_handler()
534 update_insn_emulation_mode(insn, INSN_UNDEF); in emulation_proc_handler()
541 static void __init register_insn_emulation(struct insn_emulation *insn) in register_insn_emulation() argument
545 insn->min = INSN_UNDEF; in register_insn_emulation()
547 switch (insn->status) { in register_insn_emulation()
549 insn->current_mode = INSN_EMULATE; in register_insn_emulation()
551 run_all_cpu_set_hw_mode(insn, false); in register_insn_emulation()
552 insn->max = INSN_HW; in register_insn_emulation()
555 insn->current_mode = INSN_UNDEF; in register_insn_emulation()
556 insn->max = INSN_EMULATE; in register_insn_emulation()
559 insn->current_mode = INSN_UNDEF; in register_insn_emulation()
560 insn->max = INSN_UNDEF; in register_insn_emulation()
565 update_insn_emulation_mode(insn, INSN_UNDEF); in register_insn_emulation()
567 if (insn->status != INSN_UNAVAILABLE) { in register_insn_emulation()
568 sysctl = &insn->sysctl[0]; in register_insn_emulation()
573 sysctl->procname = insn->name; in register_insn_emulation()
574 sysctl->data = &insn->current_mode; in register_insn_emulation()
575 sysctl->extra1 = &insn->min; in register_insn_emulation()
576 sysctl->extra2 = &insn->max; in register_insn_emulation()
583 bool try_emulate_armv8_deprecated(struct pt_regs *regs, u32 insn) in try_emulate_armv8_deprecated() argument
601 if (ie->try_emulate(regs, insn)) in try_emulate_armv8_deprecated()