Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1621179ybv; Fri, 14 Feb 2020 03:06:07 -0800 (PST) X-Google-Smtp-Source: APXvYqw0G811K4BazLxpj4XCQ3JQQtVmXPjBW4zY28KOeUc57qTyKLBQlNRWXZHV9pjY04fINk2t X-Received: by 2002:a9d:6a85:: with SMTP id l5mr1861427otq.231.1581678367790; Fri, 14 Feb 2020 03:06:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581678367; cv=none; d=google.com; s=arc-20160816; b=Czc+TenBeKGaE66nfSaPqCBjwaDsugFPiFSncrUBLW2iQWBUJ4bFP9eeShAWxqaJ1n gZvAI+nGIqM5vHGQ5mXq5uw7BvXQ3CSl6Xro13OLcky0hGMGNOMZO/6yNOV4uEN/yFWu k0nos9XfGpbsPzlfNsJYfbbaKKP/nmnaAmq+9bmnaogBP+fPRBrUCGmFTaovvUV67JoM KIXYuzyQAAXWNEPmE+iLm6X/hyBOqccJFdl5Cicoq941fX1Lt1tVQ9XuMsKBLxTS5Fy3 gmpkrNoDwW1mms6+A0Q8o+2pj+YJEyoFYvh8AdRNIF1hNz641l0SbfSEbGql06HiW6SL MH6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:references:in-reply-to:date:subject:cc:to:from; bh=QkxmqEvYrRr3hlpVNTo3MHqphCK9ZhZNE32UVKrycVA=; b=bFCBxnkcO7iuX2dprWsZd8mDslHnwFF9ZvVKIshZEKOqQTIyHVCYZQN5axBOrmEdnD gmg9kTR+R0yo+Wq8UWu+GrcEYFN7Omug0O4znc2d7VAl2TrOLy0cpYuFjfNBg2dekh/x AkpqUx5Z+fW74cW1pbqZhYV8nc6rw/cALews9mAM2TNy2BelkMNbcvsVVTDn0CYqoqvV 2DzSvSF9yA55FZm/wL9S3yEqeiOoVr3KnPANMmL6iJjwx8500vmuxU+rmRBOc3DW20ew kG8yIp55+J3xyiB0qaMeAX7nBJWIOM3tGsF5Xsr02dEQqYtUVaOILRoeoFedADvQx6GA nW3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id x16si2793311otk.13.2020.02.14.03.05.56; Fri, 14 Feb 2020 03:06:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S2387495AbgBNLEX (ORCPT + 99 others); Fri, 14 Feb 2020 06:04:23 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:55926 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387424AbgBNLEX (ORCPT ); Fri, 14 Feb 2020 06:04:23 -0500 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 01EAxVSX044504 for ; Fri, 14 Feb 2020 06:04:22 -0500 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0b-001b2d01.pphosted.com with ESMTP id 2y4wuuwht8-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 14 Feb 2020 06:04:21 -0500 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 14 Feb 2020 11:04:20 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 14 Feb 2020 11:04:13 -0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 01EB4CtJ55443546 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 14 Feb 2020 11:04:12 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5295CA4054; Fri, 14 Feb 2020 11:04:12 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4C6C8A405B; Fri, 14 Feb 2020 11:04:07 +0000 (GMT) Received: from localhost.localdomain.com (unknown [9.199.37.109]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 14 Feb 2020 11:04:07 +0000 (GMT) From: Kajol Jain To: acme@kernel.org, linuxppc-dev@lists.ozlabs.org Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, anju@linux.vnet.ibm.com, maddy@linux.vnet.ibm.com, ravi.bangoria@linux.ibm.com, peterz@infradead.org, yao.jin@linux.intel.com, ak@linux.intel.com, jolsa@kernel.org, kan.liang@linux.intel.com, jmario@redhat.com, alexander.shishkin@linux.intel.com, mingo@kernel.org, paulus@ozlabs.org, namhyung@kernel.org, mpetlan@redhat.com, gregkh@linuxfoundation.org, benh@kernel.crashing.org, kjain@linux.ibm.com Subject: [PATCH 5/8] powerpc/hv-24x7: Update post_mobility_fixup() to handle migration Date: Fri, 14 Feb 2020 16:33:32 +0530 X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200214110335.31483-1-kjain@linux.ibm.com> References: <20200214110335.31483-1-kjain@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 20021411-4275-0000-0000-000003A1699A X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20021411-4276-0000-0000-000038B56D87 Message-Id: <20200214110335.31483-6-kjain@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-02-14_03:2020-02-12,2020-02-14 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 clxscore=1015 priorityscore=1501 suspectscore=0 lowpriorityscore=0 mlxlogscore=991 adultscore=0 malwarescore=0 spamscore=0 mlxscore=0 impostorscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002140090 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Function 'read_sys_info_pseries()' is added to get system parameter values like number of sockets and chips per socket. and it gets these details via rtas_call with token "PROCESSOR_MODULE_INFO". Incase lpar migrate from one system to another, system parameter details like chips per sockets or number of sockets might change. So, it needs to be re-initialized otherwise, these values corresponds to previous system values. This patch adds a call to 'read_sys_info_pseries()' from 'post-mobility_fixup()' to re-init the physsockets and physchips values. Signed-off-by: Kajol Jain --- arch/powerpc/platforms/pseries/mobility.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/powerpc/platforms/pseries/mobility.c b/arch/powerpc/platforms/pseries/mobility.c index b571285f6c14..226accd6218b 100644 --- a/arch/powerpc/platforms/pseries/mobility.c +++ b/arch/powerpc/platforms/pseries/mobility.c @@ -371,6 +371,18 @@ void post_mobility_fixup(void) /* Possibly switch to a new RFI flush type */ pseries_setup_rfi_flush(); + /* + * Incase lpar migrate from one system to another, system + * parameter details like chips per sockets and number of sockets + * might change. So, it needs to be re-initialized otherwise these + * values corresponds to previous system. + * Here, adding a call to read_sys_info_pseries() declared in + * platforms/pseries/pseries.h to re-init the physsockets and + * physchips value. + */ + if (IS_ENABLED(CONFIG_HV_PERF_CTRS) && IS_ENABLED(CONFIG_PPC_RTAS)) + read_sys_info_pseries(); + return; } -- 2.18.1