MdePkg/BaseSynchronizationLib: spin lock alignment is 32 at least

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>
This commit is contained in:
Jeff Fan 2016-07-12 11:10:27 +08:00
parent 01beffa7e9
commit 52f5bd2669
1 changed files with 4 additions and 0 deletions

View File

@ -55,6 +55,10 @@ InternalGetSpinLockProperties (
}
}
if (CacheLineSize < 32) {
CacheLineSize = 32;
}
return CacheLineSize;
}