Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2210339ybh; Fri, 17 Jul 2020 11:57:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHVOnJLjgZJ2t6SXARj+cv/mw7k9Fmt7ebgtfs6Hrxb2Ij4z7C2aQIfW0rboigECszdo8H X-Received: by 2002:a50:ee84:: with SMTP id f4mr10250710edr.183.1595012254629; Fri, 17 Jul 2020 11:57:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595012254; cv=none; d=google.com; s=arc-20160816; b=G7HTEyxCjN65c4m4pAuN5a3fj0Gt3gfCEktS8x7THZvNzi1rsfXmxQCvkTXsQYfQhT P5npDDp/eajNf3hgswfvg9myd7QUlrYwnYDZZ4bcPUFsE2DbENUbtIAn9PsLZqwwLtX0 XlwiRq3lH9Cu6JOX9DCfL17olZ16PnG5ulkI5hXmlPPKabJKlvWfOuqjN10eXywh1RJn wDjxeRDsA5qSp5SdkkmfWiOI3aXCwNFssau4wbhpqImaZCKKLMsKF1iIM3Dhho+U4xWH 1Wj8gVgNfq6RQ1mx6UrZip+lvKqL+/7myaWeWzpIJHFKxiZaOoFfi52Hv4Rx6l1ucGQr lO5w== 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:to:from; bh=vKahE9DovnYiDFWTkqcYtPL8vH4zwn47UMW5JOMUpoE=; b=uxb6cZCLtpcy6AqKkIFYhY5l3/uVGhPs11gEmw6ng0oSleUFcBAYKvtS8o6TwAz2Sy ugx8vtAMA0KLOtDogQxUj2iVQPsIqMjQE8ka6UVVryZyWNSE0S8643AokaDztvfTMgnz VHdLR/VlCOFoPyFBGu27/kOCSIQB48xNwP3Pp0YRtLbos8jOWIrlPdTHilTNOTqGJjEH j0F7Y5YpwqNLQVLtYngoz9RgDkpoiUKl6sY8mhdMnhfK4jdoAZdmZF4Lu4fKKvaOfnHl bGQ/HvajayeIPDYMQLC8aTr5RsLOPn40N5F2acI4XokbDU7XPwA9qFPBe3z0T93/UprD 2fkg== 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 dj11si5947139edb.279.2020.07.17.11.57.11; Fri, 17 Jul 2020 11:57:34 -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 S1728312AbgGQSxq (ORCPT + 99 others); Fri, 17 Jul 2020 14:53:46 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:47934 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727821AbgGQSxq (ORCPT ); Fri, 17 Jul 2020 14:53:46 -0400 Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06HIbbD2146416; Fri, 17 Jul 2020 14:53:29 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 327u1mxm38-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 Jul 2020 14:53:29 -0400 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 06HI3wLC147345; Fri, 17 Jul 2020 14:53:29 -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 327u1mxm2s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 Jul 2020 14:53:29 -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 06HIeKRL002749; Fri, 17 Jul 2020 18:53:27 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 329nmyk7a8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 Jul 2020 18:53:27 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06avi18878370.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 06HIrOm364422340 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 17 Jul 2020 18:53:24 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9660E5204E; Fri, 17 Jul 2020 18:53:24 +0000 (GMT) Received: from pratiks-thinkpad.ibmuc.com (unknown [9.85.74.95]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 45A345204F; Fri, 17 Jul 2020 18:53:20 +0000 (GMT) From: Pratik Rajesh Sampat To: mpe@ellerman.id.au, npiggin@gmail.com, benh@kernel.crashing.org, paulus@samba.org, mikey@neuling.org, ego@linux.vnet.ibm.com, svaidy@linux.ibm.com, psampat@linux.ibm.com, pratik.r.sampat@gmail.com, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 3/3] powerpc/powernv/idle: Exclude mfspr on HID1,4,5 on P9 and above Date: Sat, 18 Jul 2020 00:23:06 +0530 Message-Id: <20200717185306.60607-4-psampat@linux.ibm.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200717185306.60607-1-psampat@linux.ibm.com> References: <20200717185306.60607-1-psampat@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-17_09:2020-07-17,2020-07-17 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 malwarescore=0 spamscore=0 priorityscore=1501 clxscore=1015 mlxlogscore=886 suspectscore=0 phishscore=0 bulkscore=0 impostorscore=0 mlxscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007170128 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org POWER9 onwards the support for the registers HID1, HID4, HID5 has been receded. Although mfspr on the above registers worked in Power9, In Power10 simulator is unrecognized. Moving their assignment under the check for machines lower than Power9 Signed-off-by: Pratik Rajesh Sampat Reviewed-by: Gautham R. Shenoy --- arch/powerpc/platforms/powernv/idle.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/platforms/powernv/idle.c b/arch/powerpc/platforms/powernv/idle.c index d439e11af101..d24d6671f3e8 100644 --- a/arch/powerpc/platforms/powernv/idle.c +++ b/arch/powerpc/platforms/powernv/idle.c @@ -73,9 +73,6 @@ static int pnv_save_sprs_for_deep_states(void) */ uint64_t lpcr_val = mfspr(SPRN_LPCR); uint64_t hid0_val = mfspr(SPRN_HID0); - uint64_t hid1_val = mfspr(SPRN_HID1); - uint64_t hid4_val = mfspr(SPRN_HID4); - uint64_t hid5_val = mfspr(SPRN_HID5); uint64_t hmeer_val = mfspr(SPRN_HMEER); uint64_t msr_val = MSR_IDLE; uint64_t psscr_val = pnv_deepest_stop_psscr_val; @@ -117,6 +114,9 @@ static int pnv_save_sprs_for_deep_states(void) /* Only p8 needs to set extra HID regiters */ if (!pvr_version_is(PVR_POWER9)) { + uint64_t hid1_val = mfspr(SPRN_HID1); + uint64_t hid4_val = mfspr(SPRN_HID4); + uint64_t hid5_val = mfspr(SPRN_HID5); rc = opal_slw_set_reg(pir, SPRN_HID1, hid1_val); if (rc != 0) -- 2.25.4