[PATCH] spufs-prevent-sdr1-access
Geoff Levand
geoffrey.levand at am.sony.com
Thu Jan 26 05:25:58 EST 2006
spufs-prevent-sdr1-access.patch:
SDR1 is a hypervisor resource. It is not accessible when
kernel is on LPAR.
Signed-off-by: Masato Noguchi <Masato.Noguchi at jp.sony.com>
Signed-off-by: Geoff Levand <geoffrey.levand at am.sony.com>
diff -uprN linux-2.6.15+spufs/arch/powerpc/platforms/cell/spu_base.c linux-2.6.15+spufs.mod/arch/powerpc/platforms/cell/spu_base.c
--- linux-2.6.15+spufs/arch/powerpc/platforms/cell/spu_base.c 2006-01-18 20:46:38.000000000 +0900
+++ linux-2.6.15+spufs.mod/arch/powerpc/platforms/cell/spu_base.c 2006-01-20 17:18:41.000000000 +0900
@@ -626,7 +626,8 @@ static int __init create_spu(struct devi
spu->dsisr = 0UL;
spin_lock_init(&spu->register_lock);
- spu_mfc_sdr_set(spu, mfspr(SPRN_SDR1));
+ if (!platform_is_lpar())
+ spu_mfc_sdr_set(spu, mfspr(SPRN_SDR1));
spu_mfc_sr1_set(spu, 0x33);
spu->ibox_callback = NULL;
diff -uprN linux-2.6.15+spufs/arch/powerpc/platforms/cell/spufs/switch.c linux-2.6.15+spufs.mod/arch/powerpc/platforms/cell/spufs/switch.c
--- linux-2.6.15+spufs/arch/powerpc/platforms/cell/spufs/switch.c 2006-01-18 20:46:38.000000000 +0900
+++ linux-2.6.15+spufs.mod/arch/powerpc/platforms/cell/spufs/switch.c 2006-01-20 17:17:30.000000000 +0900
@@ -2136,7 +2136,8 @@ static void init_priv1(struct spu_state
MFC_STATE1_RELOCATE_MASK | MFC_STATE1_BUS_TLBIE_MASK;
/* Set storage description. */
- csa->priv1.mfc_sdr_RW = mfspr(SPRN_SDR1);
+ if (!platform_is_lpar())
+ csa->priv1.mfc_sdr_RW = mfspr(SPRN_SDR1);
/* Enable OS-specific set of interrupts. */
csa->priv1.int_mask_class0_RW = CLASS0_ENABLE_DMA_ALIGNMENT_INTR |
More information about the Linuxppc64-dev
mailing list