From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Heyi Guo <heyi.guo@linaro.org>
Cc: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
Yi Li <phoenix.liyi@huawei.com>,
Leif Lindholm <leif.lindholm@linaro.org>,
Marc Zyngier <marc.zyngier@arm.com>
Subject: Re: [PATCH v3 1/1] ArmPkg/TimerDxe: Add ISB for timer compare value reload
Date: Thu, 15 Mar 2018 08:08:58 +0000 [thread overview]
Message-ID: <CAKv+Gu9TH6dsXN2-9+CdjW5UpCRoKxwRfksrKJAVVYj4pvaBLA@mail.gmail.com> (raw)
In-Reply-To: <1521098263-52823-2-git-send-email-heyi.guo@linaro.org>
On 15 March 2018 at 07:17, Heyi Guo <heyi.guo@linaro.org> wrote:
> If timer interrupt is level sensitive, reloading timer compare
> register has a side effect of clearing GIC pending status, so a "ISB"
> is needed to make sure this instruction is executed before enabling
> CPU IRQ, or else we may get spurious timer interrupts.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
> Signed-off-by: Yi Li <phoenix.liyi@huawei.com>
> Acked-by: Marc Zyngier <marc.zyngier@arm.com>
> Cc: Leif Lindholm <leif.lindholm@linaro.org>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Pushed as ac9b530e6b47
Thanks
> ---
>
> Notes:
> v3:
> - Move ISB after enabling timer [Marc]
>
> v2:
> - Use ISB instead of DSB [Marc]
> - Update commit message accordingly.
>
> ArmPkg/Drivers/TimerDxe/TimerDxe.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/ArmPkg/Drivers/TimerDxe/TimerDxe.c b/ArmPkg/Drivers/TimerDxe/TimerDxe.c
> index 33d7c922221f..a3202fa056f3 100644
> --- a/ArmPkg/Drivers/TimerDxe/TimerDxe.c
> +++ b/ArmPkg/Drivers/TimerDxe/TimerDxe.c
> @@ -338,6 +338,7 @@ TimerInterruptHandler (
> // Set next compare value
> ArmGenericTimerSetCompareVal (CompareValue);
> ArmGenericTimerEnableTimer ();
> + ArmInstructionSynchronizationBarrier ();
> }
>
> gBS->RestoreTPL (OriginalTPL);
> --
> 2.7.4
>
prev parent reply other threads:[~2018-03-15 8:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-15 7:17 [PATCH v3 0/1] ArmPkg/TimerDxe: Add ISB for timer compare value reload Heyi Guo
2018-03-15 7:17 ` [PATCH v3 1/1] " Heyi Guo
2018-03-15 8:08 ` Ard Biesheuvel [this message]
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=CAKv+Gu9TH6dsXN2-9+CdjW5UpCRoKxwRfksrKJAVVYj4pvaBLA@mail.gmail.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