Subject: Re: boot code bloat with 64bit sector numbers
To: David Laight <>
From: Leo Weppelman <>
List: tech-kern
Date: 04/09/2003 21:53:30
On Wed, Apr 09, 2003 at 05:25:35PM +0100, David Laight wrote:
> When I try to compile some of the boot code with a 64bit daddr_t
> I find that it exceeds the available space.

Funny, this was on my todo list fpr tonight too... I stubled about the
__moddi3 + __qdivrem using 96+1028 bytes. With the total bootcode size
limit being +/- 6600 bytes this is not really acceptable.

> This can be rectified by ensuring that nothing calls the 64bit
> divide routine (which is over 1k on x86) - probably larger on
> other architectures.

Same for m68k/Atari!

> The only place it seems to be used is in the filesystem code where
> it works out which of the indirect blocks needs to be inspected.
> For ufs the divide/remainder can definitely be replaced by a shift/mask
> (see diff below).

I'm going to try it out. Thanks!