From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752627AbdBNIrh (ORCPT ); Tue, 14 Feb 2017 03:47:37 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:40868 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751685AbdBNIrg (ORCPT ); Tue, 14 Feb 2017 03:47:36 -0500 Subject: Re: [PATCH] powerpc/xmon: Fix data-breakpoint To: mpe@ellerman.id.au References: <1479806759-5409-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com> Cc: benh@kernel.crashing.org, paulus@samba.org, npiggin@gmail.com, peterz@infradead.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, naveen.n.rao@linux.vnet.ibm.com, Ravi Bangoria From: Ravi Bangoria Date: Tue, 14 Feb 2017 14:17:19 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1479806759-5409-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 17021408-0020-0000-0000-00000B5D5B5F X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006613; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000203; SDB=6.00821724; UDB=6.00401921; IPR=6.00599177; BA=6.00005135; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00014274; XFM=3.00000011; UTC=2017-02-14 08:47:33 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17021408-0021-0000-0000-00005A16F50D Message-Id: <58A2C417.8000806@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-02-14_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000 definitions=main-1702140089 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Michael, Can you please pull this patch. Thanks, Ravi On Tuesday 22 November 2016 02:55 PM, Ravi Bangoria wrote: > Xmon data-breakpoint feature is broken. > > Whenever there is a watchpoint match occurs, hw_breakpoint_handler will > be called by do_break via notifier chains mechanism. If watchpoint is > registered by xmon, hw_breakpoint_handler won't find any associated > perf_event and returns immediately with NOTIFY_STOP. Similarly, do_break > also returns without notifying to xmon. > > Solve this by returning NOTIFY_DONE when hw_breakpoint_handler does not > find any perf_event associated with matched watchpoint. > > Signed-off-by: Ravi Bangoria > --- > arch/powerpc/kernel/hw_breakpoint.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/arch/powerpc/kernel/hw_breakpoint.c b/arch/powerpc/kernel/hw_breakpoint.c > index 03d089b..469d86d 100644 > --- a/arch/powerpc/kernel/hw_breakpoint.c > +++ b/arch/powerpc/kernel/hw_breakpoint.c > @@ -228,8 +228,10 @@ int hw_breakpoint_handler(struct die_args *args) > rcu_read_lock(); > > bp = __this_cpu_read(bp_per_reg); > - if (!bp) > + if (!bp) { > + rc = NOTIFY_DONE; > goto out; > + } > info = counter_arch_bp(bp); > > /*