armv8_deprecated.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644
  1. /*
  2. * Copyright (C) 2014 ARM Limited
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #include <linux/cpu.h>
  9. #include <linux/init.h>
  10. #include <linux/list.h>
  11. #include <linux/perf_event.h>
  12. #include <linux/sched.h>
  13. #include <linux/slab.h>
  14. #include <linux/sysctl.h>
  15. #include <linux/uaccess.h>
  16. #include <asm/cpufeature.h>
  17. #include <asm/insn.h>
  18. #include <asm/sysreg.h>
  19. #include <asm/system_misc.h>
  20. #include <asm/traps.h>
  21. #include <asm/kprobes.h>
  22. #define CREATE_TRACE_POINTS
  23. #include "trace-events-emulation.h"
  24. /*
  25. * The runtime support for deprecated instruction support can be in one of
  26. * following three states -
  27. *
  28. * 0 = undef
  29. * 1 = emulate (software emulation)
  30. * 2 = hw (supported in hardware)
  31. */
  32. enum insn_emulation_mode {
  33. INSN_UNDEF,
  34. INSN_EMULATE,
  35. INSN_HW,
  36. };
  37. enum legacy_insn_status {
  38. INSN_DEPRECATED,
  39. INSN_OBSOLETE,
  40. };
  41. struct insn_emulation_ops {
  42. const char *name;
  43. enum legacy_insn_status status;
  44. struct undef_hook *hooks;
  45. int (*set_hw_mode)(bool enable);
  46. };
  47. struct insn_emulation {
  48. struct list_head node;
  49. struct insn_emulation_ops *ops;
  50. int current_mode;
  51. int min;
  52. int max;
  53. };
  54. static LIST_HEAD(insn_emulation);
  55. static int nr_insn_emulated __initdata;
  56. static DEFINE_RAW_SPINLOCK(insn_emulation_lock);
  57. static void register_emulation_hooks(struct insn_emulation_ops *ops)
  58. {
  59. struct undef_hook *hook;
  60. BUG_ON(!ops->hooks);
  61. for (hook = ops->hooks; hook->instr_mask; hook++)
  62. register_undef_hook(hook);
  63. pr_notice("Registered %s emulation handler\n", ops->name);
  64. }
  65. static void remove_emulation_hooks(struct insn_emulation_ops *ops)
  66. {
  67. struct undef_hook *hook;
  68. BUG_ON(!ops->hooks);
  69. for (hook = ops->hooks; hook->instr_mask; hook++)
  70. unregister_undef_hook(hook);
  71. pr_notice("Removed %s emulation handler\n", ops->name);
  72. }
  73. static void enable_insn_hw_mode(void *data)
  74. {
  75. struct insn_emulation *insn = (struct insn_emulation *)data;
  76. if (insn->ops->set_hw_mode)
  77. insn->ops->set_hw_mode(true);
  78. }
  79. static void disable_insn_hw_mode(void *data)
  80. {
  81. struct insn_emulation *insn = (struct insn_emulation *)data;
  82. if (insn->ops->set_hw_mode)
  83. insn->ops->set_hw_mode(false);
  84. }
  85. /* Run set_hw_mode(mode) on all active CPUs */
  86. static int run_all_cpu_set_hw_mode(struct insn_emulation *insn, bool enable)
  87. {
  88. if (!insn->ops->set_hw_mode)
  89. return -EINVAL;
  90. if (enable)
  91. on_each_cpu(enable_insn_hw_mode, (void *)insn, true);
  92. else
  93. on_each_cpu(disable_insn_hw_mode, (void *)insn, true);
  94. return 0;
  95. }
  96. /*
  97. * Run set_hw_mode for all insns on a starting CPU.
  98. * Returns:
  99. * 0 - If all the hooks ran successfully.
  100. * -EINVAL - At least one hook is not supported by the CPU.
  101. */
  102. static int run_all_insn_set_hw_mode(unsigned int cpu)
  103. {
  104. int rc = 0;
  105. unsigned long flags;
  106. struct insn_emulation *insn;
  107. raw_spin_lock_irqsave(&insn_emulation_lock, flags);
  108. list_for_each_entry(insn, &insn_emulation, node) {
  109. bool enable = (insn->current_mode == INSN_HW);
  110. if (insn->ops->set_hw_mode && insn->ops->set_hw_mode(enable)) {
  111. pr_warn("CPU[%u] cannot support the emulation of %s",
  112. cpu, insn->ops->name);
  113. rc = -EINVAL;
  114. }
  115. }
  116. raw_spin_unlock_irqrestore(&insn_emulation_lock, flags);
  117. return rc;
  118. }
  119. static int update_insn_emulation_mode(struct insn_emulation *insn,
  120. enum insn_emulation_mode prev)
  121. {
  122. int ret = 0;
  123. switch (prev) {
  124. case INSN_UNDEF: /* Nothing to be done */
  125. break;
  126. case INSN_EMULATE:
  127. remove_emulation_hooks(insn->ops);
  128. break;
  129. case INSN_HW:
  130. if (!run_all_cpu_set_hw_mode(insn, false))
  131. pr_notice("Disabled %s support\n", insn->ops->name);
  132. break;
  133. }
  134. switch (insn->current_mode) {
  135. case INSN_UNDEF:
  136. break;
  137. case INSN_EMULATE:
  138. register_emulation_hooks(insn->ops);
  139. break;
  140. case INSN_HW:
  141. ret = run_all_cpu_set_hw_mode(insn, true);
  142. if (!ret)
  143. pr_notice("Enabled %s support\n", insn->ops->name);
  144. break;
  145. }
  146. return ret;
  147. }
  148. static void __init register_insn_emulation(struct insn_emulation_ops *ops)
  149. {
  150. unsigned long flags;
  151. struct insn_emulation *insn;
  152. insn = kzalloc(sizeof(*insn), GFP_KERNEL);
  153. insn->ops = ops;
  154. insn->min = INSN_UNDEF;
  155. switch (ops->status) {
  156. case INSN_DEPRECATED:
  157. insn->current_mode = INSN_EMULATE;
  158. /* Disable the HW mode if it was turned on at early boot time */
  159. run_all_cpu_set_hw_mode(insn, false);
  160. insn->max = INSN_HW;
  161. break;
  162. case INSN_OBSOLETE:
  163. insn->current_mode = INSN_UNDEF;
  164. insn->max = INSN_EMULATE;
  165. break;
  166. }
  167. raw_spin_lock_irqsave(&insn_emulation_lock, flags);
  168. list_add(&insn->node, &insn_emulation);
  169. nr_insn_emulated++;
  170. raw_spin_unlock_irqrestore(&insn_emulation_lock, flags);
  171. /* Register any handlers if required */
  172. update_insn_emulation_mode(insn, INSN_UNDEF);
  173. }
  174. static int emulation_proc_handler(struct ctl_table *table, int write,
  175. void __user *buffer, size_t *lenp,
  176. loff_t *ppos)
  177. {
  178. int ret = 0;
  179. struct insn_emulation *insn = (struct insn_emulation *) table->data;
  180. enum insn_emulation_mode prev_mode = insn->current_mode;
  181. table->data = &insn->current_mode;
  182. ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
  183. if (ret || !write || prev_mode == insn->current_mode)
  184. goto ret;
  185. ret = update_insn_emulation_mode(insn, prev_mode);
  186. if (ret) {
  187. /* Mode change failed, revert to previous mode. */
  188. insn->current_mode = prev_mode;
  189. update_insn_emulation_mode(insn, INSN_UNDEF);
  190. }
  191. ret:
  192. table->data = insn;
  193. return ret;
  194. }
  195. static void __init register_insn_emulation_sysctl(void)
  196. {
  197. unsigned long flags;
  198. int i = 0;
  199. struct insn_emulation *insn;
  200. struct ctl_table *insns_sysctl, *sysctl;
  201. insns_sysctl = kcalloc(nr_insn_emulated + 1, sizeof(*sysctl),
  202. GFP_KERNEL);
  203. raw_spin_lock_irqsave(&insn_emulation_lock, flags);
  204. list_for_each_entry(insn, &insn_emulation, node) {
  205. sysctl = &insns_sysctl[i];
  206. sysctl->mode = 0644;
  207. sysctl->maxlen = sizeof(int);
  208. sysctl->procname = insn->ops->name;
  209. sysctl->data = insn;
  210. sysctl->extra1 = &insn->min;
  211. sysctl->extra2 = &insn->max;
  212. sysctl->proc_handler = emulation_proc_handler;
  213. i++;
  214. }
  215. raw_spin_unlock_irqrestore(&insn_emulation_lock, flags);
  216. register_sysctl("abi", insns_sysctl);
  217. }
  218. /*
  219. * Implement emulation of the SWP/SWPB instructions using load-exclusive and
  220. * store-exclusive.
  221. *
  222. * Syntax of SWP{B} instruction: SWP{B}<c> <Rt>, <Rt2>, [<Rn>]
  223. * Where: Rt = destination
  224. * Rt2 = source
  225. * Rn = address
  226. */
  227. /*
  228. * Error-checking SWP macros implemented using ldxr{b}/stxr{b}
  229. */
  230. /* Arbitrary constant to ensure forward-progress of the LL/SC loop */
  231. #define __SWP_LL_SC_LOOPS 4
  232. #define __user_swpX_asm(data, addr, res, temp, temp2, B) \
  233. do { \
  234. uaccess_enable(); \
  235. __asm__ __volatile__( \
  236. " mov %w3, %w7\n" \
  237. "0: ldxr"B" %w2, [%4]\n" \
  238. "1: stxr"B" %w0, %w1, [%4]\n" \
  239. " cbz %w0, 2f\n" \
  240. " sub %w3, %w3, #1\n" \
  241. " cbnz %w3, 0b\n" \
  242. " mov %w0, %w5\n" \
  243. " b 3f\n" \
  244. "2:\n" \
  245. " mov %w1, %w2\n" \
  246. "3:\n" \
  247. " .pushsection .fixup,\"ax\"\n" \
  248. " .align 2\n" \
  249. "4: mov %w0, %w6\n" \
  250. " b 3b\n" \
  251. " .popsection" \
  252. _ASM_EXTABLE(0b, 4b) \
  253. _ASM_EXTABLE(1b, 4b) \
  254. : "=&r" (res), "+r" (data), "=&r" (temp), "=&r" (temp2) \
  255. : "r" ((unsigned long)addr), "i" (-EAGAIN), \
  256. "i" (-EFAULT), \
  257. "i" (__SWP_LL_SC_LOOPS) \
  258. : "memory"); \
  259. uaccess_disable(); \
  260. } while (0)
  261. #define __user_swp_asm(data, addr, res, temp, temp2) \
  262. __user_swpX_asm(data, addr, res, temp, temp2, "")
  263. #define __user_swpb_asm(data, addr, res, temp, temp2) \
  264. __user_swpX_asm(data, addr, res, temp, temp2, "b")
  265. /*
  266. * Bit 22 of the instruction encoding distinguishes between
  267. * the SWP and SWPB variants (bit set means SWPB).
  268. */
  269. #define TYPE_SWPB (1 << 22)
  270. static int emulate_swpX(unsigned int address, unsigned int *data,
  271. unsigned int type)
  272. {
  273. unsigned int res = 0;
  274. if ((type != TYPE_SWPB) && (address & 0x3)) {
  275. /* SWP to unaligned address not permitted */
  276. pr_debug("SWP instruction on unaligned pointer!\n");
  277. return -EFAULT;
  278. }
  279. while (1) {
  280. unsigned long temp, temp2;
  281. if (type == TYPE_SWPB)
  282. __user_swpb_asm(*data, address, res, temp, temp2);
  283. else
  284. __user_swp_asm(*data, address, res, temp, temp2);
  285. if (likely(res != -EAGAIN) || signal_pending(current))
  286. break;
  287. cond_resched();
  288. }
  289. return res;
  290. }
  291. #define ARM_OPCODE_CONDTEST_FAIL 0
  292. #define ARM_OPCODE_CONDTEST_PASS 1
  293. #define ARM_OPCODE_CONDTEST_UNCOND 2
  294. #define ARM_OPCODE_CONDITION_UNCOND 0xf
  295. static unsigned int __kprobes aarch32_check_condition(u32 opcode, u32 psr)
  296. {
  297. u32 cc_bits = opcode >> 28;
  298. if (cc_bits != ARM_OPCODE_CONDITION_UNCOND) {
  299. if ((*aarch32_opcode_cond_checks[cc_bits])(psr))
  300. return ARM_OPCODE_CONDTEST_PASS;
  301. else
  302. return ARM_OPCODE_CONDTEST_FAIL;
  303. }
  304. return ARM_OPCODE_CONDTEST_UNCOND;
  305. }
  306. /*
  307. * swp_handler logs the id of calling process, dissects the instruction, sanity
  308. * checks the memory location, calls emulate_swpX for the actual operation and
  309. * deals with fixup/error handling before returning
  310. */
  311. static int swp_handler(struct pt_regs *regs, u32 instr)
  312. {
  313. u32 destreg, data, type, address = 0;
  314. const void __user *user_ptr;
  315. int rn, rt2, res = 0;
  316. perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, regs, regs->pc);
  317. type = instr & TYPE_SWPB;
  318. switch (aarch32_check_condition(instr, regs->pstate)) {
  319. case ARM_OPCODE_CONDTEST_PASS:
  320. break;
  321. case ARM_OPCODE_CONDTEST_FAIL:
  322. /* Condition failed - return to next instruction */
  323. goto ret;
  324. case ARM_OPCODE_CONDTEST_UNCOND:
  325. /* If unconditional encoding - not a SWP, undef */
  326. return -EFAULT;
  327. default:
  328. return -EINVAL;
  329. }
  330. rn = aarch32_insn_extract_reg_num(instr, A32_RN_OFFSET);
  331. rt2 = aarch32_insn_extract_reg_num(instr, A32_RT2_OFFSET);
  332. address = (u32)regs->user_regs.regs[rn];
  333. data = (u32)regs->user_regs.regs[rt2];
  334. destreg = aarch32_insn_extract_reg_num(instr, A32_RT_OFFSET);
  335. pr_debug("addr in r%d->0x%08x, dest is r%d, source in r%d->0x%08x)\n",
  336. rn, address, destreg,
  337. aarch32_insn_extract_reg_num(instr, A32_RT2_OFFSET), data);
  338. /* Check access in reasonable access range for both SWP and SWPB */
  339. user_ptr = (const void __user *)(unsigned long)(address & ~3);
  340. if (!access_ok(VERIFY_WRITE, user_ptr, 4)) {
  341. pr_debug("SWP{B} emulation: access to 0x%08x not allowed!\n",
  342. address);
  343. goto fault;
  344. }
  345. res = emulate_swpX(address, &data, type);
  346. if (res == -EFAULT)
  347. goto fault;
  348. else if (res == 0)
  349. regs->user_regs.regs[destreg] = data;
  350. ret:
  351. if (type == TYPE_SWPB)
  352. trace_instruction_emulation("swpb", regs->pc);
  353. else
  354. trace_instruction_emulation("swp", regs->pc);
  355. pr_warn_ratelimited("\"%s\" (%ld) uses obsolete SWP{B} instruction at 0x%llx\n",
  356. current->comm, (unsigned long)current->pid, regs->pc);
  357. arm64_skip_faulting_instruction(regs, 4);
  358. return 0;
  359. fault:
  360. pr_debug("SWP{B} emulation: access caused memory abort!\n");
  361. arm64_notify_segfault(address);
  362. return 0;
  363. }
  364. /*
  365. * Only emulate SWP/SWPB executed in ARM state/User mode.
  366. * The kernel must be SWP free and SWP{B} does not exist in Thumb.
  367. */
  368. static struct undef_hook swp_hooks[] = {
  369. {
  370. .instr_mask = 0x0fb00ff0,
  371. .instr_val = 0x01000090,
  372. .pstate_mask = COMPAT_PSR_MODE_MASK,
  373. .pstate_val = COMPAT_PSR_MODE_USR,
  374. .fn = swp_handler
  375. },
  376. { }
  377. };
  378. static struct insn_emulation_ops swp_ops = {
  379. .name = "swp",
  380. .status = INSN_OBSOLETE,
  381. .hooks = swp_hooks,
  382. .set_hw_mode = NULL,
  383. };
  384. static int cp15barrier_handler(struct pt_regs *regs, u32 instr)
  385. {
  386. perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, regs, regs->pc);
  387. switch (aarch32_check_condition(instr, regs->pstate)) {
  388. case ARM_OPCODE_CONDTEST_PASS:
  389. break;
  390. case ARM_OPCODE_CONDTEST_FAIL:
  391. /* Condition failed - return to next instruction */
  392. goto ret;
  393. case ARM_OPCODE_CONDTEST_UNCOND:
  394. /* If unconditional encoding - not a barrier instruction */
  395. return -EFAULT;
  396. default:
  397. return -EINVAL;
  398. }
  399. switch (aarch32_insn_mcr_extract_crm(instr)) {
  400. case 10:
  401. /*
  402. * dmb - mcr p15, 0, Rt, c7, c10, 5
  403. * dsb - mcr p15, 0, Rt, c7, c10, 4
  404. */
  405. if (aarch32_insn_mcr_extract_opc2(instr) == 5) {
  406. dmb(sy);
  407. trace_instruction_emulation(
  408. "mcr p15, 0, Rt, c7, c10, 5 ; dmb", regs->pc);
  409. } else {
  410. dsb(sy);
  411. trace_instruction_emulation(
  412. "mcr p15, 0, Rt, c7, c10, 4 ; dsb", regs->pc);
  413. }
  414. break;
  415. case 5:
  416. /*
  417. * isb - mcr p15, 0, Rt, c7, c5, 4
  418. *
  419. * Taking an exception or returning from one acts as an
  420. * instruction barrier. So no explicit barrier needed here.
  421. */
  422. trace_instruction_emulation(
  423. "mcr p15, 0, Rt, c7, c5, 4 ; isb", regs->pc);
  424. break;
  425. }
  426. ret:
  427. pr_warn_ratelimited("\"%s\" (%ld) uses deprecated CP15 Barrier instruction at 0x%llx\n",
  428. current->comm, (unsigned long)current->pid, regs->pc);
  429. arm64_skip_faulting_instruction(regs, 4);
  430. return 0;
  431. }
  432. static int cp15_barrier_set_hw_mode(bool enable)
  433. {
  434. if (enable)
  435. config_sctlr_el1(0, SCTLR_EL1_CP15BEN);
  436. else
  437. config_sctlr_el1(SCTLR_EL1_CP15BEN, 0);
  438. return 0;
  439. }
  440. static struct undef_hook cp15_barrier_hooks[] = {
  441. {
  442. .instr_mask = 0x0fff0fdf,
  443. .instr_val = 0x0e070f9a,
  444. .pstate_mask = COMPAT_PSR_MODE_MASK,
  445. .pstate_val = COMPAT_PSR_MODE_USR,
  446. .fn = cp15barrier_handler,
  447. },
  448. {
  449. .instr_mask = 0x0fff0fff,
  450. .instr_val = 0x0e070f95,
  451. .pstate_mask = COMPAT_PSR_MODE_MASK,
  452. .pstate_val = COMPAT_PSR_MODE_USR,
  453. .fn = cp15barrier_handler,
  454. },
  455. { }
  456. };
  457. static struct insn_emulation_ops cp15_barrier_ops = {
  458. .name = "cp15_barrier",
  459. .status = INSN_DEPRECATED,
  460. .hooks = cp15_barrier_hooks,
  461. .set_hw_mode = cp15_barrier_set_hw_mode,
  462. };
  463. static int setend_set_hw_mode(bool enable)
  464. {
  465. if (!cpu_supports_mixed_endian_el0())
  466. return -EINVAL;
  467. if (enable)
  468. config_sctlr_el1(SCTLR_EL1_SED, 0);
  469. else
  470. config_sctlr_el1(0, SCTLR_EL1_SED);
  471. return 0;
  472. }
  473. static int compat_setend_handler(struct pt_regs *regs, u32 big_endian)
  474. {
  475. char *insn;
  476. perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS, 1, regs, regs->pc);
  477. if (big_endian) {
  478. insn = "setend be";
  479. regs->pstate |= COMPAT_PSR_E_BIT;
  480. } else {
  481. insn = "setend le";
  482. regs->pstate &= ~COMPAT_PSR_E_BIT;
  483. }
  484. trace_instruction_emulation(insn, regs->pc);
  485. pr_warn_ratelimited("\"%s\" (%ld) uses deprecated setend instruction at 0x%llx\n",
  486. current->comm, (unsigned long)current->pid, regs->pc);
  487. return 0;
  488. }
  489. static int a32_setend_handler(struct pt_regs *regs, u32 instr)
  490. {
  491. int rc = compat_setend_handler(regs, (instr >> 9) & 1);
  492. arm64_skip_faulting_instruction(regs, 4);
  493. return rc;
  494. }
  495. static int t16_setend_handler(struct pt_regs *regs, u32 instr)
  496. {
  497. int rc = compat_setend_handler(regs, (instr >> 3) & 1);
  498. arm64_skip_faulting_instruction(regs, 2);
  499. return rc;
  500. }
  501. static struct undef_hook setend_hooks[] = {
  502. {
  503. .instr_mask = 0xfffffdff,
  504. .instr_val = 0xf1010000,
  505. .pstate_mask = COMPAT_PSR_MODE_MASK,
  506. .pstate_val = COMPAT_PSR_MODE_USR,
  507. .fn = a32_setend_handler,
  508. },
  509. {
  510. /* Thumb mode */
  511. .instr_mask = 0x0000fff7,
  512. .instr_val = 0x0000b650,
  513. .pstate_mask = (COMPAT_PSR_T_BIT | COMPAT_PSR_MODE_MASK),
  514. .pstate_val = (COMPAT_PSR_T_BIT | COMPAT_PSR_MODE_USR),
  515. .fn = t16_setend_handler,
  516. },
  517. {}
  518. };
  519. static struct insn_emulation_ops setend_ops = {
  520. .name = "setend",
  521. .status = INSN_DEPRECATED,
  522. .hooks = setend_hooks,
  523. .set_hw_mode = setend_set_hw_mode,
  524. };
  525. /*
  526. * Invoked as late_initcall, since not needed before init spawned.
  527. */
  528. static int __init armv8_deprecated_init(void)
  529. {
  530. if (IS_ENABLED(CONFIG_SWP_EMULATION))
  531. register_insn_emulation(&swp_ops);
  532. if (IS_ENABLED(CONFIG_CP15_BARRIER_EMULATION))
  533. register_insn_emulation(&cp15_barrier_ops);
  534. if (IS_ENABLED(CONFIG_SETEND_EMULATION)) {
  535. if(system_supports_mixed_endian_el0())
  536. register_insn_emulation(&setend_ops);
  537. else
  538. pr_info("setend instruction emulation is not supported on this system\n");
  539. }
  540. cpuhp_setup_state_nocalls(CPUHP_AP_ARM64_ISNDEP_STARTING,
  541. "arm64/isndep:starting",
  542. run_all_insn_set_hw_mode, NULL);
  543. register_insn_emulation_sysctl();
  544. return 0;
  545. }
  546. core_initcall(armv8_deprecated_init);