linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kgdb, ppc: Corrected the address using of current->thread.evr register
@ 2010-11-16 12:58 Dongdong Deng
  2010-11-16 13:02 ` [Kgdb-bugreport] " Sergei Shtylyov
  2010-11-16 22:02 ` Jason Wessel
  0 siblings, 2 replies; 7+ messages in thread
From: Dongdong Deng @ 2010-11-16 12:58 UTC (permalink / raw)
  To: jason.wessel
  Cc: kgdb-bugreport, shan.hai, linuxppc-dev, miltonm, dongdong.deng

Passing the address of current->thread.evr register to memcpy function.

Signed-off-by: Dongdong Deng <dongdong.deng@windriver.com>
CC: Hai Shan <shan.hai@windriver.com>
CC: Milton Miller <miltonm@bga.com>
CC: linuxppc-dev@lists.ozlabs.org
---
 arch/powerpc/kernel/kgdb.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c
index 7a9db64..781acff 100644
--- a/arch/powerpc/kernel/kgdb.c
+++ b/arch/powerpc/kernel/kgdb.c
@@ -337,7 +337,7 @@ char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs)
 		/* FP registers 32 -> 63 */
 #if defined(CONFIG_FSL_BOOKE) && defined(CONFIG_SPE)
 		if (current)
-			memcpy(mem, current->thread.evr[regno-32],
+			memcpy(mem, (void *)&current->thread.evr[regno-32],
 					dbg_reg_def[regno].size);
 #else
 		/* fp registers not used by kernel, leave zero */
@@ -362,7 +362,7 @@ int dbg_set_reg(int regno, void *mem, struct pt_regs *regs)
 	if (regno >= 32 && regno < 64) {
 		/* FP registers 32 -> 63 */
 #if defined(CONFIG_FSL_BOOKE) && defined(CONFIG_SPE)
-		memcpy(current->thread.evr[regno-32], mem,
+		memcpy((void *)&current->thread.evr[regno-32], mem,
 				dbg_reg_def[regno].size);
 #else
 		/* fp registers not used by kernel, leave zero */
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-11-17 18:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-16 12:58 [PATCH] kgdb, ppc: Corrected the address using of current->thread.evr register Dongdong Deng
2010-11-16 13:02 ` [Kgdb-bugreport] " Sergei Shtylyov
2010-11-16 22:02 ` Jason Wessel
2010-11-17 17:16   ` Kumar Gala
2010-11-17 17:21     ` Jason Wessel
2010-11-17 17:52       ` Kumar Gala
2010-11-17 18:58       ` Kumar Gala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).