From: <er...@he...> - 2002-10-10 22:04:35
|
On Thu, Oct 10, 2002 at 02:37:04PM -0600, Andrew Shewmaker` wrote: > I am attempting to use bproc-3.2.1 with Mandrake 9.0 (kernel 2.4.19-16mdk and gcc 3.2) > I have successfully patched and compiled Mandrake's kernel with bproc, which meant I > had to do some of it by hand since the grsecurity stuff confused patch. Then I tried to > compile the bproc tools and I see the following error. > > ghost.c:63: initializer element is not constant > ghost.c:63: (near initialization for `bproc_ghost_reqs') > ghost.c:63: initializer element is not constant > > I assume this is simply due to gcc 3.2, and I will switch to an older compiler if I > have to, but if someone could suggest a simple fix I would appreciate it. I have no idea how a constant can become non constant when changing compilers. Anyway, I worked around it. Patch below (against bproc 3.2.1): - Erik Index: bproc/ChangeLog diff -c bproc/ChangeLog:1.83 bproc/ChangeLog:1.84 *** bproc/ChangeLog:1.83 Mon Sep 30 12:42:31 2002 --- bproc/ChangeLog Thu Oct 3 11:32:13 2002 *************** *** 1,4 **** ! Changes from 3.2.0 to 3.2.1 * Fixed an oddity in bproc_proclist and bproc_nodelist where it would still allocate memory even if the return value is zero. --- 1,8 ---- ! Changes from 3.2.1 to 3.2.2 ! ! * Fixed build problems and warnings with gcc 3.2. ! ! Changes from 3.2.0 to 3.2.1 * Fixed an oddity in bproc_proclist and bproc_nodelist where it would still allocate memory even if the return value is zero. Index: bproc/clients/bsh.c diff -c bproc/clients/bsh.c:1.11 bproc/clients/bsh.c:1.12 *** bproc/clients/bsh.c:1.11 Wed Aug 29 00:55:36 2001 --- bproc/clients/bsh.c Thu Oct 3 11:32:13 2002 *************** *** 17,23 **** * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * ! * $Id: bsh.c,v 1.11 2001/08/29 04:55:36 hendriks Exp $ *-----------------------------------------------------------------------*/ #include <stdio.h> #include <stdlib.h> --- 17,23 ---- * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * ! * $Id: bsh.c,v 1.12 2002/10/03 15:32:13 hendriks Exp $ *-----------------------------------------------------------------------*/ #include <stdio.h> #include <stdlib.h> *************** *** 59,65 **** fprintf(stderr, "No ghost master present.\n"); break; default: ! fprintf(stderr, "%s\n", sys_errlist[errno]); } exit(1); --- 59,65 ---- fprintf(stderr, "No ghost master present.\n"); break; default: ! fprintf(stderr, "%s\n", strerror(errno)); } exit(1); Index: bproc/daemons/iod.c diff -c bproc/daemons/iod.c:1.18 bproc/daemons/iod.c:1.19 *** bproc/daemons/iod.c:1.18 Sun Oct 14 02:47:11 2001 --- bproc/daemons/iod.c Thu Oct 3 11:32:13 2002 *************** *** 17,23 **** * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * ! * $Id: iod.c,v 1.18 2001/10/14 06:47:11 hendriks Exp $ *-----------------------------------------------------------------------*/ #include <stdio.h> #include <stdlib.h> --- 17,23 ---- * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * ! * $Id: iod.c,v 1.19 2002/10/03 15:32:13 hendriks Exp $ *-----------------------------------------------------------------------*/ #include <stdio.h> #include <stdlib.h> *************** *** 264,270 **** r = select(maxfd+1, &rset, &wset, 0, 0); if (r == -1) { if (errno == EINTR) continue; ! syslog(LOG_ERR, "iod: select: %s\n", sys_errlist[errno]); exit(1); } if (r > 0) { --- 264,270 ---- r = select(maxfd+1, &rset, &wset, 0, 0); if (r == -1) { if (errno == EINTR) continue; ! syslog(LOG_ERR, "iod: select: %s\n", strerror(errno)); exit(1); } if (r > 0) { *************** *** 302,308 **** pid = fork(); if (pid == -1) { ! syslog(LOG_ERR, "Failed to start IO daemon: %s\n", sys_errlist[errno]); exit(1); } if (pid == 0) { --- 302,308 ---- pid = fork(); if (pid == -1) { ! syslog(LOG_ERR, "Failed to start IO daemon: %s\n", strerror(errno)); exit(1); } if (pid == 0) { Index: bproc/daemons/master.c diff -c bproc/daemons/master.c:1.121 bproc/daemons/master.c:1.122 *** bproc/daemons/master.c:1.121 Mon Aug 5 18:56:09 2002 --- bproc/daemons/master.c Thu Oct 3 11:32:13 2002 *************** *** 17,23 **** * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * ! * $Id: master.c,v 1.121 2002/08/05 22:56:09 hendriks Exp $ *-----------------------------------------------------------------------*/ #include <sys/types.h> #include <sys/stat.h> --- 17,23 ---- * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * ! * $Id: master.c,v 1.122 2002/10/03 15:32:13 hendriks Exp $ *-----------------------------------------------------------------------*/ #include <sys/types.h> #include <sys/stat.h> *************** *** 901,907 **** pid = fork(); if (pid == -1) { syslog(LOG_ERR, "failed to run setup script for node %d\nfork: %s\n", ! s->rank, sys_errlist[errno]); return; } if (pid == 0) { --- 901,907 ---- pid = fork(); if (pid == -1) { syslog(LOG_ERR, "failed to run setup script for node %d\nfork: %s\n", ! s->rank, strerror(errno)); return; } if (pid == 0) { *************** *** 1246,1252 **** void set_keep_alive(int fd) { int flag = 1; if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &flag, sizeof(flag)) == -1) { ! syslog(LOG_ERR, "setsockopt: %s", sys_errlist[errno]); } } --- 1246,1252 ---- void set_keep_alive(int fd) { int flag = 1; if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &flag, sizeof(flag)) == -1) { ! syslog(LOG_ERR, "setsockopt: %s", strerror(errno)); } } *************** *** 1255,1261 **** void set_no_delay(int fd) { int flag = 1; if (setsockopt(fd, SOL_TCP, TCP_NODELAY, &flag, sizeof(flag)) == -1) { ! syslog(LOG_ERR, "setsockopt: %s", sys_errlist[errno]); } } --- 1255,1261 ---- void set_no_delay(int fd) { int flag = 1; if (setsockopt(fd, SOL_TCP, TCP_NODELAY, &flag, sizeof(flag)) == -1) { ! syslog(LOG_ERR, "setsockopt: %s", strerror(errno)); } } *************** *** 1349,1355 **** int remsize = sizeof(remote); slavefd = accept(ifc->fd, (struct sockaddr *) &remote, &remsize); if (slavefd == -1) { ! syslog(LOG_ERR, "accept: %s", sys_errlist[errno]); return -1; } --- 1349,1355 ---- int remsize = sizeof(remote); slavefd = accept(ifc->fd, (struct sockaddr *) &remote, &remsize); if (slavefd == -1) { ! syslog(LOG_ERR, "accept: %s", strerror(errno)); return -1; } *************** *** 1800,1806 **** if (r == -1) { syslog(LOG_CRIT, "write(ghost): error %s; req=%d", ! sys_errlist[errno], req->req.req); } else { if (r != sizeof(req->req)) syslog(LOG_CRIT,"write(ghost): short write; ignoring (Aaaieee!!)"); --- 1800,1806 ---- if (r == -1) { syslog(LOG_CRIT, "write(ghost): error %s; req=%d", ! strerror(errno), req->req.req); } else { if (r != sizeof(req->req)) syslog(LOG_CRIT,"write(ghost): short write; ignoring (Aaaieee!!)"); *************** *** 2058,2064 **** if (!ignore_version) return -1; } if ((ghostfd = syscall(__NR_bproc, BPROC_SYS_MASTER)) == -1) { ! syslog(LOG_ERR, "BPROC_SYS_MASTER: %s", sys_errlist[errno]); return -1; } set_non_block(ghostfd); --- 2058,2064 ---- if (!ignore_version) return -1; } if ((ghostfd = syscall(__NR_bproc, BPROC_SYS_MASTER)) == -1) { ! syslog(LOG_ERR, "BPROC_SYS_MASTER: %s", strerror(errno)); return -1; } set_non_block(ghostfd); *************** *** 2251,2257 **** r = select(maxfd+1, &rset, &wset, 0, &timeleft); if (r == -1) { if (errno == EINTR) continue; ! syslog(LOG_ERR, "select: %s", sys_errlist[errno]); exit(1); } /* Block the update signals while doing work. */ --- 2251,2257 ---- r = select(maxfd+1, &rset, &wset, 0, &timeleft); if (r == -1) { if (errno == EINTR) continue; ! syslog(LOG_ERR, "select: %s", strerror(errno)); exit(1); } /* Block the update signals while doing work. */ Index: bproc/kernel/bproc.h diff -c bproc/kernel/bproc.h:1.84 bproc/kernel/bproc.h:1.85 *** bproc/kernel/bproc.h:1.84 Mon Aug 5 18:56:10 2002 --- bproc/kernel/bproc.h Thu Oct 3 11:32:13 2002 *************** *** 16,22 **** * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ! * $Id: bproc.h,v 1.84 2002/08/05 22:56:10 hendriks Exp $ *-----------------------------------------------------------------------*/ #ifndef _BPROC_H #define _BPROC_H --- 16,22 ---- * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ! * $Id: bproc.h,v 1.85 2002/10/03 15:32:13 hendriks Exp $ *-----------------------------------------------------------------------*/ #ifndef _BPROC_H #define _BPROC_H *************** *** 654,659 **** --- 654,660 ---- ** Functions for sending/receiving requests **----------------------------------------------------------------------*/ /* kernel/msg.c */ + extern void bproc_init_request_queue (struct bproc_request_queue_t *q); extern void bproc_close_request_queue(struct bproc_request_queue_t *q); extern int bproc_deliver_response (struct bproc_request_queue_t *pending, struct bproc_krequest_t *req); extern struct bproc_krequest_t *bproc_next_req (struct bproc_request_queue_t *me); Index: bproc/kernel/ghost.c diff -c bproc/kernel/ghost.c:1.100 bproc/kernel/ghost.c:1.101 *** bproc/kernel/ghost.c:1.100 Tue Aug 6 11:42:57 2002 --- bproc/kernel/ghost.c Thu Oct 3 11:32:14 2002 *************** *** 17,23 **** * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ! * $Id: ghost.c,v 1.100 2002/08/06 15:42:57 hendriks Exp $ *-----------------------------------------------------------------------*/ #define __NO_VERSION__ --- 17,23 ---- * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ! * $Id: ghost.c,v 1.101 2002/10/03 15:32:14 hendriks Exp $ *-----------------------------------------------------------------------*/ #define __NO_VERSION__ *************** *** 59,66 **** LIST_HEAD(ghost_list); DECLARE_WAIT_QUEUE_HEAD(ghost_wait); ! struct bproc_request_queue_t bproc_ghost_reqs = ! EMPTY_BPROC_REQUEST_QUEUE(bproc_ghost_reqs); int ghost_deliver_msg(pid_t pid, struct bproc_krequest_t *req) { --- 59,65 ---- LIST_HEAD(ghost_list); DECLARE_WAIT_QUEUE_HEAD(ghost_wait); ! struct bproc_request_queue_t bproc_ghost_reqs; int ghost_deliver_msg(pid_t pid, struct bproc_krequest_t *req) { *************** *** 94,100 **** ghost->count = (atomic_t) ATOMIC_INIT(1); ghost->pid = current->pid; ghost->sigbypass = 0; ! ghost->req = EMPTY_BPROC_REQUEST_QUEUE(ghost->req); ghost->last_response = 0; ghost->wait=(wait_queue_head_t)__WAIT_QUEUE_HEAD_INITIALIZER(ghost->wait); ghost->state = TASK_RUNNING; --- 93,99 ---- ghost->count = (atomic_t) ATOMIC_INIT(1); ghost->pid = current->pid; ghost->sigbypass = 0; ! bproc_init_request_queue(&ghost->req); ghost->last_response = 0; ghost->wait=(wait_queue_head_t)__WAIT_QUEUE_HEAD_INITIALIZER(ghost->wait); ghost->state = TASK_RUNNING; Index: bproc/kernel/interface.c diff -c bproc/kernel/interface.c:1.80 bproc/kernel/interface.c:1.81 *** bproc/kernel/interface.c:1.80 Thu Sep 26 10:58:28 2002 --- bproc/kernel/interface.c Thu Oct 3 11:32:14 2002 *************** *** 16,22 **** * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ! * $Id: interface.c,v 1.80 2002/09/26 14:58:28 hendriks Exp $ *-----------------------------------------------------------------------*/ --- 16,22 ---- * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ! * $Id: interface.c,v 1.81 2002/10/03 15:32:14 hendriks Exp $ *-----------------------------------------------------------------------*/ *************** *** 1393,1398 **** --- 1393,1399 ---- printk(KERN_INFO "bproc: Beowulf Distributed Process Space Version %s\n" KERN_INFO "bproc: (C) 1999-2002 Erik Hendriks <er...@he...>\n" , PACKAGE_VERSION); + bproc_init_request_queue(&bproc_ghost_reqs); bproc_close_request_queue(&bproc_ghost_reqs); /* Until we get a master. */ /* Don't automagically MOD_INC_USE_COUNT for me, please. */ Index: bproc/kernel/msg.c diff -c bproc/kernel/msg.c:1.20 bproc/kernel/msg.c:1.21 *** bproc/kernel/msg.c:1.20 Mon Aug 5 12:37:01 2002 --- bproc/kernel/msg.c Thu Oct 3 11:32:14 2002 *************** *** 17,23 **** * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ! * $Id: msg.c,v 1.20 2002/08/05 16:37:01 hendriks Exp $ *-----------------------------------------------------------------------*/ #define __NO_VERSION__ --- 17,23 ---- * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ! * $Id: msg.c,v 1.21 2002/10/03 15:32:14 hendriks Exp $ *-----------------------------------------------------------------------*/ #define __NO_VERSION__ *************** *** 307,312 **** --- 307,325 ---- err = bproc_send_req(reqdest, req); if (err) return err; return bproc_response_wait(req, MAX_SCHEDULE_TIMEOUT, 0); + } + + #define EMPTY_BPROC_REQUEST_QUEUE(foo) \ + ((struct bproc_request_queue_t) {SPIN_LOCK_UNLOCKED,0, \ + LIST_HEAD_INIT((foo).list),__WAIT_QUEUE_HEAD_INITIALIZER((foo).wait),\ + LIST_HEAD_INIT((foo).pending)}) + + void bproc_init_request_queue(struct bproc_request_queue_t *q) { + spin_lock_init(&q->lock); + q->closing = 0; + INIT_LIST_HEAD(&q->list); + init_waitqueue_head(&q->wait); + INIT_LIST_HEAD(&q->pending); } void bproc_close_request_queue(struct bproc_request_queue_t *q) { Index: vmadump/vmadump.c diff -c vmadump/vmadump.c:1.63 vmadump/vmadump.c:1.64 *** vmadump/vmadump.c:1.63 Thu Sep 26 10:58:28 2002 --- vmadump/vmadump.c Thu Oct 3 11:32:14 2002 *************** *** 17,23 **** * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ! * $Id: vmadump.c,v 1.63 2002/09/26 14:58:28 hendriks Exp $ *-----------------------------------------------------------------------*/ #define EXPORT_SYMTAB --- 17,23 ---- * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ! * $Id: vmadump.c,v 1.64 2002/10/03 15:32:14 hendriks Exp $ *-----------------------------------------------------------------------*/ #define EXPORT_SYMTAB *************** *** 1480,1595 **** #define SWITCH_STACK_SIZE "320" int sys_vmadump(void); /* do_switch_stack/undo_switch_stack stolen from arch/alpha/kernel/entry.S */ ! asm(" ! .align 3 ! .ent save_switch_stack ! save_switch_stack: ! lda $30,-"SWITCH_STACK_SIZE"($30) ! stq $9,0($30) ! stq $10,8($30) ! stq $11,16($30) ! stq $12,24($30) ! stq $13,32($30) ! stq $14,40($30) ! stq $15,48($30) ! stq $26,56($30) ! stt $f0,64($30) ! stt $f1,72($30) ! stt $f2,80($30) ! stt $f3,88($30) ! stt $f4,96($30) ! stt $f5,104($30) ! stt $f6,112($30) ! stt $f7,120($30) ! stt $f8,128($30) ! stt $f9,136($30) ! stt $f10,144($30) ! stt $f11,152($30) ! stt $f12,160($30) ! stt $f13,168($30) ! stt $f14,176($30) ! stt $f15,184($30) ! stt $f16,192($30) ! stt $f17,200($30) ! stt $f18,208($30) ! stt $f19,216($30) ! stt $f20,224($30) ! stt $f21,232($30) ! stt $f22,240($30) ! stt $f23,248($30) ! stt $f24,256($30) ! stt $f25,264($30) ! stt $f26,272($30) ! stt $f27,280($30) ! mf_fpcr $f0 ! stt $f28,288($30) ! stt $f29,296($30) ! stt $f30,304($30) ! stt $f0,312($30) ! ldt $f0,64($30) ! ret $31,($1),1 ! .end save_switch_stack ! ! .align 3 ! .ent restore_switch_stack ! restore_switch_stack: ! ldq $9,0($30) ! ldq $10,8($30) ! ldq $11,16($30) ! ldq $12,24($30) ! ldq $13,32($30) ! ldq $14,40($30) ! ldq $15,48($30) ! ldq $26,56($30) ! ldt $f30,312($30) # get saved fpcr ! ldt $f0,64($30) ! ldt $f1,72($30) ! ldt $f2,80($30) ! ldt $f3,88($30) ! mt_fpcr $f30 # install saved fpcr ! ldt $f4,96($30) ! ldt $f5,104($30) ! ldt $f6,112($30) ! ldt $f7,120($30) ! ldt $f8,128($30) ! ldt $f9,136($30) ! ldt $f10,144($30) ! ldt $f11,152($30) ! ldt $f12,160($30) ! ldt $f13,168($30) ! ldt $f14,176($30) ! ldt $f15,184($30) ! ldt $f16,192($30) ! ldt $f17,200($30) ! ldt $f18,208($30) ! ldt $f19,216($30) ! ldt $f20,224($30) ! ldt $f21,232($30) ! ldt $f22,240($30) ! ldt $f23,248($30) ! ldt $f24,256($30) ! ldt $f25,264($30) ! ldt $f26,272($30) ! ldt $f27,280($30) ! ldt $f28,288($30) ! ldt $f29,296($30) ! ldt $f30,304($30) ! lda $30,"SWITCH_STACK_SIZE"($30) ! ret $31,($1),1 ! .end restore_switch_stack ! ! .align 3 ! .globl sys_vmadump ! .ent sys_vmadump ! sys_vmadump: ! ldgp $29,0($27) ! bsr $1,save_switch_stack ! lda $16,"SWITCH_STACK_SIZE"($30) ! jsr $26,do_vmadump ! bsr $1,restore_switch_stack ! ret $31,($26),1 ! .end sys_vmadump ! "); #endif #ifdef __sparc__ --- 1480,1595 ---- #define SWITCH_STACK_SIZE "320" int sys_vmadump(void); /* do_switch_stack/undo_switch_stack stolen from arch/alpha/kernel/entry.S */ ! asm( ! ".align 3 \n" ! ".ent save_switch_stack \n" ! "save_switch_stack: \n" ! " lda $30,-"SWITCH_STACK_SIZE"($30) \n" ! " stq $9,0($30) \n" ! " stq $10,8($30) \n" ! " stq $11,16($30) \n" ! " stq $12,24($30) \n" ! " stq $13,32($30) \n" ! " stq $14,40($30) \n" ! " stq $15,48($30) \n" ! " stq $26,56($30) \n" ! " stt $f0,64($30) \n" ! " stt $f1,72($30) \n" ! " stt $f2,80($30) \n" ! " stt $f3,88($30) \n" ! " stt $f4,96($30) \n" ! " stt $f5,104($30) \n" ! " stt $f6,112($30) \n" ! " stt $f7,120($30) \n" ! " stt $f8,128($30) \n" ! " stt $f9,136($30) \n" ! " stt $f10,144($30) \n" ! " stt $f11,152($30) \n" ! " stt $f12,160($30) \n" ! " stt $f13,168($30) \n" ! " stt $f14,176($30) \n" ! " stt $f15,184($30) \n" ! " stt $f16,192($30) \n" ! " stt $f17,200($30) \n" ! " stt $f18,208($30) \n" ! " stt $f19,216($30) \n" ! " stt $f20,224($30) \n" ! " stt $f21,232($30) \n" ! " stt $f22,240($30) \n" ! " stt $f23,248($30) \n" ! " stt $f24,256($30) \n" ! " stt $f25,264($30) \n" ! " stt $f26,272($30) \n" ! " stt $f27,280($30) \n" ! " mf_fpcr $f0 \n" ! " stt $f28,288($30) \n" ! " stt $f29,296($30) \n" ! " stt $f30,304($30) \n" ! " stt $f0,312($30) \n" ! " ldt $f0,64($30) \n" ! " ret $31,($1),1 \n" ! ".end save_switch_stack \n" ! "\n" ! ".align 3 \n" ! ".ent restore_switch_stack \n" ! "restore_switch_stack: \n" ! " ldq $9,0($30) \n" ! " ldq $10,8($30) \n" ! " ldq $11,16($30) \n" ! " ldq $12,24($30) \n" ! " ldq $13,32($30) \n" ! " ldq $14,40($30) \n" ! " ldq $15,48($30) \n" ! " ldq $26,56($30) \n" ! " ldt $f30,312($30) # get saved fpcr \n" ! " ldt $f0,64($30) \n" ! " ldt $f1,72($30) \n" ! " ldt $f2,80($30) \n" ! " ldt $f3,88($30) \n" ! " mt_fpcr $f30 # install saved fpcr \n" ! " ldt $f4,96($30) \n" ! " ldt $f5,104($30) \n" ! " ldt $f6,112($30) \n" ! " ldt $f7,120($30) \n" ! " ldt $f8,128($30) \n" ! " ldt $f9,136($30) \n" ! " ldt $f10,144($30) \n" ! " ldt $f11,152($30) \n" ! " ldt $f12,160($30) \n" ! " ldt $f13,168($30) \n" ! " ldt $f14,176($30) \n" ! " ldt $f15,184($30) \n" ! " ldt $f16,192($30) \n" ! " ldt $f17,200($30) \n" ! " ldt $f18,208($30) \n" ! " ldt $f19,216($30) \n" ! " ldt $f20,224($30) \n" ! " ldt $f21,232($30) \n" ! " ldt $f22,240($30) \n" ! " ldt $f23,248($30) \n" ! " ldt $f24,256($30) \n" ! " ldt $f25,264($30) \n" ! " ldt $f26,272($30) \n" ! " ldt $f27,280($30) \n" ! " ldt $f28,288($30) \n" ! " ldt $f29,296($30) \n" ! " ldt $f30,304($30) \n" ! " lda $30,"SWITCH_STACK_SIZE"($30) \n" ! " ret $31,($1),1 \n" ! ".end restore_switch_stack \n" ! " \n" ! ".align 3 \n" ! ".globl sys_vmadump \n" ! ".ent sys_vmadump \n" ! "sys_vmadump: \n" ! " ldgp $29,0($27) \n" ! " bsr $1,save_switch_stack \n" ! " lda $16,"SWITCH_STACK_SIZE"($30) \n" ! " jsr $26,do_vmadump \n" ! " bsr $1,restore_switch_stack \n" ! " ret $31,($26),1 \n" ! ".end sys_vmadump \n" ! ); #endif #ifdef __sparc__ *************** *** 1597,1609 **** #define STRING_1(x) #x #define STRING(x) STRING_1(x) #define LABEL(x) STRING(C_LABEL(x)) ! asm(" .align 4 ! .globl "LABEL(sys_vmadump)" ! "LABEL(sys_vmadump)": ! mov %o7, %l5 ! add %sp, 0x40, %o0 ! call "LABEL(do_vmadump)" ! mov %l5, %o7"); #endif #ifdef powerpc --- 1597,1610 ---- #define STRING_1(x) #x #define STRING(x) STRING_1(x) #define LABEL(x) STRING(C_LABEL(x)) ! asm( ! " .align 4 \n" ! " .globl "LABEL(sys_vmadump)" \n" ! LABEL(sys_vmadump)": \n" ! " mov %o7, %l5 \n" ! " add %sp, 0x40, %o0 \n" ! " call "LABEL(do_vmadump)" \n" ! " mov %l5, %o7"); #endif #ifdef powerpc *************** *** 1667,1673 **** static void * old_sys_call; int init_module(void) { printk(KERN_INFO "vmadump: %s Erik Hendriks " ! "<er...@he...>\n", get_rev("$Revision: 1.63 $")); init_rwsem(&hook_lock); --- 1668,1674 ---- static void * old_sys_call; int init_module(void) { printk(KERN_INFO "vmadump: %s Erik Hendriks " ! "<er...@he...>\n", get_rev("$Revision: 1.64 $")); init_rwsem(&hook_lock); |