[PATCH 0/3] cell fixes 2.6.19

STALE7236d

8 messages, 3 authors, 2006-10-24 · open the first message on its own page

[PATCH 0/3] cell fixes 2.6.19

From: Arnd Bergmann <arnd@arndb.de>
Date: 2006-10-24 16:27:40

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 3/3] cell: update defconfig

From: Arnd Bergmann <arnd@arndb.de>
Date: 2006-10-24 16:27:44

===================================================================
--- linux-2.6.orig/arch/powerpc/configs/cell_defconfig
+++ linux-2.6/arch/powerpc/configs/cell_defconfig
@@ -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

From: Arnd Bergmann <arnd@arndb.de>
Date: 2006-10-24 16:28:03

From: Dwayne Grant Mcconnell <redacted>

Here is a simple patch that fixes the /signal2 file to actually give
signal2 data.

Signed-off-by: Dwayne Grant Mcconnell <redacted>
Signed-off-by: Arnd Bergmann <redacted>

Index: linux-2.6/arch/powerpc/platforms/cell/spufs/hw_ops.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/cell/spufs/hw_ops.c
+++ linux-2.6/arch/powerpc/platforms/cell/spufs/hw_ops.c
@@ -147,7 +147,7 @@ static void spu_hw_signal1_write(struct 
 
 static 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)

--

[PATCH 2/3] spufs: fix another off-by-one bug in mbox_read

From: Arnd Bergmann <arnd@arndb.de>
Date: 2006-10-24 16:28:11

Next try, the previous one did not do what I expected.

Signed-off-by: Arnd Bergmann <redacted>

Index: linux-2.6/arch/powerpc/platforms/cell/spufs/file.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/cell/spufs/file.c
+++ linux-2.6/arch/powerpc/platforms/cell/spufs/file.c
@@ -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)

--

Re: [PATCH 2/3] spufs: fix another off-by-one bug in mbox_read

From: Pekka Enberg <hidden>
Date: 2006-10-24 18:42:32

Hi Arnd,

On 10/24/06, Arnd Bergmann [off-list ref] wrote:
        spu_acquire(ctx);
-       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

From: Arnd Bergmann <arnd@arndb.de>
Date: 2006-10-24 19:07:54

On Tuesday 24 October 2006 20:42, Pekka Enberg wrote:
On 10/24/06, Arnd Bergmann [off-list ref] wrote:
quoted
=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++) {
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

From: Will Schmidt <hidden>
Date: 2006-10-24 19:53:36

On Tue, 2006-24-10 at 21:07 +0200, Arnd Bergmann wrote:
On Tuesday 24 October 2006 20:42, Pekka Enberg wrote:
quoted
On 10/24/06, Arnd Bergmann [off-list ref] wrote:
quoted
        spu_acquire(ctx);
-       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?
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.
Hey Arnd, 
   just curiosity..   What was the behavior before this patch?   just
leaving a few (0 - 3) characters behind?

	Arnd <>< 
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: [PATCH 2/3] spufs: fix another off-by-one bug in mbox_read

From: Arnd Bergmann <arnd@arndb.de>
Date: 2006-10-24 19:58:39

On Tuesday 24 October 2006 21:53, Will Schmidt wrote:
Hey Arnd,
=C2=A0 =C2=A0just curiosity.. =C2=A0 What was the behavior before this pa=
tch? =C2=A0 just
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 <><
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help