lkml.org 
[lkml]   [2014]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [v6,3/5] powerpc/book3e: support kgdb for kernel space
On Wed, Oct 23, 2013 at 05:31:23PM +0800, Tiejun Chen wrote:
> Currently we need to skip this for supporting KGDB.
>
> Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
>
> ---
> arch/powerpc/kernel/exceptions-64e.S | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S
> index a55cf62..0b750c6 100644
> --- a/arch/powerpc/kernel/exceptions-64e.S
> +++ b/arch/powerpc/kernel/exceptions-64e.S
> @@ -597,11 +597,13 @@ kernel_dbg_exc:
> rfdi
>
> /* Normal debug exception */
> +1: andi. r14,r11,MSR_PR; /* check for userspace again */
> +#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 */
> +#endif

Now that we have support for properly saving state on special level
exceptions, that should be used here. With the above patch, what happens
if e.g. a debug exception fires during a TLB miss, and the kgdb handler
takes its own TLB miss accessing the serial port?

-Scott


\
 
 \ /
  Last update: 2014-05-09 23:21    [W:0.097 / U:0.988 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site