PERFORCE change 41850 for review
John Baldwin
jhb at FreeBSD.org
Sun Nov 9 17:07:49 PST 2003
http://perforce.freebsd.org/chv.cgi?CH=41850
Change 41850 by jhb at jhb_laptop on 2003/11/09 17:06:45
IFC @41847.
Affected files ...
.. //depot/projects/smpng/sys/alpha/alpha/machdep.c#63 integrate
.. //depot/projects/smpng/sys/amd64/amd64/machdep.c#15 integrate
.. //depot/projects/smpng/sys/amd64/ia32/ia32_signal.c#6 integrate
.. //depot/projects/smpng/sys/boot/ia64/libski/pal_stub.S#2 integrate
.. //depot/projects/smpng/sys/boot/ia64/skiload/Makefile#9 integrate
.. //depot/projects/smpng/sys/cam/cam_periph.c#15 integrate
.. //depot/projects/smpng/sys/cam/cam_xpt.c#17 integrate
.. //depot/projects/smpng/sys/cam/scsi/scsi_target.c#12 integrate
.. //depot/projects/smpng/sys/coda/coda_psdev.c#12 integrate
.. //depot/projects/smpng/sys/compat/freebsd32/freebsd32_proto.h#3 integrate
.. //depot/projects/smpng/sys/compat/freebsd32/freebsd32_syscall.h#3 integrate
.. //depot/projects/smpng/sys/compat/freebsd32/freebsd32_syscalls.c#3 integrate
.. //depot/projects/smpng/sys/compat/freebsd32/freebsd32_sysent.c#3 integrate
.. //depot/projects/smpng/sys/compat/freebsd32/syscalls.master#3 integrate
.. //depot/projects/smpng/sys/compat/ia32/ia32_signal.h#4 integrate
.. //depot/projects/smpng/sys/compat/ia32/ia32_sysvec.c#5 integrate
.. //depot/projects/smpng/sys/compat/linux/linux_socket.c#13 integrate
.. //depot/projects/smpng/sys/dev/aac/aac.c#32 integrate
.. //depot/projects/smpng/sys/dev/aha/aha.c#11 integrate
.. //depot/projects/smpng/sys/dev/aha/aha_isa.c#6 integrate
.. //depot/projects/smpng/sys/dev/aha/aha_mca.c#6 integrate
.. //depot/projects/smpng/sys/dev/aha/ahareg.h#2 integrate
.. //depot/projects/smpng/sys/dev/ata/ata-raid.c#24 integrate
.. //depot/projects/smpng/sys/dev/ata/atapi-cam.c#14 integrate
.. //depot/projects/smpng/sys/dev/ata/atapi-cd.c#40 integrate
.. //depot/projects/smpng/sys/dev/bktr/bktr_core.c#12 integrate
.. //depot/projects/smpng/sys/dev/dcons/dcons_crom.c#2 integrate
.. //depot/projects/smpng/sys/dev/firewire/firewire.c#27 integrate
.. //depot/projects/smpng/sys/dev/kbd/kbd.c#10 integrate
.. //depot/projects/smpng/sys/dev/nmdm/nmdm.c#16 integrate
.. //depot/projects/smpng/sys/dev/random/randomdev.c#16 integrate
.. //depot/projects/smpng/sys/dev/sab/sab.c#13 integrate
.. //depot/projects/smpng/sys/dev/snp/snp.c#13 integrate
.. //depot/projects/smpng/sys/dev/sound/midi/midibuf.c#5 integrate
.. //depot/projects/smpng/sys/dev/sound/pcm/channel.c#22 integrate
.. //depot/projects/smpng/sys/dev/usb/ehci.c#4 integrate
.. //depot/projects/smpng/sys/dev/usb/ohci.c#25 integrate
.. //depot/projects/smpng/sys/dev/usb/ucom.c#13 integrate
.. //depot/projects/smpng/sys/dev/usb/ugen.c#20 integrate
.. //depot/projects/smpng/sys/dev/usb/uhci.c#28 integrate
.. //depot/projects/smpng/sys/dev/usb/uhid.c#18 integrate
.. //depot/projects/smpng/sys/dev/usb/ums.c#14 integrate
.. //depot/projects/smpng/sys/dev/usb/usb.c#23 integrate
.. //depot/projects/smpng/sys/dev/usb/usb_ethersubr.c#9 integrate
.. //depot/projects/smpng/sys/dev/usb/usb_port.h#18 integrate
.. //depot/projects/smpng/sys/dev/usb/usbdi.c#15 integrate
.. //depot/projects/smpng/sys/dev/usb/uvisor.c#8 integrate
.. //depot/projects/smpng/sys/dev/zs/zs.c#10 integrate
.. //depot/projects/smpng/sys/i386/bios/apm.c#6 integrate
.. //depot/projects/smpng/sys/i386/i386/machdep.c#67 integrate
.. //depot/projects/smpng/sys/i386/isa/asc.c#7 integrate
.. //depot/projects/smpng/sys/i386/isa/cx.c#11 integrate
.. //depot/projects/smpng/sys/i386/isa/istallion.c#10 integrate
.. //depot/projects/smpng/sys/i386/isa/mse.c#9 integrate
.. //depot/projects/smpng/sys/i386/isa/spic.c#8 integrate
.. //depot/projects/smpng/sys/i386/isa/stallion.c#12 integrate
.. //depot/projects/smpng/sys/i4b/driver/i4b_rbch.c#11 integrate
.. //depot/projects/smpng/sys/i4b/driver/i4b_tel.c#9 integrate
.. //depot/projects/smpng/sys/i4b/layer4/i4b_i4bdrv.c#15 integrate
.. //depot/projects/smpng/sys/ia64/conf/GENERIC#35 integrate
.. //depot/projects/smpng/sys/ia64/conf/GENERIC.hints#5 integrate
.. //depot/projects/smpng/sys/ia64/ia64/machdep.c#69 integrate
.. //depot/projects/smpng/sys/ia64/ia64/syscall.S#6 integrate
.. //depot/projects/smpng/sys/ia64/ia64/vm_machdep.c#35 integrate
.. //depot/projects/smpng/sys/ia64/include/ucontext.h#5 integrate
.. //depot/projects/smpng/sys/isa/psm.c#19 integrate
.. //depot/projects/smpng/sys/kern/kern_condvar.c#31 integrate
.. //depot/projects/smpng/sys/kern/kern_context.c#6 integrate
.. //depot/projects/smpng/sys/kern/kern_event.c#22 integrate
.. //depot/projects/smpng/sys/kern/kern_poll.c#11 integrate
.. //depot/projects/smpng/sys/kern/sched_4bsd.c#17 integrate
.. //depot/projects/smpng/sys/kern/subr_log.c#12 integrate
.. //depot/projects/smpng/sys/kern/sys_generic.c#28 integrate
.. //depot/projects/smpng/sys/kern/sys_pipe.c#37 integrate
.. //depot/projects/smpng/sys/kern/tty.c#37 integrate
.. //depot/projects/smpng/sys/kern/tty_pty.c#26 integrate
.. //depot/projects/smpng/sys/kern/uipc_socket.c#43 integrate
.. //depot/projects/smpng/sys/kern/uipc_socket2.c#28 integrate
.. //depot/projects/smpng/sys/kern/vfs_subr.c#62 integrate
.. //depot/projects/smpng/sys/net/bpf.c#29 integrate
.. //depot/projects/smpng/sys/net/if_ppp.c#22 integrate
.. //depot/projects/smpng/sys/net/if_tap.c#22 integrate
.. //depot/projects/smpng/sys/net/if_tun.c#27 integrate
.. //depot/projects/smpng/sys/net/netisr.c#6 integrate
.. //depot/projects/smpng/sys/net/netisr.h#6 integrate
.. //depot/projects/smpng/sys/net/route.c#14 integrate
.. //depot/projects/smpng/sys/net/route.h#14 integrate
.. //depot/projects/smpng/sys/net/rtsock.c#28 integrate
.. //depot/projects/smpng/sys/net80211/ieee80211_node.c#9 integrate
.. //depot/projects/smpng/sys/netatalk/aarp.c#9 integrate
.. //depot/projects/smpng/sys/netatalk/ddp_input.c#8 integrate
.. //depot/projects/smpng/sys/netatalk/ddp_usrreq.c#15 integrate
.. //depot/projects/smpng/sys/netatm/atm_subr.c#15 integrate
.. //depot/projects/smpng/sys/netgraph/ng_base.c#18 integrate
.. //depot/projects/smpng/sys/netinet/if_atm.c#6 integrate
.. //depot/projects/smpng/sys/netinet/if_ether.c#20 integrate
.. //depot/projects/smpng/sys/netinet/in_pcb.c#36 integrate
.. //depot/projects/smpng/sys/netinet/in_pcb.h#23 integrate
.. //depot/projects/smpng/sys/netinet/in_proto.c#11 integrate
.. //depot/projects/smpng/sys/netinet/ip_divert.c#26 integrate
.. //depot/projects/smpng/sys/netinet/ip_dummynet.c#23 integrate
.. //depot/projects/smpng/sys/netinet/ip_flow.c#5 integrate
.. //depot/projects/smpng/sys/netinet/ip_input.c#43 integrate
.. //depot/projects/smpng/sys/netinet/ip_mroute.c#28 integrate
.. //depot/projects/smpng/sys/netinet/ip_output.c#45 integrate
.. //depot/projects/smpng/sys/netinet/ip_var.h#16 integrate
.. //depot/projects/smpng/sys/netinet/raw_ip.c#30 integrate
.. //depot/projects/smpng/sys/netinet/tcp_input.c#39 integrate
.. //depot/projects/smpng/sys/netinet/tcp_output.c#17 integrate
.. //depot/projects/smpng/sys/netinet/tcp_subr.c#37 integrate
.. //depot/projects/smpng/sys/netinet/tcp_timer.c#14 integrate
.. //depot/projects/smpng/sys/netinet/udp_usrreq.c#31 integrate
.. //depot/projects/smpng/sys/netinet6/in6.c#16 integrate
.. //depot/projects/smpng/sys/netinet6/ip6_input.c#27 integrate
.. //depot/projects/smpng/sys/netinet6/ip6_output.c#22 integrate
.. //depot/projects/smpng/sys/netinet6/nd6.c#16 integrate
.. //depot/projects/smpng/sys/netinet6/nd6_rtr.c#10 integrate
.. //depot/projects/smpng/sys/netipx/ipx_input.c#9 integrate
.. //depot/projects/smpng/sys/netnatm/natm.c#15 integrate
.. //depot/projects/smpng/sys/netnatm/natm_proto.c#10 integrate
.. //depot/projects/smpng/sys/pc98/i386/machdep.c#61 integrate
.. //depot/projects/smpng/sys/pc98/pc98/mse.c#7 integrate
.. //depot/projects/smpng/sys/pccard/mecia.c#3 integrate
.. //depot/projects/smpng/sys/pccard/pccard.c#21 integrate
.. //depot/projects/smpng/sys/pccard/pcic.c#24 integrate
.. //depot/projects/smpng/sys/powerpc/powerpc/machdep.c#44 integrate
.. //depot/projects/smpng/sys/sparc64/sparc64/machdep.c#58 integrate
.. //depot/projects/smpng/sys/sys/condvar.h#5 integrate
.. //depot/projects/smpng/sys/sys/selinfo.h#6 integrate
.. //depot/projects/smpng/sys/sys/ucontext.h#8 integrate
.. //depot/projects/smpng/sys/vm/vm_fault.c#30 integrate
.. //depot/projects/smpng/sys/vm/vm_kern.c#21 integrate
.. //depot/projects/smpng/sys/vm/vm_map.c#47 integrate
.. //depot/projects/smpng/sys/vm/vm_map.h#24 integrate
.. //depot/projects/smpng/sys/vm/vm_mmap.c#34 integrate
.. //depot/projects/smpng/sys/vm/vm_object.c#47 integrate
.. //depot/projects/smpng/sys/vm/vm_object.h#23 integrate
Differences ...
==== //depot/projects/smpng/sys/alpha/alpha/machdep.c#63 (text+ko) ====
@@ -88,7 +88,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.213 2003/10/19 02:36:06 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.214 2003/11/09 20:31:02 marcel Exp $");
#include "opt_compat.h"
#include "opt_ddb.h"
@@ -2027,14 +2027,14 @@
}
int
-get_mcontext(struct thread *td, mcontext_t *mcp, int clear_ret)
+get_mcontext(struct thread *td, mcontext_t *mcp, int flags)
{
/*
* Use a trapframe for getsetcontext, so just copy the
* threads trapframe.
*/
bcopy(td->td_frame, &mcp->mc_regs, sizeof(struct trapframe));
- if (clear_ret != 0) {
+ if (flags & GET_MC_CLEAR_RET) {
mcp->mc_regs[FRAME_V0] = 0;
mcp->mc_regs[FRAME_A4] = 0;
mcp->mc_regs[FRAME_A3] = 0;
==== //depot/projects/smpng/sys/amd64/amd64/machdep.c#15 (text+ko) ====
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.596 2003/11/08 04:37:54 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.597 2003/11/09 20:31:02 marcel Exp $");
#include "opt_atalk.h"
#include "opt_compat.h"
@@ -1441,7 +1441,7 @@
* Get machine context.
*/
int
-get_mcontext(struct thread *td, mcontext_t *mcp, int clear_ret)
+get_mcontext(struct thread *td, mcontext_t *mcp, int flags)
{
struct trapframe *tp;
@@ -1462,7 +1462,7 @@
mcp->mc_rbp = tp->tf_rbp;
mcp->mc_rbx = tp->tf_rbx;
mcp->mc_rcx = tp->tf_rcx;
- if (clear_ret != 0) {
+ if (flags & GET_MC_CLEAR_RET) {
mcp->mc_rax = 0;
mcp->mc_rdx = 0;
} else {
==== //depot/projects/smpng/sys/amd64/ia32/ia32_signal.c#6 (text+ko) ====
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/ia32/ia32_signal.c,v 1.5 2003/11/08 03:33:38 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/ia32/ia32_signal.c,v 1.6 2003/11/08 07:43:44 peter Exp $");
#include "opt_compat.h"
@@ -558,3 +558,44 @@
PROC_UNLOCK(p);
return (EJUSTRETURN);
}
+
+/*
+ * Clear registers on exec
+ */
+void
+ia32_setregs(td, entry, stack, ps_strings)
+ struct thread *td;
+ u_long entry;
+ u_long stack;
+ u_long ps_strings;
+{
+ struct trapframe *regs = td->td_frame;
+ struct pcb *pcb = td->td_pcb;
+
+ wrmsr(MSR_FSBASE, 0);
+ wrmsr(MSR_KGSBASE, 0); /* User value while we're in the kernel */
+ pcb->pcb_fsbase = 0;
+ pcb->pcb_gsbase = 0;
+ load_ds(_udatasel);
+ load_es(_udatasel);
+ load_fs(_udatasel);
+ load_gs(_udatasel);
+ pcb->pcb_ds = _udatasel;
+ pcb->pcb_es = _udatasel;
+ pcb->pcb_fs = _udatasel;
+ pcb->pcb_gs = _udatasel;
+
+ bzero((char *)regs, sizeof(struct trapframe));
+ regs->tf_rip = entry;
+ regs->tf_rsp = stack;
+ regs->tf_rflags = PSL_USER | (regs->tf_rflags & PSL_T);
+ regs->tf_ss = _udatasel;
+ regs->tf_cs = _ucode32sel;
+ regs->tf_rbx = ps_strings;
+ load_cr0(rcr0() | CR0_MP | CR0_TS);
+ fpstate_drop(td);
+
+ /* Return via doreti so that we can change to a different %cs */
+ pcb->pcb_flags |= PCB_FULLCTX;
+ td->td_retval[1] = 0;
+}
==== //depot/projects/smpng/sys/boot/ia64/libski/pal_stub.S#2 (text+ko) ====
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/boot/ia64/libski/pal_stub.S,v 1.2 2003/07/02 11:47:33 ru Exp $
+ * $FreeBSD: src/sys/boot/ia64/libski/pal_stub.S,v 1.3 2003/11/09 07:42:16 marcel Exp $
*/
#include <machine/asm.h>
@@ -41,6 +41,9 @@
cmp.eq p6,p0=14,r28 // PAL_FREQ_RATIOS
(p6) br.cond.dptk pal_freq_ratios
;;
+ cmp.eq p6,p0=29,r28 // PAL_HALT_LIGHT
+(p6) br.cond.dptk pal_halt_light
+ ;;
mov r15=66 // EXIT
break.i 0x80000 // SSC
;;
@@ -62,4 +65,10 @@
movl r10=0x0000000100000001 // bus ratio 1/1
movl r11=0x0000000B00000002 // ITC ratio 11/2
br.sptk b0
+pal_halt_light:
+ mov r8=0
+ mov r9=0
+ mov r10=0
+ mov r11=0
+ br.sptk b0
END(PalProc)
==== //depot/projects/smpng/sys/boot/ia64/skiload/Makefile#9 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/boot/ia64/skiload/Makefile,v 1.11 2003/07/17 01:49:59 marcel Exp $
+# $FreeBSD: src/sys/boot/ia64/skiload/Makefile,v 1.12 2003/11/09 06:53:37 marcel Exp $
.PATH: ${.CURDIR}/../common
@@ -6,6 +6,7 @@
NOMAN=
NEWVERSWHAT= "ia64 SKI boot" ${MACHINE_ARCH}
BINDIR?= /boot
+STRIP= # We must not strip skiload at install time.
SRCS+= conf.c main.c start.S
==== //depot/projects/smpng/sys/cam/cam_periph.c#15 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/cam_periph.c,v 1.55 2003/10/27 06:15:54 ken Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/cam_periph.c,v 1.56 2003/11/08 10:56:57 scottl Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -969,13 +969,13 @@
if (sense_key != SSD_KEY_NO_SENSE) {
saved_ccb->ccb_h.status |=
CAM_AUTOSNS_VALID;
+#if 0
xpt_print_path(saved_ccb->ccb_h.path);
printf("Recovered Sense\n");
-#if 0
scsi_sense_print(&saved_ccb->csio);
-#endif
cam_error_print(saved_ccb, CAM_ESF_ALL,
CAM_EPF_ALL);
+#endif
xpt_done_ccb = TRUE;
}
}
==== //depot/projects/smpng/sys/cam/cam_xpt.c#17 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.134 2003/06/10 17:50:20 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.135 2003/11/09 02:22:33 scottl Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -1453,6 +1453,8 @@
int32_t status;
struct periph_list *periph_head;
+ GIANT_REQUIRED;
+
device = periph->path->device;
periph_head = &device->periphs;
@@ -1488,6 +1490,8 @@
{
struct cam_ed *device;
+ GIANT_REQUIRED;
+
device = periph->path->device;
if (device != NULL) {
@@ -1524,6 +1528,8 @@
u_int mb;
int s;
+ GIANT_REQUIRED;
+
path = periph->path;
/*
* To ensure that this is printed in one piece,
@@ -1646,6 +1652,8 @@
struct cam_path *path;
struct ccb_trans_settings cts;
+ GIANT_REQUIRED;
+
path = periph->path;
/*
* To ensure that this is printed in one piece,
@@ -2945,6 +2953,8 @@
{
int iopl;
+ GIANT_REQUIRED;
+
CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("xpt_action\n"));
start_ccb->ccb_h.status = CAM_REQ_INPROG;
@@ -3578,6 +3588,8 @@
struct cam_devq *devq;
struct cam_ed *dev;
+ GIANT_REQUIRED;
+
timeout = start_ccb->ccb_h.timeout;
sim = start_ccb->ccb_h.path->bus->sim;
devq = sim->devq;
@@ -3640,6 +3652,8 @@
int s;
int runq;
+ GIANT_REQUIRED;
+
CAM_DEBUG(perph->path, CAM_DEBUG_TRACE, ("xpt_schedule\n"));
device = perph->path->device;
s = splsoftcam();
@@ -3936,6 +3950,8 @@
void
xpt_merge_ccb(union ccb *master_ccb, union ccb *slave_ccb)
{
+ GIANT_REQUIRED;
+
/*
* Pull fields that are valid for peripheral drivers to set
* into the master CCB along with the CCB "payload".
@@ -3951,6 +3967,8 @@
void
xpt_setup_ccb(struct ccb_hdr *ccb_h, struct cam_path *path, u_int32_t priority)
{
+ GIANT_REQUIRED;
+
CAM_DEBUG(path, CAM_DEBUG_TRACE, ("xpt_setup_ccb\n"));
ccb_h->pinfo.priority = priority;
ccb_h->path = path;
@@ -3977,6 +3995,8 @@
struct cam_path *path;
cam_status status;
+ GIANT_REQUIRED;
+
path = (struct cam_path *)malloc(sizeof(*path), M_DEVBUF, M_NOWAIT);
if (path == NULL) {
@@ -4087,6 +4107,8 @@
void
xpt_free_path(struct cam_path *path)
{
+ GIANT_REQUIRED;
+
CAM_DEBUG(path, CAM_DEBUG_TRACE, ("xpt_free_path\n"));
xpt_release_path(path);
free(path, M_DEVBUF);
@@ -4100,6 +4122,8 @@
int
xpt_path_comp(struct cam_path *path1, struct cam_path *path2)
{
+ GIANT_REQUIRED;
+
int retval = 0;
if (path1->bus != path2->bus) {
@@ -4134,6 +4158,8 @@
void
xpt_print_path(struct cam_path *path)
{
+ GIANT_REQUIRED;
+
if (path == NULL)
printf("(nopath): ");
else {
@@ -4167,6 +4193,8 @@
{
struct sbuf sb;
+ GIANT_REQUIRED;
+
sbuf_new(&sb, str, str_len, 0);
if (path == NULL)
@@ -4203,12 +4231,16 @@
path_id_t
xpt_path_path_id(struct cam_path *path)
{
+ GIANT_REQUIRED;
+
return(path->bus->path_id);
}
target_id_t
xpt_path_target_id(struct cam_path *path)
{
+ GIANT_REQUIRED;
+
if (path->target != NULL)
return (path->target->target_id);
else
@@ -4218,6 +4250,8 @@
lun_id_t
xpt_path_lun_id(struct cam_path *path)
{
+ GIANT_REQUIRED;
+
if (path->device != NULL)
return (path->device->lun_id);
else
@@ -4227,12 +4261,16 @@
struct cam_sim *
xpt_path_sim(struct cam_path *path)
{
+ GIANT_REQUIRED;
+
return (path->bus->sim);
}
struct cam_periph*
xpt_path_periph(struct cam_path *path)
{
+ GIANT_REQUIRED;
+
return (path->periph);
}
@@ -4250,6 +4288,8 @@
struct cam_ed *device;
struct cam_eb *bus;
+ GIANT_REQUIRED;
+
CAM_DEBUG_PRINT(CAM_DEBUG_XPT, ("xpt_release_ccb\n"));
path = free_ccb->ccb_h.path;
device = path->device;
@@ -4293,6 +4333,8 @@
struct ccb_pathinq cpi;
int s;
+ GIANT_REQUIRED;
+
sim->bus_id = bus;
new_bus = (struct cam_eb *)malloc(sizeof(*new_bus),
M_DEVBUF, M_NOWAIT);
@@ -4347,6 +4389,8 @@
struct cam_path bus_path;
cam_status status;
+ GIANT_REQUIRED;
+
status = xpt_compile_path(&bus_path, NULL, pathid,
CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD);
if (status != CAM_REQ_CMP)
@@ -4443,6 +4487,8 @@
struct cam_ed *device, *next_device;
int s;
+ GIANT_REQUIRED;
+
CAM_DEBUG(path, CAM_DEBUG_TRACE, ("xpt_async\n"));
/*
@@ -4608,6 +4654,8 @@
int s;
struct ccb_hdr *ccbh;
+ GIANT_REQUIRED;
+
s = splcam();
path->device->qfrozen_cnt += count;
@@ -4634,6 +4682,8 @@
u_int32_t
xpt_freeze_simq(struct cam_sim *sim, u_int count)
{
+ GIANT_REQUIRED;
+
sim->devq->send_queue.qfrozen_cnt += count;
if (sim->devq->active_dev != NULL) {
struct ccb_hdr *ccbh;
@@ -4659,6 +4709,8 @@
void
xpt_release_devq(struct cam_path *path, u_int count, int run_queue)
{
+ GIANT_REQUIRED;
+
xpt_release_devq_device(path->device, count, run_queue);
}
@@ -4717,6 +4769,8 @@
int s;
struct camq *sendq;
+ GIANT_REQUIRED;
+
sendq = &(sim->devq->send_queue);
s = splcam();
if (sendq->qfrozen_cnt > 0) {
@@ -4765,6 +4819,8 @@
{
int s;
+ GIANT_REQUIRED;
+
s = splcam();
CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("xpt_done\n"));
@@ -4796,6 +4852,8 @@
{
union ccb *new_ccb;
+ GIANT_REQUIRED;
+
new_ccb = malloc(sizeof(*new_ccb), M_DEVBUF, M_WAITOK);
return (new_ccb);
}
==== //depot/projects/smpng/sys/cam/scsi/scsi_target.c#12 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_target.c,v 1.57 2003/10/02 08:56:14 simokawa Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_target.c,v 1.58 2003/11/09 09:17:20 tanimura Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1119,7 +1119,7 @@
* Notify users sleeping via poll(), kqueue(), and
* blocking read().
*/
- selwakeup(&softc->read_select);
+ selwakeuppri(&softc->read_select, PRIBIO);
KNOTE(&softc->read_select.si_note, 0);
wakeup(&softc->user_ccb_queue);
}
==== //depot/projects/smpng/sys/coda/coda_psdev.c#12 (text+ko) ====
@@ -49,7 +49,7 @@
/* These routines are the device entry points for Venus. */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/coda/coda_psdev.c,v 1.28 2003/09/10 01:41:15 tjr Exp $");
+__FBSDID("$FreeBSD: src/sys/coda/coda_psdev.c,v 1.29 2003/11/09 09:17:20 tanimura Exp $");
extern int coda_nc_initialized; /* Set if cache has been initialized */
@@ -526,7 +526,7 @@
/* Append msg to request queue and poke Venus. */
INSQUE(vmp->vm_chain, vcp->vc_requests);
- selwakeup(&(vcp->vc_selproc));
+ selwakeuppri(&(vcp->vc_selproc), coda_call_sleep);
/* We can be interrupted while we wait for Venus to process
* our request. If the interrupt occurs before Venus has read
@@ -664,7 +664,7 @@
/* insert at head of queue! */
INSQUE(svmp->vm_chain, vcp->vc_requests);
- selwakeup(&(vcp->vc_selproc));
+ selwakeuppri(&(vcp->vc_selproc), coda_call_sleep);
}
}
==== //depot/projects/smpng/sys/compat/freebsd32/freebsd32_proto.h#3 (text+ko) ====
@@ -2,8 +2,8 @@
* System call prototypes.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.13 2003/11/07 20:30:30 jhb Exp $
- * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.25 2003/11/07 20:29:53 jhb Exp
+ * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.14 2003/11/08 07:31:49 peter Exp $
+ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.26 2003/11/08 07:31:30 peter Exp
*/
#ifndef _FREEBSD32_SYSPROTO_H_
==== //depot/projects/smpng/sys/compat/freebsd32/freebsd32_syscall.h#3 (text+ko) ====
@@ -2,8 +2,8 @@
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.13 2003/11/07 20:30:30 jhb Exp $
- * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.25 2003/11/07 20:29:53 jhb Exp
+ * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.14 2003/11/08 07:31:49 peter Exp $
+ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.26 2003/11/08 07:31:30 peter Exp
*/
#define FREEBSD32_SYS_syscall 0
@@ -67,7 +67,7 @@
/* 63 is obsolete ogetkerninfo */
/* 64 is obsolete ogetpagesize */
/* 65 is obsolete omsync */
- /* 66 is obsolete ovfork */
+#define FREEBSD32_SYS_vfork 66
/* 67 is obsolete vread */
/* 68 is obsolete vwrite */
#define FREEBSD32_SYS_sbrk 69
==== //depot/projects/smpng/sys/compat/freebsd32/freebsd32_syscalls.c#3 (text+ko) ====
@@ -2,8 +2,8 @@
* System call names.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.4 2003/11/07 20:30:30 jhb Exp $
- * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.25 2003/11/07 20:29:53 jhb Exp
+ * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.5 2003/11/08 07:31:49 peter Exp $
+ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.26 2003/11/08 07:31:30 peter Exp
*/
const char *freebsd32_syscallnames[] = {
@@ -73,7 +73,7 @@
"obs_ogetkerninfo", /* 63 = obsolete ogetkerninfo */
"obs_ogetpagesize", /* 64 = obsolete ogetpagesize */
"obs_omsync", /* 65 = obsolete omsync */
- "obs_ovfork", /* 66 = obsolete ovfork */
+ "vfork", /* 66 = vfork */
"obs_vread", /* 67 = obsolete vread */
"obs_vwrite", /* 68 = obsolete vwrite */
"sbrk", /* 69 = sbrk */
==== //depot/projects/smpng/sys/compat/freebsd32/freebsd32_sysent.c#3 (text+ko) ====
@@ -2,8 +2,8 @@
* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.14 2003/11/07 20:30:30 jhb Exp $
- * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.25 2003/11/07 20:29:53 jhb Exp
+ * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.15 2003/11/08 07:31:49 peter Exp $
+ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.26 2003/11/08 07:31:30 peter Exp
*/
#include "opt_compat.h"
@@ -91,7 +91,7 @@
{ 0, (sy_call_t *)nosys }, /* 63 = obsolete ogetkerninfo */
{ 0, (sy_call_t *)nosys }, /* 64 = obsolete ogetpagesize */
{ 0, (sy_call_t *)nosys }, /* 65 = obsolete omsync */
- { 0, (sy_call_t *)nosys }, /* 66 = obsolete ovfork */
+ { SYF_MPSAFE | 0, (sy_call_t *)vfork }, /* 66 = vfork */
{ 0, (sy_call_t *)nosys }, /* 67 = obsolete vread */
{ 0, (sy_call_t *)nosys }, /* 68 = obsolete vwrite */
{ SYF_MPSAFE | AS(sbrk_args), (sy_call_t *)sbrk }, /* 69 = sbrk */
==== //depot/projects/smpng/sys/compat/freebsd32/syscalls.master#3 (text+ko) ====
@@ -1,4 +1,4 @@
- $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.25 2003/11/07 20:29:53 jhb Exp $
+ $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.26 2003/11/08 07:31:30 peter Exp $
; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94
; from: src/sys/kern/syscalls.master 1.107
;
@@ -81,6 +81,7 @@
25 MNOPROTO POSIX { uid_t geteuid(void); }
26 MNOPROTO BSD { int ptrace(int req, pid_t pid, caddr_t addr, \
int data); }
+; XXX implement
27 UNIMPL BSD recvmsg
28 MNOPROTO BSD { int sendmsg(int s, caddr_t msg, int flags); }
29 MNOPROTO BSD { int recvfrom(int s, caddr_t buf, size_t len, \
@@ -124,8 +125,9 @@
62 OBSOL POSIX ofstat
63 OBSOL BSD ogetkerninfo
64 OBSOL BSD ogetpagesize
+; XXX implement (not OBSOL at all)
65 OBSOL BSD omsync
-66 OBSOL BSD ovfork
+66 MNOPROTO BSD { int vfork(void); }
67 OBSOL NOHIDE vread
68 OBSOL NOHIDE vwrite
69 MNOPROTO BSD { int sbrk(int incr); }
@@ -148,7 +150,9 @@
struct itimerval32 *itv, \
struct itimerval32 *oitv); }
84 OBSOL BSD owait
+; XXX implement
85 OBSOL BSD oswapon
+; XXX implement
86 OBSOL BSD ogetitimer
87 OBSOL BSD ogethostname
88 OBSOL BSD osethostname
@@ -499,7 +503,9 @@
343 MNOPROTO POSIX { int sigpending(sigset_t *set); }
344 MCOMPAT4 BSD { int freebsd32_sigreturn( \
const struct __ucontext *sigcntxp); }
+; XXX implement
345 UNIMPL NOHIDE sigtimedwait
+; XXX implement
346 UNIMPL NOHIDE sigwaitinfo
347 MNOPROTO BSD { int __acl_get_file(const char *path, \
acl_type_t type, struct acl *aclp); }
@@ -581,6 +587,7 @@
397 UNIMPL NOHIDE nosys
398 UNIMPL NOHIDE nosys
399 UNIMPL NOHIDE nosys
+; XXX implement these?
400 UNIMPL NOHIDE ksem_close
401 UNIMPL NOHIDE ksem_post
402 UNIMPL NOHIDE ksem_wait
@@ -605,14 +612,18 @@
418 UNIMPL BSD __xstat
419 UNIMPL BSD __xfstat
420 UNIMPL BSD __xlstat
+; XXX implement
421 UNIMPL BSD getcontext
+; XXX implement
422 UNIMPL BSD setcontext
+; XXX implement
423 UNIMPL BSD swapcontext
424 UNIMPL BSD swapoff
425 UNIMPL BSD __acl_get_link
426 UNIMPL BSD __acl_set_link
427 UNIMPL BSD __acl_delete_link
428 UNIMPL BSD __acl_aclcheck_link
+; XXX implement
429 UNIMPL NOHIDE sigwait
430 MNOPROTO BSD { int thr_create(ucontext_t *ctx, thr_id_t *id, \
int flag s); }
==== //depot/projects/smpng/sys/compat/ia32/ia32_signal.h#4 (text+ko) ====
@@ -26,7 +26,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: src/sys/compat/ia32/ia32_signal.h,v 1.3 2003/11/08 02:36:05 peter Exp $
+ * $FreeBSD: src/sys/compat/ia32/ia32_signal.h,v 1.4 2003/11/08 07:43:44 peter Exp $
*/
struct ia32_sigaltstack {
@@ -160,3 +160,5 @@
extern int sz_ia32_sigcode;
extern int sz_freebsd4_ia32_sigcode;
extern void ia32_sendsig(sig_t, int, sigset_t *, u_long);
+extern void ia32_setregs(struct thread *td, u_long entry, u_long stack,
+ u_long ps_strings);
==== //depot/projects/smpng/sys/compat/ia32/ia32_sysvec.c#5 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/ia32/ia32_sysvec.c,v 1.11 2003/11/08 03:35:06 peter Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/ia32/ia32_sysvec.c,v 1.12 2003/11/08 07:43:44 peter Exp $");
#include "opt_compat.h"
@@ -86,8 +86,6 @@
#endif
static register_t *ia32_copyout_strings(struct image_params *imgp);
-static void ia32_setregs(struct thread *td, u_long entry, u_long stack,
- u_long ps_strings);
static void ia32_fixlimits(struct image_params *imgp);
extern struct sysent freebsd32_sysent[];
@@ -244,49 +242,6 @@
return ((register_t *)stack_base);
}
-/*
- * Clear registers on exec
- * XXX backend MD
- */
-extern int _ucode32sel, _udatasel;
-void
-ia32_setregs(td, entry, stack, ps_strings)
- struct thread *td;
- u_long entry;
- u_long stack;
- u_long ps_strings;
-{
- struct trapframe *regs = td->td_frame;
- struct pcb *pcb = td->td_pcb;
-
- wrmsr(MSR_FSBASE, 0);
- wrmsr(MSR_KGSBASE, 0); /* User value while we're in the kernel */
- pcb->pcb_fsbase = 0;
- pcb->pcb_gsbase = 0;
- load_ds(_udatasel);
- load_es(_udatasel);
- load_fs(_udatasel);
- load_gs(_udatasel);
- pcb->pcb_ds = _udatasel;
- pcb->pcb_es = _udatasel;
- pcb->pcb_fs = _udatasel;
- pcb->pcb_gs = _udatasel;
-
- bzero((char *)regs, sizeof(struct trapframe));
- regs->tf_rip = entry;
- regs->tf_rsp = stack;
- regs->tf_rflags = PSL_USER | (regs->tf_rflags & PSL_T);
- regs->tf_ss = _udatasel;
- regs->tf_cs = _ucode32sel;
- regs->tf_rbx = ps_strings;
- load_cr0(rcr0() | CR0_MP | CR0_TS);
- fpstate_drop(td);
-
- /* Return via doreti so that we can change to a different %cs */
- pcb->pcb_flags |= PCB_FULLCTX;
- td->td_retval[1] = 0;
-}
-
static u_long ia32_maxdsiz = IA32_MAXDSIZ;
SYSCTL_ULONG(_compat_ia32, OID_AUTO, maxdsiz, CTLFLAG_RW, &ia32_maxdsiz, 0, "");
static u_long ia32_maxssiz = IA32_MAXSSIZ;
==== //depot/projects/smpng/sys/compat/linux/linux_socket.c#13 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/linux/linux_socket.c,v 1.43 2003/10/11 15:08:32 iwasaki Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/linux/linux_socket.c,v 1.44 2003/11/09 17:04:04 dwmalone Exp $");
/* XXX we use functions that might not exist. */
#include "opt_compat.h"
@@ -45,6 +45,7 @@
#include <sys/file.h>
#include <sys/limits.h>
#include <sys/malloc.h>
+#include <sys/mbuf.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <sys/syscallsubr.h>
@@ -333,39 +334,6 @@
return ret_flags;
}
-/*
- * Allocate stackgap and put the converted sockaddr structure
- * there, address on stackgap returned in sap.
- */
-static int
-linux_sa_get(caddr_t *sgp, struct sockaddr **sap,
- const struct osockaddr *osa, int *osalen)
-{
- struct sockaddr *sa, *usa;
- int alloclen, error;
-
- alloclen = *osalen;
- error = do_sa_get(&sa, osa, &alloclen, M_TEMP);
- if (error)
- return (error);
-
- usa = (struct sockaddr *) stackgap_alloc(sgp, alloclen);
- if (!usa) {
- error = ENOMEM;
- goto out;
- }
-
- if ((error = copyout(sa, usa, alloclen)))
- goto out;
-
- *sap = usa;
- *osalen = alloclen;
-
-out:
- FREE(sa, M_TEMP);
- return (error);
-}
-
static int
linux_sa_put(struct osockaddr *osa)
{
@@ -392,6 +360,46 @@
return (0);
}
+static int
+linux_sendit(struct thread *td, int s, struct msghdr *mp, int flags)
+{
+ struct mbuf *control;
+ struct sockaddr *to;
+ int error;
+
+ if (mp->msg_name != NULL) {
+ error = linux_getsockaddr(&to, mp->msg_name, mp->msg_namelen);
+ if (error)
+ return (error);
+ mp->msg_name = to;
+ } else
+ to = NULL;
+
+ if (mp->msg_control != NULL) {
+ struct cmsghdr *cmsg;
+
+ if (mp->msg_controllen < sizeof(struct cmsghdr)) {
+ error = EINVAL;
+ goto bad;
+ }
+ error = sockargs(&control, mp->msg_control,
+ mp->msg_controllen, MT_CONTROL);
+ if (error)
+ goto bad;
+
+ cmsg = mtod(control, struct cmsghdr *);
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list