PERFORCE change 115252 for review
Paolo Pisati
piso at FreeBSD.org
Fri Mar 2 16:22:54 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=115252
Change 115252 by piso at piso_newluxor on 2007/03/02 16:22:25
IFC at 115249
Affected files ...
.. //depot/projects/soc2006/intr_filter/amd64/linux32/linux.h#7 integrate
.. //depot/projects/soc2006/intr_filter/amd64/linux32/linux32_machdep.c#10 integrate
.. //depot/projects/soc2006/intr_filter/arm/at91/at91_rtc.c#7 integrate
.. //depot/projects/soc2006/intr_filter/arm/at91/at91_spi.c#6 integrate
.. //depot/projects/soc2006/intr_filter/arm/at91/ohci_atmelarm.c#2 integrate
.. //depot/projects/soc2006/intr_filter/cam/scsi/scsi_target.c#3 integrate
.. //depot/projects/soc2006/intr_filter/compat/linprocfs/linprocfs.c#9 integrate
.. //depot/projects/soc2006/intr_filter/compat/linux/linux_emul.c#9 integrate
.. //depot/projects/soc2006/intr_filter/conf/NOTES#15 integrate
.. //depot/projects/soc2006/intr_filter/conf/files#14 integrate
.. //depot/projects/soc2006/intr_filter/conf/kmod.mk#6 integrate
.. //depot/projects/soc2006/intr_filter/conf/options#14 integrate
.. //depot/projects/soc2006/intr_filter/contrib/dev/ipw/LICENSE#1 branch
.. //depot/projects/soc2006/intr_filter/contrib/dev/ipw/ipw2100-1.3-i.fw.uu#1 branch
.. //depot/projects/soc2006/intr_filter/contrib/dev/ipw/ipw2100-1.3-p.fw.uu#1 branch
.. //depot/projects/soc2006/intr_filter/contrib/dev/ipw/ipw2100-1.3.fw.uu#1 branch
.. //depot/projects/soc2006/intr_filter/contrib/dev/iwi/LICENSE#1 branch
.. //depot/projects/soc2006/intr_filter/contrib/dev/iwi/ipw2200-bss.fw.uu#1 branch
.. //depot/projects/soc2006/intr_filter/contrib/dev/iwi/ipw2200-ibss.fw.uu#1 branch
.. //depot/projects/soc2006/intr_filter/contrib/dev/iwi/ipw2200-sniffer.fw.uu#1 branch
.. //depot/projects/soc2006/intr_filter/dev/acpica/acpi_ec.c#2 integrate
.. //depot/projects/soc2006/intr_filter/dev/ata/ata-chipset.c#12 integrate
.. //depot/projects/soc2006/intr_filter/dev/ata/atapi-cam.c#3 integrate
.. //depot/projects/soc2006/intr_filter/dev/em/if_em.c#18 integrate
.. //depot/projects/soc2006/intr_filter/dev/fdc/fdc.c#10 integrate
.. //depot/projects/soc2006/intr_filter/dev/firewire/fwohci.c#2 integrate
.. //depot/projects/soc2006/intr_filter/dev/firewire/sbp.c#3 integrate
.. //depot/projects/soc2006/intr_filter/dev/hptmv/entry.c#5 integrate
.. //depot/projects/soc2006/intr_filter/dev/hptmv/ioctl.c#2 integrate
.. //depot/projects/soc2006/intr_filter/dev/hwpmc/hwpmc_mod.c#4 integrate
.. //depot/projects/soc2006/intr_filter/dev/ipmi/ipmi_ssif.c#2 integrate
.. //depot/projects/soc2006/intr_filter/dev/pccard/pccard_cis.c#3 integrate
.. //depot/projects/soc2006/intr_filter/dev/pccbb/pccbb.c#10 integrate
.. //depot/projects/soc2006/intr_filter/dev/random/randomdev_soft.c#2 integrate
.. //depot/projects/soc2006/intr_filter/dev/re/if_re.c#17 integrate
.. //depot/projects/soc2006/intr_filter/dev/scd/scd.c#2 integrate
.. //depot/projects/soc2006/intr_filter/dev/usb/sl811hs.c#3 integrate
.. //depot/projects/soc2006/intr_filter/dev/usb/sl811hsvar.h#3 integrate
.. //depot/projects/soc2006/intr_filter/dev/usb/umass.c#5 integrate
.. //depot/projects/soc2006/intr_filter/dev/usb/usb_subr.c#4 integrate
.. //depot/projects/soc2006/intr_filter/dev/usb/usbdevs#10 integrate
.. //depot/projects/soc2006/intr_filter/dev/usb/uvscom.c#3 integrate
.. //depot/projects/soc2006/intr_filter/dev/zs/z8530var.h#5 integrate
.. //depot/projects/soc2006/intr_filter/dev/zs/zs.c#6 integrate
.. //depot/projects/soc2006/intr_filter/fs/fifofs/fifo_vnops.c#2 integrate
.. //depot/projects/soc2006/intr_filter/fs/smbfs/smbfs_smb.c#3 integrate
.. //depot/projects/soc2006/intr_filter/geom/eli/g_eli.c#7 integrate
.. //depot/projects/soc2006/intr_filter/geom/geom_dev.c#4 integrate
.. //depot/projects/soc2006/intr_filter/geom/geom_io.c#4 integrate
.. //depot/projects/soc2006/intr_filter/geom/multipath/g_multipath.c#1 branch
.. //depot/projects/soc2006/intr_filter/geom/multipath/g_multipath.h#1 branch
.. //depot/projects/soc2006/intr_filter/gnu/fs/ext2fs/ext2_vnops.c#4 integrate
.. //depot/projects/soc2006/intr_filter/i386/ibcs2/ibcs2_xenix.c#5 integrate
.. //depot/projects/soc2006/intr_filter/i386/linux/linux.h#6 integrate
.. //depot/projects/soc2006/intr_filter/i386/linux/linux_machdep.c#9 integrate
.. //depot/projects/soc2006/intr_filter/isa/syscons_isa.c#2 integrate
.. //depot/projects/soc2006/intr_filter/kern/kern_fork.c#8 integrate
.. //depot/projects/soc2006/intr_filter/kern/kern_intr.c#33 integrate
.. //depot/projects/soc2006/intr_filter/kern/kern_jail.c#5 integrate
.. //depot/projects/soc2006/intr_filter/kern/kern_linker.c#9 integrate
.. //depot/projects/soc2006/intr_filter/kern/kern_mutex.c#7 integrate
.. //depot/projects/soc2006/intr_filter/kern/kern_rwlock.c#5 integrate
.. //depot/projects/soc2006/intr_filter/kern/kern_sx.c#6 integrate
.. //depot/projects/soc2006/intr_filter/kern/kern_synch.c#7 integrate
.. //depot/projects/soc2006/intr_filter/kern/link_elf.c#6 integrate
.. //depot/projects/soc2006/intr_filter/kern/sched_4bsd.c#10 integrate
.. //depot/projects/soc2006/intr_filter/kern/subr_bus.c#11 integrate
.. //depot/projects/soc2006/intr_filter/kern/sys_generic.c#5 integrate
.. //depot/projects/soc2006/intr_filter/kern/uipc_usrreq.c#10 integrate
.. //depot/projects/soc2006/intr_filter/modules/Makefile#12 integrate
.. //depot/projects/soc2006/intr_filter/modules/geom/Makefile#5 integrate
.. //depot/projects/soc2006/intr_filter/modules/geom/geom_multipath/Makefile#1 branch
.. //depot/projects/soc2006/intr_filter/modules/ipwfw/Makefile#1 branch
.. //depot/projects/soc2006/intr_filter/modules/ipwfw/ipw_bss/Makefile#1 branch
.. //depot/projects/soc2006/intr_filter/modules/ipwfw/ipw_ibss/Makefile#1 branch
.. //depot/projects/soc2006/intr_filter/modules/ipwfw/ipw_monitor/Makefile#1 branch
.. //depot/projects/soc2006/intr_filter/modules/iwifw/Makefile#1 branch
.. //depot/projects/soc2006/intr_filter/modules/iwifw/iwi_bss/Makefile#1 branch
.. //depot/projects/soc2006/intr_filter/modules/iwifw/iwi_ibss/Makefile#1 branch
.. //depot/projects/soc2006/intr_filter/modules/iwifw/iwi_monitor/Makefile#1 branch
.. //depot/projects/soc2006/intr_filter/net/bpf.c#8 integrate
.. //depot/projects/soc2006/intr_filter/net/bpf.h#4 integrate
.. //depot/projects/soc2006/intr_filter/net/bpfdesc.h#3 integrate
.. //depot/projects/soc2006/intr_filter/net/if_vlan_var.h#3 integrate
.. //depot/projects/soc2006/intr_filter/netgraph/ng_source.c#2 integrate
.. //depot/projects/soc2006/intr_filter/netgraph/ng_source.h#2 integrate
.. //depot/projects/soc2006/intr_filter/netinet/in.h#4 integrate
.. //depot/projects/soc2006/intr_filter/netinet/ip_mroute.c#5 integrate
.. //depot/projects/soc2006/intr_filter/netinet/ip_output.c#7 integrate
.. //depot/projects/soc2006/intr_filter/netinet/tcp_input.c#9 integrate
.. //depot/projects/soc2006/intr_filter/netinet/tcp_output.c#5 integrate
.. //depot/projects/soc2006/intr_filter/netinet/tcp_subr.c#7 integrate
.. //depot/projects/soc2006/intr_filter/netinet/tcp_timer.c#4 integrate
.. //depot/projects/soc2006/intr_filter/netinet/tcp_timer.h#4 integrate
.. //depot/projects/soc2006/intr_filter/netinet/tcp_usrreq.c#7 integrate
.. //depot/projects/soc2006/intr_filter/netinet/tcp_var.h#6 integrate
.. //depot/projects/soc2006/intr_filter/netinet6/ip6_mroute.c#5 integrate
.. //depot/projects/soc2006/intr_filter/netinet6/ip6_mroute.h#4 integrate
.. //depot/projects/soc2006/intr_filter/netncp/ncp_sock.c#3 integrate
.. //depot/projects/soc2006/intr_filter/nfsclient/bootp_subr.c#5 integrate
.. //depot/projects/soc2006/intr_filter/pc98/cbus/syscons_cbus.c#2 integrate
.. //depot/projects/soc2006/intr_filter/powerpc/powermac/pswitch.c#6 integrate
.. //depot/projects/soc2006/intr_filter/sys/extattr.h#4 integrate
.. //depot/projects/soc2006/intr_filter/sys/lock.h#4 integrate
.. //depot/projects/soc2006/intr_filter/sys/lock_profile.h#4 integrate
.. //depot/projects/soc2006/intr_filter/sys/mbuf.h#7 integrate
.. //depot/projects/soc2006/intr_filter/sys/mutex.h#6 integrate
.. //depot/projects/soc2006/intr_filter/sys/param.h#9 integrate
.. //depot/projects/soc2006/intr_filter/sys/priv.h#3 integrate
.. //depot/projects/soc2006/intr_filter/sys/rwlock.h#5 integrate
.. //depot/projects/soc2006/intr_filter/sys/systm.h#9 integrate
.. //depot/projects/soc2006/intr_filter/sys/unpcb.h#4 integrate
.. //depot/projects/soc2006/intr_filter/tools/fw_stub.awk#4 integrate
.. //depot/projects/soc2006/intr_filter/ufs/ffs/ffs_vnops.c#6 integrate
.. //depot/projects/soc2006/intr_filter/ufs/ufs/ufs_vnops.c#7 integrate
.. //depot/projects/soc2006/intr_filter/vm/swap_pager.c#7 integrate
.. //depot/projects/soc2006/intr_filter/vm/vm_object.c#8 integrate
Differences ...
==== //depot/projects/soc2006/intr_filter/amd64/linux32/linux.h#7 (text+ko) ====
@@ -8,7 +8,7 @@
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer
+ * notice, this list of conditions and the following disclaimer
* in this position and unchanged.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
@@ -27,11 +27,11 @@
* (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.13 2007/02/24 16:49:24 netchild Exp $
+ * $FreeBSD: src/sys/amd64/linux32/linux.h,v 1.14 2007/03/02 00:08:47 jkim Exp $
*/
-#ifndef _AMD64_LINUX_LINUX_H_
-#define _AMD64_LINUX_LINUX_H_
+#ifndef _AMD64_LINUX_H_
+#define _AMD64_LINUX_H_
#include <amd64/linux32/linux32_syscall.h>
@@ -39,20 +39,20 @@
* debugging support
*/
extern u_char linux_debug_map[];
-#define ldebug(name) isclr(linux_debug_map, LINUX_SYS_linux_ ## name)
-#define ARGS(nm, fmt) "linux(%ld): "#nm"("fmt")\n", (long)td->td_proc->p_pid
-#define LMSG(fmt) "linux(%ld): "fmt"\n", (long)td->td_proc->p_pid
+#define ldebug(name) isclr(linux_debug_map, LINUX_SYS_linux_ ## name)
+#define ARGS(nm, fmt) "linux(%ld): "#nm"("fmt")\n", (long)td->td_proc->p_pid
+#define LMSG(fmt) "linux(%ld): "fmt"\n", (long)td->td_proc->p_pid
#ifdef MALLOC_DECLARE
MALLOC_DECLARE(M_LINUX);
#endif
-#define LINUX32_USRSTACK ((1ul << 32) - PAGE_SIZE)
+#define LINUX32_USRSTACK ((1ul << 32) - PAGE_SIZE)
/* XXX 16 = sizeof(linux32_ps_strings) */
-#define LINUX32_PS_STRINGS (LINUX32_USRSTACK - 16)
-#define LINUX32_MAXDSIZ (512*1024*1024) /* 512MB */
-#define LINUX32_MAXSSIZ (64*1024*1024) /* 64MB */
-#define LINUX32_MAXVMEM 0 /* Unlimited */
+#define LINUX32_PS_STRINGS (LINUX32_USRSTACK - 16)
+#define LINUX32_MAXDSIZ (512 * 1024 * 1024) /* 512MB */
+#define LINUX32_MAXSSIZ (64 * 1024 * 1024) /* 64MB */
+#define LINUX32_MAXVMEM 0 /* Unlimited */
#define PTRIN(v) (void *)(uintptr_t)(v)
#define PTROUT(v) (l_uintptr_t)(uintptr_t)(v)
@@ -132,7 +132,7 @@
#define LINUX_RLIMIT_NPROC 6
#define LINUX_RLIMIT_NOFILE 7
#define LINUX_RLIMIT_MEMLOCK 8
-#define LINUX_RLIMIT_AS 9 /* address space limit */
+#define LINUX_RLIMIT_AS 9 /* Address space limit */
#define LINUX_RLIM_NLIMITS 10
@@ -205,21 +205,21 @@
} __packed;
struct l_stat {
- l_ushort st_dev;
- l_ulong st_ino;
- l_ushort st_mode;
- l_ushort st_nlink;
- l_ushort st_uid;
- l_ushort st_gid;
- l_ushort st_rdev;
- l_long st_size;
- struct l_timespec st_atimespec;
- struct l_timespec st_mtimespec;
- struct l_timespec st_ctimespec;
- l_long st_blksize;
- l_long st_blocks;
- l_ulong st_flags;
- l_ulong st_gen;
+ l_ushort st_dev;
+ l_ulong st_ino;
+ l_ushort st_mode;
+ l_ushort st_nlink;
+ l_ushort st_uid;
+ l_ushort st_gid;
+ l_ushort st_rdev;
+ l_long st_size;
+ struct l_timespec st_atimespec;
+ struct l_timespec st_mtimespec;
+ struct l_timespec st_ctimespec;
+ l_long st_blksize;
+ l_long st_blocks;
+ l_ulong st_flags;
+ l_ulong st_gen;
};
struct l_stat64 {
@@ -315,9 +315,9 @@
#define LINUX_SIGADDSET(set, sig) SIGADDSET(set, sig)
/* sigaltstack */
-#define LINUX_MINSIGSTKSZ 2048
-#define LINUX_SS_ONSTACK 1
-#define LINUX_SS_DISABLE 2
+#define LINUX_MINSIGSTKSZ 2048
+#define LINUX_SS_ONSTACK 1
+#define LINUX_SS_DISABLE 2
int linux_to_bsd_sigaltstack(int lsa);
int bsd_to_linux_sigaltstack(int bsa);
@@ -380,11 +380,11 @@
l_uintptr_t uc_link;
l_stack_t uc_stack;
struct l_sigcontext uc_mcontext;
- l_sigset_t uc_sigmask;
+ l_sigset_t uc_sigmask;
} __packed;
-#define LINUX_SI_MAX_SIZE 128
-#define LINUX_SI_PAD_SIZE ((LINUX_SI_MAX_SIZE/sizeof(l_int)) - 3)
+#define LINUX_SI_MAX_SIZE 128
+#define LINUX_SI_PAD_SIZE ((LINUX_SI_MAX_SIZE/sizeof(l_int)) - 3)
union l_sigval {
l_int sival_int;
@@ -423,41 +423,41 @@
} __packed _sigchld;
struct {
- l_uintptr_t _addr; /* faulting insn/memory ref. */
+ l_uintptr_t _addr; /* Faulting insn/memory ref. */
} __packed _sigfault;
struct {
- l_int _band; /* POLL_IN,POLL_OUT,POLL_MSG */
+ l_int _band; /* POLL_IN,POLL_OUT,POLL_MSG */
l_int _fd;
} __packed _sigpoll;
} _sifields;
} __packed l_siginfo_t;
-#define lsi_pid _sifields._kill._pid
-#define lsi_uid _sifields._kill._uid
-#define lsi_status _sifields._sigchld._status
-#define lsi_utime _sifields._sigchld._utime
-#define lsi_stime _sifields._sigchld._stime
-#define lsi_value _sifields._rt._sigval
-#define lsi_int _sifields._rt._sigval.sival_int
-#define lsi_ptr _sifields._rt._sigval.sival_ptr
-#define lsi_addr _sifields._sigfault._addr
-#define lsi_band _sifields._sigpoll._band
-#define lsi_fd _sifields._sigpoll._fd
+#define lsi_pid _sifields._kill._pid
+#define lsi_uid _sifields._kill._uid
+#define lsi_status _sifields._sigchld._status
+#define lsi_utime _sifields._sigchld._utime
+#define lsi_stime _sifields._sigchld._stime
+#define lsi_value _sifields._rt._sigval
+#define lsi_int _sifields._rt._sigval.sival_int
+#define lsi_ptr _sifields._rt._sigval.sival_ptr
+#define lsi_addr _sifields._sigfault._addr
+#define lsi_band _sifields._sigpoll._band
+#define lsi_fd _sifields._sigpoll._fd
struct l_fpreg {
- u_int16_t significand[4];
- u_int16_t exponent;
+ u_int16_t significand[4];
+ u_int16_t exponent;
} __packed;
struct l_fpxreg {
- u_int16_t significand[4];
- u_int16_t exponent;
- u_int16_t padding[3];
+ u_int16_t significand[4];
+ u_int16_t exponent;
+ u_int16_t padding[3];
} __packed;
struct l_xmmreg {
- u_int32_t element[4];
+ u_int32_t element[4];
} __packed;
struct l_fpstate {
@@ -471,13 +471,13 @@
u_int32_t datasel;
struct l_fpreg _st[8];
u_int16_t status;
- u_int16_t magic; /* 0xffff = regular FPU data */
+ u_int16_t magic; /* 0xffff = regular FPU data */
/* FXSR FPU environment */
- u_int32_t _fxsr_env[6]; /* env is ignored */
+ u_int32_t _fxsr_env[6]; /* env is ignored. */
u_int32_t mxcsr;
u_int32_t reserved;
- struct l_fpxreg _fxsr_st[8]; /* reg data is ignored */
+ struct l_fpxreg _fxsr_st[8]; /* reg data is ignored. */
struct l_xmmreg _xmm[8];
u_int32_t padding[56];
} __packed;
@@ -528,22 +528,22 @@
/*
* open/fcntl flags
*/
-#define LINUX_O_RDONLY 00
-#define LINUX_O_WRONLY 01
-#define LINUX_O_RDWR 02
-#define LINUX_O_CREAT 0100
-#define LINUX_O_EXCL 0200
-#define LINUX_O_NOCTTY 0400
-#define LINUX_O_TRUNC 01000
-#define LINUX_O_APPEND 02000
-#define LINUX_O_NONBLOCK 04000
+#define LINUX_O_RDONLY 00000000
+#define LINUX_O_WRONLY 00000001
+#define LINUX_O_RDWR 00000002
+#define LINUX_O_CREAT 00000100
+#define LINUX_O_EXCL 00000200
+#define LINUX_O_NOCTTY 00000400
+#define LINUX_O_TRUNC 00001000
+#define LINUX_O_APPEND 00002000
+#define LINUX_O_NONBLOCK 00004000
#define LINUX_O_NDELAY LINUX_O_NONBLOCK
-#define LINUX_O_SYNC 010000
-#define LINUX_FASYNC 020000
-#define LINUX_O_DIRECT 040000 /* direct disk access hint */
-#define LINUX_O_LARGEFILE 0100000
-#define LINUX_O_DIRECTORY 0200000 /* must be a directory */
-#define LINUX_O_NOFOLLOW 0400000 /* don't follow links */
+#define LINUX_O_SYNC 00010000
+#define LINUX_FASYNC 00020000
+#define LINUX_O_DIRECT 00040000 /* Direct disk access hint */
+#define LINUX_O_LARGEFILE 00100000
+#define LINUX_O_DIRECTORY 00200000 /* Must be a directory */
+#define LINUX_O_NOFOLLOW 00400000 /* Do not follow links */
#define LINUX_O_NOATIME 01000000
#define LINUX_F_DUPFD 0
@@ -568,12 +568,12 @@
/*
* mount flags
*/
-#define LINUX_MS_RDONLY 0x0001
-#define LINUX_MS_NOSUID 0x0002
-#define LINUX_MS_NODEV 0x0004
-#define LINUX_MS_NOEXEC 0x0008
-#define LINUX_MS_REMOUNT 0x0020
-
+#define LINUX_MS_RDONLY 0x0001
+#define LINUX_MS_NOSUID 0x0002
+#define LINUX_MS_NODEV 0x0004
+#define LINUX_MS_NOEXEC 0x0008
+#define LINUX_MS_REMOUNT 0x0020
+
/*
* SystemV IPC defines
*/
@@ -671,13 +671,13 @@
#define LINUX_SO_NO_CHECK 11
#define LINUX_SO_PRIORITY 12
#define LINUX_SO_LINGER 13
-#define LINUX_SO_PEERCRED 17
-#define LINUX_SO_RCVLOWAT 18
-#define LINUX_SO_SNDLOWAT 19
-#define LINUX_SO_RCVTIMEO 20
-#define LINUX_SO_SNDTIMEO 21
-#define LINUX_SO_TIMESTAMP 29
-#define LINUX_SO_ACCEPTCONN 30
+#define LINUX_SO_PEERCRED 17
+#define LINUX_SO_RCVLOWAT 18
+#define LINUX_SO_SNDLOWAT 19
+#define LINUX_SO_RCVTIMEO 20
+#define LINUX_SO_SNDTIMEO 21
+#define LINUX_SO_TIMESTAMP 29
+#define LINUX_SO_ACCEPTCONN 30
#define LINUX_IP_TOS 1
#define LINUX_IP_TTL 2
@@ -727,7 +727,7 @@
} ifr_ifru;
} __packed;
-#define ifr_name ifr_ifrn.ifrn_name /* interface name */
+#define ifr_name ifr_ifrn.ifrn_name /* Interface name */
#define ifr_hwaddr ifr_ifru.ifru_hwaddr /* MAC address */
struct l_ifconf {
@@ -774,89 +774,96 @@
l_uint useable:1;
};
-struct l_desc_struct {
- unsigned long a,b;
-};
+#define LINUX_LOWERWORD 0x0000ffff
-
-#define LINUX_LOWERWORD 0x0000ffff
-
-/*
- * macros which does the same thing as those in linux include/asm-um/ldt-i386.h
- * these convert linux user space descriptor to machine one
+/*
+ * Macros which does the same thing as those in Linux include/asm-um/ldt-i386.h.
+ * These convert Linux user space descriptor to machine one.
*/
-#define LDT_entry_a(info) \
- ((((info)->base_addr & LINUX_LOWERWORD) << 16) | ((info)->limit & LINUX_LOWERWORD))
+#define LINUX_LDT_entry_a(info) \
+ ((((info)->base_addr & LINUX_LOWERWORD) << 16) | \
+ ((info)->limit & LINUX_LOWERWORD))
-#define ENTRY_B_READ_EXEC_ONLY 9
-#define ENTRY_B_CONTENTS 10
-#define ENTRY_B_SEG_NOT_PRESENT 15
-#define ENTRY_B_BASE_ADDR 16
-#define ENTRY_B_USEABLE 20
-#define ENTRY_B_SEG32BIT 22
-#define ENTRY_B_LIMIT 23
+#define LINUX_ENTRY_B_READ_EXEC_ONLY 9
+#define LINUX_ENTRY_B_CONTENTS 10
+#define LINUX_ENTRY_B_SEG_NOT_PRESENT 15
+#define LINUX_ENTRY_B_BASE_ADDR 16
+#define LINUX_ENTRY_B_USEABLE 20
+#define LINUX_ENTRY_B_SEG32BIT 22
+#define LINUX_ENTRY_B_LIMIT 23
-#define LDT_entry_b(info) \
- (((info)->base_addr & 0xff000000) | \
- ((info)->limit & 0xf0000) | \
- ((info)->contents << ENTRY_B_CONTENTS) | \
- (((info)->seg_not_present == 0) << ENTRY_B_SEG_NOT_PRESENT) | \
- (((info)->base_addr & 0x00ff0000) >> ENTRY_B_BASE_ADDR) | \
- (((info)->read_exec_only == 0) << ENTRY_B_READ_EXEC_ONLY) | \
- ((info)->seg_32bit << ENTRY_B_SEG32BIT) | \
- ((info)->useable << ENTRY_B_USEABLE) | \
- ((info)->limit_in_pages << ENTRY_B_LIMIT) | 0x7000)
+#define LINUX_LDT_entry_b(info) \
+ (((info)->base_addr & 0xff000000) | \
+ ((info)->limit & 0xf0000) | \
+ ((info)->contents << LINUX_ENTRY_B_CONTENTS) | \
+ (((info)->seg_not_present == 0) << LINUX_ENTRY_B_SEG_NOT_PRESENT) | \
+ (((info)->base_addr & 0x00ff0000) >> LINUX_ENTRY_B_BASE_ADDR) | \
+ (((info)->read_exec_only == 0) << LINUX_ENTRY_B_READ_EXEC_ONLY) | \
+ ((info)->seg_32bit << LINUX_ENTRY_B_SEG32BIT) | \
+ ((info)->useable << LINUX_ENTRY_B_USEABLE) | \
+ ((info)->limit_in_pages << LINUX_ENTRY_B_LIMIT) | 0x7000)
-#define LDT_empty(info) (\
- (info)->base_addr == 0 && \
- (info)->limit == 0 && \
- (info)->contents == 0 && \
- (info)->seg_not_present == 1 && \
- (info)->read_exec_only == 1 && \
- (info)->seg_32bit == 0 && \
- (info)->limit_in_pages == 0 && \
- (info)->useable == 0 )
+#define LINUX_LDT_empty(info) \
+ ((info)->base_addr == 0 && \
+ (info)->limit == 0 && \
+ (info)->contents == 0 && \
+ (info)->seg_not_present == 1 && \
+ (info)->read_exec_only == 1 && \
+ (info)->seg_32bit == 0 && \
+ (info)->limit_in_pages == 0 && \
+ (info)->useable == 0)
-/* macros for converting segments, they do the same as those in arch/i386/kernel/process.c */
-#define GET_BASE(desc) ( \
- (((desc)->a >> 16) & LINUX_LOWERWORD) | \
- (((desc)->b << 16) & 0x00ff0000) | \
- ( (desc)->b & 0xff000000) )
+/*
+ * Macros for converting segments.
+ * They do the same as those in arch/i386/kernel/process.c in Linux.
+ */
+#define LINUX_GET_BASE(desc) \
+ ((((desc)->a >> 16) & LINUX_LOWERWORD) | \
+ (((desc)->b << 16) & 0x00ff0000) | \
+ ((desc)->b & 0xff000000))
-#define GET_LIMIT(desc) ( \
- ((desc)->a & LINUX_LOWERWORD) | \
- ((desc)->b & 0xf0000) )
+#define LINUX_GET_LIMIT(desc) \
+ (((desc)->a & LINUX_LOWERWORD) | \
+ ((desc)->b & 0xf0000))
-#define GET_32BIT(desc) (((desc)->b >> ENTRY_B_SEG32BIT) & 1)
-#define GET_CONTENTS(desc) (((desc)->b >> ENTRY_B_CONTENTS) & 3)
-#define GET_WRITABLE(desc) (((desc)->b >> ENTRY_B_READ_EXEC_ONLY) & 1)
-#define GET_LIMIT_PAGES(desc) (((desc)->b >> ENTRY_B_LIMIT) & 1)
-#define GET_PRESENT(desc) (((desc)->b >> ENTRY_B_SEG_NOT_PRESENT) & 1)
-#define GET_USEABLE(desc) (((desc)->b >> ENTRY_B_USEABLE) & 1)
+#define LINUX_GET_32BIT(desc) \
+ (((desc)->b >> LINUX_ENTRY_B_SEG32BIT) & 1)
+#define LINUX_GET_CONTENTS(desc) \
+ (((desc)->b >> LINUX_ENTRY_B_CONTENTS) & 3)
+#define LINUX_GET_WRITABLE(desc) \
+ (((desc)->b >> LINUX_ENTRY_B_READ_EXEC_ONLY) & 1)
+#define LINUX_GET_LIMIT_PAGES(desc) \
+ (((desc)->b >> LINUX_ENTRY_B_LIMIT) & 1)
+#define LINUX_GET_PRESENT(desc) \
+ (((desc)->b >> LINUX_ENTRY_B_SEG_NOT_PRESENT) & 1)
+#define LINUX_GET_USEABLE(desc) \
+ (((desc)->b >> LINUX_ENTRY_B_USEABLE) & 1)
-#define LINUX_CLOCK_REALTIME 0
-#define LINUX_CLOCK_MONOTONIC 1
-#define LINUX_CLOCK_PROCESS_CPUTIME_ID 2
-#define LINUX_CLOCK_THREAD_CPUTIME_ID 3
-#define LINUX_CLOCK_REALTIME_HR 4
-#define LINUX_CLOCK_MONOTONIC_HR 5
+#define LINUX_CLOCK_REALTIME 0
+#define LINUX_CLOCK_MONOTONIC 1
+#define LINUX_CLOCK_PROCESS_CPUTIME_ID 2
+#define LINUX_CLOCK_THREAD_CPUTIME_ID 3
+#define LINUX_CLOCK_REALTIME_HR 4
+#define LINUX_CLOCK_MONOTONIC_HR 5
typedef int l_timer_t;
typedef int l_mqd_t;
-#define CLONE_VM 0x100
-#define CLONE_FS 0x200
-#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
-#define CLONE_CHILD_CLEARTID 0x00200000
-#define CLONE_CHILD_SETTID 0x01000000
-#define CLONE_PARENT_SETTID 0x00100000
+#define LINUX_CLONE_VM 0x00000100
+#define LINUX_CLONE_FS 0x00000200
+#define LINUX_CLONE_FILES 0x00000400
+#define LINUX_CLONE_SIGHAND 0x00000800
+#define LINUX_CLONE_PID 0x00001000 /* No longer exist in Linux */
+#define LINUX_CLONE_VFORK 0x00004000
+#define LINUX_CLONE_PARENT 0x00008000
+#define LINUX_CLONE_THREAD 0x00010000
+#define LINUX_CLONE_SETTLS 0x00080000
+#define LINUX_CLONE_PARENT_SETTID 0x00100000
+#define LINUX_CLONE_CHILD_CLEARTID 0x00200000
+#define LINUX_CLONE_CHILD_SETTID 0x01000000
-#define THREADING_FLAGS (CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND)
+#define LINUX_THREADING_FLAGS \
+ (LINUX_CLONE_VM | LINUX_CLONE_FS | LINUX_CLONE_FILES | \
+ LINUX_CLONE_SIGHAND | LINUX_CLONE_THREAD)
-#endif /* !_AMD64_LINUX_LINUX_H_ */
+#endif /* !_AMD64_LINUX_H_ */
==== //depot/projects/soc2006/intr_filter/amd64/linux32/linux32_machdep.c#10 (text+ko) ====
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.34 2007/02/24 16:49:24 netchild Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.36 2007/03/02 00:08:47 jkim Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -561,9 +561,9 @@
if (exit_signal <= LINUX_SIGTBLSZ)
exit_signal = linux_to_bsd_signal[_SIG_IDX(exit_signal)];
- if (args->flags & CLONE_VM)
+ if (args->flags & LINUX_CLONE_VM)
ff |= RFMEM;
- if (args->flags & CLONE_SIGHAND)
+ if (args->flags & LINUX_CLONE_SIGHAND)
ff |= RFSIGSHARE;
/*
* XXX: in linux sharing of fs info (chroot/cwd/umask)
@@ -571,7 +571,7 @@
* structure but in reality it doesn't cause any problems
* because both of these flags are usually set together.
*/
- if (!(args->flags & (CLONE_FILES | CLONE_FS)))
+ if (!(args->flags & (LINUX_CLONE_FILES | LINUX_CLONE_FS)))
ff |= RFFDG;
/*
@@ -587,14 +587,14 @@
* that special treatment is necessary for signal delivery
* between those processes and fd locking.
*/
- if ((args->flags & 0xffffff00) == THREADING_FLAGS)
+ if ((args->flags & 0xffffff00) == LINUX_THREADING_FLAGS)
ff |= RFTHREAD;
error = fork1(td, ff, 0, &p2);
if (error)
return (error);
- if (args->flags & (CLONE_PARENT|CLONE_THREAD)) {
+ if (args->flags & (LINUX_CLONE_PARENT | LINUX_CLONE_THREAD)) {
sx_xlock(&proctree_lock);
PROC_LOCK(p2);
proc_reparent(p2, td->td_proc->p_pptr);
@@ -608,7 +608,7 @@
em = em_find(p2, EMUL_DOLOCK);
KASSERT(em != NULL, ("clone: emuldata not found.\n"));
/* and adjust it */
- if (args->flags & CLONE_PARENT_SETTID) {
+ if (args->flags & LINUX_CLONE_PARENT_SETTID) {
if (args->parent_tidptr == NULL) {
EMUL_UNLOCK(&emul_lock);
return (EINVAL);
@@ -620,7 +620,7 @@
}
}
- if (args->flags & CLONE_THREAD) {
+ if (args->flags & LINUX_CLONE_THREAD) {
/* XXX: linux mangles pgrp and pptr somehow
* I think it might be this but I am not sure.
*/
@@ -632,12 +632,12 @@
exit_signal = 0;
}
- if (args->flags & CLONE_CHILD_SETTID)
+ if (args->flags & LINUX_CLONE_CHILD_SETTID)
em->child_set_tid = args->child_tidptr;
else
em->child_set_tid = NULL;
- if (args->flags & CLONE_CHILD_CLEARTID)
+ if (args->flags & LINUX_CLONE_CHILD_CLEARTID)
em->child_clear_tid = args->child_tidptr;
else
em->child_clear_tid = NULL;
@@ -655,7 +655,7 @@
if (args->stack)
td2->td_frame->tf_rsp = PTROUT(args->stack);
- if (args->flags & CLONE_SETTLS) {
+ if (args->flags & LINUX_CLONE_SETTLS) {
/* XXX: todo */
}
@@ -664,7 +664,7 @@
printf(LMSG("clone: successful rfork to %ld, stack %p sig = %d"),
(long)p2->p_pid, args->stack, exit_signal);
#endif
- if (args->flags & CLONE_VFORK) {
+ if (args->flags & LINUX_CLONE_VFORK) {
PROC_LOCK(p2);
p2->p_flag |= P_PPWAIT;
PROC_UNLOCK(p2);
@@ -681,7 +681,7 @@
td->td_retval[0] = p2->p_pid;
td->td_retval[1] = 0;
- if (args->flags & CLONE_VFORK) {
+ if (args->flags & LINUX_CLONE_VFORK) {
/* wait for the children to exit, ie. emulate vfork */
PROC_LOCK(p2);
while (p2->p_flag & P_PPWAIT)
@@ -793,7 +793,9 @@
if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC))
bsd_args.prot |= PROT_READ | PROT_EXEC;
- if (linux_args->fd != -1) {
+ /* Linux does not check file descriptor when MAP_ANONYMOUS is set. */
+ bsd_args.fd = (bsd_args.flags & MAP_ANON) ? -1 : linux_args->fd;
+ if (bsd_args.fd != -1) {
/*
* Linux follows Solaris mmap(2) description:
* The file descriptor fildes is opened with
@@ -801,7 +803,7 @@
* protection options specified.
*/
- if ((error = fget(td, linux_args->fd, &fp)) != 0)
+ if ((error = fget(td, bsd_args.fd, &fp)) != 0)
return (error);
if (fp->f_type != DTYPE_VNODE) {
fdrop(fp, td);
@@ -816,7 +818,6 @@
fdrop(fp, td);
}
- bsd_args.fd = linux_args->fd;
if (linux_args->flags & LINUX_MAP_GROWSDOWN) {
/*
==== //depot/projects/soc2006/intr_filter/arm/at91/at91_rtc.c#7 (text) ====
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/at91/at91_rtc.c,v 1.3 2007/02/23 12:18:27 piso Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/at91/at91_rtc.c,v 1.4 2007/02/27 13:39:34 piso Exp $");
#include <sys/param.h>
#include <sys/systm.h>
==== //depot/projects/soc2006/intr_filter/arm/at91/at91_spi.c#6 (text) ====
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/at91/at91_spi.c,v 1.5 2007/02/23 12:18:27 piso Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/at91/at91_spi.c,v 1.6 2007/02/27 17:15:39 jhb Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -248,7 +248,7 @@
rxdone = sc->rxdone;
do {
- err = msleep(&sc->rxdone, NULL, PCATCH | PZERO, "spi", hz);
+ err = tsleep(&sc->rxdone, PCATCH | PZERO, "spi", hz);
} while (rxdone == sc->rxdone && err != EINTR);
WR4(sc, PDC_PTCR, PDC_PTCR_TXTDIS | PDC_PTCR_RXTDIS);
if (err == 0) {
==== //depot/projects/soc2006/intr_filter/arm/at91/ohci_atmelarm.c#2 (text) ====
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/arm/at91/ohci_atmelarm.c,v 1.1 2006/03/18 01:45:29 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/arm/at91/ohci_atmelarm.c,v 1.2 2007/03/01 09:10:55 piso Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -99,8 +99,8 @@
}
device_set_ivars(sc->sc_ohci.sc_bus.bdev, &sc->sc_ohci.sc_bus);
- err = bus_setup_intr(dev, sc->sc_ohci.irq_res, INTR_TYPE_BIO, ohci_intr, sc,
- &sc->sc_ohci.ih);
+ err = bus_setup_intr(dev, sc->sc_ohci.irq_res, INTR_TYPE_BIO, NULL,
+ ohci_intr, sc, &sc->sc_ohci.ih);
if (err) {
err = ENXIO;
goto error;
==== //depot/projects/soc2006/intr_filter/cam/scsi/scsi_target.c#3 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_target.c,v 1.71 2006/12/05 07:45:28 mjacob Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_target.c,v 1.72 2007/02/27 17:15:39 jhb Exp $");
#include <sys/param.h>
@@ -810,8 +810,8 @@
user_descr = TAILQ_FIRST(abort_queue);
while (ccb_h == NULL && user_descr == NULL) {
if ((ioflag & IO_NDELAY) == 0) {
- error = msleep(user_queue, NULL,
- PRIBIO | PCATCH, "targrd", 0);
+ error = tsleep(user_queue,
+ PRIBIO | PCATCH, "targrd", 0);
ccb_h = TAILQ_FIRST(user_queue);
user_descr = TAILQ_FIRST(abort_queue);
if (error != 0) {
@@ -1037,7 +1037,7 @@
/* If we aborted at least one pending CCB ok, wait for it. */
if (cab.ccb_h.status == CAM_REQ_CMP) {
- msleep(&softc->pending_ccb_queue, NULL,
+ tsleep(&softc->pending_ccb_queue,
PRIBIO | PCATCH, "tgabrt", 0);
}
==== //depot/projects/soc2006/intr_filter/compat/linprocfs/linprocfs.c#9 (text+ko) ====
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.105 2007/01/21 13:18:52 netchild Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.106 2007/03/02 01:10:26 jkim Exp $");
#include <sys/param.h>
#include <sys/queue.h>
@@ -416,6 +416,55 @@
}
/*
+ * Get OS build date
+ */
+static void
+linprocfs_osbuild(struct thread *td, struct sbuf *sb)
+{
+#if 0
+ char osbuild[256];
+ char *cp1, *cp2;
+
+ strncpy(osbuild, version, 256);
+ osbuild[255] = '\0';
+ cp1 = strstr(osbuild, "\n");
+ cp2 = strstr(osbuild, ":");
+ if (cp1 && cp2) {
+ *cp1 = *cp2 = '\0';
+ cp1 = strstr(osbuild, "#");
+ } else
+ cp1 = NULL;
+ if (cp1)
+ sbuf_printf(sb, "%s%s", cp1, cp2 + 1);
+ else
+#endif
+ sbuf_cat(sb, "#4 Sun Dec 18 04:30:00 CET 1977");
+}
+
+/*
+ * Get OS builder
+ */
+static void
+linprocfs_osbuilder(struct thread *td, struct sbuf *sb)
+{
+ char builder[256];
+ char *cp;
+
+ cp = strstr(version, "\n ");
+ if (cp) {
+ strncpy(builder, cp + 5, 256);
+ builder[255] = '\0';
+ cp = strstr(builder, ":");
+ if (cp)
+ *cp = '\0';
+ }
+ if (cp)
+ sbuf_cat(sb, builder);
+ else
+ sbuf_cat(sb, "des at freebsd.org");
+}
+
+/*
* Filler function for proc/version
*/
static int
@@ -426,10 +475,12 @@
linux_get_osname(td, osname);
linux_get_osrelease(td, osrelease);
+ sbuf_printf(sb, "%s version %s (", osname, osrelease);
+ linprocfs_osbuilder(td, sb);
+ sbuf_cat(sb, ") (gcc version " __VERSION__ ") ");
+ linprocfs_osbuild(td, sb);
+ sbuf_cat(sb, "\n");
- sbuf_printf(sb,
- "%s version %s (des at freebsd.org) (gcc version " __VERSION__ ")"
- " #4 Sun Dec 18 04:30:00 CET 1977\n", osname, osrelease);
return (0);
}
@@ -935,6 +986,46 @@
}
/*
+ * Filler function for proc/sys/kernel/osrelease
+ */
+static int
+linprocfs_doosrelease(PFS_FILL_ARGS)
+{
+ char osrelease[LINUX_MAX_UTSNAME];
+
+ linux_get_osrelease(td, osrelease);
+ sbuf_printf(sb, "%s\n", osrelease);
+
+ return (0);
+}
+
+/*
+ * Filler function for proc/sys/kernel/ostype
+ */
+static int
+linprocfs_doostype(PFS_FILL_ARGS)
+{
+ char osname[LINUX_MAX_UTSNAME];
+
+ linux_get_osname(td, osname);
+ sbuf_printf(sb, "%s\n", osname);
+
+ return (0);
+}
+
+/*
+ * Filler function for proc/sys/kernel/version
+ */
+static int
+linprocfs_doosbuild(PFS_FILL_ARGS)
+{
+ linprocfs_osbuild(td, sb);
+ sbuf_cat(sb, "\n");
+
+ return (0);
+}
+
+/*
* Filler function for proc/sys/kernel/msgmni
*/
static int
@@ -1146,6 +1237,12 @@
dir = pfs_create_dir(root, "sys", NULL, NULL, 0);
/* /proc/sys/kernel/... */
dir = pfs_create_dir(dir, "kernel", NULL, NULL, 0);
+ pfs_create_file(dir, "osrelease", &linprocfs_doosrelease,
+ NULL, NULL, PFS_RD);
+ pfs_create_file(dir, "ostype", &linprocfs_doostype,
+ NULL, NULL, PFS_RD);
+ pfs_create_file(dir, "version", &linprocfs_doosbuild,
+ NULL, NULL, PFS_RD);
pfs_create_file(dir, "msgmni", &linprocfs_domsgmni,
NULL, NULL, PFS_RD);
pfs_create_file(dir, "pid_max", &linprocfs_dopid_max,
==== //depot/projects/soc2006/intr_filter/compat/linux/linux_emul.c#9 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/linux/linux_emul.c,v 1.18 2007/02/24 16:49:24 netchild Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/linux/linux_emul.c,v 1.19 2007/03/02 00:08:47 jkim Exp $");
#include "opt_compat.h"
@@ -86,7 +86,7 @@
em = malloc(sizeof *em, M_LINUX, M_WAITOK | M_ZERO);
em->pid = child;
em->pdeath_signal = 0;
- if (flags & CLONE_THREAD) {
+ if (flags & LINUX_CLONE_THREAD) {
/* handled later in the code */
} else {
struct linux_emuldata_shared *s;
@@ -113,7 +113,7 @@
* proc
*/
if (child != 0) {
- if (flags & CLONE_THREAD) {
+ if (flags & LINUX_CLONE_THREAD) {
/* lookup the parent */
/*
* we dont have to lock the p_em because
==== //depot/projects/soc2006/intr_filter/conf/NOTES#15 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1410 2007/02/10 13:59:13 bms Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1411 2007/02/27 04:01:57 mjacob Exp $
#
# NOTES -- Lines that can be cut/pasted into kernel and hints configs.
#
@@ -147,6 +147,7 @@
options GEOM_LABEL # Providers labelization.
options GEOM_MBR # DOS/MBR partitioning
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list