Skip to content

Commit

Permalink
mem/hugetlb: Remove mem/lib depenency
Browse files Browse the repository at this point in the history
The last bit used from the library PATH_SHMMAX macro.

Signed-off-by: Cyril Hrubis <[email protected]>
  • Loading branch information
metan-ucw committed Dec 18, 2024
1 parent 116fd68 commit 030f14c
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
3 changes: 0 additions & 3 deletions testcases/kernel/mem/hugetlb/Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,3 @@ CPPFLAGS += -I$(abs_srcdir)/$(LIBIPCDIR)
LDFLAGS += -L$(abs_builddir)/$(LIBIPCDIR)
LDLIBS += -lhugetlb
MAKE_DEPS += $(LIBIPC)

include $(top_srcdir)/testcases/kernel/mem/include/libmem.mk
# vim: syntax=make
1 change: 0 additions & 1 deletion testcases/kernel/mem/hugetlb/hugemmap/hugemmap05.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ static char path_sys_sz_huge[BUFSIZ];
#define PATH_PROC_VM "/proc/sys/vm/"
#define PATH_PROC_OVER PATH_PROC_VM "nr_overcommit_hugepages"
#define PATH_PROC_HUGE PATH_PROC_VM "nr_hugepages"
#define PATH_SHMMAX "/proc/sys/kernel/shmmax"

/* Only ia64 requires this */
#ifdef __ia64__
Expand Down
1 change: 0 additions & 1 deletion testcases/kernel/mem/hugetlb/lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
top_srcdir ?= ../../../../..

include $(top_srcdir)/include/mk/env_pre.mk
include $(top_srcdir)/testcases/kernel/mem/include/libmem.mk

INTERNAL_LIB := libhugetlb.a

Expand Down
3 changes: 2 additions & 1 deletion testcases/kernel/mem/hugetlb/lib/hugetlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <errno.h>
#include <sys/wait.h>
#include "tst_test.h"
#include "mem.h"

#define PALIGN(p, a) ((void *)LTP_ALIGN((unsigned long)(p), (a)))

Expand All @@ -29,6 +28,8 @@
#define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */
#endif

#define PATH_SHMMAX "/proc/sys/kernel/shmmax"

#ifndef barrier
# ifdef mb
/* Redefining the mb() */
Expand Down

0 comments on commit 030f14c

Please sign in to comment.