aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@shadowen.org>2008-10-16 15:54:56 +0100
committerEric B Munson <ebmunson@us.ibm.com>2008-10-21 11:14:24 +0100
commit06ab617c428ada6e3b9cff583a80de695a5cb795 (patch)
tree6c032dff9723158c5ed94db355e627e85e49ef5e
parent751b771c3e645814d04b518f24b08854943c7b56 (diff)
downloadlibhugetlbfs-06ab617c428ada6e3b9cff583a80de695a5cb795.tar.gz
stop exporting kernel detection
Signed-off-by: Andy Whitcroft <apw@shadowen.org> Acked-by: Adam Litke <agl@us.ibm.com> Acked-by: Mel Gorman <mel@csn.ul.ie>
-rw-r--r--Makefile2
-rw-r--r--hugetlbfs.h9
-rw-r--r--init_privutils.c1
-rw-r--r--kernel-features.c1
-rw-r--r--libhugetlbfs_privutils.h10
5 files changed, 13 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 8e517b3..1085687 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ PREFIX = /usr/local
EXEDIR = /bin
LIBOBJS = hugeutils.o version.o init.o morecore.o debug.o alloc.o shm.o kernel-features.o
-LIBPUOBJS = init_privutils.o debug.o hugeutils.o
+LIBPUOBJS = init_privutils.o debug.o hugeutils.o kernel-features.o
INSTALL_OBJ_LIBS = libhugetlbfs.so libhugetlbfs.a libhugetlbfs_privutils.so
BIN_OBJ_DIR=obj
INSTALL_BIN = hugectl hugeedit hugeadm pagesize
diff --git a/hugetlbfs.h b/hugetlbfs.h
index 3dff758..06c427f 100644
--- a/hugetlbfs.h
+++ b/hugetlbfs.h
@@ -53,13 +53,4 @@ typedef unsigned long ghp_t;
void *get_huge_pages(size_t len, ghp_t flags);
void free_huge_pages(void *ptr);
-/* Kernel feature testing */
-/* This enum defines the bits in a feature bitmask */
-enum {
- /* Reservations are created for private mappings */
- HUGETLB_FEATURE_PRIVATE_RESV,
- HUGETLB_FEATURE_NR,
-};
-int hugetlbfs_test_feature(int feature_code);
-
#endif /* _HUGETLBFS_H */
diff --git a/init_privutils.c b/init_privutils.c
index 0d4f9d9..f32d83b 100644
--- a/init_privutils.c
+++ b/init_privutils.c
@@ -23,4 +23,5 @@ static void __attribute__ ((constructor)) setup_libhugetlbfs(void)
{
hugetlbfs_setup_debug();
setup_mounts();
+ setup_features();
}
diff --git a/kernel-features.c b/kernel-features.c
index 8f105b4..12ca644 100644
--- a/kernel-features.c
+++ b/kernel-features.c
@@ -27,6 +27,7 @@
#include <sys/utsname.h>
#include "kernel-features.h"
#include "hugetlbfs.h"
+#include "libhugetlbfs_privutils.h"
#include "libhugetlbfs_internal.h"
#include "libhugetlbfs_debug.h"
diff --git a/libhugetlbfs_privutils.h b/libhugetlbfs_privutils.h
index 9f0c479..1f4aae3 100644
--- a/libhugetlbfs_privutils.h
+++ b/libhugetlbfs_privutils.h
@@ -42,4 +42,14 @@ int set_nr_overcommit_hugepages(long pagesize, unsigned long val);
#define read_meminfo __pu_read_meminfo
long read_meminfo(const char *tag);
+/* Kernel feature testing */
+/* This enum defines the bits in a feature bitmask */
+enum {
+ /* Reservations are created for private mappings */
+ HUGETLB_FEATURE_PRIVATE_RESV,
+ HUGETLB_FEATURE_NR,
+};
+#define hugetlbfs_test_feature __pu_hugetlbfs_test_feature
+int hugetlbfs_test_feature(int feature_code);
+
#endif /* _LIBHUGETLBFS_PRIVUTILS_H */