From dee0e22c38a28e6cbd6ef27d95c4f3937056e68a Mon Sep 17 00:00:00 2001 From: zab Date: Tue, 20 May 2003 22:26:31 +0000 Subject: [PATCH] - get pinger support utils building - oops, s/obj/src/ .. the 2.5 build can have different source and target trees - make all kp30's thread_size business conditional on __kernel__ - when compiled in SYMBOL_GET amounts to a weak reference which won't be satisfied by a static symbol in the link, only kping_client wasn't right --- lnet/Kernelenv.in | 3 ++- lnet/Kernelenv.mk | 3 ++- lnet/Makefile.mk | 4 +++- lnet/include/linux/kp30.h | 6 ++++-- lnet/klnds/socklnd/Makefile.mk | 2 +- lnet/lnet/Makefile.mk | 2 +- lnet/router/Makefile.mk | 2 +- lnet/tests/ping_cli.c | 2 +- lnet/tests/sping_cli.c | 2 +- lnet/utils/.cvsignore | 1 + lustre/Makefile.mk | 3 ++- lustre/portals/Kernelenv.in | 3 ++- lustre/portals/Kernelenv.mk | 3 ++- lustre/portals/Makefile.mk | 4 +++- lustre/portals/include/linux/kp30.h | 6 ++++-- lustre/portals/knals/socknal/Makefile.mk | 2 +- lustre/portals/portals/Makefile.mk | 2 +- lustre/portals/router/Makefile.mk | 2 +- lustre/portals/tests/ping_cli.c | 2 +- lustre/portals/tests/sping_cli.c | 2 +- lustre/portals/utils/.cvsignore | 1 + 21 files changed, 36 insertions(+), 21 deletions(-) diff --git a/lnet/Kernelenv.in b/lnet/Kernelenv.in index 29a713f..c47702f 100644 --- a/lnet/Kernelenv.in +++ b/lnet/Kernelenv.in @@ -1 +1,2 @@ -EXTRA_CFLAGS= -Ifs/lustre/include -Ifs/lustre/portals/include +EXTRA_CFLAGS := -Ifs/lustre/include -Ifs/lustre/portals/include +HOSTCFLAGS := $(EXTRA_CFLAGS) diff --git a/lnet/Kernelenv.mk b/lnet/Kernelenv.mk index 29a713f..c47702f 100644 --- a/lnet/Kernelenv.mk +++ b/lnet/Kernelenv.mk @@ -1 +1,2 @@ -EXTRA_CFLAGS= -Ifs/lustre/include -Ifs/lustre/portals/include +EXTRA_CFLAGS := -Ifs/lustre/include -Ifs/lustre/portals/include +HOSTCFLAGS := $(EXTRA_CFLAGS) diff --git a/lnet/Makefile.mk b/lnet/Makefile.mk index cda2593..73a19df 100644 --- a/lnet/Makefile.mk +++ b/lnet/Makefile.mk @@ -1,4 +1,4 @@ -include $(obj)/Kernelenv +include $(src)/Kernelenv # The ordering of these determines the order that each subsystem's # module_init() functions are called in. if these are changed make sure @@ -8,3 +8,5 @@ obj-y += portals/ obj-y += router/ obj-y += knals/ obj-y += tests/ + +obj-m += utils/ diff --git a/lnet/include/linux/kp30.h b/lnet/include/linux/kp30.h index f45f3c4..6611e99 100644 --- a/lnet/include/linux/kp30.h +++ b/lnet/include/linux/kp30.h @@ -80,7 +80,9 @@ extern unsigned int portal_printk; #define D_RPCTRACE (1 << 20) /* for distributed debugging */ #define D_VFSTRACE (1 << 21) -#include /* THREAD_SIZE */ +#ifdef __KERNEL__ +# include /* THREAD_SIZE */ + #ifdef __arch_ia64__ #define CDEBUG_STACK(var) (&var & (THREAD_SIZE - 1)) #else @@ -89,7 +91,6 @@ extern unsigned int portal_printk; (THREAD_SIZE - 1))) #endif -#ifdef __KERNEL__ #define CHECK_STACK(stack) \ do { \ if ((stack) > 3*THREAD_SIZE/4 && (stack) > portal_stack) \ @@ -101,6 +102,7 @@ extern unsigned int portal_printk; } while (0) #else #define CHECK_STACK(stack) do{}while(0) +#define CDEBUG_STACK(var) (0) #endif #define CDEBUG(mask, format, a...) \ diff --git a/lnet/klnds/socklnd/Makefile.mk b/lnet/klnds/socklnd/Makefile.mk index afa92a7..5c1b366 100644 --- a/lnet/klnds/socklnd/Makefile.mk +++ b/lnet/klnds/socklnd/Makefile.mk @@ -3,7 +3,7 @@ # This code is issued under the GNU General Public License. # See the file COPYING in this distribution -include $(obj)/../../Kernelenv +include $(src)/../../Kernelenv obj-y += ksocknal.o ksocknal-objs := socknal.o socknal_cb.o diff --git a/lnet/lnet/Makefile.mk b/lnet/lnet/Makefile.mk index 3fc8d36..7822846 100644 --- a/lnet/lnet/Makefile.mk +++ b/lnet/lnet/Makefile.mk @@ -3,7 +3,7 @@ # This code is issued under the GNU General Public License. # See the file COPYING in this distribution -include $(obj)/../Kernelenv +include $(src)/../Kernelenv obj-y += portals.o portals-objs := lib-dispatch.o lib-eq.o lib-init.o lib-md.o lib-me.o \ diff --git a/lnet/router/Makefile.mk b/lnet/router/Makefile.mk index dc007fc..9b02c03 100644 --- a/lnet/router/Makefile.mk +++ b/lnet/router/Makefile.mk @@ -3,7 +3,7 @@ # This code is issued under the GNU General Public License. # See the file COPYING in this distribution -include $(obj)/../Kernelenv +include $(src)/../Kernelenv obj-y += kptlrouter.o kptlrouter-objs := router.o proc.o diff --git a/lnet/tests/ping_cli.c b/lnet/tests/ping_cli.c index 389ffbb..806d80f 100644 --- a/lnet/tests/ping_cli.c +++ b/lnet/tests/ping_cli.c @@ -260,7 +260,7 @@ pingcli_start(struct portal_ioctl_data *args) /* called by the portals_ioctl for ping requests */ -static int kping_client(struct portal_ioctl_data *args) +int kping_client(struct portal_ioctl_data *args) { PORTAL_ALLOC (client, sizeof(struct pingcli_data)); if (client == NULL) diff --git a/lnet/tests/sping_cli.c b/lnet/tests/sping_cli.c index 4cef08b..7affed8 100644 --- a/lnet/tests/sping_cli.c +++ b/lnet/tests/sping_cli.c @@ -235,7 +235,7 @@ pingcli_start(struct portal_ioctl_data *args) /* called by the portals_ioctl for ping requests */ -static int kping_client(struct portal_ioctl_data *args) +int kping_client(struct portal_ioctl_data *args) { PORTAL_ALLOC (client, sizeof(struct pingcli_data)); diff --git a/lnet/utils/.cvsignore b/lnet/utils/.cvsignore index 041cd6b..bf37bf4 100644 --- a/lnet/utils/.cvsignore +++ b/lnet/utils/.cvsignore @@ -5,3 +5,4 @@ debugctl ptlctl .deps routerstat +.*.cmd diff --git a/lustre/Makefile.mk b/lustre/Makefile.mk index e540148..89cf8b7 100644 --- a/lustre/Makefile.mk +++ b/lustre/Makefile.mk @@ -1,4 +1,5 @@ include fs/lustre/portals/Kernelenv obj-y += portals/ -obj-y += mds/ +# uncomment me when we have the kernel patch, and such +#obj-y += mds/ diff --git a/lustre/portals/Kernelenv.in b/lustre/portals/Kernelenv.in index 29a713f..c47702f 100644 --- a/lustre/portals/Kernelenv.in +++ b/lustre/portals/Kernelenv.in @@ -1 +1,2 @@ -EXTRA_CFLAGS= -Ifs/lustre/include -Ifs/lustre/portals/include +EXTRA_CFLAGS := -Ifs/lustre/include -Ifs/lustre/portals/include +HOSTCFLAGS := $(EXTRA_CFLAGS) diff --git a/lustre/portals/Kernelenv.mk b/lustre/portals/Kernelenv.mk index 29a713f..c47702f 100644 --- a/lustre/portals/Kernelenv.mk +++ b/lustre/portals/Kernelenv.mk @@ -1 +1,2 @@ -EXTRA_CFLAGS= -Ifs/lustre/include -Ifs/lustre/portals/include +EXTRA_CFLAGS := -Ifs/lustre/include -Ifs/lustre/portals/include +HOSTCFLAGS := $(EXTRA_CFLAGS) diff --git a/lustre/portals/Makefile.mk b/lustre/portals/Makefile.mk index cda2593..73a19df 100644 --- a/lustre/portals/Makefile.mk +++ b/lustre/portals/Makefile.mk @@ -1,4 +1,4 @@ -include $(obj)/Kernelenv +include $(src)/Kernelenv # The ordering of these determines the order that each subsystem's # module_init() functions are called in. if these are changed make sure @@ -8,3 +8,5 @@ obj-y += portals/ obj-y += router/ obj-y += knals/ obj-y += tests/ + +obj-m += utils/ diff --git a/lustre/portals/include/linux/kp30.h b/lustre/portals/include/linux/kp30.h index f45f3c4..6611e99 100644 --- a/lustre/portals/include/linux/kp30.h +++ b/lustre/portals/include/linux/kp30.h @@ -80,7 +80,9 @@ extern unsigned int portal_printk; #define D_RPCTRACE (1 << 20) /* for distributed debugging */ #define D_VFSTRACE (1 << 21) -#include /* THREAD_SIZE */ +#ifdef __KERNEL__ +# include /* THREAD_SIZE */ + #ifdef __arch_ia64__ #define CDEBUG_STACK(var) (&var & (THREAD_SIZE - 1)) #else @@ -89,7 +91,6 @@ extern unsigned int portal_printk; (THREAD_SIZE - 1))) #endif -#ifdef __KERNEL__ #define CHECK_STACK(stack) \ do { \ if ((stack) > 3*THREAD_SIZE/4 && (stack) > portal_stack) \ @@ -101,6 +102,7 @@ extern unsigned int portal_printk; } while (0) #else #define CHECK_STACK(stack) do{}while(0) +#define CDEBUG_STACK(var) (0) #endif #define CDEBUG(mask, format, a...) \ diff --git a/lustre/portals/knals/socknal/Makefile.mk b/lustre/portals/knals/socknal/Makefile.mk index afa92a7..5c1b366 100644 --- a/lustre/portals/knals/socknal/Makefile.mk +++ b/lustre/portals/knals/socknal/Makefile.mk @@ -3,7 +3,7 @@ # This code is issued under the GNU General Public License. # See the file COPYING in this distribution -include $(obj)/../../Kernelenv +include $(src)/../../Kernelenv obj-y += ksocknal.o ksocknal-objs := socknal.o socknal_cb.o diff --git a/lustre/portals/portals/Makefile.mk b/lustre/portals/portals/Makefile.mk index 3fc8d36..7822846 100644 --- a/lustre/portals/portals/Makefile.mk +++ b/lustre/portals/portals/Makefile.mk @@ -3,7 +3,7 @@ # This code is issued under the GNU General Public License. # See the file COPYING in this distribution -include $(obj)/../Kernelenv +include $(src)/../Kernelenv obj-y += portals.o portals-objs := lib-dispatch.o lib-eq.o lib-init.o lib-md.o lib-me.o \ diff --git a/lustre/portals/router/Makefile.mk b/lustre/portals/router/Makefile.mk index dc007fc..9b02c03 100644 --- a/lustre/portals/router/Makefile.mk +++ b/lustre/portals/router/Makefile.mk @@ -3,7 +3,7 @@ # This code is issued under the GNU General Public License. # See the file COPYING in this distribution -include $(obj)/../Kernelenv +include $(src)/../Kernelenv obj-y += kptlrouter.o kptlrouter-objs := router.o proc.o diff --git a/lustre/portals/tests/ping_cli.c b/lustre/portals/tests/ping_cli.c index 389ffbb..806d80f 100644 --- a/lustre/portals/tests/ping_cli.c +++ b/lustre/portals/tests/ping_cli.c @@ -260,7 +260,7 @@ pingcli_start(struct portal_ioctl_data *args) /* called by the portals_ioctl for ping requests */ -static int kping_client(struct portal_ioctl_data *args) +int kping_client(struct portal_ioctl_data *args) { PORTAL_ALLOC (client, sizeof(struct pingcli_data)); if (client == NULL) diff --git a/lustre/portals/tests/sping_cli.c b/lustre/portals/tests/sping_cli.c index 4cef08b..7affed8 100644 --- a/lustre/portals/tests/sping_cli.c +++ b/lustre/portals/tests/sping_cli.c @@ -235,7 +235,7 @@ pingcli_start(struct portal_ioctl_data *args) /* called by the portals_ioctl for ping requests */ -static int kping_client(struct portal_ioctl_data *args) +int kping_client(struct portal_ioctl_data *args) { PORTAL_ALLOC (client, sizeof(struct pingcli_data)); diff --git a/lustre/portals/utils/.cvsignore b/lustre/portals/utils/.cvsignore index 041cd6b..bf37bf4 100644 --- a/lustre/portals/utils/.cvsignore +++ b/lustre/portals/utils/.cvsignore @@ -5,3 +5,4 @@ debugctl ptlctl .deps routerstat +.*.cmd -- 1.8.3.1