]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg/CpuCacheInfoLib: Add QuickSort function on BaseLib
authorIanX Kuo <ianx.kuo@intel.com>
Sat, 16 Oct 2021 22:30:46 +0000 (06:30 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 21 Oct 2021 03:23:04 +0000 (03:23 +0000)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3675

Remove MdeModulePkg dependency

Cc: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Signed-off-by: IanX Kuo <ianx.kuo@intel.com>
UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c
UefiCpuPkg/Library/CpuCacheInfoLib/DxeCpuCacheInfoLib.inf
UefiCpuPkg/Library/CpuCacheInfoLib/InternalCpuCacheInfoLib.h
UefiCpuPkg/Library/CpuCacheInfoLib/PeiCpuCacheInfoLib.inf

index c0077d677000443652d23c31db8d146b09229e5b..f4fcee39e97ddc17d6b69c12d0dc1e9a9b3929a3 100644 (file)
@@ -282,6 +282,7 @@ CpuCacheInfoCollectCpuCacheInfoData (
   UINTN                     LocalCacheInfoCount;\r
   UINTN                     Index;\r
   UINTN                     NextIndex;\r
+  CPU_CACHE_INFO            SortBuffer;\r
 \r
   //\r
   // Get number of Packages and Package ID.\r
@@ -369,7 +370,7 @@ CpuCacheInfoCollectCpuCacheInfoData (
     //\r
     // Sort LocalCacheInfo array by CPU package ID, core type, cache level and cache type.\r
     //\r
-    PerformQuickSort (LocalCacheInfo, LocalCacheInfoCount, sizeof (*LocalCacheInfo), (SORT_COMPARE) CpuCacheInfoCompare);\r
+    QuickSort (LocalCacheInfo, LocalCacheInfoCount, sizeof (*LocalCacheInfo), CpuCacheInfoCompare, (VOID*) &SortBuffer);\r
     CopyMem (CacheInfo, LocalCacheInfo, sizeof (*CacheInfo) * LocalCacheInfoCount);\r
     DEBUG_CODE (\r
       CpuCacheInfoPrintCpuCacheInfoTable (CacheInfo, LocalCacheInfoCount);\r
index c3d3f1e799ccad946c4df7e85a0e0908d6d94e60..fdd79970f9ffad433264caf6da2ef2d0a1b7487b 100644 (file)
@@ -25,7 +25,6 @@
 \r
 [Packages]\r
   MdePkg/MdePkg.dec\r
-  MdeModulePkg/MdeModulePkg.dec\r
   UefiCpuPkg/UefiCpuPkg.dec\r
 \r
 [LibraryClasses]\r
@@ -34,7 +33,6 @@
   BaseMemoryLib\r
   MemoryAllocationLib\r
   UefiBootServicesTableLib\r
-  SortLib\r
 \r
 [Protocols]\r
   gEfiMpServiceProtocolGuid\r
index 26e1f46516de4e0d3e4ea4d4deab33e5d7f5c1a1..829a9f43ce49da4ff662148e12f0cd9311244917 100644 (file)
@@ -17,7 +17,6 @@
 #include <Library/DebugLib.h>\r
 #include <Library/BaseMemoryLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
-#include <Library/SortLib.h>\r
 #include <Library/CpuCacheInfoLib.h>\r
 \r
 typedef union {\r
index 0864497849e54437178246f0786b80c3f203886a..c643fc89bec4a9d79c735ec969cea4138dc2ac8b 100644 (file)
@@ -25,7 +25,6 @@
 \r
 [Packages]\r
   MdePkg/MdePkg.dec\r
-  MdeModulePkg/MdeModulePkg.dec\r
   UefiCpuPkg/UefiCpuPkg.dec\r
 \r
 [LibraryClasses]\r
@@ -34,7 +33,6 @@
   BaseMemoryLib\r
   MemoryAllocationLib\r
   PeiServicesTablePointerLib\r
-  SortLib\r
 \r
 [Ppis]\r
   gEdkiiPeiMpServices2PpiGuid\r