PERFORCE change 168827 for review

Edward Tomasz Napierala trasz at FreeBSD.org
Wed Sep 23 15:46:58 UTC 2009


http://perforce.freebsd.org/chv.cgi?CH=168827

Change 168827 by trasz at trasz_victim on 2009/09/23 15:46:19

	IFC.

Affected files ...

.. //depot/projects/soc2008/trasz_nfs4acl/UPDATING#42 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sbin/camcontrol/camcontrol.c#5 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/share/man/man5/procfs.5#3 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/amd64/amd64/machdep.c#14 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/cam/cam_periph.c#9 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c#7 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#35 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/conf/files#53 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/conf/newvers.sh#11 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/dev/acpi_support/acpi_aiboost.c#3 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/dev/acpica/acpi_video.c#3 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/dev/atkbdc/atkbd.c#4 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/dev/fb/vesa.c#3 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/dev/hwpmc/pmc_events.h#7 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/dev/pci/pci.c#16 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/dev/ppbus/vpo.c#6 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/dev/twa/tw_cl_io.c#2 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/dev/twa/tw_cl_share.h#2 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/dev/twe/twe.c#3 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/dev/twe/twevar.h#2 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/fs/procfs/procfs.c#4 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/fs/procfs/procfs.h#2 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/fs/procfs/procfs_osrel.c#1 branch
.. //depot/projects/soc2008/trasz_nfs4acl/sys/i386/i386/machdep.c#13 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/kern/kern_event.c#8 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/modules/procfs/Makefile#2 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/net80211/ieee80211.h#14 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/net80211/ieee80211_hwmp.c#4 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/net80211/ieee80211_mesh.c#4 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/net80211/ieee80211_mesh.h#4 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/sys/event.h#6 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/sys/param.h#37 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/sys/ufs/ufs/ufs_gjournal.c#2 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/tools/regression/acltools/00.t#9 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/tools/regression/sockets/accf_data_attach/accf_data_attach.c#2 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/usr.bin/gcore/elfcore.c#3 integrate
.. //depot/projects/soc2008/trasz_nfs4acl/usr.bin/netstat/inet.c#10 integrate

Differences ...

==== //depot/projects/soc2008/trasz_nfs4acl/UPDATING#42 (text+ko) ====

@@ -22,6 +22,10 @@
 	machines to maximize performance.  (To disable malloc debugging, run
 	ln -s aj /etc/malloc.conf.)
 
+20090922:
+	802.11s D3.03 support was committed. This is incompatible with the
+	previous code, which was based on D3.0.
+
 20090910:
 	ZFS snapshots are now mounted with MNT_IGNORE flag. Use -v option for
 	mount(8) and -a option for df(1) to see them.
@@ -975,4 +979,4 @@
 Contact Warner Losh if you have any questions about your use of
 this document.
 
-$FreeBSD: src/UPDATING,v 1.639 2009/09/14 21:10:40 pjd Exp $
+$FreeBSD: src/UPDATING,v 1.640 2009/09/22 18:19:18 rpaulo Exp $

==== //depot/projects/soc2008/trasz_nfs4acl/sbin/camcontrol/camcontrol.c#5 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sbin/camcontrol/camcontrol.c,v 1.63 2009/09/04 18:21:40 mav Exp $");
+__FBSDID("$FreeBSD: src/sbin/camcontrol/camcontrol.c,v 1.64 2009/09/22 22:17:14 mav Exp $");
 
 #include <sys/ioctl.h>
 #include <sys/stdint.h>
@@ -1055,23 +1055,22 @@
 		printf("\n");
 
 	printf("PIO supported         PIO");
-	if (parm->atavalid & ATA_FLAG_64_70) {
-		if (parm->apiomodes & 0x02)
-			printf("4");
-		else if (parm->apiomodes & 0x01)
-			printf("3");
-	} else if (parm->mwdmamodes & 0x04)
+	switch (ata_max_pmode(parm)) {
+	case ATA_PIO4:
 		printf("4");
-	else if (parm->mwdmamodes & 0x02)
+		break;
+	case ATA_PIO3:
 		printf("3");
-	else if (parm->mwdmamodes & 0x01)
+		break;
+	case ATA_PIO2:
 		printf("2");
-	else if ((parm->retired_piomode & ATA_RETIRED_PIO_MASK) == 0x200)
-		printf("2");
-	else if ((parm->retired_piomode & ATA_RETIRED_PIO_MASK) == 0x100)
+		break;
+	case ATA_PIO1:
 		printf("1");
-	else
+		break;
+	default:
 		printf("0");
+	}
 	printf("\n");
 
 	printf("DMA%ssupported         ",

==== //depot/projects/soc2008/trasz_nfs4acl/share/man/man5/procfs.5#3 (text+ko) ====

@@ -1,8 +1,8 @@
-.\" $FreeBSD: src/share/man/man5/procfs.5,v 1.34 2009/07/09 16:40:00 trasz Exp $
+.\" $FreeBSD: src/share/man/man5/procfs.5,v 1.35 2009/09/23 12:10:13 kib Exp $
 .\" Written by Garrett Wollman
 .\" This file is in the public domain.
 .\"
-.Dd July 9, 2009
+.Dd September 22, 2009
 .Dt PROCFS 5
 .Os
 .Sh NAME
@@ -117,6 +117,12 @@
 .It Pa notepg
 Used for sending signal to the process group.
 Not implemented.
+.It Pa osrel
+Allows read and write of the kernel osrel value assigned to the process.
+It affects the compatibility shims that are turned on and off
+depending on the value.
+Initial process value is read from the ABI note tag in the executed ELF image,
+and is zero if the tag not supported by binary format or was not found.
 .It Pa regs
 Allows read and write access to the process' register set.
 This file contains a binary data structure
@@ -237,6 +243,8 @@
 used for signaling the process
 .It Pa /proc/curproc/notepg
 used for signaling the process group
+.It Pa /proc/curproc/osrel
+the process osrel value
 .It Pa /proc/curproc/regs
 the process register set
 .It Pa /proc/curproc/rlimit

==== //depot/projects/soc2008/trasz_nfs4acl/sys/amd64/amd64/machdep.c#14 (text+ko) ====

@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.709 2009/08/20 22:58:05 jkim Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.710 2009/09/22 16:51:00 jhb Exp $");
 
 #include "opt_atalk.h"
 #include "opt_atpic.h"
@@ -1192,6 +1192,77 @@
 
 u_int basemem;
 
+static int
+add_smap_entry(struct bios_smap *smap, vm_paddr_t *physmap, int *physmap_idxp)
+{
+	int i, insert_idx, physmap_idx;
+
+	physmap_idx = *physmap_idxp;
+
+	if (boothowto & RB_VERBOSE)
+		printf("SMAP type=%02x base=%016lx len=%016lx\n",
+		    smap->type, smap->base, smap->length);
+
+	if (smap->type != SMAP_TYPE_MEMORY)
+		return (1);
+
+	if (smap->length == 0)
+		return (0);
+
+	/*
+	 * Find insertion point while checking for overlap.  Start off by
+	 * assuming the new entry will be added to the end.
+	 */
+	insert_idx = physmap_idx + 2;
+	for (i = 0; i <= physmap_idx; i += 2) {
+		if (smap->base < physmap[i + 1]) {
+			if (smap->base + smap->length <= physmap[i]) {
+				insert_idx = i;
+				break;
+			}
+			if (boothowto & RB_VERBOSE)
+				printf(
+		    "Overlapping memory regions, ignoring second region\n");
+			return (1);
+		}
+	}
+
+	/* See if we can prepend to the next entry. */
+	if (insert_idx <= physmap_idx &&
+	    smap->base + smap->length == physmap[insert_idx]) {
+		physmap[insert_idx] = smap->base;
+		return (1);
+	}
+
+	/* See if we can append to the previous entry. */
+	if (insert_idx > 0 && smap->base == physmap[insert_idx - 1]) {
+		physmap[insert_idx - 1] += smap->length;
+		return (1);
+	}
+
+	physmap_idx += 2;
+	*physmap_idxp = physmap_idx;
+	if (physmap_idx == PHYSMAP_SIZE) {
+		printf(
+		"Too many segments in the physical address map, giving up\n");
+		return (0);
+	}
+
+	/*
+	 * Move the last 'N' entries down to make room for the new
+	 * entry if needed.
+	 */
+	for (i = physmap_idx; i > insert_idx; i -= 2) {
+		physmap[i] = physmap[i - 2];
+		physmap[i + 1] = physmap[i - 1];
+	}
+
+	/* Insert the new entry. */
+	physmap[insert_idx] = smap->base;
+	physmap[insert_idx + 1] = smap->base + smap->length;
+	return (1);
+}
+
 /*
  * Populate the (physmap) array with base/bound pairs describing the
  * available physical memory in the system, then test this memory and
@@ -1235,40 +1306,9 @@
 	smapsize = *((u_int32_t *)smapbase - 1);
 	smapend = (struct bios_smap *)((uintptr_t)smapbase + smapsize);
 
-	for (smap = smapbase; smap < smapend; smap++) {
-		if (boothowto & RB_VERBOSE)
-			printf("SMAP type=%02x base=%016lx len=%016lx\n",
-			    smap->type, smap->base, smap->length);
-
-		if (smap->type != SMAP_TYPE_MEMORY)
-			continue;
-
-		if (smap->length == 0)
-			continue;
-
-		for (i = 0; i <= physmap_idx; i += 2) {
-			if (smap->base < physmap[i + 1]) {
-				if (boothowto & RB_VERBOSE)
-					printf(
-	"Overlapping or non-monotonic memory region, ignoring second region\n");
-				continue;
-			}
-		}
-
-		if (smap->base == physmap[physmap_idx + 1]) {
-			physmap[physmap_idx + 1] += smap->length;
-			continue;
-		}
-
-		physmap_idx += 2;
-		if (physmap_idx == PHYSMAP_SIZE) {
-			printf(
-		"Too many segments in the physical address map, giving up\n");
+	for (smap = smapbase; smap < smapend; smap++)
+		if (!add_smap_entry(smap, physmap, &physmap_idx))
 			break;
-		}
-		physmap[physmap_idx] = smap->base;
-		physmap[physmap_idx + 1] = smap->base + smap->length;
-	}
 
 	/*
 	 * Find the 'base memory' segment for SMP

==== //depot/projects/soc2008/trasz_nfs4acl/sys/cam/cam_periph.c#9 (text+ko) ====

@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/cam/cam_periph.c,v 1.80 2009/07/10 08:18:08 scottl Exp $");
+__FBSDID("$FreeBSD: src/sys/cam/cam_periph.c,v 1.81 2009/09/22 22:23:52 mav Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1034,8 +1034,13 @@
 					cam_error_print(saved_ccb, CAM_ESF_ALL,
 							CAM_EPF_ALL);
 #endif
-					xpt_done_ccb = TRUE;
+				} else {
+					saved_ccb->ccb_h.status &=
+					    ~CAM_STATUS_MASK;
+					saved_ccb->ccb_h.status |=
+					    CAM_AUTOSENSE_FAIL;
 				}
+				xpt_done_ccb = TRUE;
 			}
 		}
 		bcopy(done_ccb->ccb_h.saved_ccb_ptr, done_ccb,

==== //depot/projects/soc2008/trasz_nfs4acl/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c#7 (text+ko) ====

@@ -1841,7 +1841,7 @@
 				fgid = zfs_fuid_create_cred(zfsvfs,
 				    ZFS_GROUP, tx, cr, fuidp);
 #ifdef __FreeBSD__
-				gid = parent->z_phys->zp_gid;
+				gid = fgid = parent->z_phys->zp_gid;
 #else
 				gid = crgetgid(cr);
 #endif

==== //depot/projects/soc2008/trasz_nfs4acl/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#35 (text+ko) ====

@@ -4860,7 +4860,7 @@
 	vsecattr_t      vsecattr;
 
 	if (ap->a_type != ACL_TYPE_NFS4)
-		return (EOPNOTSUPP);
+		return (EINVAL);
 
 	vsecattr.vsa_mask = VSA_ACE | VSA_ACECNT;
 	if (error = zfs_getsecattr(ap->a_vp, &vsecattr, 0, ap->a_cred, NULL))
@@ -4889,7 +4889,7 @@
 	aclent_t	*aaclp;
 
 	if (ap->a_type != ACL_TYPE_NFS4)
-		return (EOPNOTSUPP);
+		return (EINVAL);
 
 	if (ap->a_aclp->acl_cnt < 1 || ap->a_aclp->acl_cnt > MAX_ACL_ENTRIES)
 		return (EINVAL);

==== //depot/projects/soc2008/trasz_nfs4acl/sys/conf/files#53 (text+ko) ====

@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.1470 2009/09/22 15:15:03 trasz Exp $
+# $FreeBSD: src/sys/conf/files,v 1.1472 2009/09/23 12:08:08 kib Exp $
 #
 # The long compile-with and dependency lines are required because of
 # limitations in config: backslash-newline doesn't work in strings, and
@@ -1792,6 +1792,7 @@
 fs/procfs/procfs_map.c		optional procfs
 fs/procfs/procfs_mem.c		optional procfs
 fs/procfs/procfs_note.c		optional procfs
+fs/procfs/procfs_osrel.c	optional procfs
 fs/procfs/procfs_regs.c		optional procfs
 fs/procfs/procfs_rlimit.c	optional procfs
 fs/procfs/procfs_status.c	optional procfs
@@ -2634,7 +2635,7 @@
 ufs/ufs/ufs_bmap.c		optional ffs
 ufs/ufs/ufs_dirhash.c		optional ffs
 ufs/ufs/ufs_extattr.c		optional ffs
-ufs/ufs/ufs_gjournal.c		optional ffs
+ufs/ufs/ufs_gjournal.c		optional ffs UFS_GJOURNAL
 ufs/ufs/ufs_inode.c		optional ffs
 ufs/ufs/ufs_lookup.c		optional ffs
 ufs/ufs/ufs_quota.c		optional ffs

==== //depot/projects/soc2008/trasz_nfs4acl/sys/conf/newvers.sh#11 (text+ko) ====

@@ -28,7 +28,7 @@
 # SUCH DAMAGE.
 #
 #	@(#)newvers.sh	8.1 (Berkeley) 4/20/94
-# $FreeBSD: src/sys/conf/newvers.sh,v 1.86 2009/09/19 21:46:12 mlaier Exp $
+# $FreeBSD: src/sys/conf/newvers.sh,v 1.87 2009/09/23 14:48:13 mlaier Exp $
 
 TYPE="FreeBSD"
 REVISION="9.0"
@@ -114,9 +114,16 @@
 		svn=`$git_cmd svn find-rev $git 2>/dev/null`
 		if [ -n "$svn" ] ; then
 			svn=" r${svn}"
-			git="-${git}"
+			git="=${git}"
 		else
-			git=" ${git}"
+			svn=`$git_cmd log | fgrep 'git-svn-id:' | head -1 | \
+			     sed -n 's/^.*@\([0-9][0-9]*\).*$/\1/p'`
+			if [ -n $svn ] ; then
+				svn=" r${svn}"
+				git="+${git}"
+			else
+				git=" ${git}"
+			fi
 		fi
 		if $git_cmd --work-tree=${SRCDIR} diff-index \
 		    --name-only HEAD | read dummy; then

==== //depot/projects/soc2008/trasz_nfs4acl/sys/dev/acpi_support/acpi_aiboost.c#3 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpi_support/acpi_aiboost.c,v 1.4 2009/06/05 18:44:36 jkim Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpi_support/acpi_aiboost.c,v 1.5 2009/09/22 18:34:23 jhb Exp $");
 
 #include "opt_acpi.h"
 #include <sys/param.h>
@@ -46,7 +46,6 @@
 
 #define DESCSTRLEN 32
 struct acpi_aiboost_element{
-	ACPI_HANDLE h;
 	uint32_t id;
 	char desc[DESCSTRLEN];
 };
@@ -127,22 +126,23 @@
 	
 	for(i = 1 ; i < o->Package.Count; i++){
 		elem = &o->Package.Elements[i];
-		if(elem->Type != ACPI_TYPE_ANY){
-			printf("NOREF\n");
-			goto error;
-		}
-		c->elem[ i - 1].h = elem->Reference.Handle;
+		if (elem->Type == ACPI_TYPE_ANY) {
+			buf2.Pointer = NULL;
+			buf2.Length = ACPI_ALLOCATE_BUFFER;
 
-		buf2.Pointer = NULL;
-		buf2.Length = ACPI_ALLOCATE_BUFFER;
-		
-		status = AcpiEvaluateObject(c->elem[i - 1].h, NULL, NULL,
-					    &buf2);
-		if(ACPI_FAILURE(status)){
-			printf("FETCH OBJECT\n");
+			status = AcpiEvaluateObject(elem->Reference.Handle,
+			    NULL, NULL, &buf2);
+			if (ACPI_FAILURE(status)){
+				printf("FETCH OBJECT\n");
+				goto error;
+			}
+			subobj = buf2.Pointer;
+		} else if (elem->Type == ACPI_TYPE_PACKAGE)
+			subobj = elem;
+		else {
+			printf("NO PACKAGE\n");
 			goto error;
 		}
-		subobj = buf2.Pointer;
 		if(ACPI_FAILURE(acpi_PkgInt32(subobj,0, &c->elem[i -1].id))){
 			printf("ID FAILED\n");
 			goto error;
@@ -151,15 +151,17 @@
 				     sizeof(c->elem[i - 1].desc));
 		if(ACPI_FAILURE(status)){
 			if(status == E2BIG){
-				c->elem[i-1].desc[DESCSTRLEN-1] = 0;
+				c->elem[i - 1].desc[DESCSTRLEN-1] = 0;
 			}else{
 				printf("DESC FAILED %d\n", i-1);
 				goto error;
 			}
 		}
 		
-		if(buf2.Pointer)
-		  AcpiOsFree(buf2.Pointer);
+		if (buf2.Pointer) {
+			AcpiOsFree(buf2.Pointer);
+			buf2.Pointer = NULL;
+		}
 	}
 
 	if(buf.Pointer)

==== //depot/projects/soc2008/trasz_nfs4acl/sys/dev/acpica/acpi_video.c#3 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_video.c,v 1.14 2009/06/05 18:44:36 jkim Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_video.c,v 1.15 2009/09/23 15:39:54 jhb Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -282,8 +282,7 @@
 				acpi_video_notify_handler);
 
 	ACPI_SERIAL_BEGIN(video);
-	for (vo = STAILQ_FIRST(&sc->vid_outputs); vo != NULL; vo = vn) {
-		vn = STAILQ_NEXT(vo, vo_next);
+	STAILQ_FOREACH_SAFE(vo, &sc->vid_outputs, vo_next, vn) {
 		acpi_video_vo_destroy(vo);
 	}
 	ACPI_SERIAL_END(video);

==== //depot/projects/soc2008/trasz_nfs4acl/sys/dev/atkbdc/atkbd.c#4 (text+ko) ====

@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/atkbdc/atkbd.c,v 1.55 2009/09/21 08:24:22 delphij Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/atkbdc/atkbd.c,v 1.56 2009/09/22 20:12:10 delphij Exp $");
 
 #include "opt_compat.h"
 #include "opt_kbd.h"
@@ -44,7 +44,7 @@
 #include <machine/bus.h>
 #include <machine/resource.h>
 
-#if defined(__i386__) || defined(__amd64__)
+#if 0
 #include <machine/md_var.h>
 #include <machine/psl.h>
 #include <dev/x86bios/x86bios.h>
@@ -1089,7 +1089,7 @@
 static int
 get_typematic(keyboard_t *kbd)
 {
-#if defined(__i386__) || defined(__amd64__)
+#if 0
 	/*
 	 * Only some systems allow us to retrieve the keyboard repeat 
 	 * rate previously set via the BIOS...

==== //depot/projects/soc2008/trasz_nfs4acl/sys/dev/fb/vesa.c#3 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/fb/vesa.c,v 1.5 2009/09/21 08:53:26 delphij Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/fb/vesa.c,v 1.6 2009/09/23 02:45:02 delphij Exp $");
 
 #include "opt_vga.h"
 #include "opt_vesa.h"
@@ -221,6 +221,7 @@
 {
 	x86regs_t regs;
 
+	bzero(&regs, sizeof(regs));
 	regs.R_EAX = 0x0000 | mode;
 
 	x86biosCall(&regs, 0x10);
@@ -236,6 +237,7 @@
 	int offs;
 	u_char *buf;
 
+	bzero(&regs, sizeof(regs));
 	regs.R_EAX = 0x4f01;
 	regs.R_ECX = mode;
 
@@ -263,6 +265,7 @@
 {
 	x86regs_t regs;
 
+	bzero(&regs, sizeof(regs));
 	regs.R_EAX = 0x4f02;
 	regs.R_EBX = mode;
 
@@ -276,6 +279,7 @@
 {
 	x86regs_t regs;
 
+	bzero(&regs, sizeof(regs));
 	regs.R_EAX = 0x4f08;
 	regs.R_EBX = 1;
 
@@ -292,6 +296,7 @@
 {
 	x86regs_t regs;
 
+	bzero(&regs, sizeof(regs));
 	regs.R_EAX = 0x4f08;
 	regs.R_EBX = (bits << 8);
 
@@ -311,6 +316,7 @@
 	u_char *p;
 	int i;
 
+	bzero(&regs, sizeof(regs));
 	regs.R_EAX = 0x4f09;
 	regs.R_EBX = 1;
 	regs.R_ECX = colors;
@@ -349,6 +355,7 @@
 	u_char *p;
 	int i;
 
+	bzero(&regs, sizeof(regs));
 	regs.R_EAX = 0x4f09;
 	regs.R_EBX = 1;
 	regs.R_ECX = colors;
@@ -396,6 +403,7 @@
 		p[i*4 + 3] = 0;
 	}
 
+	bzero(&regs, sizeof(regs));
 	regs.R_EAX = 0x4f09;
 	regs.R_EBX = 0;
 	regs.R_ECX = colors;
@@ -431,6 +439,7 @@
 		p[i*4 + 3] = 0;
 	}
 
+	bzero(&regs, sizeof(regs));
 	regs.R_EAX = 0x4f09;
 	regs.R_EBX = 0;
 	regs.R_ECX = colors;
@@ -452,6 +461,7 @@
 {
 	x86regs_t regs;
 
+	bzero(&regs, sizeof(regs));
 	regs.R_EAX = 0x4f04;
 	regs.R_ECX = STATE_ALL;
 	regs.R_EDX = STATE_SIZE;
@@ -474,6 +484,7 @@
 	if (size > VESA_BIOS_BUFSIZE)
 		return (1);
 
+	bzero(&regs, sizeof(regs));
 	regs.R_EAX = 0x4f04;
 	regs.R_ECX = STATE_ALL;
 	regs.R_EDX = code;
@@ -499,6 +510,7 @@
 {
 	x86regs_t regs;
 
+	bzero(&regs, sizeof(regs));
 	regs.R_EAX = 0x4f06;
 	regs.R_EBX = 1;
 
@@ -515,6 +527,7 @@
 {
 	x86regs_t regs;
 
+	bzero(&regs, sizeof(regs));
 	regs.R_EAX = 0x4f06;
 	regs.R_EBX = 0;
 	regs.R_ECX = pixel;
@@ -541,6 +554,7 @@
 {
 	x86regs_t regs;
 
+	bzero(&regs, sizeof(regs));
 	regs.R_EAX = 0x4f07;
 	regs.R_EBX = 1;
 
@@ -561,6 +575,7 @@
 {
 	x86regs_t regs;
 
+	bzero(&regs, sizeof(regs));
 	regs.R_EAX = 0x4f07;
 	regs.R_EBX = 0x80;
 	regs.R_EDX = y;
@@ -662,6 +677,7 @@
 	vmbuf = (u_char *)x86biosAlloc(1, &offs);
 	bcopy("VBE2", vmbuf, 4);	/* try for VBE2 data */
 
+	bzero(&regs, sizeof(regs));
 	regs.R_EAX = 0x4f00;
 	regs.R_ES = SEG_ADDR(offs);
 	regs.R_DI = SEG_OFF(offs);
@@ -1262,6 +1278,7 @@
 {
 	x86regs_t regs;
 
+	bzero(&regs, sizeof(regs));
 	regs.R_EAX = 0x4f05;
 	regs.R_EBX = 0x10;
 
@@ -1296,6 +1313,7 @@
 	if (adp->va_window_gran == 0)
 		return 1;
 
+	bzero(&regs, sizeof(regs));
 	regs.R_EAX = 0x4f05;
 	regs.R_EBX = 0;
 	regs.R_EDX = offset / adp->va_window_gran;
@@ -1304,6 +1322,7 @@
 	if ((regs.R_AX & 0xff) != 0x4f)
 		return 1;
 
+	bzero(&regs, sizeof(regs));
 	regs.R_EAX = 0x4f05;
 	regs.R_EBX = 1;
 	regs.R_EDX = offset / adp->va_window_gran;

==== //depot/projects/soc2008/trasz_nfs4acl/sys/dev/hwpmc/pmc_events.h#7 (text+ko) ====

@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/dev/hwpmc/pmc_events.h,v 1.10 2009/09/01 17:55:37 gnn Exp $
+ * $FreeBSD: src/sys/dev/hwpmc/pmc_events.h,v 1.11 2009/09/22 17:45:28 rpaulo Exp $
  */
 
 #ifndef _DEV_HWPMC_PMC_EVENTS_H_
@@ -1979,7 +1979,31 @@
 #define	PMC_EV_TSC_FIRST	PMC_EV_TSC_TSC
 #define	PMC_EV_TSC_LAST		PMC_EV_TSC_TSC
 
+
 /*
+ * Intel XScale events from "Intel XScale Core Developer's Manual",
+ * January 2004, #27347302
+ */
+#define	__PMC_EV_XSCALE()			\
+	__PMC_EV(XSCALE, IC_FETCH)		\
+	__PMC_EV(XSCALE, IC_MISS)		\
+	__PMC_EV(XSCALE, DATA_DEPENDENCY_STALL)	\
+	__PMC_EV(XSCALE, ITLB_MISS)		\
+	__PMC_EV(XSCALE, DTLB_MISS)		\
+	__PMC_EV(XSCALE, BRANCH_EXECUTED)	\
+	__PMC_EV(XSCALE, BRANCH_MISPRED)	\
+	__PMC_EV(XSCALE, INSTR_EXECUTED)	\
+	__PMC_EV(XSCALE, DC_FULL_CYCLE)		\
+	__PMC_EV(XSCALE, DC_FULL_CONTIG)	\
+	__PMC_EV(XSCALE, DC_ACCESS)		\
+	__PMC_EV(XSCALE, DC_MISS)		\
+	__PMC_EV(XSCALE, DC_WRITEBACK)		\
+	__PMC_EV(XSCALE, PC_CHANGE)
+
+#define	PMC_EV_XSCALE_FIRST	PMC_EV_XSCALE_IC_FETCH
+#define	PMC_EV_XSCALE_LAST	PMC_EV_XSCALE_PC_CHANGE
+
+/*
  * All known PMC events.
  *
  * PMC event numbers are allocated sparsely to allow new PMC events to
@@ -1996,6 +2020,7 @@
  * 0x11000	0x0080		INTEL Pentium 4 events
  * 0x11080	0x0080		INTEL Pentium MMX events
  * 0x11100	0x0100		INTEL Pentium Pro/P-II/P-III/Pentium-M events
+ * 0x11200	0x00FF		INTEL XScale events
  */
 #define	__PMC_EVENTS()				\
 	__PMC_EV_BLOCK(TSC,	0x01000)	\
@@ -2013,9 +2038,11 @@
 	__PMC_EV_BLOCK(P5,	0x11080)	\
 	__PMC_EV_P5()				\
 	__PMC_EV_BLOCK(P6,	0x11100)	\
-	__PMC_EV_P6()
+	__PMC_EV_P6()				\
+	__PMC_EV_BLOCK(XSCALE,	0x11200)	\
+	__PMC_EV_XSCALE()
 
 #define	PMC_EVENT_FIRST	PMC_EV_TSC_TSC
-#define	PMC_EVENT_LAST	PMC_EV_P6_LAST
+#define	PMC_EVENT_LAST	PMC_EV_XSCALE_LAST
 
 #endif /* _DEV_HWPMC_PMC_EVENTS_H_ */

==== //depot/projects/soc2008/trasz_nfs4acl/sys/dev/pci/pci.c#16 (text+ko) ====

@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/pci/pci.c,v 1.386 2009/07/21 19:06:39 marius Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/pci/pci.c,v 1.387 2009/09/22 15:43:03 jhb Exp $");
 
 #include "opt_bus.h"
 
@@ -2149,62 +2149,38 @@
 int
 pci_enable_io_method(device_t dev, device_t child, int space)
 {
-	uint16_t command;
 	uint16_t bit;
-	char *error;
-
-	bit = 0;
-	error = NULL;
 
 	switch(space) {
 	case SYS_RES_IOPORT:
 		bit = PCIM_CMD_PORTEN;
-		error = "port";
 		break;
 	case SYS_RES_MEMORY:
 		bit = PCIM_CMD_MEMEN;
-		error = "memory";
 		break;
 	default:
 		return (EINVAL);
 	}
 	pci_set_command_bit(dev, child, bit);
-	/* Some devices seem to need a brief stall here, what do to? */
-	command = PCI_READ_CONFIG(dev, child, PCIR_COMMAND, 2);
-	if (command & bit)
-		return (0);
-	device_printf(child, "failed to enable %s mapping!\n", error);
-	return (ENXIO);
+	return (0);
 }
 
 int
 pci_disable_io_method(device_t dev, device_t child, int space)
 {
-	uint16_t command;
 	uint16_t bit;
-	char *error;
-
-	bit = 0;
-	error = NULL;
 
 	switch(space) {
 	case SYS_RES_IOPORT:
 		bit = PCIM_CMD_PORTEN;
-		error = "port";
 		break;
 	case SYS_RES_MEMORY:
 		bit = PCIM_CMD_MEMEN;
-		error = "memory";
 		break;
 	default:
 		return (EINVAL);
 	}
 	pci_clear_command_bit(dev, child, bit);
-	command = PCI_READ_CONFIG(dev, child, PCIR_COMMAND, 2);
-	if (command & bit) {
-		device_printf(child, "failed to disable %s mapping!\n", error);
-		return (ENXIO);
-	}
 	return (0);
 }
 

==== //depot/projects/soc2008/trasz_nfs4acl/sys/dev/ppbus/vpo.c#6 (text+ko) ====

@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ppbus/vpo.c,v 1.40 2009/08/18 08:46:54 mav Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ppbus/vpo.c,v 1.41 2009/09/22 22:20:43 mav Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -176,9 +176,6 @@
 		return (ENXIO);
 	}
 	ppb_unlock(ppbus);
-
-	/* all went ok */
-
 	vpo_cam_rescan(vpo);	/* have CAM rescan the bus */
 
 	return (0);
@@ -194,12 +191,15 @@
 static void
 vpo_cam_rescan(struct vpo_data *vpo)
 {
+	device_t ppbus = device_get_parent(vpo->vpo_dev);
 	struct cam_path *path;
 	union ccb *ccb = malloc(sizeof(union ccb), M_TEMP, M_WAITOK | M_ZERO);
 
+	ppb_lock(ppbus);
 	if (xpt_create_path(&path, xpt_periph, cam_sim_path(vpo->sim), 0, 0)
 	    != CAM_REQ_CMP) {
 		/* A failure is benign as the user can do a manual rescan */
+		ppb_unlock(ppbus);
 		free(ccb, M_TEMP);
 		return;
 	}
@@ -209,6 +209,7 @@
 	ccb->ccb_h.cbfcnp = vpo_cam_rescan_callback;
 	ccb->crcn.flags = CAM_FLAG_NONE;
 	xpt_action(ccb);
+	ppb_unlock(ppbus);
 
 	/* The scan is in progress now. */
 }

==== //depot/projects/soc2008/trasz_nfs4acl/sys/dev/twa/tw_cl_io.c#2 (text+ko) ====

@@ -24,7 +24,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	$FreeBSD: src/sys/dev/twa/tw_cl_io.c,v 1.4 2007/10/09 17:43:57 scottl Exp $
+ *	$FreeBSD: src/sys/dev/twa/tw_cl_io.c,v 1.5 2009/09/22 16:28:07 rdivacky Exp $
  */
 
 /*
@@ -396,7 +396,7 @@
  *			non-zero-- failure
  */
 TW_INT32
-tw_cl_ioctl(struct tw_cl_ctlr_handle *ctlr_handle, TW_INT32 cmd, TW_VOID *buf)
+tw_cl_ioctl(struct tw_cl_ctlr_handle *ctlr_handle, u_long cmd, TW_VOID *buf)
 {
 	struct tw_cli_ctlr_context	*ctlr =
 		(struct tw_cli_ctlr_context *)(ctlr_handle->cl_ctlr_ctxt);

==== //depot/projects/soc2008/trasz_nfs4acl/sys/dev/twa/tw_cl_share.h#2 (text+ko) ====

@@ -24,7 +24,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	$FreeBSD: src/sys/dev/twa/tw_cl_share.h,v 1.4 2007/10/09 17:43:57 scottl Exp $
+ *	$FreeBSD: src/sys/dev/twa/tw_cl_share.h,v 1.5 2009/09/22 16:28:07 rdivacky Exp $
  */
 
 /*
@@ -565,7 +565,7 @@
 
 /* CL's ioctl handler. */
 extern TW_INT32	tw_cl_ioctl(struct tw_cl_ctlr_handle *ctlr_handle,
-	TW_INT32 cmd, TW_VOID *buf);
+	u_long cmd, TW_VOID *buf);
 
 
 #ifdef TW_OSL_DEBUG

==== //depot/projects/soc2008/trasz_nfs4acl/sys/dev/twe/twe.c#3 (text+ko) ====

@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	$FreeBSD: src/sys/dev/twe/twe.c,v 1.28 2009/08/20 19:17:53 jhb Exp $
+ *	$FreeBSD: src/sys/dev/twe/twe.c,v 1.29 2009/09/22 16:28:07 rdivacky Exp $
  */
 
 /*
@@ -487,7 +487,7 @@
  * Handle controller-specific control operations.
  */
 int
-twe_ioctl(struct twe_softc *sc, int ioctlcmd, void *addr)
+twe_ioctl(struct twe_softc *sc, u_long ioctlcmd, void *addr)
 {
     struct twe_usercommand	*tu = (struct twe_usercommand *)addr;
     struct twe_paramcommand	*tp = (struct twe_paramcommand *)addr;

==== //depot/projects/soc2008/trasz_nfs4acl/sys/dev/twe/twevar.h#2 (text+ko) ====

@@ -24,7 +24,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	$FreeBSD: src/sys/dev/twe/twevar.h,v 1.13 2004/06/11 18:42:44 vkashyap Exp $
+ *	$FreeBSD: src/sys/dev/twe/twevar.h,v 1.14 2009/09/22 16:28:07 rdivacky Exp $
  */
 
 #define TWE_DRIVER_VERSION_STRING	"1.50.01.002"
@@ -150,7 +150,7 @@
 extern int	twe_start(struct twe_request *tr);
 extern int	twe_dump_blocks(struct twe_softc *sc, int unit,	/* crashdump block write */
 				u_int32_t lba, void *data, int nblks);
-extern int	twe_ioctl(struct twe_softc *sc, int cmd,
+extern int	twe_ioctl(struct twe_softc *sc, u_long cmd,
 				  void *addr);			/* handle user request */
 extern void	twe_describe_controller(struct twe_softc *sc);	/* print controller info */
 extern void	twe_print_controller(struct twe_softc *sc);

==== //depot/projects/soc2008/trasz_nfs4acl/sys/fs/procfs/procfs.c#4 (text+ko) ====

@@ -37,7 +37,7 @@
  *
  *	@(#)procfs_vfsops.c	8.7 (Berkeley) 5/10/95
  *
- * $FreeBSD: src/sys/fs/procfs/procfs.c,v 1.20 2009/02/16 15:17:26 des Exp $
+ * $FreeBSD: src/sys/fs/procfs/procfs.c,v 1.21 2009/09/23 12:08:08 kib Exp $
  */
 
 #include <sys/param.h>
@@ -108,7 +108,8 @@
 	else if (strcmp(pn->pn_name, "mem") == 0 ||
 	    strcmp(pn->pn_name, "regs") == 0 ||
 	    strcmp(pn->pn_name, "dbregs") == 0 ||
-	    strcmp(pn->pn_name, "fpregs") == 0)
+	    strcmp(pn->pn_name, "fpregs") == 0 ||
+	    strcmp(pn->pn_name, "osrel") == 0)
 		vap->va_mode = 0600;
 
 	if (p != NULL) {
@@ -186,6 +187,8 @@
 	    NULL, NULL, NULL, PFS_RD);
 	pfs_create_file(dir, "status", procfs_doprocstatus,
 	    NULL, NULL, NULL, PFS_RD);
+	pfs_create_file(dir, "osrel", procfs_doosrel,
+	    procfs_attr, procfs_candebug, NULL, PFS_RDWR);
 
 	pfs_create_link(dir, "file", procfs_doprocfile,
 	    NULL, procfs_notsystem, NULL, 0);

==== //depot/projects/soc2008/trasz_nfs4acl/sys/fs/procfs/procfs.h#2 (text+ko) ====

@@ -33,12 +33,13 @@
  *	@(#)procfs.h	8.9 (Berkeley) 5/14/95

>>> TRUNCATED FOR MAIL (1000 lines) <<<


More information about the p4-projects mailing list