[SLOF] [PATCH] pci: force minimum mem bar alignment of 64K for board-qemu

Segher Boessenkool segher at kernel.crashing.org
Thu Mar 2 20:24:24 AEDT 2017


On Wed, Mar 01, 2017 at 10:42:13PM -0600, Michael Roth wrote:
> Quoting Segher Boessenkool (2017-02-28 19:23:18)
> > On Tue, Feb 28, 2017 at 06:58:15PM -0600, Michael Roth wrote:
> > > +: assign-var-min-align ( size var min-align -- al-mem )
> > > +        swap >r                         \ ( size min-align )
> > > +        over                            \ ( size min-align size )
> > > +        max                             \ ( size align )
> > 
> > Why did you change the UMAX to MAX ?  They are not the same.  Sizes
> > (and alignments) are unsigned numbers.
> 
> umax wasn't defined in the SLOF environment, and with 64-bit signed values
> it didn't seem likely that min-align/size would overflow. But yah,
> that's a bit sloppy...

Yeah exactly :-)

> Does the following umax implementation seem reasonable?
> 
> 0 > : same-sign 0< swap 0< = ;   ok
> 0 > : umax 2dup same-sign IF max ELSE dup 0< IF swap THEN drop THEN ; ok

Well you can just use  u<  of course.

We have (in engine.in)

: max  2dup < IF swap THEN drop ;

so analogous you get

: umax  2dup u< IF swap THEN drop ;

Cheers,


Segher


More information about the SLOF mailing list