Bug 217079 - utrace support breaks SPU debugging on powerc/cell
utrace support breaks SPU debugging on powerc/cell
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
rawhide
ppc64 Linux
medium Severity medium
: ---
: ---
Assigned To: Kernel Maintainer List
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-23 15:13 EST by Arnd Bergmann
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-11-23 16:50:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Arnd Bergmann 2006-11-23 15:13:46 EST
The current utrace patch contains the hunk

--- linux-2.6.orig/arch/powerpc/platforms/cell/spufs/run.c
+++ linux-2.6/arch/powerpc/platforms/cell/spufs/run.c
@@ -70,6 +70,7 @@ static inline int spu_run_fini(struct sp

        if (signal_pending(current))
                ret = -ERESTARTSYS;
+#if 0 /* XXX */
        if (unlikely(current->ptrace & PT_PTRACED)) {
                if ((*status & SPU_STATUS_STOPPED_BY_STOP)
                    && (*status >> SPU_STOP_STATUS_SHIFT) == 0x3fff) {
@@ -77,6 +78,7 @@ static inline int spu_run_fini(struct sp
                        ret = -ERESTARTSYS;
                }
        }
+#endif
        return ret;
 }

which breaks support for breakpoints in SPU programs. I discussed this with 
Ulrich Weigand, the spu-gdb maintainer. The result is that we should not check 
for (current->ptrace & PT_PTRACED) at all in this code. Please replace the 
patchlet above with this one:

--- a/arch/powerpc/platforms/cell/spufs/run.c
+++ b/arch/powerpc/platforms/cell/spufs/run.c
@@ -70,12 +70,10 @@ static inline int spu_run_fini(struct sp
 
 	if (signal_pending(current))
 		ret = -ERESTARTSYS;
-	if (unlikely(current->ptrace & PT_PTRACED)) {
-		if ((*status & SPU_STATUS_STOPPED_BY_STOP)
-		    && (*status >> SPU_STOP_STATUS_SHIFT) == 0x3fff) {
-			force_sig(SIGTRAP, current);
-			ret = -ERESTARTSYS;
-		}
+	if ((*status & SPU_STATUS_STOPPED_BY_STOP)
+	    && (*status >> SPU_STOP_STATUS_SHIFT) == 0x3fff) {
+		force_sig(SIGTRAP, current);
+		ret = -ERESTARTSYS;
 	}
 	return ret;
 }
Comment 1 David Woodhouse 2006-11-23 16:50:26 EST
Committed; thanks.

Note You need to log in before you can comment on or make changes to this bug.