flush_icache.S 396 B

12345678910111213141516171819202122
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (C) 2017 SiFive
  4. */
  5. #include <linux/linkage.h>
  6. #include <asm/unistd.h>
  7. .text
  8. /* int __vdso_flush_icache(void *start, void *end, unsigned long flags); */
  9. ENTRY(__vdso_flush_icache)
  10. .cfi_startproc
  11. #ifdef CONFIG_SMP
  12. li a7, __NR_riscv_flush_icache
  13. ecall
  14. #else
  15. fence.i
  16. li a0, 0
  17. #endif
  18. ret
  19. .cfi_endproc
  20. ENDPROC(__vdso_flush_icache)