svn commit: r247097 - in user/attilio/vmobj-rwlock: cddl/contrib/opensolaris/cmd/dtrace lib/libc/stdlib share/mk sys/amd64/include sys/arm/arm sys/arm/at91 sys/arm/econa sys/arm/include sys/arm/s3c...

Attilio Rao attilio at FreeBSD.org
Thu Feb 21 15:06:25 UTC 2013


Author: attilio
Date: Thu Feb 21 15:06:19 2013
New Revision: 247097
URL: http://svnweb.freebsd.org/changeset/base/247097

Log:
  MFC

Added:
  user/attilio/vmobj-rwlock/sys/x86/include/elf.h
     - copied unchanged from r247096, head/sys/x86/include/elf.h
  user/attilio/vmobj-rwlock/sys/x86/include/frame.h
     - copied unchanged from r247096, head/sys/x86/include/frame.h
  user/attilio/vmobj-rwlock/sys/x86/include/sigframe.h
     - copied unchanged from r247096, head/sys/x86/include/sigframe.h
  user/attilio/vmobj-rwlock/sys/x86/include/signal.h
     - copied unchanged from r247096, head/sys/x86/include/signal.h
  user/attilio/vmobj-rwlock/sys/x86/include/ucontext.h
     - copied unchanged from r247096, head/sys/x86/include/ucontext.h
Modified:
  user/attilio/vmobj-rwlock/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c
  user/attilio/vmobj-rwlock/lib/libc/stdlib/qsort.3
  user/attilio/vmobj-rwlock/share/mk/bsd.lib.mk
  user/attilio/vmobj-rwlock/sys/amd64/include/elf.h
  user/attilio/vmobj-rwlock/sys/amd64/include/frame.h
  user/attilio/vmobj-rwlock/sys/amd64/include/sigframe.h
  user/attilio/vmobj-rwlock/sys/amd64/include/signal.h
  user/attilio/vmobj-rwlock/sys/amd64/include/ucontext.h
  user/attilio/vmobj-rwlock/sys/arm/arm/machdep.c
  user/attilio/vmobj-rwlock/sys/arm/arm/pmap-v6.c
  user/attilio/vmobj-rwlock/sys/arm/arm/pmap.c
  user/attilio/vmobj-rwlock/sys/arm/at91/at91_machdep.c
  user/attilio/vmobj-rwlock/sys/arm/econa/econa_machdep.c
  user/attilio/vmobj-rwlock/sys/arm/include/pmap.h
  user/attilio/vmobj-rwlock/sys/arm/s3c2xx0/s3c24x0_machdep.c
  user/attilio/vmobj-rwlock/sys/arm/sa11x0/assabet_machdep.c
  user/attilio/vmobj-rwlock/sys/arm/xscale/i80321/ep80219_machdep.c
  user/attilio/vmobj-rwlock/sys/arm/xscale/i80321/iq31244_machdep.c
  user/attilio/vmobj-rwlock/sys/arm/xscale/i8134x/crb_machdep.c
  user/attilio/vmobj-rwlock/sys/arm/xscale/ixp425/avila_machdep.c
  user/attilio/vmobj-rwlock/sys/arm/xscale/pxa/pxa_machdep.c
  user/attilio/vmobj-rwlock/sys/boot/fdt/fdt_loader_cmd.c
  user/attilio/vmobj-rwlock/sys/boot/userboot/userboot/elf32_freebsd.c
  user/attilio/vmobj-rwlock/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c
  user/attilio/vmobj-rwlock/sys/crypto/aesni/aesni_wrap.c
  user/attilio/vmobj-rwlock/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
  user/attilio/vmobj-rwlock/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c
  user/attilio/vmobj-rwlock/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
  user/attilio/vmobj-rwlock/sys/dev/ath/if_ath.c
  user/attilio/vmobj-rwlock/sys/dev/ath/if_ath_sysctl.c
  user/attilio/vmobj-rwlock/sys/dev/ath/if_ath_tx.c
  user/attilio/vmobj-rwlock/sys/dev/ath/if_ath_tx.h
  user/attilio/vmobj-rwlock/sys/dev/ath/if_ath_tx_ht.c
  user/attilio/vmobj-rwlock/sys/dev/ath/if_athvar.h
  user/attilio/vmobj-rwlock/sys/dev/cxgbe/t4_sge.c
  user/attilio/vmobj-rwlock/sys/dev/e1000/e1000_82571.c
  user/attilio/vmobj-rwlock/sys/dev/e1000/e1000_82575.c
  user/attilio/vmobj-rwlock/sys/dev/e1000/e1000_82575.h
  user/attilio/vmobj-rwlock/sys/dev/e1000/e1000_api.c
  user/attilio/vmobj-rwlock/sys/dev/e1000/e1000_api.h
  user/attilio/vmobj-rwlock/sys/dev/e1000/e1000_defines.h
  user/attilio/vmobj-rwlock/sys/dev/e1000/e1000_hw.h
  user/attilio/vmobj-rwlock/sys/dev/e1000/e1000_i210.c
  user/attilio/vmobj-rwlock/sys/dev/e1000/e1000_i210.h
  user/attilio/vmobj-rwlock/sys/dev/e1000/e1000_ich8lan.c
  user/attilio/vmobj-rwlock/sys/dev/e1000/e1000_ich8lan.h
  user/attilio/vmobj-rwlock/sys/dev/e1000/e1000_mac.c
  user/attilio/vmobj-rwlock/sys/dev/e1000/e1000_mac.h
  user/attilio/vmobj-rwlock/sys/dev/e1000/e1000_manage.c
  user/attilio/vmobj-rwlock/sys/dev/e1000/e1000_nvm.c
  user/attilio/vmobj-rwlock/sys/dev/e1000/e1000_nvm.h
  user/attilio/vmobj-rwlock/sys/dev/e1000/e1000_osdep.h
  user/attilio/vmobj-rwlock/sys/dev/e1000/e1000_phy.c
  user/attilio/vmobj-rwlock/sys/dev/e1000/e1000_phy.h
  user/attilio/vmobj-rwlock/sys/dev/e1000/e1000_regs.h
  user/attilio/vmobj-rwlock/sys/dev/e1000/if_em.c
  user/attilio/vmobj-rwlock/sys/dev/e1000/if_igb.c
  user/attilio/vmobj-rwlock/sys/dev/e1000/if_lem.c
  user/attilio/vmobj-rwlock/sys/dev/mcd/mcd.c
  user/attilio/vmobj-rwlock/sys/dev/ppc/ppc.c
  user/attilio/vmobj-rwlock/sys/dev/ppc/ppc_isa.c
  user/attilio/vmobj-rwlock/sys/dev/si/si.c
  user/attilio/vmobj-rwlock/sys/fs/nfsclient/nfs_clstate.c
  user/attilio/vmobj-rwlock/sys/i386/include/elf.h
  user/attilio/vmobj-rwlock/sys/i386/include/frame.h
  user/attilio/vmobj-rwlock/sys/i386/include/sigframe.h
  user/attilio/vmobj-rwlock/sys/i386/include/signal.h
  user/attilio/vmobj-rwlock/sys/i386/include/ucontext.h
  user/attilio/vmobj-rwlock/sys/i386/isa/pmtimer.c
  user/attilio/vmobj-rwlock/sys/kern/vfs_init.c
  user/attilio/vmobj-rwlock/sys/netinet/ip_input.c
  user/attilio/vmobj-rwlock/sys/opencrypto/xform.c
  user/attilio/vmobj-rwlock/sys/pci/ncr.c
  user/attilio/vmobj-rwlock/sys/sys/systm.h
  user/attilio/vmobj-rwlock/sys/x86/isa/atrtc.c
  user/attilio/vmobj-rwlock/sys/x86/isa/clock.c
  user/attilio/vmobj-rwlock/usr.bin/systat/ifcmds.c
  user/attilio/vmobj-rwlock/usr.bin/systat/ifstat.c
  user/attilio/vmobj-rwlock/usr.bin/systat/systat.1
  user/attilio/vmobj-rwlock/usr.sbin/makefs/makefs.8
  user/attilio/vmobj-rwlock/usr.sbin/makefs/makefs.c
  user/attilio/vmobj-rwlock/usr.sbin/makefs/makefs.h
  user/attilio/vmobj-rwlock/usr.sbin/makefs/mtree.c
  user/attilio/vmobj-rwlock/usr.sbin/makefs/walk.c
  user/attilio/vmobj-rwlock/usr.sbin/mountd/mountd.c
  user/attilio/vmobj-rwlock/usr.sbin/pkg/pkg.c
Directory Properties:
  user/attilio/vmobj-rwlock/   (props changed)
  user/attilio/vmobj-rwlock/cddl/contrib/opensolaris/   (props changed)
  user/attilio/vmobj-rwlock/lib/libc/   (props changed)
  user/attilio/vmobj-rwlock/sys/   (props changed)
  user/attilio/vmobj-rwlock/sys/boot/   (props changed)
  user/attilio/vmobj-rwlock/sys/cddl/contrib/opensolaris/   (props changed)

Modified: user/attilio/vmobj-rwlock/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c
==============================================================================
--- user/attilio/vmobj-rwlock/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c	Thu Feb 21 15:02:36 2013	(r247096)
+++ user/attilio/vmobj-rwlock/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c	Thu Feb 21 15:06:19 2013	(r247097)
@@ -195,6 +195,13 @@ fatal(const char *fmt, ...)
 	verror(fmt, ap);
 	va_end(ap);
 
+	/*
+	 * Close the DTrace handle to ensure that any controlled processes are
+	 * correctly restored and continued.
+	 */
+	if (g_dtp)
+		dtrace_close(g_dtp);
+
 	exit(E_ERROR);
 }
 

Modified: user/attilio/vmobj-rwlock/lib/libc/stdlib/qsort.3
==============================================================================
--- user/attilio/vmobj-rwlock/lib/libc/stdlib/qsort.3	Thu Feb 21 15:02:36 2013	(r247096)
+++ user/attilio/vmobj-rwlock/lib/libc/stdlib/qsort.3	Thu Feb 21 15:06:19 2013	(r247097)
@@ -205,12 +205,6 @@ functions
 return no value.
 .Pp
 .Rv -std heapsort mergesort
-.Sh COMPATIBILITY
-Previous versions of
-.Fn qsort
-did not permit the comparison routine itself to call
-.Fn qsort 3 .
-This is no longer true.
 .Sh EXAMPLES
 A sample program that sorts an array of
 .Vt int
@@ -220,7 +214,6 @@ and then prints the sorted array to stan
 .Bd -literal
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
 
 /*
  * Custom comparison function that can compare 'int' values through pointers
@@ -229,15 +222,10 @@ and then prints the sorted array to stan
 static int
 int_compare(const void *p1, const void *p2)
 {
-        int *left = (int *)p1;
-        int *right = (int *)p2;
+        int left = *(const int *)p1;
+        int right = *(const int *)p2;
 
-        if (*left < *right)
-                return (-1);
-        else if (*left > *right)
-                return (1);
-        else
-                return (0);
+        return ((left > right) - (left < right));
 }
 
 /*
@@ -247,16 +235,22 @@ int
 main(void)
 {
        int int_array[] = { 4, 5, 9, 3, 0, 1, 7, 2, 8, 6 };
-       const int array_size = sizeof(int_array) / sizeof(int_array[0]);
-       int k;
+       const size_t array_size = sizeof(int_array) / sizeof(int_array[0]);
+       size_t k;
 
-       qsort(&int_array, array_size, sizeof(int), int_compare);
+       qsort(&int_array, array_size, sizeof(int_array[0]), int_compare);
        for (k = 0; k < array_size; k++)
                 printf(" %d", int_array[k]);
-        printf("\\n");
-        exit(EXIT_SUCCESS);
+        puts("");
+        return (EXIT_SUCCESS);
 }
 .Ed
+.Sh COMPATIBILITY
+Previous versions of
+.Fn qsort
+did not permit the comparison routine itself to call
+.Fn qsort 3 .
+This is no longer true.
 .Sh ERRORS
 The
 .Fn heapsort

Modified: user/attilio/vmobj-rwlock/share/mk/bsd.lib.mk
==============================================================================
--- user/attilio/vmobj-rwlock/share/mk/bsd.lib.mk	Thu Feb 21 15:02:36 2013	(r247096)
+++ user/attilio/vmobj-rwlock/share/mk/bsd.lib.mk	Thu Feb 21 15:06:19 2013	(r247097)
@@ -113,12 +113,20 @@ PO_FLAG=-pg
 
 all: objwarn
 
+.if defined(SHLIB_NAME)
+.if defined(DEBUG_FLAGS)
+SHLIB_NAME_FULL=${SHLIB_NAME}.debug
+.else
+SHLIB_NAME_FULL=${SHLIB_NAME}
+.endif
+.endif
+
 .include <bsd.symver.mk>
 
 # Allow libraries to specify their own version map or have it
 # automatically generated (see bsd.symver.mk above).
 .if ${MK_SYMVER} == "yes" && !empty(VERSION_MAP)
-${SHLIB_NAME}:	${VERSION_MAP}
+${SHLIB_NAME_FULL}:	${VERSION_MAP}
 LDFLAGS+=	-Wl,--version-script=${VERSION_MAP}
 .endif
 
@@ -165,12 +173,6 @@ SOBJS+=		${OBJS:.o=.So}
 .if defined(SHLIB_NAME)
 _LIBS+=		${SHLIB_NAME}
 
-.if defined(DEBUG_FLAGS)
-SHLIB_NAME_FULL=${SHLIB_NAME}.debug
-.else
-SHLIB_NAME_FULL=${SHLIB_NAME}
-.endif
-
 SOLINKOPTS=	-shared -Wl,-x
 .if !defined(ALLOW_SHARED_TEXTREL)
 SOLINKOPTS+=	-Wl,--fatal-warnings -Wl,--warn-shared-textrel

Modified: user/attilio/vmobj-rwlock/sys/amd64/include/elf.h
==============================================================================
--- user/attilio/vmobj-rwlock/sys/amd64/include/elf.h	Thu Feb 21 15:02:36 2013	(r247096)
+++ user/attilio/vmobj-rwlock/sys/amd64/include/elf.h	Thu Feb 21 15:06:19 2013	(r247097)
@@ -1,124 +1,6 @@
 /*-
- * Copyright (c) 1996-1997 John D. Polstra.
- * 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$
+ * This file is in the public domain.
  */
+/* $FreeBSD$ */
 
-#ifndef _MACHINE_ELF_H_
-#define	_MACHINE_ELF_H_ 1
-
-/*
- * ELF definitions for the AMD64 architecture.
- */
-
-
-#ifndef __ELF_WORD_SIZE
-#define	__ELF_WORD_SIZE	64	/* Used by <sys/elf_generic.h> */
-#endif
-#include <sys/elf32.h>	/* Definitions common to all 32 bit architectures. */
-#include <sys/elf64.h>	/* Definitions common to all 64 bit architectures. */
-#include <sys/elf_generic.h>
-
-#define	ELF_ARCH	EM_X86_64
-#define	ELF_ARCH32	EM_386
-
-#define	ELF_MACHINE_OK(x) ((x) == EM_X86_64)
-
-/*
- * Auxiliary vector entries for passing information to the interpreter.
- *
- * The i386 supplement to the SVR4 ABI specification names this "auxv_t",
- * but POSIX lays claim to all symbols ending with "_t".
- */
-typedef struct {	/* Auxiliary vector entry on initial stack */
-	int	a_type;			/* Entry type. */
-	union {
-		int	a_val;		/* Integer value. */
-	} a_un;
-} Elf32_Auxinfo;
-
-
-typedef struct {	/* Auxiliary vector entry on initial stack */
-	long	a_type;			/* Entry type. */
-	union {
-		long	a_val;		/* Integer value. */
-		void	*a_ptr;		/* Address. */
-		void	(*a_fcn)(void);	/* Function pointer (not used). */
-	} a_un;
-} Elf64_Auxinfo;
-
-__ElfType(Auxinfo);
-
-/* Values for a_type. */
-#define	AT_NULL		0	/* Terminates the vector. */
-#define	AT_IGNORE	1	/* Ignored entry. */
-#define	AT_EXECFD	2	/* File descriptor of program to load. */
-#define	AT_PHDR		3	/* Program header of program already loaded. */
-#define	AT_PHENT	4	/* Size of each program header entry. */
-#define	AT_PHNUM	5	/* Number of program header entries. */
-#define	AT_PAGESZ	6	/* Page size in bytes. */
-#define	AT_BASE		7	/* Interpreter's base address. */
-#define	AT_FLAGS	8	/* Flags (unused for i386). */
-#define	AT_ENTRY	9	/* Where interpreter should transfer control. */
-#define	AT_NOTELF	10	/* Program is not ELF ?? */
-#define	AT_UID		11	/* Real uid. */
-#define	AT_EUID		12	/* Effective uid. */
-#define	AT_GID		13	/* Real gid. */
-#define	AT_EGID		14	/* Effective gid. */
-#define	AT_EXECPATH	15	/* Path to the executable. */
-#define	AT_CANARY	16	/* Canary for SSP */
-#define	AT_CANARYLEN	17	/* Length of the canary. */
-#define	AT_OSRELDATE	18	/* OSRELDATE. */
-#define	AT_NCPUS	19	/* Number of CPUs. */
-#define	AT_PAGESIZES	20	/* Pagesizes. */
-#define	AT_PAGESIZESLEN	21	/* Number of pagesizes. */
-#define	AT_TIMEKEEP	22	/* Pointer to timehands. */
-#define	AT_STACKPROT	23	/* Initial stack protection. */
-
-#define	AT_COUNT	24	/* Count of defined aux entry types. */
-
-/*
- * Relocation types.
- */
-
-#define	R_X86_64_COUNT	24	/* Count of defined relocation types. */
-
-/* Define "machine" characteristics */
-#if __ELF_WORD_SIZE == 32
-#define ELF_TARG_CLASS  ELFCLASS32
-#else
-#define ELF_TARG_CLASS  ELFCLASS64
-#endif
-#define	ELF_TARG_DATA	ELFDATA2LSB
-#define	ELF_TARG_MACH	EM_X86_64
-#define	ELF_TARG_VER	1
-
-#if __ELF_WORD_SIZE == 32
-#define	ET_DYN_LOAD_ADDR 0x01001000
-#else
-#define	ET_DYN_LOAD_ADDR 0x01021000
-#endif
-
-#endif /* !_MACHINE_ELF_H_ */
+#include <x86/elf.h>

Modified: user/attilio/vmobj-rwlock/sys/amd64/include/frame.h
==============================================================================
--- user/attilio/vmobj-rwlock/sys/amd64/include/frame.h	Thu Feb 21 15:02:36 2013	(r247096)
+++ user/attilio/vmobj-rwlock/sys/amd64/include/frame.h	Thu Feb 21 15:06:19 2013	(r247097)
@@ -1,87 +1,6 @@
 /*-
- * Copyright (c) 2003 Peter Wemm.
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * William Jolitz.
- *
- * 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.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- *	from: @(#)frame.h	5.2 (Berkeley) 1/18/91
- * $FreeBSD$
+ * This file is in the public domain.
  */
+/* $FreeBSD$ */
 
-#ifndef _MACHINE_FRAME_H_
-#define _MACHINE_FRAME_H_ 1
-
-/*
- * System stack frames.
- */
-
-/*
- * Exception/Trap Stack Frame
- *
- * The ordering of this is specifically so that we can take first 6
- * the syscall arguments directly from the beginning of the frame.
- */
-
-struct trapframe {
-	register_t	tf_rdi;
-	register_t	tf_rsi;
-	register_t	tf_rdx;
-	register_t	tf_rcx;
-	register_t	tf_r8;
-	register_t	tf_r9;
-	register_t	tf_rax;
-	register_t	tf_rbx;
-	register_t	tf_rbp;
-	register_t	tf_r10;
-	register_t	tf_r11;
-	register_t	tf_r12;
-	register_t	tf_r13;
-	register_t	tf_r14;
-	register_t	tf_r15;
-	uint32_t	tf_trapno;
-	uint16_t	tf_fs;
-	uint16_t	tf_gs;
-	register_t	tf_addr;
-	uint32_t	tf_flags;
-	uint16_t	tf_es;
-	uint16_t	tf_ds;
-	/* below portion defined in hardware */
-	register_t	tf_err;
-	register_t	tf_rip;
-	register_t	tf_cs;
-	register_t	tf_rflags;
-	register_t	tf_rsp;
-	register_t	tf_ss;
-};
-
-#define	TF_HASSEGS	0x1
-#define	TF_HASBASES	0x2
-#define	TF_HASFPXSTATE	0x4
-
-#endif /* _MACHINE_FRAME_H_ */
+#include <x86/frame.h>

Modified: user/attilio/vmobj-rwlock/sys/amd64/include/sigframe.h
==============================================================================
--- user/attilio/vmobj-rwlock/sys/amd64/include/sigframe.h	Thu Feb 21 15:02:36 2013	(r247096)
+++ user/attilio/vmobj-rwlock/sys/amd64/include/sigframe.h	Thu Feb 21 15:06:19 2013	(r247097)
@@ -1,46 +1,6 @@
 /*-
- * Copyright (c) 1999 Marcel Moolenaar
- * 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 
- *    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
- *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- * 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$
+ * This file is in the public domain.
  */
+/* $FreeBSD$ */
 
-#ifndef _MACHINE_SIGFRAME_H_
-#define	_MACHINE_SIGFRAME_H_
-
-/*
- * Signal frames, arguments passed to application signal handlers.
- */
-struct sigframe {
-	union {
-		__siginfohandler_t	*sf_action;
-		__sighandler_t		*sf_handler;
-	} sf_ahu;
-	ucontext_t	sf_uc;		/* = *sf_ucontext */
-	siginfo_t	sf_si;		/* = *sf_siginfo (SA_SIGINFO case) */
-};
-
-#endif /* !_MACHINE_SIGFRAME_H_ */
+#include <x86/sigframe.h>

Modified: user/attilio/vmobj-rwlock/sys/amd64/include/signal.h
==============================================================================
--- user/attilio/vmobj-rwlock/sys/amd64/include/signal.h	Thu Feb 21 15:02:36 2013	(r247096)
+++ user/attilio/vmobj-rwlock/sys/amd64/include/signal.h	Thu Feb 21 15:06:19 2013	(r247097)
@@ -1,109 +1,6 @@
 /*-
- * Copyright (c) 2003 Peter Wemm.
- * Copyright (c) 1986, 1989, 1991, 1993
- *	The Regents of the University of California.  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.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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.
- *
- *	@(#)signal.h	8.1 (Berkeley) 6/11/93
- * $FreeBSD$
+ * This file is in the public domain.
  */
+/* $FreeBSD$ */
 
-#ifndef _MACHINE_SIGNAL_H_
-#define	_MACHINE_SIGNAL_H_
-
-#include <sys/cdefs.h>
-#include <sys/_sigset.h>
-
-/*
- * Machine-dependent signal definitions
- */
-
-typedef long sig_atomic_t;
-
-#if __BSD_VISIBLE
-#include <machine/trap.h>	/* codes for SIGILL, SIGFPE */
-
-/*
- * Information pushed on stack when a signal is delivered.
- * This is used by the kernel to restore state following
- * execution of the signal handler.  It is also made available
- * to the handler to allow it to restore state properly if
- * a non-standard exit is performed.
- *
- * The sequence of the fields/registers after sc_mask in struct
- * sigcontext must match those in mcontext_t and struct trapframe.
- */
-struct sigcontext {
-	struct __sigset sc_mask;	/* signal mask to restore */
-	long	sc_onstack;		/* sigstack state to restore */
-	long	sc_rdi;		/* machine state (struct trapframe) */
-	long	sc_rsi;
-	long	sc_rdx;
-	long	sc_rcx;
-	long	sc_r8;
-	long	sc_r9;
-	long	sc_rax;
-	long	sc_rbx;
-	long	sc_rbp;
-	long	sc_r10;
-	long	sc_r11;
-	long	sc_r12;
-	long	sc_r13;
-	long	sc_r14;
-	long	sc_r15;
-	int	sc_trapno;
-	short	sc_fs;
-	short	sc_gs;
-	long	sc_addr;
-	int	sc_flags;
-	short	sc_es;
-	short	sc_ds;
-	long	sc_err;
-	long	sc_rip;
-	long	sc_cs;
-	long	sc_rflags;
-	long	sc_rsp;
-	long	sc_ss;
-	long	sc_len;			/* sizeof(mcontext_t) */
-	/*
-	 * See <machine/ucontext.h> and <machine/fpu.h> for the following
-	 * fields.
-	 */
-	long	sc_fpformat;
-	long	sc_ownedfp;
-	long	sc_fpstate[64] __aligned(16);
-
-	long	sc_fsbase;
-	long	sc_gsbase;
-
-	long	sc_xfpustate;
-	long	sc_xfpustate_len;
-
-	long	sc_spare[4];
-};
-#endif /* __BSD_VISIBLE */
-
-#endif /* !_MACHINE_SIGNAL_H_ */
+#include <x86/signal.h>

Modified: user/attilio/vmobj-rwlock/sys/amd64/include/ucontext.h
==============================================================================
--- user/attilio/vmobj-rwlock/sys/amd64/include/ucontext.h	Thu Feb 21 15:02:36 2013	(r247096)
+++ user/attilio/vmobj-rwlock/sys/amd64/include/ucontext.h	Thu Feb 21 15:06:19 2013	(r247097)
@@ -1,103 +1,6 @@
 /*-
- * Copyright (c) 2003 Peter Wemm
- * Copyright (c) 1999 Marcel Moolenaar
- * 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 
- *    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
- *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- * 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$
+ * This file is in the public domain.
  */
+/* $FreeBSD$ */
 
-#ifndef _MACHINE_UCONTEXT_H_
-#define	_MACHINE_UCONTEXT_H_
-
-/*
- * mc_trapno bits. Shall be in sync with TF_XXX.
- */
-#define	_MC_HASSEGS	0x1
-#define	_MC_HASBASES	0x2
-#define	_MC_HASFPXSTATE	0x4
-#define	_MC_FLAG_MASK	(_MC_HASSEGS | _MC_HASBASES | _MC_HASFPXSTATE)
-
-typedef struct __mcontext {
-	/*
-	 * The definition of mcontext_t must match the layout of
-	 * struct sigcontext after the sc_mask member.  This is so
-	 * that we can support sigcontext and ucontext_t at the same
-	 * time.
-	 */
-	__register_t	mc_onstack;	/* XXX - sigcontext compat. */
-	__register_t	mc_rdi;		/* machine state (struct trapframe) */
-	__register_t	mc_rsi;
-	__register_t	mc_rdx;
-	__register_t	mc_rcx;
-	__register_t	mc_r8;
-	__register_t	mc_r9;
-	__register_t	mc_rax;
-	__register_t	mc_rbx;
-	__register_t	mc_rbp;
-	__register_t	mc_r10;
-	__register_t	mc_r11;
-	__register_t	mc_r12;
-	__register_t	mc_r13;
-	__register_t	mc_r14;
-	__register_t	mc_r15;
-	__uint32_t	mc_trapno;
-	__uint16_t	mc_fs;
-	__uint16_t	mc_gs;
-	__register_t	mc_addr;
-	__uint32_t	mc_flags;
-	__uint16_t	mc_es;
-	__uint16_t	mc_ds;
-	__register_t	mc_err;
-	__register_t	mc_rip;
-	__register_t	mc_cs;
-	__register_t	mc_rflags;
-	__register_t	mc_rsp;
-	__register_t	mc_ss;
-
-	long	mc_len;			/* sizeof(mcontext_t) */
-
-#define	_MC_FPFMT_NODEV		0x10000	/* device not present or configured */
-#define	_MC_FPFMT_XMM		0x10002
-	long	mc_fpformat;
-#define	_MC_FPOWNED_NONE	0x20000	/* FP state not used */
-#define	_MC_FPOWNED_FPU		0x20001	/* FP state came from FPU */
-#define	_MC_FPOWNED_PCB		0x20002	/* FP state came from PCB */
-	long	mc_ownedfp;
-	/*
-	 * See <machine/fpu.h> for the internals of mc_fpstate[].
-	 */
-	long	mc_fpstate[64] __aligned(16);
-
-	__register_t	mc_fsbase;
-	__register_t	mc_gsbase;
-
-	__register_t	mc_xfpustate;
-	__register_t	mc_xfpustate_len;
-
-	long	mc_spare[4];
-} mcontext_t;
-
-#endif /* !_MACHINE_UCONTEXT_H_ */
+#include <x86/ucontext.h>

Modified: user/attilio/vmobj-rwlock/sys/arm/arm/machdep.c
==============================================================================
--- user/attilio/vmobj-rwlock/sys/arm/arm/machdep.c	Thu Feb 21 15:02:36 2013	(r247096)
+++ user/attilio/vmobj-rwlock/sys/arm/arm/machdep.c	Thu Feb 21 15:06:19 2013	(r247097)
@@ -1477,7 +1477,7 @@ initarm(struct arm_boot_params *abp)
 	arm_intrnames_init();
 	arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL);
 	arm_dump_avail_init(memsize, sizeof(dump_avail) / sizeof(dump_avail[0]));
-	pmap_bootstrap(freemempos, vm_max_kernel_address, &kernel_l1pt);
+	pmap_bootstrap(freemempos, &kernel_l1pt);
 	msgbufp = (void *)msgbufpv.pv_va;
 	msgbufinit(msgbufp, msgbufsize);
 	mutex_init();

Modified: user/attilio/vmobj-rwlock/sys/arm/arm/pmap-v6.c
==============================================================================
--- user/attilio/vmobj-rwlock/sys/arm/arm/pmap-v6.c	Thu Feb 21 15:02:36 2013	(r247096)
+++ user/attilio/vmobj-rwlock/sys/arm/arm/pmap-v6.c	Thu Feb 21 15:06:19 2013	(r247097)
@@ -1538,7 +1538,7 @@ pmap_alloc_specials(vm_offset_t *availp,
 #define PMAP_STATIC_L2_SIZE 16
 
 void
-pmap_bootstrap(vm_offset_t firstaddr, vm_offset_t lastaddr, struct pv_addr *l1pt)
+pmap_bootstrap(vm_offset_t firstaddr, struct pv_addr *l1pt)
 {
 	static struct l1_ttable static_l1;
 	static struct l2_dtable static_l2[PMAP_STATIC_L2_SIZE];
@@ -1554,7 +1554,7 @@ pmap_bootstrap(vm_offset_t firstaddr, vm
 	int l1idx, l2idx, l2next = 0;
 
 	PDEBUG(1, printf("firstaddr = %08x, lastaddr = %08x\n",
-	    firstaddr, lastaddr));
+	    firstaddr, vm_max_kernel_address));
 
 	virtual_avail = firstaddr;
 	kernel_pmap->pm_l1 = l1;
@@ -1670,7 +1670,8 @@ pmap_bootstrap(vm_offset_t firstaddr, vm
 	pmap_set_pt_cache_mode(kernel_l1pt, (vm_offset_t)csrc_pte);
 	pmap_alloc_specials(&virtual_avail, 1, &cdstp, &cdst_pte);
 	pmap_set_pt_cache_mode(kernel_l1pt, (vm_offset_t)cdst_pte);
-	size = ((lastaddr - pmap_curmaxkvaddr) + L1_S_OFFSET) / L1_S_SIZE;
+	size = ((vm_max_kernel_address - pmap_curmaxkvaddr) + L1_S_OFFSET) /
+	    L1_S_SIZE;
 	pmap_alloc_specials(&virtual_avail,
 	    round_page(size * L2_TABLE_SIZE_REAL) / PAGE_SIZE,
 	    &pmap_kernel_l2ptp_kva, NULL);
@@ -1692,9 +1693,9 @@ pmap_bootstrap(vm_offset_t firstaddr, vm
 	cpu_l2cache_wbinv_all();
 
 	virtual_avail = round_page(virtual_avail);
-	virtual_end = lastaddr;
+	virtual_end = vm_max_kernel_address;
 	kernel_vm_end = pmap_curmaxkvaddr;
-	arm_nocache_startaddr = lastaddr;
+	arm_nocache_startaddr = vm_max_kernel_address;
 	mtx_init(&cmtx, "TMP mappings mtx", NULL, MTX_DEF);
 
 	pmap_set_pcb_pagedir(kernel_pmap, thread0.td_pcb);

Modified: user/attilio/vmobj-rwlock/sys/arm/arm/pmap.c
==============================================================================
--- user/attilio/vmobj-rwlock/sys/arm/arm/pmap.c	Thu Feb 21 15:02:36 2013	(r247096)
+++ user/attilio/vmobj-rwlock/sys/arm/arm/pmap.c	Thu Feb 21 15:06:19 2013	(r247097)
@@ -2254,7 +2254,7 @@ extern struct mtx smallalloc_mtx;
 #endif
 
 void
-pmap_bootstrap(vm_offset_t firstaddr, vm_offset_t lastaddr, struct pv_addr *l1pt)
+pmap_bootstrap(vm_offset_t firstaddr, struct pv_addr *l1pt)
 {
 	static struct l1_ttable static_l1;
 	static struct l2_dtable static_l2[PMAP_STATIC_L2_SIZE];
@@ -2270,7 +2270,7 @@ pmap_bootstrap(vm_offset_t firstaddr, vm
 	int l1idx, l2idx, l2next = 0;
 
 	PDEBUG(1, printf("firstaddr = %08x, lastaddr = %08x\n",
-	    firstaddr, lastaddr));
+	    firstaddr, vm_max_kernel_address));
 	
 	virtual_avail = firstaddr;
 	kernel_pmap->pm_l1 = l1;
@@ -2388,7 +2388,8 @@ pmap_bootstrap(vm_offset_t firstaddr, vm
 	pmap_set_pt_cache_mode(kernel_l1pt, (vm_offset_t)csrc_pte);
 	pmap_alloc_specials(&virtual_avail, 1, &cdstp, &cdst_pte);
 	pmap_set_pt_cache_mode(kernel_l1pt, (vm_offset_t)cdst_pte);
-	size = ((lastaddr - pmap_curmaxkvaddr) + L1_S_OFFSET) / L1_S_SIZE;
+	size = ((vm_max_kernel_address - pmap_curmaxkvaddr) + L1_S_OFFSET) /
+	    L1_S_SIZE;
 	pmap_alloc_specials(&virtual_avail,
 	    round_page(size * L2_TABLE_SIZE_REAL) / PAGE_SIZE,
 	    &pmap_kernel_l2ptp_kva, NULL);
@@ -2410,9 +2411,9 @@ pmap_bootstrap(vm_offset_t firstaddr, vm
 	cpu_l2cache_wbinv_all();
 
 	virtual_avail = round_page(virtual_avail);
-	virtual_end = lastaddr;
+	virtual_end = vm_max_kernel_address;
 	kernel_vm_end = pmap_curmaxkvaddr;
-	arm_nocache_startaddr = lastaddr;
+	arm_nocache_startaddr = vm_max_kernel_address;
 	mtx_init(&cmtx, "TMP mappings mtx", NULL, MTX_DEF);
 
 #ifdef ARM_USE_SMALL_ALLOC

Modified: user/attilio/vmobj-rwlock/sys/arm/at91/at91_machdep.c
==============================================================================
--- user/attilio/vmobj-rwlock/sys/arm/at91/at91_machdep.c	Thu Feb 21 15:02:36 2013	(r247096)
+++ user/attilio/vmobj-rwlock/sys/arm/at91/at91_machdep.c	Thu Feb 21 15:06:19 2013	(r247097)
@@ -625,7 +625,8 @@ initarm(struct arm_boot_params *abp)
 
 	pmap_curmaxkvaddr = afterkern + L1_S_SIZE * (KERNEL_PT_KERN_NUM - 1);
 	arm_dump_avail_init(memsize, sizeof(dump_avail)/sizeof(dump_avail[0]));
-	pmap_bootstrap(freemempos, KERNVIRTADDR + 3 * memsize, &kernel_l1pt);
+	vm_max_kernel_address = KERNVIRTADDR + 3 * memsize;
+	pmap_bootstrap(freemempos, &kernel_l1pt);
 	msgbufp = (void*)msgbufpv.pv_va;
 	msgbufinit(msgbufp, msgbufsize);
 	mutex_init();

Modified: user/attilio/vmobj-rwlock/sys/arm/econa/econa_machdep.c
==============================================================================
--- user/attilio/vmobj-rwlock/sys/arm/econa/econa_machdep.c	Thu Feb 21 15:02:36 2013	(r247096)
+++ user/attilio/vmobj-rwlock/sys/arm/econa/econa_machdep.c	Thu Feb 21 15:06:19 2013	(r247097)
@@ -325,7 +325,8 @@ initarm(struct arm_boot_params *abp)
 
 	pmap_curmaxkvaddr = afterkern + L1_S_SIZE * (KERNEL_PT_KERN_NUM - 1);
 	arm_dump_avail_init(memsize, sizeof(dump_avail) / sizeof(dump_avail[0]));
-	pmap_bootstrap(freemempos, KERNVIRTADDR + 3 * memsize, &kernel_l1pt);
+	vm_max_kernel_address = KERNVIRTADDR + 3 * memsize;
+	pmap_bootstrap(freemempos, &kernel_l1pt);
 
 	msgbufp = (void*)msgbufpv.pv_va;
 	msgbufinit(msgbufp, msgbufsize);

Modified: user/attilio/vmobj-rwlock/sys/arm/include/pmap.h
==============================================================================
--- user/attilio/vmobj-rwlock/sys/arm/include/pmap.h	Thu Feb 21 15:02:36 2013	(r247096)
+++ user/attilio/vmobj-rwlock/sys/arm/include/pmap.h	Thu Feb 21 15:06:19 2013	(r247097)
@@ -222,7 +222,7 @@ extern vm_paddr_t phys_avail[];
 extern vm_offset_t virtual_avail;
 extern vm_offset_t virtual_end;
 
-void	pmap_bootstrap(vm_offset_t, vm_offset_t, struct pv_addr *);
+void	pmap_bootstrap(vm_offset_t firstaddr, struct pv_addr *l1pt);
 int	pmap_change_attr(vm_offset_t, vm_size_t, int);
 void	pmap_kenter(vm_offset_t va, vm_paddr_t pa);
 void	pmap_kenter_nocache(vm_offset_t va, vm_paddr_t pa);

Modified: user/attilio/vmobj-rwlock/sys/arm/s3c2xx0/s3c24x0_machdep.c
==============================================================================
--- user/attilio/vmobj-rwlock/sys/arm/s3c2xx0/s3c24x0_machdep.c	Thu Feb 21 15:02:36 2013	(r247096)
+++ user/attilio/vmobj-rwlock/sys/arm/s3c2xx0/s3c24x0_machdep.c	Thu Feb 21 15:06:19 2013	(r247097)
@@ -387,7 +387,8 @@ initarm(struct arm_boot_params *abp)
 
 	pmap_curmaxkvaddr = afterkern + 0x100000 * (KERNEL_PT_KERN_NUM - 1);
 	arm_dump_avail_init(memsize, sizeof(dump_avail) / sizeof(dump_avail[0]));
-	pmap_bootstrap(freemempos, KERNVIRTADDR + 3 * memsize, &kernel_l1pt);
+	vm_max_kernel_address = KERNVIRTADDR + 3 * memsize;
+	pmap_bootstrap(freemempos, &kernel_l1pt);
 	msgbufp = (void*)msgbufpv.pv_va;
 	msgbufinit(msgbufp, msgbufsize);
 	mutex_init();

Modified: user/attilio/vmobj-rwlock/sys/arm/sa11x0/assabet_machdep.c
==============================================================================
--- user/attilio/vmobj-rwlock/sys/arm/sa11x0/assabet_machdep.c	Thu Feb 21 15:02:36 2013	(r247096)
+++ user/attilio/vmobj-rwlock/sys/arm/sa11x0/assabet_machdep.c	Thu Feb 21 15:06:19 2013	(r247097)
@@ -382,7 +382,8 @@ initarm(struct arm_boot_params *abp)
 	dump_avail[3] = phys_avail[3] = 0;
 					
 	mutex_init();
-	pmap_bootstrap(freemempos, 0xd0000000, &kernel_l1pt);
+	vm_max_kernel_address = 0xd0000000;
+	pmap_bootstrap(freemempos, &kernel_l1pt);
 
 	init_param2(physmem);
 	kdb_init();

Modified: user/attilio/vmobj-rwlock/sys/arm/xscale/i80321/ep80219_machdep.c
==============================================================================
--- user/attilio/vmobj-rwlock/sys/arm/xscale/i80321/ep80219_machdep.c	Thu Feb 21 15:02:36 2013	(r247096)
+++ user/attilio/vmobj-rwlock/sys/arm/xscale/i80321/ep80219_machdep.c	Thu Feb 21 15:06:19 2013	(r247097)
@@ -369,8 +369,8 @@ initarm(struct arm_boot_params *abp)
 	dump_avail[2] = 0;
 	dump_avail[3] = 0;
 					
-	pmap_bootstrap(pmap_curmaxkvaddr,
-	    0xd0000000, &kernel_l1pt);
+	vm_max_kernel_address = 0xd0000000;
+	pmap_bootstrap(pmap_curmaxkvaddr, &kernel_l1pt);
 	msgbufp = (void*)msgbufpv.pv_va;
 	msgbufinit(msgbufp, msgbufsize);
 	mutex_init();

Modified: user/attilio/vmobj-rwlock/sys/arm/xscale/i80321/iq31244_machdep.c
==============================================================================
--- user/attilio/vmobj-rwlock/sys/arm/xscale/i80321/iq31244_machdep.c	Thu Feb 21 15:02:36 2013	(r247096)
+++ user/attilio/vmobj-rwlock/sys/arm/xscale/i80321/iq31244_machdep.c	Thu Feb 21 15:06:19 2013	(r247097)
@@ -370,8 +370,8 @@ initarm(struct arm_boot_params *abp)
 	dump_avail[2] = 0;
 	dump_avail[3] = 0;
 					
-	pmap_bootstrap(pmap_curmaxkvaddr,
-	    0xd0000000, &kernel_l1pt);
+	vm_max_kernel_address = 0xd0000000;
+	pmap_bootstrap(pmap_curmaxkvaddr, &kernel_l1pt);
 	msgbufp = (void*)msgbufpv.pv_va;
 	msgbufinit(msgbufp, msgbufsize);
 	mutex_init();

Modified: user/attilio/vmobj-rwlock/sys/arm/xscale/i8134x/crb_machdep.c
==============================================================================
--- user/attilio/vmobj-rwlock/sys/arm/xscale/i8134x/crb_machdep.c	Thu Feb 21 15:02:36 2013	(r247096)
+++ user/attilio/vmobj-rwlock/sys/arm/xscale/i8134x/crb_machdep.c	Thu Feb 21 15:06:19 2013	(r247097)
@@ -348,8 +348,8 @@ initarm(struct arm_boot_params *abp)
 	dump_avail[2] = 0;
 	dump_avail[3] = 0;
 					
-	pmap_bootstrap(pmap_curmaxkvaddr,
-	    0xd0000000, &kernel_l1pt);
+	vm_max_kernel_address = 0xd0000000;
+	pmap_bootstrap(pmap_curmaxkvaddr, &kernel_l1pt);
 	msgbufp = (void*)msgbufpv.pv_va;
 	msgbufinit(msgbufp, msgbufsize);
 	mutex_init();

Modified: user/attilio/vmobj-rwlock/sys/arm/xscale/ixp425/avila_machdep.c
==============================================================================
--- user/attilio/vmobj-rwlock/sys/arm/xscale/ixp425/avila_machdep.c	Thu Feb 21 15:02:36 2013	(r247096)
+++ user/attilio/vmobj-rwlock/sys/arm/xscale/ixp425/avila_machdep.c	Thu Feb 21 15:06:19 2013	(r247097)
@@ -433,7 +433,8 @@ initarm(struct arm_boot_params *abp)
 
 	pmap_curmaxkvaddr = afterkern + PAGE_SIZE;
 	arm_dump_avail_init(memsize, sizeof(dump_avail) / sizeof(dump_avail[0]));
-	pmap_bootstrap(pmap_curmaxkvaddr, 0xd0000000, &kernel_l1pt);
+	vm_max_kernel_address = 0xd0000000;
+	pmap_bootstrap(pmap_curmaxkvaddr, &kernel_l1pt);
 	msgbufp = (void*)msgbufpv.pv_va;
 	msgbufinit(msgbufp, msgbufsize);
 	mutex_init();

Modified: user/attilio/vmobj-rwlock/sys/arm/xscale/pxa/pxa_machdep.c
==============================================================================
--- user/attilio/vmobj-rwlock/sys/arm/xscale/pxa/pxa_machdep.c	Thu Feb 21 15:02:36 2013	(r247096)
+++ user/attilio/vmobj-rwlock/sys/arm/xscale/pxa/pxa_machdep.c	Thu Feb 21 15:06:19 2013	(r247097)
@@ -366,7 +366,8 @@ initarm(struct arm_boot_params *abp)
 	}
 	dump_avail[i] = 0;
 	dump_avail[i] = 0;
-	pmap_bootstrap(pmap_curmaxkvaddr, 0xd0000000, &kernel_l1pt);
+	vm_max_kernel_address = 0xd0000000;
+	pmap_bootstrap(pmap_curmaxkvaddr, &kernel_l1pt);
 	msgbufp = (void*)msgbufpv.pv_va;
 	msgbufinit(msgbufp, msgbufsize);
 	mutex_init();

Modified: user/attilio/vmobj-rwlock/sys/boot/fdt/fdt_loader_cmd.c
==============================================================================
--- user/attilio/vmobj-rwlock/sys/boot/fdt/fdt_loader_cmd.c	Thu Feb 21 15:02:36 2013	(r247096)
+++ user/attilio/vmobj-rwlock/sys/boot/fdt/fdt_loader_cmd.c	Thu Feb 21 15:06:19 2013	(r247097)
@@ -235,26 +235,47 @@ fdt_load_dtb(vm_offset_t va)
 }
 
 static int
-fdt_setup_fdtp()
+fdt_load_dtb_addr(struct fdt_header *header)
 {
 	struct preloaded_file *bfp;
-	vm_offset_t va;
 
-	bfp = file_findfile(NULL, "dtb");
+	bfp = mem_load_raw("dtb", "memory.dtb", header, fdt_totalsize(header));
 	if (bfp == NULL) {
-		if ((va = fdt_find_static_dtb()) == 0) {
-			command_errmsg = "no device tree blob found!";
-			return (1);
-		}
-	} else {
-		/* Dynamic blob has precedence over static. */
-		va = bfp->f_addr;
+		command_errmsg = "unable to copy DTB into module directory";
+		return (1);
 	}
+	return fdt_load_dtb(bfp->f_addr);
+}
 
-	if (fdt_load_dtb(va) != 0)
-		return (1);
-	
-	return (0);
+static int
+fdt_setup_fdtp()
+{
+  struct preloaded_file *bfp;
+  struct fdt_header *hdr;
+  const char *s, *p;
+  vm_offset_t va;
+
+  if ((bfp = file_findfile(NULL, "dtb")) != NULL) {
+	  printf("Using DTB from loaded file.\n");
+	  return fdt_load_dtb(bfp->f_addr);
+  } 
+
+  s = ub_env_get("fdtaddr");
+  if (s != NULL && *s != '\0') {
+	  hdr = (struct fdt_header *)strtoul(s, &p, 16);
+	  if (*p == '\0') {
+		  printf("Using DTB provided by U-Boot.\n");
+		  return fdt_load_dtb_addr(hdr);
+	  }
+  }
+
+  if ((va = fdt_find_static_dtb()) != 0) {
+	  printf("Using DTB compiled into kernel.\n");
+	  return (fdt_load_dtb(va));
+  }
+
+  command_errmsg = "no device tree blob found!";
+  return (1);
 }
 
 #define fdt_strtovect(str, cellbuf, lim, cellsize) _fdt_strtovect((str), \
@@ -789,8 +810,8 @@ command_fdt_internal(int argc, char *arg
 static int
 fdt_cmd_addr(int argc, char *argv[])
 {
-	vm_offset_t va;
-	char *addr, *cp;
+	struct fdt_header *hdr;
+	const char *addr, *cp;
 
 	if (argc > 2)
 		addr = argv[2];
@@ -799,13 +820,13 @@ fdt_cmd_addr(int argc, char *argv[])
 		return (CMD_ERROR);
 	}
 
-	va = strtol(addr, &cp, 0);
+	hdr = (struct fdt_header *)strtoul(addr, &cp, 0);
 	if (cp == addr) {
 		sprintf(command_errbuf, "Invalid address: %s", addr);
 		return (CMD_ERROR);
 	}
 
-	if (fdt_load_dtb(va) != 0)
+	if (fdt_load_dtb_addr(hdr) != 0)
 		return (CMD_ERROR);
 
 	return (CMD_OK);
@@ -1484,6 +1505,7 @@ fdt_cmd_mkprop(int argc, char *argv[])
 	if (fdt_modprop(o, propname, value, 1))
 		return (CMD_ERROR);
 
+	COPYIN(fdtp, fdtp_va, fdtp_size);
 	return (CMD_OK);
 }
 

Modified: user/attilio/vmobj-rwlock/sys/boot/userboot/userboot/elf32_freebsd.c
==============================================================================
--- user/attilio/vmobj-rwlock/sys/boot/userboot/userboot/elf32_freebsd.c	Thu Feb 21 15:02:36 2013	(r247096)
+++ user/attilio/vmobj-rwlock/sys/boot/userboot/userboot/elf32_freebsd.c	Thu Feb 21 15:06:19 2013	(r247097)
@@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/exec.h>
 #include <sys/linker.h>
 #include <string.h>
+#define	_MACHINE_ELF_WANT_32BIT
 #include <i386/include/bootinfo.h>
 #include <i386/include/elf.h>
 #include <stand.h>

Modified: user/attilio/vmobj-rwlock/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c
==============================================================================
--- user/attilio/vmobj-rwlock/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c	Thu Feb 21 15:02:36 2013	(r247096)
+++ user/attilio/vmobj-rwlock/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c	Thu Feb 21 15:06:19 2013	(r247097)
@@ -1124,14 +1124,12 @@ fasttrap_pid_disable(void *arg, dtrace_i
 	 * provider lock as a point of mutual exclusion to prevent other
 	 * DTrace consumers from disabling this probe.
 	 */
-	if ((p = pfind(probe->ftp_pid)) == NULL) {
-		mutex_exit(&provider->ftp_mtx);
-		return;
-	}
+	if ((p = pfind(probe->ftp_pid)) != NULL) {
 #ifdef __FreeBSD__
-	_PHOLD(p);
-	PROC_UNLOCK(p);
+		_PHOLD(p);
+		PROC_UNLOCK(p);
 #endif
+	}
 
 	/*
 	 * Disable all the associated tracepoints (for fully enabled probes).
@@ -1168,7 +1166,8 @@ fasttrap_pid_disable(void *arg, dtrace_i
 		fasttrap_pid_cleanup();
 
 #ifdef __FreeBSD__
-	PRELE(p);
+	if (p != NULL)
+		PRELE(p);
 #endif
 	if (!probe->ftp_enabled)
 		return;

Modified: user/attilio/vmobj-rwlock/sys/crypto/aesni/aesni_wrap.c
==============================================================================
--- user/attilio/vmobj-rwlock/sys/crypto/aesni/aesni_wrap.c	Thu Feb 21 15:02:36 2013	(r247096)
+++ user/attilio/vmobj-rwlock/sys/crypto/aesni/aesni_wrap.c	Thu Feb 21 15:06:19 2013	(r247097)
@@ -1,4 +1,5 @@
 /*-
+ * Copyright (C) 2008 Damien Miller <djm at mindrot.org>
  * Copyright (c) 2010 Konstantin Belousov <kib at FreeBSD.org>
  * Copyright (c) 2010-2011 Pawel Jakub Dawidek <pawel at dawidek.net>
  * All rights reserved.

Modified: user/attilio/vmobj-rwlock/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
==============================================================================
--- user/attilio/vmobj-rwlock/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c	Thu Feb 21 15:02:36 2013	(r247096)
+++ user/attilio/vmobj-rwlock/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c	Thu Feb 21 15:06:19 2013	(r247097)
@@ -241,8 +241,37 @@ ar5416InitState(struct ath_hal_5416 *ahp
 	/* Enable all ANI functions to begin with */
 	AH5416(ah)->ah_ani_function = 0xffffffff;
 
-        /* Set overridable ANI methods */
-        AH5212(ah)->ah_aniControl = ar5416AniControl;
+	/* Set overridable ANI methods */
+	AH5212(ah)->ah_aniControl = ar5416AniControl;
+
+	/*
+	 * Default FIFO Trigger levels

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-user mailing list