From: "Rebecca Cran" <rebecca@bsdio.com>
To: devel@edk2.groups.io, kuqin12@gmail.com, rebecca@quicinc.com,
Sami Mujawar <sami.mujawar@arm.com>,
Ard Biesheuvel <ardb+tianocore@kernel.org>,
Leif Lindholm <quic_llindhol@quicinc.com>,
Jian J Wang <jian.j.wang@intel.com>,
Liming Gao <gaoliming@byosoft.com.cn>,
Tiger Liu <TigerLiu@zhaoxin.com>
Subject: Re: [edk2-devel] [PATCH v4 2/3] ArmPkg: implement EFI_MP_SERVICES_PROTOCOL based on PSCI calls
Date: Mon, 16 Jan 2023 11:41:02 -0700 [thread overview]
Message-ID: <4a225b94-909b-a3ef-2487-c4b7edebbf9b@bsdio.com> (raw)
In-Reply-To: <d123595d-3fc3-adf2-ea87-b747694c90c5@gmail.com>
On 1/6/23 15:11, Kun Qin wrote:
> On 1/4/2023 7:37 AM, Rebecca Cran wrote:
>> + mCpuMpData.Timeout = TimeoutInMicroseconds;
>> + mCpuMpData.TimeTaken = 0;
>> + mCpuMpData.TimeoutActive = (BOOLEAN)(TimeoutInMicroseconds != 0);
>
> [KQ] Adding a timeout active flag is correct. However, I think each AP
> should have its own timeout related
> data (that is Timeout, TimeTaken and TimeoutActive). Because i.e. if
> this StartupThisAp call is used on AP 1 in
> a non-blocking mode, then a subsequent call on AP 2 is blocking, the
> common flag and timeout values will
> impact both cores, and create unintended timeout events.
Good catch! Thanks, I've fixed it by adding per-CPU fields for
StartupThisAP.
>> + if (mCpuMpData.TimeoutActive && (mCpuMpData.TimeTaken >
>> mCpuMpData.Timeout)) {
> [KQ] Similar to the other comment, this is probably better using a
> per-core data to track elapsed time.
> On a side note, if this timeout ever occurs, this core will never be
> usable in next StartupThisAp calls due
> to this AP state will not be set to Idle even if the AP procedure is
> complete. Is this the intended behavior?
No, it wasn't. I've added code to StartupThisAP and StartupAllAPs to
accept CpuStateFinished or reset CPUs in that state back to Idle.
--
Rebecca Cran
next prev parent reply other threads:[~2023-01-16 18:41 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-04 15:37 [PATCH v4 0/3] ArmPkg,MdeModulePkg: Implement EFI_MP_SERVICES_PROTOCOL for AArch64 and add an MpServicesTest application to exercise it Rebecca Cran
2023-01-04 15:37 ` [PATCH v4 1/3] ArmPkg: Add GET_MPIDR_AFFINITY_BITS and MPIDR_MT_BIT to ArmLib.h Rebecca Cran
2023-01-04 15:37 ` [PATCH v4 2/3] ArmPkg: implement EFI_MP_SERVICES_PROTOCOL based on PSCI calls Rebecca Cran
2023-01-06 22:11 ` [edk2-devel] " Kun Qin
2023-01-16 18:41 ` Rebecca Cran [this message]
[not found] ` <1737D7D0377487BE.3916@groups.io>
2023-01-06 22:16 ` Kun Qin
2023-01-13 2:01 ` Kun Qin
2023-01-16 19:06 ` Rebecca Cran
2023-01-16 18:45 ` Rebecca Cran
2023-01-04 15:37 ` [PATCH v4 3/3] MdeModulePkg: Add new Application/MpServicesTest application Rebecca Cran
2023-01-06 9:40 ` Ard Biesheuvel
2023-01-06 11:02 ` [edk2-devel] " Laszlo Ersek
2023-01-06 18:40 ` Rebecca Cran
2023-01-06 22:33 ` Kun Qin
2023-01-08 4:56 ` Rebecca Cran
2023-01-09 1:32 ` Ni, Ray
2023-01-09 14:25 ` Rebecca Cran
2023-01-09 17:12 ` Ard Biesheuvel
2023-01-10 1:08 ` Ni, Ray
2023-01-15 1:02 ` Rebecca Cran
2023-01-07 22:19 ` Laszlo Ersek
2023-01-05 17:39 ` [PATCH v4 0/3] ArmPkg,MdeModulePkg: Implement EFI_MP_SERVICES_PROTOCOL for AArch64 and add an MpServicesTest application to exercise it Ard Biesheuvel
2023-01-05 17:59 ` Ard Biesheuvel
2023-01-06 5:11 ` [edk2-devel] " Kun Qin
2023-01-06 18:42 ` Rebecca Cran
2023-01-06 19:56 ` Kun Qin
2023-01-08 3:55 ` Rebecca Cran
2023-01-11 16:41 ` [edk2-devel] " Patrik Berglund
2023-01-11 22:54 ` Rebecca Cran
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4a225b94-909b-a3ef-2487-c4b7edebbf9b@bsdio.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox