Re: [PATCH 2/2] PPC_BOOK3E/KGDB: support kgdb kernel space

2 messages, 2 authors, 2012-10-18 · open the first message on its own page

Re: [PATCH 2/2] PPC_BOOK3E/KGDB: support kgdb kernel space

From: Andreas Schwab <hidden>
Date: 2012-10-17 12:07:17

Tiejun Chen [off-list ref] writes:
quoted hunk
diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S
index 4684e33..ed5862d 100644
--- a/arch/powerpc/kernel/exceptions-64e.S
+++ b/arch/powerpc/kernel/exceptions-64e.S
@@ -539,11 +539,15 @@ kernel_dbg_exc:
 	rfdi
 
 	/* Normal debug exception */
+#ifndef CONFIG_KGDB
 	/* XXX We only handle coming from userspace for now since we can't
 	 *     quite save properly an interrupted kernel state yet
 	 */
 1:	andi.	r14,r11,MSR_PR;		/* check for userspace again */
 	beq	kernel_dbg_exc;		/* if from kernel mode */
+#else
+1:
+#endif
You could move the label before the conditional.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

Re: [PATCH 2/2] PPC_BOOK3E/KGDB: support kgdb kernel space

From: tiejun.chen <hidden>
Date: 2012-10-18 01:47:32

On 10/17/2012 08:07 PM, Andreas Schwab wrote:
Tiejun Chen [off-list ref] writes:
quoted
diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S
index 4684e33..ed5862d 100644
--- a/arch/powerpc/kernel/exceptions-64e.S
+++ b/arch/powerpc/kernel/exceptions-64e.S
@@ -539,11 +539,15 @@ kernel_dbg_exc:
  	rfdi

  	/* Normal debug exception */
+#ifndef CONFIG_KGDB
  	/* XXX We only handle coming from userspace for now since we can't
  	 *     quite save properly an interrupted kernel state yet
  	 */
  1:	andi.	r14,r11,MSR_PR;		/* check for userspace again */
  	beq	kernel_dbg_exc;		/* if from kernel mode */
+#else
+1:
+#endif
You could move the label before the conditional.
Okay.
diff --git a/arch/powerpc/kernel/exceptions-64e.S 
b/arch/powerpc/kernel/exceptions-64e.S
index 4684e33..73ce1a7 100644
--- a/arch/powerpc/kernel/exceptions-64e.S
+++ b/arch/powerpc/kernel/exceptions-64e.S
@@ -538,12 +538,15 @@ kernel_dbg_exc:
         mfspr   r13,SPRN_SPRG_DBG_SCRATCH
         rfdi

+1:
         /* Normal debug exception */
+#ifndef CONFIG_KGDB
         /* XXX We only handle coming from userspace for now since we can't
          *     quite save properly an interrupted kernel state yet
          */
-1:     andi.   r14,r11,MSR_PR;         /* check for userspace again */
+       andi.   r14,r11,MSR_PR;         /* check for userspace again */
         beq     kernel_dbg_exc;         /* if from kernel mode */
+#endif

         /* Now we mash up things to make it look like we are coming on a
          * normal exception
...

Tiejun
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help