Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756406AbZFBWqP (ORCPT ); Tue, 2 Jun 2009 18:46:15 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754790AbZFBWnv (ORCPT ); Tue, 2 Jun 2009 18:43:51 -0400 Received: from fg-out-1718.google.com ([72.14.220.159]:21888 "EHLO fg-out-1718.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754518AbZFBWnt (ORCPT ); Tue, 2 Jun 2009 18:43:49 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=nZzXPcrTEUlyW3eF62od/foFkO2rwolOUF+KzWxBjnUNmyEVXYJzYVdxARC9IXAgWi IfPakRSr684xAYa+3Rj72Mt/ZpM1vGfaZwHiPlRCYNq+jcT96UVV2Wdk0li9G9YMYalz QltZPwwhvI+EEGwcNV1u7GBWdTKm9ypjfo8O4= From: Frederic Weisbecker To: Ingo Molnar Cc: LKML , "K.Prasad" , Steven Rostedt , Alan Stern , Frederic Weisbecker Subject: [PATCH 09/12] hw-breakpoints: cleanup HW Breakpoint registers before kexec Date: Wed, 3 Jun 2009 00:43:33 +0200 Message-Id: <1243982616-18212-10-git-send-email-fweisbec@gmail.com> X-Mailer: git-send-email 1.6.2.3 In-Reply-To: <1243982616-18212-1-git-send-email-fweisbec@gmail.com> References: <1243982616-18212-1-git-send-email-fweisbec@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2092 Lines: 63 From: K.Prasad This patch disables Hardware breakpoints before doing a 'kexec' on the machine so that the cpu doesn't keep debug registers values which would be out of sync for the new image. Original-patch-by: Alan Stern Signed-off-by: K.Prasad Reviewed-by: Alan Stern Signed-off-by: Frederic Weisbecker --- arch/x86/kernel/machine_kexec_32.c | 2 ++ arch/x86/kernel/machine_kexec_64.c | 2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/machine_kexec_32.c b/arch/x86/kernel/machine_kexec_32.c index c1c429d..c843f84 100644 --- a/arch/x86/kernel/machine_kexec_32.c +++ b/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 diff --git a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c index 84c3bf2..4a8bb82 100644 --- a/arch/x86/kernel/machine_kexec_64.c +++ b/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 -- 1.6.2.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/