From: <kva...@ya...> - 2001-06-22 18:37:19
|
diff -Nru linux-2.4.2/arch/alpha/config.in linux/arch/alpha/config.in --- linux-2.4.2/arch/alpha/config.in Sat Dec 30 03:37:19 2000 +++ linux/arch/alpha/config.in Fri Jun 22 10:54:10 2001 @@ -363,3 +363,17 @@ bool 'Legacy kernel start address' CONFIG_ALPHA_LEGACY_START_ADDRESS endmenu + +mainmenu_option next_comment +comment 'Clustering' +bool 'Clustering' CONFIG_CLUSTER +if [ "$CONFIG_CLUSTER" = "y" ]; then + bool 'CLuster Membership Service (CLMS)' CONFIG_CLMS + if [ "$CONFIG_CLMS" = "y" ]; then + comment 'Internode Communication Subsystem (ICS) is required for CLMS' + define_bool CONFIG_ICS y + fi +fi + +endmenu + diff -Nru linux-2.4.2/arch/alpha/defconfig linux/arch/alpha/defconfig --- linux-2.4.2/arch/alpha/defconfig Tue Oct 17 04:08:41 2000 +++ linux/arch/alpha/defconfig Fri Jun 22 10:54:42 2001 @@ -637,3 +637,10 @@ CONFIG_MATHEMU=y CONFIG_MAGIC_SYSRQ=y CONFIG_ALPHA_LEGACY_START_ADDRESS=y + +# +# Clustering +# +CONFIG_CLUSTER=y +CONFIG_CLMS=y +CONFIG_ICS=y diff -Nru linux-2.4.2/arch/alpha/kernel/entry.S linux/arch/alpha/kernel/entry.S --- linux-2.4.2/arch/alpha/kernel/entry.S Mon Sep 4 00:06:45 2000 +++ linux/arch/alpha/kernel/entry.S Fri Jun 22 11:50:38 2001 @@ -2,6 +2,9 @@ * alpha/entry.S * * kernel entry-points + * + * Incremented NR_SYSCALLS to include SSI system calls + * (ane...@di...) */ #include <linux/config.h> @@ -10,7 +13,7 @@ #define SIGCHLD 20 -#define NR_SYSCALLS 377 +#define NR_SYSCALLS 379 /* * These offsets must match with alpha_mv in <asm/machvec.h>. @@ -1022,7 +1025,7 @@ .quad alpha_ni_syscall .quad alpha_ni_syscall .quad alpha_ni_syscall - .quad alpha_ni_syscall /* 240 */ + .quad alpha_ni_syscall /* 240 */ .quad osf_sysinfo .quad alpha_ni_syscall .quad alpha_ni_syscall @@ -1161,3 +1164,5 @@ .quad sys_mincore /* 375 */ .quad sys_pciconfig_iobase .quad sys_getdents64 +/* BEGIN SSI SYSTEM CALLS HERE ane...@di... */ + .quad sys_ssisys /* 378 */ diff -Nru linux-2.4.2/arch/alpha/kernel/signal.c linux/arch/alpha/kernel/signal.c --- linux-2.4.2/arch/alpha/kernel/signal.c Thu Jan 25 04:46:23 2001 +++ linux/arch/alpha/kernel/signal.c Fri Jun 22 10:59:20 2001 @@ -4,6 +4,8 @@ * Copyright (C) 1995 Linus Torvalds * * 1997-11-02 Modified for POSIX.1b signals by Richard Henderson + * + * Added SIGCLUSTER to do_signal() function (ane...@di...) */ #include <linux/sched.h> @@ -690,6 +692,7 @@ switch (signr) { case SIGCONT: case SIGCHLD: case SIGWINCH: + case SIGCLUSTER: continue; case SIGTSTP: case SIGTTIN: case SIGTTOU: diff -Nru linux-2.4.2/cluster/clms/clms_ics.c linux/cluster/clms/clms_ics.c --- linux-2.4.2/cluster/clms/clms_ics.c Fri Jun 22 10:43:54 2001 +++ linux/cluster/clms/clms_ics.c Fri Jun 22 11:04:14 2001 @@ -240,10 +240,18 @@ /* * param OUT clock_t * */ +#ifdef __alpha__ +#define cli_decode_clock_t_p(hndl,x) \ + cli_decode_as_llong_p(hndl,x,long) +#define svr_encode_clock_t_p(hndl,x) \ + svr_encode_as_llong_p(hndl,x,long) +#else #define cli_decode_clock_t_p(hndl,x) \ cli_decode_as_int_p(hndl,x,long) #define svr_encode_clock_t_p(hndl,x) \ svr_encode_as_int_p(hndl,x,long) + +#endif /* * Include prototypes, client and server stubs generated by icsgen. diff -Nru linux-2.4.2/cluster/clms/clms_mgmt.c linux/cluster/clms/clms_mgmt.c --- linux-2.4.2/cluster/clms/clms_mgmt.c Fri Jun 22 10:43:54 2001 +++ linux/cluster/clms/clms_mgmt.c Fri Jun 22 11:08:06 2001 @@ -1518,11 +1518,14 @@ return -EINVAL; /* invalid node number */ if (node != CLUSTERNODE_THIS) { - if (node == this_node) + if (node == this_node) { + /* Just to correct the compiler warning ane...@di... */ + printk(" "); #ifdef CONFIG_KDB KDB_ENTER(); #endif /* CONFIG_KDB */ - else { + } + else if (node != this_node) { state = clms_get_node_status(node); if (!(state & CLMS_NODE_UP)) diff -Nru linux-2.4.2/cluster/ics/ics_tcp/ics_llcli.c linux/cluster/ics/ics_tcp/ics_llcli.c --- linux-2.4.2/cluster/ics/ics_tcp/ics_llcli.c Fri Jun 22 10:43:55 2001 +++ linux/cluster/ics/ics_tcp/ics_llcli.c Fri Jun 22 11:16:22 2001 @@ -398,7 +398,8 @@ int nelem) { /* Assert word alignment */ - ASSERT((u_int)param % sizeof(int64) == 0); +/* param is an address ane...@di... */ + ASSERT((u_long)param % sizeof(int64) == 0); ASSERT((void *)handle->ch_msg_inline_data_p + (nelem<<INT64SHIFT) <= handle->ch_msg_inline_iov_p[0].iov_base + @@ -467,7 +468,8 @@ int nelem) { /* Assert word alignment */ - ASSERT((u_int)param % sizeof(int32) == 0); +/*param is an address ane...@di... */ + ASSERT((u_long)param % sizeof(int32) == 0); ASSERT((void *)handle->ch_msg_inline_data_p + (nelem<<INT32SHIFT) <= handle->ch_msg_inline_iov_p[0].iov_base + diff -Nru linux-2.4.2/cluster/ics/ics_tcp/ics_llmgmt.c linux/cluster/ics/ics_tcp/ics_llmgmt.c --- linux-2.4.2/cluster/ics/ics_tcp/ics_llmgmt.c Fri Jun 22 10:43:55 2001 +++ linux/cluster/ics/ics_tcp/ics_llmgmt.c Fri Jun 22 11:20:08 2001 @@ -1006,7 +1006,7 @@ if (!clms_is_secondary_by_addr(&icsinfo)) { printk(KERN_WARNING "ics_llunack_daemon: received request from unauthorized node (0x%x)", - (unsigned int) &icsinfo); + (unsigned long) &icsinfo); continue; } /* @@ -1317,7 +1317,7 @@ ics_probe_clms_daemon( void *port_argp) { - int port; + long port; int error; struct sockaddr_in sin; struct msghdr *msg; @@ -1333,7 +1333,7 @@ int len; - port = (int) port_argp; + port = (long) port_argp; error = sock_create(PF_INET, SOCK_STREAM, IPPROTO_TCP, &sock); if (error < 0) @@ -1521,14 +1521,14 @@ ics_chan_listen( void *port_argp) { - int port; + long port; int error; struct _ics_rinfo *valptr = NULL; struct sockaddr_in sin; struct socket *sock, *newsock; mm_segment_t oldfs; - port = (int) port_argp; + port = (long) port_argp; error = sock_create(PF_INET, SOCK_STREAM, IPPROTO_TCP, &sock); if (error < 0) @@ -1684,7 +1684,11 @@ ASSERT(ptr != NULL); msg->msg_iov->iov_len = (__kernel_size_t)(sizeof(clusternode_t)+sizeof(int)); +#ifdef __alpha__ + ASSERT(sizeof(clusternode_t) == 8); +#else ASSERT(sizeof(clusternode_t) == 4); +#endif /* * Now get the node number and channel number from the client. * The node number is given in 4 bytes (not int, not long...). diff -Nru linux-2.4.2/cluster/ics/ics_tcp/ics_llsvr.c linux/cluster/ics/ics_tcp/ics_llsvr.c --- linux-2.4.2/cluster/ics/ics_tcp/ics_llsvr.c Fri Jun 22 10:43:55 2001 +++ linux/cluster/ics/ics_tcp/ics_llsvr.c Fri Jun 22 11:22:56 2001 @@ -573,7 +573,8 @@ if (nelem > 0) { /* Assert word alignment */ - ASSERT((u32)param % sizeof(int64) == 0); +/* param is an address ane...@di... */ + ASSERT((u_long)param % sizeof(int64) == 0); lenleft = ics_skb_bcopy(&handle->sh_msg_inline_skb_p, &handle->sh_msg_inline_data_p, @@ -646,7 +647,8 @@ if (nelem > 0) { /* Assert word alignment */ - ASSERT((u_int)param % sizeof(int32) == 0); +/* param is an address ane...@di... */ + ASSERT((u_long)param % sizeof(int32) == 0); lenleft = ics_skb_bcopy(&handle->sh_msg_inline_skb_p, &handle->sh_msg_inline_data_p, diff -Nru linux-2.4.2/cluster/util/nsc_scalls.c linux/cluster/util/nsc_scalls.c --- linux-2.4.2/cluster/util/nsc_scalls.c Fri Jun 22 10:43:55 2001 +++ linux/cluster/util/nsc_scalls.c Fri Jun 22 11:25:06 2001 @@ -543,6 +543,9 @@ break; default: /* invalid version */ error = -EINVAL; +#ifdef DEBUG + printk(KERN_DEBUG "ssisys: Invalid Vesrion\n"); +#endif goto out; } @@ -1539,7 +1542,7 @@ * ulong - as defined in cluster.h */ ulong -cluster_get_api_state(ulong clms_state) +cluster_get_api_state(ulong clms_state) { switch(clms_state) { case CLMS_STATE_NEVERUP: @@ -1560,7 +1563,7 @@ return CLUSTERNODE_DOWN; default: /* invalid state */ - return 0; + return 0x0; } } @@ -1717,6 +1720,9 @@ if (uaddrin_len <= 0 || uaddrin_len > sizeof(inargs) || uaddrout_len == 0) { /* no out arg */ +#ifdef DEBUG + printk(" Error in uaadrin_len or uaddrout_len\n"); +#endif /* DEBUG */ return -EINVAL; } if (copy_from_user((caddr_t)&inargs, uaddrin, uaddrin_len)) { @@ -1965,6 +1971,7 @@ u_int uaddrout_len, rval_t* rvp) { + return NSC_MAX_NODE_VALUE; } diff -Nru linux-2.4.2/cluster/util/xdr_msghdr.c linux/cluster/util/xdr_msghdr.c --- linux-2.4.2/cluster/util/xdr_msghdr.c Fri Jun 22 10:43:55 2001 +++ linux/cluster/util/xdr_msghdr.c Fri Jun 22 11:29:41 2001 @@ -32,6 +32,11 @@ /* * Modification History: + * 22jun01 ane...@di... + * xdrmsghdr_getpos() + * xdrmsghdr_setpos() + * Removed long - int casting issues while finding the + * difference between two address * * 01apr01 ksung * - ported to use Linux msghdr structs. @@ -42,6 +47,8 @@ * to handle that circumstance. Also fixed xdrmblk_putlong() in a * corresponding way. Manifested as errors in osmlog of: * "xdr_mblk: long crosses mblks!". + * + * */ /* Avoid name collisions with <linux/sunrpc> code. */ @@ -350,8 +357,8 @@ u_int xdrmsghdr_getpos(const XDR *xdrs) { - return ((u_int)xdrs->x_private - - (u_int)((struct iovec *)(xdrs->x_base))->iov_base); + return ((u_int)((u_long)xdrs->x_private - + (u_long)((struct iovec *)(xdrs->x_base))->iov_base)); } /* @@ -385,11 +392,11 @@ */ char *lastaddr = (char *)(xdrs->x_private + xdrs->x_handy); - if ((int)newaddr > (int)lastaddr) + if (newaddr > lastaddr) return (FALSE); xdrs->x_private = newaddr; - xdrs->x_handy = (int)lastaddr - (int)newaddr; + xdrs->x_handy = lastaddr - newaddr; /* * Maintain coherency between the x_handy buffer size and diff -Nru linux-2.4.2/include/asm-alpha/signal.h linux/include/asm-alpha/signal.h --- linux-2.4.2/include/asm-alpha/signal.h Thu Jun 25 03:00:11 1998 +++ linux/include/asm-alpha/signal.h Fri Jun 22 11:32:21 2001 @@ -64,13 +64,18 @@ #define SIGINFO 29 #define SIGUSR1 30 #define SIGUSR2 31 +#define SIGMIGRATE 32 +#define SIGCLUSTER 33 +/* Added SIGUNUSED to make sure the signal numbers remain same across +platform ane...@di... */ +#define SIGUNUSED 34 #define SIGPOLL SIGIO #define SIGPWR SIGINFO #define SIGIOT SIGABRT /* These should not be considered constants from userland. */ -#define SIGRTMIN 32 +#define SIGRTMIN 35 #define SIGRTMAX (_NSIG-1) /* diff -Nru linux-2.4.2/include/asm-alpha/unistd.h linux/include/asm-alpha/unistd.h --- linux-2.4.2/include/asm-alpha/unistd.h Thu Jan 25 04:46:23 2001 +++ linux/include/asm-alpha/unistd.h Fri Jun 22 11:32:59 2001 @@ -315,6 +315,9 @@ #define __NR_mincore 375 #define __NR_pciconfig_iobase 376 #define __NR_getdents64 377 +/* BEGIN SSI SYSTEM CALLS */ +#define __NR_ssisys 378 + #if defined(__GNUC__) diff -Nru linux-2.4.2/include/cluster/ics/ics_tcp_sock.h linux/include/cluster/ics/ics_tcp_sock.h --- linux-2.4.2/include/cluster/ics/ics_tcp_sock.h Fri Jun 22 10:43:56 2001 +++ linux/include/cluster/ics/ics_tcp_sock.h Fri Jun 22 11:37:44 2001 @@ -18,6 +18,11 @@ */ /* * Header file used internally by the NSC ICS low-level code. + * + * 22JUN2001 ane...@di... + * Change the ihdr_transid field of struct icshdr_t. + * This variable is found to carry address + * */ #ifndef _CLUSTER_ICS_ICS_TCP_SOCK_H @@ -38,7 +43,11 @@ unsigned int ihdr_service:32; unsigned int ihdr_procnum:16; unsigned int ihdr_inline_len:16; - unsigned int ihdr_transid:32; +#ifdef __alpha__ + unsigned long ihdr_transid:64; +#else + unsigned int ihdr_transid:32; +#endif unsigned int ihdr_orignode:32; unsigned int ihdr_chan:16; unsigned int ihdr_unused:16; diff -Nru linux-2.4.2/include/cluster/ics.h linux/include/cluster/ics.h --- linux-2.4.2/include/cluster/ics.h Fri Jun 22 10:43:56 2001 +++ linux/include/cluster/ics.h Fri Jun 22 11:40:05 2001 @@ -14,6 +14,12 @@ * details. * * Questions/Comments/Bugfixes to ci-...@li... + */ + + /* + * 22JUN2001 ane...@di... + * Some int32 and int64 changes specific to alpha platform + * * */ #ifndef _CLUSTER_ICS_H @@ -29,13 +35,21 @@ */ #ifndef _INT32 #define _INT32 +#ifdef __alpha__ +typedef int int32; +#else typedef long int32; +#endif #endif #ifndef _INT64 #define _INT64 +#ifdef __alpha__ +typedef long int64; +#else typedef dl_t int64; +#endif #endif #define INT32MASK 3 diff -Nru linux-2.4.2/include/cluster/icsgen.h linux/include/cluster/icsgen.h --- linux-2.4.2/include/cluster/icsgen.h Fri Jun 22 10:43:56 2001 +++ linux/include/cluster/icsgen.h Fri Jun 22 11:42:07 2001 @@ -16,14 +16,21 @@ * Questions/Comments/Bugfixes to ci-...@li... * */ +/* + * + * 22JUN2001 ane...@di... + * Some int long encoding changes wrt to alpha platform + * + * + */ #ifndef _CLUSTER_ICSGEN_H #define _CLUSTER_ICSGEN_H typedef struct cli_opaque_handle { - int dummy; + long dummy; } cli_handle_t; typedef struct svr_opaque_handle { - int dummy; + long dummy; } svr_handle_t; #include <linux/types.h> @@ -310,6 +317,20 @@ * param IN u_long * param OUT u_long * */ +#ifdef __alpha__ +#define cli_encode_u_long(hndl,x) \ + cli_encode_as_llong(hndl,x,u_long) +#define cli_encode_u_long_p(hndl,x) \ + cli_encode_as_llong_p(hndl,x,u_long) +#define cli_decode_u_long_p(hndl,x) \ + cli_decode_as_llong_p(hndl,x,u_long) +#define svr_decode_u_long(hndl,x) \ + svr_decode_as_llong(hndl,x,u_long) +#define svr_decode_u_long_p(hndl,x) \ + svr_decode_as_llong_p(hndl,x,u_long) +#define svr_encode_u_long_p(hndl,x) \ + svr_encode_as_llong_p(hndl,x,u_long) +#else #define cli_encode_u_long(hndl,x) \ cli_encode_as_int(hndl,x,u_long) #define cli_encode_u_long_p(hndl,x) \ @@ -322,6 +343,7 @@ svr_decode_as_int_p(hndl,x,u_long) #define svr_encode_u_long_p(hndl,x) \ svr_encode_as_int_p(hndl,x,u_long) +#endif /* * param IN u_int @@ -398,18 +420,33 @@ /* * param IN clusternode_t */ +#ifdef __alpha__ +#define cli_encode_clusternode_t(hndl,x) \ + cli_encode_as_llong(hndl,x,clusternode_t) +#define svr_decode_clusternode_t(hndl,x) \ + svr_decode_as_llong(hndl,x,clusternode_t) +#else #define cli_encode_clusternode_t(hndl,x) \ cli_encode_as_int(hndl,x,clusternode_t) #define svr_decode_clusternode_t(hndl,x) \ svr_decode_as_int(hndl,x,clusternode_t) +#endif /* * param OUT clusternode_t * */ +#ifdef __alpha__ +#define cli_decode_clusternode_t_p(hndl,x) \ + cli_decode_as_llong_p(hndl,x,clusternode_t) +#define svr_encode_clusternode_t_p(hndl,x) \ + svr_encode_as_llong_p(hndl,x,clusternode_t) +#else #define cli_decode_clusternode_t_p(hndl,x) \ cli_decode_as_int_p(hndl,x,clusternode_t) #define svr_encode_clusternode_t_p(hndl,x) \ svr_encode_as_int_p(hndl,x,clusternode_t) + +#endif /* * param IN:VAR:OOL clusternode_t * ____________________________________________________________ Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie |