bootm: Clean up arch-specific, pre-OS clean-up
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest17 patches 6 repliesIn review
- v317 patches 4 repliesSuperseded
- v2 posting 2/29 patches 10 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 posting 1/2 | 0 of 9 patches | 0 replies | Superseded | |
| v1 | 10 patches | 29 replies | Superseded |
Changes in v4 from the cover letter
- Drop announce_and_cleanup() in arm and riscv
- Drop announce_and_cleanup(), inline the two calls
- Pass flag directly instead of using BOOTM_FINAL_FAKE
- Print '(fake run for tracing)' when flag is set
- Use BOOTM_STATE_OS_FAKE_GO instead of new enum bootm_final_t
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/17 | dm: Move flags_remove() check before child removaldrivers/ | +12 | 0 replies | |
| 2/17 | dm: Remove children when parent is removed by flagsdrivers/ | +10 | 0 replies | |
| 3/17 | bootstage: Add some missing dummy functionsinclude/ | +8 | 0 replies | |
| 4/17 | bootm: Create bootm_final() for pre-boot cleanupboot/ include/ | +32 | 1 reply | |
| 5/17 | x86: Call bootm_final()arch/ | +1 | 0 replies | |
| 6/17 | riscv: Call bootm_final()arch/ arch/ boot/ | +5 | 1 reply | |
| 7/17 | bootm: Stash bootstage data in bootm_final()boot/ | +1 | 0 replies | |
| 8/17 | arm: Call bootm_final()arch/ | +6 | 1 reply | |
| 9/17 | arc: Call bootm_final()arch/ | +2 | 0 replies | |
| 10/17 | microblaze: Call bootm_final()arch/ | +2 | 0 replies | |
| 11/17 | mips: Call bootm_final()arch/ | +1 | 1 reply | |
| 12/17 | powerpc: Call bootm_final()arch/ | +1 | 0 replies | |
| 13/17 | m68k: Call bootm_final()arch/ | +2 | 1 reply | |
| 14/17 | nios2: Call bootm_final()arch/ | +2 | 0 replies | |
| 15/17 | sh: Call bootm_final()arch/ | +2 | 0 replies | |
| 16/17 | xtensa: Call bootm_final()arch/ | +2 | 0 replies | |
| 17/17 | sandbox: Call bootm_final()arch/ | +1 | 0 replies |
Reviews trailers per patch
7 of 17 patches have a Reviewed-by or Acked-by.
| Patch | Tom Rini | Angelo Dureghello | Daniel Schwierzeck | Kuan-Wei Chiu |
|---|---|---|---|---|
| 1/17 | ||||
| 2/17 | ||||
| 3/17 | R-b | |||
| 4/17 | R-b | |||
| 5/17 | ||||
| 6/17 | R-b | |||
| 7/17 | R-b | |||
| 8/17 | R-b | |||
| 9/17 | ||||
| 10/17 | ||||
| 11/17 | R-b | |||
| 12/17 | ||||
| 13/17 | A-b T-b | A-b | ||
| 14/17 | ||||
| 15/17 | ||||
| 16/17 | ||||
| 17/17 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH v4 00/17] bootm: Clean up arch-specific, pre-OS clean-up
Each arch does something slightly different before booting the OS. Some archs even do different things depending on the CPU type.
It is quite hard to know what actually happens in the final milliseconds before the OS boot.
This series attempts to start cleaning up U-Boot in this area.
The basic intent is to create a new bootm_final() function which can be called by all archs. It provides some flags for a couple of necessary variations but otherwise it is generic.
All architectures are converted over to use this new function.
board_quiesce_devices() is moved into bootm_final() so that all archs benefit from it.
This series fixes a bug in device_remove() is fixed where removing a parent with specialised flags (e.g. DM_REMOVE_ACTIVE_ALL) could leave children activated, since they do not match the flags. This fixes is needed to avoid bootm_final() causing test failures on sandbox.
Future work could take this a little further:
- Convert EFI loader to use the same function
- Improve comments for cleanup_before_linux() across architectures
- Support fake-run tracing on all archs
Changes in v4:
- Drop announce_and_cleanup() in arm and riscv
- Drop announce_and_cleanup(), inline the two calls
- Pass flag directly instead of using BOOTM_FINAL_FAKE
- Print '(fake run for tracing)' when flag is set
- Use BOOTM_STATE_OS_FAKE_GO instead of new enum bootm_final_t
Changes in v3:
- Add dm: device_remove() fix for child removal with specialised flags
- Add new patch for ARC conversion
- Add new patch for ARM conversion (requested by Tom)
- Add new patch for MIPS conversion
- Add new patch for MicroBlaze conversion
- Add new patch for Nios2 conversion
- Add new patch for PowerPC conversion
- Add new patch for SH conversion
- Add new patch for Xtensa conversion
- Add new patch for bootstage stashing, needed for ARM conversion
- Add new patch for m68k conversion
- Add new patch for sandbox conversion
- Convert all remaining architectures
- Drop cleanup_before_linux() patch
- Drop the DMA comment move (now in the introductory patch)
- Drop udc_disconnect()
- Fix "the a" typo
- Introduce with all common functionality (not empty)
- Move board_quiesce_devices() into bootm_final() instead of dropping it
- Move bootstage dummies earlier in the series
- Move earlier in the series so bootm_final() can use bootstage from the start
- Put bootm_final() in bootm.c instead of a separate file
- Put in bootm.c instead of a separate file
- Squash in patches 2, 3 and 5 from v2
- Squash introductory patches so bootm_final() is introduced non-empty
- Squash with the previous riscv patches
- Update cover letter to match current series
Changes in v2:
- Drop patch 'efi: Drop EFI_GRUB_ARM32_WORKAROUND'
- Update cover message to reflect dropping the EFI patches, etc.
Simon Glass (17):
dm: Move flags_remove() check before child removal
dm: Remove children when parent is removed by flags
bootstage: Add some missing dummy functions
bootm: Create bootm_final() for pre-boot cleanup
x86: Call bootm_final()
riscv: Call bootm_final()
bootm: Stash bootstage data in bootm_final()
arm: Call bootm_final()
arc: Call bootm_final()
microblaze: Call bootm_final()
mips: Call bootm_final()
powerpc: Call bootm_final()
m68k: Call bootm_final()
nios2: Call bootm_final()
sh: Call bootm_final()
xtensa: Call bootm_final()
sandbox: Call bootm_final()
arch/arc/lib/bootm.c | 8 ++--- arch/arm/lib/bootm.c | 50 ++++----------------------- arch/m68k/lib/bootm.c | 2 ++ arch/microblaze/lib/bootm.c | 8 ++--- arch/mips/lib/bootm.c | 7 +--- arch/nios2/lib/bootm.c | 2 ++ arch/powerpc/lib/bootm.c | 7 +--- arch/riscv/include/asm/u-boot-riscv.h | 1 - arch/riscv/lib/bootm.c | 39 ++------------------- arch/sandbox/lib/bootm.c | 1 + arch/sh/lib/bootm.c | 2 ++ arch/x86/lib/bootm.c | 14 +------- arch/xtensa/lib/bootm.c | 2 ++ boot/bootm.c | 25 ++++++++++++++ drivers/core/device-remove.c | 34 +++++++++++------- include/bootm.h | 10 ++++++ include/bootstage.h | 8 +++++ 17 files changed, 90 insertions(+), 130 deletions(-)
Signature · 4 lines
2.43.0 base-commit: c0ca147ac6228949a6d6497531c9f2f4a0dc6c67 branch: bootma-us4