Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Jun 2011 17:09:15 +0000 (UTC)
From:      Attilio Rao <attilio@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r222655 - in projects/largeSMP: contrib/groff/tmac contrib/libpcap contrib/top sbin/geom/class/part share/mk sys/cam/ata sys/conf sys/dev/ath/ath_hal sys/dev/ath/ath_hal/ar5212 sys/dev/...
Message-ID:  <201106031709.p53H9FDc072633@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: attilio
Date: Fri Jun  3 17:09:15 2011
New Revision: 222655
URL: http://svn.freebsd.org/changeset/base/222655

Log:
  MFC

Added:
  projects/largeSMP/sys/powerpc/include/rtas.h
     - copied unchanged from r222654, head/sys/powerpc/include/rtas.h
  projects/largeSMP/sys/powerpc/ofw/ofwcall32.S
     - copied unchanged from r222654, head/sys/powerpc/ofw/ofwcall32.S
  projects/largeSMP/sys/powerpc/ofw/ofwcall64.S
     - copied unchanged from r222654, head/sys/powerpc/ofw/ofwcall64.S
  projects/largeSMP/sys/powerpc/ofw/ofwmagic.S
     - copied unchanged from r222654, head/sys/powerpc/ofw/ofwmagic.S
  projects/largeSMP/sys/powerpc/ofw/rtas.c
     - copied unchanged from r222654, head/sys/powerpc/ofw/rtas.c
Deleted:
  projects/largeSMP/sys/powerpc/aim/ofwmagic.S
Modified:
  projects/largeSMP/contrib/groff/tmac/troffrc
  projects/largeSMP/contrib/libpcap/pcap-bpf.c
  projects/largeSMP/sbin/geom/class/part/geom_part.c
  projects/largeSMP/sbin/geom/class/part/gpart.8
  projects/largeSMP/share/mk/bsd.doc.mk
  projects/largeSMP/sys/cam/ata/ata_da.c
  projects/largeSMP/sys/conf/files.powerpc
  projects/largeSMP/sys/dev/ath/ath_hal/ah.h
  projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212.h
  projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c
  projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c
  projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212reg.h
  projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416.h
  projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
  projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c
  projects/largeSMP/sys/geom/geom_disk.c
  projects/largeSMP/sys/geom/part/g_part.c
  projects/largeSMP/sys/net/if_tun.c
  projects/largeSMP/sys/powerpc/aim/interrupt.c
  projects/largeSMP/sys/powerpc/aim/locore32.S
  projects/largeSMP/sys/powerpc/aim/locore64.S
  projects/largeSMP/sys/powerpc/aim/machdep.c
  projects/largeSMP/sys/powerpc/aim/mmu_oea.c
  projects/largeSMP/sys/powerpc/aim/mmu_oea64.c
  projects/largeSMP/sys/powerpc/aim/moea64_native.c
  projects/largeSMP/sys/powerpc/aim/mp_cpudep.c
  projects/largeSMP/sys/powerpc/aim/slb.c
  projects/largeSMP/sys/powerpc/aim/trap_subr64.S
  projects/largeSMP/sys/powerpc/include/slb.h
  projects/largeSMP/sys/powerpc/ofw/ofw_machdep.c
  projects/largeSMP/sys/powerpc/ofw/ofw_real.c
  projects/largeSMP/usr.bin/man/man.1
  projects/largeSMP/usr.bin/man/man.conf.5
  projects/largeSMP/usr.bin/man/man.sh
  projects/largeSMP/usr.sbin/bsdinstall/scripts/netconfig
  projects/largeSMP/usr.sbin/bsdinstall/scripts/netconfig_ipv4
  projects/largeSMP/usr.sbin/bsdinstall/scripts/netconfig_ipv6
  projects/largeSMP/usr.sbin/mountd/mountd.c
  projects/largeSMP/usr.sbin/rpc.lockd/lockd.c
  projects/largeSMP/usr.sbin/rpc.statd/statd.c
Directory Properties:
  projects/largeSMP/   (props changed)
  projects/largeSMP/cddl/contrib/opensolaris/   (props changed)
  projects/largeSMP/contrib/bind9/   (props changed)
  projects/largeSMP/contrib/binutils/   (props changed)
  projects/largeSMP/contrib/bzip2/   (props changed)
  projects/largeSMP/contrib/dialog/   (props changed)
  projects/largeSMP/contrib/ee/   (props changed)
  projects/largeSMP/contrib/expat/   (props changed)
  projects/largeSMP/contrib/file/   (props changed)
  projects/largeSMP/contrib/gcc/   (props changed)
  projects/largeSMP/contrib/gdb/   (props changed)
  projects/largeSMP/contrib/gdtoa/   (props changed)
  projects/largeSMP/contrib/gnu-sort/   (props changed)
  projects/largeSMP/contrib/groff/   (props changed)
  projects/largeSMP/contrib/less/   (props changed)
  projects/largeSMP/contrib/libpcap/   (props changed)
  projects/largeSMP/contrib/libstdc++/   (props changed)
  projects/largeSMP/contrib/llvm/   (props changed)
  projects/largeSMP/contrib/llvm/tools/clang/   (props changed)
  projects/largeSMP/contrib/ncurses/   (props changed)
  projects/largeSMP/contrib/netcat/   (props changed)
  projects/largeSMP/contrib/ntp/   (props changed)
  projects/largeSMP/contrib/one-true-awk/   (props changed)
  projects/largeSMP/contrib/openbsm/   (props changed)
  projects/largeSMP/contrib/openpam/   (props changed)
  projects/largeSMP/contrib/pf/   (props changed)
  projects/largeSMP/contrib/sendmail/   (props changed)
  projects/largeSMP/contrib/tcpdump/   (props changed)
  projects/largeSMP/contrib/tcsh/   (props changed)
  projects/largeSMP/contrib/top/   (props changed)
  projects/largeSMP/contrib/top/install-sh   (props changed)
  projects/largeSMP/contrib/tzcode/stdtime/   (props changed)
  projects/largeSMP/contrib/tzcode/zic/   (props changed)
  projects/largeSMP/contrib/tzdata/   (props changed)
  projects/largeSMP/contrib/wpa/   (props changed)
  projects/largeSMP/contrib/xz/   (props changed)
  projects/largeSMP/crypto/openssh/   (props changed)
  projects/largeSMP/crypto/openssl/   (props changed)
  projects/largeSMP/gnu/lib/   (props changed)
  projects/largeSMP/gnu/usr.bin/binutils/   (props changed)
  projects/largeSMP/gnu/usr.bin/cc/cc_tools/   (props changed)
  projects/largeSMP/gnu/usr.bin/gdb/   (props changed)
  projects/largeSMP/lib/libc/   (props changed)
  projects/largeSMP/lib/libc/stdtime/   (props changed)
  projects/largeSMP/lib/libutil/   (props changed)
  projects/largeSMP/lib/libz/   (props changed)
  projects/largeSMP/sbin/   (props changed)
  projects/largeSMP/sbin/ipfw/   (props changed)
  projects/largeSMP/share/mk/bsd.arch.inc.mk   (props changed)
  projects/largeSMP/share/zoneinfo/   (props changed)
  projects/largeSMP/sys/   (props changed)
  projects/largeSMP/sys/amd64/include/xen/   (props changed)
  projects/largeSMP/sys/boot/   (props changed)
  projects/largeSMP/sys/boot/i386/efi/   (props changed)
  projects/largeSMP/sys/boot/ia64/efi/   (props changed)
  projects/largeSMP/sys/boot/ia64/ski/   (props changed)
  projects/largeSMP/sys/boot/powerpc/boot1.chrp/   (props changed)
  projects/largeSMP/sys/boot/powerpc/ofw/   (props changed)
  projects/largeSMP/sys/cddl/contrib/opensolaris/   (props changed)
  projects/largeSMP/sys/conf/   (props changed)
  projects/largeSMP/sys/contrib/dev/acpica/   (props changed)
  projects/largeSMP/sys/contrib/octeon-sdk/   (props changed)
  projects/largeSMP/sys/contrib/pf/   (props changed)
  projects/largeSMP/sys/contrib/x86emu/   (props changed)
  projects/largeSMP/usr.bin/calendar/   (props changed)
  projects/largeSMP/usr.bin/csup/   (props changed)
  projects/largeSMP/usr.bin/procstat/   (props changed)
  projects/largeSMP/usr.sbin/ndiscvt/   (props changed)
  projects/largeSMP/usr.sbin/zic/   (props changed)

Modified: projects/largeSMP/contrib/groff/tmac/troffrc
==============================================================================
--- projects/largeSMP/contrib/groff/tmac/troffrc	Fri Jun  3 14:57:38 2011	(r222654)
+++ projects/largeSMP/contrib/groff/tmac/troffrc	Fri Jun  3 17:09:15 2011	(r222655)
@@ -50,12 +50,4 @@ troffrc!X100 troffrc!X100-12 troffrc!lj4
 .\" Handle paper formats
 .do mso papersize.tmac
 .
-.\" Disable SGR support in grotty(1).
-.if n \{\
-.  do nop \X'tty: sgr 0'
-.  sp -1
-.  nr nl 0-1
-.  nr % -1
-.\}
-.
 .\" Don't let blank lines creep in here.

Modified: projects/largeSMP/contrib/libpcap/pcap-bpf.c
==============================================================================
--- projects/largeSMP/contrib/libpcap/pcap-bpf.c	Fri Jun  3 14:57:38 2011	(r222654)
+++ projects/largeSMP/contrib/libpcap/pcap-bpf.c	Fri Jun  3 17:09:15 2011	(r222655)
@@ -1281,6 +1281,7 @@ pcap_cleanup_bpf(pcap_t *p)
 			munmap(p->md.zbuf1, p->md.zbufsize);
 		if (p->md.zbuf2 != MAP_FAILED && p->md.zbuf2 != NULL)
 			munmap(p->md.zbuf2, p->md.zbufsize);
+		p->buffer = NULL;
 	}
 #endif
 	if (p->md.device != NULL) {

Modified: projects/largeSMP/sbin/geom/class/part/geom_part.c
==============================================================================
--- projects/largeSMP/sbin/geom/class/part/geom_part.c	Fri Jun  3 14:57:38 2011	(r222654)
+++ projects/largeSMP/sbin/geom/class/part/geom_part.c	Fri Jun  3 17:09:15 2011	(r222655)
@@ -306,7 +306,7 @@ gpart_autofill_resize(struct gctl_req *r
 	struct ggeom *gp;
 	struct gprovider *pp;
 	off_t last, size, start, new_size;
-	off_t lba, new_lba, alignment;
+	off_t lba, new_lba, alignment, offset;
 	const char *s;
 	int error, idx;
 
@@ -341,6 +341,9 @@ gpart_autofill_resize(struct gctl_req *r
 			errc(EXIT_FAILURE, error, "Invalid alignment param");
 		if (alignment == 0)
 			errx(EXIT_FAILURE, "Invalid alignment param");
+		lba = pp->lg_stripesize / pp->lg_sectorsize;
+		if (lba > 0)
+			alignment = g_lcm(lba, alignment);
 	}
 	error = gctl_delete_param(req, "alignment");
 	if (error)
@@ -356,12 +359,10 @@ gpart_autofill_resize(struct gctl_req *r
 		/* no autofill necessary. */
 		if (alignment == 1)
 			goto done;
-		if (new_size > alignment)
-			new_size = ALIGNDOWN(new_size, alignment);
 	}
 
+	offset = pp->lg_stripeoffset / pp->lg_sectorsize;
 	last = (off_t)strtoimax(find_geomcfg(gp, "last"), NULL, 0);
-	last = ALIGNDOWN(last, alignment);
 	LIST_FOREACH(pp, &gp->lg_provider, lg_provider) {
 		s = find_provcfg(pp, "index");
 		if (s == NULL)
@@ -375,24 +376,32 @@ gpart_autofill_resize(struct gctl_req *r
 	s = find_provcfg(pp, "start");
 	start = (off_t)strtoimax(s, NULL, 0);
 	s = find_provcfg(pp, "end");
-	lba = (off_t)strtoimax(s, NULL, 0) + 1;
+	lba = (off_t)strtoimax(s, NULL, 0);
+	size = lba - start + 1;
 
-	if (lba > last) {
-		geom_deletetree(&mesh);
-		return (ENOSPC);
+	if (new_size > 0 && new_size <= size) {
+		/* The start offset may be not aligned, so we align the end
+		 * offset and then calculate the size.
+		 */
+		new_size = ALIGNDOWN(start + offset + new_size,
+		    alignment) - start - offset;
+		goto done;
 	}
-	size = lba - start;
-	pp = find_provider(gp, lba);
-	if (pp == NULL)
-		new_size = ALIGNDOWN(last - start + 1, alignment);
-	else {
+
+	pp = find_provider(gp, lba + 1);
+	if (pp == NULL) {
+		new_size = ALIGNDOWN(last + offset + 1, alignment) -
+		    start - offset;
+		if (new_size < size)
+			return (ENOSPC);
+	} else {
 		s = find_provcfg(pp, "start");
 		new_lba = (off_t)strtoimax(s, NULL, 0);
 		/*
 		 * Is there any free space between current and
 		 * next providers?
 		 */
-		new_lba = ALIGNUP(new_lba, alignment);
+		new_lba = ALIGNDOWN(new_lba + offset, alignment) - offset;
 		if (new_lba > lba)
 			new_size = new_lba - start;
 		else {
@@ -482,10 +491,16 @@ gpart_autofill(struct gctl_req *req)
 	if (has_size && has_start && !has_alignment)
 		goto done;
 
-	/* Adjust parameters to offset value for better alignment */
-	s = find_provcfg(pp, "offset");
-	offset = (s == NULL) ? 0:
-	    (off_t)strtoimax(s, NULL, 0) / pp->lg_sectorsize;
+	/*
+	 * If stripesize is not zero, then recalculate alignment value.
+	 * Use LCM from stripesize and user specified alignment.
+	 */
+	len = pp->lg_stripesize / pp->lg_sectorsize;
+	if (len > 0 )
+		alignment = g_lcm(len, alignment);
+
+	/* Adjust parameters to stripeoffset */
+	offset = pp->lg_stripeoffset / pp->lg_sectorsize;
 	start = ALIGNUP(start + offset, alignment);
 	if (size + offset > alignment)
 		size = ALIGNDOWN(size + offset, alignment);

Modified: projects/largeSMP/sbin/geom/class/part/gpart.8
==============================================================================
--- projects/largeSMP/sbin/geom/class/part/gpart.8	Fri Jun  3 14:57:38 2011	(r222654)
+++ projects/largeSMP/sbin/geom/class/part/gpart.8	Fri Jun  3 17:09:15 2011	(r222655)
@@ -61,7 +61,8 @@ which is used to define a logical partit
 The
 .Dv GEOM_PART_EBR_COMPAT
 option enables backward compatibility for partition names
-in the EBR scheme. Also it makes impossible any types of actions
+in the EBR scheme.
+Also it makes impossible any types of actions
 with such partitions.
 The
 .Dv GEOM_PART_GPT
@@ -170,7 +171,7 @@ utility:
 .\" ==== SHOW ====
 .Nm
 .Cm show
-.Op Fl l | Fl r
+.Op Fl l | r
 .Op Fl p
 .Op Ar geom ...
 .\" ==== UNDO ====
@@ -200,11 +201,14 @@ The partition begins on the logical bloc
 option.
 Its size is given by the
 .Fl s Ar size
-option. SI unit suffixes are allowed. One or both
+option.
+SI unit suffixes are allowed.
+One or both
 .Fl b
 and
 .Fl s
-options can be omitted. If so they are automatically calculated.
+options can be omitted.
+If so they are automatically calculated.
 The type of the partition is given by the
 .Fl t Ar type
 option.
@@ -399,7 +403,7 @@ about its use.
 Recover corrupt partition's scheme metadata on the geom
 .Ar geom .
 See the section entitled
-.Sx "RECOVERING"
+.Sx RECOVERING
 below for the additional information.
 .Pp
 Additional options include:
@@ -453,7 +457,7 @@ action and given from standard input.
 Only partition table may be restored.
 This action does not affect content of partitions.
 This mean that you should copy your data from backup after restoring
-partition table and write bootcode again if it is needed. 
+partition table and write bootcode again if it is needed.
 .Pp
 Additional options include:
 .Bl -tag -width 10n
@@ -474,7 +478,7 @@ about its use.
 .It Cm set
 Set the named attribute on the partition entry.
 See the section entitled
-.Sx "ATTRIBUTES"
+.Sx ATTRIBUTES
 below for a list of available attributes.
 .Pp
 Additional options include:
@@ -511,7 +515,7 @@ action and can be used to undo any chang
 .It Cm unset
 Clear the named attribute on the partition entry.
 See the section entitled
-.Sx "ATTRIBUTES"
+.Sx ATTRIBUTES
 below for a list of available attributes.
 .Pp
 Additional options include:
@@ -616,75 +620,75 @@ by GPT.
 .El
 .Sh ATTRIBUTES
 The scheme-specific attributes for EBR:
-.Bl -tag -width ".Ar active"
-.It Ar active
+.Bl -tag -width ".Cm active"
+.It Cm active
 .El
 .Pp
 The scheme-specific attributes for GPT:
-.Bl -tag -width ".Ar bootfailed"
-.It Ar bootme
+.Bl -tag -width ".Cm bootfailed"
+.It Cm bootme
 When set, the
 .Nm gptboot
 stage 1 boot loader will try to boot the system from this partition.
 Multiple partitions might be marked with the
-.Ar bootme
+.Cm bootme
 attribute.
 In such scenario the
 .Nm gptboot
 will try all
-.Ar bootme
+.Cm bootme
 partitions one by one, until the next boot stage is successfully entered.
-.It Ar bootonce
+.It Cm bootonce
 Setting this attribute automatically sets the
-.Ar bootme
+.Cm bootme
 attribute.
 When set, the
 .Nm gptboot
 stage 1 boot loader will try to boot the system from this partition only once.
 Partitions with both
-.Ar bootonce
+.Cm bootonce
 and
-.Ar bootme
+.Cm bootme
 attributes are tried before partitions with only the
-.Ar bootme
+.Cm bootme
 attribute.
 Before
-.Ar bootonce
+.Cm bootonce
 partition is tried, the
 .Nm gptboot
 removes the
-.Ar bootme
+.Cm bootme
 attribute and tries to execute the next boot stage.
 If it fails, the
-.Ar bootonce
+.Cm bootonce
 attribute that is now alone is replaced with the
-.Ar bootfailed
+.Cm bootfailed
 attribute.
 If the execution of the next boot stage succeeds, but the system is not fully
 booted, the
 .Nm gptboot
 will look for
-.Ar bootonce
+.Cm bootonce
 attributes alone (without the
-.Ar bootme
+.Cm bootme
 attribute) on the next system boot and will replace those with the
-.Ar bootfailed
+.Cm bootfailed
 attribute.
 If the system is fully booted, the
 .Pa /etc/rc.d/gptboot
 start-up script will look for partition with the
-.Ar bootonce
+.Cm bootonce
 attribute alone, will remove the attribute and log that the system was
 successfully booted from this partition.
 There should be at most one
-.Ar bootonce
+.Cm bootonce
 partition when system is successfully booted.
 Multiple partitions might be marked with the
-.Ar bootonce
+.Cm bootonce
 and
-.Ar bootme
+.Cm bootme
 attribute pairs.
-.It Ar bootfailed
+.It Cm bootfailed
 This attribute should not be manually managed.
 It is managed by the
 .Nm gptboot
@@ -692,24 +696,24 @@ stage 1 boot loader and the
 .Pa /etc/rc.d/gptboot
 start-up script.
 This attribute is used to mark partitions that had the
-.Ar bootonce
+.Cm bootonce
 attribute set, but we failed to boot from them.
 Once we successfully boot, the
 .Pa /etc/rc.d/gptboot
 script will log all the partitions we failed to boot from and will remove the
-.Ar bootfailed
+.Cm bootfailed
 attributes.
 .El
 .Pp
 The scheme-specific attributes for MBR:
-.Bl -tag -width ".Ar active"
-.It Ar active
+.Bl -tag -width ".Cm active"
+.It Cm active
 .El
 .Pp
 The scheme-specific attributes for PC98:
-.Bl -tag -width ".Ar bootable"
-.It Ar active
-.It Ar bootable
+.Bl -tag -width ".Cm bootable"
+.It Cm active
+.It Cm bootable
 .El
 .Sh OPERATIONAL FLAGS
 Actions other than the
@@ -747,7 +751,7 @@ reports about corruption.
 Any changes in corrupt table are prohibited except
 .Cm destroy
 and
-.Cm recover . 
+.Cm recover .
 .Pp
 In case when only first sector is corrupt kernel can not detect GPT even
 if partition table is not corrupt.
@@ -771,16 +775,15 @@ GEOM: provider: the secondary GPT table 
 GEOM: provider: using the primary only -- recovery suggested.
 .Ed
 .Pp
-Also 
-.Cm gpart 
-commands like 
-.Cm show ,
-.Cm status
+Also
+.Nm
+commands like
+.Cm show , status
 and
 .Cm list
 will report about corrupt table.
 .Pp
-In case when the size of device has changed (e.g. volume expansion) the 
+In case when the size of device has changed (e.g.\& volume expansion) the
 secondary GPT header will become located not in the last sector.
 This is not a metadata corruption, but it is dangerous because any
 corruption of the primary GPT will lead to lost of partition table.
@@ -789,19 +792,19 @@ Kernel reports about this problem with m
 GEOM: provider: the secondary GPT header is not in the last LBA.
 .Ed
 .Pp
-A corrupt table can be recovered with 
-.Cm gpart recover 
+A corrupt table can be recovered with
+.Cm recover
 command.
-This command does reconstruction of corrupt metadata using 
+This command does reconstruction of corrupt metadata using
 known valid metadata.
 Also it can relocate secondary GPT to the end of device.
 .Pp
-.Pa NOTE :
-The GEOM class PART can detect the same partition table on different GEOM 
+.Em NOTE :
+The GEOM class PART can detect the same partition table on different GEOM
 providers and some of them will be marked as corrupt.
 Be careful when choosing a provider for recovering.
 If you choose incorrectly you can destroy the metadata of another GEOM class,
-e.g. GEOM MIRROR or GEOM LABEL.
+e.g.\& GEOM MIRROR or GEOM LABEL.
 .Sh SYSCTL VARIABLES
 The following
 .Xr sysctl 8
@@ -815,20 +818,21 @@ This variable controls the behaviour of 
 When integrity checks are enabled
 .Nm PART
 GEOM class verifies all generic partition parameters that it gets from the
-disk metadata. If some inconsistency is detected, partition table will be
+disk metadata.
+If some inconsistency is detected, partition table will be
 rejected with a diagnostic message:
-.Pa GEOM_PART: Integrity check failed (provider, scheme) .
+.Sy "GEOM_PART: Integrity check failed (provider, scheme)" .
 .El
 .Sh EXIT STATUS
 Exit status is 0 on success, and 1 if the command fails.
 .Sh EXAMPLES
 Create GPT scheme on
-.Pa ad0 .
+.Pa ad0 :
 .Bd -literal -offset indent
 /sbin/gpart create -s GPT ad0
 .Ed
 .Pp
-Embed GPT bootstrap code into protective MBR.
+Embed GPT bootstrap code into protective MBR:
 .Bd -literal -offset indent
 /sbin/gpart bootcode -b /boot/pmbr ad0
 .Ed
@@ -854,15 +858,19 @@ future need (e.g.\& from a ZFS partition
 .Pp
 Create a 512MB-sized
 .Cm freebsd-ufs
-partition that would contain UFS where the system boots from.
+partition that would contain UFS where the system boots from:
 .Bd -literal -offset indent
 /sbin/gpart add -b 162 -s 1048576 -t freebsd-ufs ad0
 .Ed
 .Pp
 Create MBR scheme on
 .Pa ada0 ,
-then create 30GB-sized FreeBSD slice, mark it active and
-install boot0 boot manager:
+then create 30GB-sized
+.Fx
+slice, mark it active and
+install
+.Nm boot0
+boot manager:
 .Bd -literal -offset indent
 /sbin/gpart create -s MBR ada0
 /sbin/gpart add -t freebsd -s 30G ada0
@@ -870,7 +878,11 @@ install boot0 boot manager:
 /sbin/gpart bootcode -b /boot/boot0 ada0
 .Ed
 .Pp
-Now create BSD scheme (BSD label) with ability to have up to 20 partitions:
+Now create
+.Bx
+scheme
+.Pf ( Bx
+label) with ability to have up to 20 partitions:
 .Bd -literal -offset indent
 /sbin/gpart create -s BSD -n 20 ada0s1
 .Ed
@@ -881,20 +893,22 @@ Create 1GB-sized UFS partition and 4GB-s
 /sbin/gpart add -t freebsd-swap -s 4G ada0s1
 .Ed
 .Pp
-Install bootstrap code for the BSD label:
+Install bootstrap code for the
+.Bx
+label:
 .Bd -literal -offset indent
 /sbin/gpart bootcode -b /boot/boot ada0s1
 .Ed
 .Pp
 Create VTOC8 scheme on
-.Pa da0 .
+.Pa da0 :
 .Bd -literal -offset indent
 /sbin/gpart create -s VTOC8 da0
 .Ed
 .Pp
 Create a 512MB-sized
 .Cm freebsd-ufs
-partition that would contain UFS where the system boots from.
+partition that would contain UFS where the system boots from:
 .Bd -literal -offset indent
 /sbin/gpart add -s 512M -t freebsd-ufs da0
 .Ed
@@ -906,29 +920,29 @@ partition that would contain UFS and ali
 /sbin/gpart add -s 15G -t freebsd-ufs -a 4k da0
 .Ed
 .Pp
-After having created all required partitions, embed bootstrap code into them.
+After having created all required partitions, embed bootstrap code into them:
 .Bd -literal -offset indent
 /sbin/gpart bootcode -p /boot/boot1 da0
 .Ed
 .Pp
 Create backup of partition table from
-.Pa da0
+.Pa da0 :
 .Bd -literal -offset indent
 /sbin/gpart backup da0 > da0.backup
 .Ed
 .Pp
 Restore partition table from backup to
-.Pa da0
+.Pa da0 :
 .Bd -literal -offset indent
 /sbin/gpart restore -l da0 < /mnt/da0.backup
 .Ed
 .Pp
-Clone partition table from 
-.Pa ada0 
-to 
-.Pa ada1 
-and 
-.Pa ada2
+Clone partition table from
+.Pa ada0
+to
+.Pa ada1
+and
+.Pa ada2 :
 .Bd -literal -offset indent
 /sbin/gpart backup ada0 | /sbin/gpart restore -F ada1 ada2
 .Ed

Modified: projects/largeSMP/share/mk/bsd.doc.mk
==============================================================================
--- projects/largeSMP/share/mk/bsd.doc.mk	Fri Jun  3 14:57:38 2011	(r222654)
+++ projects/largeSMP/share/mk/bsd.doc.mk	Fri Jun  3 17:09:15 2011	(r222655)
@@ -54,10 +54,10 @@ INDXBIB?=	indxbib
 PIC?=		pic
 REFER?=		refer
 .for _dev in ${PRINTERDEVICE:Mascii}
-ROFF.ascii?=	groff -Tascii ${TRFLAGS} -mtty-char ${MACROS} -o${PAGES}
+ROFF.ascii?=	groff -Tascii -P-c ${TRFLAGS} -mtty-char ${MACROS} ${PAGES:C/^/-o/1}
 .endfor
 .for _dev in ${PRINTERDEVICE:Nascii}
-ROFF.${_dev}?=	groff -T${_dev} ${TRFLAGS} ${MACROS} -o${PAGES}
+ROFF.${_dev}?=	groff -T${_dev} ${TRFLAGS} ${MACROS} ${PAGES:C/^/-o/1}
 .endfor
 SOELIM?=	soelim
 TBL?=		tbl
@@ -94,8 +94,6 @@ DFILE.${_dev}=	${DOC}.${_dev}${DCOMPRESS
 .endif
 .endfor
 
-PAGES?=		1-
-
 UNROFF?=	unroff
 HTML_SPLIT?=	yes
 UNROFFFLAGS?=	-fhtml

Modified: projects/largeSMP/sys/cam/ata/ata_da.c
==============================================================================
--- projects/largeSMP/sys/cam/ata/ata_da.c	Fri Jun  3 14:57:38 2011	(r222654)
+++ projects/largeSMP/sys/cam/ata/ata_da.c	Fri Jun  3 17:09:15 2011	(r222655)
@@ -114,11 +114,12 @@ struct disk_params {
 	u_int64_t sectors;	/* Total number sectors */
 };
 
-#define TRIM_MAX_BLOCKS	4
-#define TRIM_MAX_RANGES	TRIM_MAX_BLOCKS * 64
+#define TRIM_MAX_BLOCKS	8
+#define TRIM_MAX_RANGES	(TRIM_MAX_BLOCKS * 64)
+#define TRIM_MAX_BIOS	(TRIM_MAX_RANGES * 4)
 struct trim_request {
 	uint8_t		data[TRIM_MAX_RANGES * 8];
-	struct bio	*bps[TRIM_MAX_RANGES];
+	struct bio	*bps[TRIM_MAX_BIOS];
 };
 
 struct ada_softc {
@@ -1067,7 +1068,8 @@ adastart(struct cam_periph *periph, unio
 		    (bp = bioq_first(&softc->trim_queue)) != 0) {
 			struct trim_request *req = &softc->trim_req;
 			struct bio *bp1;
-			int bps = 0, ranges = 0;
+			uint64_t lastlba = (uint64_t)-1;
+			int bps = 0, c, lastcount = 0, off, ranges = 0;
 
 			softc->trim_running = 1;
 			bzero(req, sizeof(*req));
@@ -1078,10 +1080,22 @@ adastart(struct cam_periph *periph, unio
 				    softc->params.secsize;
 
 				bioq_remove(&softc->trim_queue, bp1);
-				while (count > 0) {
-					int c = min(count, 0xffff);
-					int off = ranges * 8;
 
+				/* Try to extend the previous range. */
+				if (lba == lastlba) {
+					c = min(count, 0xffff - lastcount);
+					lastcount += c;
+					off = (ranges - 1) * 8;
+					req->data[off + 6] = lastcount & 0xff;
+					req->data[off + 7] =
+					    (lastcount >> 8) & 0xff;
+					count -= c;
+					lba += c;
+				}
+
+				while (count > 0) {
+					c = min(count, 0xffff);
+					off = ranges * 8;
 					req->data[off + 0] = lba & 0xff;
 					req->data[off + 1] = (lba >> 8) & 0xff;
 					req->data[off + 2] = (lba >> 16) & 0xff;
@@ -1092,11 +1106,14 @@ adastart(struct cam_periph *periph, unio
 					req->data[off + 7] = (c >> 8) & 0xff;
 					lba += c;
 					count -= c;
+					lastcount = c;
 					ranges++;
 				}
+				lastlba = lba;
 				req->bps[bps++] = bp1;
 				bp1 = bioq_first(&softc->trim_queue);
-				if (bp1 == NULL ||
+				if (bps >= TRIM_MAX_BIOS ||
+				    bp1 == NULL ||
 				    bp1->bio_bcount / softc->params.secsize >
 				    (softc->trim_max_ranges - ranges) * 0xffff)
 					break;
@@ -1370,8 +1387,7 @@ adadone(struct cam_periph *periph, union
 			    (struct trim_request *)ataio->data_ptr;
 			int i;
 
-			for (i = 1; i < softc->trim_max_ranges &&
-			    req->bps[i]; i++) {
+			for (i = 1; i < TRIM_MAX_BIOS && req->bps[i]; i++) {
 				struct bio *bp1 = req->bps[i];
 				
 				bp1->bio_resid = bp->bio_resid;

Modified: projects/largeSMP/sys/conf/files.powerpc
==============================================================================
--- projects/largeSMP/sys/conf/files.powerpc	Fri Jun  3 14:57:38 2011	(r222654)
+++ projects/largeSMP/sys/conf/files.powerpc	Fri Jun  3 17:09:15 2011	(r222655)
@@ -87,7 +87,6 @@ powerpc/aim/moea64_if.m		optional	aim
 powerpc/aim/moea64_native.c	optional	aim
 powerpc/aim/mp_cpudep.c		optional	aim smp
 powerpc/aim/nexus.c		optional	aim
-powerpc/aim/ofwmagic.S		optional	aim
 powerpc/aim/slb.c		optional	aim powerpc64
 powerpc/aim/swtch32.S		optional	aim powerpc
 powerpc/aim/swtch64.S		optional	aim powerpc64
@@ -137,6 +136,10 @@ powerpc/ofw/ofw_pcibus.c	optional	pci ai
 powerpc/ofw/ofw_pcib_pci.c	optional	pci aim
 powerpc/ofw/ofw_real.c		optional	aim
 powerpc/ofw/ofw_syscons.c	optional	sc aim
+powerpc/ofw/ofwcall32.S		optional	aim powerpc
+powerpc/ofw/ofwcall64.S		optional	aim powerpc64
+powerpc/ofw/ofwmagic.S		optional	aim
+powerpc/ofw/rtas.c		optional	aim
 powerpc/powermac/ata_kauai.c	optional	powermac ata | powermac atamacio
 powerpc/powermac/ata_macio.c	optional	powermac ata | powermac atamacio
 powerpc/powermac/ata_dbdma.c	optional	powermac ata | powermac atamacio

Modified: projects/largeSMP/sys/dev/ath/ath_hal/ah.h
==============================================================================
--- projects/largeSMP/sys/dev/ath/ath_hal/ah.h	Fri Jun  3 14:57:38 2011	(r222654)
+++ projects/largeSMP/sys/dev/ath/ath_hal/ah.h	Fri Jun  3 17:09:15 2011	(r222655)
@@ -736,6 +736,16 @@ typedef struct {
 
 
 /*
+ * Flag for setting QUIET period
+ */
+typedef enum {
+	HAL_QUIET_DISABLE		= 0x0,
+	HAL_QUIET_ENABLE		= 0x1,
+	HAL_QUIET_ADD_CURRENT_TSF	= 0x2,	/* add current TSF to next_start offset */
+	HAL_QUIET_ADD_SWBA_RESP_TIME	= 0x4,	/* add beacon response time to next_start offset */
+} HAL_QUIET_FLAG;
+
+/*
  * Hardware Access Layer (HAL) API.
  *
  * Clients of the HAL call ath_hal_attach to obtain a reference to an
@@ -909,6 +919,9 @@ struct ath_hal {
 	u_int	  __ahdecl(*ah_getCTSTimeout)(struct ath_hal*);
 	HAL_BOOL  __ahdecl(*ah_setDecompMask)(struct ath_hal*, uint16_t, int);
 	void	  __ahdecl(*ah_setCoverageClass)(struct ath_hal*, uint8_t, int);
+	HAL_STATUS	__ahdecl(*ah_setQuiet)(struct ath_hal *ah, uint32_t period,
+				uint32_t duration, uint32_t nextStart,
+				HAL_QUIET_FLAG flag);
 
 	/* DFS functions */
 	void	  __ahdecl(*ah_enableDfs)(struct ath_hal *ah,

Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212.h
==============================================================================
--- projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212.h	Fri Jun  3 14:57:38 2011	(r222654)
+++ projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212.h	Fri Jun  3 17:09:15 2011	(r222655)
@@ -506,6 +506,8 @@ extern	HAL_BOOL ar5212SetCapability(stru
 extern	HAL_BOOL ar5212GetDiagState(struct ath_hal *ah, int request,
 		const void *args, uint32_t argsize,
 		void **result, uint32_t *resultsize);
+extern	HAL_STATUS ar5212SetQuiet(struct ath_hal *ah, uint32_t period,
+		uint32_t duration, uint32_t nextStart, HAL_QUIET_FLAG flag);
 
 extern	HAL_BOOL ar5212SetPowerMode(struct ath_hal *ah, HAL_POWER_MODE mode,
 		int setChip);

Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c
==============================================================================
--- projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c	Fri Jun  3 14:57:38 2011	(r222654)
+++ projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c	Fri Jun  3 17:09:15 2011	(r222655)
@@ -127,6 +127,7 @@ static const struct ath_hal_private ar52
 	.ah_getCTSTimeout		= ar5212GetCTSTimeout,
 	.ah_setDecompMask               = ar5212SetDecompMask,
 	.ah_setCoverageClass            = ar5212SetCoverageClass,
+	.ah_setQuiet			= ar5212SetQuiet,
 
 	/* DFS Functions */
 	.ah_enableDfs			= ar5212EnableDfs,

Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c
==============================================================================
--- projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c	Fri Jun  3 14:57:38 2011	(r222654)
+++ projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c	Fri Jun  3 17:09:15 2011	(r222655)
@@ -634,6 +634,20 @@ ar5212SetCoverageClass(struct ath_hal *a
 	}
 }
 
+HAL_STATUS
+ar5212SetQuiet(struct ath_hal *ah, uint32_t period, uint32_t duration,
+    uint32_t nextStart, HAL_QUIET_FLAG flag)
+{
+	OS_REG_WRITE(ah, AR_QUIET2, period | (duration << AR_QUIET2_QUIET_DUR_S));
+	if (flag & HAL_QUIET_ENABLE) {
+		OS_REG_WRITE(ah, AR_QUIET1, nextStart | (1 << 16));
+	}
+	else {
+		OS_REG_WRITE(ah, AR_QUIET1, nextStart);
+	}
+	return HAL_OK;
+}
+
 void
 ar5212SetPCUConfig(struct ath_hal *ah)
 {

Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212reg.h
==============================================================================
--- projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212reg.h	Fri Jun  3 14:57:38 2011	(r222654)
+++ projects/largeSMP/sys/dev/ath/ath_hal/ar5212/ar5212reg.h	Fri Jun  3 17:09:15 2011	(r222655)
@@ -300,6 +300,7 @@
 #define AR_QUIET1_NEXT_QUIET    0xffff
 #define AR_QUIET1_QUIET_ENABLE  0x10000 /* Enable Quiet time operation */
 #define AR_QUIET1_QUIET_ACK_CTS_ENABLE  0x20000 /* Do we ack/cts during quiet period */
+#define	AR_QUIET1_QUIET_ACK_CTS_ENABLE_S 17
 
 #define AR_QUIET2   0x8100  /* More Quiet time programming */
 #define AR_QUIET2_QUIET_PER_S   0   /* Periodicity of quiet period (TU) */

Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416.h
==============================================================================
--- projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416.h	Fri Jun  3 14:57:38 2011	(r222654)
+++ projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416.h	Fri Jun  3 17:09:15 2011	(r222655)
@@ -194,6 +194,8 @@ extern	uint32_t ar5416Get11nExtBusy(stru
 extern	void ar5416Set11nMac2040(struct ath_hal *ah, HAL_HT_MACMODE mode);
 extern	HAL_HT_RXCLEAR ar5416Get11nRxClear(struct ath_hal *ah);
 extern	void ar5416Set11nRxClear(struct ath_hal *ah, HAL_HT_RXCLEAR rxclear);
+extern	HAL_STATUS ar5416SetQuiet(struct ath_hal *ah, uint32_t period,
+	    uint32_t duration, uint32_t nextStart, HAL_QUIET_FLAG flag);
 extern	HAL_STATUS ar5416GetCapability(struct ath_hal *ah,
 	    HAL_CAPABILITY_TYPE type, uint32_t capability, uint32_t *result);
 extern	HAL_BOOL ar5416GetDiagState(struct ath_hal *ah, int request,

Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
==============================================================================
--- projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c	Fri Jun  3 14:57:38 2011	(r222654)
+++ projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c	Fri Jun  3 17:09:15 2011	(r222655)
@@ -139,6 +139,7 @@ ar5416InitState(struct ath_hal_5416 *ahp
 	ah->ah_setAntennaSwitch		= ar5416SetAntennaSwitch;
 	ah->ah_setDecompMask		= ar5416SetDecompMask;
 	ah->ah_setCoverageClass		= ar5416SetCoverageClass;
+	ah->ah_setQuiet			= ar5416SetQuiet;
 
 	ah->ah_resetKeyCacheEntry	= ar5416ResetKeyCacheEntry;
 	ah->ah_setKeyCacheEntry		= ar5416SetKeyCacheEntry;

Modified: projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c
==============================================================================
--- projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c	Fri Jun  3 14:57:38 2011	(r222654)
+++ projects/largeSMP/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c	Fri Jun  3 17:09:15 2011	(r222655)
@@ -273,6 +273,35 @@ ar5416Set11nRxClear(struct ath_hal *ah, 
     }
 }
 
+/* XXX shouldn't be here! */
+#define	TU_TO_USEC(_tu)		((_tu) << 10)
+
+HAL_STATUS
+ar5416SetQuiet(struct ath_hal *ah, uint32_t period, uint32_t duration,
+    uint32_t nextStart, HAL_QUIET_FLAG flag)
+{
+	uint32_t period_us = TU_TO_USEC(period); /* convert to us unit */
+	uint32_t nextStart_us = TU_TO_USEC(nextStart); /* convert to us unit */
+	if (flag & HAL_QUIET_ENABLE) {
+		if ((!nextStart) || (flag & HAL_QUIET_ADD_CURRENT_TSF)) {
+			/* Add the nextStart offset to the current TSF */
+			nextStart_us += OS_REG_READ(ah, AR_TSF_L32);
+		}
+		if (flag & HAL_QUIET_ADD_SWBA_RESP_TIME) {
+			nextStart_us += ath_hal_sw_beacon_response_time;
+		}
+		OS_REG_RMW_FIELD(ah, AR_QUIET1, AR_QUIET1_QUIET_ACK_CTS_ENABLE, 1);
+		OS_REG_WRITE(ah, AR_QUIET2, SM(duration, AR_QUIET2_QUIET_DUR));
+		OS_REG_WRITE(ah, AR_QUIET_PERIOD, period_us);
+		OS_REG_WRITE(ah, AR_NEXT_QUIET, nextStart_us);
+		OS_REG_SET_BIT(ah, AR_TIMER_MODE, AR_TIMER_MODE_QUIET);
+	} else {
+		OS_REG_CLR_BIT(ah, AR_TIMER_MODE, AR_TIMER_MODE_QUIET);
+	}
+	return HAL_OK;
+}
+#undef	TU_TO_USEC
+
 HAL_STATUS
 ar5416GetCapability(struct ath_hal *ah, HAL_CAPABILITY_TYPE type,
         uint32_t capability, uint32_t *result)

Modified: projects/largeSMP/sys/geom/geom_disk.c
==============================================================================
--- projects/largeSMP/sys/geom/geom_disk.c	Fri Jun  3 14:57:38 2011	(r222654)
+++ projects/largeSMP/sys/geom/geom_disk.c	Fri Jun  3 17:09:15 2011	(r222655)
@@ -154,6 +154,12 @@ g_disk_access(struct g_provider *pp, int
 		}
 		pp->mediasize = dp->d_mediasize;
 		pp->sectorsize = dp->d_sectorsize;
+		if (dp->d_flags & DISKFLAG_CANDELETE)
+			pp->flags |= G_PF_CANDELETE;
+		else
+			pp->flags &= ~G_PF_CANDELETE;
+		pp->stripeoffset = dp->d_stripeoffset;
+		pp->stripesize = dp->d_stripesize;
 		dp->d_flags |= DISKFLAG_OPEN;
 		if (dp->d_maxsize == 0) {
 			printf("WARNING: Disk drive %s%d has no d_maxsize\n",

Modified: projects/largeSMP/sys/geom/part/g_part.c
==============================================================================
--- projects/largeSMP/sys/geom/part/g_part.c	Fri Jun  3 14:57:38 2011	(r222654)
+++ projects/largeSMP/sys/geom/part/g_part.c	Fri Jun  3 17:09:15 2011	(r222655)
@@ -248,6 +248,7 @@ g_part_check_integrity(struct g_part_tab
 {
 	struct g_part_entry *e1, *e2;
 	struct g_provider *pp;
+	off_t offset;
 	int failed;
 
 	failed = 0;
@@ -294,6 +295,16 @@ g_part_check_integrity(struct g_part_tab
 			    (intmax_t)table->gpt_last);
 			failed++;
 		}
+		if (pp->stripesize > 0) {
+			offset = e1->gpe_start * pp->sectorsize;
+			if (e1->gpe_offset > offset)
+				offset = e1->gpe_offset;
+			if ((offset + pp->stripeoffset) % pp->stripesize) {
+				DPRINTF("partition %d is not aligned on %u "
+				    "bytes\n", e1->gpe_index, pp->stripesize);
+				/* Don't treat this as a critical failure */
+			}
+		}
 		e2 = e1;
 		while ((e2 = LIST_NEXT(e2, gpe_entry)) != NULL) {
 			if (e2->gpe_deleted || e2->gpe_internal)
@@ -723,7 +734,11 @@ g_part_ctl_add(struct gctl_req *req, str
 	if (gpp->gpp_parms & G_PART_PARM_OUTPUT) {
 		sb = sbuf_new_auto();
 		G_PART_FULLNAME(table, entry, sb, gp->name);
-		sbuf_cat(sb, " added\n");
+		if (pp->stripesize > 0 && entry->gpe_pp->stripeoffset != 0)
+			sbuf_printf(sb, " added, but partition is not "
+			    "aligned on %u bytes\n", pp->stripesize);
+		else
+			sbuf_cat(sb, " added\n");
 		sbuf_finish(sb);
 		gctl_set_param(req, "output", sbuf_data(sb), sbuf_len(sb) + 1);
 		sbuf_delete(sb);

Modified: projects/largeSMP/sys/net/if_tun.c
==============================================================================
--- projects/largeSMP/sys/net/if_tun.c	Fri Jun  3 14:57:38 2011	(r222654)
+++ projects/largeSMP/sys/net/if_tun.c	Fri Jun  3 17:09:15 2011	(r222655)
@@ -126,7 +126,7 @@ static void	tunclone(void *arg, struct u
 		    int namelen, struct cdev **dev);
 static void	tuncreate(const char *name, struct cdev *dev);
 static int	tunifioctl(struct ifnet *, u_long, caddr_t);
-static int	tuninit(struct ifnet *);
+static void	tuninit(struct ifnet *);
 static int	tunmodevent(module_t, int, void *);
 static int	tunoutput(struct ifnet *, struct mbuf *, struct sockaddr *,
 		    struct route *ro);
@@ -494,14 +494,13 @@ tunclose(struct cdev *dev, int foo, int 
 	return (0);
 }
 
-static int
+static void
 tuninit(struct ifnet *ifp)
 {
 	struct tun_softc *tp = ifp->if_softc;
 #ifdef INET
 	struct ifaddr *ifa;
 #endif
-	int error = 0;
 
 	TUNDEBUG(ifp, "tuninit\n");
 
@@ -528,7 +527,6 @@ tuninit(struct ifnet *ifp)
 	if_addr_runlock(ifp);
 #endif
 	mtx_unlock(&tp->tun_mtx);
-	return (error);
 }
 
 /*
@@ -552,12 +550,12 @@ tunifioctl(struct ifnet *ifp, u_long cmd
 		mtx_unlock(&tp->tun_mtx);
 		break;
 	case SIOCSIFADDR:
-		error = tuninit(ifp);
-		TUNDEBUG(ifp, "address set, error=%d\n", error);
+		tuninit(ifp);
+		TUNDEBUG(ifp, "address set\n");
 		break;
 	case SIOCSIFDSTADDR:
-		error = tuninit(ifp);
-		TUNDEBUG(ifp, "destination address set, error=%d\n", error);
+		tuninit(ifp);
+		TUNDEBUG(ifp, "destination address set\n");
 		break;
 	case SIOCSIFMTU:
 		ifp->if_mtu = ifr->ifr_mtu;
@@ -857,7 +855,6 @@ tunwrite(struct cdev *dev, struct uio *u
 	struct tun_softc *tp = dev->si_drv1;
 	struct ifnet	*ifp = TUN2IFP(tp);
 	struct mbuf	*m;
-	int		error = 0;
 	uint32_t	family;
 	int 		isr;
 
@@ -877,7 +874,7 @@ tunwrite(struct cdev *dev, struct uio *u
 
 	if ((m = m_uiotombuf(uio, M_DONTWAIT, 0, 0, M_PKTHDR)) == NULL) {
 		ifp->if_ierrors++;
-		return (error);
+		return (ENOBUFS);
 	}
 
 	m->m_pkthdr.rcvif = ifp;

Modified: projects/largeSMP/sys/powerpc/aim/interrupt.c
==============================================================================
--- projects/largeSMP/sys/powerpc/aim/interrupt.c	Fri Jun  3 14:57:38 2011	(r222654)
+++ projects/largeSMP/sys/powerpc/aim/interrupt.c	Fri Jun  3 17:09:15 2011	(r222655)
@@ -100,10 +100,8 @@ powerpc_interrupt(struct trapframe *fram
 	default:
 		/* Re-enable interrupts if applicable. */
 		ee = framep->srr1 & PSL_EE;
-		if (ee != 0) {
+		if (ee != 0)
 			mtmsr(mfmsr() | ee);
-			isync();
-		}
 		trap(framep);
 	}	        
 }

Modified: projects/largeSMP/sys/powerpc/aim/locore32.S
==============================================================================
--- projects/largeSMP/sys/powerpc/aim/locore32.S	Fri Jun  3 14:57:38 2011	(r222654)
+++ projects/largeSMP/sys/powerpc/aim/locore32.S	Fri Jun  3 17:09:15 2011	(r222655)
@@ -87,9 +87,6 @@ GLOBAL(tmpstk)
 GLOBAL(esym)
 	.long	0			/* end of symbol table */
 
-GLOBAL(ofmsr)
-	.long	0, 0, 0, 0, 0		/* msr/sprg0-3 used in Open Firmware */
-
 #define	INTRCNT_COUNT	256		/* max(HROWPIC_IRQMAX,OPENPIC_IRQMAX) */
 GLOBAL(intrnames)
 	.space	INTRCNT_COUNT * (MAXCOMLEN + 1) * 2
@@ -99,16 +96,6 @@ GLOBAL(intrcnt)
 	.space	INTRCNT_COUNT * 4 * 2
 GLOBAL(eintrcnt)
 
-/*
- * File-scope for locore.S
- */
-idle_u:
-	.long	0			/* fake uarea during idle after exit */
-openfirmware_entry:
-	.long	0			/* Open Firmware entry point */
-srsave:
-	.long	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-
 	.text
 	.globl	btext
 btext:

Modified: projects/largeSMP/sys/powerpc/aim/locore64.S
==============================================================================
--- projects/largeSMP/sys/powerpc/aim/locore64.S	Fri Jun  3 14:57:38 2011	(r222654)
+++ projects/largeSMP/sys/powerpc/aim/locore64.S	Fri Jun  3 17:09:15 2011	(r222655)
@@ -75,8 +75,7 @@
         .globl  kernbase
         .set    kernbase, KERNBASE
 
-#define	TMPSTKSZ	8192		/* 8K temporary stack */
-#define	OFWSTKSZ	4096		/* 4K Open Firmware stack */
+#define	TMPSTKSZ	16384		/* 16K temporary stack */
 
 /*
  * Globals
@@ -85,14 +84,9 @@
 	.align	4
 GLOBAL(tmpstk)
 	.space	TMPSTKSZ
-GLOBAL(ofwstk)
-	.space	OFWSTKSZ
 GLOBAL(esym)
 	.llong	0			/* end of symbol table */
 
-GLOBAL(ofmsr)
-	.llong	0, 0, 0, 0, 0		/* msr/sprg0-3 used in Open Firmware */
-
 #define	INTRCNT_COUNT	256		/* max(HROWPIC_IRQMAX,OPENPIC_IRQMAX) */
 GLOBAL(intrnames)
 	.space	INTRCNT_COUNT * (MAXCOMLEN + 1) * 2
@@ -102,16 +96,6 @@ GLOBAL(intrcnt)
 	.space	INTRCNT_COUNT * 4 * 2
 GLOBAL(eintrcnt)
 
-/*
- * File-scope for locore.S
- */
-idle_u:
-	.llong	0			/* fake uarea during idle after exit */
-openfirmware_entry:
-	.llong	0			/* Open Firmware entry point */
-srsave:
-	.llong	0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-
 	.text
 	.globl	btext
 btext:
@@ -208,122 +192,6 @@ tocbase:
         .llong  .TOC.@tocbase
 
 /*
- * Open Firmware Real-mode Entry Point. This is a huge pain.
- */
-
-ASENTRY(ofw_32bit_mode_entry)
-	mflr	%r0

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106031709.p53H9FDc072633>