Leaked source code of windows server 2003
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.

75 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) st8.rel [t1] = r0 // clear target set
  39. add t5 = PbPacketBarrier, a0
  40. (pt0) br.ret.spnt brp
  41. ld8.nt1 v0 = [t1]
  42. ld8 t3 = [t0]
  43. ;;
  44. Kispd10:
  45. (pt0) YIELD
  46. mov ar.ccv = v0
  47. xor t4 = v0, t3
  48. ;;
  49. cmp.eq pt3, pt4 = 0, t4
  50. ;;
  51. (pt3) st8 [t1] = r0 // last processor clears target set
  52. mov t2 = v0
  53. (pt4) cmpxchg8.acq v0 = [t1], t4
  54. (pt3) st8.rel [t5] = r0 // last processor clears barrier
  55. (pt3) br.ret.spnt brp
  56. ;;
  57. cmp.ne pt0, pt2 = v0, t2
  58. (pt2) br.ret.sptk brp
  59. (pt0) br.spnt Kispd10
  60. ;;
  61. LEAF_EXIT(KiIpiSignalPacketDone)
  62. #endif