n2_asm.S 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /* n2_asm.S: Hypervisor calls for NCS support.
  2. *
  3. * Copyright (C) 2009 David S. Miller <davem@davemloft.net>
  4. */
  5. #include <linux/linkage.h>
  6. #include <asm/hypervisor.h>
  7. #include "n2_core.h"
  8. /* o0: queue type
  9. * o1: RA of queue
  10. * o2: num entries in queue
  11. * o3: address of queue handle return
  12. */
  13. ENTRY(sun4v_ncs_qconf)
  14. mov HV_FAST_NCS_QCONF, %o5
  15. ta HV_FAST_TRAP
  16. stx %o1, [%o3]
  17. retl
  18. nop
  19. ENDPROC(sun4v_ncs_qconf)
  20. /* %o0: queue handle
  21. * %o1: address of queue type return
  22. * %o2: address of queue base address return
  23. * %o3: address of queue num entries return
  24. */
  25. ENTRY(sun4v_ncs_qinfo)
  26. mov %o1, %g1
  27. mov %o2, %g2
  28. mov %o3, %g3
  29. mov HV_FAST_NCS_QINFO, %o5
  30. ta HV_FAST_TRAP
  31. stx %o1, [%g1]
  32. stx %o2, [%g2]
  33. stx %o3, [%g3]
  34. retl
  35. nop
  36. ENDPROC(sun4v_ncs_qinfo)
  37. /* %o0: queue handle
  38. * %o1: address of head offset return
  39. */
  40. ENTRY(sun4v_ncs_gethead)
  41. mov %o1, %o2
  42. mov HV_FAST_NCS_GETHEAD, %o5
  43. ta HV_FAST_TRAP
  44. stx %o1, [%o2]
  45. retl
  46. nop
  47. ENDPROC(sun4v_ncs_gethead)
  48. /* %o0: queue handle
  49. * %o1: address of tail offset return
  50. */
  51. ENTRY(sun4v_ncs_gettail)
  52. mov %o1, %o2
  53. mov HV_FAST_NCS_GETTAIL, %o5
  54. ta HV_FAST_TRAP
  55. stx %o1, [%o2]
  56. retl
  57. nop
  58. ENDPROC(sun4v_ncs_gettail)
  59. /* %o0: queue handle
  60. * %o1: new tail offset
  61. */
  62. ENTRY(sun4v_ncs_settail)
  63. mov HV_FAST_NCS_SETTAIL, %o5
  64. ta HV_FAST_TRAP
  65. retl
  66. nop
  67. ENDPROC(sun4v_ncs_settail)
  68. /* %o0: queue handle
  69. * %o1: address of devino return
  70. */
  71. ENTRY(sun4v_ncs_qhandle_to_devino)
  72. mov %o1, %o2
  73. mov HV_FAST_NCS_QHANDLE_TO_DEVINO, %o5
  74. ta HV_FAST_TRAP
  75. stx %o1, [%o2]
  76. retl
  77. nop
  78. ENDPROC(sun4v_ncs_qhandle_to_devino)
  79. /* %o0: queue handle
  80. * %o1: new head offset
  81. */
  82. ENTRY(sun4v_ncs_sethead_marker)
  83. mov HV_FAST_NCS_SETHEAD_MARKER, %o5
  84. ta HV_FAST_TRAP
  85. retl
  86. nop
  87. ENDPROC(sun4v_ncs_sethead_marker)