Thread (14 messages) 14 messages, 5 authors, 2019-01-23

Re: [PATCH 2/4] powerpc/64s: Add slb_full_bitmap rather than hard-coding U32_MAX

flat view

From: Segher Boessenkool <hidden>
Date: 2019-01-18 23:14:33

On Fri, Jan 18, 2019 at 11:28:24PM +1100, Michael Ellerman wrote:
Segher Boessenkool [off-list ref] writes:
quoted
On Thu, Jan 17, 2019 at 11:13:26PM +1100, Michael Ellerman wrote:
quoted
The recent rewrite of the SLB code into C included the assumption that
all CPUs we run on have at least 32 SLB entries. This is currently
true but a bit fragile as the SLB size is actually defined by the
device tree and so could theoretically change at any time.
It also is guaranteed by the architecture, since at least 2.02, FWIW.
True. Actually 2.00 says at least 32.

Unfortunately we don't live in a world where "the architecture
guarantees it" has any bearing on reality :)
It's a pretty strong hint.  I don't remember any hardware where it is not
true, either.  (That might be selective memory ;-) )
But given it *should* always be at least 32 maybe I should optimise for
that case. We could use a static key to skip the U32_MAX comparison and
go down the else path.
Ah that sounds like a good idea :-)


Segher
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help