[Zrouter-src-freebsd] ZRouter.org: push to FreeBSD HEAD tree
zrouter-src-freebsd at zrouter.org
zrouter-src-freebsd at zrouter.org
Wed Jul 25 14:36:09 UTC 2012
details: http://zrouter.org/hg/FreeBSD/head//rev/d36a04c5f34a
changeset: 494:d36a04c5f34a
user: Aleksandr Rybalko <ray at ddteam.net>
date: Wed Jul 25 16:42:12 2012 +0300
description:
Lazy update
diffstat:
head/sys/sys/_types.h | 11 +--
head/sys/sys/agpio.h | 3 +-
head/sys/sys/apm.h | 3 +-
head/sys/sys/ata.h | 17 +++++-
head/sys/sys/buf.h | 10 ++-
head/sys/sys/callout.h | 3 +-
head/sys/sys/cdefs.h | 16 +++++-
head/sys/sys/disklabel.h | 6 +-
head/sys/sys/dtrace_bsd.h | 21 +++++++-
head/sys/sys/elf_common.h | 3 +-
head/sys/sys/fcntl.h | 22 +++++--
head/sys/sys/file.h | 23 +++++++-
head/sys/sys/filedesc.h | 14 +++-
head/sys/sys/gpt.h | 8 +-
head/sys/sys/iconv.h | 4 +-
head/sys/sys/imgact_aout.h | 4 +-
head/sys/sys/kernel.h | 4 +-
head/sys/sys/mbuf.h | 27 ++++++---
head/sys/sys/mdioctl.h | 3 +-
head/sys/sys/mount.h | 10 ++-
head/sys/sys/param.h | 5 +-
head/sys/sys/proc.h | 19 ++++--
head/sys/sys/rangelock.h | 78 ++++++++++++++++++++++++++++
head/sys/sys/sdt.h | 5 +-
head/sys/sys/slicer.h | 51 ++++++++++++++++++
head/sys/sys/smp.h | 5 +-
head/sys/sys/stat.h | 8 +-
head/sys/sys/stdint.h | 6 +-
head/sys/sys/syscall.h | 4 +-
head/sys/sys/syscall.mk | 4 +-
head/sys/sys/syscallsubr.h | 5 +-
head/sys/sys/sysent.h | 10 ++-
head/sys/sys/sysproto.h | 8 +-
head/sys/sys/systm.h | 4 +-
head/sys/sys/ucontext.h | 4 +-
head/sys/sys/user.h | 6 +-
head/sys/sys/vdso.h | 122 +++++++++++++++++++++++++++++++++++++++++++++
head/sys/sys/vmmeter.h | 4 +-
head/sys/sys/vnode.h | 27 ++++++++-
head/sys/sys/vtoc.h | 3 +-
40 files changed, 495 insertions(+), 95 deletions(-)
diffs (1562 lines):
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/_types.h
--- a/head/sys/sys/_types.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/_types.h Wed Jul 25 16:42:12 2012 +0300
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: head/sys/sys/_types.h 223710 2011-07-01 12:13:48Z jonathan $
+ * $FreeBSD: head/sys/sys/_types.h 237517 2012-06-24 04:15:58Z andrew $
*/
#ifndef _SYS__TYPES_H_
@@ -80,14 +80,13 @@
* ANSI C), but they use __ct_rune_t instead of int.
*
* NOTE: rune_t is not covered by ANSI nor other standards, and should not
- * be instantiated outside of lib/libc/locale. Use wchar_t. wchar_t and
- * rune_t must be the same type. Also, wint_t must be no narrower than
- * wchar_t, and should be able to hold all members of the largest
- * character set plus one extra value (WEOF), and must be at least 16 bits.
+ * be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and
+ * rune_t must be the same type. Also, wint_t should be able to hold all
+ * members of the largest character set plus one extra value (WEOF), and
+ * must be at least 16 bits.
*/
typedef int __ct_rune_t; /* arg type for ctype funcs */
typedef __ct_rune_t __rune_t; /* rune_t (see above) */
-typedef __ct_rune_t __wchar_t; /* wchar_t (see above) */
typedef __ct_rune_t __wint_t; /* wint_t (see above) */
typedef __uint32_t __dev_t; /* device number */
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/agpio.h
--- a/head/sys/sys/agpio.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/agpio.h Wed Jul 25 16:42:12 2012 +0300
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD$
+ * $FreeBSD: head/sys/sys/agpio.h 235782 2012-05-22 10:59:26Z kib $
*/
#ifndef _SYS_AGPIO_H_
@@ -88,6 +88,7 @@
#define AGPIOC_DEALLOCATE _IOW (AGPIOC_BASE, 7, int)
#define AGPIOC_BIND _IOW (AGPIOC_BASE, 8, agp_bind)
#define AGPIOC_UNBIND _IOW (AGPIOC_BASE, 9, agp_unbind)
+#define AGPIOC_CHIPSET_FLUSH _IO (AGPIOC_BASE, 10)
typedef struct _agp_version {
u_int16_t major;
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/apm.h
--- a/head/sys/sys/apm.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/apm.h Wed Jul 25 16:42:12 2012 +0300
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD$
+ * $FreeBSD: head/sys/sys/apm.h 236023 2012-05-25 20:33:34Z marcel $
*/
#ifndef _SYS_APM_H_
@@ -56,6 +56,7 @@
#define APM_ENT_TYPE_UNUSED "Apple_Free"
#define APM_ENT_TYPE_FREEBSD "FreeBSD"
+#define APM_ENT_TYPE_FREEBSD_NANDFS "FreeBSD-nandfs"
#define APM_ENT_TYPE_FREEBSD_SWAP "FreeBSD-swap"
#define APM_ENT_TYPE_FREEBSD_UFS "FreeBSD-UFS"
#define APM_ENT_TYPE_FREEBSD_VINUM "FreeBSD-Vinum"
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/ata.h
--- a/head/sys/sys/ata.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/ata.h Wed Jul 25 16:42:12 2012 +0300
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: head/sys/sys/ata.h 230132 2012-01-15 13:23:18Z uqs $
+ * $FreeBSD: head/sys/sys/ata.h 238393 2012-07-12 10:09:34Z brueffer $
*/
#ifndef _SYS_ATA_H_
@@ -261,6 +261,20 @@
/*255*/ u_int16_t integrity;
} __packed;
+/*
+ * ATA Device Register
+ *
+ * bit 7 Obsolete (was 1 in early ATA specs)
+ * bit 6 Sets LBA/CHS mode. 1=LBA, 0=CHS
+ * bit 5 Obsolete (was 1 in early ATA specs)
+ * bit 4 1 = Slave Drive, 0 = Master Drive
+ * bit 3-0 In LBA mode, 27-24 of address. In CHS mode, head number
+*/
+
+#define ATA_DEV_MASTER 0x00
+#define ATA_DEV_SLAVE 0x10
+#define ATA_DEV_LBA 0x40
+
/* ATA transfer modes */
#define ATA_MODE_MASK 0x0f
@@ -318,6 +332,7 @@
#define ATA_READ_VERIFY48 0x42
#define ATA_READ_FPDMA_QUEUED 0x60 /* read DMA NCQ */
#define ATA_WRITE_FPDMA_QUEUED 0x61 /* write DMA NCQ */
+#define ATA_SEP_ATTN 0x67 /* SEP request */
#define ATA_SEEK 0x70 /* seek */
#define ATA_PACKET_CMD 0xa0 /* packet command */
#define ATA_ATAPI_IDENTIFY 0xa1 /* get ATAPI params*/
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/buf.h
--- a/head/sys/sys/buf.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/buf.h Wed Jul 25 16:42:12 2012 +0300
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* @(#)buf.h 8.9 (Berkeley) 3/30/95
- * $FreeBSD: head/sys/sys/buf.h 232351 2012-03-01 18:45:25Z mckusick $
+ * $FreeBSD: head/sys/sys/buf.h 236487 2012-06-02 19:39:12Z kib $
*/
#ifndef _SYS_BUF_H_
@@ -224,8 +224,8 @@
#define B_CLUSTER 0x40000000 /* pagein op, so swap() can count it */
#define B_REMFREE 0x80000000 /* Delayed bremfree */
-#define PRINT_BUF_FLAGS "\20\40remfree\37cluster\36vmio\35ram\34b27" \
- "\33paging\32b25\31b24\30b23\27relbuf\26dirty\25b20" \
+#define PRINT_BUF_FLAGS "\20\40remfree\37cluster\36vmio\35ram\34managed" \
+ "\33paging\32needsgiant\31nocopy\30b23\27relbuf\26dirty\25b20" \
"\24b19\23b18\22clusterok\21malloc\20nocache\17b14\16inval" \
"\15b12\14b11\13eintr\12done\11persist\10delwri\7validsuspwrt" \
"\6cache\5deferred\4direct\3async\2needcommit\1age"
@@ -239,6 +239,8 @@
#define BX_BKGRDMARKER 0x00000020 /* Mark buffer for splay tree */
#define BX_ALTDATA 0x00000040 /* Holds extended data */
+#define PRINT_BUF_XFLAGS "\20\7altdata\6bkgrdmarker\5bkgrdwrite\2clean\1dirty"
+
#define NOOFFSET (-1LL) /* No buffer offset calculated yet */
/*
@@ -249,6 +251,8 @@
#define BV_BKGRDWAIT 0x00000004 /* Background write waiting */
#define BV_INFREECNT 0x80000000 /* buf is counted in numfreebufs */
+#define PRINT_BUF_VFLAGS "\20\40infreecnt\3bkgrdwait\2bkgrdinprog\1scanned"
+
#ifdef _KERNEL
/*
* Buffer locking
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/callout.h
--- a/head/sys/sys/callout.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/callout.h Wed Jul 25 16:42:12 2012 +0300
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* @(#)callout.h 8.2 (Berkeley) 1/21/94
- * $FreeBSD: head/sys/sys/callout.h 221059 2011-04-26 11:39:56Z kib $
+ * $FreeBSD: head/sys/sys/callout.h 234952 2012-05-03 10:38:02Z kib $
*/
#ifndef _SYS_CALLOUT_H_
@@ -46,6 +46,7 @@
#define CALLOUT_MPSAFE 0x0008 /* callout handler is mp safe */
#define CALLOUT_RETURNUNLOCKED 0x0010 /* handler returns with mtx unlocked */
#define CALLOUT_SHAREDLOCK 0x0020 /* callout lock held in shared mode */
+#define CALLOUT_DFRMIGRATION 0x0040 /* callout in deferred migration mode */
struct callout_handle {
struct callout *callout;
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/cdefs.h
--- a/head/sys/sys/cdefs.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/cdefs.h Wed Jul 25 16:42:12 2012 +0300
@@ -30,7 +30,7 @@
* SUCH DAMAGE.
*
* @(#)cdefs.h 8.8 (Berkeley) 1/9/95
- * $FreeBSD: head/sys/sys/cdefs.h 232498 2012-03-04 15:31:13Z theraven $
+ * $FreeBSD: head/sys/sys/cdefs.h 237025 2012-06-13 20:41:45Z jkim $
*/
#ifndef _SYS_CDEFS_H_
@@ -293,6 +293,18 @@
#define __nonnull(x)
#endif
+#if __GNUC_PREREQ__(3, 4)
+#define __fastcall __attribute__((__fastcall__))
+#else
+#define __fastcall
+#endif
+
+#if __GNUC_PREREQ__(4, 1)
+#define __returns_twice __attribute__((__returns_twice__))
+#else
+#define __returns_twice
+#endif
+
/* XXX: should use `#if __STDC_VERSION__ < 199901'. */
#if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER)
#define __func__ NULL
@@ -475,7 +487,7 @@
* Embed the rcs id of a source file in the resulting library. Note that in
* more recent ELF binutils, we use .ident allowing the ID to be stripped.
* Usage:
- * __FBSDID("$FreeBSD: head/sys/sys/cdefs.h 232498 2012-03-04 15:31:13Z theraven $");
+ * __FBSDID("$FreeBSD: head/sys/sys/cdefs.h 237025 2012-06-13 20:41:45Z jkim $");
*/
#ifndef __FBSDID
#if !defined(lint) && !defined(STRIP_FBSDID)
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/disklabel.h
--- a/head/sys/sys/disklabel.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/disklabel.h Wed Jul 25 16:42:12 2012 +0300
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*
* @(#)disklabel.h 8.2 (Berkeley) 7/10/94
- * $FreeBSD$
+ * $FreeBSD: head/sys/sys/disklabel.h 236023 2012-05-25 20:33:34Z marcel $
*/
#ifndef _SYS_DISKLABEL_H_
@@ -232,6 +232,7 @@
#define FS_UDF 24 /* UDF */
#define FS_EFS 26 /* SGI's Extent File system */
#define FS_ZFS 27 /* Sun's ZFS */
+#define FS_NANDFS 30 /* FreeBSD nandfs (NiLFS derived) */
#ifdef FSTYPENAMES
static const char *fstypenames[] = {
@@ -263,6 +264,9 @@
"?",
"EFS",
"ZFS",
+ "?",
+ "?",
+ "nandfs",
NULL
};
#define FSMAXTYPES (sizeof(fstypenames) / sizeof(fstypenames[0]) - 1)
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/dtrace_bsd.h
--- a/head/sys/sys/dtrace_bsd.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/dtrace_bsd.h Wed Jul 25 16:42:12 2012 +0300
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: head/sys/sys/dtrace_bsd.h 223280 2011-06-18 23:02:53Z rmacklem $
+ * $FreeBSD: head/sys/sys/dtrace_bsd.h 238366 2012-07-11 16:27:02Z gnn $
*
* This file contains BSD shims for Sun's DTrace code.
*/
@@ -38,6 +38,8 @@
struct vattr;
struct vnode;
struct reg;
+struct devstat;
+struct bio;
/*
* Cyclic clock function type definition used to hook the cyclic
@@ -168,6 +170,23 @@
extern dtrace_nfsclient_nfs23_done_probe_func_t
dtrace_nfscl_nfs234_done_probe;
+/* IO Provider hooks, really hook into devstat */
+typedef void (*dtrace_io_start_probe_func_t)(uint32_t, struct bio *,
+ struct devstat *);
+extern dtrace_io_start_probe_func_t dtrace_io_start_probe;
+
+typedef void (*dtrace_io_done_probe_func_t)(uint32_t, struct bio *,
+ struct devstat *);
+extern dtrace_io_done_probe_func_t dtrace_io_done_probe;
+
+typedef void (*dtrace_io_wait_start_probe_func_t)(uint32_t, uintptr_t *,
+ struct devstat *);
+extern dtrace_io_wait_start_probe_func_t dtrace_io_wait_start_probe;
+
+typedef void (*dtrace_io_wait_done_probe_func_t)(uint32_t, uintptr_t *,
+ struct devstat *);
+extern dtrace_io_wait_done_probe_func_t dtrace_io_wait_done_probe;
+
/*
* Functions which allow the dtrace module to check that the kernel
* hooks have been compiled with sufficient space for it's private
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/elf_common.h
--- a/head/sys/sys/elf_common.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/elf_common.h Wed Jul 25 16:42:12 2012 +0300
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: head/sys/sys/elf_common.h 233523 2012-03-26 21:26:23Z gonzo $
+ * $FreeBSD: head/sys/sys/elf_common.h 235099 2012-05-06 18:34:31Z kib $
*/
#ifndef _SYS_ELF_COMMON_H_
@@ -480,6 +480,7 @@
#define DF_1_LOADFLTR 0x00000010 /* Immediate loading of filtees */
#define DF_1_NOOPEN 0x00000040 /* Do not allow loading on dlopen() */
#define DF_1_ORIGIN 0x00000080 /* Process $ORIGIN */
+#define DF_1_NODEFLIB 0x00000800 /* Do not search default paths */
/* Values for n_type. Used in core files. */
#define NT_PRSTATUS 1 /* Process status. */
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/fcntl.h
--- a/head/sys/sys/fcntl.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/fcntl.h Wed Jul 25 16:42:12 2012 +0300
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* @(#)fcntl.h 8.3 (Berkeley) 1/21/94
- * $FreeBSD: head/sys/sys/fcntl.h 227070 2011-11-04 04:02:50Z jhb $
+ * $FreeBSD: head/sys/sys/fcntl.h 238667 2012-07-21 13:02:11Z kib $
*/
#ifndef _SYS_FCNTL_H_
@@ -111,7 +111,7 @@
#if __BSD_VISIBLE
/* Attempt to bypass buffer cache */
-#define O_DIRECT 0x00010000
+#define O_DIRECT 0x00010000
#endif
/* Defined by POSIX Extended API Set Part 2 */
@@ -213,18 +213,25 @@
#define F_SETFL 4 /* set file status flags */
#if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112
#define F_GETOWN 5 /* get SIGIO/SIGURG proc/pgrp */
-#define F_SETOWN 6 /* set SIGIO/SIGURG proc/pgrp */
+#define F_SETOWN 6 /* set SIGIO/SIGURG proc/pgrp */
#endif
+#if __BSD_VISIBLE
#define F_OGETLK 7 /* get record locking information */
#define F_OSETLK 8 /* set record locking information */
#define F_OSETLKW 9 /* F_SETLK; wait if blocked */
#define F_DUP2FD 10 /* duplicate file descriptor to arg */
+#endif
#define F_GETLK 11 /* get record locking information */
#define F_SETLK 12 /* set record locking information */
#define F_SETLKW 13 /* F_SETLK; wait if blocked */
+#if __BSD_VISIBLE
#define F_SETLK_REMOTE 14 /* debugging support for remote locks */
#define F_READAHEAD 15 /* read ahead */
#define F_RDAHEAD 16 /* Darwin compatible read ahead */
+#endif
+#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809
+#define F_DUPFD_CLOEXEC 17 /* Like F_DUPFD, but FD_CLOEXEC is set */
+#endif
/* file descriptor flags (F_GETFD, F_SETFD) */
#define FD_CLOEXEC 1 /* close-on-exec flag */
@@ -233,14 +240,16 @@
#define F_RDLCK 1 /* shared or read lock */
#define F_UNLCK 2 /* unlock */
#define F_WRLCK 3 /* exclusive or write lock */
+#if __BSD_VISIBLE
#define F_UNLCKSYS 4 /* purge locks for a given system ID */
#define F_CANCEL 5 /* cancel an async lock request */
+#endif
#ifdef _KERNEL
#define F_WAIT 0x010 /* Wait until lock is granted */
#define F_FLOCK 0x020 /* Use flock(2) semantics for lock */
#define F_POSIX 0x040 /* Use POSIX semantics for lock */
#define F_REMOTE 0x080 /* Lock owner is remote NFS client */
-#define F_NOINTR 0x100 /* Ignore signals when waiting */
+#define F_NOINTR 0x100 /* Ignore signals when waiting */
#endif
/*
@@ -256,18 +265,19 @@
int l_sysid; /* remote system id or zero for local */
};
+#if __BSD_VISIBLE
/*
* Old advisory file segment locking data type,
* before adding l_sysid.
*/
-struct oflock {
+struct __oflock {
off_t l_start; /* starting offset */
off_t l_len; /* len = 0 means until end of file */
pid_t l_pid; /* lock owner */
short l_type; /* lock type: read/write, etc. */
short l_whence; /* type of l_start */
};
-
+#endif
#if __BSD_VISIBLE
/* lock operations for flock(2) */
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/file.h
--- a/head/sys/sys/file.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/file.h Wed Jul 25 16:42:12 2012 +0300
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*
* @(#)file.h 8.3 (Berkeley) 1/9/95
- * $FreeBSD: head/sys/sys/file.h 227267 2011-11-06 20:16:50Z ed $
+ * $FreeBSD: head/sys/sys/file.h 238220 2012-07-08 00:51:38Z mjg $
*/
#ifndef _SYS_FILE_H_
@@ -72,10 +72,25 @@
struct file;
struct ucred;
+#define FOF_OFFSET 0x01 /* Use the offset in uio argument */
+#define FOF_NOLOCK 0x02 /* Do not take FOFFSET_LOCK */
+#define FOF_NEXTOFF 0x04 /* Also update f_nextoff */
+#define FOF_NOUPDATE 0x10 /* Do not update f_offset */
+off_t foffset_lock(struct file *fp, int flags);
+void foffset_lock_uio(struct file *fp, struct uio *uio, int flags);
+void foffset_unlock(struct file *fp, off_t val, int flags);
+void foffset_unlock_uio(struct file *fp, struct uio *uio, int flags);
+
+static inline off_t
+foffset_get(struct file *fp)
+{
+
+ return (foffset_lock(fp, FOF_NOLOCK));
+}
+
typedef int fo_rdwr_t(struct file *fp, struct uio *uio,
struct ucred *active_cred, int flags,
struct thread *td);
-#define FOF_OFFSET 1 /* Use the offset in uio argument */
typedef int fo_truncate_t(struct file *fp, off_t length,
struct ucred *active_cred, struct thread *td);
typedef int fo_ioctl_t(struct file *fp, u_long com, void *data,
@@ -126,6 +141,8 @@
int fa_advice; /* (f) FADV_* type. */
off_t fa_start; /* (f) Region start. */
off_t fa_end; /* (f) Region end. */
+ off_t fa_prevstart; /* (f) Previous NOREUSE start. */
+ off_t fa_prevend; /* (f) Previous NOREUSE end. */
};
struct file {
@@ -221,6 +238,8 @@
void finit(struct file *, u_int, short, void *, struct fileops *);
int fgetvp(struct thread *td, int fd, cap_rights_t rights, struct vnode **vpp);
+int fgetvp_exec(struct thread *td, int fd, cap_rights_t rights,
+ struct vnode **vpp);
int fgetvp_rights(struct thread *td, int fd, cap_rights_t need,
cap_rights_t *have, struct vnode **vpp);
int fgetvp_read(struct thread *td, int fd, cap_rights_t rights,
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/filedesc.h
--- a/head/sys/sys/filedesc.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/filedesc.h Wed Jul 25 16:42:12 2012 +0300
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*
* @(#)filedesc.h 8.1 (Berkeley) 6/2/93
- * $FreeBSD: head/sys/sys/filedesc.h 224778 2011-08-11 12:30:23Z rwatson $
+ * $FreeBSD: head/sys/sys/filedesc.h 237081 2012-06-14 16:24:03Z pjd $
*/
#ifndef _SYS_FILEDESC_H_
@@ -105,12 +105,13 @@
SX_NOTRECURSED)
#define FILEDESC_XLOCK_ASSERT(fdp) sx_assert(&(fdp)->fd_sx, SX_XLOCKED | \
SX_NOTRECURSED)
+#define FILEDESC_UNLOCK_ASSERT(fdp) sx_assert(&(fdp)->fd_sx, SX_UNLOCKED)
struct thread;
int closef(struct file *fp, struct thread *td);
-int dupfdopen(struct thread *td, struct filedesc *fdp, int indx, int dfd,
- int mode, int error);
+int dupfdopen(struct thread *td, struct filedesc *fdp, int dfd, int mode,
+ int openerror, int *indxp);
int falloc(struct thread *td, struct file **resultfp, int *resultfd,
int flags);
int falloc_noinstall(struct thread *td, struct file **resultfp);
@@ -141,7 +142,12 @@
fget_locked(struct filedesc *fdp, int fd)
{
- return (fd < 0 || fd >= fdp->fd_nfiles ? NULL : fdp->fd_ofiles[fd]);
+ FILEDESC_LOCK_ASSERT(fdp);
+
+ if (fd < 0 || fd >= fdp->fd_nfiles)
+ return (NULL);
+
+ return (fdp->fd_ofiles[fd]);
}
#endif /* _KERNEL */
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/gpt.h
--- a/head/sys/sys/gpt.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/gpt.h Wed Jul 25 16:42:12 2012 +0300
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: head/sys/sys/gpt.h 234417 2012-04-18 11:59:03Z marck $
+ * $FreeBSD: head/sys/sys/gpt.h 236023 2012-05-25 20:33:34Z marcel $
*/
#ifndef _SYS_GPT_H_
@@ -79,6 +79,10 @@
{0x024dee41,0x33e7,0x11d3,0x9d,0x69,{0x00,0x08,0xc7,0x81,0xf3,0x9f}}
#define GPT_ENT_TYPE_FREEBSD \
{0x516e7cb4,0x6ecf,0x11d6,0x8f,0xf8,{0x00,0x02,0x2d,0x09,0x71,0x2b}}
+#define GPT_ENT_TYPE_FREEBSD_BOOT \
+ {0x83bd6b9d,0x7f41,0x11dc,0xbe,0x0b,{0x00,0x15,0x60,0xb8,0x4f,0x0f}}
+#define GPT_ENT_TYPE_FREEBSD_NANDFS \
+ {0x74ba7dd9,0xa689,0x11e1,0xbd,0x04,{0x00,0xe0,0x81,0x28,0x6a,0xcf}}
#define GPT_ENT_TYPE_FREEBSD_SWAP \
{0x516e7cb5,0x6ecf,0x11d6,0x8f,0xf8,{0x00,0x02,0x2d,0x09,0x71,0x2b}}
#define GPT_ENT_TYPE_FREEBSD_UFS \
@@ -87,8 +91,6 @@
{0x516e7cb8,0x6ecf,0x11d6,0x8f,0xf8,{0x00,0x02,0x2d,0x09,0x71,0x2b}}
#define GPT_ENT_TYPE_FREEBSD_ZFS \
{0x516e7cba,0x6ecf,0x11d6,0x8f,0xf8,{0x00,0x02,0x2d,0x09,0x71,0x2b}}
-#define GPT_ENT_TYPE_FREEBSD_BOOT \
- {0x83bd6b9d,0x7f41,0x11dc,0xbe,0x0b,{0x00,0x15,0x60,0xb8,0x4f,0x0f}}
/*
* The following are unused but documented here to avoid reuse.
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/iconv.h
--- a/head/sys/sys/iconv.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/iconv.h Wed Jul 25 16:42:12 2012 +0300
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: head/sys/sys/iconv.h 227650 2011-11-18 03:05:20Z kevlo $
+ * $FreeBSD: head/sys/sys/iconv.h 235711 2012-05-21 02:30:22Z kevlo $
*/
#ifndef _SYS_ICONV_H_
#define _SYS_ICONV_H_
@@ -240,7 +240,7 @@
int iconv_converter_handler(module_t mod, int type, void *data);
#ifdef ICONV_DEBUG
-#define ICDEBUG(format, ...) printf("%s: "format, __func__ , __VA_ARGS__)
+#define ICDEBUG(format, ...) printf("%s: "format, __func__ , ## __VA_ARGS__)
#else
#define ICDEBUG(format, ...)
#endif
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/imgact_aout.h
--- a/head/sys/sys/imgact_aout.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/imgact_aout.h Wed Jul 25 16:42:12 2012 +0300
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*
* from: @(#)exec.h 8.1 (Berkeley) 6/11/93
- * $FreeBSD$
+ * $FreeBSD: head/sys/sys/imgact_aout.h 237695 2012-06-28 07:37:46Z imp $
*/
#ifndef _IMGACT_AOUT_H_
@@ -119,7 +119,7 @@
uint32_t a_trsize; /* text relocation size */
uint32_t a_drsize; /* data relocation size */
};
-#define a_magic a_midmag /* XXX Hack to work with imgact_{aout,gzip}.c */
+#define a_magic a_midmag /* Hack for emulators */
/* a_magic */
#define OMAGIC 0407 /* old impure format */
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/kernel.h
--- a/head/sys/sys/kernel.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/kernel.h Wed Jul 25 16:42:12 2012 +0300
@@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* @(#)kernel.h 8.3 (Berkeley) 1/21/94
- * $FreeBSD: head/sys/sys/kernel.h 220137 2011-03-29 17:47:25Z trasz $
+ * $FreeBSD: head/sys/sys/kernel.h 236968 2012-06-12 18:19:46Z jhb $
*/
#ifndef _SYS_KERNEL_H_
@@ -267,7 +267,7 @@
/*
* Infrastructure for tunable 'constants'. Value may be specified at compile
* time or kernel load time. Rules relating tunables together can be placed
- * in a SYSINIT function at SI_SUB_TUNABLES with SI_ORDER_LAST.
+ * in a SYSINIT function at SI_SUB_TUNABLES with SI_ORDER_ANY.
*
* WARNING: developers should never use the reserved suffixes specified in
* loader.conf(5) for any tunables or conflicts will result.
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/mbuf.h
--- a/head/sys/sys/mbuf.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/mbuf.h Wed Jul 25 16:42:12 2012 +0300
@@ -28,7 +28,7 @@
* SUCH DAMAGE.
*
* @(#)mbuf.h 8.5 (Berkeley) 2/19/95
- * $FreeBSD: head/sys/sys/mbuf.h 230264 2012-01-17 12:13:36Z glebius $
+ * $FreeBSD: head/sys/sys/mbuf.h 236332 2012-05-30 20:56:07Z tuexen $
*/
#ifndef _SYS_MBUF_H_
@@ -115,7 +115,7 @@
/* variables for ip and tcp reassembly */
void *header; /* pointer to packet header */
int len; /* total packet length */
- uint32_t flowid; /* packet's 4-tuple system
+ uint32_t flowid; /* packet's 4-tuple system
* flow identifier
*/
/* variables for hardware checksum */
@@ -283,15 +283,24 @@
#define CSUM_FRAGMENT 0x0010 /* will do IP fragmentation */
#define CSUM_TSO 0x0020 /* will do TSO */
#define CSUM_SCTP 0x0040 /* will csum SCTP */
+#define CSUM_SCTP_IPV6 0x0080 /* will csum IPv6/SCTP */
#define CSUM_IP_CHECKED 0x0100 /* did csum IP */
#define CSUM_IP_VALID 0x0200 /* ... the csum is valid */
#define CSUM_DATA_VALID 0x0400 /* csum_data field is valid */
#define CSUM_PSEUDO_HDR 0x0800 /* csum_data has pseudo hdr */
#define CSUM_SCTP_VALID 0x1000 /* SCTP checksum is valid */
+#define CSUM_UDP_IPV6 0x2000 /* will csum IPv6/UDP */
+#define CSUM_TCP_IPV6 0x4000 /* will csum IPv6/TCP */
+/* CSUM_TSO_IPV6 0x8000 will do IPv6/TSO */
+
+/* CSUM_FRAGMENT_IPV6 0x10000 will do IPv6 fragementation */
+
+#define CSUM_DELAY_DATA_IPV6 (CSUM_TCP_IPV6 | CSUM_UDP_IPV6)
+#define CSUM_DATA_VALID_IPV6 CSUM_DATA_VALID
#define CSUM_DELAY_DATA (CSUM_TCP | CSUM_UDP)
-#define CSUM_DELAY_IP (CSUM_IP) /* XXX add ipv6 here too? */
+#define CSUM_DELAY_IP (CSUM_IP) /* Only v4, no v6 IP hdr csum */
/*
* mbuf types.
@@ -418,7 +427,7 @@
m_gettype(int size)
{
int type;
-
+
switch (size) {
case MSIZE:
type = EXT_MBUF;
@@ -448,7 +457,7 @@
m_getzone(int size)
{
uma_zone_t zone;
-
+
switch (size) {
case MCLBYTES:
zone = zone_clust;
@@ -630,7 +639,7 @@
if (m->m_flags & M_PKTHDR)
KASSERT(SLIST_EMPTY(&m->m_pkthdr.tags), ("doing fast free of mbuf with tags"));
#endif
-
+
uma_zfree_arg(zone_mbuf, m, (void *)MB_NOTAGS);
}
@@ -690,7 +699,7 @@
{
uma_zone_t zone;
int size;
-
+
switch (type) {
case EXT_CLUSTER:
size = MCLBYTES;
@@ -742,7 +751,7 @@
extern void (*m_addr_chg_pf_p)(struct mbuf *m);
-static __inline void
+static __inline void
m_addr_changed(struct mbuf *m)
{
@@ -1110,7 +1119,7 @@
#define M_SETFIB(_m, _fib) do { \
_m->m_flags &= ~M_FIB; \
_m->m_flags |= (((_fib) << M_FIBSHIFT) & M_FIB); \
-} while (0)
+} while (0)
#endif /* _KERNEL */
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/mdioctl.h
--- a/head/sys/sys/mdioctl.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/mdioctl.h Wed Jul 25 16:42:12 2012 +0300
@@ -37,7 +37,7 @@
*
* From: src/sys/sys/vnioctl.h,v 1.4
*
- * $FreeBSD: head/sys/sys/mdioctl.h 230536 2012-01-25 11:28:18Z trasz $
+ * $FreeBSD: head/sys/sys/mdioctl.h 238215 2012-07-07 20:32:21Z trasz $
*/
#ifndef _SYS_MDIOCTL_H_
@@ -79,6 +79,7 @@
#define MDIOCDETACH _IOWR('m', 1, struct md_ioctl) /* detach disk */
#define MDIOCQUERY _IOWR('m', 2, struct md_ioctl) /* query status */
#define MDIOCLIST _IOWR('m', 3, struct md_ioctl) /* query status */
+#define MDIOCRESIZE _IOWR('m', 4, struct md_ioctl) /* resize disk */
#define MD_CLUSTER 0x01 /* Don't cluster */
#define MD_RESERVE 0x02 /* Pre-reserve swap */
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/mount.h
--- a/head/sys/sys/mount.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/mount.h Wed Jul 25 16:42:12 2012 +0300
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*
* @(#)mount.h 8.21 (Berkeley) 5/20/95
- * $FreeBSD: head/sys/sys/mount.h 234482 2012-04-20 06:50:44Z mckusick $
+ * $FreeBSD: head/sys/sys/mount.h 236321 2012-05-30 16:42:08Z kib $
*/
#ifndef _SYS_MOUNT_H_
@@ -148,6 +148,7 @@
* Lock reference:
* m - mountlist_mtx
* i - interlock
+ * v - vnode freelist mutex
*
* Unmarked fields are considered stable as long as a ref is held.
*
@@ -164,8 +165,8 @@
int mnt_ref; /* (i) Reference count */
struct vnodelst mnt_nvnodelist; /* (i) list of vnodes */
int mnt_nvnodelistsize; /* (i) # of vnodes */
- struct vnodelst mnt_activevnodelist; /* (i) list of active vnodes */
- int mnt_activevnodelistsize;/* (i) # of active vnodes */
+ struct vnodelst mnt_activevnodelist; /* (v) list of active vnodes */
+ int mnt_activevnodelistsize;/* (v) # of active vnodes */
int mnt_writeopcount; /* (i) write syscalls pending */
int mnt_kern_flag; /* (i) kernel only flags */
uint64_t mnt_flag; /* (i) flags shared with user */
@@ -369,6 +370,9 @@
#define MNTK_REFEXPIRE 0x00000020 /* refcount expiring is happening */
#define MNTK_EXTENDED_SHARED 0x00000040 /* Allow shared locking for more ops */
#define MNTK_SHARED_WRITES 0x00000080 /* Allow shared locking for writes */
+#define MNTK_NO_IOPF 0x00000100 /* Disallow page faults during reads
+ and writes. Filesystem shall properly
+ handle i/o state on EFAULT. */
#define MNTK_NOASYNC 0x00800000 /* disable async */
#define MNTK_UNMOUNT 0x01000000 /* unmount in progress */
#define MNTK_MWAIT 0x02000000 /* waiting for unmount to finish */
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/param.h
--- a/head/sys/sys/param.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/param.h Wed Jul 25 16:42:12 2012 +0300
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* @(#)param.h 8.3 (Berkeley) 4/4/95
- * $FreeBSD: head/sys/sys/param.h 234355 2012-04-16 21:28:04Z dim $
+ * $FreeBSD: head/sys/sys/param.h 238405 2012-07-12 19:30:53Z jkim $
*/
#ifndef _SYS_PARAM_H_
@@ -58,7 +58,7 @@
* in the range 5 to 9.
*/
#undef __FreeBSD_version
-#define __FreeBSD_version 1000011 /* Master, propagated to newvers */
+#define __FreeBSD_version 1000015 /* Master, propagated to newvers */
/*
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
@@ -273,6 +273,7 @@
#ifndef howmany
#define howmany(x, y) (((x)+((y)-1))/(y))
#endif
+#define nitems(x) (sizeof((x)) / sizeof((x)[0]))
#define rounddown(x, y) (((x)/(y))*(y))
#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) /* to any y */
#define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/proc.h
--- a/head/sys/sys/proc.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/proc.h Wed Jul 25 16:42:12 2012 +0300
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* @(#)proc.h 8.15 (Berkeley) 5/19/95
- * $FreeBSD: head/sys/sys/proc.h 234172 2012-04-12 10:48:43Z kib $
+ * $FreeBSD: head/sys/sys/proc.h 237848 2012-06-30 17:01:28Z kib $
*/
#ifndef _SYS_PROC_H_
@@ -213,6 +213,7 @@
struct seltd *td_sel; /* Select queue/channel. */
struct sleepqueue *td_sleepqueue; /* (k) Associated sleep queue. */
struct turnstile *td_turnstile; /* (k) Associated turnstile. */
+ struct rl_q_entry *td_rlqe; /* (k) Associated range lock entry. */
struct umtx_q *td_umtxq; /* (c?) Link for when we're blocked. */
lwpid_t td_tid; /* (b) Thread ID. */
sigqueue_t td_sigqueue; /* (c) Sigs arrived, not delivered. */
@@ -247,6 +248,7 @@
int td_slptick; /* (t) Time at sleep. */
int td_blktick; /* (t) Time spent blocked. */
int td_swvoltick; /* (t) Time at last SW_VOL switch. */
+ u_int td_cow; /* (*) Number of copy-on-write faults */
struct rusage td_ru; /* (t) rusage information. */
struct rusage_ext td_rux; /* (t) Internal rusage information. */
uint64_t td_incruntime; /* (t) Cpu ticks to transfer to proc. */
@@ -257,7 +259,6 @@
u_int td_uticks; /* (t) Statclock hits in user mode. */
int td_intrval; /* (t) Return value for sleepq. */
sigset_t td_oldsigmask; /* (k) Saved mask from pre sigpause. */
- sigset_t td_sigmask; /* (c) Current signal mask. */
volatile u_int td_generation; /* (k) For detection of preemption */
stack_t td_sigstk; /* (k) Stack ptr and on-stack flag. */
int td_xsig; /* (c) Signal for ptrace */
@@ -271,10 +272,11 @@
struct osd td_osd; /* (k) Object specific data. */
struct vm_map_entry *td_map_def_user; /* (k) Deferred entries. */
pid_t td_dbg_forked; /* (c) Child pid for debugger. */
-#define td_endzero td_rqindex
+#define td_endzero td_sigmask
-/* Copied during fork1() or thread_sched_upcall(). */
+/* Copied during fork1() or create_thread(). */
#define td_startcopy td_endzero
+ sigset_t td_sigmask; /* (c) Current signal mask. */
u_char td_rqindex; /* (t) Run queue index. */
u_char td_base_pri; /* (t) Thread base kernel priority. */
u_char td_priority; /* (t) Thread active priority. */
@@ -284,7 +286,7 @@
#define td_endcopy td_pcb
/*
- * Fields that must be manually set in fork1() or thread_sched_upcall()
+ * Fields that must be manually set in fork1() or create_thread()
* or already have been set in the allocator, constructor, etc.
*/
struct pcb *td_pcb; /* (k) Kernel VA of pcb and kstack. */
@@ -311,7 +313,9 @@
struct vnet *td_vnet; /* (k) Effective vnet. */
const char *td_vnet_lpush; /* (k) Debugging vnet push / pop. */
struct trapframe *td_intr_frame;/* (k) Frame of the current irq */
- struct proc *td_rfppwait_p; /* (k) The vforked child */
+ struct proc *td_rfppwait_p; /* (k) The vforked child */
+ struct vm_page **td_ma; /* (k) uio pages held */
+ int td_ma_cnt; /* (k) size of *td_ma */
};
struct mtx *thread_lock_block(struct thread *);
@@ -419,6 +423,7 @@
#define TDP_RFPPWAIT 0x02000000 /* Handle RFPPWAIT on syscall exit */
#define TDP_RESETSPUR 0x04000000 /* Reset spurious page fault history. */
#define TDP_NERRNO 0x08000000 /* Last errno is already in td_errno */
+#define TDP_UIOHELD 0x10000000 /* Current uio has pages held in td_ma */
/*
* Reasons that the current thread can not be run yet.
@@ -622,7 +627,6 @@
#define P_SIGEVENT 0x200000 /* Process pending signals changed. */
#define P_SINGLE_BOUNDARY 0x400000 /* Threads should suspend at user boundary. */
#define P_HWPMC 0x800000 /* Process is using HWPMCs */
-
#define P_JAILED 0x1000000 /* Process is in jail. */
#define P_ORPHAN 0x2000000 /* Orphaned. */
#define P_INEXEC 0x4000000 /* Process is in execve(). */
@@ -840,6 +844,7 @@
#define PGET_ISCURRENT 0x00008 /* Check that the found process is current. */
#define PGET_NOTWEXIT 0x00010 /* Check that the process is not in P_WEXIT. */
#define PGET_NOTINEXEC 0x00020 /* Check that the process is not in P_INEXEC. */
+#define PGET_NOTID 0x00040 /* Do not assume tid if pid > PID_MAX. */
#define PGET_WANTREAD (PGET_HOLD | PGET_CANDEBUG | PGET_NOTWEXIT)
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/rangelock.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/sys/rangelock.h Wed Jul 25 16:42:12 2012 +0300
@@ -0,0 +1,78 @@
+/*-
+ * Copyright (c) 2009 Konstantin Belousov <kib at FreeBSD.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice unmodified, this list of conditions, and the following
+ * disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (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: head/sys/sys/rangelock.h 236317 2012-05-30 16:06:38Z kib $
+ */
+
+#ifndef _SYS_RANGELOCK_H
+#define _SYS_RANGELOCK_H
+
+#include <sys/queue.h>
+
+#define RL_LOCK_READ 0x0001
+#define RL_LOCK_WRITE 0x0002
+#define RL_LOCK_TYPE_MASK 0x0003
+#define RL_LOCK_GRANTED 0x0004
+
+struct rl_q_entry;
+
+/*
+ * The structure representing the range lock. Caller may request
+ * read or write access to the range of bytes. Access is granted if
+ * all existing lock owners are compatible with the request. Two lock
+ * owners are compatible if their ranges do not overlap, or both
+ * owners are for read.
+ *
+ * Access to the structure itself is synchronized with the externally
+ * supplied mutex.
+ *
+ * rl_waiters is the queue of lock requests in the order of arrival.
+ * rl_currdep is the first lock request that cannot be granted now due
+ * to the preceding requests conflicting with it.
+ */
+struct rangelock {
+ TAILQ_HEAD(, rl_q_entry) rl_waiters;
+ struct rl_q_entry *rl_currdep;
+};
+
+#ifdef _KERNEL
+
+struct mtx;
+
+void rangelock_init(struct rangelock *lock);
+void rangelock_destroy(struct rangelock *lock);
+void rangelock_unlock(struct rangelock *lock, void *cookie,
+ struct mtx *ilk);
+void *rangelock_unlock_range(struct rangelock *lock, void *cookie,
+ off_t start, off_t end, struct mtx *ilk);
+void *rangelock_rlock(struct rangelock *lock, off_t start, off_t end,
+ struct mtx *ilk);
+void *rangelock_wlock(struct rangelock *lock, off_t start, off_t end,
+ struct mtx *ilk);
+void rlqentry_free(struct rl_q_entry *rlqe);
+
+#endif /* _KERNEL */
+
+#endif /* _SYS_RANGELOCK_H */
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/sdt.h
--- a/head/sys/sys/sdt.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/sdt.h Wed Jul 25 16:42:12 2012 +0300
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: head/sys/sys/sdt.h 233552 2012-03-27 15:07:43Z rstone $
+ * $FreeBSD: head/sys/sys/sdt.h 235459 2012-05-15 01:30:25Z rstone $
*
* Statically Defined Tracing (SDT) definitions.
*
@@ -92,6 +92,7 @@
#define SDT_PROBE_DEFINE4(prov, mod, func, name, sname, arg0, arg1, arg2, arg3)
#define SDT_PROBE_DEFINE5(prov, mod, func, name, sname, arg0, arg1, arg2, arg3, arg4)
+#define SDT_PROBE0(prov, mod, func, name)
#define SDT_PROBE1(prov, mod, func, name, arg0)
#define SDT_PROBE2(prov, mod, func, name, arg0, arg1)
#define SDT_PROBE3(prov, mod, func, name, arg0, arg1, arg2)
@@ -231,6 +232,8 @@
SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3); \
SDT_PROBE_ARGTYPE(prov, mod, func, name, 4, arg4)
+#define SDT_PROBE0(prov, mod, func, name) \
+ SDT_PROBE(prov, mod, func, name, 0, 0, 0, 0, 0)
#define SDT_PROBE1(prov, mod, func, name, arg0) \
SDT_PROBE(prov, mod, func, name, arg0, 0, 0, 0, 0)
#define SDT_PROBE2(prov, mod, func, name, arg0, arg1) \
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/slicer.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/sys/slicer.h Wed Jul 25 16:42:12 2012 +0300
@@ -0,0 +1,51 @@
+/*-
+ * Copyright (c) 2012 Semihalf.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * 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.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (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: head/sys/sys/slicer.h 235778 2012-05-22 08:33:14Z gber $
+ */
+
+#ifndef _FLASH_SLICER_H_
+#define _FLASH_SLICER_H_
+
+#include <sys/types.h>
+
+#define FLASH_SLICES_MAX_NUM 8
+#define FLASH_SLICES_MAX_NAME_LEN (32 + 1)
+
+#define FLASH_SLICES_FLAG_NONE 0
+#define FLASH_SLICES_FLAG_RO 1 /* Read only */
+
+struct flash_slice {
+ off_t base;
+ off_t size;
+ char *label;
+ unsigned int flags;
+};
+
+#ifdef _KERNEL
+int flash_fill_slices(device_t, struct flash_slice *, int *);
+#endif /* _KERNEL */
+
+#endif /* _FLASH_SLICER_H_ */
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/smp.h
--- a/head/sys/sys/smp.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/smp.h Wed Jul 25 16:42:12 2012 +0300
@@ -6,7 +6,7 @@
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
* ----------------------------------------------------------------------------
*
- * $FreeBSD: head/sys/sys/smp.h 222813 2011-06-07 08:46:13Z attilio $
+ * $FreeBSD: head/sys/sys/smp.h 236772 2012-06-09 00:37:26Z iwasaki $
*/
#ifndef _SYS_SMP_H_
@@ -75,6 +75,7 @@
extern int smp_cpus;
extern volatile cpuset_t started_cpus;
extern volatile cpuset_t stopped_cpus;
+extern volatile cpuset_t suspended_cpus;
extern cpuset_t hlt_cpus_mask;
extern cpuset_t logical_cpus_mask;
#endif /* SMP */
@@ -163,7 +164,7 @@
int restart_cpus(cpuset_t);
int stop_cpus(cpuset_t);
int stop_cpus_hard(cpuset_t);
-#if defined(__amd64__)
+#if defined(__amd64__) || defined(__i386__)
int suspend_cpus(cpuset_t);
#endif
void smp_rendezvous_action(void);
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/stat.h
--- a/head/sys/sys/stat.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/stat.h Wed Jul 25 16:42:12 2012 +0300
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* @(#)stat.h 8.12 (Berkeley) 6/16/95
- * $FreeBSD$
+ * $FreeBSD: head/sys/sys/stat.h 238703 2012-07-22 20:08:38Z kib $
*/
#ifndef _SYS_STAT_H_
@@ -99,7 +99,7 @@
#include <sys/time.h>
#endif
-#if __BSD_VISIBLE
+#ifdef _KERNEL
struct ostat {
__uint16_t st_dev; /* inode's device */
ino_t st_ino; /* inode's number */
@@ -117,7 +117,7 @@
fflags_t st_flags; /* user defined flags for file */
__uint32_t st_gen; /* file generation number */
};
-#endif /* __BSD_VISIBLE */
+#endif
struct stat {
__dev_t st_dev; /* inode's device */
@@ -149,7 +149,7 @@
unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec));
};
-#if __BSD_VISIBLE
+#ifdef _KERNEL
struct nstat {
__dev_t st_dev; /* inode's device */
ino_t st_ino; /* inode's number */
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/stdint.h
--- a/head/sys/sys/stdint.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/stdint.h Wed Jul 25 16:42:12 2012 +0300
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: head/sys/sys/stdint.h 228529 2011-12-15 11:21:56Z theraven $
+ * $FreeBSD: head/sys/sys/stdint.h 237517 2012-06-24 04:15:58Z andrew $
*/
#ifndef _SYS_STDINT_H_
@@ -71,4 +71,8 @@
#define __WORDSIZE 32
#endif
+/* Limits of wchar_t. */
+#define WCHAR_MIN __WCHAR_MIN
+#define WCHAR_MAX __WCHAR_MAX
+
#endif /* !_SYS_STDINT_H_ */
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/syscall.h
--- a/head/sys/sys/syscall.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/syscall.h Wed Jul 25 16:42:12 2012 +0300
@@ -2,8 +2,8 @@
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: head/sys/sys/syscall.h 227776 2011-11-21 01:26:10Z lstewart $
- * created from FreeBSD: head/sys/kern/syscalls.master 227691 2011-11-19 06:35:15Z ed
+ * $FreeBSD: head/sys/sys/syscall.h 236027 2012-05-25 21:52:57Z ed $
+ * created from FreeBSD: head/sys/kern/syscalls.master 236026 2012-05-25 21:50:48Z ed
*/
#define SYS_syscall 0
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/syscall.mk
--- a/head/sys/sys/syscall.mk Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/syscall.mk Wed Jul 25 16:42:12 2012 +0300
@@ -1,7 +1,7 @@
# FreeBSD system call names.
# DO NOT EDIT-- this file is automatically generated.
-# $FreeBSD: head/sys/sys/syscall.mk 227776 2011-11-21 01:26:10Z lstewart $
-# created from FreeBSD: head/sys/kern/syscalls.master 227691 2011-11-19 06:35:15Z ed
+# $FreeBSD: head/sys/sys/syscall.mk 236027 2012-05-25 21:52:57Z ed $
+# created from FreeBSD: head/sys/kern/syscalls.master 236026 2012-05-25 21:50:48Z ed
MIASM = \
syscall.o \
exit.o \
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/syscallsubr.h
--- a/head/sys/sys/syscallsubr.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/syscallsubr.h Wed Jul 25 16:42:12 2012 +0300
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: head/sys/sys/syscallsubr.h 227502 2011-11-14 18:00:15Z jhb $
+ * $FreeBSD: head/sys/sys/syscallsubr.h 235886 2012-05-24 08:00:26Z gleb $
*/
#ifndef _SYS_SYSCALLSUBR_H_
@@ -89,6 +89,7 @@
int kern_fchownat(struct thread *td, int fd, char *path,
enum uio_seg pathseg, int uid, int gid, int flag);
int kern_fcntl(struct thread *td, int fd, int cmd, intptr_t arg);
+int kern_fhstat(struct thread *td, fhandle_t fh, struct stat *buf);
int kern_fhstatfs(struct thread *td, fhandle_t fh, struct statfs *buf);
int kern_fstat(struct thread *td, int fd, struct stat *sbp);
int kern_fstatfs(struct thread *td, int fd, struct statfs *buf);
@@ -96,7 +97,7 @@
int kern_futimes(struct thread *td, int fd, struct timeval *tptr,
enum uio_seg tptrseg);
int kern_getdirentries(struct thread *td, int fd, char *buf, u_int count,
- long *basep);
+ long *basep, ssize_t *residp, enum uio_seg bufseg);
int kern_getfsstat(struct thread *td, struct statfs **buf, size_t bufsize,
enum uio_seg bufseg, int flags);
int kern_getgroups(struct thread *td, u_int *ngrp, gid_t *groups);
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/sysent.h
--- a/head/sys/sys/sysent.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/sysent.h Wed Jul 25 16:42:12 2012 +0300
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: head/sys/sys/sysent.h 226388 2011-10-15 12:35:18Z kib $
+ * $FreeBSD: head/sys/sys/sysent.h 237476 2012-06-23 10:14:51Z kib $
*/
#ifndef _SYS_SYSENT_H_
@@ -124,6 +124,10 @@
vm_offset_t sv_shared_page_base;
vm_offset_t sv_shared_page_len;
vm_offset_t sv_sigcode_base;
+ vm_offset_t sv_timekeep_base;
+ int sv_timekeep_off;
+ int sv_timekeep_curr;
+ uint32_t sv_timekeep_gen;
void *sv_shared_page_obj;
void (*sv_schedtail)(struct thread *);
};
@@ -256,7 +260,9 @@
int syscall_thread_enter(struct thread *td, struct sysent *se);
void syscall_thread_exit(struct thread *td, struct sysent *se);
-int shared_page_fill(int size, int align, const char *data);
+int shared_page_alloc(int size, int align);
+int shared_page_fill(int size, int align, const void *data);
+void shared_page_write(int base, int size, const void *data);
void exec_sysvec_init(void *param);
#define INIT_SYSENTVEC(name, sv) \
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/sysproto.h
--- a/head/sys/sys/sysproto.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/sysproto.h Wed Jul 25 16:42:12 2012 +0300
@@ -2,8 +2,8 @@
* System call prototypes.
*
* DO NOT EDIT-- this file is automatically generated.
- * $FreeBSD: head/sys/sys/sysproto.h 227776 2011-11-21 01:26:10Z lstewart $
- * created from FreeBSD: head/sys/kern/syscalls.master 227691 2011-11-19 06:35:15Z ed
+ * $FreeBSD: head/sys/sys/sysproto.h 236027 2012-05-25 21:52:57Z ed $
+ * created from FreeBSD: head/sys/kern/syscalls.master 236026 2012-05-25 21:50:48Z ed
*/
#ifndef _SYS_SYSPROTO_H_
@@ -1669,11 +1669,11 @@
};
struct cap_new_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
- char rights_l_[PADL_(u_int64_t)]; u_int64_t rights; char rights_r_[PADR_(u_int64_t)];
+ char rights_l_[PADL_(uint64_t)]; uint64_t rights; char rights_r_[PADR_(uint64_t)];
};
struct cap_getrights_args {
char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
- char rightsp_l_[PADL_(u_int64_t *)]; u_int64_t * rightsp; char rightsp_r_[PADR_(u_int64_t *)];
+ char rightsp_l_[PADL_(uint64_t *)]; uint64_t * rightsp; char rightsp_r_[PADR_(uint64_t *)];
};
struct cap_enter_args {
register_t dummy;
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/systm.h
--- a/head/sys/sys/systm.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/systm.h Wed Jul 25 16:42:12 2012 +0300
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* @(#)systm.h 8.7 (Berkeley) 3/29/95
- * $FreeBSD: head/sys/sys/systm.h 232783 2012-03-10 14:57:21Z mav $
+ * $FreeBSD: head/sys/sys/systm.h 234785 2012-04-29 11:04:31Z dim $
*/
#ifndef _SYS_SYSTM_H_
@@ -153,7 +153,7 @@
struct _jmp_buf;
struct trapframe;
-int setjmp(struct _jmp_buf *);
+int setjmp(struct _jmp_buf *) __returns_twice;
void longjmp(struct _jmp_buf *, int) __dead2;
int dumpstatus(vm_offset_t addr, off_t count);
int nullop(void);
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/ucontext.h
--- a/head/sys/sys/ucontext.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/ucontext.h Wed Jul 25 16:42:12 2012 +0300
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD: head/sys/sys/ucontext.h 230864 2012-02-01 13:33:53Z kib $
+ * $FreeBSD: head/sys/sys/ucontext.h 234785 2012-04-29 11:04:31Z dim $
*/
#ifndef _SYS_UCONTEXT_H_
@@ -71,7 +71,7 @@
__BEGIN_DECLS
-int getcontext(ucontext_t *);
+int getcontext(ucontext_t *) __returns_twice;
ucontext_t *getcontextx(void);
int setcontext(const ucontext_t *);
void makecontext(ucontext_t *, void (*)(void), int, ...);
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/user.h
--- a/head/sys/sys/user.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/user.h Wed Jul 25 16:42:12 2012 +0300
@@ -29,7 +29,7 @@
* SUCH DAMAGE.
*
* @(#)user.h 8.2 (Berkeley) 9/23/93
- * $FreeBSD: head/sys/sys/user.h 227316 2011-11-07 21:13:19Z trociny $
+ * $FreeBSD: head/sys/sys/user.h 238527 2012-07-16 09:38:19Z pgj $
*/
#ifndef _SYS_USER_H_
@@ -159,7 +159,7 @@
u_int ki_estcpu; /* Time averaged value of ki_cpticks */
u_int ki_slptime; /* Time since last blocked */
u_int ki_swtime; /* Time swapped in or out */
- int ki_spareint1; /* unused (just here for alignment) */
+ u_int ki_cow; /* number of copy-on-write faults */
u_int64_t ki_runtime; /* Real time in microsec */
struct timeval ki_start; /* starting time */
struct timeval ki_childtime; /* time used by process children */
@@ -413,6 +413,8 @@
#define KVME_FLAG_NEEDS_COPY 0x00000002
#define KVME_FLAG_NOCOREDUMP 0x00000004
#define KVME_FLAG_SUPER 0x00000008
+#define KVME_FLAG_GROWS_UP 0x00000010
+#define KVME_FLAG_GROWS_DOWN 0x00000020
#if defined(__amd64__)
#define KINFO_OVMENTRY_SIZE 1168
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/vdso.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/head/sys/sys/vdso.h Wed Jul 25 16:42:12 2012 +0300
@@ -0,0 +1,122 @@
+/*-
+ * Copyright 2012 Konstantin Belousov <kib at FreeBSD.ORG>.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * 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.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (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: head/sys/sys/vdso.h 237474 2012-06-23 09:33:06Z kib $
+ */
+
+#ifndef _SYS_VDSO_H
+#define _SYS_VDSO_H
+
+#include <sys/types.h>
+#include <machine/vdso.h>
+
+struct vdso_timehands {
+ uint32_t th_algo;
+ uint32_t th_gen;
+ uint64_t th_scale;
+ uint32_t th_offset_count;
+ uint32_t th_counter_mask;
+ struct bintime th_offset;
+ struct bintime th_boottime;
+ VDSO_TIMEHANDS_MD
+};
+
+struct vdso_timekeep {
+ uint32_t tk_ver;
+ uint32_t tk_enabled;
+ uint32_t tk_current;
+ struct vdso_timehands tk_th[];
+};
+
+#define VDSO_TK_CURRENT_BUSY 0xffffffff
+#define VDSO_TK_VER_1 0x1
+#define VDSO_TK_VER_CURR VDSO_TK_VER_1
+#define VDSO_TH_ALGO_1 0x1
+
+#ifndef _KERNEL
+
+struct timespec;
+struct timeval;
+struct timezone;
+
+int __vdso_clock_gettime(clockid_t clock_id, struct timespec *ts);
+#pragma weak __vdso_clock_gettime
+
+int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz);
+#pragma weak __vdso_gettimeofday
+
+u_int __vdso_gettc(const struct vdso_timehands *vdso_th);
+#pragma weak __vdso_gettc
+
+#endif
+
+#ifdef _KERNEL
+
+void timekeep_push_vdso(void);
+
+uint32_t tc_fill_vdso_timehands(struct vdso_timehands *vdso_th);
+
+/*
+ * The cpu_fill_vdso_timehands() function should fill MD-part of the
+ * struct vdso_timehands, which is both machine- and
+ * timecounter-depended. The return value should be 1 if fast
+ * userspace timecounter is enabled by hardware, and 0 otherwise. The
+ * global sysctl enable override is handled by machine-independed code
+ * after cpu_fill_vdso_timehands() call is made.
+ */
+uint32_t cpu_fill_vdso_timehands(struct vdso_timehands *vdso_th);
+
+#define VDSO_TH_NUM 4
+
+#ifdef COMPAT_FREEBSD32
+struct bintime32 {
+ uint32_t sec;
+ uint32_t frac[2];
+};
+
+struct vdso_timehands32 {
+ uint32_t th_algo;
+ uint32_t th_gen;
+ uint32_t th_scale[2];
+ uint32_t th_offset_count;
+ uint32_t th_counter_mask;
+ struct bintime32 th_offset;
+ struct bintime32 th_boottime;
+ VDSO_TIMEHANDS_MD32
+};
+
+struct vdso_timekeep32 {
+ uint32_t tk_ver;
+ uint32_t tk_enabled;
+ uint32_t tk_current;
+ struct vdso_timehands32 tk_th[];
+};
+
+uint32_t tc_fill_vdso_timehands32(struct vdso_timehands32 *vdso_th32);
+uint32_t cpu_fill_vdso_timehands32(struct vdso_timehands32 *vdso_th32);
+
+#endif
+#endif
+
+#endif
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/vmmeter.h
--- a/head/sys/sys/vmmeter.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/vmmeter.h Wed Jul 25 16:42:12 2012 +0300
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*
* @(#)vmmeter.h 8.2 (Berkeley) 7/10/94
- * $FreeBSD$
+ * $FreeBSD: head/sys/sys/vmmeter.h 238212 2012-07-07 19:39:08Z kib $
*/
#ifndef _SYS_VMMETER_H_
@@ -79,7 +79,7 @@
u_int v_pdpages; /* (q) pages analyzed by daemon */
u_int v_tcached; /* (p) total pages cached */
- u_int v_dfree; /* (q) pages freed by daemon */
+ u_int v_dfree; /* (p) pages freed by daemon */
u_int v_pfree; /* (p) pages freed by exiting processes */
u_int v_tfree; /* (p) total pages freed */
/*
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/vnode.h
--- a/head/sys/sys/vnode.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/vnode.h Wed Jul 25 16:42:12 2012 +0300
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*
* @(#)vnode.h 8.7 (Berkeley) 2/4/94
- * $FreeBSD: head/sys/sys/vnode.h 234482 2012-04-20 06:50:44Z mckusick $
+ * $FreeBSD: head/sys/sys/vnode.h 236762 2012-06-08 18:32:09Z jhb $
*/
#ifndef _SYS_VNODE_H_
@@ -38,6 +38,7 @@
#include <sys/lock.h>
#include <sys/lockmgr.h>
#include <sys/mutex.h>
+#include <sys/rangelock.h>
#include <sys/selinfo.h>
#include <sys/uio.h>
#include <sys/acl.h>
@@ -164,7 +165,8 @@
*/
struct vpollinfo *v_pollinfo; /* i Poll events, p for *v_pi */
struct label *v_label; /* MAC label for vnode */
- struct lockf *v_lockf; /* Byte-level lock list */
+ struct lockf *v_lockf; /* Byte-level advisory lock list */
+ struct rangelock v_rl; /* Byte-range lock */
};
#endif /* defined(_KERNEL) || defined(_KVM_VNODE) */
@@ -634,12 +636,14 @@
void vholdl(struct vnode *);
void vinactive(struct vnode *, struct thread *);
int vinvalbuf(struct vnode *vp, int save, int slpflag, int slptimeo);
-int vtruncbuf(struct vnode *vp, struct ucred *cred, struct thread *td,
- off_t length, int blksize);
+int vtruncbuf(struct vnode *vp, struct ucred *cred, off_t length,
+ int blksize);
void vunref(struct vnode *);
void vn_printf(struct vnode *vp, const char *fmt, ...) __printflike(2,3);
#define vprint(label, vp) vn_printf((vp), "%s\n", (label))
-int vrecycle(struct vnode *vp, struct thread *td);
+int vrecycle(struct vnode *vp);
+int vn_bmap_seekhole(struct vnode *vp, u_long cmd, off_t *off,
+ struct ucred *cred);
int vn_close(struct vnode *vp,
int flags, struct ucred *file_cred, struct thread *td);
void vn_finished_write(struct mount *mp);
@@ -650,6 +654,8 @@
int vn_open(struct nameidata *ndp, int *flagp, int cmode, struct file *fp);
int vn_open_cred(struct nameidata *ndp, int *flagp, int cmode,
u_int vn_open_flags, struct ucred *cred, struct file *fp);
+int vn_open_vnode(struct vnode *vp, int fmode, struct ucred *cred,
+ struct thread *td, struct file *fp);
void vn_pages_remove(struct vnode *vp, vm_pindex_t start, vm_pindex_t end);
int vn_pollrecord(struct vnode *vp, struct thread *p, int events);
int vn_rdwr(enum uio_rw rw, struct vnode *vp, void *base,
@@ -677,6 +683,17 @@
int vn_vget_ino(struct vnode *vp, ino_t ino, int lkflags,
struct vnode **rvp);
+int vn_io_fault_uiomove(char *data, int xfersize, struct uio *uio);
+
+#define vn_rangelock_unlock(vp, cookie) \
+ rangelock_unlock(&(vp)->v_rl, (cookie), VI_MTX(vp))
+#define vn_rangelock_unlock_range(vp, cookie, start, end) \
+ rangelock_unlock_range(&(vp)->v_rl, (cookie), (start), (end), \
+ VI_MTX(vp))
+#define vn_rangelock_rlock(vp, start, end) \
+ rangelock_rlock(&(vp)->v_rl, (start), (end), VI_MTX(vp))
+#define vn_rangelock_wlock(vp, start, end) \
+ rangelock_wlock(&(vp)->v_rl, (start), (end), VI_MTX(vp))
int vfs_cache_lookup(struct vop_lookup_args *ap);
void vfs_timestamp(struct timespec *);
diff -r fc630f3c8529 -r d36a04c5f34a head/sys/sys/vtoc.h
--- a/head/sys/sys/vtoc.h Wed Jul 25 16:40:53 2012 +0300
+++ b/head/sys/sys/vtoc.h Wed Jul 25 16:42:12 2012 +0300
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $FreeBSD$
+ * $FreeBSD: head/sys/sys/vtoc.h 236023 2012-05-25 20:33:34Z marcel $
*/
#ifndef _SYS_VTOC_H_
@@ -51,6 +51,7 @@
#define VTOC_TAG_FREEBSD_UFS 0x0902
#define VTOC_TAG_FREEBSD_VINUM 0x0903
#define VTOC_TAG_FREEBSD_ZFS 0x0904
+#define VTOC_TAG_FREEBSD_NANDFS 0x0905
#define VTOC_FLAG_UNMNT 0x01 /* unmountable partition */
#define VTOC_FLAG_RDONLY 0x10 /* partition is read/only */
More information about the Zrouter-src-freebsd
mailing list