Patch #1 follows Mike's suggestion to use XADD to avoid lock acquire/release. Patch #2 follows Laszlo's suggestion to add global NASM macros for NASM struc usage. Patch #3 simply remves all hardcode offset in NASM without changing any logic. Patch #4 removes the dead code.
The final code is the same as that of V2.
Ray Ni (4): UefiCpuPkg/MpInitLib: Use XADD to avoid lock acquire/release MdePkg/Nasm.inc: add macros for C types used in structure definition UefiCpuPkg/MpInitLib: Use NASM struc to avoid hardcode offset UefiCpuPkg/MpInitLib: Remove unused Lock from MP_CPU_EXCHANGE_INFO