All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 09/30] x86_64: ifdef out struct thread_struct::ip
@ 2009-04-10  2:35 ` Alexey Dobriyan
  0 siblings, 0 replies; 16+ messages in thread
From: Alexey Dobriyan @ 2009-04-10  2:35 UTC (permalink / raw)
  To: akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
  Cc: xemul-bzQdu9zFT3WakBO8gow8eQ, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	dave-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8, hch-wEGCiKHe2LqWVfeAwA7xHQ,
	mingo-X9Un+BFzKDI, torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b

struct thread_struct::ip isn't used on x86_64, struct pt_regs::ip is used
instead. 

kgdb should be reading 0, but I can't check it.

Signed-off-by: Alexey Dobriyan <adobriyan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---

 arch/x86/include/asm/processor.h |    2 ++
 arch/x86/kernel/kgdb.c           |    2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

--- a/arch/x86/include/asm/processor.h
+++ b/arch/x86/include/asm/processor.h
@@ -421,7 +421,9 @@ struct thread_struct {
 	unsigned short		fsindex;
 	unsigned short		gsindex;
 #endif
+#ifdef CONFIG_X86_32
 	unsigned long		ip;
+#endif
 #ifdef CONFIG_X86_64
 	unsigned long		fs;
 #endif
--- a/arch/x86/kernel/kgdb.c
+++ b/arch/x86/kernel/kgdb.c
@@ -141,7 +141,7 @@ void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p)
 	gdb_regs32[GDB_PS]	= *(unsigned long *)(p->thread.sp + 8);
 	gdb_regs32[GDB_CS]	= __KERNEL_CS;
 	gdb_regs32[GDB_SS]	= __KERNEL_DS;
-	gdb_regs[GDB_PC]	= p->thread.ip;
+	gdb_regs[GDB_PC]	= 0;
 	gdb_regs[GDB_R8]	= 0;
 	gdb_regs[GDB_R9]	= 0;
 	gdb_regs[GDB_R10]	= 0;

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

end of thread, other threads:[~2009-04-10 11:17 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-10  2:35 [PATCH 09/30] x86_64: ifdef out struct thread_struct::ip Alexey Dobriyan
2009-04-10  2:35 ` Alexey Dobriyan
2009-04-10  3:53 ` Matt Helsley
     [not found]   ` <20090410035328.GB29496-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-04-10  4:10     ` Jaswinder Singh Rajput
2009-04-10  4:10       ` Jaswinder Singh Rajput
2009-04-10  9:20       ` Ingo Molnar
     [not found]         ` <20090410092000.GG17962-X9Un+BFzKDI@public.gmane.org>
2009-04-10 10:52           ` Jaswinder Singh Rajput
2009-04-10 10:52         ` Jaswinder Singh Rajput
     [not found]       ` <1239336639.3036.20.camel-6Ww87KsxWewAvxtiuMwx3w@public.gmane.org>
2009-04-10  9:20         ` Ingo Molnar
2009-04-10  9:19     ` Ingo Molnar
2009-04-10  9:19   ` Ingo Molnar
2009-04-10  9:47     ` Ingo Molnar
2009-04-10 11:17     ` Alexey Dobriyan
     [not found]     ` <20090410091931.GF17962-X9Un+BFzKDI@public.gmane.org>
2009-04-10  9:47       ` Ingo Molnar
2009-04-10 11:17       ` Alexey Dobriyan
     [not found] ` <20090410023522.GJ27788-2ev+ksY9ol182hYKe6nXyg@public.gmane.org>
2009-04-10  3:53   ` Matt Helsley

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.