Lines Matching refs:insn
48 u32 insn);
233 static bool try_emulate_swp(struct pt_regs *regs, u32 insn) in try_emulate_swp() argument
239 if ((insn & 0x0fb00ff0) != 0x01000090) in try_emulate_swp()
242 return swp_handler(regs, insn) == 0; in try_emulate_swp()
316 static bool try_emulate_cp15_barrier(struct pt_regs *regs, u32 insn) in try_emulate_cp15_barrier() argument
321 if ((insn & 0x0fff0fdf) == 0x0e070f9a) in try_emulate_cp15_barrier()
322 return cp15barrier_handler(regs, insn) == 0; in try_emulate_cp15_barrier()
324 if ((insn & 0x0fff0fff) == 0x0e070f95) in try_emulate_cp15_barrier()
325 return cp15barrier_handler(regs, insn) == 0; in try_emulate_cp15_barrier()
353 char *insn; in compat_setend_handler() local
358 insn = "setend be"; in compat_setend_handler()
361 insn = "setend le"; in compat_setend_handler()
365 trace_instruction_emulation(insn, regs->pc); in compat_setend_handler()
386 static bool try_emulate_setend(struct pt_regs *regs, u32 insn) in try_emulate_setend() argument
389 (insn & 0xfffffff7) == 0x0000b650) in try_emulate_setend()
390 return t16_setend_handler(regs, insn) == 0; in try_emulate_setend()
393 (insn & 0xfffffdff) == 0xf1010000) in try_emulate_setend()
394 return a32_setend_handler(regs, insn) == 0; in try_emulate_setend()
423 struct insn_emulation *insn = data; in enable_insn_hw_mode() local
424 if (insn->set_hw_mode) in enable_insn_hw_mode()
425 insn->set_hw_mode(true); in enable_insn_hw_mode()
430 struct insn_emulation *insn = data; in disable_insn_hw_mode() local
431 if (insn->set_hw_mode) in disable_insn_hw_mode()
432 insn->set_hw_mode(false); in disable_insn_hw_mode()
436 static int run_all_cpu_set_hw_mode(struct insn_emulation *insn, bool enable) in run_all_cpu_set_hw_mode() argument
438 if (!insn->set_hw_mode) in run_all_cpu_set_hw_mode()
441 on_each_cpu(enable_insn_hw_mode, (void *)insn, true); in run_all_cpu_set_hw_mode()
443 on_each_cpu(disable_insn_hw_mode, (void *)insn, true); in run_all_cpu_set_hw_mode()
465 struct insn_emulation *insn = insn_emulations[i]; in run_all_insn_set_hw_mode() local
466 bool enable = READ_ONCE(insn->current_mode) == INSN_HW; in run_all_insn_set_hw_mode()
467 if (insn->set_hw_mode && insn->set_hw_mode(enable)) { in run_all_insn_set_hw_mode()
469 cpu, insn->name); in run_all_insn_set_hw_mode()
478 static int update_insn_emulation_mode(struct insn_emulation *insn, in update_insn_emulation_mode() argument
489 if (!run_all_cpu_set_hw_mode(insn, false)) in update_insn_emulation_mode()
490 pr_notice("Disabled %s support\n", insn->name); in update_insn_emulation_mode()
494 switch (insn->current_mode) { in update_insn_emulation_mode()
500 ret = run_all_cpu_set_hw_mode(insn, true); in update_insn_emulation_mode()
502 pr_notice("Enabled %s support\n", insn->name); in update_insn_emulation_mode()
514 struct insn_emulation *insn = container_of(table->data, struct insn_emulation, current_mode); in emulation_proc_handler() local
515 enum insn_emulation_mode prev_mode = insn->current_mode; in emulation_proc_handler()
520 if (ret || !write || prev_mode == insn->current_mode) in emulation_proc_handler()
523 ret = update_insn_emulation_mode(insn, prev_mode); in emulation_proc_handler()
526 WRITE_ONCE(insn->current_mode, prev_mode); in emulation_proc_handler()
527 update_insn_emulation_mode(insn, INSN_UNDEF); in emulation_proc_handler()
534 static void __init register_insn_emulation(struct insn_emulation *insn) in register_insn_emulation() argument
538 insn->min = INSN_UNDEF; in register_insn_emulation()
540 switch (insn->status) { in register_insn_emulation()
542 insn->current_mode = INSN_EMULATE; in register_insn_emulation()
544 run_all_cpu_set_hw_mode(insn, false); in register_insn_emulation()
545 insn->max = INSN_HW; in register_insn_emulation()
548 insn->current_mode = INSN_UNDEF; in register_insn_emulation()
549 insn->max = INSN_EMULATE; in register_insn_emulation()
552 insn->current_mode = INSN_UNDEF; in register_insn_emulation()
553 insn->max = INSN_UNDEF; in register_insn_emulation()
558 update_insn_emulation_mode(insn, INSN_UNDEF); in register_insn_emulation()
560 if (insn->status != INSN_UNAVAILABLE) { in register_insn_emulation()
561 sysctl = &insn->sysctl[0]; in register_insn_emulation()
566 sysctl->procname = insn->name; in register_insn_emulation()
567 sysctl->data = &insn->current_mode; in register_insn_emulation()
568 sysctl->extra1 = &insn->min; in register_insn_emulation()
569 sysctl->extra2 = &insn->max; in register_insn_emulation()
576 bool try_emulate_armv8_deprecated(struct pt_regs *regs, u32 insn) in try_emulate_armv8_deprecated() argument
592 if (ie->try_emulate(regs, insn)) in try_emulate_armv8_deprecated()