[POWERPC] Enable the RTAS udbg console on IBM Cell Blade
[powerpc.git] / arch / powerpc / platforms / cell / spu_priv1_mmio.c
index abe8a84..71b69f0 100644 (file)
@@ -24,6 +24,8 @@
 #include <asm/spu.h>
 #include <asm/spu_priv1.h>
 
+#include "interrupt.h"
+
 static void int_mask_and(struct spu *spu, int class, u64 mask)
 {
        u64 old_mask;
@@ -60,8 +62,10 @@ static u64 int_stat_get(struct spu *spu, int class)
        return in_be64(&spu->priv1->int_stat_RW[class]);
 }
 
-static void int_route_set(struct spu *spu, u64 route)
+static void cpu_affinity_set(struct spu *spu, int cpu)
 {
+       u64 target = iic_get_target_id(cpu);
+       u64 route = target << 48 | target << 32 | target << 16;
        out_be64(&spu->priv1->int_route_RW, route);
 }
 
@@ -138,7 +142,7 @@ const struct spu_priv1_ops spu_priv1_mmio_ops =
        .int_mask_get = int_mask_get,
        .int_stat_clear = int_stat_clear,
        .int_stat_get = int_stat_get,
-       .int_route_set = int_route_set,
+       .cpu_affinity_set = cpu_affinity_set,
        .mfc_dar_get = mfc_dar_get,
        .mfc_dsisr_get = mfc_dsisr_get,
        .mfc_dsisr_set = mfc_dsisr_set,