Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp270494ybt; Thu, 9 Jul 2020 22:29:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywg0bEudVFoMXyoidcGiFJx6LI+ICFhIlO1qZN3pQ1ZxoVzg30P15gyv+4MfmDMiLwzJCu X-Received: by 2002:a17:906:f2d6:: with SMTP id gz22mr58740165ejb.407.1594358962721; Thu, 09 Jul 2020 22:29:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594358962; cv=none; d=google.com; s=arc-20160816; b=l0Fccng90Kxtfv+3jvNY7v9j2t6yGgHqmEWFtui84Y3ylQeQwtFOPuDeVrNl+YJunT NvnQJ/LMLSz2VJ4JI7obPufwZ7hm3kYmHowFs7wAFt00Gu0P99IIxRfnw2tCCGmPIDal guFLHju1rPScNUW97zmuJvsv2/QnVp0C9mlJDArJ+i1OAS/J5TYtlAER866tz0mReOah tfd8B5D2SNWAeYa6PzEoMKaRPK+WJl/fRr+GStvr03LfVmuTAXysvhE5sHA203c+qngh 0KWKaccYGkBZ+JW5PtrQ+SOyq0iBSg6aK4j91WfgZjXFtkoZD8QYmIeC0Z4JFffjqK+R Oofg== 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=IsVwmwNkCPXp7SxHIAEfedusArM3qjqLlCOMIKpRSIA=; b=w8GSBUaK+lflHJCwArJy5bKhEcsHl7aY/vSaOQ3iju3oJlz35TjqyR4LfFg/R4Oilm UeK4vVrNapRhEtyop3aWmR7y+zj/ht64dsHDN8MGTTRPt5tyqBwdq3YpStYCLrJBZzkS imQPwcmgGXey3/SLzNvaQHN95v3kKhw0ZVkoGFStqhEkOlShQsYOALOI8O9zwbPvHfl2 bLYPhATZ6UF+Mw7Hhga0hArdmSoYJ/739wMAq1EUKcXJA94dpTUP5fq4Naj40jThJzWq lRXvoZJiVgVNSwNabx/LCgX6ac7y7tpDDavk3J+q8Dk5rxz16VItB9dOv/BWfXpSuOnT giRA== 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 u17si3495626edy.254.2020.07.09.22.29.00; Thu, 09 Jul 2020 22:29:22 -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 S1726867AbgGJF2p (ORCPT + 99 others); Fri, 10 Jul 2020 01:28:45 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:14114 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726962AbgGJFWw (ORCPT ); Fri, 10 Jul 2020 01:22:52 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 06A52LUK095386; Fri, 10 Jul 2020 01:22:17 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 326bpq85f6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Jul 2020 01:22:17 -0400 Received: from m0098413.ppops.net (m0098413.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 06A52SWo095789; Fri, 10 Jul 2020 01:22:17 -0400 Received: from ppma05fra.de.ibm.com (6c.4a.5195.ip4.static.sl-reverse.com [149.81.74.108]) by mx0b-001b2d01.pphosted.com with ESMTP id 326bpq85en-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Jul 2020 01:22:16 -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 06A5EoKc030490; Fri, 10 Jul 2020 05:22:15 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma05fra.de.ibm.com with ESMTP id 326bc904w2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 10 Jul 2020 05:22:15 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 06A5MC8559113526 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 Jul 2020 05:22:12 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 351ABA4060; Fri, 10 Jul 2020 05:22:12 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4E037A4062; Fri, 10 Jul 2020 05:22:10 +0000 (GMT) Received: from pratiks-thinkpad.ibmuc.com (unknown [9.85.105.207]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 10 Jul 2020 05:22:10 +0000 (GMT) From: Pratik Rajesh Sampat To: mpe@ellerman.id.au, benh@kernel.crashing.org, paulus@samba.org, mikey@neuling.org, ravi.bangoria@linux.ibm.com, 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 v2 1/3] powerpc/powernv/idle: Exclude mfspr on HID1,4,5 on P9 and above Date: Fri, 10 Jul 2020 10:52:05 +0530 Message-Id: <20200710052207.12003-2-psampat@linux.ibm.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200710052207.12003-1-psampat@linux.ibm.com> References: <20200710052207.12003-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-10_01:2020-07-09,2020-07-10 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 phishscore=0 mlxscore=0 mlxlogscore=853 malwarescore=0 clxscore=1015 spamscore=0 suspectscore=0 impostorscore=0 adultscore=0 priorityscore=1501 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2007100029 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 2dd467383a88..19d94d021357 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 (!cpu_has_feature(CPU_FTR_ARCH_300)) { + 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