From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757298AbZEUODb (ORCPT ); Thu, 21 May 2009 10:03:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757015AbZEUOCl (ORCPT ); Thu, 21 May 2009 10:02:41 -0400 Received: from e28smtp05.in.ibm.com ([59.145.155.5]:39539 "EHLO e28smtp05.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756976AbZEUOCj (ORCPT ); Thu, 21 May 2009 10:02:39 -0400 Date: Thu, 21 May 2009 19:32:35 +0530 From: "K.Prasad" To: Ingo Molnar , Frederic Weisbecker Cc: Linux Kernel Mailing List , Alan Stern , "K.Prasad" Subject: [Patch 09/12] Cleanup HW Breakpoint registers before kexec Message-ID: <20090521140235.GJ13849@in.ibm.com> References: <20090521095613.834622717@prasadkr_t60p.in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename=modify_kexec_09 User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch disables Hardware breakpoints before doing a 'kexec' on the machine. Original-patch-by: Alan Stern Signed-off-by: K.Prasad Reviewed-by: Alan Stern --- arch/x86/kernel/machine_kexec_32.c | 2 ++ arch/x86/kernel/machine_kexec_64.c | 2 ++ 2 files changed, 4 insertions(+) Index: linux-2.6-tip.hbkpt/arch/x86/kernel/machine_kexec_32.c =================================================================== --- linux-2.6-tip.hbkpt.orig/arch/x86/kernel/machine_kexec_32.c +++ linux-2.6-tip.hbkpt/arch/x86/kernel/machine_kexec_32.c @@ -25,6 +25,7 @@ #include #include #include +#include static void set_idt(void *newidt, __u16 limit) { @@ -202,6 +203,7 @@ void machine_kexec(struct kimage *image) /* Interrupts aren't acceptable while we reboot */ local_irq_disable(); + hw_breakpoint_disable(); if (image->preserve_context) { #ifdef CONFIG_X86_IO_APIC Index: linux-2.6-tip.hbkpt/arch/x86/kernel/machine_kexec_64.c =================================================================== --- linux-2.6-tip.hbkpt.orig/arch/x86/kernel/machine_kexec_64.c +++ linux-2.6-tip.hbkpt/arch/x86/kernel/machine_kexec_64.c @@ -18,6 +18,7 @@ #include #include #include +#include static int init_one_level2_page(struct kimage *image, pgd_t *pgd, unsigned long addr) @@ -282,6 +283,7 @@ void machine_kexec(struct kimage *image) /* Interrupts aren't acceptable while we reboot */ local_irq_disable(); + hw_breakpoint_disable(); if (image->preserve_context) { #ifdef CONFIG_X86_IO_APIC