x86_64 patch for OpenSSI - 6 of 6 - lp64 fixes for OpenSSI
John Hughes <[email protected]> Fri, 12 Feb 2010 16:22:52 +0100
| Newsgroups | gmane.linux.cluster.ssic.devel |
|---|---|
| Message-ID | <[email protected]> |
This patch fixes compilation warnings and errors on LP64 systems for
OpenSSI.
(LP64 = systems where long and pointer are 64 bits, so we get warnings
moving a clusternode_t into a void* and vice-versa).
To apply:
1. get the current (12/2/2010) OpenSSI cvs to ./openssi
2. save the patch as ./openssi-lp64.patch
3. cd ./openssi/kernel
4. Apply the patch:
patch -p0 <../../openssi-lp64.patch
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
ssic-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ssic-linux-devel
openssi-lp64.patch
(text/x-patch, 10.5 KB)
Index: cluster/ssi/cfs/cfs_svc.c
===================================================================
RCS file: /usr/local/lib/cvs-repo/openssi-future/cluster/ssi/cfs/Attic/cfs_svc.c,v
retrieving revision 1.1.4.4
retrieving revision 1.1.4.4.2.1
diff -u -p -r1.1.4.4 -r1.1.4.4.2.1
--- cluster/ssi/cfs/cfs_svc.c 2 Jan 2010 12:51:59 -0000 1.1.4.4
+++ cluster/ssi/cfs/cfs_svc.c 25 Jan 2010 11:23:55 -0000 1.1.4.4.2.1
@@ -76,7 +76,7 @@ void (*debug_func)() = (void(*)())printk
void
cfs_nodedown_thread(void *arg)
{
- clusternode_t node = (clusternode_t)arg;
+ clusternode_t node = (long)arg;
struct super_block *sb;
struct vfsmount *rootmnt;
cfs_mntinfo_t *mip; /* CFS mount information. */
@@ -310,7 +310,7 @@ cfs_nodedown(void *clms_handle,
* nodedown services.
*/
error = spawn_daemon_thread(
- "cfs failover", cfs_nodedown_thread, (void *)node);
+ "cfs failover", cfs_nodedown_thread, (void *)(long)node);
if (error != 0)
printk(KERN_CRIT "cfs_nodedown: spawn_daemon_thread: "
" error %d", error);
Index: cluster/ssi/cfs/proc.c
===================================================================
RCS file: /usr/local/lib/cvs-repo/openssi-future/cluster/ssi/cfs/Attic/proc.c,v
retrieving revision 1.1.4.4
retrieving revision 1.1.4.4.2.1
diff -u -p -r1.1.4.4 -r1.1.4.4.2.1
--- cluster/ssi/cfs/proc.c 2 Jan 2010 12:51:59 -0000 1.1.4.4
+++ cluster/ssi/cfs/proc.c 25 Jan 2010 11:23:55 -0000 1.1.4.4.2.1
@@ -640,7 +640,7 @@ cfs_proc_write(struct cfs_write_data *da
cfs_mntinfo_t *mip = itocmi(data->inode);
unsigned int vlen = 0;
- dprintk("CFS call write %d @ %Ld\n", (ssize_t)data->count, (long long)data->offset);
+ dprintk("CFS call write %ld @ %Ld\n", (ssize_t)data->count, (long long)data->offset);
CFS_SB_FSOP_START(mip);
sb_down_retry:
Index: cluster/ssi/cfs/vfs.c
===================================================================
RCS file: /usr/local/lib/cvs-repo/openssi-future/cluster/ssi/cfs/Attic/vfs.c,v
retrieving revision 1.1.4.4
retrieving revision 1.1.4.4.2.1
diff -u -p -r1.1.4.4 -r1.1.4.4.2.1
--- cluster/ssi/cfs/vfs.c 2 Jan 2010 12:52:00 -0000 1.1.4.4
+++ cluster/ssi/cfs/vfs.c 25 Jan 2010 11:23:55 -0000 1.1.4.4.2.1
@@ -894,7 +894,7 @@ cfsd_write(struct svrcfstok *hp, loff_t
}
#endif /* CFS_GATHERWRITES */
- dprintk("cfsd: write complete err=%d\n", err);
+ dprintk("cfsd: write complete err=%ld\n", err);
if (err >= 0)
err = 0;
out_close:
Index: cluster/ssi/ipc/namesvr_func.c
===================================================================
RCS file: /usr/local/lib/cvs-repo/openssi-future/cluster/ssi/ipc/Attic/namesvr_func.c,v
retrieving revision 1.1.4.4
retrieving revision 1.1.4.4.2.1
diff -u -p -r1.1.4.4 -r1.1.4.4.2.1
--- cluster/ssi/ipc/namesvr_func.c 2 Jan 2010 12:52:00 -0000 1.1.4.4
+++ cluster/ssi/ipc/namesvr_func.c 25 Jan 2010 11:23:55 -0000 1.1.4.4.2.1
@@ -1008,7 +1008,7 @@ ipc_semundo_nodedown(clusternode_t node)
*/
error = spawn_daemon_thread("semundo nodedown",
(void *)semundo_nodedown_thread,
- (void *)node);
+ (void *)(long)node);
if (error != 0)
printk(KERN_CRIT "ipc_semundo_nodedown: spawn_daemon_thread: "
" error %d", error);
Index: cluster/ssi/mosixll/balance.c
===================================================================
RCS file: /usr/local/lib/cvs-repo/openssi-future/cluster/ssi/mosixll/Attic/balance.c,v
retrieving revision 1.1.4.3
retrieving revision 1.1.4.3.2.1
diff -u -p -r1.1.4.3 -r1.1.4.3.2.1
--- cluster/ssi/mosixll/balance.c 2 Jan 2010 12:52:00 -0000 1.1.4.3
+++ cluster/ssi/mosixll/balance.c 22 Jan 2010 14:52:37 -0000 1.1.4.3.2.1
@@ -35,7 +35,7 @@
#endif /* !CONFIG_SSI */
#include <linux/mosix.h>
#include <asm/uaccess.h>
-#ifdef __i386__
+#if defined (__i386__) || defined (__x86_64__)
#include <asm/i387.h>
#endif
#include <linux/smp_lock.h>
Index: cluster/ssi/util/rmtsock.c
===================================================================
RCS file: /usr/local/lib/cvs-repo/openssi-future/cluster/ssi/util/Attic/rmtsock.c,v
retrieving revision 1.1.4.4
retrieving revision 1.1.4.4.2.1
diff -u -p -r1.1.4.4 -r1.1.4.4.2.1
--- cluster/ssi/util/rmtsock.c 2 Jan 2010 12:52:01 -0000 1.1.4.4
+++ cluster/ssi/util/rmtsock.c 25 Jan 2010 11:23:55 -0000 1.1.4.4.2.1
@@ -1165,7 +1165,7 @@ int rmtsock_recvmsg(struct kiocb *iocb,
for (;;) {
char *name = msg->msg_name;
- size_t *namelenp = &msg->msg_namelen;
+ int *namelenp = &msg->msg_namelen;
int *msgflagsp = &msg->msg_flags;
struct rmtfb_svrhandle svrhandle;
struct rmtfb_svrhandle *rshp;
Index: cluster/ssi/vproc/dvp_pvpsops.c
===================================================================
RCS file: /usr/local/lib/cvs-repo/openssi-future/cluster/ssi/vproc/Attic/dvp_pvpsops.c,v
retrieving revision 1.1.4.4
retrieving revision 1.1.4.4.2.1
diff -u -p -r1.1.4.4 -r1.1.4.4.2.1
--- cluster/ssi/vproc/dvp_pvpsops.c 2 Jan 2010 12:52:01 -0000 1.1.4.4
+++ cluster/ssi/vproc/dvp_pvpsops.c 25 Jan 2010 11:23:55 -0000 1.1.4.4.2.1
@@ -864,7 +864,7 @@ local:
/*
* Reboot the root node.
*/
- error = pps_reboot(flag1, (void *)flag2);
+ error = pps_reboot(flag1, (void *)(long)flag2);
if (flag1 == LINUX_REBOOT_CMD_HALT ||
flag1 == LINUX_REBOOT_CMD_POWER_OFF) {
#ifdef VPROC_REBOOT_SECONDARY_MASTER_NM_DISABLE
@@ -909,7 +909,7 @@ pvpsop_reboot_msg(
nm_stop();
stop_all_ics();
}
- pps_reboot(flag1, (void *)flag2);
+ pps_reboot(flag1, (void *)(long)flag2);
/* Don't do_exit() for HALT/POWER_OFF since we are in server proc */
return 0;
}
Index: cluster/ssi/vproc/nd_cleanup.c
===================================================================
RCS file: /usr/local/lib/cvs-repo/openssi-future/cluster/ssi/vproc/Attic/nd_cleanup.c,v
retrieving revision 1.1.4.3
retrieving revision 1.1.4.3.2.1
diff -u -p -r1.1.4.3 -r1.1.4.3.2.1
--- cluster/ssi/vproc/nd_cleanup.c 2 Jan 2010 12:52:01 -0000 1.1.4.3
+++ cluster/ssi/vproc/nd_cleanup.c 25 Jan 2010 11:23:55 -0000 1.1.4.3.2.1
@@ -149,7 +149,7 @@ vproc_should_pack_care(
{
struct vproc *vp;
struct pvproc *pvp;
- clusternode_t down_node = (clusternode_t)args;
+ clusternode_t down_node = (long)args;
boolean_t pack;
SSI_ASSERT(!(vcdp->vcd_flags & VPROC_CARE_MEMBER_LIST));
Index: fs/proc/proc_cluster.c
===================================================================
RCS file: /usr/local/lib/cvs-repo/openssi-future/fs/proc/Attic/proc_cluster.c,v
retrieving revision 1.1.4.4
retrieving revision 1.1.4.4.2.1
diff -u -p -r1.1.4.4 -r1.1.4.4.2.1
--- fs/proc/proc_cluster.c 2 Jan 2010 12:52:03 -0000 1.1.4.4
+++ fs/proc/proc_cluster.c 25 Jan 2010 11:32:26 -0000 1.1.4.4.2.1
@@ -62,7 +62,7 @@ proc_node_read_load(char *page, char **s
int count, int *eof, void *data)
{
int len;
- clusternode_t node = (clusternode_t)data;
+ clusternode_t node = (long)data;
len = sprintf(page,"%lu\n",
#ifdef CONFIG_MOSIX_LL
@@ -216,7 +216,7 @@ loadlevel_read_proc(struct file * file,
/* Get node number */
dp = file->f_dentry;
de = PDE(dp->d_inode);
- node = (clusternode_t)de->data;
+ node = (long)de->data;
if (node == this_node)
sprintf((char *)page, "%d\n",
(loadlvl_enabled ? atomic_read(&loadlevel_on) : -1));
@@ -281,7 +281,7 @@ loadlevel_write_proc(struct file * file,
}
#ifdef PROC_CLUSTER_DIR_ENTRY_FIX
- node = (clusternode_t) PDE(file->f_dentry->d_inode)->data;
+ node = (long)PDE(file->f_dentry->d_inode)->data;
#else
/* Use the file struct to get the back pathwalk and
* see which node its wants.
@@ -310,7 +310,7 @@ static struct file_operations proc_loadl
#ifdef SSI_NOTYET
static int proc_cluster_revalidate(struct dentry *dentry, struct nameidata *nd)
{
- clusternode_t node = (clusternode_t) PDE(dentry->d_inode)->data;
+ clusternode_t node = (long) PDE(dentry->d_inode)->data;
if (node && node != this_node && !clms_isnodeup(node)) {
struct proc_dir_entry *de;
@@ -320,7 +320,7 @@ static int proc_cluster_revalidate(struc
lock_kernel();
#ifdef CONFIG_LDLVL
for (de = proc_cluster->subdir; de ; de = de->next) {
- if (node == (clusternode_t)de->data) {
+ if (node == (long)de->data) {
remove_proc_entry("loadlevel", de);
remove_proc_entry("load", de);
break;
@@ -361,14 +361,14 @@ proc_cluster_node_init(void)
sprintf(nodedir, "cluster/node%u", this_node);
proc_cluster_node = proc_mkdir(nodedir, 0);
#endif
- proc_cluster_node->data = (void *)this_node;
+ proc_cluster_node->data = (void *)(long)this_node;
#ifdef CONFIG_LDLVL
/* Create load file which will contain the node's load average */
create_proc_read_entry("load", S_IFREG|S_IRUSR|S_IRGRP|S_IROTH,
proc_cluster_node,
proc_node_read_load,
- (void *)this_node);
+ (void *)(long)this_node);
/* Create the loadlevel file which will turn on/off the loadleveler */
node_loadlevel_entry = create_proc_entry("loadlevel",
@@ -376,7 +376,7 @@ proc_cluster_node_init(void)
proc_cluster_node);
if (node_loadlevel_entry) {
node_loadlevel_entry->proc_fops = &proc_loadlevel_operations;
- node_loadlevel_entry->data = (void *)this_node;
+ node_loadlevel_entry->data = (void *)(long)this_node;
}
#else
(void)node_loadlevel_entry;
@@ -414,20 +414,20 @@ proc_cluster_lookup(struct inode * dir,
goto next_node;
}
#endif
- nodedir->data = (void *)node;
+ nodedir->data = (void *)(long)node;
#ifdef CONFIG_LDLVL
create_proc_read_entry("load",
S_IFREG|S_IRUSR|S_IRGRP|S_IROTH,
nodedir,
proc_node_read_load,
- (void *)node);
+ (void *)(long)node);
node_entry = create_proc_entry("loadlevel",
S_IFREG|S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH,
nodedir);
if (node_entry) {
node_entry->proc_fops = &proc_loadlevel_operations;
- node_entry->data = (void *)node;
+ node_entry->data = (void *)(long)node;
}
#else
(void)node_entry;
@@ -444,7 +444,7 @@ next_node:
dentry->d_name.name, de)) {
int ino = de->low_ino;
- node = (clusternode_t) de->data;
+ node = (long) de->data;
if (node && node != this_node &&
!clms_isnodeup(node))
break;
Index: ipc/util.c
===================================================================
RCS file: /usr/local/lib/cvs-repo/openssi-future/ipc/util.c,v
retrieving revision 1.1.1.1.4.2
retrieving revision 1.1.1.1.4.2.2.1
diff -u -p -r1.1.1.1.4.2 -r1.1.1.1.4.2.2.1
--- ipc/util.c 2 Jan 2010 12:52:07 -0000 1.1.1.1.4.2
+++ ipc/util.c 25 Jan 2010 11:25:17 -0000 1.1.1.1.4.2.2.1
@@ -666,6 +666,7 @@ int ipc_checkid(struct ipc_ids* ids, str
#ifdef __ARCH_WANT_IPC_PARSE_VERSION
+#ifndef ipc_parse_version
/**
* ipc_parse_version - IPC call version
* @cmd: pointer to command
@@ -684,6 +685,7 @@ int ipc_parse_version (int *cmd)
return IPC_OLD;
}
}
+#endif
#ifdef CONFIG_SSI
int ipc_idtoidx(struct ipc_ids* ids, int id)