Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp992809ybg; Wed, 3 Jun 2020 20:40:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzckMx0CrJ9p+yv1hGdm3oC2zOoRYiDO7JQZXNJVJLPz8a933rVlQbd2R6bKuwWtUypHINC X-Received: by 2002:a17:906:fcb7:: with SMTP id qw23mr2005672ejb.229.1591242009649; Wed, 03 Jun 2020 20:40:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591242009; cv=none; d=google.com; s=arc-20160816; b=JLbT8FjEGPMRMS1Nv87pI+bdFqd//8wsC0Bc2vMEtognjlsPDgN4Ytehc/mGqoPO1S Wm+VQWHH6UeFeywnu0YRQ3l/lNGEYDhH9Oc5U5WiZN3x8bgvJ852j3jsVJyjY65xBIk8 XrBPoKAMkQVoJOrVuHcAQumEVq41Vgjbj9nLhe3QTcU8OVeV7vOksgKq+8VSa4MyVNrE b6yT1szrx154tzd+w8CKDbVp4BFqwYLh8MuwDY1mtEZgj03uDhwUFKM9TQ2VMay8fl6u Vj0XPynMNuUEeFLnVnQEb6OdrAXr8ecU5f3DSklmZajPntYm61P3SkzHaBUTWjTTuQp9 Emyw== 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=f46RnSmPP5sU6tAagZ+YAFmdROQZfqEuzGDlq2YkTfs=; b=sqP5bdcq1+hByc4mWmk38+TLOioIR8+lV1do0VMy7c4ejful1Hpd/3vBLvh1wpuipc hQ1RpS3S0CTSS3BbQQuJpQW4g1W8gWnUOOFJSssQxD/GZRaUS3vxC7kJZ8C8VkHanfwf YQ7H8TGLJff27uA/KpF7GvFoeBiL6HGccXoiGeaRKq/ictbtnBHFO2KHJtu/g4/kMVZR 9MQPs+yFdlfLiwcmunaX2to1q/eZdXSh9tO/ltHSvYGvrDjfVHTqwhkp12ek2Gsi4Sy0 zgb5N4Kv1DJV6mv0KJG4WM11YJT7YjkcTqc4fUhf9KZwTCDaWZRN6puSO7bpEbV5NzDD Pp1w== 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 x3si883497ejc.127.2020.06.03.20.39.47; Wed, 03 Jun 2020 20:40:09 -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 S1727843AbgFDDfv (ORCPT + 99 others); Wed, 3 Jun 2020 23:35:51 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:60154 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727828AbgFDDfu (ORCPT ); Wed, 3 Jun 2020 23:35:50 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 05432fhj144869; Wed, 3 Jun 2020 23:35:25 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 31ek4s14hd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 03 Jun 2020 23:35:25 -0400 Received: from m0098414.ppops.net (m0098414.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 054360dT153433; Wed, 3 Jun 2020 23:35:24 -0400 Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0b-001b2d01.pphosted.com with ESMTP id 31ek4s14gm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 03 Jun 2020 23:35:24 -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 0543QNOo014509; Thu, 4 Jun 2020 03:35:22 GMT Received: from b06avi18878370.portsmouth.uk.ibm.com (b06avi18878370.portsmouth.uk.ibm.com [9.149.26.194]) by ppma04ams.nl.ibm.com with ESMTP id 31bf4816m0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 04 Jun 2020 03:35:21 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 0543ZJ6M65995024 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 4 Jun 2020 03:35:19 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 301FB11C054; Thu, 4 Jun 2020 03:35:19 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7C65811C04C; Thu, 4 Jun 2020 03:35:15 +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:15 +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 4/8] powerpc/watchpoint: Set CPU_FTR_DAWR1 based on pa-features bit Date: Thu, 4 Jun 2020 09:04:39 +0530 Message-Id: <20200604033443.70591-5-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 malwarescore=0 mlxscore=0 phishscore=0 suspectscore=0 spamscore=0 cotscore=-2147483648 clxscore=1015 bulkscore=0 mlxlogscore=999 impostorscore=0 lowpriorityscore=0 priorityscore=1501 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006040017 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 6a3bac357e24..34272cef8ae6 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