[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86: revert 22983:0edb666c8300
# HG changeset patch # User Tim Deegan <Tim.Deegan@xxxxxxxxxx> # Date 1299513499 0 # Node ID e8f392bbc9dc0156a1875c86c79b68ded3971595 # Parent 076b63b74cf60b466aec379895a5ad348371fcb5 x86: revert 22983:0edb666c8300 run_in_exception_handler _does_ have other users. Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx> --- diff -r 076b63b74cf6 -r e8f392bbc9dc xen/arch/x86/traps.c --- a/xen/arch/x86/traps.c Mon Mar 07 11:34:09 2011 +0000 +++ b/xen/arch/x86/traps.c Mon Mar 07 15:58:19 2011 +0000 @@ -907,15 +907,6 @@ goto die; eip += sizeof(bug); - id = bug.id & 3; - - if ( id == BUGFRAME_state ) - { - show_execution_state(regs); - regs->eip = (unsigned long)eip; - return; - } - /* Decode first pointer argument. */ if ( !is_kernel(eip) || __copy_from_user(&bug_str, eip, sizeof(bug_str)) || @@ -926,6 +917,16 @@ goto die; eip += sizeof(bug_str); + id = bug.id & 3; + + if ( id == BUGFRAME_run_fn ) + { + void (*fn)(struct cpu_user_regs *) = (void *)p; + (*fn)(regs); + regs->eip = (unsigned long)eip; + return; + } + /* WARN, BUG or ASSERT: decode the filename pointer and line number. */ filename = p; lineno = bug.id >> 2; diff -r 076b63b74cf6 -r e8f392bbc9dc xen/include/asm-x86/bug.h --- a/xen/include/asm-x86/bug.h Mon Mar 07 11:34:09 2011 +0000 +++ b/xen/include/asm-x86/bug.h Mon Mar 07 15:58:19 2011 +0000 @@ -13,15 +13,16 @@ unsigned short id; /* BUGFRAME_??? */ } __attribute__((packed)); -#define BUGFRAME_state 0 +#define BUGFRAME_run_fn 0 #define BUGFRAME_warn 1 #define BUGFRAME_bug 2 #define BUGFRAME_assert 3 -#define dump_execution_state() \ +#define run_in_exception_handler(fn) \ asm volatile ( \ - "ud2 ; ret %0" \ - : : "i" (BUGFRAME_state) ) + "ud2 ; ret %0" BUG_STR(1) \ + : : "i" (BUGFRAME_run_fn), \ + "i" (fn) ) #define WARN() \ asm volatile ( \ diff -r 076b63b74cf6 -r e8f392bbc9dc xen/include/asm-x86/processor.h --- a/xen/include/asm-x86/processor.h Mon Mar 07 11:34:09 2011 +0000 +++ b/xen/include/asm-x86/processor.h Mon Mar 07 15:58:19 2011 +0000 @@ -542,6 +542,7 @@ void show_stack_overflow(unsigned int cpu, unsigned long esp); void show_registers(struct cpu_user_regs *regs); void show_execution_state(struct cpu_user_regs *regs); +#define dump_execution_state() run_in_exception_handler(show_execution_state) void show_page_walk(unsigned long addr); asmlinkage void fatal_trap(int trapnr, struct cpu_user_regs *regs); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |