x86_64 patch for OpenSSI - 3 of 6 - x86_64 arch files for CI

John Hughes <[email protected]> Fri, 12 Feb 2010 16:10:21 +0100
Newsgroups gmane.linux.cluster.ssic.devel
Message-ID <[email protected]>
This patch creates the x86_64 architecture files for CI.  
(cluster/arch/x86_64).

To apply:

   1. get the current (12/2/2010) CI cvs to ./ci

   2. save the patch as ./ci-x86_64.patch

   3. cd ./ci/kernel

   4. Apply the patch:

      patch -p0 <../../ci-x86_64.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
ci-x86_64.patch (text/x-patch, 2.2 KB)
Index: cluster/arch/x86_64/include/arch_regs.h
===================================================================
RCS file: cluster/arch/x86_64/include/arch_regs.h
diff -N cluster/arch/x86_64/include/arch_regs.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ cluster/arch/x86_64/include/arch_regs.h	22 Jan 2010 16:12:16 -0000	1.1.3.1.2.2
@@ -0,0 +1,53 @@
+/*
+ * 	Platform dependent register definitions.
+ *	Copyright 2002 Compaq Computer Corporation
+ *
+ *	This program is free software; you can redistribute it and/or
+ *	modify it under the terms of the GNU General Public License as
+ *	published by the Free Software Foundation; either version 2 of
+ *	the License, or (at your option) any later version.
+ *
+ *	This program is distributed in the hope that it will be useful,
+ *	but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *	MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE
+ *	or NON INFRINGEMENT.  See the GNU General Public License for more
+ *	details.
+ *
+ * 	You should have received a copy of the GNU General Public License
+ * 	along with this program; if not, write to the Free Software
+ * 	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *	Questions/Comments/Bugfixes to [email protected]
+ *
+ * x86_64
+ */
+
+#ifndef _CLUSTER_X86_64_ARCH_REGS_H
+#define _CLUSTER_X86_64_ARCH_REGS_H
+
+#include <linux/ptrace.h>
+
+/* Full register context on stack for process. */
+struct arch_regs_stack {
+	struct pt_regs arch_pt_regs;
+};
+
+/* Get pt_regs from arch_regs_stack. */
+#define ARCH_PT_REGS(_regs)	(&(_regs)->arch_pt_regs)
+
+/* The following macros expect a pointer to the pt_regs. */
+#define	SYSCALL_ARG1(_regs)	((_regs)->rdi)
+#define	SYSCALL_ARG2(_regs)	((_regs)->rsi)
+#define	SYSCALL_ARG3(_regs)	((_regs)->rdx)
+#define	SYSCALL_ARG4(_regs)	((_regs)->r10)
+#define	SYSCALL_ARG5(_regs)	((_regs)->r8)
+#define	SYSCALL_ARG6(_regs)	((_regs)->r9)
+
+extern asmlinkage long sys_ptrace(long, long, unsigned long, long);
+
+extern asmlinkage void ret_from_rproc(struct arch_regs_stack *, int)
+	 __asm__("ret_from_rproc");
+
+extern void ret_from_rexec(struct pt_regs *);
+
+#endif /* _CLUSTER_X86_64_ARCH_REGS_H */