armv8_deprecated.c 16 KB

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