Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Jan 2008 22:21:13 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 132433 for review
Message-ID:  <200801032221.m03MLDCC057683@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=132433

Change 132433 by imp@imp_paco-paco on 2008/01/03 22:20:23

	Make pm_machdep.c compile.

Affected files ...

.. //depot/projects/mips2-jnpr/src/sys/mips/include/cpu.h#5 edit
.. //depot/projects/mips2-jnpr/src/sys/mips/include/pcb.h#4 edit
.. //depot/projects/mips2-jnpr/src/sys/mips/include/pmap.h#6 edit
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/pm_machdep.c#3 edit
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#12 edit
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/swtch.S#5 edit

Differences ...

==== //depot/projects/mips2-jnpr/src/sys/mips/include/cpu.h#5 (text+ko) ====

@@ -496,20 +496,20 @@
 extern int intr_nesting_level;
 
 #define	func_0args_asmmacro(func, in)					\
-	asm volatile ( "jalr %0"					\
+	__asm __volatile ( "jalr %0"					\
 			: "=r" (in)	/* outputs */			\
 			: "r" (func)	/* inputs */			\
 			: "$31", "$4");
 
 #define	func_1args_asmmacro(func, arg0)					\
-	asm volatile ("move $4, %1;"					\
+	__asm __volatile ("move $4, %1;"				\
 			"jalr %0"					\
 			:				/* outputs */	\
 			: "r" (func), "r" (arg0)	/* inputs */	\
 			: "$31", "$4");
 
 #define	func_2args_asmmacro(func, arg0, arg1)				\
-	asm volatile ("move $4, %1;"					\
+	__asm __volatile ("move $4, %1;"				\
 			"move $5, %2;"					\
 			"jalr %0"					\
 			:				/* outputs */   \
@@ -517,7 +517,7 @@
 			: "$31", "$4", "$5");
 
 #define	func_3args_asmmacro(func, arg0, arg1, arg2)			\
-	asm volatile ( "move $4, %1;"					\
+	__asm __volatile ( "move $4, %1;"				\
 			"move $5, %2;"					\
 			"move $6, %3;"					\
 			"jalr %0"					\

==== //depot/projects/mips2-jnpr/src/sys/mips/include/pcb.h#4 (text+ko) ====

@@ -58,7 +58,7 @@
 extern struct pcb *curpcb;		/* the current running pcb */
 
 void makectx(struct trapframe *, struct pcb *);
-void savectx(struct pcb *);
+int savectx(struct pcb *);
 #endif
 
 #endif	/* !_MACHINE_PCB_H_ */

==== //depot/projects/mips2-jnpr/src/sys/mips/include/pmap.h#6 (text+ko) ====


==== //depot/projects/mips2-jnpr/src/sys/mips/mips/pm_machdep.c#3 (text+ko) ====

@@ -46,6 +46,7 @@
 #include <sys/proc.h>
 #include <sys/signalvar.h>
 #include <sys/exec.h>
+#include <sys/imgact.h>
 #include <sys/ucontext.h>
 #include <sys/lock.h>
 #include <sys/sysproto.h>
@@ -78,18 +79,20 @@
  * specified pc, psl.
  */
 void
-sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
+sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
 {
 	struct proc *p;
 	struct thread *td;
 	struct trapframe *regs;
 	struct sigacts *psp;
 	struct sigframe sf, *sfp;
+	int sig;
 	int oonstack;
 
 	td = curthread;
 	p = td->td_proc;
 	PROC_LOCK_ASSERT(p, MA_OWNED);
+	sig = ksi->ksi_signo;
 	psp = p->p_sigacts;
 	mtx_assert(&psp->ps_mtx, MA_OWNED);
 
@@ -143,11 +146,11 @@
 
 		/* fill siginfo structure */
 		sf.sf_si.si_signo = sig;
-		sf.sf_si.si_code = code;
+		sf.sf_si.si_code = ksi->ksi_code;
 		sf.sf_si.si_addr = (void*)regs->badvaddr;
 	} else {
 		/* Old FreeBSD-style arguments. */
-		regs->a1 = code;
+		regs->a1 = ksi->ksi_code;
 		regs->a3 = regs->badvaddr;
 		/* sf.sf_ahu.sf_handler = catcher; */
 	}
@@ -178,6 +181,7 @@
 	mtx_lock(&psp->ps_mtx);
 }
 
+#ifdef GONE_IN_7
 /*
  * Build siginfo_t for SA thread
  */
@@ -196,6 +200,7 @@
 	si->si_code = code;
 	/* XXXKSE fill other fields */
 }
+#endif
 
 /*
  * System call to cleanup state after a signal
@@ -224,7 +229,7 @@
 
 /* #ifdef DEBUG */
 	if (ucp->uc_mcontext.mc_regs[ZERO] != UCONTEXT_MAGIC) {
-		printf("sigreturn: pid %d, ucp %x\n", p->p_pid, ucp);
+		printf("sigreturn: pid %d, ucp %p\n", p->p_pid, ucp);
 		printf("  old sp %x ra %x pc %x\n",
 		    regs->sp, regs->ra, regs->pc);
 		printf("  new sp %x ra %x pc %x z %x\n",
@@ -310,8 +315,6 @@
 	int i;
 	int bpinstr = BREAK_SSTEP;
 	int curinstr;
-	struct uio uio;
-	struct iovec iov;
 	struct proc *p;
 
 	p = td->td_proc;
@@ -506,8 +509,6 @@
 ptrace_clear_single_step(struct thread *td)
 {
 	int i;
-	struct uio uio;
-	struct iovec iov;
 	struct proc *p;
 
 	p = td->td_proc;
@@ -532,8 +533,8 @@
 }
 
 void
-cpu_switch(struct thread *old, struct thread *new)
+cpu_switch(struct thread *old, struct thread *new, struct mtx * new_lock)
 {
-
+	/* XXX this is lame, maybe, but we ignore new_lock */
 	func_2args_asmmacro(&mips_cpu_switch, old, new);
 }

==== //depot/projects/mips2-jnpr/src/sys/mips/mips/pmap.c#12 (text+ko) ====


==== //depot/projects/mips2-jnpr/src/sys/mips/mips/swtch.S#5 (text+ko) ====

@@ -230,6 +230,8 @@
 
 
 /*
+ *XXX Fixme:	should be written to new interface that requires lock
+ *		storage.  We fake it for now.
  * mips_cpu_switch(struct thread *old, struct thread *new);
  * Find the highest priority process and resume it.
  */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801032221.m03MLDCC057683>