All of lore.kernel.org
 help / color / mirror / Atom feed
From: "tiejun.chen" <tiejun.chen@windriver.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: linuxppc-dev@lists.ozlabs.org, jason.wessel@windriver.com
Subject: Re: [PATCH 2/2] PPC_BOOK3E/KGDB: support kgdb kernel space
Date: Thu, 18 Oct 2012 09:47:17 +0800	[thread overview]
Message-ID: <507F5FA5.6070501@windriver.com> (raw)
In-Reply-To: <m28vb5s3o4.fsf@igel.home>

On 10/17/2012 08:07 PM, Andreas Schwab wrote:
> Tiejun Chen <tiejun.chen@windriver.com> writes:
>
>> 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

      reply	other threads:[~2012-10-18  1:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-17 10:50 [PATCH 1/2] powerpc/kgdb: Fix a single stgep case of lazy IRQ Tiejun Chen
2012-10-17 10:50 ` [PATCH 2/2] PPC_BOOK3E/KGDB: support kgdb kernel space Tiejun Chen
     [not found] ` <1350471011-2478-2-git-send-email-tiejun.chen__24766.2045098425$1350471081$gmane$org@windriver.com>
2012-10-17 12:07   ` Andreas Schwab
2012-10-18  1:47     ` tiejun.chen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=507F5FA5.6070501@windriver.com \
    --to=tiejun.chen@windriver.com \
    --cc=jason.wessel@windriver.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.