The disabling of hardware breakpoint debugging isn't required because -mm doesn't have this feature yet. Make it conform to CONFIG_KGDB_ARCH_HAS_HARDWARE_BREAKPOINTS. Also eliminate the function kgdb_disable_hw_debug from x86 and x86_64. The removal from ia64 will be done in another patch. Last make kgdb_disable_hw_debug like other hw breakpoint interfaces defined in include/asm-generic/kgdb.h.
Please note, this patch was only compile and linked. Signed-off-by: Bob Picco <[EMAIL PROTECTED]> arch/i386/kernel/kgdb.c | 6 ------ arch/x86_64/kernel/kgdb.c | 6 ------ include/asm-generic/kgdb.h | 22 +++++++++++----------- 3 files changed, 11 insertions(+), 23 deletions(-) Index: linux-2.6-kgdb-testing.git/arch/i386/kernel/kgdb.c =================================================================== --- linux-2.6-kgdb-testing.git.orig/arch/i386/kernel/kgdb.c 2006-09-26 13:35:35.000000000 -0400 +++ linux-2.6-kgdb-testing.git/arch/i386/kernel/kgdb.c 2006-09-26 13:36:51.000000000 -0400 @@ -126,12 +126,6 @@ static struct hw_breakpoint { { .enabled = 0 }, }; -void kgdb_disable_hw_debug(struct pt_regs *regs) -{ - /* Disable hardware debugging while we are in kgdb */ - asm volatile ("movl %0,%%db7": /* no output */ :"r" (0)); -} - void kgdb_post_master_code(struct pt_regs *regs, int e_vector, int err_code) { /* Master processor is completely in the debugger */ Index: linux-2.6-kgdb-testing.git/arch/x86_64/kernel/kgdb.c =================================================================== --- linux-2.6-kgdb-testing.git.orig/arch/x86_64/kernel/kgdb.c 2006-09-26 13:35:35.000000000 -0400 +++ linux-2.6-kgdb-testing.git/arch/x86_64/kernel/kgdb.c 2006-09-26 13:36:51.000000000 -0400 @@ -136,12 +136,6 @@ enabled:0}, { enabled:0}, { enabled:0}}; -void kgdb_disable_hw_debug(struct pt_regs *regs) -{ - /* Disable hardware debugging while we are in kgdb */ - asm volatile ("movq %0,%%db7": /* no output */ :"r" (0UL)); -} - void kgdb_post_master_code(struct pt_regs *regs, int e_vector, int err_code) { /* Master processor is completely in the debugger */ Index: linux-2.6-kgdb-testing.git/include/asm-generic/kgdb.h =================================================================== --- linux-2.6-kgdb-testing.git.orig/include/asm-generic/kgdb.h 2006-09-26 13:36:44.000000000 -0400 +++ linux-2.6-kgdb-testing.git/include/asm-generic/kgdb.h 2006-09-26 16:17:16.000000000 -0400 @@ -45,18 +45,7 @@ int kgdb_skipexception(int exception, st */ extern void kgdb_post_master_code(struct pt_regs *regs, int e_vector, int err_code); - -/** - * kgdb_disable_hw_debug - Disable hardware debugging while we in kgdb. - * @regs: Current &struct pt_regs. - * - * This function will be called if the particular architecture must - * disable hardware debugging while it is processing gdb packets or - * handling exception. - */ -extern void kgdb_disable_hw_debug(struct pt_regs *regs); #else -#define kgdb_disable_hw_debug(regs) do { } while (0) #define kgdb_post_master_code(regs, v, c) do { } while (0) #endif @@ -93,11 +82,22 @@ extern void kgdb_remove_all_hw_break(voi * of breakpoint registers. */ extern void kgdb_correct_hw_break(void); + +/** + * kgdb_disable_hw_debug - Disable hardware debugging while we in kgdb. + * @regs: Current &struct pt_regs. + * + * This function will be called if the particular architecture must + * disable hardware debugging while it is processing gdb packets or + * handling exception. + */ +extern void kgdb_disable_hw_debug(struct pt_regs *regs); #else #define kgdb_set_hw_break(addr) 0 #define kgdb_remove_hw_break(addr) 0 #define kgdb_remove_all_hw_break() do { } while (0) #define kgdb_correct_hw_break() do { } while (0) +#define kgdb_disable_hw_debug(ptregs) do { } while (0) #endif #ifdef CONFIG_KGDB_ARCH_HAS_SHADOW_INFO ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Kgdb-bugreport mailing list Kgdb-bugreport@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport