Date: Mon, 3 Jul 2006 06:45:27 GMT From: Warner Losh <imp@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 100466 for review Message-ID: <200607030645.k636jRXa043277@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=100466 Change 100466 by imp@imp_plunger on 2006/07/03 06:44:59 IFC @100462 Affected files ... .. //depot/projects/arm/src/sys/amd64/amd64/pmap.c#17 integrate .. //depot/projects/arm/src/sys/amd64/conf/NOTES#9 integrate .. //depot/projects/arm/src/sys/amd64/linux32/linux32_proto.h#9 integrate .. //depot/projects/arm/src/sys/amd64/linux32/linux32_syscall.h#9 integrate .. //depot/projects/arm/src/sys/amd64/linux32/linux32_sysent.c#9 integrate .. //depot/projects/arm/src/sys/amd64/linux32/syscalls.master#9 integrate .. //depot/projects/arm/src/sys/arm/at91/at91_pio.c#13 integrate .. //depot/projects/arm/src/sys/arm/at91/uart_dev_at91usart.c#33 integrate .. //depot/projects/arm/src/sys/compat/freebsd32/freebsd32_proto.h#11 integrate .. //depot/projects/arm/src/sys/compat/freebsd32/freebsd32_syscall.h#11 integrate .. //depot/projects/arm/src/sys/compat/freebsd32/freebsd32_syscalls.c#11 integrate .. //depot/projects/arm/src/sys/compat/freebsd32/freebsd32_sysent.c#11 integrate .. //depot/projects/arm/src/sys/compat/freebsd32/syscalls.master#11 integrate .. //depot/projects/arm/src/sys/compat/linprocfs/linprocfs.c#8 integrate .. //depot/projects/arm/src/sys/compat/linux/linux_ipc.c#4 integrate .. //depot/projects/arm/src/sys/compat/linux/linux_util.h#5 integrate .. //depot/projects/arm/src/sys/compat/svr4/Makefile#2 integrate .. //depot/projects/arm/src/sys/compat/svr4/svr4_ipc.c#3 integrate .. //depot/projects/arm/src/sys/compat/svr4/svr4_proto.h#4 integrate .. //depot/projects/arm/src/sys/compat/svr4/svr4_syscall.h#4 integrate .. //depot/projects/arm/src/sys/compat/svr4/svr4_syscallnames.c#4 integrate .. //depot/projects/arm/src/sys/compat/svr4/svr4_sysent.c#4 integrate .. //depot/projects/arm/src/sys/compat/svr4/syscalls.master#4 integrate .. //depot/projects/arm/src/sys/conf/NOTES#25 integrate .. //depot/projects/arm/src/sys/conf/files#32 integrate .. //depot/projects/arm/src/sys/conf/files.amd64#12 integrate .. //depot/projects/arm/src/sys/conf/files.i386#14 integrate .. //depot/projects/arm/src/sys/conf/files.ia64#6 integrate .. //depot/projects/arm/src/sys/conf/kern.mk#6 integrate .. //depot/projects/arm/src/sys/conf/kern.pre.mk#4 integrate .. //depot/projects/arm/src/sys/conf/kmod.mk#11 integrate .. //depot/projects/arm/src/sys/conf/options#23 integrate .. //depot/projects/arm/src/sys/dev/ata/ata-all.h#13 integrate .. //depot/projects/arm/src/sys/dev/ata/ata-chipset.c#18 integrate .. //depot/projects/arm/src/sys/dev/ata/atapi-cd.c#6 integrate .. //depot/projects/arm/src/sys/dev/bge/if_bge.c#17 integrate .. //depot/projects/arm/src/sys/dev/bge/if_bgereg.h#12 integrate .. //depot/projects/arm/src/sys/dev/bktr/CHANGELOG.TXT#2 integrate .. //depot/projects/arm/src/sys/dev/mfi/mfi.c#6 integrate .. //depot/projects/arm/src/sys/dev/mii/acphy.c#3 integrate .. //depot/projects/arm/src/sys/dev/mii/amphy.c#3 integrate .. //depot/projects/arm/src/sys/dev/mii/bmtphy.c#2 integrate .. //depot/projects/arm/src/sys/dev/mii/brgphy.c#7 integrate .. //depot/projects/arm/src/sys/dev/mii/ciphy.c#4 integrate .. //depot/projects/arm/src/sys/dev/mii/e1000phy.c#3 integrate .. //depot/projects/arm/src/sys/dev/mii/exphy.c#3 integrate .. //depot/projects/arm/src/sys/dev/mii/inphy.c#2 integrate .. //depot/projects/arm/src/sys/dev/mii/lxtphy.c#3 integrate .. //depot/projects/arm/src/sys/dev/mii/mlphy.c#2 integrate .. //depot/projects/arm/src/sys/dev/mii/nsgphy.c#4 integrate .. //depot/projects/arm/src/sys/dev/mii/nsphy.c#3 integrate .. //depot/projects/arm/src/sys/dev/mii/pnaphy.c#3 integrate .. //depot/projects/arm/src/sys/dev/mii/qsphy.c#3 integrate .. //depot/projects/arm/src/sys/dev/mii/rgephy.c#5 integrate .. //depot/projects/arm/src/sys/dev/mii/rlphy.c#3 integrate .. //depot/projects/arm/src/sys/dev/mii/ruephy.c#2 integrate .. //depot/projects/arm/src/sys/dev/mii/tdkphy.c#4 integrate .. //depot/projects/arm/src/sys/dev/mii/tlphy.c#3 integrate .. //depot/projects/arm/src/sys/dev/mii/ukphy.c#3 integrate .. //depot/projects/arm/src/sys/dev/mii/xmphy.c#3 integrate .. //depot/projects/arm/src/sys/dev/nfe/if_nfe.c#2 integrate .. //depot/projects/arm/src/sys/dev/nfe/if_nfereg.h#2 integrate .. //depot/projects/arm/src/sys/dev/nfe/if_nfevar.h#2 integrate .. //depot/projects/arm/src/sys/dev/puc/puc.c#8 integrate .. //depot/projects/arm/src/sys/dev/puc/puc_cfg.c#2 integrate .. //depot/projects/arm/src/sys/dev/puc/puc_pccard.c#3 integrate .. //depot/projects/arm/src/sys/dev/puc/puc_pci.c#5 integrate .. //depot/projects/arm/src/sys/dev/puc/pucdata.c#6 integrate .. //depot/projects/arm/src/sys/dev/re/if_re.c#13 integrate .. //depot/projects/arm/src/sys/dev/sio/sio.c#6 integrate .. //depot/projects/arm/src/sys/dev/usb/if_ural.c#11 integrate .. //depot/projects/arm/src/sys/dev/usb/uplcom.c#7 integrate .. //depot/projects/arm/src/sys/dev/usb/usbdevs#17 integrate .. //depot/projects/arm/src/sys/fs/pseudofs/pseudofs_vnops.c#5 integrate .. //depot/projects/arm/src/sys/i386/conf/NOTES#15 integrate .. //depot/projects/arm/src/sys/i386/conf/XBOX#6 integrate .. //depot/projects/arm/src/sys/i386/i386/pmap.c#14 integrate .. //depot/projects/arm/src/sys/i386/linux/linux_proto.h#10 integrate .. //depot/projects/arm/src/sys/i386/linux/linux_syscall.h#10 integrate .. //depot/projects/arm/src/sys/i386/linux/linux_sysent.c#10 integrate .. //depot/projects/arm/src/sys/i386/linux/syscalls.master#10 integrate .. //depot/projects/arm/src/sys/ia64/ia64/emulate.c#1 branch .. //depot/projects/arm/src/sys/ia64/ia64/pmap.c#8 integrate .. //depot/projects/arm/src/sys/ia64/ia64/trap.c#5 integrate .. //depot/projects/arm/src/sys/ia64/include/md_var.h#3 integrate .. //depot/projects/arm/src/sys/kern/kern_descrip.c#10 integrate .. //depot/projects/arm/src/sys/kern/kern_fork.c#8 integrate .. //depot/projects/arm/src/sys/kern/kern_ktrace.c#6 integrate .. //depot/projects/arm/src/sys/kern/kern_module.c#5 integrate .. //depot/projects/arm/src/sys/kern/kern_thread.c#10 integrate .. //depot/projects/arm/src/sys/kern/sched_4bsd.c#8 integrate .. //depot/projects/arm/src/sys/kern/sched_core.c#3 integrate .. //depot/projects/arm/src/sys/kern/subr_firmware.c#5 integrate .. //depot/projects/arm/src/sys/kern/syscalls.master#13 integrate .. //depot/projects/arm/src/sys/kern/sysv_sem.c#4 integrate .. //depot/projects/arm/src/sys/kern/uipc_usrreq.c#12 integrate .. //depot/projects/arm/src/sys/kern/vfs_init.c#4 integrate .. //depot/projects/arm/src/sys/kern/vfs_mount.c#18 integrate .. //depot/projects/arm/src/sys/kern/vfs_subr.c#19 integrate .. //depot/projects/arm/src/sys/modules/Makefile#23 integrate .. //depot/projects/arm/src/sys/modules/bktr/bktr_mem/Makefile#2 integrate .. //depot/projects/arm/src/sys/modules/netgraph/Makefile#4 integrate .. //depot/projects/arm/src/sys/modules/netgraph/tag/Makefile#1 branch .. //depot/projects/arm/src/sys/modules/nfe/Makefile#1 branch .. //depot/projects/arm/src/sys/modules/streams/Makefile#2 integrate .. //depot/projects/arm/src/sys/modules/svr4/Makefile#4 integrate .. //depot/projects/arm/src/sys/net/if.c#12 integrate .. //depot/projects/arm/src/sys/net/if_atmsubr.c#3 integrate .. //depot/projects/arm/src/sys/net/if_enc.c#1 branch .. //depot/projects/arm/src/sys/net/if_gif.c#6 integrate .. //depot/projects/arm/src/sys/net/if_stf.c#5 integrate .. //depot/projects/arm/src/sys/net/if_tun.c#4 integrate .. //depot/projects/arm/src/sys/net/if_types.h#4 integrate .. //depot/projects/arm/src/sys/net/if_vlan.c#11 integrate .. //depot/projects/arm/src/sys/netgraph/ng_tag.c#1 branch .. //depot/projects/arm/src/sys/netgraph/ng_tag.h#1 branch .. //depot/projects/arm/src/sys/netinet/if_ether.c#11 integrate .. //depot/projects/arm/src/sys/netinet/in_pcb.c#10 integrate .. //depot/projects/arm/src/sys/netinet/ip_divert.c#5 integrate .. //depot/projects/arm/src/sys/netinet/ip_fw2.c#15 integrate .. //depot/projects/arm/src/sys/netinet/ip_output.c#11 integrate .. //depot/projects/arm/src/sys/netinet/tcp_input.c#14 integrate .. //depot/projects/arm/src/sys/netinet6/in6.c#6 integrate .. //depot/projects/arm/src/sys/netinet6/in6_cksum.c#4 integrate .. //depot/projects/arm/src/sys/netinet6/in6_pcb.c#8 integrate .. //depot/projects/arm/src/sys/netinet6/in6_var.h#4 integrate .. //depot/projects/arm/src/sys/netinet6/ipsec.c#6 integrate .. //depot/projects/arm/src/sys/netipsec/ipsec.h#4 integrate .. //depot/projects/arm/src/sys/netipsec/ipsec_input.c#3 integrate .. //depot/projects/arm/src/sys/netipsec/ipsec_osdep.h#2 integrate .. //depot/projects/arm/src/sys/netipsec/ipsec_output.c#3 integrate .. //depot/projects/arm/src/sys/netipsec/xform_ipip.c#3 integrate .. //depot/projects/arm/src/sys/nfsclient/bootp_subr.c#3 integrate .. //depot/projects/arm/src/sys/nfsclient/nfs_diskless.c#5 integrate .. //depot/projects/arm/src/sys/pci/agp_i810.c#8 integrate .. //depot/projects/arm/src/sys/pci/if_rlreg.h#6 integrate .. //depot/projects/arm/src/sys/powerpc/powerpc/mmu_oea.c#5 integrate .. //depot/projects/arm/src/sys/sys/syscallsubr.h#7 integrate .. //depot/projects/arm/src/sys/vm/vm_page.c#12 integrate Differences ... ==== //depot/projects/arm/src/sys/amd64/amd64/pmap.c#17 (text+ko) ==== @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.559 2006/06/25 22:22:37 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.563 2006/07/02 18:22:46 alc Exp $"); /* * Manages physical address maps. @@ -490,8 +490,7 @@ * (physical) address starting relative to 0] */ void -pmap_bootstrap(firstaddr) - vm_paddr_t *firstaddr; +pmap_bootstrap(vm_paddr_t *firstaddr) { vm_offset_t va; pt_entry_t *pte, *unused; @@ -1132,8 +1131,7 @@ } void -pmap_pinit0(pmap) - struct pmap *pmap; +pmap_pinit0(pmap_t pmap) { PMAP_LOCK_INIT(pmap); @@ -1148,8 +1146,7 @@ * such as one in a vmspace structure. */ void -pmap_pinit(pmap) - register struct pmap *pmap; +pmap_pinit(pmap_t pmap) { vm_page_t pml4pg; static vm_pindex_t color; @@ -1611,9 +1608,9 @@ vm_page_flag_clear(m, PG_WRITEABLE); m->md.pv_list_count--; pmap_unuse_pt(pmap, va, ptepde); + free_pv_entry(pmap, pv); if (pmap != locked_pmap) PMAP_UNLOCK(pmap); - free_pv_entry(locked_pmap, pv); } } } @@ -1979,7 +1976,7 @@ void pmap_remove_all(vm_page_t m) { - register pv_entry_t pv; + pv_entry_t pv; pmap_t pmap; pt_entry_t *pte, tpte; pd_entry_t ptepde; @@ -2145,7 +2142,7 @@ { vm_paddr_t pa; pd_entry_t *pde; - register pt_entry_t *pte; + pt_entry_t *pte; vm_paddr_t opa; pt_entry_t origpte, newpte; vm_page_t mpte, om; @@ -2582,12 +2579,9 @@ * The mapping must already exist in the pmap. */ void -pmap_change_wiring(pmap, va, wired) - register pmap_t pmap; - vm_offset_t va; - boolean_t wired; +pmap_change_wiring(pmap_t pmap, vm_offset_t va, boolean_t wired) { - register pt_entry_t *pte; + pt_entry_t *pte; /* * Wiring is not a hardware characteristic so there is no need to @@ -2674,7 +2668,7 @@ PHYS_TO_DMAP(VM_PAGE_TO_PHYS(dstmpde)); pde = &pde[pmap_pde_index(addr)]; if (*pde == 0) { - *pde = srcptepaddr; + *pde = srcptepaddr & ~PG_W; dst_pmap->pm_stats.resident_count += NBPDR / PAGE_SIZE; } else @@ -2708,11 +2702,12 @@ pmap_try_insert_pv_entry(dst_pmap, addr, PHYS_TO_VM_PAGE(ptetemp & PG_FRAME))) { /* - * Clear the modified and + * Clear the wired, modified, and * accessed (referenced) bits * during the copy. */ - *dst_pte = ptetemp & ~(PG_M | PG_A); + *dst_pte = ptetemp & ~(PG_W | PG_M | + PG_A); dst_pmap->pm_stats.resident_count++; } else pmap_unwire_pte_hold(dst_pmap, addr, @@ -2795,9 +2790,7 @@ * subset of pmaps for proper page aging. */ boolean_t -pmap_page_exists_quick(pmap, m) - pmap_t pmap; - vm_page_t m; +pmap_page_exists_quick(pmap_t pmap, vm_page_t m) { pv_entry_t pv; int loops = 0; @@ -2981,7 +2974,7 @@ static __inline void pmap_clear_ptes(vm_page_t m, long bit) { - register pv_entry_t pv; + pv_entry_t pv; pmap_t pmap; pt_entry_t pbits, *pte; @@ -3051,35 +3044,26 @@ int pmap_ts_referenced(vm_page_t m) { - register pv_entry_t pv, pvf, pvn; + pv_entry_t pv, pvf, pvn; pmap_t pmap; pt_entry_t *pte; - pt_entry_t v; int rtval = 0; if (m->flags & PG_FICTITIOUS) return (rtval); - mtx_assert(&vm_page_queue_mtx, MA_OWNED); if ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { - pvf = pv; - do { pvn = TAILQ_NEXT(pv, pv_list); - TAILQ_REMOVE(&m->md.pv_list, pv, pv_list); - TAILQ_INSERT_TAIL(&m->md.pv_list, pv, pv_list); - pmap = PV_PMAP(pv); PMAP_LOCK(pmap); pte = pmap_pte(pmap, pv->pv_va); - - if (pte && ((v = pte_load(pte)) & PG_A) != 0) { + if (pte != NULL && (*pte & PG_A) != 0) { atomic_clear_long(pte, PG_A); pmap_invalidate_page(pmap, pv->pv_va); - rtval++; if (rtval > 4) { PMAP_UNLOCK(pmap); @@ -3089,7 +3073,6 @@ PMAP_UNLOCK(pmap); } while ((pv = pvn) != NULL && pv != pvf); } - return (rtval); } @@ -3124,9 +3107,7 @@ * NOT real memory. */ void * -pmap_mapdev(pa, size) - vm_paddr_t pa; - vm_size_t size; +pmap_mapdev(vm_paddr_t pa, vm_size_t size) { vm_offset_t va, tmpva, offset; @@ -3150,9 +3131,7 @@ } void -pmap_unmapdev(va, size) - vm_offset_t va; - vm_size_t size; +pmap_unmapdev(vm_offset_t va, vm_size_t size) { vm_offset_t base, offset, tmpva; @@ -3172,9 +3151,7 @@ * perform the pmap work for mincore */ int -pmap_mincore(pmap, addr) - pmap_t pmap; - vm_offset_t addr; +pmap_mincore(pmap_t pmap, vm_offset_t addr) { pt_entry_t *ptep, pte; vm_page_t m; ==== //depot/projects/arm/src/sys/amd64/conf/NOTES#9 (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.56 2006/06/12 20:38:17 jhb Exp $ +# $FreeBSD: src/sys/amd64/conf/NOTES,v 1.57 2006/06/26 23:41:06 obrien Exp $ # # @@ -223,6 +223,7 @@ # (requires miibus) # ipw: Intel PRO/Wireless 2100 IEEE 802.11 adapter # iwi: Intel PRO/Wireless 2200BG/2225BG/2915ABG IEEE 802.11 adapters +# nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source) # nve: nVidia nForce MCP on-board Ethernet Networking # ral: Ralink Technology IEEE 802.11 wireless adapter # ural: Ralink Technology RT2500USB IEEE 802.11 wireless adapter @@ -233,6 +234,7 @@ options ED_SIC device iwi device ipw +device nfe # nVidia nForce MCP on-board Ethernet Networking device nve # nVidia nForce MCP on-board Ethernet Networking device ral device ural ==== //depot/projects/arm/src/sys/amd64/linux32/linux32_proto.h#9 (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.14 2006/06/26 18:37:35 jhb Exp $ - * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.12 2006/06/26 18:36:16 jhb Exp + * $FreeBSD: src/sys/amd64/linux32/linux32_proto.h,v 1.16 2006/06/27 18:32:16 jhb Exp $ + * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.14 2006/06/27 18:28:49 jhb Exp */ #ifndef _LINUX_SYSPROTO_H_ ==== //depot/projects/arm/src/sys/amd64/linux32/linux32_syscall.h#9 (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.14 2006/06/26 18:37:35 jhb Exp $ - * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.12 2006/06/26 18:36:16 jhb Exp + * $FreeBSD: src/sys/amd64/linux32/linux32_syscall.h,v 1.16 2006/06/27 18:32:16 jhb Exp $ + * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.14 2006/06/27 18:28:49 jhb Exp */ #define LINUX_SYS_exit 1 ==== //depot/projects/arm/src/sys/amd64/linux32/linux32_sysent.c#9 (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.14 2006/06/26 18:37:35 jhb Exp $ - * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.12 2006/06/26 18:36:16 jhb Exp + * $FreeBSD: src/sys/amd64/linux32/linux32_sysent.c,v 1.16 2006/06/27 18:32:16 jhb Exp $ + * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.14 2006/06/27 18:28:49 jhb Exp */ #include <bsm/audit_kevents.h> @@ -41,8 +41,8 @@ { SYF_MPSAFE | AS(linux_stat_args), (sy_call_t *)linux_stat, AUE_STAT }, /* 18 = linux_stat */ { SYF_MPSAFE | AS(linux_lseek_args), (sy_call_t *)linux_lseek, AUE_LSEEK }, /* 19 = linux_lseek */ { SYF_MPSAFE | 0, (sy_call_t *)linux_getpid, AUE_GETPID }, /* 20 = linux_getpid */ - { AS(linux_mount_args), (sy_call_t *)linux_mount, AUE_MOUNT }, /* 21 = linux_mount */ - { AS(linux_oldumount_args), (sy_call_t *)linux_oldumount, AUE_UMOUNT }, /* 22 = linux_oldumount */ + { SYF_MPSAFE | AS(linux_mount_args), (sy_call_t *)linux_mount, AUE_MOUNT }, /* 21 = linux_mount */ + { SYF_MPSAFE | AS(linux_oldumount_args), (sy_call_t *)linux_oldumount, AUE_UMOUNT }, /* 22 = linux_oldumount */ { SYF_MPSAFE | AS(linux_setuid16_args), (sy_call_t *)linux_setuid16, AUE_SETUID }, /* 23 = linux_setuid16 */ { SYF_MPSAFE | 0, (sy_call_t *)linux_getuid16, AUE_GETUID }, /* 24 = linux_getuid16 */ { SYF_MPSAFE | 0, (sy_call_t *)linux_stime, AUE_SETTIMEOFDAY }, /* 25 = linux_stime */ @@ -72,7 +72,7 @@ { SYF_MPSAFE | 0, (sy_call_t *)linux_geteuid16, AUE_GETEUID }, /* 49 = linux_geteuid16 */ { SYF_MPSAFE | 0, (sy_call_t *)linux_getegid16, AUE_GETEGID }, /* 50 = linux_getegid16 */ { SYF_MPSAFE | AS(acct_args), (sy_call_t *)acct, AUE_ACCT }, /* 51 = acct */ - { AS(linux_umount_args), (sy_call_t *)linux_umount, AUE_UMOUNT }, /* 52 = linux_umount */ + { SYF_MPSAFE | AS(linux_umount_args), (sy_call_t *)linux_umount, AUE_UMOUNT }, /* 52 = linux_umount */ { 0, (sy_call_t *)nosys, AUE_NULL }, /* 53 = lock */ { AS(linux_ioctl_args), (sy_call_t *)linux_ioctl, AUE_IOCTL }, /* 54 = linux_ioctl */ { SYF_MPSAFE | AS(linux_fcntl_args), (sy_call_t *)linux_fcntl, AUE_FCNTL }, /* 55 = linux_fcntl */ @@ -137,7 +137,7 @@ { SYF_MPSAFE | AS(linux_wait4_args), (sy_call_t *)linux_wait4, AUE_WAIT4 }, /* 114 = linux_wait4 */ { SYF_MPSAFE | 0, (sy_call_t *)linux_swapoff, AUE_SWAPOFF }, /* 115 = linux_swapoff */ { SYF_MPSAFE | AS(linux_sysinfo_args), (sy_call_t *)linux_sysinfo, AUE_NULL }, /* 116 = linux_sysinfo */ - { AS(linux_ipc_args), (sy_call_t *)linux_ipc, AUE_NULL }, /* 117 = linux_ipc */ + { SYF_MPSAFE | AS(linux_ipc_args), (sy_call_t *)linux_ipc, AUE_NULL }, /* 117 = linux_ipc */ { SYF_MPSAFE | AS(fsync_args), (sy_call_t *)fsync, AUE_FSYNC }, /* 118 = fsync */ { SYF_MPSAFE | AS(linux_sigreturn_args), (sy_call_t *)linux_sigreturn, AUE_SIGRETURN }, /* 119 = linux_sigreturn */ { SYF_MPSAFE | AS(linux_clone_args), (sy_call_t *)linux_clone, AUE_RFORK }, /* 120 = linux_clone */ ==== //depot/projects/arm/src/sys/amd64/linux32/syscalls.master#9 (text+ko) ==== @@ -1,4 +1,4 @@ - $FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.12 2006/06/26 18:36:16 jhb Exp $ + $FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.14 2006/06/27 18:28:49 jhb Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 ; System call name/number master file (or rather, slave, from LINUX). @@ -75,10 +75,10 @@ 19 AUE_LSEEK MSTD { int linux_lseek(l_uint fdes, l_off_t off, \ l_int whence); } 20 AUE_GETPID MSTD { int linux_getpid(void); } -21 AUE_MOUNT STD { int linux_mount(char *specialfile, \ +21 AUE_MOUNT MSTD { int linux_mount(char *specialfile, \ char *dir, char *filesystemtype, \ l_ulong rwflag, void *data); } -22 AUE_UMOUNT STD { int linux_oldumount(char *path); } +22 AUE_UMOUNT MSTD { int linux_oldumount(char *path); } 23 AUE_SETUID MSTD { int linux_setuid16(l_uid16_t uid); } 24 AUE_GETUID MSTD { int linux_getuid16(void); } 25 AUE_SETTIMEOFDAY MSTD { int linux_stime(void); } @@ -111,7 +111,7 @@ 49 AUE_GETEUID MSTD { int linux_geteuid16(void); } 50 AUE_GETEGID MSTD { int linux_getegid16(void); } 51 AUE_ACCT MNOPROTO { int acct(char *path); } -52 AUE_UMOUNT STD { int linux_umount(char *path, l_int flags); } +52 AUE_UMOUNT MSTD { int linux_umount(char *path, l_int flags); } 53 AUE_NULL UNIMPL lock 54 AUE_IOCTL STD { int linux_ioctl(l_uint fd, l_uint cmd, \ uintptr_t arg); } @@ -212,7 +212,7 @@ struct l_rusage *rusage); } 115 AUE_SWAPOFF MSTD { int linux_swapoff(void); } 116 AUE_NULL MSTD { int linux_sysinfo(struct l_sysinfo *info); } -117 AUE_NULL STD { int linux_ipc(l_uint what, l_int arg1, \ +117 AUE_NULL MSTD { int linux_ipc(l_uint what, l_int arg1, \ l_int arg2, l_int arg3, void *ptr, \ l_long arg5); } 118 AUE_FSYNC MNOPROTO { int fsync(int fd); } ==== //depot/projects/arm/src/sys/arm/at91/at91_pio.c#13 (text+ko) ==== @@ -23,7 +23,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/at91/at91_pio.c,v 1.1 2006/03/24 07:39:29 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/at91/at91_pio.c,v 1.2 2006/07/02 03:50:44 imp Exp $"); #include <sys/param.h> #include <sys/systm.h> ==== //depot/projects/arm/src/sys/arm/at91/uart_dev_at91usart.c#33 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/arm/at91/uart_dev_at91usart.c,v 1.6 2006/05/13 23:41:16 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/at91/uart_dev_at91usart.c,v 1.7 2006/07/02 03:45:33 imp Exp $"); #include <sys/param.h> #include <sys/systm.h> ==== //depot/projects/arm/src/sys/compat/freebsd32/freebsd32_proto.h#11 (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.55 2006/06/26 18:37:36 jhb Exp $ - * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.66 2006/06/26 18:35:57 jhb Exp + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.56 2006/06/27 14:47:07 jhb Exp $ + * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.67 2006/06/27 14:46:30 jhb Exp */ #ifndef _FREEBSD32_SYSPROTO_H_ ==== //depot/projects/arm/src/sys/compat/freebsd32/freebsd32_syscall.h#11 (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.53 2006/06/26 18:37:36 jhb Exp $ - * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.66 2006/06/26 18:35:57 jhb Exp + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.54 2006/06/27 14:47:07 jhb Exp $ + * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.67 2006/06/27 14:46:30 jhb Exp */ #define FREEBSD32_SYS_syscall 0 ==== //depot/projects/arm/src/sys/compat/freebsd32/freebsd32_syscalls.c#11 (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.44 2006/06/26 18:37:36 jhb Exp $ - * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.66 2006/06/26 18:35:57 jhb Exp + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.45 2006/06/27 14:47:08 jhb Exp $ + * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.67 2006/06/27 14:46:30 jhb Exp */ const char *freebsd32_syscallnames[] = { ==== //depot/projects/arm/src/sys/compat/freebsd32/freebsd32_sysent.c#11 (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.54 2006/06/26 18:37:36 jhb Exp $ - * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.66 2006/06/26 18:35:57 jhb Exp + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.55 2006/06/27 14:47:08 jhb Exp $ + * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.67 2006/06/27 14:46:30 jhb Exp */ #include "opt_compat.h" @@ -53,8 +53,8 @@ { compat4(SYF_MPSAFE | AS(freebsd4_freebsd32_getfsstat_args),freebsd32_getfsstat), AUE_GETFSSTAT }, /* 18 = old freebsd32_getfsstat */ { 0, (sy_call_t *)nosys, AUE_NULL }, /* 19 = obsolete olseek */ { SYF_MPSAFE | 0, (sy_call_t *)getpid, AUE_GETPID }, /* 20 = getpid */ - { AS(mount_args), (sy_call_t *)mount, AUE_MOUNT }, /* 21 = mount */ - { AS(unmount_args), (sy_call_t *)unmount, AUE_UMOUNT }, /* 22 = unmount */ + { SYF_MPSAFE | AS(mount_args), (sy_call_t *)mount, AUE_MOUNT }, /* 21 = mount */ + { SYF_MPSAFE | AS(unmount_args), (sy_call_t *)unmount, AUE_UMOUNT }, /* 22 = unmount */ { SYF_MPSAFE | AS(setuid_args), (sy_call_t *)setuid, AUE_SETUID }, /* 23 = setuid */ { SYF_MPSAFE | 0, (sy_call_t *)getuid, AUE_GETUID }, /* 24 = getuid */ { SYF_MPSAFE | 0, (sy_call_t *)geteuid, AUE_GETEUID }, /* 25 = geteuid */ @@ -410,7 +410,7 @@ { 0, (sy_call_t *)nosys, AUE_NULL }, /* 375 = nfsclnt */ { SYF_MPSAFE | AS(eaccess_args), (sy_call_t *)eaccess, AUE_NULL }, /* 376 = eaccess */ { 0, (sy_call_t *)nosys, AUE_NULL }, /* 377 = afs_syscall */ - { AS(nmount_args), (sy_call_t *)nmount, AUE_NULL }, /* 378 = nmount */ + { SYF_MPSAFE | AS(nmount_args), (sy_call_t *)nmount, AUE_NULL }, /* 378 = nmount */ { SYF_MPSAFE | 0, (sy_call_t *)kse_exit, AUE_NULL }, /* 379 = kse_exit */ { SYF_MPSAFE | AS(kse_wakeup_args), (sy_call_t *)kse_wakeup, AUE_NULL }, /* 380 = kse_wakeup */ { SYF_MPSAFE | AS(kse_create_args), (sy_call_t *)kse_create, AUE_NULL }, /* 381 = kse_create */ ==== //depot/projects/arm/src/sys/compat/freebsd32/syscalls.master#11 (text+ko) ==== @@ -1,4 +1,4 @@ - $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.66 2006/06/26 18:35:57 jhb Exp $ + $FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.67 2006/06/27 14:46:30 jhb Exp $ ; from: @(#)syscalls.master 8.2 (Berkeley) 1/13/94 ; from: src/sys/kern/syscalls.master 1.107 ; @@ -79,9 +79,9 @@ int flags); } 19 AUE_LSEEK OBSOL olseek 20 AUE_GETPID MNOPROTO { pid_t getpid(void); } -21 AUE_MOUNT NOPROTO { int mount(char *type, char *path, \ +21 AUE_MOUNT MNOPROTO { int mount(char *type, char *path, \ int flags, caddr_t data); } -22 AUE_UMOUNT NOPROTO { int unmount(char *path, int flags); } +22 AUE_UMOUNT MNOPROTO { int unmount(char *path, int flags); } 23 AUE_SETUID MNOPROTO { int setuid(uid_t uid); } 24 AUE_GETUID MNOPROTO { uid_t getuid(void); } 25 AUE_GETEUID MNOPROTO { uid_t geteuid(void); } @@ -644,7 +644,7 @@ 375 AUE_NULL UNIMPL nfsclnt 376 AUE_NULL MNOPROTO { int eaccess(char *path, int flags); } 377 AUE_NULL UNIMPL afs_syscall -378 AUE_NULL NOPROTO { int nmount(struct iovec *iovp, \ +378 AUE_NULL MNOPROTO { int nmount(struct iovec *iovp, \ unsigned int iovcnt, int flags); } 379 AUE_NULL MNOPROTO { int kse_exit(void); } 380 AUE_NULL MNOPROTO { int kse_wakeup(struct kse_mailbox *mbx); } ==== //depot/projects/arm/src/sys/compat/linprocfs/linprocfs.c#8 (text+ko) ==== @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.95 2006/06/12 18:14:49 des Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.96 2006/06/27 20:11:58 netchild Exp $"); #include <sys/param.h> #include <sys/queue.h> @@ -63,6 +63,7 @@ #include <sys/socket.h> #include <sys/sysctl.h> #include <sys/systm.h> +#include <sys/time.h> #include <sys/tty.h> #include <sys/user.h> #include <sys/vmmeter.h> @@ -106,6 +107,22 @@ #define P2B(x) ((x) << PAGE_SHIFT) /* pages to bytes */ #define P2K(x) ((x) << (PAGE_SHIFT - 10)) /* pages to kbytes */ +/** + * @brief Mapping of ki_stat in struct kinfo_proc to the linux state + * + * The linux procfs state field displays one of the characters RSDZTW to + * denote running, sleeping in an interruptible wait, waiting in an + * uninteruptible disk sleep, a zombie process, process is being traced + * or stopped, or process is paging respectively. + * + * Our struct kinfo_proc contains the variable ki_stat which contains a + * value out of SIDL, SRUN, SSLEEP, SSTOP, SZOMB, SWAIT and SLOCK. + * + * This character array is used with ki_stati-1 as an index and tries to + * map our states to suitable linux states. + */ +static char *linux_state = "RRSTZDD"; + /* * Filler function for proc/meminfo */ @@ -451,44 +468,51 @@ sbuf_printf(sb, "%d", p->p_pid); #define PS_ADD(name, fmt, arg) sbuf_printf(sb, " " fmt, arg) PS_ADD("comm", "(%s)", p->p_comm); - PS_ADD("statr", "%c", '0'); /* XXX */ + KASSERT(kp.ki_stat <= sizeof(linux_state), + ("linprocfs: don't know how to handle unknown FreeBSD state")); + PS_ADD("state", "%c", linux_state[kp.ki_stat - 1]); PS_ADD("ppid", "%d", p->p_pptr ? p->p_pptr->p_pid : 0); PS_ADD("pgrp", "%d", p->p_pgid); PS_ADD("session", "%d", p->p_session->s_sid); PROC_UNLOCK(p); PS_ADD("tty", "%d", 0); /* XXX */ - PS_ADD("tpgid", "%d", 0); /* XXX */ + PS_ADD("tpgid", "%d", kp.ki_tpgid); PS_ADD("flags", "%u", 0); /* XXX */ - PS_ADD("minflt", "%u", 0); /* XXX */ - PS_ADD("cminflt", "%u", 0); /* XXX */ - PS_ADD("majflt", "%u", 0); /* XXX */ - PS_ADD("cminflt", "%u", 0); /* XXX */ - PS_ADD("utime", "%d", 0); /* XXX */ - PS_ADD("stime", "%d", 0); /* XXX */ - PS_ADD("cutime", "%d", 0); /* XXX */ - PS_ADD("cstime", "%d", 0); /* XXX */ - PS_ADD("counter", "%d", 0); /* XXX */ - PS_ADD("priority", "%d", 0); /* XXX */ - PS_ADD("timeout", "%u", 0); /* XXX */ - PS_ADD("itrealvalue", "%u", 0); /* XXX */ - PS_ADD("starttime", "%d", 0); /* XXX */ - PS_ADD("vsize", "%ju", (uintmax_t)kp.ki_size); - PS_ADD("rss", "%ju", P2K((uintmax_t)kp.ki_rssize)); - PS_ADD("rlim", "%u", 0); /* XXX */ + PS_ADD("minflt", "%lu", kp.ki_rusage.ru_minflt); + PS_ADD("cminflt", "%lu", kp.ki_rusage_ch.ru_minflt); + PS_ADD("majflt", "%lu", kp.ki_rusage.ru_majflt); + PS_ADD("cmajflt", "%lu", kp.ki_rusage_ch.ru_majflt); + PS_ADD("utime", "%ld", T2J(tvtohz(&kp.ki_rusage.ru_utime))); + PS_ADD("stime", "%ld", T2J(tvtohz(&kp.ki_rusage.ru_stime))); + PS_ADD("cutime", "%ld", T2J(tvtohz(&kp.ki_rusage_ch.ru_utime))); + PS_ADD("cstime", "%ld", T2J(tvtohz(&kp.ki_rusage_ch.ru_stime))); + PS_ADD("priority", "%d", kp.ki_pri.pri_user); + PS_ADD("nice", "%d", kp.ki_nice); /* 19 (nicest) to -19 */ + PS_ADD("0", "%d", 0); /* removed field */ + PS_ADD("itrealvalue", "%d", 0); /* XXX */ + /* XXX: starttime is not right, it is the _same_ for _every_ process. + It should be the number of jiffies between system boot and process + start. */ + PS_ADD("starttime", "%lu", T2J(tvtohz(&kp.ki_start))); + PS_ADD("vsize", "%ju", P2K((uintmax_t)kp.ki_size)); + PS_ADD("rss", "%ju", (uintmax_t)kp.ki_rssize); + PS_ADD("rlim", "%lu", kp.ki_rusage.ru_maxrss); PS_ADD("startcode", "%u", (unsigned)0); PS_ADD("endcode", "%u", 0); /* XXX */ PS_ADD("startstack", "%u", 0); /* XXX */ - PS_ADD("esp", "%u", 0); /* XXX */ - PS_ADD("eip", "%u", 0); /* XXX */ - PS_ADD("signal", "%d", 0); /* XXX */ - PS_ADD("blocked", "%d", 0); /* XXX */ - PS_ADD("sigignore", "%d", 0); /* XXX */ - PS_ADD("sigcatch", "%d", 0); /* XXX */ + PS_ADD("kstkesp", "%u", 0); /* XXX */ + PS_ADD("kstkeip", "%u", 0); /* XXX */ + PS_ADD("signal", "%u", 0); /* XXX */ + PS_ADD("blocked", "%u", 0); /* XXX */ + PS_ADD("sigignore", "%u", 0); /* XXX */ + PS_ADD("sigcatch", "%u", 0); /* XXX */ PS_ADD("wchan", "%u", 0); /* XXX */ - PS_ADD("nswap", "%lu", (long unsigned)0); /* XXX */ - PS_ADD("cnswap", "%lu", (long unsigned)0); /* XXX */ + PS_ADD("nswap", "%lu", kp.ki_rusage.ru_nswap); + PS_ADD("cnswap", "%lu", kp.ki_rusage_ch.ru_nswap); PS_ADD("exitsignal", "%d", 0); /* XXX */ - PS_ADD("processor", "%d", 0); /* XXX */ + PS_ADD("processor", "%u", kp.ki_lastcpu); + PS_ADD("rt_priority", "%u", 0); /* XXX */ /* >= 2.5.19 */ + PS_ADD("policy", "%u", kp.ki_pri.pri_class); /* >= 2.5.19 */ #undef PS_ADD sbuf_putc(sb, '\n'); ==== //depot/projects/arm/src/sys/compat/linux/linux_ipc.c#4 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_ipc.c,v 1.46 2006/03/19 11:10:33 ru Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_ipc.c,v 1.47 2006/06/27 18:28:49 jhb Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -491,69 +491,56 @@ linux_semctl(struct thread *td, struct linux_semctl_args *args) { struct l_semid_ds linux_semid; - struct __semctl_args /* { - int semid; - int semnum; - int cmd; - union semun *arg; - } */ bsd_args; struct l_seminfo linux_seminfo; - int error; - union semun *unptr; - caddr_t sg; - - sg = stackgap_init(); + struct semid_ds semid; + union semun semun; + int cmd, error; - /* Make sure the arg parameter can be copied in. */ - unptr = stackgap_alloc(&sg, sizeof(union semun)); - bcopy(&args->arg, unptr, sizeof(union semun)); - - bsd_args.semid = args->semid; - bsd_args.semnum = args->semnum; - bsd_args.arg = unptr; - switch (args->cmd & ~LINUX_IPC_64) { case LINUX_IPC_RMID: - bsd_args.cmd = IPC_RMID; + cmd = IPC_RMID; break; case LINUX_GETNCNT: - bsd_args.cmd = GETNCNT; + cmd = GETNCNT; break; case LINUX_GETPID: - bsd_args.cmd = GETPID; + cmd = GETPID; break; case LINUX_GETVAL: - bsd_args.cmd = GETVAL; + cmd = GETVAL; break; case LINUX_GETZCNT: - bsd_args.cmd = GETZCNT; + cmd = GETZCNT; break; case LINUX_SETVAL: - bsd_args.cmd = SETVAL; + cmd = SETVAL; + semun.val = args->arg.val; break; case LINUX_IPC_SET: - bsd_args.cmd = IPC_SET; + cmd = IPC_SET; error = linux_semid_pullup(args->cmd & LINUX_IPC_64, &linux_semid, (caddr_t)PTRIN(args->arg.buf)); if (error) return (error); - unptr->buf = stackgap_alloc(&sg, sizeof(struct semid_ds)); - linux_to_bsd_semid_ds(&linux_semid, unptr->buf); - return __semctl(td, &bsd_args); + linux_to_bsd_semid_ds(&linux_semid, &semid); + semun.buf = &semid; + return kern_semctl(td, args->semid, args->semnum, cmd, &semun, + UIO_SYSSPACE); case LINUX_IPC_STAT: case LINUX_SEM_STAT: if((args->cmd & ~LINUX_IPC_64) == LINUX_IPC_STAT) - bsd_args.cmd = IPC_STAT; + cmd = IPC_STAT; else - bsd_args.cmd = SEM_STAT; - unptr->buf = stackgap_alloc(&sg, sizeof(struct semid_ds)); - error = __semctl(td, &bsd_args); + cmd = SEM_STAT; + semun.buf = &semid; + error = kern_semctl(td, args->semid, args->semnum, cmd, &semun, + UIO_SYSSPACE); if (error) - return error; - td->td_retval[0] = (bsd_args.cmd == SEM_STAT) ? - IXSEQ_TO_IPCID(bsd_args.semid, unptr->buf->sem_perm) : + return (error); + td->td_retval[0] = (cmd == SEM_STAT) ? + IXSEQ_TO_IPCID(args->semid, semid.sem_perm) : 0; - bsd_to_linux_semid_ds(unptr->buf, &linux_semid); + bsd_to_linux_semid_ds(&semid, &linux_semid); return (linux_semid_pushdown(args->cmd & LINUX_IPC_64, &linux_semid, (caddr_t)PTRIN(args->arg.buf))); case LINUX_IPC_INFO: @@ -580,7 +567,8 @@ args->cmd & ~LINUX_IPC_64); return EINVAL; } - return __semctl(td, &bsd_args); + return kern_semctl(td, args->semid, args->semnum, cmd, &semun, + UIO_USERSPACE); } int ==== //depot/projects/arm/src/sys/compat/linux/linux_util.h#5 (text+ko) ==== @@ -28,7 +28,7 @@ * * from: svr4_util.h,v 1.5 1994/11/18 02:54:31 christos Exp * from: linux_util.h,v 1.2 1995/03/05 23:23:50 fvdl Exp - * $FreeBSD: src/sys/compat/linux/linux_util.h,v 1.27 2006/05/05 16:10:45 ambrisko Exp $ + * $FreeBSD: src/sys/compat/linux/linux_util.h,v 1.28 2006/06/27 18:30:49 jhb Exp $ */ /* @@ -49,32 +49,6 @@ #include <sys/cdefs.h> #include <sys/uio.h> -static __inline caddr_t stackgap_init(void); -static __inline void *stackgap_alloc(caddr_t *, size_t); - -#define szsigcode (*(curthread->td_proc->p_sysent->sv_szsigcode)) -#define psstrings (curthread->td_proc->p_sysent->sv_psstrings) - -static __inline caddr_t -stackgap_init() -{ - return (caddr_t)(psstrings - szsigcode - SPARE_USRSPACE); -} - -static __inline void * -stackgap_alloc(sgp, sz) - caddr_t *sgp; - size_t sz; -{ - void *p = (void *) *sgp; - - sz = ALIGN(sz); - if (*sgp + sz > (caddr_t)(psstrings - szsigcode)) - return NULL; - *sgp += sz; - return p; -} - extern const char linux_emul_path[]; int linux_emul_convpath(struct thread *, char *, enum uio_seg, char **, int); ==== //depot/projects/arm/src/sys/compat/svr4/Makefile#2 (text+ko) ==== @@ -1,8 +1,6 @@ # Makefile for syscall tables # -# $FreeBSD: src/sys/compat/svr4/Makefile,v 1.7 2001/09/13 22:02:48 julian Exp $ - -MAINTAINER= newton@freebsd.org +# $FreeBSD: src/sys/compat/svr4/Makefile,v 1.8 2006/07/01 10:51:54 markm Exp $ all: @echo "make sysent only" ==== //depot/projects/arm/src/sys/compat/svr4/svr4_ipc.c#3 (text+ko) ==== @@ -71,7 +71,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_ipc.c,v 1.19 2005/09/28 07:03:02 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/svr4/svr4_ipc.c,v 1.21 2006/06/27 18:31:36 jhb Exp $"); #include "opt_sysvipc.h" @@ -105,8 +105,6 @@ struct svr4_semid_ds *); static void svr4_to_bsd_semid_ds(const struct svr4_semid_ds *, struct semid_ds *); -static int svr4_setsemun(caddr_t *sgp, union semun **argp, - union semun *usp); static int svr4_semop(struct thread *, void *); static int svr4_semget(struct thread *, void *); static int svr4_semctl(struct thread *, void *); @@ -194,16 +192,6 @@ bds->sem_pad2 = sds->sem_pad2; } -static int -svr4_setsemun(sgp, argp, usp) - caddr_t *sgp; - union semun **argp; - union semun *usp; -{ - *argp = stackgap_alloc(sgp, sizeof(union semun)); - return copyout((caddr_t)usp, *argp, sizeof(union semun)); -} - struct svr4_sys_semctl_args { int what; int semid; @@ -217,108 +205,71 @@ struct thread *td; void *v; { - int error; struct svr4_sys_semctl_args *uap = v; - struct __semctl_args ap; struct svr4_semid_ds ss; - struct semid_ds bs, *bsp; - caddr_t sg = stackgap_init(); - - ap.semid = uap->semid; - ap.semnum = uap->semnum; + struct semid_ds bs; + union semun semun; + int cmd, error; switch (uap->cmd) { case SVR4_SEM_GETZCNT: + cmd = GETZCNT; + break; + case SVR4_SEM_GETNCNT: + cmd = GETNCNT; + break; + case SVR4_SEM_GETPID: + cmd = GETPID; + break; + case SVR4_SEM_GETVAL: - switch (uap->cmd) { - case SVR4_SEM_GETZCNT: - ap.cmd = GETZCNT; - break; - case SVR4_SEM_GETNCNT: - ap.cmd = GETNCNT; - break; - case SVR4_SEM_GETPID: - ap.cmd = GETPID; - break; >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607030645.k636jRXa043277>