AW: Re: __setup_cpu_be problem

Arnd Bergmann arnd at arndb.de
Sun Feb 12 15:52:25 EST 2006


On Friday 10 February 2006 05:35, Benjamin Herrenschmidt wrote:
> 
> > Doing it in the firmware sounds like the right solution to me.
> > I would however not want to do that if the current firmware
> > sets the wrong page sizes.
> > 
> > I know that Hartmut wanted me to provide him with the right device
> > tree information that he needs to create to say that the page
> > size are 16M, 64k and 4k. Maybe we can find a combined solution
> > for these problems. Using __setup_cpu_power4 should be ok.
> 
> I don't completely understand your statement ... sorry

The current firmware on the Cell blades does neither the setup of
the HID6 register nor have the correct tables in the device tree.

Since I'm still currently sitting in a garden in NZ instead of the
Böblingen lab, I can't find out what the HID6 power-on defaults
are. We might get away with just leaving the default there, but that
might prevent us from using 16M and/or 64k pages and there are 
definitely some application which depend on 16M hugetlb mappings
on Cell. 

The two problems we are facing currently are:
- If HID6 defaults to disabling 16M large pages, the kernel will
  get the wrong information from the CPU features and applications
  that use it break. The firmware should add the setup if HID6
  _now_, but we also should be prepared for users of old firmware
  that want to upgrade their kernel without upgrading the firmware
  at the same time.
- We want to use 64k pages in the future, so the firmware needs to
  add the 'ibm,segment-page-sizes' property ASAP, preferrably at
  the same time they start setting up HID6. I currently have a
  hack for the kernel to override that, but we're in the process
  of eliminating all the special hacks that won't make in into
  the mainline kernel.

> > We could probably do a fallback in the cell setup to see if
> > the properties are in the device tree and do our own HID6 
> > setup stuff if not, normally expecting that the firmware settings
> > match the device tree.
> 
> We should not touch HID6 at all ... we should assume the firmware set it
> appropriately and have setup matching page size entries in the
> device-tree. I don't think we need to support changing that value
> especially since the kernel doesn't quite support 1M large page sizes
> anyway.

Yes, 1M mappings are probably not of much use to us, and other OSs
already do whatever they like ;-).

> > Geoff, if your firmware does not already have the properties
> > for large page sizes, could you add them?
> > 
> > Ben, could you point Hartmut (and maybe Geoff) to the documentation
> > for how the device tree needs to look like?
> 
> I'm not sure we published that yet :) I would suggest looking at what
> the kernel does to parse these instead in hash_utils.c until I get a
> former IBM approval for the spec to be published.

Then please try to at least send the spec or a link to Hartmut's IBM
internal address (hpenner at de.ibm.com). I already pointed him to the
linux code when it was initially merged, but he argued that reverse
engineering that code is not good enough to be sure to get the
property right and not having it in there is better than having incorrect
properties.

	Arnd <><



More information about the Linuxppc64-dev mailing list