From: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>,
linux-kernel@vger.kernel.org,
Thiago Jung Bauermann <bauerman@linux.ibm.com>,
Ram Pai <linuxram@us.ibm.com>,
Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>,
Laurent Dufour <ldufour@linux.ibm.com>
Subject: [PATCH] powerpc/pseries/svm: Fixup align argument in alloc_shared_lppaca() function
Date: Tue, 9 Jun 2020 17:09:09 +0530 [thread overview]
Message-ID: <20200609113909.17236-1-sathnaga@linux.vnet.ibm.com> (raw)
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 <bauerman@linux.ibm.com>
Cc: Ram Pai <linuxram@us.ibm.com>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Laurent Dufour <ldufour@linux.ibm.com>
Signed-off-by: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
---
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
next reply other threads:[~2020-06-09 11:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-09 11:39 Satheesh Rajendran [this message]
2020-06-10 4:19 ` Thiago Jung Bauermann
2020-06-10 11:21 ` Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200609113909.17236-1-sathnaga@linux.vnet.ibm.com \
--to=sathnaga@linux.vnet.ibm.com \
--cc=bauerman@linux.ibm.com \
--cc=ldufour@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=linuxram@us.ibm.com \
--cc=sukadev@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®