Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2247843ybh; Mon, 9 Mar 2020 02:01:15 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvghdOIZkSSJBkPogX/LoMesF9BkhZpoZ+ACRtTNSu1qDWBXHCU1EkhQ2hoS+0+eFZfdJA3 X-Received: by 2002:a05:6830:4b1:: with SMTP id l17mr4422901otd.275.1583744475310; Mon, 09 Mar 2020 02:01:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583744475; cv=none; d=google.com; s=arc-20160816; b=LrBTb2L/fUMnLOJlHftFvSBOgBhZVx1Nzuc2KQ9DLcn3EMUBazivNufaXeX2ezy9Lf zWdbYNViMl4qY0RYWJ6MfPQu0BP8BrIautTGs+LoM+/hIiIxTfniH2r2XNKny1CCXv8r Q7slzb5KTEHzZ+WYBF6+C1oTA/VEUTI4sSO3/S9p/5DeNucD0+mkEAZqwZxo4HQI/d4g ULGzmrp5siCZSTbRvj/u/d2nAYg4HgKi6Rq0FXE6f8NQvgehVRB4DWCF87OQX/Gs47uN 9QDbtXyDG2Nm+Fl0U8PKzkNCkv+QHZENm+4pruI3Q4NtNursp0LxvqBRjdCjQpBi6k7P kxsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:references:in-reply-to:date:subject:cc:to:from; bh=ntqi7UOqIA770UC70whCLVrxg7Ba0kVCDbIA3EW9fH8=; b=P/kpxxjwmExkNaH7MzQe6SuOUpgxcprmr6+f/tObAKOrQKTCQvNMxqGpC/2EpKit9B qKRBwteGZW91ur8iUAe2GStF9Uop4RZ8Wwyy3uFARTY6vFEaxeToPnRlm3/EWdA14t9+ Ru3jyt7XQdCu2G1EiGk2RYECrgsEmqMykRiYVwwteZasfPtDU1o9ettGNnx55140LCJl cvdKAXspiBQOo4sqOZS9CI53eN745qGp55vJ2grcpBJoIvJvBe650bqorYUQWRU5NaWR xgmEGU1NvG9wjHAY3mkqR0xyMLFATdqRIdgUL7+4ZtHe6H/OdbzMV5xPPeRn/5DK4fhJ r0LQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v6si3874871oic.163.2020.03.09.02.01.04; Mon, 09 Mar 2020 02:01:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726949AbgCII7b (ORCPT + 99 others); Mon, 9 Mar 2020 04:59:31 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:34262 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726901AbgCII72 (ORCPT ); Mon, 9 Mar 2020 04:59:28 -0400 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0298oqhr188896 for ; Mon, 9 Mar 2020 04:59:27 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2ym850d26a-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 09 Mar 2020 04:59:27 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 9 Mar 2020 08:59:24 -0000 Received: from b06avi18626390.portsmouth.uk.ibm.com (9.149.26.192) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 9 Mar 2020 08:59:21 -0000 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0298wKEV42926496 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 9 Mar 2020 08:58:20 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B0AC6A404D; Mon, 9 Mar 2020 08:59:19 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3666CA4051; Mon, 9 Mar 2020 08:59:17 +0000 (GMT) Received: from bangoria.in.ibm.com (unknown [9.124.31.44]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 9 Mar 2020 08:59:17 +0000 (GMT) From: Ravi Bangoria To: mpe@ellerman.id.au, mikey@neuling.org Cc: apopple@linux.ibm.com, paulus@samba.org, npiggin@gmail.com, christophe.leroy@c-s.fr, naveen.n.rao@linux.vnet.ibm.com, peterz@infradead.org, jolsa@kernel.org, oleg@redhat.com, fweisbec@gmail.com, mingo@kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Ravi Bangoria Subject: [PATCH 14/15] powerpc/watchpoint/xmon: Don't allow breakpoint overwriting Date: Mon, 9 Mar 2020 14:28:05 +0530 X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200309085806.155823-1-ravi.bangoria@linux.ibm.com> References: <20200309085806.155823-1-ravi.bangoria@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 20030908-0012-0000-0000-0000038E7F6D X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20030908-0013-0000-0000-000021CB4680 Message-Id: <20200309085806.155823-15-ravi.bangoria@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-03-09_02:2020-03-06,2020-03-09 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 bulkscore=0 lowpriorityscore=0 clxscore=1015 malwarescore=0 phishscore=0 mlxscore=0 mlxlogscore=728 adultscore=0 suspectscore=2 priorityscore=1501 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2003090066 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Xmon allows overwriting breakpoints because it's supported by only one dawr. But with multiple dawrs, overwriting becomes ambiguous or unnecessary complicated. So let's not allow it. Signed-off-by: Ravi Bangoria --- arch/powerpc/xmon/xmon.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index 0ca0d29f99c6..ac18fe3e4295 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c @@ -1381,6 +1381,10 @@ bpt_cmds(void) printf("Hardware data breakpoint not supported on this cpu\n"); break; } + if (dabr.enabled) { + printf("Couldn't find free breakpoint register\n"); + break; + } mode = 7; cmd = inchar(); if (cmd == 'r') -- 2.21.1