Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

powerpc/pseries/svm: Drop unused align argument in alloc_shared_lppaca() function

Argument "align" in alloc_shared_lppaca() was unused inside the
function. Let's drop it and update code comment for page alignment.

Signed-off-by: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
Reviewed-by: Thiago Jung Bauermann <bauerman@linux.ibm.com>
Reviewed-by: Laurent Dufour <ldufour@linux.ibm.com>
[mpe: Massage comment wording/formatting]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200612142953.135408-1-sathnaga@linux.vnet.ibm.com

authored by

Satheesh Rajendran and committed by
Michael Ellerman
178748b6 7c466b08

+10 -3
+10 -3
arch/powerpc/kernel/paca.c
··· 57 57 58 58 #define LPPACA_SIZE 0x400 59 59 60 - static void *__init alloc_shared_lppaca(unsigned long size, unsigned long align, 61 - unsigned long limit, int cpu) 60 + static void *__init alloc_shared_lppaca(unsigned long size, unsigned long limit, 61 + int cpu) 62 62 { 63 63 size_t shared_lppaca_total_size = PAGE_ALIGN(nr_cpu_ids * LPPACA_SIZE); 64 64 static unsigned long shared_lppaca_size; ··· 68 68 if (!shared_lppaca) { 69 69 memblock_set_bottom_up(true); 70 70 71 + /* 72 + * See Documentation/powerpc/ultravisor.rst for more details. 73 + * 74 + * UV/HV data sharing is in PAGE_SIZE granularity. In order to 75 + * minimize the number of pages shared, align the allocation to 76 + * PAGE_SIZE. 77 + */ 71 78 shared_lppaca = 72 79 memblock_alloc_try_nid(shared_lppaca_total_size, 73 80 PAGE_SIZE, MEMBLOCK_LOW_LIMIT, ··· 129 122 return NULL; 130 123 131 124 if (is_secure_guest()) 132 - lp = alloc_shared_lppaca(LPPACA_SIZE, 0x400, limit, cpu); 125 + lp = alloc_shared_lppaca(LPPACA_SIZE, limit, cpu); 133 126 else 134 127 lp = alloc_paca_data(LPPACA_SIZE, 0x400, limit, cpu); 135 128