From owner-p4-projects@FreeBSD.ORG Wed Jan 10 11:14:19 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6CF0016A415; Wed, 10 Jan 2007 11:14:19 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 46AEF16A403 for ; Wed, 10 Jan 2007 11:14:19 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 36B5813C458 for ; Wed, 10 Jan 2007 11:14:19 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id l0ABEJEm018126 for ; Wed, 10 Jan 2007 11:14:19 GMT (envelope-from zec@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l0ABEGMF018123 for perforce@freebsd.org; Wed, 10 Jan 2007 11:14:16 GMT (envelope-from zec@FreeBSD.org) Date: Wed, 10 Jan 2007 11:14:16 GMT Message-Id: <200701101114.l0ABEGMF018123@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zec@FreeBSD.org using -f From: Marko Zec To: Perforce Change Reviews Cc: Subject: PERFORCE change 112704 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jan 2007 11:14:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=112704 Change 112704 by zec@zec_tpx32 on 2007/01/10 11:13:48 IFC Affected files ... .. //depot/projects/vimage/src/sys/amd64/include/atomic.h#2 integrate .. //depot/projects/vimage/src/sys/amd64/linux32/linux32_dummy.c#2 integrate .. //depot/projects/vimage/src/sys/amd64/linux32/linux32_machdep.c#3 integrate .. //depot/projects/vimage/src/sys/amd64/linux32/linux32_proto.h#2 integrate .. //depot/projects/vimage/src/sys/amd64/linux32/linux32_syscall.h#2 integrate .. //depot/projects/vimage/src/sys/amd64/linux32/linux32_sysent.c#2 integrate .. //depot/projects/vimage/src/sys/amd64/linux32/syscalls.master#2 integrate .. //depot/projects/vimage/src/sys/arm/at91/at91_mci.c#2 integrate .. //depot/projects/vimage/src/sys/arm/at91/at91_pioreg.h#2 integrate .. //depot/projects/vimage/src/sys/arm/at91/at91_pmc.c#2 integrate .. //depot/projects/vimage/src/sys/arm/at91/at91_spireg.h#2 integrate .. //depot/projects/vimage/src/sys/arm/at91/at91_st.c#3 integrate .. //depot/projects/vimage/src/sys/arm/at91/files.at91#2 integrate .. //depot/projects/vimage/src/sys/arm/at91/if_ate.c#2 integrate .. //depot/projects/vimage/src/sys/arm/conf/BWCT#1 branch .. //depot/projects/vimage/src/sys/arm/conf/BWCT.hints#1 branch .. //depot/projects/vimage/src/sys/arm/include/atomic.h#2 integrate .. //depot/projects/vimage/src/sys/bsm/audit.h#2 integrate .. //depot/projects/vimage/src/sys/bsm/audit_internal.h#2 integrate .. //depot/projects/vimage/src/sys/bsm/audit_kevents.h#2 integrate .. //depot/projects/vimage/src/sys/bsm/audit_record.h#2 integrate .. //depot/projects/vimage/src/sys/compat/linux/linux_emul.c#2 integrate .. //depot/projects/vimage/src/sys/compat/linux/linux_emul.h#2 integrate .. //depot/projects/vimage/src/sys/compat/linux/linux_mib.c#2 integrate .. //depot/projects/vimage/src/sys/compat/linux/linux_mib.h#2 integrate .. //depot/projects/vimage/src/sys/compat/linux/linux_misc.c#3 integrate .. //depot/projects/vimage/src/sys/compat/linux/linux_misc.h#2 integrate .. //depot/projects/vimage/src/sys/compat/linux/linux_signal.c#2 integrate .. //depot/projects/vimage/src/sys/conf/NOTES#4 integrate .. //depot/projects/vimage/src/sys/conf/files#5 integrate .. //depot/projects/vimage/src/sys/conf/kern.post.mk#2 integrate .. //depot/projects/vimage/src/sys/conf/options#5 integrate .. //depot/projects/vimage/src/sys/conf/options.arm#2 integrate .. //depot/projects/vimage/src/sys/contrib/pf/net/if_pfsync.c#2 integrate .. //depot/projects/vimage/src/sys/contrib/pf/net/pf.c#2 integrate .. //depot/projects/vimage/src/sys/contrib/pf/net/pf_ioctl.c#2 integrate .. //depot/projects/vimage/src/sys/dev/aic7xxx/aic7xxx.seq#2 integrate .. //depot/projects/vimage/src/sys/dev/aic7xxx/aicasm/aicasm_gram.y#2 integrate .. //depot/projects/vimage/src/sys/dev/aic7xxx/aicasm/aicasm_macro_gram.y#2 integrate .. //depot/projects/vimage/src/sys/dev/arl/if_arl.c#2 integrate .. //depot/projects/vimage/src/sys/dev/ata/ata-chipset.c#2 integrate .. //depot/projects/vimage/src/sys/dev/ata/ata-pci.h#2 integrate .. //depot/projects/vimage/src/sys/dev/ath/if_ath.c#3 integrate .. //depot/projects/vimage/src/sys/dev/ath/if_athvar.h#3 integrate .. //depot/projects/vimage/src/sys/dev/bktr/bktr_i2c.c#2 integrate .. //depot/projects/vimage/src/sys/dev/ce/if_ce.c#2 integrate .. //depot/projects/vimage/src/sys/dev/cp/if_cp.c#2 integrate .. //depot/projects/vimage/src/sys/dev/ctau/if_ct.c#2 integrate .. //depot/projects/vimage/src/sys/dev/cx/if_cx.c#2 integrate .. //depot/projects/vimage/src/sys/dev/drm/drm_agpsupport.c#2 integrate .. //depot/projects/vimage/src/sys/dev/en/midway.c#2 integrate .. //depot/projects/vimage/src/sys/dev/firewire/if_fwip.c#2 integrate .. //depot/projects/vimage/src/sys/dev/hptmv/entry.c#2 integrate .. //depot/projects/vimage/src/sys/dev/if_ndis/if_ndis.c#2 integrate .. //depot/projects/vimage/src/sys/dev/isp/isp.c#4 integrate .. //depot/projects/vimage/src/sys/dev/isp/isp_freebsd.h#2 integrate .. //depot/projects/vimage/src/sys/dev/isp/isp_pci.c#4 integrate .. //depot/projects/vimage/src/sys/dev/mfi/mfi.c#3 integrate .. //depot/projects/vimage/src/sys/dev/mii/miidevs#3 integrate .. //depot/projects/vimage/src/sys/dev/mii/rlswitch.c#1 branch .. //depot/projects/vimage/src/sys/dev/mpt/mpt.c#3 integrate .. //depot/projects/vimage/src/sys/dev/mpt/mpt.h#3 integrate .. //depot/projects/vimage/src/sys/dev/mpt/mpt_cam.c#4 integrate .. //depot/projects/vimage/src/sys/dev/mpt/mpt_pci.c#3 integrate .. //depot/projects/vimage/src/sys/dev/msk/if_msk.c#2 integrate .. //depot/projects/vimage/src/sys/dev/msk/if_mskreg.h#2 integrate .. //depot/projects/vimage/src/sys/dev/my/if_my.c#2 integrate .. //depot/projects/vimage/src/sys/dev/pci/pci.c#3 integrate .. //depot/projects/vimage/src/sys/dev/ppbus/if_plip.c#2 integrate .. //depot/projects/vimage/src/sys/dev/sound/pci/emu10kx-pcm.c#2 integrate .. //depot/projects/vimage/src/sys/dev/sound/pci/emu10kx.c#2 integrate .. //depot/projects/vimage/src/sys/dev/sound/pci/emu10kx.h#2 integrate .. //depot/projects/vimage/src/sys/dev/sound/pci/hda/hdac.c#4 integrate .. //depot/projects/vimage/src/sys/dev/sound/pcm/feeder.c#2 integrate .. //depot/projects/vimage/src/sys/dev/sound/usb/uaudio.c#2 integrate .. //depot/projects/vimage/src/sys/dev/usb/usbdi_util.h#2 integrate .. //depot/projects/vimage/src/sys/fs/msdosfs/bpb.h#3 integrate .. //depot/projects/vimage/src/sys/fs/msdosfs/msdosfs_vfsops.c#3 integrate .. //depot/projects/vimage/src/sys/fs/pseudofs/pseudofs_vncache.c#2 integrate .. //depot/projects/vimage/src/sys/fs/unionfs/union_subr.c#3 integrate .. //depot/projects/vimage/src/sys/fs/unionfs/union_vnops.c#3 integrate .. //depot/projects/vimage/src/sys/i386/include/atomic.h#2 integrate .. //depot/projects/vimage/src/sys/i386/linux/linux_dummy.c#2 integrate .. //depot/projects/vimage/src/sys/i386/linux/linux_proto.h#3 integrate .. //depot/projects/vimage/src/sys/i386/linux/linux_syscall.h#3 integrate .. //depot/projects/vimage/src/sys/i386/linux/linux_sysent.c#3 integrate .. //depot/projects/vimage/src/sys/i386/linux/syscalls.master#3 integrate .. //depot/projects/vimage/src/sys/i4b/driver/i4b_ipr.c#2 integrate .. //depot/projects/vimage/src/sys/isa/pnpparse.c#2 integrate .. //depot/projects/vimage/src/sys/kern/kern_descrip.c#2 integrate .. //depot/projects/vimage/src/sys/kern/kern_mac.c#3 delete .. //depot/projects/vimage/src/sys/kern/kern_switch.c#3 integrate .. //depot/projects/vimage/src/sys/kern/kern_synch.c#4 integrate .. //depot/projects/vimage/src/sys/kern/kern_thread.c#4 integrate .. //depot/projects/vimage/src/sys/kern/sched_4bsd.c#4 integrate .. //depot/projects/vimage/src/sys/kern/sched_core.c#2 integrate .. //depot/projects/vimage/src/sys/kern/sched_ule.c#3 edit .. //depot/projects/vimage/src/sys/kern/uipc_usrreq.c#2 integrate .. //depot/projects/vimage/src/sys/modules/netgraph/Makefile#2 integrate .. //depot/projects/vimage/src/sys/modules/netgraph/deflate/Makefile#1 branch .. //depot/projects/vimage/src/sys/modules/netgraph/pred1/Makefile#1 branch .. //depot/projects/vimage/src/sys/modules/sound/driver/emu10kx/Makefile#2 integrate .. //depot/projects/vimage/src/sys/net/ethernet.h#2 integrate .. //depot/projects/vimage/src/sys/net/if_enc.c#2 integrate .. //depot/projects/vimage/src/sys/net/if_media.h#2 integrate .. //depot/projects/vimage/src/sys/net/if_vlan.c#2 integrate .. //depot/projects/vimage/src/sys/net80211/_ieee80211.h#2 integrate .. //depot/projects/vimage/src/sys/net80211/ieee80211.c#2 integrate .. //depot/projects/vimage/src/sys/net80211/ieee80211_node.c#2 integrate .. //depot/projects/vimage/src/sys/net80211/ieee80211_output.c#3 integrate .. //depot/projects/vimage/src/sys/net80211/ieee80211_proto.c#2 integrate .. //depot/projects/vimage/src/sys/net80211/ieee80211_var.h#2 integrate .. //depot/projects/vimage/src/sys/netgraph/ng_deflate.c#1 branch .. //depot/projects/vimage/src/sys/netgraph/ng_deflate.h#1 branch .. //depot/projects/vimage/src/sys/netgraph/ng_ppp.c#2 integrate .. //depot/projects/vimage/src/sys/netgraph/ng_ppp.h#2 integrate .. //depot/projects/vimage/src/sys/netgraph/ng_pred1.c#1 branch .. //depot/projects/vimage/src/sys/netgraph/ng_pred1.h#1 branch .. //depot/projects/vimage/src/sys/netgraph/ng_sppp.c#2 integrate .. //depot/projects/vimage/src/sys/netinet/in.h#2 integrate .. //depot/projects/vimage/src/sys/netinet/in_pcb.c#5 integrate .. //depot/projects/vimage/src/sys/netinet/ip_divert.c#3 integrate .. //depot/projects/vimage/src/sys/netinet/ip_fw.h#2 integrate .. //depot/projects/vimage/src/sys/netinet/ip_fw2.c#4 integrate .. //depot/projects/vimage/src/sys/netinet/ip_fw_pfil.c#2 integrate .. //depot/projects/vimage/src/sys/netinet/raw_ip.c#5 integrate .. //depot/projects/vimage/src/sys/netinet/sctp_asconf.c#3 integrate .. //depot/projects/vimage/src/sys/netinet/sctp_asconf.h#2 integrate .. //depot/projects/vimage/src/sys/netinet/sctp_auth.c#2 integrate .. //depot/projects/vimage/src/sys/netinet/sctp_bsd_addr.c#2 integrate .. //depot/projects/vimage/src/sys/netinet/sctp_indata.c#3 integrate .. //depot/projects/vimage/src/sys/netinet/sctp_input.c#3 integrate .. //depot/projects/vimage/src/sys/netinet/sctp_os.h#2 integrate .. //depot/projects/vimage/src/sys/netinet/sctp_os_bsd.h#3 integrate .. //depot/projects/vimage/src/sys/netinet/sctp_output.c#3 integrate .. //depot/projects/vimage/src/sys/netinet/sctp_pcb.c#3 integrate .. //depot/projects/vimage/src/sys/netinet/sctp_pcb.h#3 integrate .. //depot/projects/vimage/src/sys/netinet/sctp_structs.h#3 integrate .. //depot/projects/vimage/src/sys/netinet/sctp_timer.c#3 integrate .. //depot/projects/vimage/src/sys/netinet/sctp_usrreq.c#3 integrate .. //depot/projects/vimage/src/sys/netinet/sctp_var.h#2 integrate .. //depot/projects/vimage/src/sys/netinet/sctputil.c#3 integrate .. //depot/projects/vimage/src/sys/netinet/tcp_subr.c#7 integrate .. //depot/projects/vimage/src/sys/netinet/udp_usrreq.c#5 integrate .. //depot/projects/vimage/src/sys/netinet6/sctp6_usrreq.c#3 integrate .. //depot/projects/vimage/src/sys/nfsserver/nfs_srvsubs.c#2 integrate .. //depot/projects/vimage/src/sys/nfsserver/nfsm_subs.h#2 integrate .. //depot/projects/vimage/src/sys/pc98/pc98/machdep.c#3 integrate .. //depot/projects/vimage/src/sys/pci/agp_intel.c#2 integrate .. //depot/projects/vimage/src/sys/pci/agpreg.h#2 integrate .. //depot/projects/vimage/src/sys/powerpc/powerpc/vm_machdep.c#2 integrate .. //depot/projects/vimage/src/sys/security/audit/audit.c#2 integrate .. //depot/projects/vimage/src/sys/security/audit/audit_arg.c#2 integrate .. //depot/projects/vimage/src/sys/security/audit/audit_bsm_klib.c#2 integrate .. //depot/projects/vimage/src/sys/security/audit/audit_bsm_token.c#2 integrate .. //depot/projects/vimage/src/sys/security/audit/audit_syscalls.c#2 integrate .. //depot/projects/vimage/src/sys/security/audit/audit_trigger.c#2 integrate .. //depot/projects/vimage/src/sys/security/audit/audit_worker.c#2 integrate .. //depot/projects/vimage/src/sys/security/mac/mac_framework.c#1 branch .. //depot/projects/vimage/src/sys/security/mac/mac_inet.c#3 integrate .. //depot/projects/vimage/src/sys/security/mac/mac_internal.h#3 integrate .. //depot/projects/vimage/src/sys/security/mac/mac_label.c#3 integrate .. //depot/projects/vimage/src/sys/security/mac/mac_net.c#3 integrate .. //depot/projects/vimage/src/sys/security/mac/mac_policy.h#2 integrate .. //depot/projects/vimage/src/sys/security/mac/mac_syscalls.c#1 branch .. //depot/projects/vimage/src/sys/security/mac/mac_vfs.c#3 integrate .. //depot/projects/vimage/src/sys/security/mac_stub/mac_stub.c#3 integrate .. //depot/projects/vimage/src/sys/sun4v/sun4v/pmap.c#4 integrate .. //depot/projects/vimage/src/sys/sys/copyright.h#2 integrate .. //depot/projects/vimage/src/sys/sys/file.h#2 integrate .. //depot/projects/vimage/src/sys/sys/proc.h#5 integrate .. //depot/projects/vimage/src/sys/sys/runq.h#3 integrate .. //depot/projects/vimage/src/sys/sys/unpcb.h#2 integrate .. //depot/projects/vimage/src/sys/vm/swap_pager.c#2 integrate .. //depot/projects/vimage/src/sys/vm/uma.h#2 integrate .. //depot/projects/vimage/src/sys/vm/uma_core.c#2 integrate .. //depot/projects/vimage/src/sys/vm/vm_kern.c#2 integrate Differences ... ==== //depot/projects/vimage/src/sys/amd64/include/atomic.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/atomic.h,v 1.39 2005/09/27 17:39:10 jhb Exp $ + * $FreeBSD: src/sys/amd64/include/atomic.h,v 1.44 2006/12/29 15:29:49 bde Exp $ */ #ifndef _MACHINE_ATOMIC_H_ #define _MACHINE_ATOMIC_H_ @@ -33,30 +33,30 @@ #endif /* - * Various simple arithmetic on memory which is atomic in the presence - * of interrupts and multiple processors. + * Various simple operations on memory, each of which is atomic in the + * presence of interrupts and multiple processors. * - * atomic_set_char(P, V) (*(u_char*)(P) |= (V)) - * atomic_clear_char(P, V) (*(u_char*)(P) &= ~(V)) - * atomic_add_char(P, V) (*(u_char*)(P) += (V)) - * atomic_subtract_char(P, V) (*(u_char*)(P) -= (V)) + * atomic_set_char(P, V) (*(u_char *)(P) |= (V)) + * atomic_clear_char(P, V) (*(u_char *)(P) &= ~(V)) + * atomic_add_char(P, V) (*(u_char *)(P) += (V)) + * atomic_subtract_char(P, V) (*(u_char *)(P) -= (V)) * - * atomic_set_short(P, V) (*(u_short*)(P) |= (V)) - * atomic_clear_short(P, V) (*(u_short*)(P) &= ~(V)) - * atomic_add_short(P, V) (*(u_short*)(P) += (V)) - * atomic_subtract_short(P, V) (*(u_short*)(P) -= (V)) + * atomic_set_short(P, V) (*(u_short *)(P) |= (V)) + * atomic_clear_short(P, V) (*(u_short *)(P) &= ~(V)) + * atomic_add_short(P, V) (*(u_short *)(P) += (V)) + * atomic_subtract_short(P, V) (*(u_short *)(P) -= (V)) * - * atomic_set_int(P, V) (*(u_int*)(P) |= (V)) - * atomic_clear_int(P, V) (*(u_int*)(P) &= ~(V)) - * atomic_add_int(P, V) (*(u_int*)(P) += (V)) - * atomic_subtract_int(P, V) (*(u_int*)(P) -= (V)) - * atomic_readandclear_int(P) (return *(u_int*)P; *(u_int*)P = 0;) + * atomic_set_int(P, V) (*(u_int *)(P) |= (V)) + * atomic_clear_int(P, V) (*(u_int *)(P) &= ~(V)) + * atomic_add_int(P, V) (*(u_int *)(P) += (V)) + * atomic_subtract_int(P, V) (*(u_int *)(P) -= (V)) + * atomic_readandclear_int(P) (return (*(u_int *)(P)); *(u_int *)(P) = 0;) * - * atomic_set_long(P, V) (*(u_long*)(P) |= (V)) - * atomic_clear_long(P, V) (*(u_long*)(P) &= ~(V)) - * atomic_add_long(P, V) (*(u_long*)(P) += (V)) - * atomic_subtract_long(P, V) (*(u_long*)(P) -= (V)) - * atomic_readandclear_long(P) (return *(u_long*)P; *(u_long*)P = 0;) + * atomic_set_long(P, V) (*(u_long *)(P) |= (V)) + * atomic_clear_long(P, V) (*(u_long *)(P) &= ~(V)) + * atomic_add_long(P, V) (*(u_long *)(P) += (V)) + * atomic_subtract_long(P, V) (*(u_long *)(P) -= (V)) + * atomic_readandclear_long(P) (return (*(u_long *)(P)); *(u_long *)(P) = 0;) */ /* @@ -67,26 +67,26 @@ * Kernel modules call real functions which are built into the kernel. * This allows kernel modules to be portable between UP and SMP systems. */ -#if defined(KLD_MODULE) || !(defined(__GNUCLIKE_ASM) && defined(__CC_SUPPORTS___INLINE)) +#if defined(KLD_MODULE) || !defined(__GNUCLIKE_ASM) #define ATOMIC_ASM(NAME, TYPE, OP, CONS, V) \ void atomic_##NAME##_##TYPE(volatile u_##TYPE *p, u_##TYPE v) -int atomic_cmpset_int(volatile u_int *dst, u_int exp, u_int src); -int atomic_cmpset_long(volatile u_long *dst, u_long exp, u_long src); -u_int atomic_fetchadd_int(volatile u_int *p, u_int v); +int atomic_cmpset_int(volatile u_int *dst, u_int exp, u_int src); +int atomic_cmpset_long(volatile u_long *dst, u_long exp, u_long src); +u_int atomic_fetchadd_int(volatile u_int *p, u_int v); #define ATOMIC_STORE_LOAD(TYPE, LOP, SOP) \ u_##TYPE atomic_load_acq_##TYPE(volatile u_##TYPE *p); \ void atomic_store_rel_##TYPE(volatile u_##TYPE *p, u_##TYPE v) -#else /* !KLD_MODULE && __GNUCLIKE_ASM && __CC_SUPPORTS___INLINE */ +#else /* !KLD_MODULE && __GNUCLIKE_ASM */ /* - * For userland, assume the SMP case and use lock prefixes so that - * the binaries will run on both types of systems. + * For userland, always use lock prefixes so that the binaries will run + * on both SMP and !SMP systems. */ #if defined(SMP) || !defined(_KERNEL) -#define MPLOCKED lock ; +#define MPLOCKED "lock ; " #else #define MPLOCKED #endif @@ -99,9 +99,9 @@ static __inline void \ atomic_##NAME##_##TYPE(volatile u_##TYPE *p, u_##TYPE v)\ { \ - __asm __volatile(__XSTRING(MPLOCKED) OP \ - : "=m" (*p) \ - : CONS (V), "m" (*p)); \ + __asm __volatile(MPLOCKED OP \ + : "=m" (*p) \ + : CONS (V), "m" (*p)); \ } \ struct __hack @@ -116,19 +116,19 @@ static __inline int atomic_cmpset_int(volatile u_int *dst, u_int exp, u_int src) { - int res = exp; + u_char res; - __asm __volatile ( - " " __XSTRING(MPLOCKED) " " + __asm __volatile( + " " MPLOCKED " " " cmpxchgl %2,%1 ; " - " setz %%al ; " - " movzbl %%al,%0 ; " + " sete %0 ; " "1: " "# atomic_cmpset_int" - : "+a" (res), /* 0 (result) */ + : "=a" (res), /* 0 */ "=m" (*dst) /* 1 */ : "r" (src), /* 2 */ - "m" (*dst) /* 3 */ + "a" (exp), /* 3 */ + "m" (*dst) /* 4 */ : "memory"); return (res); @@ -137,19 +137,19 @@ static __inline int atomic_cmpset_long(volatile u_long *dst, u_long exp, u_long src) { - long res = exp; + u_char res; - __asm __volatile ( - " " __XSTRING(MPLOCKED) " " + __asm __volatile( + " " MPLOCKED " " " cmpxchgq %2,%1 ; " - " setz %%al ; " - " movzbq %%al,%0 ; " + " sete %0 ; " "1: " "# atomic_cmpset_long" - : "+a" (res), /* 0 (result) */ + : "=a" (res), /* 0 */ "=m" (*dst) /* 1 */ : "r" (src), /* 2 */ - "m" (*dst) /* 3 */ + "a" (exp), /* 3 */ + "m" (*dst) /* 4 */ : "memory"); return (res); @@ -163,8 +163,8 @@ atomic_fetchadd_int(volatile u_int *p, u_int v) { - __asm __volatile ( - " " __XSTRING(MPLOCKED) " " + __asm __volatile( + " " MPLOCKED " " " xaddl %0, %1 ; " "# atomic_fetchadd_int" : "+r" (v), /* 0 (result) */ @@ -197,7 +197,7 @@ } \ struct __hack -#else /* defined(SMP) */ +#else /* !(_KERNEL && !SMP) */ #define ATOMIC_STORE_LOAD(TYPE, LOP, SOP) \ static __inline u_##TYPE \ @@ -205,11 +205,11 @@ { \ u_##TYPE res; \ \ - __asm __volatile(__XSTRING(MPLOCKED) LOP \ - : "=a" (res), /* 0 (result) */\ + __asm __volatile(MPLOCKED LOP \ + : "=a" (res), /* 0 */ \ "=m" (*p) /* 1 */ \ : "m" (*p) /* 2 */ \ - : "memory"); \ + : "memory"); \ \ return (res); \ } \ @@ -227,9 +227,9 @@ } \ struct __hack -#endif /* SMP */ +#endif /* _KERNEL && !SMP */ -#endif /* KLD_MODULE || !(__GNUCLIKE_ASM && __CC_SUPPORTS___INLINE) */ +#endif /* KLD_MODULE || !__GNUCLIKE_ASM */ ATOMIC_ASM(set, char, "orb %b1,%0", "iq", v); ATOMIC_ASM(clear, char, "andb %b1,%0", "iq", ~v); @@ -259,49 +259,49 @@ #undef ATOMIC_ASM #undef ATOMIC_STORE_LOAD -#if !defined(WANT_FUNCTIONS) +#ifndef WANT_FUNCTIONS /* Read the current value and store a zero in the destination. */ -#if defined(__GNUCLIKE_ASM) && defined(__CC_SUPPORTS___INLINE) +#ifdef __GNUCLIKE_ASM static __inline u_int atomic_readandclear_int(volatile u_int *addr) { - u_int result; + u_int res; - result = 0; - __asm __volatile ( + res = 0; + __asm __volatile( " xchgl %1,%0 ; " "# atomic_readandclear_int" - : "+r" (result), /* 0 (result) */ - "=m" (*addr) /* 1 (addr) */ + : "+r" (res), /* 0 */ + "=m" (*addr) /* 1 */ : "m" (*addr)); - return (result); + return (res); } static __inline u_long atomic_readandclear_long(volatile u_long *addr) { - u_long result; + u_long res; - result = 0; - __asm __volatile ( + res = 0; + __asm __volatile( " xchgq %1,%0 ; " "# atomic_readandclear_long" - : "+r" (result), /* 0 (result) */ - "=m" (*addr) /* 1 (addr) */ + : "+r" (res), /* 0 */ + "=m" (*addr) /* 1 */ : "m" (*addr)); - return (result); + return (res); } -#else /* !(__GNUCLIKE_ASM && __CC_SUPPORTS___INLINE) */ +#else /* !__GNUCLIKE_ASM */ -u_int atomic_readandclear_int(volatile u_int *); -u_long atomic_readandclear_long(volatile u_long *); +u_int atomic_readandclear_int(volatile u_int *addr); +u_long atomic_readandclear_long(volatile u_long *addr); -#endif /* __GNUCLIKE_ASM && __CC_SUPPORTS___INLINE */ +#endif /* __GNUCLIKE_ASM */ /* Acquire and release variants are identical to the normal ones. */ #define atomic_set_acq_char atomic_set_char @@ -437,5 +437,6 @@ #define atomic_cmpset_rel_ptr atomic_cmpset_rel_long #define atomic_readandclear_ptr atomic_readandclear_long -#endif /* !defined(WANT_FUNCTIONS) */ -#endif /* ! _MACHINE_ATOMIC_H_ */ +#endif /* !WANT_FUNCTIONS */ + +#endif /* !_MACHINE_ATOMIC_H_ */ ==== //depot/projects/vimage/src/sys/amd64/linux32/linux32_dummy.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_dummy.c,v 1.6 2006/10/28 10:59:59 netchild Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_dummy.c,v 1.7 2006/12/31 13:16:00 netchild Exp $"); #include #include @@ -53,7 +53,6 @@ DUMMY(sysfs); DUMMY(query_module); DUMMY(nfsservctl); -DUMMY(rt_sigtimedwait); DUMMY(rt_sigqueueinfo); DUMMY(capget); DUMMY(capset); @@ -77,7 +76,6 @@ DUMMY(timer_getoverrun); DUMMY(timer_delete); DUMMY(fstatfs64); -DUMMY(utimes); DUMMY(fadvise64_64); DUMMY(mbind); DUMMY(get_mempolicy); ==== //depot/projects/vimage/src/sys/amd64/linux32/linux32_machdep.c#3 (text+ko) ==== @@ -29,11 +29,13 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.23 2006/12/20 20:17:34 jkim Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.24 2007/01/06 15:58:34 netchild Exp $"); #include #include #include +#include +#include #include #include #include @@ -728,9 +730,20 @@ off_t pos; } */ bsd_args; int error; + struct file *fp; error = 0; bsd_args.flags = 0; + fp = NULL; + + /* + * Linux mmap(2): + * You must specify exactly one of MAP_SHARED and MAP_PRIVATE + */ + if (! ((linux_args->flags & LINUX_MAP_SHARED) ^ + (linux_args->flags & LINUX_MAP_PRIVATE))) + return (EINVAL); + if (linux_args->flags & LINUX_MAP_SHARED) bsd_args.flags |= MAP_SHARED; if (linux_args->flags & LINUX_MAP_PRIVATE) @@ -813,17 +826,44 @@ bsd_args.addr = (caddr_t)PTRIN(linux_args->addr); bsd_args.len = linux_args->len; } + /* - * XXX i386 Linux always emulator forces PROT_READ on (why?) - * so we do the same. We add PROT_EXEC to work around buggy - * applications (e.g. Java) that take advantage of the fact - * that execute permissions are not enforced by x86 CPUs. + * We add PROT_EXEC to work around buggy applications (e.g. Java) + * that take advantage of the fact that execute permissions are not + * enforced by x86 CPUs. */ - bsd_args.prot = linux_args->prot | PROT_EXEC | PROT_READ; + bsd_args.prot = linux_args->prot | PROT_EXEC; if (linux_args->flags & LINUX_MAP_ANON) bsd_args.fd = -1; - else + else { + /* + * Linux follows Solaris mmap(2) description: + * The file descriptor fildes is opened with + * read permission, regardless of the + * protection options specified. + * If PROT_WRITE is specified, the application + * must have opened the file descriptor + * fildes with write permission unless + * MAP_PRIVATE is specified in the flag + * argument as described below. + */ + + if ((error = fget(td, linux_args->fd, &fp)) != 0) + return (error); + if (fp->f_type != DTYPE_VNODE) { + fdrop(fp, td); + return (EINVAL); + } + + /* Linux mmap() just fails for O_WRONLY files */ + if (! (fp->f_flag & FREAD)) { + fdrop(fp, td); + return (EACCES); + } + bsd_args.fd = linux_args->fd; + fdrop(fp, td); + } bsd_args.pos = (off_t)linux_args->pgoff * PAGE_SIZE; bsd_args.pad = 0; ==== //depot/projects/vimage/src/sys/amd64/linux32/linux32_proto.h#2 (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.26 2006/11/11 21:49:07 ru Exp $ - * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.23 2006/10/29 14:02:38 netchild Exp + * $FreeBSD: src/sys/amd64/linux32/linux32_proto.h,v 1.28 2006/12/31 13:20:30 netchild Exp $ + * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.25 2006/12/31 13:16:00 netchild Exp */ #ifndef _LINUX_SYSPROTO_H_ @@ -547,7 +547,10 @@ char sigsetsize_l_[PADL_(l_size_t)]; l_size_t sigsetsize; char sigsetsize_r_[PADR_(l_size_t)]; }; struct linux_rt_sigtimedwait_args { - register_t dummy; + char mask_l_[PADL_(l_sigset_t *)]; l_sigset_t * mask; char mask_r_[PADR_(l_sigset_t *)]; + char ptr_l_[PADL_(l_siginfo_t *)]; l_siginfo_t * ptr; char ptr_r_[PADR_(l_siginfo_t *)]; + char timeout_l_[PADL_(struct l_timeval *)]; struct l_timeval * timeout; char timeout_r_[PADR_(struct l_timeval *)]; + char sigsetsize_l_[PADL_(l_size_t)]; l_size_t sigsetsize; char sigsetsize_r_[PADR_(l_size_t)]; }; struct linux_rt_sigqueueinfo_args { register_t dummy; @@ -798,7 +801,8 @@ char sig_l_[PADL_(int)]; int sig; char sig_r_[PADR_(int)]; }; struct linux_utimes_args { - register_t dummy; + char fname_l_[PADL_(char *)]; char * fname; char fname_r_[PADR_(char *)]; + char tptr_l_[PADL_(struct l_timeval *)]; struct l_timeval * tptr; char tptr_r_[PADR_(struct l_timeval *)]; }; struct linux_fadvise64_64_args { register_t dummy; @@ -1160,7 +1164,7 @@ #define LINUX_SYS_AUE_linux_fork AUE_FORK #define LINUX_SYS_AUE_linux_open AUE_OPEN_RWTC #define LINUX_SYS_AUE_linux_waitpid AUE_WAIT4 -#define LINUX_SYS_AUE_linux_creat AUE_O_CREAT +#define LINUX_SYS_AUE_linux_creat AUE_CREAT #define LINUX_SYS_AUE_linux_link AUE_LINK #define LINUX_SYS_AUE_linux_unlink AUE_UNLINK #define LINUX_SYS_AUE_linux_execve AUE_EXECVE @@ -1221,7 +1225,7 @@ #define LINUX_SYS_AUE_linux_lstat AUE_LSTAT #define LINUX_SYS_AUE_linux_readlink AUE_READLINK #define LINUX_SYS_AUE_linux_reboot AUE_REBOOT -#define LINUX_SYS_AUE_linux_readdir AUE_O_GETDENTS +#define LINUX_SYS_AUE_linux_readdir AUE_GETDIRENTRIES #define LINUX_SYS_AUE_linux_mmap AUE_MMAP #define LINUX_SYS_AUE_linux_truncate AUE_TRUNCATE #define LINUX_SYS_AUE_linux_ftruncate AUE_FTRUNCATE @@ -1258,7 +1262,7 @@ #define LINUX_SYS_AUE_linux_setfsuid16 AUE_SETFSUID #define LINUX_SYS_AUE_linux_setfsgid16 AUE_SETFSGID #define LINUX_SYS_AUE_linux_llseek AUE_LSEEK -#define LINUX_SYS_AUE_linux_getdents AUE_O_GETDENTS +#define LINUX_SYS_AUE_linux_getdents AUE_GETDIRENTRIES #define LINUX_SYS_AUE_linux_select AUE_SELECT #define LINUX_SYS_AUE_linux_msync AUE_MSYNC #define LINUX_SYS_AUE_linux_readv AUE_READV @@ -1313,7 +1317,7 @@ #define LINUX_SYS_AUE_linux_setfsgid AUE_SETFSGID #define LINUX_SYS_AUE_linux_pivot_root AUE_PIVOT_ROOT #define LINUX_SYS_AUE_linux_mincore AUE_MINCORE -#define LINUX_SYS_AUE_linux_getdents64 AUE_O_GETDENTS +#define LINUX_SYS_AUE_linux_getdents64 AUE_GETDIRENTRIES #define LINUX_SYS_AUE_linux_fcntl64 AUE_FCNTL #define LINUX_SYS_AUE_linux_gettid AUE_NULL #define LINUX_SYS_AUE_linux_setxattr AUE_NULL @@ -1347,10 +1351,10 @@ #define LINUX_SYS_AUE_linux_clock_gettime AUE_NULL #define LINUX_SYS_AUE_linux_clock_getres AUE_NULL #define LINUX_SYS_AUE_linux_clock_nanosleep AUE_NULL -#define LINUX_SYS_AUE_linux_statfs64 AUE_NULL -#define LINUX_SYS_AUE_linux_fstatfs64 AUE_NULL +#define LINUX_SYS_AUE_linux_statfs64 AUE_STATFS +#define LINUX_SYS_AUE_linux_fstatfs64 AUE_FSTATFS #define LINUX_SYS_AUE_linux_tgkill AUE_NULL -#define LINUX_SYS_AUE_linux_utimes AUE_NULL +#define LINUX_SYS_AUE_linux_utimes AUE_UTIMES #define LINUX_SYS_AUE_linux_fadvise64_64 AUE_NULL #define LINUX_SYS_AUE_linux_mbind AUE_NULL #define LINUX_SYS_AUE_linux_get_mempolicy AUE_NULL ==== //depot/projects/vimage/src/sys/amd64/linux32/linux32_syscall.h#2 (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.26 2006/11/11 21:49:07 ru Exp $ - * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.23 2006/10/29 14:02:38 netchild Exp + * $FreeBSD: src/sys/amd64/linux32/linux32_syscall.h,v 1.28 2006/12/31 13:20:30 netchild Exp $ + * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.25 2006/12/31 13:16:00 netchild Exp */ #define LINUX_SYS_exit 1 ==== //depot/projects/vimage/src/sys/amd64/linux32/linux32_sysent.c#2 (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.26 2006/11/11 21:49:07 ru Exp $ - * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.23 2006/10/29 14:02:38 netchild Exp + * $FreeBSD: src/sys/amd64/linux32/linux32_sysent.c,v 1.28 2006/12/31 13:20:30 netchild Exp $ + * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.25 2006/12/31 13:16:00 netchild Exp */ #include @@ -28,7 +28,7 @@ { AS(linux_open_args), (sy_call_t *)linux_open, AUE_OPEN_RWTC, NULL, 0, 0 }, /* 5 = linux_open */ { AS(close_args), (sy_call_t *)close, AUE_CLOSE, NULL, 0, 0 }, /* 6 = close */ { AS(linux_waitpid_args), (sy_call_t *)linux_waitpid, AUE_WAIT4, NULL, 0, 0 }, /* 7 = linux_waitpid */ - { AS(linux_creat_args), (sy_call_t *)linux_creat, AUE_O_CREAT, NULL, 0, 0 }, /* 8 = linux_creat */ + { AS(linux_creat_args), (sy_call_t *)linux_creat, AUE_CREAT, NULL, 0, 0 }, /* 8 = linux_creat */ { AS(linux_link_args), (sy_call_t *)linux_link, AUE_LINK, NULL, 0, 0 }, /* 9 = linux_link */ { AS(linux_unlink_args), (sy_call_t *)linux_unlink, AUE_UNLINK, NULL, 0, 0 }, /* 10 = linux_unlink */ { AS(linux_execve_args), (sy_call_t *)linux_execve, AUE_EXECVE, NULL, 0, 0 }, /* 11 = linux_execve */ @@ -109,7 +109,7 @@ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 86 = linux_uselib */ { AS(swapon_args), (sy_call_t *)swapon, AUE_SWAPON, NULL, 0, 0 }, /* 87 = swapon */ { AS(linux_reboot_args), (sy_call_t *)linux_reboot, AUE_REBOOT, NULL, 0, 0 }, /* 88 = linux_reboot */ - { AS(linux_readdir_args), (sy_call_t *)linux_readdir, AUE_O_GETDENTS, NULL, 0, 0 }, /* 89 = linux_readdir */ + { AS(linux_readdir_args), (sy_call_t *)linux_readdir, AUE_GETDIRENTRIES, NULL, 0, 0 }, /* 89 = linux_readdir */ { AS(linux_mmap_args), (sy_call_t *)linux_mmap, AUE_MMAP, NULL, 0, 0 }, /* 90 = linux_mmap */ { AS(munmap_args), (sy_call_t *)munmap, AUE_MUNMAP, NULL, 0, 0 }, /* 91 = munmap */ { AS(linux_truncate_args), (sy_call_t *)linux_truncate, AUE_TRUNCATE, NULL, 0, 0 }, /* 92 = linux_truncate */ @@ -161,7 +161,7 @@ { AS(linux_setfsuid16_args), (sy_call_t *)linux_setfsuid16, AUE_SETFSUID, NULL, 0, 0 }, /* 138 = linux_setfsuid16 */ { AS(linux_setfsgid16_args), (sy_call_t *)linux_setfsgid16, AUE_SETFSGID, NULL, 0, 0 }, /* 139 = linux_setfsgid16 */ { AS(linux_llseek_args), (sy_call_t *)linux_llseek, AUE_LSEEK, NULL, 0, 0 }, /* 140 = linux_llseek */ - { AS(linux_getdents_args), (sy_call_t *)linux_getdents, AUE_O_GETDENTS, NULL, 0, 0 }, /* 141 = linux_getdents */ + { AS(linux_getdents_args), (sy_call_t *)linux_getdents, AUE_GETDIRENTRIES, NULL, 0, 0 }, /* 141 = linux_getdents */ { AS(linux_select_args), (sy_call_t *)linux_select, AUE_SELECT, NULL, 0, 0 }, /* 142 = linux_select */ { AS(flock_args), (sy_call_t *)flock, AUE_FLOCK, NULL, 0, 0 }, /* 143 = flock */ { AS(linux_msync_args), (sy_call_t *)linux_msync, AUE_MSYNC, NULL, 0, 0 }, /* 144 = linux_msync */ @@ -197,7 +197,7 @@ { AS(linux_rt_sigaction_args), (sy_call_t *)linux_rt_sigaction, AUE_NULL, NULL, 0, 0 }, /* 174 = linux_rt_sigaction */ { AS(linux_rt_sigprocmask_args), (sy_call_t *)linux_rt_sigprocmask, AUE_NULL, NULL, 0, 0 }, /* 175 = linux_rt_sigprocmask */ { AS(linux_rt_sigpending_args), (sy_call_t *)linux_rt_sigpending, AUE_NULL, NULL, 0, 0 }, /* 176 = linux_rt_sigpending */ - { 0, (sy_call_t *)linux_rt_sigtimedwait, AUE_NULL, NULL, 0, 0 }, /* 177 = linux_rt_sigtimedwait */ + { AS(linux_rt_sigtimedwait_args), (sy_call_t *)linux_rt_sigtimedwait, AUE_NULL, NULL, 0, 0 }, /* 177 = linux_rt_sigtimedwait */ { 0, (sy_call_t *)linux_rt_sigqueueinfo, AUE_NULL, NULL, 0, 0 }, /* 178 = linux_rt_sigqueueinfo */ { AS(linux_rt_sigsuspend_args), (sy_call_t *)linux_rt_sigsuspend, AUE_NULL, NULL, 0, 0 }, /* 179 = linux_rt_sigsuspend */ { AS(linux_pread_args), (sy_call_t *)linux_pread, AUE_PREAD, NULL, 0, 0 }, /* 180 = linux_pread */ @@ -240,7 +240,7 @@ { AS(linux_pivot_root_args), (sy_call_t *)linux_pivot_root, AUE_PIVOT_ROOT, NULL, 0, 0 }, /* 217 = linux_pivot_root */ { AS(linux_mincore_args), (sy_call_t *)linux_mincore, AUE_MINCORE, NULL, 0, 0 }, /* 218 = linux_mincore */ { AS(madvise_args), (sy_call_t *)madvise, AUE_MADVISE, NULL, 0, 0 }, /* 219 = madvise */ - { AS(linux_getdents64_args), (sy_call_t *)linux_getdents64, AUE_O_GETDENTS, NULL, 0, 0 }, /* 220 = linux_getdents64 */ + { AS(linux_getdents64_args), (sy_call_t *)linux_getdents64, AUE_GETDIRENTRIES, NULL, 0, 0 }, /* 220 = linux_getdents64 */ { AS(linux_fcntl64_args), (sy_call_t *)linux_fcntl64, AUE_FCNTL, NULL, 0, 0 }, /* 221 = linux_fcntl64 */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 222 = */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 223 = */ @@ -288,10 +288,10 @@ { AS(linux_clock_gettime_args), (sy_call_t *)linux_clock_gettime, AUE_NULL, NULL, 0, 0 }, /* 265 = linux_clock_gettime */ { AS(linux_clock_getres_args), (sy_call_t *)linux_clock_getres, AUE_NULL, NULL, 0, 0 }, /* 266 = linux_clock_getres */ { AS(linux_clock_nanosleep_args), (sy_call_t *)linux_clock_nanosleep, AUE_NULL, NULL, 0, 0 }, /* 267 = linux_clock_nanosleep */ - { AS(linux_statfs64_args), (sy_call_t *)linux_statfs64, AUE_NULL, NULL, 0, 0 }, /* 268 = linux_statfs64 */ - { 0, (sy_call_t *)linux_fstatfs64, AUE_NULL, NULL, 0, 0 }, /* 269 = linux_fstatfs64 */ + { AS(linux_statfs64_args), (sy_call_t *)linux_statfs64, AUE_STATFS, NULL, 0, 0 }, /* 268 = linux_statfs64 */ + { 0, (sy_call_t *)linux_fstatfs64, AUE_FSTATFS, NULL, 0, 0 }, /* 269 = linux_fstatfs64 */ { AS(linux_tgkill_args), (sy_call_t *)linux_tgkill, AUE_NULL, NULL, 0, 0 }, /* 270 = linux_tgkill */ - { 0, (sy_call_t *)linux_utimes, AUE_NULL, NULL, 0, 0 }, /* 271 = linux_utimes */ + { AS(linux_utimes_args), (sy_call_t *)linux_utimes, AUE_UTIMES, NULL, 0, 0 }, /* 271 = linux_utimes */ { 0, (sy_call_t *)linux_fadvise64_64, AUE_NULL, NULL, 0, 0 }, /* 272 = linux_fadvise64_64 */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 273 = */ { 0, (sy_call_t *)linux_mbind, AUE_NULL, NULL, 0, 0 }, /* 274 = linux_mbind */ ==== //depot/projects/vimage/src/sys/amd64/linux32/syscalls.master#2 (text+ko) ==== @@ -1,4 +1,4 @@ - $FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.23 2006/10/29 14:02:38 netchild Exp $ + $FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.25 2006/12/31 13:16:00 netchild Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 ; System call name/number master file (or rather, slave, from LINUX). @@ -50,7 +50,7 @@ 6 AUE_CLOSE NOPROTO { int close(int fd); } 7 AUE_WAIT4 STD { int linux_waitpid(l_pid_t pid, \ l_int *status, l_int options); } -8 AUE_O_CREAT STD { int linux_creat(char *path, \ +8 AUE_CREAT STD { int linux_creat(char *path, \ l_int mode); } 9 AUE_LINK STD { int linux_link(char *path, char *to); } 10 AUE_UNLINK STD { int linux_unlink(char *path); } @@ -80,7 +80,7 @@ 26 AUE_PTRACE STD { int linux_ptrace(l_long req, l_long pid, \ l_long addr, l_long data); } 27 AUE_NULL STD { int linux_alarm(l_uint secs); } -28 AUE_NULL UNIMPL fstat +28 AUE_FSTAT UNIMPL fstat 29 AUE_NULL STD { int linux_pause(void); } 30 AUE_UTIME STD { int linux_utime(char *fname, \ struct l_utimbuf *times); } @@ -160,11 +160,11 @@ 84 AUE_LSTAT STD { int linux_lstat(char *path, struct linux_lstat *up); } 85 AUE_READLINK STD { int linux_readlink(char *name, char *buf, \ l_int count); } -86 AUE_NULL UNIMPL linux_uselib +86 AUE_USELIB UNIMPL linux_uselib 87 AUE_SWAPON NOPROTO { int swapon(char *name); } 88 AUE_REBOOT STD { int linux_reboot(l_int magic1, \ l_int magic2, l_uint cmd, void *arg); } -89 AUE_O_GETDENTS STD { int linux_readdir(l_uint fd, \ +89 AUE_GETDIRENTRIES STD { int linux_readdir(l_uint fd, \ struct l_dirent *dent, l_uint count); } 90 AUE_MMAP STD { int linux_mmap(struct l_mmap_argv *ptr); } 91 AUE_MUNMAP NOPROTO { int munmap(caddr_t addr, int len); } @@ -176,7 +176,7 @@ 96 AUE_GETPRIORITY STD { int linux_getpriority(int which, int who); } 97 AUE_SETPRIORITY NOPROTO { int setpriority(int which, int who, \ int prio); } -98 AUE_AUE_PROFILE UNIMPL profil +98 AUE_PROFILE UNIMPL profil 99 AUE_STATFS STD { int linux_statfs(char *path, \ struct l_statfs_buf *buf); } 100 AUE_FSTATFS STD { int linux_fstatfs(l_uint fd, \ @@ -243,7 +243,7 @@ 140 AUE_LSEEK STD { int linux_llseek(l_int fd, l_ulong ohigh, \ l_ulong olow, l_loff_t *res, \ l_uint whence); } -141 AUE_O_GETDENTS STD { int linux_getdents(l_uint fd, void *dent, \ +141 AUE_GETDIRENTRIES STD { int linux_getdents(l_uint fd, void *dent, \ l_uint count); } 142 AUE_SELECT STD { int linux_select(l_int nfds, \ l_fd_set *readfds, l_fd_set *writefds, \ @@ -252,9 +252,9 @@ 143 AUE_FLOCK NOPROTO { int flock(int fd, int how); } 144 AUE_MSYNC STD { int linux_msync(l_ulong addr, \ l_size_t len, l_int fl); } -145 AUE_READV STD { int linux_readv(int fd, struct iovec32 *iovp, \ +145 AUE_READV STD { int linux_readv(int fd, struct iovec32 *iovp, \ u_int iovcnt); } -146 AUE_WRITEV STD { int linux_writev(int fd, struct iovec32 *iovp, \ +146 AUE_WRITEV STD { int linux_writev(int fd, struct iovec32 *iovp, \ u_int iovcnt); } 147 AUE_GETSID STD { int linux_getsid(l_pid_t pid); } 148 AUE_NULL STD { int linux_fdatasync(l_uint fd); } @@ -268,16 +268,17 @@ const struct sched_param *param); } 155 AUE_SCHED_GETPARAM NOPROTO { int sched_getparam(pid_t pid, \ struct sched_param *param); } -156 AUE_SCHED_SETSCHEDULER STD { int linux_sched_setscheduler(l_pid_t pid, \ - l_int policy, \ +156 AUE_SCHED_SETSCHEDULER STD { int linux_sched_setscheduler( \ + l_pid_t pid, l_int policy, \ struct l_sched_param *param); } -157 AUE_SCHED_GETSCHEDULER STD { int linux_sched_getscheduler(l_pid_t pid); } +157 AUE_SCHED_GETSCHEDULER STD { int linux_sched_getscheduler( \ + l_pid_t pid); } 158 AUE_NULL NOPROTO { int sched_yield(void); } -159 AUE_SCHED_GET_PRIORITY_MAX STD { int linux_sched_get_priority_max( \ +159 AUE_SCHED_GET_PRIORITY_MAX STD { int linux_sched_get_priority_max( \ l_int policy); } -160 AUE_SCHED_GET_PRIORITY_MIN STD { int linux_sched_get_priority_min( \ +160 AUE_SCHED_GET_PRIORITY_MIN STD { int linux_sched_get_priority_min( \ l_int policy); } -161 AUE_SCHED_RR_GET_INTERVAL STD { int linux_sched_rr_get_interval(l_pid_t pid, \ +161 AUE_SCHED_RR_GET_INTERVAL STD { int linux_sched_rr_get_interval(l_pid_t pid, \ struct l_timespec *interval); } 162 AUE_NULL STD { int linux_nanosleep( \ const struct l_timespec *rqtp, \ @@ -310,7 +311,10 @@ l_size_t sigsetsize); } 176 AUE_NULL STD { int linux_rt_sigpending(l_sigset_t *set, \ l_size_t sigsetsize); } -177 AUE_NULL STD { int linux_rt_sigtimedwait(void); } +177 AUE_NULL STD { int linux_rt_sigtimedwait(l_sigset_t *mask, \ + l_siginfo_t *ptr, \ + struct l_timeval *timeout, \ + l_size_t sigsetsize); } 178 AUE_NULL STD { int linux_rt_sigqueueinfo(void); } 179 AUE_NULL STD { int linux_rt_sigsuspend( \ l_sigset_t *newset, \ @@ -379,7 +383,7 @@ l_size_t len, u_char *vec); } 219 AUE_MADVISE NOPROTO { int madvise(void *addr, size_t len, \ int behav); } -220 AUE_O_GETDENTS STD { int linux_getdents64(l_uint fd, \ +220 AUE_GETDIRENTRIES STD { int linux_getdents64(l_uint fd, \ void *dirent, l_uint count); } 221 AUE_FCNTL STD { int linux_fcntl64(l_uint fd, l_uint cmd, \ uintptr_t arg); } @@ -431,10 +435,11 @@ 266 AUE_NULL STD { int linux_clock_getres(clockid_t which, struct l_timespec *tp); } 267 AUE_NULL STD { int linux_clock_nanosleep(clockid_t which, int flags, \ struct l_timespec *rqtp, struct l_timespec *rmtp); } -268 AUE_NULL STD { int linux_statfs64(char *path, struct l_statfs64_buf *buf); } -269 AUE_NULL STD { int linux_fstatfs64(void); } +268 AUE_STATFS STD { int linux_statfs64(char *path, struct l_statfs64_buf *buf); } +269 AUE_FSTATFS STD { int linux_fstatfs64(void); } 270 AUE_NULL STD { int linux_tgkill(int tgid, int pid, int sig); } -271 AUE_NULL STD { int linux_utimes(void); } +271 AUE_UTIMES STD { int linux_utimes(char *fname, \ + struct l_timeval *tptr); } 272 AUE_NULL STD { int linux_fadvise64_64(void); } 273 AUE_NULL UNIMPL 274 AUE_NULL STD { int linux_mbind(void); } ==== //depot/projects/vimage/src/sys/arm/at91/at91_mci.c#2 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/at91/at91_mci.c,v 1.1 2006/10/20 06:44:04 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/at91/at91_mci.c,v 1.2 2007/01/05 01:18:32 ticso Exp $"); #include #include @@ -403,12 +403,14 @@ } // printf("CMDR %x ARGR %x with data\n", cmdr, cmd->arg); WR4(sc, MCI_ARGR, cmd->arg); - WR4(sc, MCI_CMDR, cmdr); if (cmdr & MCI_CMDR_TRCMD_START) { - if (cmdr & MCI_CMDR_TRDIR) + if (cmdr & MCI_CMDR_TRDIR) { WR4(sc, PDC_PTCR, PDC_PTCR_RXTEN); - else + WR4(sc, MCI_CMDR, cmdr); + } else { + WR4(sc, MCI_CMDR, cmdr); WR4(sc, PDC_PTCR, PDC_PTCR_TXTEN); + } } WR4(sc, MCI_IER, MCI_SR_ERROR | ier); } ==== //depot/projects/vimage/src/sys/arm/at91/at91_pioreg.h#2 (text) ==== @@ -22,7 +22,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $FreeBSD: src/sys/arm/at91/at91_pioreg.h,v 1.1 2006/03/24 07:39:29 imp Exp $ */ +/* $FreeBSD: src/sys/arm/at91/at91_pioreg.h,v 1.2 2007/01/01 00:46:54 imp Exp $ */ #ifndef ARM_AT91_AT91_PIOREG_H #define ARM_AT91_AT91_PIOREG_H @@ -52,8 +52,8 @@ #define PIO_MDDR 0x54 /* PIO Multi-Driver Disable Register */ #define PIO_MDSR 0x58 /* PIO Multi-Driver Status Register */ /* 0x5c reserved */ -#define PIO_PUER 0x60 /* PIO Pull-up Enable Register */ -#define PIO_PUDR 0x64 /* PIO Pull-up Disable Register */ +#define PIO_PUDR 0x60 /* PIO Pull-up Disable Register */ +#define PIO_PUER 0x64 /* PIO Pull-up Enable Register */ #define PIO_PUSR 0x68 /* PIO Pull-up Status Register */ /* 0x6c reserved */ #define PIO_ASR 0x70 /* PIO Peripheral A Select Register */ ==== //depot/projects/vimage/src/sys/arm/at91/at91_pmc.c#2 (text) ==== @@ -25,7 +25,7 @@ #include "opt_at91.h" #include -__FBSDID("$FreeBSD: src/sys/arm/at91/at91_pmc.c,v 1.3 2006/07/14 22:01:51 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/at91/at91_pmc.c,v 1.4 2007/01/05 01:14:14 ticso Exp $"); #include #include @@ -399,7 +399,7 @@ pmc_softc->dev = dev; if ((err = at91_pmc_activate(dev)) != 0) return err; -#ifdef AT91_TSC +#if defined(AT91_TSC) | defined (AT91_BWCT) at91_pmc_init_clock(pmc_softc, 16000000); #else at91_pmc_init_clock(pmc_softc, 10000000); ==== //depot/projects/vimage/src/sys/arm/at91/at91_spireg.h#2 (text) ==== @@ -22,7 +22,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* $FreeBSD: src/sys/arm/at91/at91_spireg.h,v 1.2 2006/07/14 21:35:59 imp Exp $ */ +/* $FreeBSD: src/sys/arm/at91/at91_spireg.h,v 1.3 2007/01/01 00:50:25 imp Exp $ */ #ifndef ARM_AT91_AT91_SPIREG_H #define ARM_AT91_AT91_SPIREG_H @@ -51,7 +51,7 @@ #define SPI_SR_OVRES 0x00008 #define SPI_SR_ENDRX 0x00010 #define SPI_SR_ENDTX 0x00020 -#define SPI_SR_RXBUFE 0x00040 +#define SPI_SR_RXBUFF 0x00040 #define SPI_SR_TXBUFE 0x00080 #define SPI_SR_SPIENS 0x10000 #define SPI_IER 0x14 /* IER: Interrupt Enable Regsiter */ ==== //depot/projects/vimage/src/sys/arm/at91/at91_st.c#3 (text) ==== @@ -23,7 +23,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/at91/at91_st.c,v 1.6 2006/12/15 21:44:48 n_hibma Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/at91/at91_st.c,v 1.7 2007/01/05 02:52:06 ticso Exp $"); >>> TRUNCATED FOR MAIL (1000 lines) <<<