[PATCH] powerpc: Set cache info defaults
Michael Ellerman
michael at ellerman.id.au
Fri Dec 9 12:57:20 EST 2005
On Thu, 8 Dec 2005 19:40, Olof Johansson wrote:
> Cache info is setup by walking the device tree in initialize_cache_info().
> However, icache_flush_range might be called before that, in
> slb_initialize()->patch_slb_encoding, which modifies the load immediate
> instructions used with SLB fault code.
>
> Not only that, but depending on memory layout, we might take SLB faults
> during unflatten_device_tree. So that fault will load an SLB entry that
> might not contain the right LLP flags for the segment.
>
> Either we can walk the flattened device tree to setup cache info, or
> we can pick the known defaults that are known to work. Doing it in the
> flattened device tree is hairier since we need to know the machine type
> to know what property to look for, etc, etc.
>
> For now, it's just easier to go with the defaults. Worst thing that
> happens from it is that we might waste a few cycles doing too small
> dcbst/icbi increments.
This is cool.
I had to hand-code the sync in one of my kdump patches exactly because it was
too early to call flush_icache_range(). And I got it wrong the first time :P
cheers
--
Michael Ellerman
IBM OzLabs
email: michael:ellerman.id.au
inmsg: mpe:jabber.org
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20051208/81dd418c/attachment.pgp
More information about the Linuxppc64-dev
mailing list