diff options
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/cell/spu_base.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c index ccfd0c4db874..d0fb959e3ef1 100644 --- a/arch/powerpc/platforms/cell/spu_base.c +++ b/arch/powerpc/platforms/cell/spu_base.c | |||
@@ -781,6 +781,17 @@ static int __init create_spu(struct device_node *spe) | |||
781 | if (!spu) | 781 | if (!spu) |
782 | goto out; | 782 | goto out; |
783 | 783 | ||
784 | spu->node = find_spu_node_id(spe); | ||
785 | if (spu->node >= MAX_NUMNODES) { | ||
786 | printk(KERN_WARNING "SPE %s on node %d ignored," | ||
787 | " node number too big\n", spe->full_name, spu->node); | ||
788 | printk(KERN_WARNING "Check if CONFIG_NUMA is enabled.\n"); | ||
789 | return -ENODEV; | ||
790 | } | ||
791 | spu->nid = of_node_to_nid(spe); | ||
792 | if (spu->nid == -1) | ||
793 | spu->nid = 0; | ||
794 | |||
784 | ret = spu_map_device(spu, spe); | 795 | ret = spu_map_device(spu, spe); |
785 | /* try old method */ | 796 | /* try old method */ |
786 | if (ret) | 797 | if (ret) |
@@ -788,10 +799,6 @@ static int __init create_spu(struct device_node *spe) | |||
788 | if (ret) | 799 | if (ret) |
789 | goto out_free; | 800 | goto out_free; |
790 | 801 | ||
791 | spu->node = find_spu_node_id(spe); | ||
792 | spu->nid = of_node_to_nid(spe); | ||
793 | if (spu->nid == -1) | ||
794 | spu->nid = 0; | ||
795 | ret = spu_map_interrupts(spu, spe); | 802 | ret = spu_map_interrupts(spu, spe); |
796 | if (ret) | 803 | if (ret) |
797 | ret = spu_map_interrupts_old(spu, spe); | 804 | ret = spu_map_interrupts_old(spu, spe); |