Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2161253ybb; Thu, 26 Mar 2020 23:38:38 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuZS7bTLQEmUX4aRwu9qosgFHJc51dvPJe1eWIAqKL7D64/kl3TaXEEcotA0TChSW4bH+CG X-Received: by 2002:aca:ec49:: with SMTP id k70mr3064909oih.80.1585291117883; Thu, 26 Mar 2020 23:38:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585291117; cv=none; d=google.com; s=arc-20160816; b=uxWpXWdnHSNiPs2V7a6WpP9jCuXFdOEWVzxs6fxfl9S4PVWCTMMDefN5a3vFhuRfkc /kbnAHqLJo44ynjrcbZdNc7SevHTTBLHdMHBhl/jbS1I6ZEnTjmZPedEUeH57UuIiQto feYP9cxX12Ffkx6y0hobo5c7c4c46+D8u2pr862gexwf3nRoSObeIiTHAOUE06lvydLf QRVsS21RhXtTK5dCTmvf1ouxD1XwHla89k+DgDCVVOLiZMD5BjDw6j4jUnVG70n/heO/ c6bfmgaCsDTt5FONRVhxdsHveUY+U98Uzz6u2CaiCUdEntEBO/8VvQtBOcyYYdgX6TUH ubXw== 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=Z6G9Z2YreqkSZpEBZXjGqQhqxehv874vCE2BvbjFrRysOOrEnxYUGLsaUsn1nJQ8Cq 8RHcAWW0OMDUa13mQN1NQRFd3JHi3kUTwGEZiFreuy0dyAXdKJtrMN0Zd0ojjHAQRNU7 /mW2BqVdRbObyY2Op+DgJKeKRRwy8RIuXH/Bs3Nyu3u+/aUaxa/rsb1uJohif388Ghui MiTskmX4JXiIESA58VqkJfZKDKavxKIdqsF2QJDdmDsH2WfIvKLQfQgnKGWDUo3+edrp iO/qMMVM8kexuSWdWKPNdC8UEcvtWA+80XE12CpAno4jCTpfybcgfylF4jqG9cHiQS0R h2WA== 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 b16si1876577oop.83.2020.03.26.23.38.25; Thu, 26 Mar 2020 23:38:37 -0700 (PDT) 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 S1727805AbgC0Ghk (ORCPT + 99 others); Fri, 27 Mar 2020 02:37:40 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:23134 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727781AbgC0Ghk (ORCPT ); Fri, 27 Mar 2020 02:37:40 -0400 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 02R6WuOr137116 for ; Fri, 27 Mar 2020 02:37:39 -0400 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0b-001b2d01.pphosted.com with ESMTP id 2ywcj1e796-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 27 Mar 2020 02:37:39 -0400 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 27 Mar 2020 06:37:31 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 27 Mar 2020 06:37:25 -0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 02R6bUHl47054950 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 27 Mar 2020 06:37:30 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8B72C52059; Fri, 27 Mar 2020 06:37:30 +0000 (GMT) Received: from localhost.localdomain.com (unknown [9.85.85.82]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 3122D5204F; Fri, 27 Mar 2020 06:37:23 +0000 (GMT) From: Kajol Jain To: acme@kernel.org, linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au, sukadev@linux.vnet.ibm.com 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, mamatha4@linux.vnet.ibm.com, mark.rutland@arm.com, tglx@linutronix.de, kjain@linux.ibm.com Subject: [PATCH v7 5/5] powerpc/hv-24x7: Update post_mobility_fixup() to handle migration Date: Fri, 27 Mar 2020 12:06:42 +0530 X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200327063642.26175-1-kjain@linux.ibm.com> References: <20200327063642.26175-1-kjain@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 20032706-0016-0000-0000-000002F8F1FF X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20032706-0017-0000-0000-0000335CA191 Message-Id: <20200327063642.26175-6-kjain@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.645 definitions=2020-03-26_14:2020-03-26,2020-03-26 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_spam_definite policy=outbound score=100 mlxscore=0 lowpriorityscore=0 priorityscore=1501 bulkscore=0 mlxlogscore=475 impostorscore=0 suspectscore=0 clxscore=1015 spamscore=0 malwarescore=0 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003270054 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