Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1698977ybh; Thu, 16 Jul 2020 21:14:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+IizEaWHiUQDOtx13oyGzrWlkxSlPFf+/2ZqBNWtX7tAyRjtuwcLEqJ5tNbW2sv4PQbh2 X-Received: by 2002:a17:906:1747:: with SMTP id d7mr6799607eje.39.1594959273973; Thu, 16 Jul 2020 21:14:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594959273; cv=none; d=google.com; s=arc-20160816; b=x7Y0yPsSVPYzfslSH+q84f9cTdCAn4I4BaR626fyIGFF8+BptTXPSf/Ohb7w1MJexC gmxMaQbZEjxfJ6fSRuh34uZ/Drs6MonHaBa7dA68wP5IPMufM7cDbgRiH4yXekGLfQQn P/Q/3z+xGqIRDtV32hr2zlYVdz0MD6bezhxyEitRRLf7/ptuSEJRuXMBIBLGnKciYDDf lnZrVAgDQvcmKlSBgHGeUWnJdNGwcrYSc0FucIstvCyeezFfrY3XinYCHS3hC/maHnSJ fIGfjlJ/xJp7TkDeD3JI/SkR5a1clm/k+kF8ql2Oh2HEnAm6vo58sqCIaUxM7ieKH29Q tnRw== 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=uUXnMgRgi0YI9UHyU4XcxWEU+lw+lPFqMZTz39Evgww=; b=sxc67Kh7N7xFGK9PMVLQk1zRUxfnkUFVPhMGw4qGyRLM5mm34ibnra4BnBgrxFwgih k3qnPprsJzbhEwGJzoCRP4ZpRclvDZ7lLWbXENq+xuMNnaZXbWjiYxvW6finArKrhR+9 m8hjMiNtaocMHywCLpnjrHRXtqha9jJf2O4QulTt2nRes/9mgb6BOaZp3ioTz8rzoDUW BBZqHQQmCFu7i0lZHGtRHB2lrO75U+1InNantkpRkF/AixPA3Flhqr475fk8aWcC2TEe kZVY9uTw30FvYx7pwJwR7OHn9eX/h16+TVg33W8Y9NLnJBblG7sEsyMHlF0dxEqGUnoG NrUg== 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 i21si4304918edb.402.2020.07.16.21.14.11; Thu, 16 Jul 2020 21:14:33 -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 S1727001AbgGQELT (ORCPT + 99 others); Fri, 17 Jul 2020 00:11:19 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:58888 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725300AbgGQELS (ORCPT ); Fri, 17 Jul 2020 00:11:18 -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 06H42NdX166935; Fri, 17 Jul 2020 00:10:56 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 32792xvffq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 Jul 2020 00:10:56 -0400 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 06H42ZGF167347; Fri, 17 Jul 2020 00:10:56 -0400 Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0a-001b2d01.pphosted.com with ESMTP id 32792xvfev-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 Jul 2020 00:10:56 -0400 Received: from pps.filterd (ppma05fra.de.ibm.com [127.0.0.1]) by ppma05fra.de.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 06H47F4D008029; Fri, 17 Jul 2020 04:10:53 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma05fra.de.ibm.com with ESMTP id 327q2y2u0r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 Jul 2020 04:10:53 +0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 06H4AoB72818538 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 17 Jul 2020 04:10:50 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CB058AE051; Fri, 17 Jul 2020 04:10:50 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C883AAE04D; Fri, 17 Jul 2020 04:10:46 +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:10:46 +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 06/10] powerpc/watchpoint: Set CPU_FTR_DAWR1 based on pa-features bit Date: Fri, 17 Jul 2020 09:39:54 +0530 Message-Id: <20200717040958.70561-7-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 suspectscore=0 mlxlogscore=-1000 priorityscore=1501 lowpriorityscore=0 clxscore=1015 adultscore=0 impostorscore=0 spamscore=100 malwarescore=0 bulkscore=0 mlxscore=100 phishscore=0 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 As per the PAPR, bit 0 of byte 64 in pa-features property indicates availability of 2nd DAWR registers. i.e. If this bit is set, 2nd DAWR is present, otherwise not. Host generally uses "cpu-features", which masks "pa-features". But "cpu-features" are still not used for guests and thus this change is mostly applicable for guests only. Signed-off-by: Ravi Bangoria --- arch/powerpc/kernel/prom.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 9cc49f265c86..c76c09b97bc8 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -175,6 +175,8 @@ static struct ibm_pa_feature { */ { .pabyte = 22, .pabit = 0, .cpu_features = CPU_FTR_TM_COMP, .cpu_user_ftrs2 = PPC_FEATURE2_HTM_COMP | PPC_FEATURE2_HTM_NOSC_COMP }, + + { .pabyte = 64, .pabit = 0, .cpu_features = CPU_FTR_DAWR1 }, }; static void __init scan_features(unsigned long node, const unsigned char *ftrs, -- 2.26.2