From: Sascha Hauer <s.hauer@pengutronix.de>
To: Stefan Kerkmann <s.kerkmann@pengutronix.de>
Cc: BAREBOX <barebox@lists.infradead.org>
Subject: Re: [PATCH 3/3] pbl: introduce HAS_PBL_CLOCKSOURCE marker
Date: Wed, 22 Jan 2025 09:12:17 +0100 [thread overview]
Message-ID: <Z5CoYXwjw7-rDYqJ@pengutronix.de> (raw)
In-Reply-To: <20250121-feature-pbl-get-time-ns-v1-3-c3d493397846@pengutronix.de>
On Tue, Jan 21, 2025 at 05:49:28PM +0100, Stefan Kerkmann wrote:
> This finally enables the usage of the polled timeout functions in the
> barebox pbl with real timeouts for supported architectures. Currently
> only ARMv7 and ARMv8 are enabled.
>
> Signed-off-by: Stefan Kerkmann <s.kerkmann@pengutronix.de>
> ---
> arch/arm/cpu/Kconfig | 2 ++
> arch/arm/lib32/Makefile | 2 +-
> include/linux/iopoll.h | 8 ++++----
> pbl/Kconfig | 3 +++
> 4 files changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/cpu/Kconfig b/arch/arm/cpu/Kconfig
> index 84fe770b6da892723528eeea89ae2b0eda122d07..3569f3d3483a6289d7a6eca3d1715e06144df8d4 100644
> --- a/arch/arm/cpu/Kconfig
> +++ b/arch/arm/cpu/Kconfig
> @@ -84,6 +84,7 @@ config CPU_V6
> config CPU_V7
> bool
> select CPU_32v7
> + select HAS_PBL_CLOCKSOURCE
Having ARMv7 support enabled doesn't necessarily mean that you are
running on ARMv7.
If you want to got this path then you have to provide a get_time_ns()
symbol for all Arm architetures and decide during runtime if you can use
the architected timer.
Alternatively playing tricks like this might work:
select HAS_PBL_CLOCKSOURCE if !CPU_32v4T && !CPU_32v5 && !CPU_32v6
(Although this of course gives you timer functionality only when all non
v7 architectures are disabled.
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2025-01-22 8:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-21 16:49 [PATCH 0/3] PBL: enable timeouts in read_poll_timeout macros Stefan Kerkmann
2025-01-21 16:49 ` [PATCH 1/3] ARM64: lib64: pbl: implement get_time_ns and is_timeout Stefan Kerkmann
2025-01-21 16:49 ` [PATCH 2/3] ARM: lib32: " Stefan Kerkmann
2025-01-21 16:49 ` [PATCH 3/3] pbl: introduce HAS_PBL_CLOCKSOURCE marker Stefan Kerkmann
2025-01-22 8:12 ` Sascha Hauer [this message]
2025-01-22 9:07 ` Ahmad Fatoum
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=Z5CoYXwjw7-rDYqJ@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=s.kerkmann@pengutronix.de \
/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