From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) by mx.groups.io with SMTP id smtpd.web10.992.1639600384938804752 for ; Wed, 15 Dec 2021 12:33:05 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20210112.gappssmtp.com header.s=20210112 header.b=y8jzH6H9; spf=pass (domain: nuviainc.com, ip: 209.85.215.177, mailfrom: rebecca@nuviainc.com) Received: by mail-pg1-f177.google.com with SMTP id r5so21089740pgi.6 for ; Wed, 15 Dec 2021 12:33:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20210112.gappssmtp.com; s=20210112; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=894sUT3XiDoqfGk+Qbs+jZxvEgSaQKcnC/PakABYooE=; b=y8jzH6H9HhF/Pj8DG7WLBmzxK1KPeOYTkXjqS2/8a8ibZh6UOeTfP8OLV1x2lNobPm p29xi5BdF8Q6IjNt3rzUp7p+K3w3cpqqzPvU1ckfta27Qf3ACVZ8rKxozQyOLc6qO5nP oHwtqWiZqeTO8nlkYt4JLCwRoMkfxPv9wPfgPIhVSiApQ6KQPteNcJFUOdwvD2dgGMa/ wKUCwnXxwbCQdwGbRwQqS33XRBC7N7WCCnojqh2TkpFaPslOSVS00wotU8MIDn+gtOZr acpKsrjiTSt7Iqce3279uurEno8TgBZMpqUOS9lsfkdd1afm6EkaVizHe2KMYWaIc4gA /V4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=894sUT3XiDoqfGk+Qbs+jZxvEgSaQKcnC/PakABYooE=; b=FsxbC6zyfj7Xl48kGB/i9aNmIfwl3IWHSy8ImrsqW28nnIfIMFmr4OvJ+wzVqt5CZz T7QdhB0WxDF7EokXyvnXMEY1UJbqLy6LP6DmT5BlBkxwJt3mo7g4ppmIM+ZWjSIFhhGl 8e1quYFSradJHid2bSVBcQH1pApMdE6Ul5DTx5Eoha5j7WGNN4Tlp/OI2SG7LWYFVNI9 ioiBSrljrQKNGGVz8qW26nRUWYgnhOEMeTWpqGxEXtOvGKEyGe4qDrvzDhIqPeTEQTHs lmAKuaOsl0Cn9vazf9KDCMtym505+KyMFkdxEi9MR4lFp0pUl1ZzD/qjQQPfbFUdepgD sQCA== X-Gm-Message-State: AOAM531rIDZzWFIqzzfYLeKNJDhYJVwe7qhvMWVzTpRHbhH44go7h+Xo mDHGlU3gPyHUFRotUD6+7Duerg== X-Google-Smtp-Source: ABdhPJzNV4zNVb5p8qxsgRSNsoIiauFimLVf/9oI9Rmlf54jThlnNO2KbwUeulK4ciXlpSy9eIBdog== X-Received: by 2002:a63:81c3:: with SMTP id t186mr2430095pgd.150.1639600384491; Wed, 15 Dec 2021 12:33:04 -0800 (PST) Return-Path: Received: from ?IPv6:2601:681:4300:69e:9e7b:efff:fe2b:884c? ([2601:681:4300:69e:9e7b:efff:fe2b:884c]) by smtp.gmail.com with ESMTPSA id cx5sm2890505pjb.22.2021.12.15.12.33.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Dec 2021 12:33:04 -0800 (PST) Subject: Re: [PATCH v2 1/2] ArmPkg: Replace CoreId and ClusterId with Mpidr in ARM_CORE_INFO struct To: Ard Biesheuvel Cc: edk2-devel-groups-io , Ard Biesheuvel , Gerd Hoffmann , Samer El-Haj-Mahmoud , Leif Lindholm , Sami Mujawar References: <20211215174644.504-1-rebecca@nuviainc.com> <20211215174644.504-2-rebecca@nuviainc.com> From: "Rebecca Cran" Message-ID: Date: Wed, 15 Dec 2021 13:33:02 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US On 12/15/21 10:53 AM, Ard Biesheuvel wrote: > On Wed, 15 Dec 2021 at 18:46, Rebecca Cran 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