From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web09.5115.1612511895936364606 for ; Thu, 04 Feb 2021 23:58:16 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: ray.ni@intel.com) IronPort-SDR: ydKl4N+m4lmKjgACpmRb+n2U9zqHobbUJpYEwLyUGHFAOQzm0JadLTD5SVZe1fsXJCptvK4Ilw Iws2iDQQQLcw== X-IronPort-AV: E=McAfee;i="6000,8403,9885"; a="242902228" X-IronPort-AV: E=Sophos;i="5.81,154,1610438400"; d="scan'208";a="242902228" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2021 23:58:14 -0800 IronPort-SDR: 4kuFA1a3hKlOGK65Ol0NSKpaqWqQGUbmILzGOw4HFuhAzVm1sEHvWAfpFT2S9se5h8mppiGrHk xTpLwQh1asrQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,154,1610438400"; d="scan'208";a="434322736" Received: from ray-dev.ccr.corp.intel.com ([10.239.158.87]) by orsmga001.jf.intel.com with ESMTP; 04 Feb 2021 23:58:13 -0800 From: "Ni, Ray" To: devel@edk2.groups.io Subject: [PATCH v2 0/3] Use XADD to avoid lock acquire/release Date: Fri, 5 Feb 2021 15:58:07 +0800 Message-Id: <20210205075810.981-1-ray.ni@intel.com> X-Mailer: git-send-email 2.27.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Patch #1 follows Laszlo's suggestion to add global NASM macros=0D for NASM struc usage.=0D Patch #2 changes all hardcode offset to use struc.=0D Patch #3 doesn't have any change comparing to V1 except=0D 1). dword/qword prefix is added.=0D 2). the comments "program AP stack" is removed. Ray Ni (3): MdePkg/Nasm.inc: add macros for C types used in structure definition UefiCpuPkg/MpInitLib: Use NASM struc to avoid hardcode offset UefiCpuPkg/MpInitLib: Use XADD to avoid lock acquire/release MdePkg/Include/Ia32/Nasm.inc | 38 ++++++ MdePkg/Include/X64/Nasm.inc | 38 ++++++ UefiCpuPkg/Library/MpInitLib/DxeMpInitLib.inf | 5 +- UefiCpuPkg/Library/MpInitLib/Ia32/MpEqu.inc | 43 ------- .../Library/MpInitLib/Ia32/MpFuncs.nasm | 98 +++++++--------- UefiCpuPkg/Library/MpInitLib/MpEqu.inc | 99 ++++++++++++++++ UefiCpuPkg/Library/MpInitLib/MpLib.c | 1 - UefiCpuPkg/Library/MpInitLib/MpLib.h | 3 +- UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf | 5 +- UefiCpuPkg/Library/MpInitLib/X64/MpEqu.inc | 45 -------- UefiCpuPkg/Library/MpInitLib/X64/MpFuncs.nasm | 108 ++++++++---------- 11 files changed, 272 insertions(+), 211 deletions(-) delete mode 100644 UefiCpuPkg/Library/MpInitLib/Ia32/MpEqu.inc create mode 100644 UefiCpuPkg/Library/MpInitLib/MpEqu.inc delete mode 100644 UefiCpuPkg/Library/MpInitLib/X64/MpEqu.inc --=20 2.27.0.windows.1