U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fs/erofs: Fix build for m68k
@ 2026-04-19 10:01 Daniel Palmer
  2026-04-25 16:12 ` Kuan-Wei Chiu
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Palmer @ 2026-04-19 10:01 UTC (permalink / raw)
  To: jnhuang95; +Cc: visitorckw, angelo, u-boot, Daniel Palmer

Currently the use of roundup() causes GCC to emit a reference
to __udivdi3() on m68k and we don't have that:

/usr/bin/m68k-linux-gnu-ld.bfd: fs/erofs/data.o: in function `erofs_map_blocks':
u-boot/fs/erofs/data.c:81:(.text.erofs_map_blocks+0x126): undefined reference to `__udivdi3'
/usr/bin/m68k-linux-gnu-ld.bfd: u-boot/fs/erofs/data.c:81:(.text.erofs_map_blocks+0x458): undefined reference to `__udivdi3'

We could add it but since unit is 4 or 8 we can actually just
switch the code to use round_up() instead and not output
__udivdi3() in the first place.

Signed-off-by: Daniel Palmer <daniel@thingy.jp>
---
 fs/erofs/data.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/erofs/data.c b/fs/erofs/data.c
index b58ec6fcc666..95873846f62d 100644
--- a/fs/erofs/data.c
+++ b/fs/erofs/data.c
@@ -78,7 +78,7 @@ int erofs_map_blocks(struct erofs_inode *inode,
 		unit = EROFS_BLOCK_MAP_ENTRY_SIZE;	/* block map */
 
 	chunknr = map->m_la >> vi->u.chunkbits;
-	pos = roundup(iloc(vi->nid) + vi->inode_isize +
+	pos = round_up(iloc(vi->nid) + vi->inode_isize +
 		      vi->xattr_isize, unit) + unit * chunknr;
 
 	err = erofs_blk_read(buf, erofs_blknr(pos), 1);
-- 
2.53.0


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

end of thread, other threads:[~2026-04-27  9:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-19 10:01 [PATCH] fs/erofs: Fix build for m68k Daniel Palmer
2026-04-25 16:12 ` Kuan-Wei Chiu
2026-04-27  9:40   ` Daniel Palmer

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