summaryrefslogtreecommitdiffstats
path: root/src/vppinfra/linux/mem.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2018-10-22 13:01:46 +0200
committerDamjan Marion <dmarion@me.com>2018-10-22 13:01:19 +0000
commit6f3f1cbf7760efb17c5754c3dbccdefd433675cb (patch)
tree72d67fe93dbed7ef98676eb1e9250eb9d7c366b2 /src/vppinfra/linux/mem.c
parent68b7cb8febb2ad7123f165f9db10d3ffc3b409fe (diff)
vppinfra: use log2 page size in hugepage functions
Change-Id: Ibec32c6df32f4cd9889d378e244f170c93ad295b Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra/linux/mem.c')
-rw-r--r--src/vppinfra/linux/mem.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/vppinfra/linux/mem.c b/src/vppinfra/linux/mem.c
index 253ae87845b..2fbda966bc0 100644
--- a/src/vppinfra/linux/mem.c
+++ b/src/vppinfra/linux/mem.c
@@ -221,8 +221,7 @@ clib_mem_vm_ext_alloc (clib_mem_vm_alloc_t * a)
if (a->flags & CLIB_MEM_VM_F_HUGETLB_PREALLOC)
{
- err = clib_sysfs_prealloc_hugepages (a->numa_node,
- 1 << (log2_page_size - 10),
+ err = clib_sysfs_prealloc_hugepages (a->numa_node, log2_page_size,
n_pages);
if (err)
goto error;