]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg/BaseSynchronizationLib: spin lock alignment is 32 at least
authorJeff Fan <jeff.fan@intel.com>
Tue, 12 Jul 2016 03:10:27 +0000 (11:10 +0800)
committerJeff Fan <jeff.fan@intel.com>
Thu, 14 Jul 2016 01:52:39 +0000 (09:52 +0800)
Some processor may return small cache line size, we should return 32 bytes at
least for spin lock alignment.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
MdePkg/Library/BaseSynchronizationLib/Ia32/InternalGetSpinLockProperties.c

index 49f05fb18a1ef47ea17ecb912fb920c8ca2a46cb..60f5c7f36bc22628b8ce834a377a4d69949544cb 100644 (file)
@@ -55,6 +55,10 @@ InternalGetSpinLockProperties (
     }\r
   }\r
 \r
+  if (CacheLineSize < 32) {\r
+    CacheLineSize = 32;\r
+  }\r
+\r
   return CacheLineSize;\r
 }\r
 \r