cell fixes 2.6.19
Subsystems (3)
cover cell fixes 2.6.19
A few small updates that I'd like to see get into 2.6.19. tested against the powerpc.git merge branch.
Please apply,
Arnd <><
--
PATCH 2/3 spufs: fix another off-by-one bug in mbox_read
Next try, the previous one did not do what I expected.
arch/powerpc/platforms/cell/spufs/file.c +1 -1
@@ -385,7 +385,7 @@ static ssize_t spufs_mbox_read(struct fi udata = (void __user *)buf;spu_acquire (ctx); -for (count =0 ; count <= len; count +=4 , udata++) { +for (count =0 ; (count +4 ) <= len; count +=4 , udata++) {int ret; ret = ctx->ops->mbox_read (ctx, &mbox_data);if (ret ==0 )
--
PATCH 3/3 cell: update defconfig
In reply to Arnd Bergmann===================================================================
arch/powerpc/configs/cell_defconfig +13 -6
@@ -254,6 +254,7 @@ CONFIG_SYN_COOKIES=y CONFIG_INET_TUNNEL=y CONFIG_INET_XFRM_MODE_TRANSPORT=y CONFIG_INET_XFRM_MODE_TUNNEL=y +# CONFIG_INET_XFRM_MODE_BEET is not set CONFIG_INET_DIAG=y CONFIG_INET_TCP_DIAG=y # CONFIG_TCP_CONG_ADVANCED is not set
@@ -275,7 +276,9 @@ CONFIG_INET6_XFRM_TUNNEL=m CONFIG_INET6_TUNNEL=m CONFIG_INET6_XFRM_MODE_TRANSPORT=y CONFIG_INET6_XFRM_MODE_TUNNEL=y +# CONFIG_INET6_XFRM_MODE_BEET is not set # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set +# CONFIG_IPV6_SIT is not set CONFIG_IPV6_TUNNEL=m # CONFIG_IPV6_SUBTREES is not set # CONFIG_IPV6_MULTIPLE_TABLES is not set
@@ -406,6 +409,12 @@ CONFIG_BLK_DEV_INITRD=y # CONFIG_ATA_OVER_ETH is not set # +# Misc devices +# +# CONFIG_SGI_IOC4 is not set +# CONFIG_TIFM_CORE is not set + +# # ATA/ATAPI/MFM/RLL support # CONFIG_IDE=y
@@ -738,7 +747,6 @@ CONFIG_GEN_RTC=y # TPM devices # # CONFIG_TCG_TPM is not set -# CONFIG_TELCLOCK is not set # # I2C support
@@ -802,6 +810,7 @@ CONFIG_I2C_ALGOBIT=y # # Dallas's 1-wire bus # +# CONFIG_W1 is not set # # Hardware Monitoring support
@@ -810,14 +819,9 @@ CONFIG_I2C_ALGOBIT=y # CONFIG_HWMON_VID is not set # -# Misc devices -# - -# # Multimedia devices # # CONFIG_VIDEO_DEV is not set -CONFIG_VIDEO_V4L2=y # # Digital Video Broadcasting Devices
@@ -923,6 +927,7 @@ CONFIG_EXT3_FS=y CONFIG_EXT3_FS_XATTR=y # CONFIG_EXT3_FS_POSIX_ACL is not set # CONFIG_EXT3_FS_SECURITY is not set +# CONFIG_EXT4DEV_FS is not set CONFIG_JBD=y # CONFIG_JBD_DEBUG is not set CONFIG_FS_MBCACHE=y
@@ -930,6 +935,7 @@ CONFIG_FS_MBCACHE=y # CONFIG_JFS_FS is not set CONFIG_FS_POSIX_ACL=y # CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set # CONFIG_OCFS2_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_ROMFS_FS is not set
@@ -1129,6 +1135,7 @@ CONFIG_DEBUG_FS=y # CONFIG_DEBUG_VM is not set # CONFIG_DEBUG_LIST is not set # CONFIG_FORCED_INLINING is not set +# CONFIG_HEADERS_CHECK is not set # CONFIG_RCU_TORTURE_TEST is not set # CONFIG_DEBUG_STACKOVERFLOW is not set # CONFIG_DEBUG_STACK_USAGE is not set
--
PATCH 1/3 spufs: fix signal2 file to report signal2
In reply to Arnd BergmannFrom: Dwayne Grant Mcconnell <[email protected]>
Here is a simple patch that fixes the /signal2 file to actually give signal2 data.
arch/powerpc/platforms/cell/spufs/hw_ops.c +1 -1
@@ -147,7 +147,7 @@ static void spu_hw_signal1_write(structstatic u32 spu_hw_signal2_read (struct spu_context *ctx) { -return in_be32 (&ctx->spu->problem->signal_notify1); +return in_be32 (&ctx->spu->problem->signal_notify2); }static void spu_hw_signal2_write (struct spu_context *ctx,u32 data)
--
Re: [PATCH 2/3] spufs: fix another off-by-one bug in mbox_read
In reply to Arnd BergmannHi Arnd,
arch/powerpc/platforms/cell/spufs/file.c static ssize_t spufs_mbox_read(struct fi · line 388
Quoted 3 lines · Arnd Bergmann
spu_acquire(ctx);arch/powerpc/platforms/cell/spufs/file.c +1
-1-for (count =0 ; count <= len; count +=4 , udata++) { +for (count =0 ; (count +4 ) <= len; count +=4 , udata++) {
Wouldn't this be more obvious as
for (count = 0, count < (len / 4); count++, udata++) {
And then do count * 4 if you need the actual index somewhere. Hmm?
Re: [PATCH 2/3] spufs: fix another off-by-one bug in mbox_read
Quoted 4 lines · Pekka Enberg
Quoted 3 lines · Arnd Bergmann
=A0 =A0 =A0 =A0
spu_acquire(ctx);
- =A0 =A0 =A0 for (count =3D 0; count <=3D len; count +=3D 4, udata++) {
+ =A0 =A0 =A0 for (count =3D 0; (count + 4) <=3D len; count +=3D 4, uda=
ta++) {
Quoted 6 lines
Wouldn't this be more obvious as
=A0 for (count =3D 0, count < (len / 4); count++, udata++) {
And then do count * 4 if you need the actual index somewhere. Hmm?
Count is the return value from a write() file operation. I find it more readable to update that every time I do one put_user(), to the exact value, than calculating the return code later.
Arnd <><=20
Re: [PATCH 2/3] spufs: fix another off-by-one bug in mbox_read
Quoted 8 lines · Arnd Bergmann
Quoted 7 lines · Pekka Enberg
arch/powerpc/platforms/cell/spufs/file.c static ssize_t spufs_mbox_read(struct fi · line 388
Quoted 3 lines · Arnd Bergmann
spu_acquire(ctx);arch/powerpc/platforms/cell/spufs/file.c +1
-1-for (count =0 ; count <= len; count +=4 , udata++) { +for (count =0 ; (count +4 ) <= len; count +=4 , udata++) {Wouldn't this be more obvious as
Quoted 7 lines
Quoted 3 lines
for (count = 0, count < (len / 4); count++, udata++) {And then do count * 4 if you need the actual index somewhere. Hmm?
Count is the return value from a
write()file operation. I find it more readable to update that every time I do oneput_user(), to the exact value, than calculating the return code later.
Hey Arnd,
just curiosity.. What was the behavior before this patch? just
leaving a few (0 - 3) characters behind?
Quoted 6 lines
Arnd <><_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev
Re: [PATCH 2/3] spufs: fix another off-by-one bug in mbox_read
Quoted 2 lines · Will Schmidt
Hey Arnd,
=C2=A0 =C2=A0just curiosity.. =C2=A0 What was the behavior before this pa=
tch? =C2=A0 just
Quoted 1 line
leaving a few (0 - 3) characters behind?
It transfers more bytes than requested on a read. If you asked for four bytes, you got eight.
Note: one nasty property of this file in spufs is that you can only read multiples of four bytes in the first place, there is no way to atomically put back a few bytes into the hardware register, so reading less than four bytes returns -EINVAL. Asking for more than four should return the largest possible multiple of four.
Arnd <><