Avoid 64-bit divisions that need __udivdi3() or __umoddi3()
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 9 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | fs: btrfs: Avoid a 64-bit modulo in __btrfs_devread()fs/ | +1 | 1 reply | |
| 2/6 | fs/squashfs: Avoid 64-bit divisionsfs/ fs/ | +14 | 0 replies | |
| 3/6 | mmc: Use div_u64() in mmc_berase()drivers/ | +1 | 1 reply | |
| 4/6 | powerpc: mpc8xxx: Avoid a 64-bit division in get_win_cnt()arch/ | +1 | 1 reply | |
| 5/6 | fs: btrfs: Remove the unused dev.cfs/ fs/ | +1 | 3 replies | |
| 6/6 | fs: btrfs: Avoid the remaining 64-bit divisionsfs/ fs/ fs/ | +17 | 1 reply |
Reviews trailers per patch
5 of 6 patches have a Reviewed-by or Acked-by.
| Patch | Bradley Morgan | Qu Wenruo | Peng Fan |
|---|---|---|---|
| 1/6 | R-b | ||
| 2/6 | |||
| 3/6 | R-b | ||
| 4/6 | A-b | ||
| 5/6 | R-b | ||
| 6/6 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH 0/6] Avoid 64-bit divisions that need __udivdi3() or __umoddi3()
U-Boot's private libgcc does not provide __udivdi3() and __umoddi3(). v3 of the mpc85xx LTO series links mpc85xx LTO builds with it and added both routines [1]. Christophe Leroy asked why the callers do not avoid '/' and '%' on 64-bit operands instead, and Tom Rini asked to update the common code [2].
Patches 1-4 avoid the divisions that make the mpc85xx LTO builds call __udivdi3() or __umoddi3(), in btrfs, squashfs, mmc_berase() and get_win_cnt() of the mpc8xxx PAMU code. They do not depend on each other. Patch 5 removes fs/btrfs/dev.c, which nothing uses and which holds another 64-bit modulo. Patch 6 converts the remaining divisions in btrfs. U-Boot never runs them, but builds without LTO still link the ones in the RAID5/6 code. My reply in that thread announced these conversions for v4 of the LTO series. They are sent on their own instead.
Patch 2 and my big-endian fix for squashfs [3] conflict in sqfs_read_nest(). I will rebase whichever of them goes in second.
Build tested with a buildman world build on a fork's CI, and sandbox test.py gives the same results as before. Run tested on qemu-ppce500 (btrfs) and qemu_arm (btrfs, squashfs, mmc erase), and on a Turris 1.1 with the mpc85xx LTO patches on top, which boots from an SD card and loads files from btrfs. The PAMU change is build tested only.
[1] https://lore.kernel.org/u-boot/[email protected]/
[2] https://lore.kernel.org/u-boot/20261119200924.GB3176972@bill-the-cat/
[3] https://lore.kernel.org/u-boot/[email protected]/
Josef Schlehofer (6):
fs: btrfs: Avoid a 64-bit modulo in __btrfs_devread() fs/squashfs: Avoid 64-bit divisions
mmc: Use div_u64() in mmc_berase()
powerpc: mpc8xxx: Avoid a 64-bit division in get_win_cnt()
fs: btrfs: Remove the unused dev.c
fs: btrfs: Avoid the remaining 64-bit divisions
arch/powerpc/cpu/mpc8xxx/fsl_pamu.c | 2 +- drivers/mmc/mmc_write.c | 2 +- fs/btrfs/Makefile | 2 +- fs/btrfs/compat.h | 8 ++------ fs/btrfs/dev.c | 25 ------------------------- fs/btrfs/volumes.c | 19 +++++++++++-------- fs/btrfs/volumes.h | 9 +++++---- fs/squashfs/sqfs.c | 21 +++++++++++---------- fs/squashfs/sqfs_inode.c | 5 +++-- 9 files changed, 35 insertions(+), 58 deletions(-) delete mode 100644 fs/btrfs/dev.c
base-commit: 79497816056122c49b3b135e14cbac59374e636c
Signature · 1 line
2.54.0 (Apple Git-157)