Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 28796
b: refs/heads/master
c: a91942a
h: refs/heads/master
v: v3
  • Loading branch information
Geoff Levand authored and Paul Mackerras committed Jun 21, 2006
1 parent 9a5a03a commit a5d86cc
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 540270d82db943855538cea5d0c790e7e669dda0
refs/heads/master: a91942ae7ebd518006dcbeb2a1d7b147253c080e
8 changes: 0 additions & 8 deletions trunk/arch/powerpc/platforms/cell/spu_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,14 +522,6 @@ int spu_irq_class_1_bottom(struct spu *spu)
return ret;
}

void spu_irq_setaffinity(struct spu *spu, int cpu)
{
u64 target = iic_get_target_id(cpu);
u64 route = target << 48 | target << 32 | target << 16;
spu_int_route_set(spu, route);
}
EXPORT_SYMBOL_GPL(spu_irq_setaffinity);

static int __init find_spu_node_id(struct device_node *spe)
{
unsigned int *id;
Expand Down
8 changes: 6 additions & 2 deletions trunk/arch/powerpc/platforms/cell/spu_priv1_mmio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/powerpc/platforms/cell/spufs/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include <asm/mmu_context.h>
#include <asm/spu.h>
#include <asm/spu_csa.h>
#include <asm/spu_priv1.h>
#include "spufs.h"

#define SPU_MIN_TIMESLICE (100 * HZ / 1000)
Expand Down Expand Up @@ -363,7 +364,7 @@ int spu_activate(struct spu_context *ctx, u64 flags)
* We're likely to wait for interrupts on the same
* CPU that we are now on, so send them here.
*/
spu_irq_setaffinity(spu, raw_smp_processor_id());
spu_cpu_affinity_set(spu, raw_smp_processor_id());
put_active_spu(spu);
return 0;
}
Expand Down
6 changes: 3 additions & 3 deletions trunk/include/asm-powerpc/spu_priv1.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct spu_priv1_ops
u64 (*int_mask_get) (struct spu *spu, int class);
void (*int_stat_clear) (struct spu *spu, int class, u64 stat);
u64 (*int_stat_get) (struct spu *spu, int class);
void (*int_route_set) (struct spu *spu, u64 route);
void (*cpu_affinity_set) (struct spu *spu, int cpu);
u64 (*mfc_dar_get) (struct spu *spu);
u64 (*mfc_dsisr_get) (struct spu *spu);
void (*mfc_dsisr_set) (struct spu *spu, u64 dsisr);
Expand Down Expand Up @@ -88,9 +88,9 @@ spu_int_stat_get (struct spu *spu, int class)
}

static inline void
spu_int_route_set (struct spu *spu, u64 route)
spu_cpu_affinity_set (struct spu *spu, int cpu)
{
spu_priv1_ops->int_stat_get(spu, route);
spu_priv1_ops->cpu_affinity_set(spu, cpu);
}

static inline u64
Expand Down

0 comments on commit a5d86cc

Please sign in to comment.