]> git.baikalelectronics.ru Git - kernel.git/commit
[POWERPC] spu_manage: fix spu_unit_number for celleb device tree
authorChristian Krafft <krafft@de.ibm.com>
Wed, 29 Aug 2007 23:33:53 +0000 (01:33 +0200)
committerArnd Bergmann <arnd@klappe.arndb.de>
Wed, 29 Aug 2007 23:35:05 +0000 (01:35 +0200)
commit6f9d084766bc2523cd44a04331901a13a6350dd3
tree3e39ff56bb079c2af1b85a5f7ed990b6dcdb59c3
parent4af8fab576ed14c5b19d2ad37f78f42f5b22ac71
[POWERPC] spu_manage: fix spu_unit_number for celleb device tree

This fixes a regression introduced with 2.6.23-rc4 after on some
confusion about the device tree interfaces.

IBM QS21 device trees provide "physical-id", so we changed the code to
run on that and remain compatible with all IBM machines.

However, the Toshiba Celleb device tree provides the "unit-id" property,
which was in the Linux code, but never used in this way on IBM hardware.

Legacy device tree used the reg property for the physical id of an spe.
This patch fixes find_spu_unit_number to look for the spu id in that order.
The length is checked to avoid misinterpretation in case the attributes
unit-id or reg do not contain the id.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Cc: Jeremy Kerr <jk@ozlabs.org>
arch/powerpc/platforms/cell/spu_manage.c