Date: Thu, 19 Oct 2006 23:21:52 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 108131 for review Message-ID: <200610192321.k9JNLqag066019@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=108131 Change 108131 by rwatson@rwatson_zoo on 2006/10/19 23:21:43 Integrate TrustedBSD priv branch from TrustedBSD base branch; see @108130 for a detailed list of changes. Affected files ... .. //depot/projects/trustedbsd/priv/sys/amd64/amd64/busdma_machdep.c#2 integrate .. //depot/projects/trustedbsd/priv/sys/amd64/amd64/intr_machdep.c#3 integrate .. //depot/projects/trustedbsd/priv/sys/amd64/amd64/support.S#3 integrate .. //depot/projects/trustedbsd/priv/sys/amd64/conf/NOTES#3 integrate .. //depot/projects/trustedbsd/priv/sys/amd64/linux32/linux.h#2 integrate .. //depot/projects/trustedbsd/priv/sys/amd64/linux32/linux32_machdep.c#4 integrate .. //depot/projects/trustedbsd/priv/sys/amd64/linux32/linux32_proto.h#3 integrate .. //depot/projects/trustedbsd/priv/sys/amd64/linux32/linux32_syscall.h#3 integrate .. //depot/projects/trustedbsd/priv/sys/amd64/linux32/linux32_sysent.c#3 integrate .. //depot/projects/trustedbsd/priv/sys/amd64/linux32/syscalls.master#3 integrate .. //depot/projects/trustedbsd/priv/sys/arm/arm/fusu.S#3 integrate .. //depot/projects/trustedbsd/priv/sys/compat/freebsd32/freebsd32_proto.h#6 integrate .. //depot/projects/trustedbsd/priv/sys/compat/freebsd32/freebsd32_syscall.h#6 integrate .. //depot/projects/trustedbsd/priv/sys/compat/freebsd32/freebsd32_syscalls.c#6 integrate .. //depot/projects/trustedbsd/priv/sys/compat/freebsd32/freebsd32_sysent.c#6 integrate .. //depot/projects/trustedbsd/priv/sys/compat/freebsd32/syscalls.master#6 integrate .. //depot/projects/trustedbsd/priv/sys/compat/linux/linux_aio.c#1 branch .. //depot/projects/trustedbsd/priv/sys/compat/linux/linux_aio.h#1 branch .. //depot/projects/trustedbsd/priv/sys/compat/linux/linux_signal.c#2 integrate .. //depot/projects/trustedbsd/priv/sys/compat/linux/linux_signal.h#2 integrate .. //depot/projects/trustedbsd/priv/sys/conf/files#5 integrate .. //depot/projects/trustedbsd/priv/sys/conf/files.amd64#4 integrate .. //depot/projects/trustedbsd/priv/sys/conf/files.i386#3 integrate .. //depot/projects/trustedbsd/priv/sys/conf/files.pc98#2 integrate .. //depot/projects/trustedbsd/priv/sys/dev/awi/if_awi_pccard.c#2 integrate .. //depot/projects/trustedbsd/priv/sys/dev/bce/if_bce.c#4 integrate .. //depot/projects/trustedbsd/priv/sys/dev/bce/if_bcereg.h#2 integrate .. //depot/projects/trustedbsd/priv/sys/dev/bge/if_bge.c#6 integrate .. //depot/projects/trustedbsd/priv/sys/dev/mfi/mfi.c#4 integrate .. //depot/projects/trustedbsd/priv/sys/dev/mfi/mfi_debug.c#2 integrate .. //depot/projects/trustedbsd/priv/sys/dev/mfi/mfi_disk.c#2 integrate .. //depot/projects/trustedbsd/priv/sys/dev/mfi/mfireg.h#3 integrate .. //depot/projects/trustedbsd/priv/sys/dev/mfi/mfivar.h#3 integrate .. //depot/projects/trustedbsd/priv/sys/dev/mxge/if_mxge.c#3 integrate .. //depot/projects/trustedbsd/priv/sys/dev/nfe/if_nfe.c#3 integrate .. //depot/projects/trustedbsd/priv/sys/dev/nfe/if_nfereg.h#3 integrate .. //depot/projects/trustedbsd/priv/sys/dev/ray/if_ray.c#2 integrate .. //depot/projects/trustedbsd/priv/sys/dev/sound/midi/sequencer.c#3 integrate .. //depot/projects/trustedbsd/priv/sys/dev/sound/pci/hda/hdac.c#2 integrate .. //depot/projects/trustedbsd/priv/sys/dev/usb/ehci.c#4 integrate .. //depot/projects/trustedbsd/priv/sys/dev/usb/if_axe.c#3 integrate .. //depot/projects/trustedbsd/priv/sys/dev/usb/if_udav.c#3 integrate .. //depot/projects/trustedbsd/priv/sys/dev/usb/if_ural.c#4 integrate .. //depot/projects/trustedbsd/priv/sys/dev/usb/ohci.c#4 integrate .. //depot/projects/trustedbsd/priv/sys/dev/usb/uhci.c#3 integrate .. //depot/projects/trustedbsd/priv/sys/dev/usb/usb.c#3 integrate .. //depot/projects/trustedbsd/priv/sys/dev/usb/usbdi.h#3 integrate .. //depot/projects/trustedbsd/priv/sys/fs/devfs/devfs.h#3 integrate .. //depot/projects/trustedbsd/priv/sys/fs/devfs/devfs_devs.c#3 integrate .. //depot/projects/trustedbsd/priv/sys/fs/devfs/devfs_int.h#2 integrate .. //depot/projects/trustedbsd/priv/sys/fs/devfs/devfs_vnops.c#4 integrate .. //depot/projects/trustedbsd/priv/sys/i386/acpica/Makefile#3 integrate .. //depot/projects/trustedbsd/priv/sys/i386/conf/NOTES#4 integrate .. //depot/projects/trustedbsd/priv/sys/i386/i386/support.s#3 integrate .. //depot/projects/trustedbsd/priv/sys/i386/linux/linux.h#2 integrate .. //depot/projects/trustedbsd/priv/sys/i386/linux/linux_machdep.c#5 integrate .. //depot/projects/trustedbsd/priv/sys/i386/linux/linux_proto.h#4 integrate .. //depot/projects/trustedbsd/priv/sys/i386/linux/linux_syscall.h#4 integrate .. //depot/projects/trustedbsd/priv/sys/i386/linux/linux_sysent.c#4 integrate .. //depot/projects/trustedbsd/priv/sys/i386/linux/syscalls.master#4 integrate .. //depot/projects/trustedbsd/priv/sys/ia64/ia64/busdma_machdep.c#2 integrate .. //depot/projects/trustedbsd/priv/sys/ia64/ia64/clock.c#3 integrate .. //depot/projects/trustedbsd/priv/sys/ia64/ia64/support.S#3 integrate .. //depot/projects/trustedbsd/priv/sys/kern/init_sysent.c#5 integrate .. //depot/projects/trustedbsd/priv/sys/kern/kern_intr.c#2 integrate .. //depot/projects/trustedbsd/priv/sys/kern/kern_umtx.c#6 integrate .. //depot/projects/trustedbsd/priv/sys/kern/subr_trap.c#2 integrate .. //depot/projects/trustedbsd/priv/sys/kern/sys_generic.c#3 integrate .. //depot/projects/trustedbsd/priv/sys/kern/sys_process.c#2 integrate .. //depot/projects/trustedbsd/priv/sys/kern/syscalls.c#5 integrate .. //depot/projects/trustedbsd/priv/sys/kern/syscalls.master#5 integrate .. //depot/projects/trustedbsd/priv/sys/kern/systrace_args.c#5 integrate .. //depot/projects/trustedbsd/priv/sys/kern/vfs_aio.c#4 integrate .. //depot/projects/trustedbsd/priv/sys/modules/aio/Makefile#2 integrate .. //depot/projects/trustedbsd/priv/sys/modules/linux/Makefile#2 integrate .. //depot/projects/trustedbsd/priv/sys/modules/mem/Makefile#2 integrate .. //depot/projects/trustedbsd/priv/sys/modules/uart/Makefile#2 integrate .. //depot/projects/trustedbsd/priv/sys/netgraph/netgraph.h#2 integrate .. //depot/projects/trustedbsd/priv/sys/netgraph/ng_message.h#2 integrate .. //depot/projects/trustedbsd/priv/sys/netgraph/ng_socket.c#3 integrate .. //depot/projects/trustedbsd/priv/sys/netgraph/ng_socket.h#2 integrate .. //depot/projects/trustedbsd/priv/sys/nfsclient/nfs.h#2 integrate .. //depot/projects/trustedbsd/priv/sys/nfsclient/nfs_vnops.c#4 integrate .. //depot/projects/trustedbsd/priv/sys/pc98/conf/NOTES#2 integrate .. //depot/projects/trustedbsd/priv/sys/pci/agp.c#2 integrate .. //depot/projects/trustedbsd/priv/sys/pci/nfsmb.c#3 integrate .. //depot/projects/trustedbsd/priv/sys/powerpc/powerpc/copyinout.c#3 integrate .. //depot/projects/trustedbsd/priv/sys/sparc64/sparc64/support.S#3 integrate .. //depot/projects/trustedbsd/priv/sys/sun4v/conf/NOTES#2 integrate .. //depot/projects/trustedbsd/priv/sys/sun4v/sun4v/support.S#2 integrate .. //depot/projects/trustedbsd/priv/sys/sun4v/sun4v/trap.c#2 integrate .. //depot/projects/trustedbsd/priv/sys/sys/elf32.h#3 integrate .. //depot/projects/trustedbsd/priv/sys/sys/elf64.h#3 integrate .. //depot/projects/trustedbsd/priv/sys/sys/sem.h#2 integrate .. //depot/projects/trustedbsd/priv/sys/sys/syscall.h#5 integrate .. //depot/projects/trustedbsd/priv/sys/sys/syscall.mk#5 integrate .. //depot/projects/trustedbsd/priv/sys/sys/sysproto.h#5 integrate .. //depot/projects/trustedbsd/priv/sys/sys/systm.h#5 integrate .. //depot/projects/trustedbsd/priv/sys/sys/umtx.h#4 integrate .. //depot/projects/trustedbsd/priv/sys/vm/vnode_pager.c#3 integrate Differences ... ==== //depot/projects/trustedbsd/priv/sys/amd64/amd64/busdma_machdep.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.77 2006/06/01 04:49:29 silby Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.78 2006/10/15 16:52:59 hrs Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -520,7 +520,7 @@ __func__, dmat, dmat->flags, ENOMEM); return (ENOMEM); } else if ((uintptr_t)*vaddr & (dmat->alignment - 1)) { - printf("bus_dmamem_alloc failed to align memory properly."); + printf("bus_dmamem_alloc failed to align memory properly.\n"); } CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", __func__, dmat, dmat->flags, ENOMEM); ==== //depot/projects/trustedbsd/priv/sys/amd64/amd64/intr_machdep.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/intr_machdep.c,v 1.24 2006/10/13 17:31:57 jhb Exp $ + * $FreeBSD: src/sys/amd64/amd64/intr_machdep.c,v 1.25 2006/10/16 21:40:46 jhb Exp $ */ /* @@ -58,6 +58,7 @@ #ifndef DEV_ATPIC #include <machine/segments.h> +#include <machine/frame.h> #include <dev/ic/i8259.h> #include <amd64/isa/icu.h> #include <amd64/isa/isa.h> ==== //depot/projects/trustedbsd/priv/sys/amd64/amd64/support.S#3 (text+ko) ==== @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/support.S,v 1.120 2006/08/28 02:28:14 davidxu Exp $ + * $FreeBSD: src/sys/amd64/amd64/support.S,v 1.121 2006/10/17 02:24:45 davidxu Exp $ */ #include "opt_ddb.h" @@ -342,10 +342,10 @@ ret /* - * casuptr. Compare and set user pointer. Returns -1 or the current value. + * casuword. Compare and set user word. Returns -1 or the current value. * dst = %rdi, old = %rsi, new = %rdx */ -ENTRY(casuptr) +ENTRY(casuword) movq PCPU(CURPCB),%rcx movq $fusufault,PCB_ONFAULT(%rcx) ==== //depot/projects/trustedbsd/priv/sys/amd64/conf/NOTES#3 (text+ko) ==== @@ -4,7 +4,7 @@ # This file contains machine dependent kernel configuration notes. For # machine independent notes, look in /sys/conf/NOTES. # -# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.59 2006/09/22 22:11:28 jhb Exp $ +# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.60 2006/10/19 05:17:55 imp Exp $ # # @@ -103,7 +103,7 @@ # # sio: serial ports (see sio(4)), including support for various -# PC Card devices, such as Modem and NICs (see etc/defaults/pccard.conf) +# PC Card devices, such as Modem and NICs # device sio hint.sio.0.at="isa" @@ -257,7 +257,7 @@ # ath: Atheros a/b/g WiFi adapters (requires ath_hal and wlan) # ed: Western Digital and SMC 80xx; Novell NE1000 and NE2000; 3Com 3C503 -# HP PC Lan+, various PC Card devices (refer to etc/defaults/pccard.conf) +# HP PC Lan+, various PC Card devices # (requires miibus) # ipw: Intel PRO/Wireless 2100 IEEE 802.11 adapter # iwi: Intel PRO/Wireless 2200BG/2225BG/2915ABG IEEE 802.11 adapters ==== //depot/projects/trustedbsd/priv/sys/amd64/linux32/linux.h#2 (text+ko) ==== @@ -27,7 +27,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/amd64/linux32/linux.h,v 1.5 2006/08/19 15:13:01 netchild Exp $ + * $FreeBSD: src/sys/amd64/linux32/linux.h,v 1.7 2006/10/15 14:22:12 netchild Exp $ */ #ifndef _AMD64_LINUX_LINUX_H_ @@ -830,6 +830,7 @@ #define CLONE_FILES 0x400 #define CLONE_SIGHAND 0x800 #define CLONE_PID 0x1000 /* this flag does not exist in linux anymore */ +#define CLONE_VFORK 0x4000 #define CLONE_PARENT 0x00008000 #define CLONE_THREAD 0x10000 #define CLONE_SETTLS 0x80000 @@ -839,4 +840,6 @@ #define THREADING_FLAGS (CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND) +#include <compat/linux/linux_aio.h> + #endif /* !_AMD64_LINUX_LINUX_H_ */ ==== //depot/projects/trustedbsd/priv/sys/amd64/linux32/linux32_machdep.c#4 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.18 2006/10/02 12:59:55 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.22 2006/10/15 13:39:39 netchild Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -530,7 +530,13 @@ ff |= RFMEM; if (args->flags & CLONE_SIGHAND) ff |= RFSIGSHARE; - if (!(args->flags & CLONE_FILES)) + /* + * XXX: in linux sharing of fs info (chroot/cwd/umask) + * and open files is independant. in fbsd its in one + * structure but in reality it doesnt make any problems + * because both this flags are set at once usually. + */ + if (!(args->flags & (CLONE_FILES | CLONE_FS))) ff |= RFFDG; /* @@ -634,6 +640,16 @@ td->td_retval[0] = p2->p_pid; td->td_retval[1] = 0; + + if (args->flags & CLONE_VFORK) { + /* wait for the children to exit, ie. emulate vfork */ + PROC_LOCK(p2); + p2->p_flag |= P_PPWAIT; + while (p2->p_flag & P_PPWAIT) + msleep(td->td_proc, &p2->p_mtx, PWAIT, "ppwait", 0); + PROC_UNLOCK(p2); + } + return (0); } ==== //depot/projects/trustedbsd/priv/sys/amd64/linux32/linux32_proto.h#3 (text+ko) ==== @@ -2,8 +2,8 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/amd64/linux32/linux32_proto.h,v 1.22 2006/08/27 08:58:00 netchild Exp $ - * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.20 2006/08/27 08:56:53 netchild Exp + * $FreeBSD: src/sys/amd64/linux32/linux32_proto.h,v 1.23 2006/10/15 14:24:09 netchild Exp $ + * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.21 2006/10/15 14:22:12 netchild Exp */ #ifndef _LINUX_SYSPROTO_H_ @@ -724,6 +724,30 @@ char uaddr2_l_[PADL_(void *)]; void * uaddr2; char uaddr2_r_[PADR_(void *)]; char val3_l_[PADL_(int)]; int val3; char val3_r_[PADR_(int)]; }; +struct linux_io_setup_args { + char nr_reqs_l_[PADL_(l_uint)]; l_uint nr_reqs; char nr_reqs_r_[PADR_(l_uint)]; + char ctxp_l_[PADL_(linux_aio_context_t *)]; linux_aio_context_t * ctxp; char ctxp_r_[PADR_(linux_aio_context_t *)]; +}; +struct linux_io_destroy_args { + char ctx_l_[PADL_(linux_aio_context_t)]; linux_aio_context_t ctx; char ctx_r_[PADR_(linux_aio_context_t)]; +}; +struct linux_io_getevents_args { + char ctx_id_l_[PADL_(linux_aio_context_t)]; linux_aio_context_t ctx_id; char ctx_id_r_[PADR_(linux_aio_context_t)]; + char min_nr_l_[PADL_(l_long)]; l_long min_nr; char min_nr_r_[PADR_(l_long)]; + char nr_l_[PADL_(l_long)]; l_long nr; char nr_r_[PADR_(l_long)]; + char events_l_[PADL_(struct linux_io_event *)]; struct linux_io_event * events; char events_r_[PADR_(struct linux_io_event *)]; + char timeout_l_[PADL_(struct l_timespec *)]; struct l_timespec * timeout; char timeout_r_[PADR_(struct l_timespec *)]; +}; +struct linux_io_submit_args { + char ctx_id_l_[PADL_(linux_aio_context_t)]; linux_aio_context_t ctx_id; char ctx_id_r_[PADR_(linux_aio_context_t)]; + char nr_l_[PADL_(l_long)]; l_long nr; char nr_r_[PADR_(l_long)]; + char iocbpp_l_[PADL_(struct linux_iocb **)]; struct linux_iocb ** iocbpp; char iocbpp_r_[PADR_(struct linux_iocb **)]; +}; +struct linux_io_cancel_args { + char ctx_id_l_[PADL_(linux_aio_context_t)]; linux_aio_context_t ctx_id; char ctx_id_r_[PADR_(linux_aio_context_t)]; + char iocb_l_[PADL_(struct linux_iocb *)]; struct linux_iocb * iocb; char iocb_r_[PADR_(struct linux_iocb *)]; + char result_l_[PADL_(struct linux_io_event *)]; struct linux_io_event * result; char result_r_[PADR_(struct linux_io_event *)]; +}; struct linux_fadvise64_args { register_t dummy; }; @@ -1081,6 +1105,11 @@ int linux_fremovexattr(struct thread *, struct linux_fremovexattr_args *); int linux_tkill(struct thread *, struct linux_tkill_args *); int linux_sys_futex(struct thread *, struct linux_sys_futex_args *); +int linux_io_setup(struct thread *, struct linux_io_setup_args *); +int linux_io_destroy(struct thread *, struct linux_io_destroy_args *); +int linux_io_getevents(struct thread *, struct linux_io_getevents_args *); +int linux_io_submit(struct thread *, struct linux_io_submit_args *); +int linux_io_cancel(struct thread *, struct linux_io_cancel_args *); int linux_fadvise64(struct thread *, struct linux_fadvise64_args *); int linux_exit_group(struct thread *, struct linux_exit_group_args *); int linux_lookup_dcookie(struct thread *, struct linux_lookup_dcookie_args *); @@ -1326,6 +1355,11 @@ #define LINUX_SYS_AUE_linux_fremovexattr AUE_NULL #define LINUX_SYS_AUE_linux_tkill AUE_NULL #define LINUX_SYS_AUE_linux_sys_futex AUE_NULL +#define LINUX_SYS_AUE_linux_io_setup AUE_NULL +#define LINUX_SYS_AUE_linux_io_destroy AUE_NULL +#define LINUX_SYS_AUE_linux_io_getevents AUE_NULL +#define LINUX_SYS_AUE_linux_io_submit AUE_NULL +#define LINUX_SYS_AUE_linux_io_cancel AUE_NULL #define LINUX_SYS_AUE_linux_fadvise64 AUE_NULL #define LINUX_SYS_AUE_linux_exit_group AUE_EXIT #define LINUX_SYS_AUE_linux_lookup_dcookie AUE_NULL ==== //depot/projects/trustedbsd/priv/sys/amd64/linux32/linux32_syscall.h#3 (text+ko) ==== @@ -2,8 +2,8 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/amd64/linux32/linux32_syscall.h,v 1.22 2006/08/27 08:58:00 netchild Exp $ - * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.20 2006/08/27 08:56:53 netchild Exp + * $FreeBSD: src/sys/amd64/linux32/linux32_syscall.h,v 1.23 2006/10/15 14:24:09 netchild Exp $ + * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.21 2006/10/15 14:22:12 netchild Exp */ #define LINUX_SYS_exit 1 @@ -221,6 +221,11 @@ #define LINUX_SYS_linux_fremovexattr 237 #define LINUX_SYS_linux_tkill 238 #define LINUX_SYS_linux_sys_futex 240 +#define LINUX_SYS_linux_io_setup 245 +#define LINUX_SYS_linux_io_destroy 246 +#define LINUX_SYS_linux_io_getevents 247 +#define LINUX_SYS_linux_io_submit 248 +#define LINUX_SYS_linux_io_cancel 249 #define LINUX_SYS_linux_fadvise64 250 #define LINUX_SYS_linux_exit_group 252 #define LINUX_SYS_linux_lookup_dcookie 253 ==== //depot/projects/trustedbsd/priv/sys/amd64/linux32/linux32_sysent.c#3 (text+ko) ==== @@ -2,8 +2,8 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/amd64/linux32/linux32_sysent.c,v 1.22 2006/08/27 08:58:00 netchild Exp $ - * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.20 2006/08/27 08:56:53 netchild Exp + * $FreeBSD: src/sys/amd64/linux32/linux32_sysent.c,v 1.23 2006/10/15 14:24:09 netchild Exp $ + * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.21 2006/10/15 14:22:12 netchild Exp */ #include <bsm/audit_kevents.h> @@ -265,11 +265,11 @@ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 242 = linux_sched_getaffinity */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 243 = linux_set_thread_area */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 244 = linux_get_thread_area */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 245 = linux_io_setup */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 246 = linux_io_destroy */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 247 = linux_io_getevents */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 248 = linux_io_submit */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 249 = linux_io_cancel */ + { AS(linux_io_setup_args), (sy_call_t *)linux_io_setup, AUE_NULL, NULL, 0, 0 }, /* 245 = linux_io_setup */ + { AS(linux_io_destroy_args), (sy_call_t *)linux_io_destroy, AUE_NULL, NULL, 0, 0 }, /* 246 = linux_io_destroy */ + { AS(linux_io_getevents_args), (sy_call_t *)linux_io_getevents, AUE_NULL, NULL, 0, 0 }, /* 247 = linux_io_getevents */ + { AS(linux_io_submit_args), (sy_call_t *)linux_io_submit, AUE_NULL, NULL, 0, 0 }, /* 248 = linux_io_submit */ + { AS(linux_io_cancel_args), (sy_call_t *)linux_io_cancel, AUE_NULL, NULL, 0, 0 }, /* 249 = linux_io_cancel */ { 0, (sy_call_t *)linux_fadvise64, AUE_NULL, NULL, 0, 0 }, /* 250 = linux_fadvise64 */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 251 = */ { AS(linux_exit_group_args), (sy_call_t *)linux_exit_group, AUE_EXIT, NULL, 0, 0 }, /* 252 = linux_exit_group */ ==== //depot/projects/trustedbsd/priv/sys/amd64/linux32/syscalls.master#3 (text+ko) ==== @@ -1,4 +1,4 @@ - $FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.20 2006/08/27 08:56:53 netchild Exp $ + $FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.21 2006/10/15 14:22:12 netchild Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 ; System call name/number master file (or rather, slave, from LINUX). @@ -406,11 +406,11 @@ 242 AUE_NULL UNIMPL linux_sched_getaffinity 243 AUE_NULL UNIMPL linux_set_thread_area 244 AUE_NULL UNIMPL linux_get_thread_area -245 AUE_NULL UNIMPL linux_io_setup -246 AUE_NULL UNIMPL linux_io_destroy -247 AUE_NULL UNIMPL linux_io_getevents -248 AUE_NULL UNIMPL linux_io_submit -249 AUE_NULL UNIMPL linux_io_cancel +245 AUE_NULL STD { int linux_io_setup(l_uint nr_reqs, linux_aio_context_t *ctxp); } +246 AUE_NULL STD { int linux_io_destroy(linux_aio_context_t ctx); } +247 AUE_NULL STD { int linux_io_getevents(linux_aio_context_t ctx_id, l_long min_nr, l_long nr, struct linux_io_event *events, struct l_timespec *timeout); } +248 AUE_NULL STD { int linux_io_submit(linux_aio_context_t ctx_id, l_long nr, struct linux_iocb **iocbpp); } +249 AUE_NULL STD { int linux_io_cancel(linux_aio_context_t ctx_id, struct linux_iocb *iocb, struct linux_io_event *result); } 250 AUE_NULL STD { int linux_fadvise64(void); } 251 AUE_NULL UNIMPL 252 AUE_EXIT STD { int linux_exit_group(int error_code); } ==== //depot/projects/trustedbsd/priv/sys/arm/arm/fusu.S#3 (text+ko) ==== @@ -37,7 +37,7 @@ #include <machine/asmacros.h> #include <machine/armreg.h> #include "assym.s" -__FBSDID("$FreeBSD: src/sys/arm/arm/fusu.S,v 1.10 2006/08/30 11:44:37 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/fusu.S,v 1.11 2006/10/17 02:24:46 davidxu Exp $"); #ifdef MULTIPROCESSOR .Lcpu_info: @@ -53,7 +53,7 @@ */ ENTRY_NP(casuword32) -ENTRY(casuptr) +ENTRY(casuword) #ifdef MULTIPROCESSOR /* XXX Probably not appropriate for non-Hydra SMPs */ stmfd sp!, {r0, r14} @@ -72,7 +72,7 @@ beq .Lfusupcbfault #endif stmfd sp!, {r4, r5} - adr r4, .Lcasuptrfault + adr r4, .Lcasuwordfault str r4, [r3, #PCB_ONFAULT] ldrt r5, [r0] cmp r5, r1 @@ -85,10 +85,10 @@ RET /* - * Handle faults from casuptr. Clean up and return -1. + * Handle faults from casuword. Clean up and return -1. */ -.Lcasuptrfault: +.Lcasuwordfault: mov r0, #0x00000000 str r0, [r3, #PCB_ONFAULT] mvn r0, #0x00000000 ==== //depot/projects/trustedbsd/priv/sys/compat/freebsd32/freebsd32_proto.h#6 (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.69 2006/10/06 08:24:37 davidxu Exp $ - * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.81 2006/10/05 01:56:10 davidxu Exp + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.70 2006/10/17 02:28:58 davidxu Exp $ + * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.82 2006/10/06 08:22:08 davidxu Exp */ #ifndef _FREEBSD32_SYSPROTO_H_ @@ -301,7 +301,7 @@ struct freebsd32_umtx_op_args { char obj_l_[PADL_(void *)]; void * obj; char obj_r_[PADR_(void *)]; char op_l_[PADL_(int)]; int op; char op_r_[PADR_(int)]; - char val_l_[PADL_(uintptr_t)]; uintptr_t val; char val_r_[PADR_(uintptr_t)]; + char val_l_[PADL_(u_long)]; u_long val; char val_r_[PADR_(u_long)]; char uaddr_l_[PADL_(void *)]; void * uaddr; char uaddr_r_[PADR_(void *)]; char uaddr2_l_[PADL_(void *)]; void * uaddr2; char uaddr2_r_[PADR_(void *)]; }; ==== //depot/projects/trustedbsd/priv/sys/compat/freebsd32/freebsd32_syscall.h#6 (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.67 2006/10/06 08:24:37 davidxu Exp $ - * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.81 2006/10/05 01:56:10 davidxu Exp + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.68 2006/10/17 02:28:58 davidxu Exp $ + * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.82 2006/10/06 08:22:08 davidxu Exp */ #define FREEBSD32_SYS_syscall 0 ==== //depot/projects/trustedbsd/priv/sys/compat/freebsd32/freebsd32_syscalls.c#6 (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.58 2006/10/06 08:24:37 davidxu Exp $ - * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.81 2006/10/05 01:56:10 davidxu Exp + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.59 2006/10/17 02:28:58 davidxu Exp $ + * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.82 2006/10/06 08:22:08 davidxu Exp */ const char *freebsd32_syscallnames[] = { ==== //depot/projects/trustedbsd/priv/sys/compat/freebsd32/freebsd32_sysent.c#6 (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.68 2006/10/06 08:24:37 davidxu Exp $ - * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.81 2006/10/05 01:56:10 davidxu Exp + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.69 2006/10/17 02:28:58 davidxu Exp $ + * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.82 2006/10/06 08:22:08 davidxu Exp */ #include "opt_compat.h" ==== //depot/projects/trustedbsd/priv/sys/compat/freebsd32/syscalls.master#6 (text+ko) ==== @@ -1,4 +1,4 @@ - $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.82 2006/10/06 08:22:08 davidxu Exp $ + $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.83 2006/10/17 02:28:26 davidxu Exp $ ; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94 ; from: src/sys/kern/syscalls.master 1.107 ; @@ -743,7 +743,7 @@ 452 AUE_SETAUDIT_ADDR UNIMPL setaudit_addr 453 AUE_AUDITCTL UNIMPL auditctl 454 AUE_NULL STD { int freebsd32_umtx_op(void *obj, int op,\ - uintptr_t val, void *uaddr, \ + u_long val, void *uaddr, \ void *uaddr2); } 455 AUE_NULL STD { int freebsd32_thr_new( \ struct thr_param32 *param, \ ==== //depot/projects/trustedbsd/priv/sys/compat/linux/linux_signal.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_signal.c,v 1.59 2006/08/19 15:13:01 netchild Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_signal.c,v 1.61 2006/10/15 14:34:03 netchild Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -144,7 +144,7 @@ struct sigaction act, oact, *nsa, *osa; int error, sig; - if (linux_sig <= 0 || linux_sig > LINUX_NSIG) + if (!LINUX_SIG_VALID(linux_sig)) return (EINVAL); osa = (linux_osa != NULL) ? &oact : NULL; @@ -438,7 +438,7 @@ /* * Allow signal 0 as a means to check for privileges */ - if (args->signum < 0 || args->signum > LINUX_NSIG) + if (!LINUX_SIG_VALID(args->signum) && args->signum != 0) return EINVAL; if (args->signum > 0 && args->signum <= LINUX_SIGTBLSZ) ==== //depot/projects/trustedbsd/priv/sys/compat/linux/linux_signal.h#2 (text+ko) ==== @@ -25,7 +25,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/linux/linux_signal.h,v 1.6 2002/03/20 05:42:02 alfred Exp $ + * $FreeBSD: src/sys/compat/linux/linux_signal.h,v 1.7 2006/10/15 12:51:43 netchild Exp $ */ #ifndef _LINUX_SIGNAL_H_ @@ -35,4 +35,6 @@ void bsd_to_linux_sigset(sigset_t *, l_sigset_t *); int linux_do_sigaction(struct thread *, int, l_sigaction_t *, l_sigaction_t *); +#define LINUX_SIG_VALID(sig) ((sig) <= LINUX_NSIG && (sig) > 0) + #endif /* _LINUX_SIGNAL_H_ */ ==== //depot/projects/trustedbsd/priv/sys/conf/files#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1150 2006/10/08 13:51:27 piso Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1151 2006/10/17 18:08:04 imp Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -50,12 +50,7 @@ aic79xx_reg_print.o optional ahd pci ahd_reg_pretty_print \ compile-with "${NORMAL_C}" \ no-implicit-rule local -emu10k1-alsa%diked.h optional snd_emu10k1 pci \ - dependency "$S/tools/emu10k1-mkalsa.sh $S/gnu/dev/sound/pci/emu10k1-alsa.h" \ - compile-with "CC='${CC}' AWK=${AWK} sh $S/tools/emu10k1-mkalsa.sh $S/gnu/dev/sound/pci/emu10k1-alsa.h emu10k1-alsa%diked.h" \ - no-obj no-implicit-rule before-depend \ - clean "emu10k1-alsa%diked.h" -emu10k1-alsa%diked.h optional snd_emu10kx pci \ +emu10k1-alsa%diked.h optional snd_emu10k1 | snd_emu10kx \ dependency "$S/tools/emu10k1-mkalsa.sh $S/gnu/dev/sound/pci/emu10k1-alsa.h" \ compile-with "CC='${CC}' AWK=${AWK} sh $S/tools/emu10k1-mkalsa.sh $S/gnu/dev/sound/pci/emu10k1-alsa.h emu10k1-alsa%diked.h" \ no-obj no-implicit-rule before-depend \ ==== //depot/projects/trustedbsd/priv/sys/conf/files.amd64#4 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.amd64,v 1.94 2006/09/22 22:11:28 jhb Exp $ +# $FreeBSD: src/sys/conf/files.amd64,v 1.95 2006/10/15 14:22:13 netchild Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -240,6 +240,7 @@ amd64/linux32/linux32_machdep.c optional compat_linux32 amd64/linux32/linux32_sysent.c optional compat_linux32 amd64/linux32/linux32_sysvec.c optional compat_linux32 +compat/linux/linux_aio.c optional compat_linux32 compat/linux/linux_emul.c optional compat_linux32 compat/linux/linux_file.c optional compat_linux32 compat/linux/linux_futex.c optional compat_linux32 ==== //depot/projects/trustedbsd/priv/sys/conf/files.i386#3 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.i386,v 1.566 2006/09/22 22:11:28 jhb Exp $ +# $FreeBSD: src/sys/conf/files.i386,v 1.567 2006/10/15 14:22:13 netchild Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -85,6 +85,7 @@ # compat/linprocfs/linprocfs.c optional linprocfs compat/linsysfs/linsysfs.c optional linsysfs +compat/linux/linux_aio.c optional compat_linux compat/linux/linux_emul.c optional compat_linux compat/linux/linux_file.c optional compat_linux compat/linux/linux_futex.c optional compat_linux ==== //depot/projects/trustedbsd/priv/sys/conf/files.pc98#2 (text+ko) ==== @@ -3,7 +3,7 @@ # # modified for PC-9801/PC-9821 # -# $FreeBSD: src/sys/conf/files.pc98,v 1.345 2006/08/18 15:46:38 netchild Exp $ +# $FreeBSD: src/sys/conf/files.pc98,v 1.346 2006/10/16 02:26:06 nyan Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -55,6 +55,7 @@ # compat/linprocfs/linprocfs.c optional linprocfs compat/linsysfs/linsysfs.c optional linsysfs +compat/linux/linux_aio.c optional compat_linux compat/linux/linux_emul.c optional compat_linux compat/linux/linux_file.c optional compat_linux compat/linux/linux_futex.c optional compat_linux ==== //depot/projects/trustedbsd/priv/sys/dev/awi/if_awi_pccard.c#2 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/awi/if_awi_pccard.c,v 1.23 2005/09/20 19:46:54 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/awi/if_awi_pccard.c,v 1.24 2006/10/19 05:25:29 imp Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -158,8 +158,9 @@ #if 1 /* * XXX: awi needs to access memory with 8bit, - * but pccardd apparently maps memory with MDF_16BITS flag. + * but OLDCARD apparently maps memory with MDF_16BITS flag. * So memory mapped access is disabled and use IO port instead. + * XXX: Should check to see if this is true of NEWCARD */ psc->sc_mem_res = 0; #else ==== //depot/projects/trustedbsd/priv/sys/dev/bce/if_bce.c#4 (text) ==== @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.10 2006/10/13 05:18:03 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.16 2006/10/19 08:01:43 scottl Exp $"); /* * The following controllers are supported by this driver: @@ -276,7 +276,6 @@ /* */ /****************************************************************************/ static void bce_dma_map_addr (void *, bus_dma_segment_t *, int, int); -static void bce_dma_map_tx_desc (void *, bus_dma_segment_t *, int, bus_size_t, int); static int bce_dma_alloc (device_t); static void bce_dma_free (struct bce_softc *); static void bce_release_resources (struct bce_softc *); @@ -300,7 +299,7 @@ static void bce_free_rx_chain (struct bce_softc *); static void bce_free_tx_chain (struct bce_softc *); -static int bce_tx_encap (struct bce_softc *, struct mbuf *, u16 *, u16 *, u32 *); +static int bce_tx_encap (struct bce_softc *, struct mbuf **); static void bce_start_locked (struct ifnet *); static void bce_start (struct ifnet *); static int bce_ioctl (struct ifnet *, u_long, caddr_t); @@ -468,10 +467,10 @@ /* Allocate PCI memory resources. */ rid = PCIR_BAR(0); sc->bce_res = bus_alloc_resource_any( - dev, /* dev */ - SYS_RES_MEMORY, /* type */ - &rid, /* rid */ - RF_ACTIVE | PCI_RF_DENSE); /* flags */ + dev, /* dev */ + SYS_RES_MEMORY, /* type */ + &rid, /* rid */ + RF_ACTIVE | PCI_RF_DENSE); /* flags */ if (sc->bce_res == NULL) { BCE_PRINTF(sc, "%s(%d): PCI memory allocation failed\n", @@ -2131,135 +2130,24 @@ static void bce_dma_map_addr(void *arg, bus_dma_segment_t *segs, int nseg, int error) { - struct bce_dmamap_arg *map_arg = arg; - struct bce_softc *sc = map_arg->sc; + bus_addr_t *busaddr = arg; /* Simulate a mapping failure. */ DBRUNIF(DB_RANDOMTRUE(bce_debug_dma_map_addr_failure), - BCE_PRINTF(sc, "%s(%d): Simulating DMA mapping error.\n", + printf("bce: %s(%d): Simulating DMA mapping error.\n", __FILE__, __LINE__); error = ENOMEM); /* Check for an error and signal the caller that an error occurred. */ - if (error || (nseg > map_arg->maxsegs)) { - BCE_PRINTF(sc, "%s(%d): DMA mapping error! error = %d, " - "nseg = %d, maxsegs = %d\n", - __FILE__, __LINE__, error, nseg, map_arg->maxsegs); - map_arg->maxsegs = 0; - goto bce_dma_map_addr_exit; - } - - map_arg->busaddr = segs->ds_addr; - -bce_dma_map_addr_exit: - return; -} - - -/****************************************************************************/ -/* Map TX buffers into TX buffer descriptors. */ -/* */ -/* Given a series of DMA memory containting an outgoing frame, map the */ -/* segments into the tx_bd structure used by the hardware. */ -/* */ -/* Returns: */ -/* Nothing. */ -/****************************************************************************/ -static void -bce_dma_map_tx_desc(void *arg, bus_dma_segment_t *segs, - int nseg, bus_size_t mapsize, int error) -{ - struct bce_dmamap_arg *map_arg; - struct bce_softc *sc; - struct tx_bd *txbd = NULL; - int i = 0; - u16 prod, chain_prod; - u32 prod_bseq; -#ifdef BCE_DEBUG - u16 debug_prod; -#endif - - map_arg = arg; - sc = map_arg->sc; - if (error) { - DBPRINT(sc, BCE_WARN, "%s(): Called with error = %d\n", - __FUNCTION__, error); + printf("bce %s(%d): DMA mapping error! error = %d, " + "nseg = %d\n", __FILE__, __LINE__, error, nseg); + *busaddr = 0; return; } - /* Signal error to caller if there's too many segments */ - if (nseg > map_arg->maxsegs) { - DBPRINT(sc, BCE_WARN, - "%s(): Mapped TX descriptors: max segs = %d, " - "actual segs = %d\n", - __FUNCTION__, map_arg->maxsegs, nseg); - - map_arg->maxsegs = 0; - return; - } - - /* prod points to an empty tx_bd at this point. */ - prod = map_arg->prod; - chain_prod = map_arg->chain_prod; - prod_bseq = map_arg->prod_bseq; - -#ifdef BCE_DEBUG - debug_prod = chain_prod; -#endif - - DBPRINT(sc, BCE_INFO_SEND, - "%s(): Start: prod = 0x%04X, chain_prod = %04X, " - "prod_bseq = 0x%08X\n", - __FUNCTION__, prod, chain_prod, prod_bseq); - - /* - * Cycle through each mbuf segment that makes up - * the outgoing frame, gathering the mapping info - * for that segment and creating a tx_bd to for - * the mbuf. - */ - - txbd = &map_arg->tx_chain[TX_PAGE(chain_prod)][TX_IDX(chain_prod)]; - - /* Setup the first tx_bd for the first segment. */ - txbd->tx_bd_haddr_lo = htole32(BCE_ADDR_LO(segs[i].ds_addr)); - txbd->tx_bd_haddr_hi = htole32(BCE_ADDR_HI(segs[i].ds_addr)); - txbd->tx_bd_mss_nbytes = htole16(segs[i].ds_len); - txbd->tx_bd_vlan_tag_flags = htole16(map_arg->tx_flags | - TX_BD_FLAGS_START); - prod_bseq += segs[i].ds_len; - - /* Setup any remaing segments. */ - for (i = 1; i < nseg; i++) { - prod = NEXT_TX_BD(prod); - chain_prod = TX_CHAIN_IDX(prod); - - txbd = &map_arg->tx_chain[TX_PAGE(chain_prod)][TX_IDX(chain_prod)]; - - txbd->tx_bd_haddr_lo = htole32(BCE_ADDR_LO(segs[i].ds_addr)); - txbd->tx_bd_haddr_hi = htole32(BCE_ADDR_HI(segs[i].ds_addr)); - txbd->tx_bd_mss_nbytes = htole16(segs[i].ds_len); - txbd->tx_bd_vlan_tag_flags = htole16(map_arg->tx_flags); - - prod_bseq += segs[i].ds_len; - } - - /* Set the END flag on the last TX buffer descriptor. */ - txbd->tx_bd_vlan_tag_flags |= htole16(TX_BD_FLAGS_END); - - DBRUN(BCE_INFO_SEND, bce_dump_tx_chain(sc, debug_prod, nseg)); - - DBPRINT(sc, BCE_INFO_SEND, - "%s(): End: prod = 0x%04X, chain_prod = %04X, " - "prod_bseq = 0x%08X\n", - __FUNCTION__, prod, chain_prod, prod_bseq); - - /* prod points to the last tx_bd at this point. */ - map_arg->maxsegs = nseg; - map_arg->prod = prod; - map_arg->chain_prod = chain_prod; - map_arg->prod_bseq = prod_bseq; + *busaddr = segs->ds_addr; + return; } @@ -2277,17 +2165,17 @@ { struct bce_softc *sc; int i, error, rc = 0; - struct bce_dmamap_arg map_arg; + bus_addr_t busaddr; sc = device_get_softc(dev); - + DBPRINT(sc, BCE_VERBOSE_RESET, "Entering %s()\n", __FUNCTION__); /* * Allocate the parent bus DMA tag appropriate for PCI. */ if (bus_dma_tag_create(NULL, /* parent */ - BCE_DMA_ALIGN, /* alignment */ + 1, /* alignment */ BCE_DMA_BOUNDARY, /* boundary */ sc->max_bus_addr, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ @@ -2345,26 +2233,23 @@ bzero((char *)sc->status_block, BCE_STATUS_BLK_SZ); - map_arg.sc = sc; - map_arg.maxsegs = 1; - error = bus_dmamap_load( sc->status_tag, /* dmat */ sc->status_map, /* map */ sc->status_block, /* buf */ BCE_STATUS_BLK_SZ, /* buflen */ bce_dma_map_addr, /* callback */ - &map_arg, /* callbackarg */ + &busaddr, /* callbackarg */ BUS_DMA_NOWAIT); /* flags */ - if(error || (map_arg.maxsegs == 0)) { + if (error) { BCE_PRINTF(sc, "%s(%d): Could not map status block DMA memory!\n", __FILE__, __LINE__); rc = ENOMEM; goto bce_dma_alloc_exit; } - sc->status_block_paddr = map_arg.busaddr; + sc->status_block_paddr = busaddr; /* DRC - Fix for 64 bit addresses. */ DBPRINT(sc, BCE_INFO, "status_block_paddr = 0x%08X\n", (u32) sc->status_block_paddr); @@ -2408,26 +2293,23 @@ bzero((char *)sc->stats_block, BCE_STATS_BLK_SZ); - map_arg.sc = sc; - map_arg.maxsegs = 1; - error = bus_dmamap_load( sc->stats_tag, /* dmat */ sc->stats_map, /* map */ sc->stats_block, /* buf */ BCE_STATS_BLK_SZ, /* buflen */ bce_dma_map_addr, /* callback */ - &map_arg, /* callbackarg */ + &busaddr, /* callbackarg */ BUS_DMA_NOWAIT); /* flags */ - if(error || (map_arg.maxsegs == 0)) { + if(error) { BCE_PRINTF(sc, "%s(%d): Could not map statistics block DMA memory!\n", __FILE__, __LINE__); rc = ENOMEM; goto bce_dma_alloc_exit; } - sc->stats_block_paddr = map_arg.busaddr; + sc->stats_block_paddr = busaddr; /* DRC - Fix for 64 bit address. */ DBPRINT(sc,BCE_INFO, "stats_block_paddr = 0x%08X\n", (u32) sc->stats_block_paddr); @@ -2471,26 +2353,23 @@ goto bce_dma_alloc_exit; } - map_arg.maxsegs = 1; - map_arg.sc = sc; - error = bus_dmamap_load( sc->tx_bd_chain_tag, /* dmat */ sc->tx_bd_chain_map[i], /* map */ sc->tx_bd_chain[i], /* buf */ BCE_TX_CHAIN_PAGE_SZ, /* buflen */ bce_dma_map_addr, /* callback */ - &map_arg, /* callbackarg */ + &busaddr, /* callbackarg */ BUS_DMA_NOWAIT); /* flags */ - if(error || (map_arg.maxsegs == 0)) { + if (error) { BCE_PRINTF(sc, "%s(%d): Could not map TX descriptor chain DMA memory!\n", __FILE__, __LINE__); rc = ENOMEM; goto bce_dma_alloc_exit; >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610192321.k9JNLqag066019>