lkml.org 
[lkml]   [2013]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[v6][PATCH 5/5] powerpc/book3e/kgdb: Fix a single stgep case of lazy IRQ
Date
In lazy EE magic, we may have a lazy interrupt occured while
entering kgdb, but we really don't want to replay that interrupt
for kgdb, so we have to clear the PACA_IRQ_HARD_DIS force to
make sure we can exit directly from this debug exception.

Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
---
arch/powerpc/kernel/kgdb.c | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c
index 447c14b..9872f58 100644
--- a/arch/powerpc/kernel/kgdb.c
+++ b/arch/powerpc/kernel/kgdb.c
@@ -185,6 +185,14 @@ static int kgdb_singlestep(struct pt_regs *regs)
/* Restore current_thread_info lastly. */
memcpy(exception_thread_info, backup_current_thread_info, sizeof *thread_info);

+#ifdef CONFIG_PPC64
+ /*
+ * Clear the PACA_IRQ_HARD_DIS from the pending mask
+ * since we are about to exit this directly from debug
+ * exception without any replay interrupt in lazy EE case.
+ */
+ local_paca->irq_happened &= ~PACA_IRQ_HARD_DIS;
+#endif
return 1;
}

--
1.7.9.5


\
 
 \ /
  Last update: 2013-10-23 12:01    [W:0.279 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site