From b556b35e98ad2b9174a7a623d152cdf412d1a999 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Wed, 11 Jan 2006 22:43:00 +0100 Subject: [PATCH] x86_64: Move int 3 handler to debug stack and allow to increase it. This - switches the INT3 handler to run on an IST stack (to cope with breakpoints set by a kernel debugger on places where the kernel's %gs base hasn't been set up, yet); the IST stack used is shared with the INT1 handler's [AK: this also allows setting a kprobe on the interrupt/exception entry points] - allows nesting of INT1/INT3 handlers so that one can, with a kernel debugger, debug (at least) the user-mode portions of the INT1/INT3 handling; the nesting isn't actively enabled here since a kernel- debugger-free kernel doesn't need it Signed-Off-By: Jan Beulich Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- include/asm-x86_64/pda.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/asm-x86_64/pda.h') diff --git a/include/asm-x86_64/pda.h b/include/asm-x86_64/pda.h index 8733ccfa442e..431a909fbec9 100644 --- a/include/asm-x86_64/pda.h +++ b/include/asm-x86_64/pda.h @@ -5,6 +5,7 @@ #include #include #include +#include /* Per processor datastructure. %gs points to it while the kernel runs */ struct x8664_pda { @@ -12,6 +13,9 @@ struct x8664_pda { unsigned long data_offset; /* Per cpu data offset from linker address */ unsigned long kernelstack; /* top of kernel stack for current */ unsigned long oldrsp; /* user rsp for system call */ +#if DEBUG_STKSZ > EXCEPTION_STKSZ + unsigned long debugstack; /* #DB/#BP stack. */ +#endif int irqcount; /* Irq nesting counter. Starts with -1 */ int cpunumber; /* Logical CPU number */ char *irqstackptr; /* top of irqstack */ @@ -23,10 +27,6 @@ struct x8664_pda { unsigned apic_timer_irqs; } ____cacheline_aligned_in_smp; - -#define IRQSTACK_ORDER 2 -#define IRQSTACKSIZE (PAGE_SIZE << IRQSTACK_ORDER) - extern struct x8664_pda cpu_pda[]; /* -- cgit v1.2.3-59-g8ed1b