* [PATCH V2] powerpc/pseries/svm: Drop unused align argument in alloc_shared_lppaca() function
@ 2020-06-12 14:29 Satheesh Rajendran
2020-06-16 8:24 ` Laurent Dufour
2020-06-26 4:46 ` Michael Ellerman
0 siblings, 2 replies; 3+ messages in thread
From: Satheesh Rajendran @ 2020-06-12 14:29 UTC (permalink / raw)
To: linuxppc-dev
Cc: Satheesh Rajendran, linux-kernel, Thiago Jung Bauermann, Ram Pai,
Sukadev Bhattiprolu, Laurent Dufour, Michael Ellerman
Argument "align" in alloc_shared_lppaca() was unused inside the
function. Let's drop it and update code comment for page alignment.
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>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Thiago Jung Bauermann <bauerman@linux.ibm.com>
Signed-off-by: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
---
V2:
Added reviewed by Thiago.
Dropped align argument as per Michael suggest.
Modified commit msg.
V1: http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20200609113909.17236-1-sathnaga@linux.vnet.ibm.com/
---
arch/powerpc/kernel/paca.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c
index 8d96169c597e..a174d64d9b4d 100644
--- a/arch/powerpc/kernel/paca.c
+++ b/arch/powerpc/kernel/paca.c
@@ -57,8 +57,8 @@ static void *__init alloc_paca_data(unsigned long size, unsigned long align,
#define LPPACA_SIZE 0x400
-static void *__init alloc_shared_lppaca(unsigned long size, unsigned long align,
- unsigned long limit, int cpu)
+static void *__init alloc_shared_lppaca(unsigned long size, unsigned long limit,
+ int cpu)
{
size_t shared_lppaca_total_size = PAGE_ALIGN(nr_cpu_ids * LPPACA_SIZE);
static unsigned long shared_lppaca_size;
@@ -68,6 +68,12 @@ static void *__init alloc_shared_lppaca(unsigned long size, unsigned long align,
if (!shared_lppaca) {
memblock_set_bottom_up(true);
+ /* 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.
+ */
shared_lppaca =
memblock_alloc_try_nid(shared_lppaca_total_size,
PAGE_SIZE, MEMBLOCK_LOW_LIMIT,
@@ -122,7 +128,7 @@ 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);
+ lp = alloc_shared_lppaca(LPPACA_SIZE, limit, cpu);
else
lp = alloc_paca_data(LPPACA_SIZE, 0x400, limit, cpu);
--
2.26.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH V2] powerpc/pseries/svm: Drop unused align argument in alloc_shared_lppaca() function
2020-06-12 14:29 [PATCH V2] powerpc/pseries/svm: Drop unused align argument in alloc_shared_lppaca() function Satheesh Rajendran
@ 2020-06-16 8:24 ` Laurent Dufour
2020-06-26 4:46 ` Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Laurent Dufour @ 2020-06-16 8:24 UTC (permalink / raw)
To: Satheesh Rajendran, linuxppc-dev
Cc: linux-kernel, Thiago Jung Bauermann, Ram Pai,
Sukadev Bhattiprolu, Michael Ellerman
Le 12/06/2020 à 16:29, Satheesh Rajendran a écrit :
> Argument "align" in alloc_shared_lppaca() was unused inside the
> function. Let's drop it and update code comment for page alignment.
>
> 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>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Reviewed-by: Thiago Jung Bauermann <bauerman@linux.ibm.com>
Reviewed-by: Laurent Dufour <ldufour@linux.ibm.com>
> Signed-off-by: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
> ---
>
> V2:
> Added reviewed by Thiago.
> Dropped align argument as per Michael suggest.
> Modified commit msg.
>
> V1: http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20200609113909.17236-1-sathnaga@linux.vnet.ibm.com/
> ---
> arch/powerpc/kernel/paca.c | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c
> index 8d96169c597e..a174d64d9b4d 100644
> --- a/arch/powerpc/kernel/paca.c
> +++ b/arch/powerpc/kernel/paca.c
> @@ -57,8 +57,8 @@ static void *__init alloc_paca_data(unsigned long size, unsigned long align,
>
> #define LPPACA_SIZE 0x400
>
> -static void *__init alloc_shared_lppaca(unsigned long size, unsigned long align,
> - unsigned long limit, int cpu)
> +static void *__init alloc_shared_lppaca(unsigned long size, unsigned long limit,
> + int cpu)
> {
> size_t shared_lppaca_total_size = PAGE_ALIGN(nr_cpu_ids * LPPACA_SIZE);
> static unsigned long shared_lppaca_size;
> @@ -68,6 +68,12 @@ static void *__init alloc_shared_lppaca(unsigned long size, unsigned long align,
> if (!shared_lppaca) {
> memblock_set_bottom_up(true);
>
> + /* 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.
> + */
> shared_lppaca =
> memblock_alloc_try_nid(shared_lppaca_total_size,
> PAGE_SIZE, MEMBLOCK_LOW_LIMIT,
> @@ -122,7 +128,7 @@ 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);
> + lp = alloc_shared_lppaca(LPPACA_SIZE, limit, cpu);
> else
> lp = alloc_paca_data(LPPACA_SIZE, 0x400, limit, cpu);
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH V2] powerpc/pseries/svm: Drop unused align argument in alloc_shared_lppaca() function
2020-06-12 14:29 [PATCH V2] powerpc/pseries/svm: Drop unused align argument in alloc_shared_lppaca() function Satheesh Rajendran
2020-06-16 8:24 ` Laurent Dufour
@ 2020-06-26 4:46 ` Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2020-06-26 4:46 UTC (permalink / raw)
To: linuxppc-dev, Satheesh Rajendran
Cc: Thiago Jung Bauermann, Ram Pai, Laurent Dufour,
Sukadev Bhattiprolu, linux-kernel
On Fri, 12 Jun 2020 19:59:53 +0530, Satheesh Rajendran wrote:
> Argument "align" in alloc_shared_lppaca() was unused inside the
> function. Let's drop it and update code comment for page alignment.
Applied to powerpc/next.
[1/1] powerpc/pseries/svm: Drop unused align argument in alloc_shared_lppaca() function
https://git.kernel.org/powerpc/c/178748b6d14946f080d49bc7dcc47b7cc4437e4d
cheers
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-06-26 4:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-12 14:29 [PATCH V2] powerpc/pseries/svm: Drop unused align argument in alloc_shared_lppaca() function Satheesh Rajendran
2020-06-16 8:24 ` Laurent Dufour
2020-06-26 4:46 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).