Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1699282ybh; Thu, 16 Jul 2020 21:15:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyo84qx96AnLBZllTjm2nDedIXCOm7WKsa+SFaxAVMjkl3s/ZD0fzMHY+8OVHaALBuxFLRR X-Received: by 2002:a17:906:fac3:: with SMTP id lu3mr7173243ejb.374.1594959319671; Thu, 16 Jul 2020 21:15:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594959319; cv=none; d=google.com; s=arc-20160816; b=Z7iYHtCCk9brPI7SBpFVNC2d5q2jAQnIYjEM0Ffe3W3x95vbzunB3wcysk2FMmeSCY s37Za/eFEglNfiQDxnlp2ouTK3rRKdmPm/S67vqJCEKQ7xzJJYKLUCXUw94MDoZl9xOh bkG9ewuvutYR7UCVnFn1+VOfBjG7oLMhFprnV5nAWqTbIQ2sgbhaAtuLADKovKf4ZvdH 0OXdlPkfuj7T6WMn0jqJdeoKcqUeyQzKcF1v0ttChrkpaM0PQlKPGjYcKZifQcapq3Z1 wdn0S/c8WA+NCYMICLEImr26w+KP9NVz2JHarpUgTjdAtWRTzdqvMDRT2czoKuZDQ/Bi Ix0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=hdZYk2ySpT7ojZCooDE11GhjbreBPBen02c5RNtAXys=; b=p72iJJVeR78wf0uygYr8yhuRNDHjQnUmo0IuJtI5q1STuLaZwFCICcCBDxBANwEtTO 4o/8DukrsGUhyKepTy/D7KTKTGovgt/7f9csxavgwOii7qUR0G7OsSIMNFfFEV4lsJ1j OeDqnG2/lF1OBcZ3egSCuQOyWVyt3dLo8uQO8zlaw0HE5CgIf0eI7ZpyfTot1j9zVBnA UULNHEXaILLh+ZAmXjGIFjP8v8b4j6KB55hqXQGYl+ejvhOmCsfXPJQkH55h66Gfj3F7 ISx+pbi4c3Z19oU632UmsleeJJzOdHXpRaeZEYQ7rwHIXZLPV3yXcgB++f52a9JI+nwT Ccvg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id h21si4476046ejb.246.2020.07.16.21.14.56; Thu, 16 Jul 2020 21:15:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1727795AbgGQELd (ORCPT + 99 others); Fri, 17 Jul 2020 00:11:33 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:4684 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725300AbgGQELc (ORCPT ); Fri, 17 Jul 2020 00:11:32 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06H41uws063746; Fri, 17 Jul 2020 00:11:14 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 32auqune42-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 Jul 2020 00:11:14 -0400 Received: from m0098393.ppops.net (m0098393.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 06H41uSK063825; Fri, 17 Jul 2020 00:11:13 -0400 Received: from ppma03fra.de.ibm.com (6b.4a.5195.ip4.static.sl-reverse.com [149.81.74.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 32auqune3f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 Jul 2020 00:11:13 -0400 Received: from pps.filterd (ppma03fra.de.ibm.com [127.0.0.1]) by ppma03fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 06H4AvtA008173; Fri, 17 Jul 2020 04:11:11 GMT Received: from b06avi18626390.portsmouth.uk.ibm.com (b06avi18626390.portsmouth.uk.ibm.com [9.149.26.192]) by ppma03fra.de.ibm.com with ESMTP id 327527k694-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 Jul 2020 04:11:11 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06avi18626390.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 06H49jBT65798626 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 17 Jul 2020 04:09:45 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 20A45AE051; Fri, 17 Jul 2020 04:11:08 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 36AE9AE045; Fri, 17 Jul 2020 04:11:04 +0000 (GMT) Received: from bangoria.ibmuc.com (unknown [9.199.41.4]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 17 Jul 2020 04:11:04 +0000 (GMT) From: Ravi Bangoria To: mpe@ellerman.id.au, mikey@neuling.org Cc: ravi.bangoria@linux.ibm.com, 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, pedromfc@br.ibm.com, miltonm@us.ibm.com, jniethe5@gmail.com, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 10/10] powerpc/watchpoint: Remove 512 byte boundary Date: Fri, 17 Jul 2020 09:39:58 +0530 Message-Id: <20200717040958.70561-11-ravi.bangoria@linux.ibm.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200717040958.70561-1-ravi.bangoria@linux.ibm.com> References: <20200717040958.70561-1-ravi.bangoria@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-07-16_11:2020-07-16,2020-07-16 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_spam_definite policy=outbound score=100 malwarescore=0 bulkscore=0 adultscore=0 clxscore=1015 phishscore=0 spamscore=100 impostorscore=0 lowpriorityscore=0 suspectscore=0 priorityscore=1501 mlxscore=100 mlxlogscore=-1000 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007170025 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Power10 has removed 512 bytes boundary from match criteria. i.e. The watch range can cross 512 bytes boundary. Signed-off-by: Ravi Bangoria --- arch/powerpc/kernel/hw_breakpoint.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/hw_breakpoint.c b/arch/powerpc/kernel/hw_breakpoint.c index c55e67bab271..1f4a1efa0074 100644 --- a/arch/powerpc/kernel/hw_breakpoint.c +++ b/arch/powerpc/kernel/hw_breakpoint.c @@ -418,8 +418,9 @@ static int hw_breakpoint_validate_len(struct arch_hw_breakpoint *hw) if (dawr_enabled()) { max_len = DAWR_MAX_LEN; - /* DAWR region can't cross 512 bytes boundary */ - if (ALIGN_DOWN(start_addr, SZ_512) != ALIGN_DOWN(end_addr - 1, SZ_512)) + /* DAWR region can't cross 512 bytes boundary on p10 predecessors */ + if (!cpu_has_feature(CPU_FTR_ARCH_31) && + (ALIGN_DOWN(start_addr, SZ_512) != ALIGN_DOWN(end_addr - 1, SZ_512))) return -EINVAL; } else if (IS_ENABLED(CONFIG_PPC_8xx)) { /* 8xx can setup a range without limitation */ -- 2.26.2