Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp439087ybg; Tue, 9 Jun 2020 04:43:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyC9mGmliBE9iTicIjgRwtqccIDJaGHuG8FXpOQ1TW9HiRczOkm1aLvl8QWlz1BMRxN83E6 X-Received: by 2002:a50:9b14:: with SMTP id o20mr2498321edi.371.1591702986756; Tue, 09 Jun 2020 04:43:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591702986; cv=none; d=google.com; s=arc-20160816; b=tgfAJgGYASLiwCvm1Pcz68Bo5QW3RhxRla2IsiyUg7ccVF06D2SUg7eAiwfoXca4P2 wUEH4patwuli8cmQiXOQYyQRse4YgOddegGTI07M96e3UsJuniAPpv6dBBqY8TfT2PDd pqjCgm9wMsXPhTL0ITDczibOacDoHMYZspkg7q35f0EZjT2yHxF6xtaqAVxw7YzLI5oy OVoNE7a+UeyxsMse8awsjCwPBDqxOyGvtchaJPP7GqPycDEvVGd+3AQnItepon/rwmaM 2xNJcw+8HdQ9hsOzNfjOKWkZiL8CUyDy7SFEpqVaiiXJkoyaBte7jzdVy9v4m0tex6nF 9s5w== 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 :message-id:date:subject:cc:to:from; bh=CjByfji5MLrsxmBoTEQ6tAurn6F2/cPQaXyLufhQuwE=; b=ds+Pn4uOCfsEejY/IhYQwAFLKZ204cjA5l0zz8lE1zAjmMfQZxT4nyHStLAsmddrzN 7yKFBON0hSmBcXY+LrD2F3BseoChUefjzYuy8ik1YaUn+6HeST6qo79Zm0F07YqTI4lV NzWE9d1wPcDlKJrZVNsr3SB7Sj3ddhrUKKMEnC8Lb7eaSjXZYx90SwSL0SSLWSvUl9Ii Bzk3S4T5GI1KRE50oZg8uc8WzWiZ4ff6RMoq4oWPkzjcoE7LkXQ+A+HsrBuuLY5oWt+T saMl91haxKlwRzqyNx3ODUEeQ1XyaCFfdUlR04hyeXTBipkD5/sol24k4m92DLPzNWmO Qi2A== 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 cb26si10744862edb.29.2020.06.09.04.42.43; Tue, 09 Jun 2020 04:43:06 -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 S1729096AbgFILj6 (ORCPT + 99 others); Tue, 9 Jun 2020 07:39:58 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:2294 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728051AbgFILj4 (ORCPT ); Tue, 9 Jun 2020 07:39:56 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 059BXDer121538; Tue, 9 Jun 2020 07:39:51 -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 31j59u9agj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 09 Jun 2020 07:39:51 -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 059BYsCL026314; Tue, 9 Jun 2020 11:39:49 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma04ams.nl.ibm.com with ESMTP id 31g2s7wuhx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 09 Jun 2020 11:39:49 +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 059BdkEI56754176 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 9 Jun 2020 11:39:46 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 56CB6A4062; Tue, 9 Jun 2020 11:39:46 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 34208A405C; Tue, 9 Jun 2020 11:39:42 +0000 (GMT) Received: from satheesh.ibmuc.com (unknown [9.85.125.230]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 9 Jun 2020 11:39:41 +0000 (GMT) From: Satheesh Rajendran To: linuxppc-dev@lists.ozlabs.org Cc: Satheesh Rajendran , linux-kernel@vger.kernel.org, Thiago Jung Bauermann , Ram Pai , Sukadev Bhattiprolu , Laurent Dufour Subject: [PATCH] powerpc/pseries/svm: Fixup align argument in alloc_shared_lppaca() function Date: Tue, 9 Jun 2020 17:09:09 +0530 Message-Id: <20200609113909.17236-1-sathnaga@linux.vnet.ibm.com> X-Mailer: git-send-email 2.26.2 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-09_03:2020-06-09,2020-06-09 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 lowpriorityscore=0 spamscore=0 impostorscore=0 priorityscore=1501 malwarescore=0 adultscore=0 mlxscore=0 cotscore=-2147483648 phishscore=0 mlxlogscore=842 bulkscore=0 suspectscore=1 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006090088 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Argument "align" in alloc_shared_lppaca() function was unused inside the function. Let's fix it and update code comment. Cc: linux-kernel@vger.kernel.org Cc: Thiago Jung Bauermann Cc: Ram Pai Cc: Sukadev Bhattiprolu Cc: Laurent Dufour Signed-off-by: Satheesh Rajendran --- arch/powerpc/kernel/paca.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c index 8d96169c597e..9088e107fb43 100644 --- a/arch/powerpc/kernel/paca.c +++ b/arch/powerpc/kernel/paca.c @@ -70,7 +70,7 @@ static void *__init alloc_shared_lppaca(unsigned long size, unsigned long align, shared_lppaca = memblock_alloc_try_nid(shared_lppaca_total_size, - PAGE_SIZE, MEMBLOCK_LOW_LIMIT, + align, MEMBLOCK_LOW_LIMIT, limit, NUMA_NO_NODE); if (!shared_lppaca) panic("cannot allocate shared data"); @@ -122,7 +122,14 @@ static struct lppaca * __init new_lppaca(int cpu, unsigned long limit) return NULL; if (is_secure_guest()) - lp = alloc_shared_lppaca(LPPACA_SIZE, 0x400, limit, cpu); + /* + * See Documentation/powerpc/ultravisor.rst for mode details + * + * UV/HV data share is in PAGE granularity, In order to minimize + * the number of pages shared and maximize the use of a page, + * let's use page align. + */ + lp = alloc_shared_lppaca(LPPACA_SIZE, PAGE_SIZE, limit, cpu); else lp = alloc_paca_data(LPPACA_SIZE, 0x400, limit, cpu); -- 2.26.2