mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH v3 0/8] PBL: enable timeouts in read_poll_timeout macros
@ 2026-08-17 14:01 Stefan Kerkmann
  2026-08-17 14:01 ` [PATCH v3 1/8] RISC-V: setup_c: avoid clearing BSS twice Stefan Kerkmann
                   ` (8 more replies)
  0 siblings, 9 replies; 19+ messages in thread
From: Stefan Kerkmann @ 2026-08-17 14:01 UTC (permalink / raw)
  To: Sascha Hauer, open list:BAREBOX; +Cc: Stefan Kerkmann

Without a time source the read_poll_timeout functions will deadlock in
the PBL if the break condition is never met. This series introduces the
necessary timing functions in the PBL for arches/socs implementing
PBL_CLOCKSOURCE, which is every ARMv8 SoC as they implement an
architected timer and selected ARMv7 SoCs.

Signed-off-by: Stefan Kerkmann <s.kerkmann@pengutronix.de>
---
Changes in v3:
- Added PBL constructor support for ARM/ARM64/RISC-V
- Changed the implementation to PBL_CLOCKSOURCE
- Link to v2: https://patch.msgid.link/20260811-feature-pbl-get-time-ns-v2-0-754ee021b19d@pengutronix.de

Changes in v2:
- Strictly guard the pbl timer support on 32bit ARM for ARMv7 only builds
- Link to v1: https://lore.kernel.org/r/20250121-feature-pbl-get-time-ns-v1-0-c3d493397846@pengutronix.de

To: Sascha Hauer <s.hauer@pengutronix.de>
To: "open list:BAREBOX" <barebox@lists.infradead.org>

---
Stefan Kerkmann (8):
      RISC-V: setup_c: avoid clearing BSS twice
      ARM/ARM64/RISC-V: pbl: add constructor support
      clocksource: allow re-init for same clock
      drivers: arm_architected_timer: refactor for pbl compatibility
      ARM: layerscape: re-init pbl clocksource
      ARM: socfpga: agilex5: re-init pbl clocksource
      ARM64: enable PBL_CLOCKSOURCE compatibility
      linux/iopoll: enable polled timeouts for PBL_CLOCKSOURCE

 arch/arm/cpu/setupc_32.S                           |  3 +++
 arch/arm/cpu/setupc_64.S                           |  3 +++
 .../include/asm/hardware/arm_architected_timer.h   | 21 +++++++++++++++++++
 arch/arm/lib/pbl.lds.S                             |  8 ++++++++
 arch/arm/lib64/Makefile                            |  3 ++-
 arch/arm/lib64/clocksource.c                       | 10 +++++++++
 arch/arm/lib64/delay.c                             | 19 -----------------
 arch/arm/mach-layerscape/lowlevel-ls1028a.c        |  6 +++++-
 arch/arm/mach-layerscape/lowlevel-ls1046a.c        |  5 ++++-
 arch/arm/mach-socfpga/agilex5-clock-manager.c      |  7 +++----
 arch/riscv/lib/pbl.lds.S                           |  9 ++++++++
 arch/riscv/lib/setupc.S                            | 22 +++++++++++++++++++-
 common/clock.c                                     |  3 ++-
 drivers/clocksource/Kconfig                        |  1 +
 drivers/clocksource/Makefile                       |  2 +-
 drivers/clocksource/arm_architected_timer.c        | 24 ++++++++++++++--------
 include/asm-generic/sections.h                     |  2 ++
 include/linux/iopoll.h                             |  6 +++---
 pbl/Makefile                                       |  1 +
 pbl/ctors.c                                        | 13 ++++++++++++
 20 files changed, 128 insertions(+), 40 deletions(-)
---
base-commit: 3317ac1baff3b0226caba7f83f3da61bc407343a
change-id: 20250121-feature-pbl-get-time-ns-6d9e8874d582

Best regards,
--  
Stefan Kerkmann <s.kerkmann@pengutronix.de>




^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2026-08-20  8:08 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-17 14:01 [PATCH v3 0/8] PBL: enable timeouts in read_poll_timeout macros Stefan Kerkmann
2026-08-17 14:01 ` [PATCH v3 1/8] RISC-V: setup_c: avoid clearing BSS twice Stefan Kerkmann
2026-08-17 14:01 ` [PATCH v3 2/8] ARM/ARM64/RISC-V: pbl: add constructor support Stefan Kerkmann
2026-08-18 12:08   ` [PATCH] amend! " Stefan Kerkmann
2026-08-19  9:39   ` [PATCH v3 2/8] " Sascha Hauer
2026-08-17 14:01 ` [PATCH v3 3/8] clocksource: allow re-init for same clock Stefan Kerkmann
2026-08-17 14:01 ` [PATCH v3 4/8] drivers: arm_architected_timer: refactor for pbl compatibility Stefan Kerkmann
2026-08-20  7:04   ` Sascha Hauer
2026-08-20  7:32     ` Stefan Kerkmann
2026-08-20  8:00       ` Sascha Hauer
2026-08-20  8:07         ` Stefan Kerkmann
2026-08-17 14:01 ` [PATCH v3 5/8] ARM: layerscape: re-init pbl clocksource Stefan Kerkmann
2026-08-17 15:42   ` Ahmad Fatoum
2026-08-20  6:59   ` Sascha Hauer
2026-08-20  8:06     ` Stefan Kerkmann
2026-08-17 14:01 ` [PATCH v3 6/8] ARM: socfpga: agilex5: " Stefan Kerkmann
2026-08-17 14:01 ` [PATCH v3 7/8] ARM64: enable PBL_CLOCKSOURCE compatibility Stefan Kerkmann
2026-08-17 14:01 ` [PATCH v3 8/8] linux/iopoll: enable polled timeouts for PBL_CLOCKSOURCE Stefan Kerkmann
2026-08-19  7:03 ` [PATCH v3 0/8] PBL: enable timeouts in read_poll_timeout macros Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox