[Cbe-oss-dev] cbe_find_map() issue

Benjamin Herrenschmidt benh at kernel.crashing.org
Wed Jan 10 14:07:47 EST 2007


While doing some backports, I noticed this bit in cbe_regs.c
cbe_find_map() :

        if (strcasecmp(np->type, "spe") == 0) {
                if (np->data == NULL) {
                        /* walk up path until cpu node was found */
                        tmp_np = np->parent;
                        while (tmp_np != NULL && strcasecmp(tmp_np->type, "cpu") != 0)
                                tmp_np = tmp_np->parent;

                        np->data = cbe_find_map(tmp_np);
                }
                return np->data;
        }

This seems to be code from David Erb cleaned up by Kevin Corry. The thing with
this code is that it doesn't work with "new" device-trees (malta, CAB, ...)

The SPEs are no longer under the CPUs node. You need to use the NUMA properties
to get the node of the SPEs instead.

I have no time to do any testing or fixing of that right now, but so that you
know that any code relying on this snipped will not work on the new blades.

Ben.





More information about the cbe-oss-dev mailing list