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

Michael Roth mdroth at linux.vnet.ibm.com
Thu Mar 2 15:42:13 AEDT 2017


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...

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
0 > 0 0 umax .  0  ok
0 > 0 1 umax .  1  ok
0 > 1 0 umax .  1  ok
0 > 1 1 umax .  1  ok
0 > 70000000 70000000 umax .  70000000  ok
0 > 70000000 80000000 umax .  80000000  ok
0 > 80000000 70000000 umax .  80000000  ok
0 > 80000000 80000000 umax .  80000000  ok
0 > 7000000000000000 7000000000000000 umax .  7000000000000000  ok
0 > 7000000000000000 8000000000000000 umax .  -8000000000000000  ok
0 > 8000000000000000 7000000000000000 umax .  -8000000000000000  ok
0 > 8000000000000000 8000000000000000 umax .  -8000000000000000  ok
0 > ffffffffffffffff fffffffffffffffe umax .  -1  ok
0 > fffffffffffffffe ffffffffffffffff umax .  -1  ok

> 
> 
> Segher
> 



More information about the SLOF mailing list