On 12/15/21 10:53 AM, Ard Biesheuvel wrote:
On Wed, 15 Dec 2021 at 18:46, Rebecca Cran <rebe...@nuviainc.com> wrote:
  #define ARM_CORE_MASK     ARM_CORE_AFF0
  #define ARM_CLUSTER_MASK  ARM_CORE_AFF1
-#define GET_CORE_ID(MpId)            ((MpId) & ARM_CORE_MASK)
-#define GET_CLUSTER_ID(MpId)         (((MpId) & ARM_CLUSTER_MASK) >> 8)
+#define GET_CORE_ID(MpId)           ((MpId) & ARM_CORE_MASK)
+#define GET_CLUSTER_ID(MpId)        (((MpId) & ARM_CLUSTER_MASK) >> 8)
  #define GET_MPID(ClusterId, CoreId)  (((ClusterId) << 8) | (CoreId))
-#define PRIMARY_CORE_ID  (PcdGet32(PcdArmPrimaryCore) & ARM_CORE_MASK)
+#define GET_MPIDR_AFF0(MpId)  ((MpId) & ARM_CORE_AFF0)
+#define GET_MPIDR_AFF1(MpId)  (((MpId) & ARM_CORE_AFF1) >> 8)
+#define GET_MPIDR_AFF2(MpId)  (((MpId) & ARM_CORE_AFF2) >> 16)
+#define GET_MPIDR_AFF3(MpId)  (((MpId) & ARM_CORE_AFF3) >> 32)
+#define PRIMARY_CORE_ID       (PcdGet32(PcdArmPrimaryCore) & ARM_CORE_MASK)

Any reason in particular for these whitespace changes? If not, please
omit them - reviewing changes in unfamiliar code is challenging enough
without having to figure out which hunks actually matter and which
ones don't.

Nope, that was a mistake I made when trying to integrate my changes following the Uncrustify work.

    // Find the core in the ArmCoreTable
    for (Index = 0; Index < ArmCoreCount; Index++) {
-    if ((ArmCoreInfoTable[Index].ClusterId == ClusterId) && 
(ArmCoreInfoTable[Index].CoreId == CoreId)) {
+    if ((GET_MPIDR_AFF1 (ArmCoreInfoTable[Index].Mpidr) == ClusterId) && 
(GET_MPIDR_AFF0 (ArmCoreInfoTable[Index].Mpidr) == CoreId)) {
Please rewrap overly long lines.


Will do.


--
Rebecca Cran



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#84934): https://edk2.groups.io/g/devel/message/84934
Mute This Topic: https://groups.io/mt/87749223/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to