linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Min Lee <hn.min.lee@gmail.com>
To: suzuki.poulose@arm.com
Cc: catalin.marinas@arm.com, will@kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: wfi and wfe redundancy
Date: Mon, 10 Oct 2022 13:34:45 +0900	[thread overview]
Message-ID: <20221010043445.GA40921@min-iamroot> (raw)

Hi Suzuki,

I am writing to ask you whether the code you wrote is including redundancy or not.
The commit is https://github.com/iamroot19/linux/commit/bb9052744f4b7ae11d0061ac9492dd2949981b49.
wfi has been added in __no_granule_support function through your commit. Thus, there are wfe and also wfi.
The function saves an error code into one of the memory spaces, then falls into an infinite loop. In the loop, wfe and wfi are used to save power.
There is no possibility that generates an event on the sequence, so wfe is enough to keep the core asleep. I think that's why the previous code used only wfe.
Interrupts can also wake up the core that is sleeping by wfe, but this is also not enough to explain why wfi is needed because only one, wfe or wfi, is needed for saving power.
Would you please tell me why both wfe and wfi are needed?

Best,
Min

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

                 reply	other threads:[~2022-10-10  4:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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-all 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=20221010043445.GA40921@min-iamroot \
    --to=hn.min.lee@gmail.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=suzuki.poulose@arm.com \
    --cc=will@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).