From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e28smtp07.in.ibm.com (e28smtp07.in.ibm.com [59.145.155.7]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "e28smtp07.in.ibm.com", Issuer "Equifax" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 06EDCDDF54 for ; Thu, 4 Jun 2009 02:36:02 +1000 (EST) Received: from d28relay02.in.ibm.com (d28relay02.in.ibm.com [9.184.220.59]) by e28smtp07.in.ibm.com (8.13.1/8.13.1) with ESMTP id n53GZuJE000635 for ; Wed, 3 Jun 2009 22:05:56 +0530 Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay02.in.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n53GZuVD3010654 for ; Wed, 3 Jun 2009 22:05:56 +0530 Received: from d28av01.in.ibm.com (loopback [127.0.0.1]) by d28av01.in.ibm.com (8.13.1/8.13.3) with ESMTP id n53GZuCh022206 for ; Wed, 3 Jun 2009 22:05:56 +0530 Date: Wed, 3 Jun 2009 22:05:53 +0530 From: "K.Prasad" To: David Gibson , linuxppc-dev@ozlabs.org Subject: [Patch 6/6] Adapt kexec and samples code to recognise PPC64 hardware breakpoint usage Message-ID: <20090603163553.GG5197@in.ibm.com> References: <20090603162741.197115376@prasadkr_t60p.in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Michael Neuling , Benjamin Herrenschmidt , paulus@samba.org, Alan Stern , "K.Prasad" , Roland McGrath List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Modify kexec code to disable DABR registers before a reboot. Adapt the samples code to populate PPC64-arch specific fields. Signed-off-by: K.Prasad --- arch/powerpc/kernel/machine_kexec_64.c | 3 +++ samples/hw_breakpoint/data_breakpoint.c | 4 ++++ 2 files changed, 7 insertions(+) Index: linux-2.6-tip.hbkpt/arch/powerpc/kernel/machine_kexec_64.c =================================================================== --- linux-2.6-tip.hbkpt.orig/arch/powerpc/kernel/machine_kexec_64.c +++ linux-2.6-tip.hbkpt/arch/powerpc/kernel/machine_kexec_64.c @@ -24,6 +24,7 @@ #include /* _end */ #include #include +#include int default_machine_kexec_prepare(struct kimage *image) { @@ -214,6 +215,7 @@ static void kexec_prepare_cpus(void) put_cpu(); local_irq_disable(); + hw_breakpoint_disable(); } #else /* ! SMP */ @@ -233,6 +235,7 @@ static void kexec_prepare_cpus(void) if (ppc_md.kexec_cpu_down) ppc_md.kexec_cpu_down(0, 0); local_irq_disable(); + hw_breakpoint_disable(); } #endif /* SMP */ Index: linux-2.6-tip.hbkpt/samples/hw_breakpoint/data_breakpoint.c =================================================================== --- linux-2.6-tip.hbkpt.orig/samples/hw_breakpoint/data_breakpoint.c +++ linux-2.6-tip.hbkpt/samples/hw_breakpoint/data_breakpoint.c @@ -54,6 +54,10 @@ static int __init hw_break_module_init(v sample_hbp.info.type = HW_BREAKPOINT_WRITE; sample_hbp.info.len = HW_BREAKPOINT_LEN_4; #endif /* CONFIG_X86 */ +#ifdef CONFIG_PPC64 + sample_hbp.info.name = ksym_name; + sample_hbp.info.type = HW_BREAKPOINT_WRITE; +#endif /* CONFIG_PPC64 */ sample_hbp.triggered = (void *)sample_hbp_handler;