Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp992685ybg; Wed, 3 Jun 2020 20:39:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/9rTQPF9+n6wNFVHxSlHwDfIGyJXrQ29gwVa60lUQRU85l2v/Kk/L7K3o7o7FU78HFV5r X-Received: by 2002:a50:e607:: with SMTP id y7mr2478918edm.71.1591241991461; Wed, 03 Jun 2020 20:39:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591241991; cv=none; d=google.com; s=arc-20160816; b=1G4duiWMhTJnVKassJ3L0f0kcnEi2lxYVK8UO1uWlmJQUPd5tJlf1t4HkDw5gHVeQ6 lQhFWaUa0yGkDxJKk4e+XiMGYhZYYKJRs4QY+Cl7jo2ddFsWPHMWN5rBAyJTbNVEC8FJ lYI36/be3iNsOeVB2dtRQ8YiSVV/uCPN8BWlBSk2uo7cD6XaO2973zYVjQfQ/a014fq1 r81ACM/MSmJL98oxgUevbdLx12SuFfm241V96mTQ6C1WVqx3fI/G1AFyUCBPcAC8VJDf Lj7pDnwDaHEq0J21ySguVRDuctjhr5kXkJQ8ktJms4xWvc8ZBkYajO0F+sf1WPjBem4Z ER3Q== 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=zlBUydTFzwGB/eeYMRDF6x8pHKB2q4qwC5n8JdAcXno=; b=DshzQYsk90XHJynlmajB3/BcXldyBc5Nbubba0b36ErsO4tR+jceYaPkA6758Z+BgI fzomTJGlmpCUElrNzCqc9Csm3DH50/1TunvXxg+GBSJF+BesTDcRjFzfHKpROjdVzUZP yNQIdpNwahrvzySBE7VXdxJ0QnG+sGGmJABXYMum3B5Q2A9KSxkI6La7u/YFhvVXx2XX BpebUj6Z5x3LrApy8QEcBDqYAacmGYs68xwjb+3+soxG+lxEHjQ61AxTVh3kWWr46R4a 6I+h0b5LA1SXUqwKABM8BEv0Suz4IQ2Tp69NuIHo57h8l3qxbMeY5JP9IhxZ/xJUjrhP V1rg== 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 z3si893469ejm.403.2020.06.03.20.39.28; Wed, 03 Jun 2020 20:39:51 -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 S1727927AbgFDDgK (ORCPT + 99 others); Wed, 3 Jun 2020 23:36:10 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:43478 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727884AbgFDDgI (ORCPT ); Wed, 3 Jun 2020 23:36:08 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 0543XC34097842; Wed, 3 Jun 2020 23:35:41 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 31eq5vatg7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 03 Jun 2020 23:35:40 -0400 Received: from m0098399.ppops.net (m0098399.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 0543XCJr097881; Wed, 3 Jun 2020 23:35:40 -0400 Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 31eq5vatfa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 03 Jun 2020 23:35:40 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 0543QNOr014509; Thu, 4 Jun 2020 03:35:38 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma04ams.nl.ibm.com with ESMTP id 31bf4816md-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 04 Jun 2020 03:35:37 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0543ZZM863766598 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 4 Jun 2020 03:35:35 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 42E9111C04C; Thu, 4 Jun 2020 03:35:35 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8E54511C050; Thu, 4 Jun 2020 03:35:31 +0000 (GMT) Received: from bangoria.ibmuc.com (unknown [9.199.58.254]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 4 Jun 2020 03:35:31 +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, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 8/8] powerpc/watchpoint: Remove 512 byte boundary Date: Thu, 4 Jun 2020 09:04:43 +0530 Message-Id: <20200604033443.70591-9-ravi.bangoria@linux.ibm.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200604033443.70591-1-ravi.bangoria@linux.ibm.com> References: <20200604033443.70591-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.216,18.0.687 definitions=2020-06-03_13:2020-06-02,2020-06-03 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 mlxlogscore=999 adultscore=0 priorityscore=1501 clxscore=1015 impostorscore=0 malwarescore=0 cotscore=-2147483648 suspectscore=0 lowpriorityscore=0 spamscore=0 phishscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006040020 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 031e6defc08e..9a2899f25aae 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