Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
1.6 KiB

  1. #include "ksia64.h"
  2. .file "mpipis.s"
  3. SBTTL("Signal Packet Done")
  4. //++
  5. //
  6. // VOID
  7. // KiIpiSignalPacketDone (
  8. // IN PKIPI_CONTEXT SignalDone
  9. // );
  10. //
  11. // Routine Description:
  12. //
  13. // This routine signals that a processor has completed a packet by
  14. // clearing the calling processor's set member of the requesting
  15. // processor's packet.
  16. //
  17. // Arguments:
  18. //
  19. // SignalDone (a0) - Supplies a pointer to the processor block of the
  20. // sending processor.
  21. //
  22. // N.B. The low order bit of signal done is set if the target set
  23. // has one and only one bit set.
  24. //
  25. // Return Value:
  26. //
  27. // None.
  28. //
  29. //--
  30. #if !defined(NT_UP)
  31. LEAF_ENTRY(KiIpiSignalPacketDone)
  32. tbit.nz pt0 = a0, 0
  33. dep a0 = 0, a0, 0, 1
  34. ;;
  35. add t1 = PbTargetSet, a0
  36. movl t0 = KiPcr+PcSetMember
  37. ;;
  38. (pt0) st4.rel [t1] = r0 // clear target set
  39. add t5 = PbPacketBarrier, a0
  40. (pt0) br.ret.spnt brp
  41. ld4.nt1 v0 = [t1]
  42. ld4 t3 = [t0]
  43. ;;
  44. Kispd10:
  45. mov ar.ccv = v0
  46. xor t4 = v0, t3
  47. ;;
  48. cmp.eq pt3, pt4 = 0, t4
  49. ;;
  50. (pt3) st4 [t1] = r0 // last processor clears target set
  51. mov t2 = v0
  52. (pt4) cmpxchg4.acq v0 = [t1], t4
  53. (pt3) st4.rel [t5] = r0 // last processor clears barrier
  54. (pt3) br.ret.spnt brp
  55. ;;
  56. cmp.ne pt1, pt2 = v0, t2
  57. (pt2) br.ret.sptk brp
  58. (pt1) br.spnt Kispd10
  59. ;;
  60. LEAF_EXIT(KiIpiSignalPacketDone)
  61. #endif