mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Announce: kdb v4.4 is available for kernel 2.6.16
@ 2006-03-21  5:59 Keith Owens
  2006-03-24  6:21 ` Keith Owens
  2006-04-01 17:04 ` Dan Aloni
  0 siblings, 2 replies; 6+ messages in thread
From: Keith Owens @ 2006-03-21  5:59 UTC (permalink / raw)
  To: kdb; +Cc: linux-kernel, linux-ia64

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

KDB (Linux Kernel Debugger) has been updated for kernel 2.6.16.

ftp://oss.sgi.com/projects/kdb/download/v4.4/
ftp://ftp.ocs.com.au/pub/mirrors/oss.sgi.com/projects/kdb/download/v4.4/

Note:  Due to a spam attack, the kdb@oss.sgi.com mailing list is now
subscriber only.  If you reply to this mail, you may wish to trim
kdb@oss.sgi.com from the cc: list.

Thanks to Nathan Scott for updating KDB while I was on holiday.

Current versions are :-

  kdb-v4.4-2.6.16-common-1.bz2
  kdb-v4.4-2.6.16-i386-1.bz2
  kdb-v4.4-2.6.16-ia64-1.bz2

Changelog extract since kdb-v4.4-2.6.15-common-1.

2006-03-21 Keith Owens  <kaos@sgi.com>

	* kdb v4.4-2.6.16-common-1.

2006-03-14 Nathan Scott  <nathans@sgi.com>

	* kdb v4.4-2.6.16-rc6-common-1.

2006-02-28 Nathan Scott  <nathans@sgi.com>

	* kdb v4.4-2.6.16-rc5-common-1.

2006-02-20 Nathan Scott  <nathans@sgi.com>

	* kdb v4.4-2.6.16-rc4-common-1.

2006-02-06 Keith Owens  <kaos@sgi.com>

	* Change CONFIG_CRASH_DUMP to CONFIG_LKCD.
	* Remove obsolete kdb_notifier_list.
	* kdb v4.4-2.6.16-rc2-common-2.

2006-02-06 Keith Owens  <kaos@sgi.com>

	* Add xpcusers command.  Dean Nelson, SGI.
	* kdb v4.4-2.6.16-rc2-common-1.

2006-02-02 Keith Owens  <kaos@sgi.com>

	* Check if we have a console before using it for KDB.
	* kdb v4.4-2.6.16-rc1-common-3.

2006-02-01 Keith Owens  <kaos@sgi.com>

	* Add option 'R' to the pid command to reset to the original task.
	* Include 'pid R' in archkdb* commands to reset up the original failing
	  task.  Users may have switched to other cpus and/or tasks before
	  issuing archkdb.
	* Compile fix for kdbm_pg.c on i386.
	* kdb v4.4-2.6.16-rc1-common-2.

2006-01-18 Keith Owens  <kaos@sgi.com>

	* kdb v4.4-2.6.16-rc1-common-1.

2006-01-11 Keith Owens  <kaos@sgi.com>

	* Plug a timing race between KDB_ENTER_SLAVE and KDB_ENTER, and allow
	  the cpu command to switch to a slave cpu.
	* KDB_REASON_SILENT now waits for other cpus, to avoid spurious NMI
	  events that were seen on some Xeon systems.
	* kdb v4.4-2.6.15-common-3.

2006-01-08 Keith Owens  <kaos@sgi.com>

	* kdb mainline invokes DIE_KDEBUG_ENTER and DIE_KDEBUG_LEAVE via
	  notify_die.
	* Move xpc debug support from xpc to mainline kdb.
	* kdbm_cm.c: check if file_lock_operations or lock_manager_operations
	  are set before dereferencing them.  Felix Blyakher, SGI.
	* kdb v4.4-2.6.15-common-2.


Changelog extract since kdb-v4.4-2.6.15-i386-1.

2006-03-21 Keith Owens  <kaos@sgi.com>

        * kdb v4.4-2.6.16-i386-1.

2006-03-14 Nathan Scott  <nathans@sgi.com>

	* kdb v4.4-2.6.16-rc6-i386-1.

2006-02-28 Nathan Scott  <nathans@sgi.com>

	* kdb v4.4-2.6.16-rc5-i386-1.

2006-02-20 Nathan Scott  <nathans@sgi.com>

	* kdb v4.4-2.6.16-rc4-i386-1.

2006-02-06 Keith Owens  <kaos@sgi.com>

	* Change CONFIG_CRASH_DUMP to CONFIG_LKCD.
	* kdb v4.4-2.6.16-rc2-i386-2.

2006-02-06 Keith Owens  <kaos@sgi.com>

	* kdb v4.4-2.6.16-rc2-i386-1.

2006-01-18 Keith Owens  <kaos@sgi.com>

	* kdb v4.4-2.6.16-rc1-i386-1.

2006-01-08 Keith Owens  <kaos@sgi.com>

	* Add DIE_KDEBUG_ENTER and DIE_KDEBUG_LEAVE to notify_die.
	* kdb v4.4-2.6.15-i386-2.


Changelog extract since kdb v4.4-2.6.15-ia64-1.

2006-03-21 Keith Owens  <kaos@sgi.com>

        * kdb v4.4-2.6.16-ia64-1.

2006-03-14 Nathan Scott  <nathans@sgi.com>

	* kdb v4.4-2.6.16-rc6-ia64-1.

2006-02-28 Nathan Scott  <nathans@sgi.com>

	* kdb v4.4-2.6.16-rc5-ia64-1.

2006-02-20 Nathan Scott  <nathans@sgi.com>

	* kdb v4.4-2.6.16-rc4-ia64-1.

2006-02-07 Keith Owens  <kaos@sgi.com>

	* Change kdb_running_process_save from a static array to a pointer.
	  gcc 4.0 objects to forward declarations for arrays with an incomplete
	  type.
	* kdb v4.4-2.6.16-rc2-ia64-3.

2006-02-06 Keith Owens  <kaos@sgi.com>

	* Change CONFIG_CRASH_DUMP to CONFIG_LKCD.
	* kdb v4.4-2.6.16-rc2-ia64-2.

2006-02-06 Keith Owens  <kaos@sgi.com>

	* kdb v4.4-2.6.16-rc2-ia64-1.

2006-02-01 Keith Owens  <kaos@sgi.com>

	* Handlers: check that the task is in kernel space before looking at
	  the thread_info bits.
	* Expose kdb_running_process_save[] so 'pid R' can get the original
	  process, even when the MCA/INIT handlers are being used.
	* kdb v4.4-2.6.16-rc1-ia64-3.

2006-01-19 Keith Owens  <kaos@sgi.com>

	* Add back some kdb changes to xpc_main that were lost due to a patch
	  conflict.
	* kdb v4.4-2.6.16-rc1-ia64-2.

2006-01-18 Keith Owens  <kaos@sgi.com>

	* kdb v4.4-2.6.16-rc1-ia64-1.

2006-01-10 Keith Owens  <kaos@sgi.com>

	* Build kdba_pod for generic as well as sn2 kernels and test at run
	  time if the platform is sn2.
	* kdb v4.4-2.6.15-ia64-3.

2006-01-08 Keith Owens  <kaos@sgi.com>

	* Convert xpc to use DIE_KDEBUG_ENTER and DIE_KDEBUG_LEAVE.
	* Add debug option for xpc.
	* break.b always sets a debug trap number of 0 , so pass that to kdb as
	  well as the normal kdb traaps.
	* kdb v4.4-2.6.15-ia64-2.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Exmh version 2.1.1 10/15/1999

iD8DBQFEH5Y8i4UHNye0ZOoRAgxfAKDEFyGyiC0MqpZf3g++ZcyWnkZm4QCfdGpB
vrKA3BN4aKCI/MDX6bJTme0=
=edpm
-----END PGP SIGNATURE-----


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

* Re: Announce: kdb v4.4 is available for kernel 2.6.16
  2006-03-21  5:59 Announce: kdb v4.4 is available for kernel 2.6.16 Keith Owens
@ 2006-03-24  6:21 ` Keith Owens
  2006-04-01 17:04 ` Dan Aloni
  1 sibling, 0 replies; 6+ messages in thread
From: Keith Owens @ 2006-03-24  6:21 UTC (permalink / raw)
  To: kdb; +Cc: linux-kernel, linux-ia64

Keith Owens (on Tue, 21 Mar 2006 16:59:24 +1100) wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>KDB (Linux Kernel Debugger) has been updated for kernel 2.6.16.
>
>ftp://oss.sgi.com/projects/kdb/download/v4.4/
>ftp://ftp.ocs.com.au/pub/mirrors/oss.sgi.com/projects/kdb/download/v4.4/
>
>Note:  Due to a spam attack, the kdb@oss.sgi.com mailing list is now
>subscriber only.  If you reply to this mail, you may wish to trim
>kdb@oss.sgi.com from the cc: list.

Updates to kdb v4.4-2.6.16-{common,i386,ia64}-1, moving to -2.  Mainly
to get more forceful with stuck cpus on IA64, where the "non-maskable"
interrupt is masked by local_irq_disable().

We finally get decent backtraces on stuck IA64 cpus.  It took a long
time to get there, KDB could not change until the base kernel could
cope with INIT and recover correctly.

2006-03-22 Keith Owens  <kaos@sgi.com>

	* Add some more xpc flags.  Dean Nelson, SGI.
	* Replace open coded counter references with atomic_read().
	* Pass early_uart_console to early_uart_setup().  Francois
	  Wellenreiter, Bull.
	* Replace open code with for_each_online_cpu().
	* If cpus do not come into kdb after a few seconds then let
	  architectures send a more forceful interrupt.
	* Close a timing race with KDB_ENTER_SLAVE.
	* kdb v4.4-2.6.16-common-2.

2006-03-24 Keith Owens  <kaos@sgi.com>

	* Define a dummy kdba_wait_for_cpus().
	* kdb v4.4-2.6.16-i386-2.

2006-03-24 Keith Owens  <kaos@sgi.com>

	* Use INIT to interrupt cpus that do not respond to a normal kdb IPI.
	* Remove KDBA_MCA_TRACE from arch/ia64/kernel/mca.c.
	* kdb v4.4-2.6.16-ia64-2.


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

* Re: Announce: kdb v4.4 is available for kernel 2.6.16
  2006-03-21  5:59 Announce: kdb v4.4 is available for kernel 2.6.16 Keith Owens
  2006-03-24  6:21 ` Keith Owens
@ 2006-04-01 17:04 ` Dan Aloni
  2006-04-01 20:37   ` Hugh Dickins
  2006-04-01 23:43   ` Joe Korty
  1 sibling, 2 replies; 6+ messages in thread
From: Dan Aloni @ 2006-04-01 17:04 UTC (permalink / raw)
  To: Keith Owens, Nathan Scott; +Cc: kdb, linux-kernel

On Tue, Mar 21, 2006 at 04:59:24PM +1100, Keith Owens wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> KDB (Linux Kernel Debugger) has been updated for kernel 2.6.16.
> 
> ftp://oss.sgi.com/projects/kdb/download/v4.4/
> ftp://ftp.ocs.com.au/pub/mirrors/oss.sgi.com/projects/kdb/download/v4.4/
> 
> Note:  Due to a spam attack, the kdb@oss.sgi.com mailing list is now
> subscriber only.  If you reply to this mail, you may wish to trim
> kdb@oss.sgi.com from the cc: list.
> 
> Thanks to Nathan Scott for updating KDB while I was on holiday.
> 
> Current versions are :-
> 
>   kdb-v4.4-2.6.16-common-1.bz2
>   kdb-v4.4-2.6.16-i386-1.bz2
>   kdb-v4.4-2.6.16-ia64-1.bz2

Thanks for this new version, however I'm looking forward to see
kdb maintained also for the x86_64 architecture. Currently I have 
got as far as forward-porting it to a level where it "works" except 
for one annoying issue where setjmp/longjmp looks to be broken:

[0]more> q                                                   
invalid opcode: 0000 [1] SMP 
kdb: Debugger re-entered on cpu 0, new reason = 5
     Attempting to abort command and recover     
invalid opcode: 0000 [2] SMP                
kdb: Debugger re-entered on cpu 0, new reason = 5
     Attempting to abort command and recover     
invalid opcode: 0000 [3] SMP                
kdb: Debugger re-entered on cpu 0, new reason = 5
     Attempting to abort command and recover     
invalid opcode: 0000 [4] SMP                
kdb: Debugger re-entered on cpu 0, new reason = 5
     Attempting to abort command and recover     
invalid opcode: 0000 [5] SMP                
[...]

An inescapable loop. 

Kernel configured with CONFIG_FRAME_POINTER=y,
gcc version 3.3.5 (Debian 1:3.3.5-13).

ffffffff8032fc90 <kdba_setjmp>:
ffffffff8032fc90:       55                      push   %rbp
ffffffff8032fc91:       48 89 e5                mov    %rsp,%rbp
ffffffff8032fc94:       48 89 5f 00             mov    %rbx,0x0(%rdi)
ffffffff8032fc98:       48 89 6f 08             mov    %rbp,0x8(%rdi)
ffffffff8032fc9c:       4c 89 67 10             mov    %r12,0x10(%rdi)
ffffffff8032fca0:       4c 89 6f 18             mov    %r13,0x18(%rdi)
ffffffff8032fca4:       4c 89 77 20             mov    %r14,0x20(%rdi)
ffffffff8032fca8:       4c 89 7f 28             mov    %r15,0x28(%rdi)
ffffffff8032fcac:       48 8d 54 24 10          lea    0x10(%rsp),%rdx
ffffffff8032fcb1:       48 89 57 30             mov    %rdx,0x30(%rdi)
ffffffff8032fcb5:       48 8b 04 24             mov    (%rsp),%rax
ffffffff8032fcb9:       48 89 47 38             mov    %rax,0x38(%rdi)
ffffffff8032fcbd:       65 8b 04 25 24 00 00    mov    %gs:0x24,%eax
ffffffff8032fcc4:       00 
ffffffff8032fcc5:       48 c7 c1 c0 86 57 80    mov    $0xffffffff805786c0,%rcx
ffffffff8032fccc:       48 98                   cltq   
ffffffff8032fcce:       8b 14 81                mov    (%rcx,%rax,4),%edx
ffffffff8032fcd1:       80 ce 04                or     $0x4,%dh
ffffffff8032fcd4:       89 14 81                mov    %edx,(%rcx,%rax,4)
ffffffff8032fcd7:       31 c0                   xor    %eax,%eax
ffffffff8032fcd9:       c9                      leaveq 
ffffffff8032fcda:       c3                      retq   
ffffffff8032fcdb:       66                      data16
ffffffff8032fcdc:       66                      data16
ffffffff8032fcdd:       90                      nop    
ffffffff8032fcde:       66                      data16
ffffffff8032fcdf:       90                      nop    

ffffffff8032fce0 <kdba_longjmp>:
ffffffff8032fce0:       55                      push   %rbp
ffffffff8032fce1:       48 89 e5                mov    %rsp,%rbp
ffffffff8032fce4:       48 8b 5f 00             mov    0x0(%rdi),%rbx
ffffffff8032fce8:       48 8b 6f 08             mov    0x8(%rdi),%rbp
ffffffff8032fcec:       4c 8b 67 10             mov    0x10(%rdi),%r12
ffffffff8032fcf0:       4c 8b 6f 18             mov    0x18(%rdi),%r13
ffffffff8032fcf4:       4c 8b 77 20             mov    0x20(%rdi),%r14
ffffffff8032fcf8:       4c 8b 7f 28             mov    0x28(%rdi),%r15
ffffffff8032fcfc:       85 f6                   test   %esi,%esi
ffffffff8032fcfe:       b8 01 00 00 00          mov    $0x1,%eax
ffffffff8032fd03:       0f 44 f0                cmove  %eax,%esi
ffffffff8032fd06:       89 f0                   mov    %esi,%eax
ffffffff8032fd08:       48 8b 57 38             mov    0x38(%rdi),%rdx
ffffffff8032fd0c:       48 8b 67 30             mov    0x30(%rdi),%rsp
ffffffff8032fd10:       ff e2                   jmpq   *%edx
ffffffff8032fd12:       c9                      leaveq 
ffffffff8032fd13:       c3                      retq   
ffffffff8032fd14:       66                      data16
ffffffff8032fd15:       66                      data16
ffffffff8032fd16:       66                      data16
ffffffff8032fd17:       90                      nop    
ffffffff8032fd18:       66                      data16
ffffffff8032fd19:       66                      data16
ffffffff8032fd1a:       66                      data16
ffffffff8032fd1b:       90                      nop    
ffffffff8032fd1c:       66                      data16
ffffffff8032fd1d:       66                      data16
ffffffff8032fd1e:       66                      data16
ffffffff8032fd1f:       90                      nop
-- 
Dan Aloni, Linux specialist
XIV LTD, http://www.xivstorage.com
da-x@monatomic.org, da-x@colinux.org, da-x@gmx.net, dan@xiv.co.il

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

* Re: Announce: kdb v4.4 is available for kernel 2.6.16
  2006-04-01 17:04 ` Dan Aloni
@ 2006-04-01 20:37   ` Hugh Dickins
  2006-04-01 23:43   ` Joe Korty
  1 sibling, 0 replies; 6+ messages in thread
From: Hugh Dickins @ 2006-04-01 20:37 UTC (permalink / raw)
  To: Dan Aloni; +Cc: Keith Owens, Nathan Scott, kdb, linux-kernel

On Sat, 1 Apr 2006, Dan Aloni wrote:
> 
> Thanks for this new version, however I'm looking forward to see
> kdb maintained also for the x86_64 architecture. Currently I have 
> got as far as forward-porting it to a level where it "works" except 
> for one annoying issue where setjmp/longjmp looks to be broken:
> 
> Kernel configured with CONFIG_FRAME_POINTER=y,

I've not tried latest kdb, but you should find the patch below still
works (removing that unnecessary KDB_STATE_SET(LONGJMP) is probably
irrelevant, just something I did on the way, and which does no harm).

Hugh

--- 2.6.13-kdb/arch/x86_64/kdb/kdbasupport.c	2005-09-09 12:34:43.000000000 +0100
+++ fixed/arch/x86_64/kdb/kdbasupport.c	2005-08-30 15:10:20.000000000 +0100
@@ -1035,14 +1004,15 @@ kdba_setjmp(kdb_jmp_buf *jb)
 {
 #if defined(CONFIG_FRAME_POINTER)
 	__asm__("movq %rbx, (0*8)(%rdi);"
-		"movq %rbp, (1*8)(%rdi);"
+		"movq (%rsp), %rax;"
+		"movq %rax, (1*8)(%rdi);"
 		"movq %r12, (2*8)(%rdi);"
 		"movq %r13, (3*8)(%rdi);"
 		"movq %r14, (4*8)(%rdi);"
 		"movq %r15, (5*8)(%rdi);"
 		"leaq 16(%rsp), %rdx;"
 		"movq %rdx, (6*8)(%rdi);"
-		"movq (%rsp), %rax;"
+		"movq 8(%rsp), %rax;"
 		"movq %rax, (7*8)(%rdi)");
 #else	 /* CONFIG_FRAME_POINTER */
 	__asm__("movq %rbx, (0*8)(%rdi);"
@@ -1056,7 +1026,6 @@ kdba_setjmp(kdb_jmp_buf *jb)
 		"movq (%rsp), %rax;"
 		"movq %rax, (7*8)(%rdi)");
 #endif   /* CONFIG_FRAME_POINTER */
-	KDB_STATE_SET(LONGJMP);
 	return 0;
 }
 

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

* Re: Announce: kdb v4.4 is available for kernel 2.6.16
  2006-04-01 17:04 ` Dan Aloni
  2006-04-01 20:37   ` Hugh Dickins
@ 2006-04-01 23:43   ` Joe Korty
  2006-04-02 10:23     ` Dan Aloni
  1 sibling, 1 reply; 6+ messages in thread
From: Joe Korty @ 2006-04-01 23:43 UTC (permalink / raw)
  To: Dan Aloni; +Cc: Keith Owens, Nathan Scott, kdb, linux-kernel

On Sat, Apr 01, 2006 at 08:04:30PM +0300, Dan Aloni wrote:
> > Current versions are :-
> > 
> >   kdb-v4.4-2.6.16-common-1.bz2
> >   kdb-v4.4-2.6.16-i386-1.bz2
> >   kdb-v4.4-2.6.16-ia64-1.bz2
> 
> Thanks for this new version, however I'm looking forward to see
> kdb maintained also for the x86_64 architecture. Currently I have 
> got as far as forward-porting it to a level where it "works" except 
> for one annoying issue where setjmp/longjmp looks to be broken:

Problem is due to the mixed C/asm implementation of setjmp/longjmp.
Replace that with one written entirely in assemply and it will work.
Here's mine:

/* setjmp / longjmp for the kernel.
 * Inspired by the glibc version.
 */
	.text
	.globl	__kernel_setjmp
	.p2align 4
__kernel_setjmp:
	movq	%rbx,0x0(%rdi)
	movq	%rbp,0x8(%rdi)
	movq	%r12,0x10(%rdi)
	movq	%r13,0x18(%rdi)
	movq	%r14,0x20(%rdi)
	movq	%r15,0x28(%rdi)
	leaq	0x8(%rsp),%rdx
	movq	%rdx,0x30(%rdi)
	movq	(%rsp),%rax
	movq	%rax,0x38(%rdi)
	xorq	%rax,%rax
	ret

	.globl	__kernel_longjmp
__kernel_longjmp:
	movq	0x0(%rdi),%rbx
	movq	0x8(%rdi),%rbp
	movq	0x10(%rdi),%r12
	movq	0x18(%rdi),%r13
	movq	0x20(%rdi),%r14
	movq	0x28(%rdi),%r15
	test	%esi,%esi
	mov	$1,%eax
	cmove	%eax,%esi
	mov	%esi,%eax
	movq	0x38(%rdi),%rdx
	movq	0x30(%rdi),%rsp
	jmpq	*%rdx

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

* Re: Announce: kdb v4.4 is available for kernel 2.6.16
  2006-04-01 23:43   ` Joe Korty
@ 2006-04-02 10:23     ` Dan Aloni
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Aloni @ 2006-04-02 10:23 UTC (permalink / raw)
  To: Joe Korty; +Cc: Keith Owens, Nathan Scott, kdb, linux-kernel

On Sat, Apr 01, 2006 at 06:43:13PM -0500, Joe Korty wrote:
> On Sat, Apr 01, 2006 at 08:04:30PM +0300, Dan Aloni wrote:
> > > Current versions are :-
> > > 
> > >   kdb-v4.4-2.6.16-common-1.bz2
> > >   kdb-v4.4-2.6.16-i386-1.bz2
> > >   kdb-v4.4-2.6.16-ia64-1.bz2
> > 
> > Thanks for this new version, however I'm looking forward to see
> > kdb maintained also for the x86_64 architecture. Currently I have 
> > got as far as forward-porting it to a level where it "works" except 
> > for one annoying issue where setjmp/longjmp looks to be broken:
> 
> Problem is due to the mixed C/asm implementation of setjmp/longjmp.
> Replace that with one written entirely in assemply and it will work.
> Here's mine:

Thanks, it's obviously a better way to do it, I've tested it and 
made it into a patch:

diff --git a/arch/x86_64/kdb/kdbasupport.c b/arch/x86_64/kdb/kdbasupport.c
index 57c2a72..1be4909 100644
--- a/arch/x86_64/kdb/kdbasupport.c
+++ b/arch/x86_64/kdb/kdbasupport.c
@@ -1029,71 +1029,41 @@ kdba_clearsinglestep(struct pt_regs *reg
 		regs->eflags &= ~EF_IE;
 }
 
-#ifdef KDB_HAVE_LONGJMP
-int asmlinkage
-kdba_setjmp(kdb_jmp_buf *jb)
-{
-#if defined(CONFIG_FRAME_POINTER)
-	__asm__("movq %rbx, (0*8)(%rdi);"
-		"movq %rbp, (1*8)(%rdi);"
-		"movq %r12, (2*8)(%rdi);"
-		"movq %r13, (3*8)(%rdi);"
-		"movq %r14, (4*8)(%rdi);"
-		"movq %r15, (5*8)(%rdi);"
-		"leaq 16(%rsp), %rdx;"
-		"movq %rdx, (6*8)(%rdi);"
-		"movq (%rsp), %rax;"
-		"movq %rax, (7*8)(%rdi)");
-#else	 /* CONFIG_FRAME_POINTER */
-	__asm__("movq %rbx, (0*8)(%rdi);"
-		"movq %rbp, (1*8)(%rdi);"
-		"movq %r12, (2*8)(%rdi);"
-		"movq %r13, (3*8)(%rdi);"
-		"movq %r14, (4*8)(%rdi);"
-		"movq %r15, (5*8)(%rdi);"
-		"leaq 8(%rsp), %rdx;"
-		"movq %rdx, (6*8)(%rdi);"
-		"movq (%rsp), %rax;"
-		"movq %rax, (7*8)(%rdi)");
-#endif   /* CONFIG_FRAME_POINTER */
-	KDB_STATE_SET(LONGJMP);
-	return 0;
-}
-
-void asmlinkage
-kdba_longjmp(kdb_jmp_buf *jb, int reason)
-{
-#if defined(CONFIG_FRAME_POINTER)
-	__asm__("movq (0*8)(%rdi),%rbx;"
-		"movq (1*8)(%rdi),%rbp;"
-		"movq (2*8)(%rdi),%r12;"
-		"movq (3*8)(%rdi),%r13;"
-		"movq (4*8)(%rdi),%r14;"
-		"movq (5*8)(%rdi),%r15;"
-		"test %esi,%esi;"
-		"mov $01,%eax;"
-		"cmove %eax,%esi;"
-		"mov %esi, %eax;"
-		"movq (7*8)(%rdi),%rdx;"
-		"movq (6*8)(%rdi),%rsp;"
-		"jmpq *%rdx");
-#else    /* CONFIG_FRAME_POINTER */
-	__asm__("movq (0*8)(%rdi),%rbx;"
-		"movq (1*8)(%rdi),%rbp;"
-		"movq (2*8)(%rdi),%r12;"
-		"movq (3*8)(%rdi),%r13;"
-		"movq (4*8)(%rdi),%r14;"
-		"movq (5*8)(%rdi),%r15;"
-		"test %esi,%esi;"
-		"mov $01,%eax;"
-		"cmove %eax,%esi;"
-		"mov %esi, %eax;"
-		"movq (7*8)(%rdi),%rdx;"
-		"movq (6*8)(%rdi),%rsp;"
-		"jmpq *%rdx");
-#endif	 /* CONFIG_FRAME_POINTER */
-}
-#endif	/* KDB_HAVE_LONGJMP */
+asm(
+"        .section .text\n"
+"        .globl  kdba_setjmp\n"
+"        .p2align 4\n"
+"kdba_setjmp:\n"
+"        movq    %rbx,0x0(%rdi)\n"
+"        movq    %rbp,0x8(%rdi)\n"
+"        movq    %r12,0x10(%rdi)\n"
+"        movq    %r13,0x18(%rdi)\n"
+"        movq    %r14,0x20(%rdi)\n"
+"        movq    %r15,0x28(%rdi)\n"
+"        leaq    0x8(%rsp),%rdx\n"
+"        movq    %rdx,0x30(%rdi)\n"
+"        movq    (%rsp),%rax\n"
+"        movq    %rax,0x38(%rdi)\n"
+"        xorq    %rax,%rax\n"
+"        ret\n"
+"           \n"
+"        .globl  kdba_longjmp\n"
+"kdba_longjmp:\n"
+"        movq    0x0(%rdi),%rbx\n"
+"        movq    0x8(%rdi),%rbp\n"
+"        movq    0x10(%rdi),%r12\n"
+"        movq    0x18(%rdi),%r13\n"
+"        movq    0x20(%rdi),%r14\n"
+"        movq    0x28(%rdi),%r15\n"
+"        test    %esi,%esi\n"
+"        mov     $1,%eax\n"
+"        cmove   %eax,%esi\n"
+"        mov     %esi,%eax\n"
+"        movq    0x38(%rdi),%rdx\n"
+"        movq    0x30(%rdi),%rsp\n"
+"        jmpq    *%rdx\n"
+"        .previous\n"
+);
 
 /*
  * kdba_enable_lbr


-- 
Dan Aloni, Linux specialist
XIV LTD, http://www.xivstorage.com
da-x@monatomic.org, da-x@colinux.org, da-x@gmx.net, dan@xiv.co.il

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

end of thread, other threads:[~2006-04-02 10:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-21  5:59 Announce: kdb v4.4 is available for kernel 2.6.16 Keith Owens
2006-03-24  6:21 ` Keith Owens
2006-04-01 17:04 ` Dan Aloni
2006-04-01 20:37   ` Hugh Dickins
2006-04-01 23:43   ` Joe Korty
2006-04-02 10:23     ` Dan Aloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome