mb_incoherent.S 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright 2010 Tilera Corporation. All Rights Reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License
  6. * as published by the Free Software Foundation, version 2.
  7. *
  8. * This program is distributed in the hope that it will be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
  11. * NON INFRINGEMENT. See the GNU General Public License for
  12. * more details.
  13. *
  14. * Assembly code for invoking the HV's fence_incoherent syscall.
  15. */
  16. #include <linux/linkage.h>
  17. #include <hv/syscall_public.h>
  18. #include <arch/abi.h>
  19. #include <arch/chip.h>
  20. #if !CHIP_HAS_MF_WAITS_FOR_VICTIMS()
  21. /*
  22. * Invoke the hypervisor's fence_incoherent syscall, which guarantees
  23. * that all victims for cachelines homed on this tile have reached memory.
  24. */
  25. STD_ENTRY(__mb_incoherent)
  26. moveli TREG_SYSCALL_NR_NAME, HV_SYS_fence_incoherent
  27. swint2
  28. jrp lr
  29. STD_ENDPROC(__mb_incoherent)
  30. #endif