svn commit: r221272 - in projects/altix/sys: amd64/amd64 amd64/conf
amd64/include arm/arm arm/conf boot/i386/boot2
boot/i386/common boot/i386/zfsboot boot/ia64/common
boot/ia64/efi cam cddl/contrib...
Marcel Moolenaar
marcel at FreeBSD.org
Sat Apr 30 21:00:37 UTC 2011
Author: marcel
Date: Sat Apr 30 21:00:36 2011
New Revision: 221272
URL: http://svn.freebsd.org/changeset/base/221272
Log:
Merge svn+ssh://svn.freebsd.org/base/head@221271
Added:
projects/altix/sys/dev/ath/ath_hal/ar9001/ar9130.ini
- copied unchanged from r221271, head/sys/dev/ath/ath_hal/ar9001/ar9130.ini
projects/altix/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c
- copied unchanged from r221271, head/sys/dev/ath/ath_hal/ar9001/ar9130_attach.c
projects/altix/sys/dev/ath/ath_hal/ar9001/ar9130_eeprom.c
- copied unchanged from r221271, head/sys/dev/ath/ath_hal/ar9001/ar9130_eeprom.c
projects/altix/sys/dev/ath/ath_hal/ar9001/ar9130_eeprom.h
- copied unchanged from r221271, head/sys/dev/ath/ath_hal/ar9001/ar9130_eeprom.h
projects/altix/sys/dev/ath/ath_hal/ar9001/ar9130_phy.c
- copied unchanged from r221271, head/sys/dev/ath/ath_hal/ar9001/ar9130_phy.c
projects/altix/sys/dev/ath/ath_hal/ar9001/ar9130_phy.h
- copied unchanged from r221271, head/sys/dev/ath/ath_hal/ar9001/ar9130_phy.h
projects/altix/sys/dev/ath/ath_hal/ar9001/ar9130reg.h
- copied unchanged from r221271, head/sys/dev/ath/ath_hal/ar9001/ar9130reg.h
projects/altix/sys/dev/vxge/
- copied from r221271, head/sys/dev/vxge/
projects/altix/sys/mips/atheros/ar724x_pci.c
- copied unchanged from r221271, head/sys/mips/atheros/ar724x_pci.c
projects/altix/sys/mips/conf/PB92
- copied unchanged from r221271, head/sys/mips/conf/PB92
projects/altix/sys/mips/conf/PB92.hints
- copied unchanged from r221271, head/sys/mips/conf/PB92.hints
projects/altix/sys/modules/vxge/
- copied from r221271, head/sys/modules/vxge/
Modified:
projects/altix/sys/amd64/amd64/identcpu.c
projects/altix/sys/amd64/amd64/minidump_machdep.c
projects/altix/sys/amd64/conf/GENERIC
projects/altix/sys/amd64/include/specialreg.h
projects/altix/sys/arm/arm/dump_machdep.c
projects/altix/sys/arm/arm/minidump_machdep.c
projects/altix/sys/arm/arm/nexus.c
projects/altix/sys/arm/conf/CAMBRIA
projects/altix/sys/boot/i386/boot2/Makefile
projects/altix/sys/boot/i386/common/drv.c
projects/altix/sys/boot/i386/zfsboot/Makefile
projects/altix/sys/boot/i386/zfsboot/zfsldr.S
projects/altix/sys/boot/ia64/common/copy.c
projects/altix/sys/boot/ia64/efi/efimd.c
projects/altix/sys/cam/cam_xpt.c
projects/altix/sys/cddl/contrib/opensolaris/common/atomic/ia64/opensolaris_atomic.S
projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h
projects/altix/sys/conf/NOTES
projects/altix/sys/conf/files
projects/altix/sys/conf/kern.pre.mk
projects/altix/sys/conf/options
projects/altix/sys/contrib/pf/net/if_pflog.c
projects/altix/sys/contrib/pf/net/pf.c
projects/altix/sys/contrib/pf/net/pf_ioctl.c
projects/altix/sys/ddb/db_command.c
projects/altix/sys/ddb/db_ps.c
projects/altix/sys/dev/ath/ath_hal/ah.c
projects/altix/sys/dev/ath/ath_hal/ah_devid.h
projects/altix/sys/dev/ath/ath_hal/ah_eeprom_v14.c
projects/altix/sys/dev/ath/ath_hal/ar5416/ar2133.c
projects/altix/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c
projects/altix/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c
projects/altix/sys/dev/ath/ath_hal/ar5416/ar5416_power.c
projects/altix/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
projects/altix/sys/dev/ath/ath_hal/ar5416/ar5416reg.h
projects/altix/sys/dev/ath/if_ath.c
projects/altix/sys/dev/ath/if_ath_ahb.c
projects/altix/sys/dev/e1000/if_igb.h
projects/altix/sys/dev/fdt/fdtbus.c
projects/altix/sys/dev/ixgbe/ixgbe.h
projects/altix/sys/dev/md/md.c
projects/altix/sys/dev/pci/pci.c
projects/altix/sys/dev/puc/pucdata.c
projects/altix/sys/dev/usb/net/if_mos.c
projects/altix/sys/dev/usb/wlan/if_rum.c
projects/altix/sys/dev/watchdog/watchdog.c
projects/altix/sys/dev/xen/netfront/netfront.c
projects/altix/sys/fs/ext2fs/ext2_alloc.c
projects/altix/sys/fs/ext2fs/ext2_balloc.c
projects/altix/sys/fs/ext2fs/ext2_dinode.h
projects/altix/sys/fs/ext2fs/ext2_dir.h
projects/altix/sys/fs/ext2fs/ext2_extern.h
projects/altix/sys/fs/ext2fs/ext2_inode.c
projects/altix/sys/fs/ext2fs/ext2_lookup.c
projects/altix/sys/fs/ext2fs/ext2_readwrite.c
projects/altix/sys/fs/ext2fs/ext2_vfsops.c
projects/altix/sys/fs/ext2fs/ext2_vnops.c
projects/altix/sys/fs/ext2fs/ext2fs.h
projects/altix/sys/fs/ext2fs/inode.h
projects/altix/sys/fs/nfsclient/nfs_clvfsops.c
projects/altix/sys/i386/conf/GENERIC
projects/altix/sys/i386/i386/identcpu.c
projects/altix/sys/i386/i386/minidump_machdep.c
projects/altix/sys/i386/include/specialreg.h
projects/altix/sys/ia64/conf/ALTIX
projects/altix/sys/ia64/conf/GENERIC
projects/altix/sys/ia64/ia64/dump_machdep.c
projects/altix/sys/ia64/ia64/nexus.c
projects/altix/sys/kern/bus_if.m
projects/altix/sys/kern/kern_shutdown.c
projects/altix/sys/kern/subr_bus.c
projects/altix/sys/kern/subr_rman.c
projects/altix/sys/kern/vfs_subr.c
projects/altix/sys/mips/atheros/apb.c
projects/altix/sys/mips/atheros/ar71xx_chip.c
projects/altix/sys/mips/atheros/ar71xx_cpudef.h
projects/altix/sys/mips/atheros/ar71xx_pci.c
projects/altix/sys/mips/atheros/ar724x_chip.c
projects/altix/sys/mips/atheros/ar724xreg.h
projects/altix/sys/mips/atheros/ar91xx_chip.c
projects/altix/sys/mips/atheros/files.ar71xx
projects/altix/sys/mips/conf/AR71XX
projects/altix/sys/mips/conf/AR91XX_BASE
projects/altix/sys/mips/mips/dump_machdep.c
projects/altix/sys/mips/mips/mainbus.c
projects/altix/sys/mips/mips/nexus.c
projects/altix/sys/mips/rmi/xlr_pci.c
projects/altix/sys/modules/Makefile
projects/altix/sys/modules/ath/Makefile
projects/altix/sys/modules/ext2fs/Makefile
projects/altix/sys/modules/if_carp/Makefile
projects/altix/sys/net/if_enc.c
projects/altix/sys/net/if_lagg.c
projects/altix/sys/netinet/in_pcb.c
projects/altix/sys/netinet/ip_carp.c
projects/altix/sys/netinet/ip_icmp.c
projects/altix/sys/netinet/ip_input.c
projects/altix/sys/netinet/raw_ip.c
projects/altix/sys/netinet/sctp_asconf.c
projects/altix/sys/netinet/sctp_bsd_addr.c
projects/altix/sys/netinet/sctp_input.c
projects/altix/sys/netinet/sctp_output.c
projects/altix/sys/netinet/sctp_pcb.c
projects/altix/sys/netinet/sctp_sysctl.c
projects/altix/sys/netinet/sctp_usrreq.c
projects/altix/sys/netinet/sctp_var.h
projects/altix/sys/netinet/sctputil.c
projects/altix/sys/netinet/tcp_input.c
projects/altix/sys/netinet/tcp_output.c
projects/altix/sys/netinet/tcp_subr.c
projects/altix/sys/netinet/tcp_syncache.c
projects/altix/sys/netinet/tcp_timer.c
projects/altix/sys/netinet/tcp_timewait.c
projects/altix/sys/netinet/tcp_usrreq.c
projects/altix/sys/netinet/tcp_var.h
projects/altix/sys/netinet/udp_usrreq.c
projects/altix/sys/netinet6/in6_pcb.c
projects/altix/sys/netinet6/ip6_ipsec.c
projects/altix/sys/netinet6/sctp6_usrreq.c
projects/altix/sys/netinet6/udp6_usrreq.c
projects/altix/sys/netipsec/ipsec_input.c
projects/altix/sys/netipsec/ipsec_output.c
projects/altix/sys/netipsec/key.c
projects/altix/sys/netipsec/xform_ah.c
projects/altix/sys/netipsec/xform_esp.c
projects/altix/sys/netipsec/xform_ipcomp.c
projects/altix/sys/netipsec/xform_ipip.c
projects/altix/sys/nfsclient/nfs_vfsops.c
projects/altix/sys/pc98/conf/GENERIC
projects/altix/sys/powerpc/conf/GENERIC
projects/altix/sys/powerpc/conf/GENERIC64
projects/altix/sys/powerpc/powerpc/dump_machdep.c
projects/altix/sys/rpc/clnt.h
projects/altix/sys/rpc/clnt_rc.c
projects/altix/sys/rpc/clnt_vc.c
projects/altix/sys/rpc/rpcb_clnt.c
projects/altix/sys/sparc64/conf/GENERIC
projects/altix/sys/sun4v/conf/GENERIC
projects/altix/sys/sys/bus.h
projects/altix/sys/sys/rman.h
projects/altix/sys/sys/watchdog.h
projects/altix/sys/ufs/ffs/ffs_vnops.c
projects/altix/sys/x86/x86/dump_machdep.c
projects/altix/sys/x86/x86/nexus.c
projects/altix/sys/x86/x86/tsc.c
Directory Properties:
projects/altix/lib/libstand/ (props changed)
projects/altix/sys/ (props changed)
projects/altix/sys/amd64/include/xen/ (props changed)
projects/altix/sys/boot/i386/efi/ (props changed)
projects/altix/sys/boot/ia64/efi/ (props changed)
projects/altix/sys/boot/ia64/ski/ (props changed)
projects/altix/sys/boot/powerpc/boot1.chrp/ (props changed)
projects/altix/sys/boot/powerpc/ofw/ (props changed)
projects/altix/sys/cddl/contrib/opensolaris/ (props changed)
projects/altix/sys/conf/ (props changed)
projects/altix/sys/contrib/dev/acpica/ (props changed)
projects/altix/sys/contrib/octeon-sdk/ (props changed)
projects/altix/sys/contrib/pf/ (props changed)
projects/altix/sys/contrib/x86emu/ (props changed)
projects/altix/sys/kern/subr_busdma.c (props changed)
Modified: projects/altix/sys/amd64/amd64/identcpu.c
==============================================================================
--- projects/altix/sys/amd64/amd64/identcpu.c Sat Apr 30 20:49:00 2011 (r221271)
+++ projects/altix/sys/amd64/amd64/identcpu.c Sat Apr 30 21:00:36 2011 (r221272)
@@ -296,7 +296,7 @@ printcpuinfo(void)
"\035<b28>"
"\036<b29>"
"\037<b30>"
- "\040<b31>"
+ "\040HV" /* Hypervisor */
);
}
Modified: projects/altix/sys/amd64/amd64/minidump_machdep.c
==============================================================================
--- projects/altix/sys/amd64/amd64/minidump_machdep.c Sat Apr 30 20:49:00 2011 (r221271)
+++ projects/altix/sys/amd64/amd64/minidump_machdep.c Sat Apr 30 21:00:36 2011 (r221272)
@@ -27,6 +27,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "opt_watchdog.h"
+
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>
@@ -34,6 +36,9 @@ __FBSDID("$FreeBSD$");
#include <sys/kernel.h>
#include <sys/kerneldump.h>
#include <sys/msgbuf.h>
+#ifdef SW_WATCHDOG
+#include <sys/watchdog.h>
+#endif
#include <vm/vm.h>
#include <vm/pmap.h>
#include <machine/atomic.h>
@@ -167,6 +172,9 @@ blk_write(struct dumperinfo *di, char *p
report_progress(progress, dumpsize);
counter &= (1<<24) - 1;
}
+#ifdef SW_WATCHDOG
+ wdog_kern_pat(WD_LASTVAL);
+#endif
if (ptr) {
error = dump_write(di, ptr, 0, dumplo, len);
if (error)
Modified: projects/altix/sys/amd64/conf/GENERIC
==============================================================================
--- projects/altix/sys/amd64/conf/GENERIC Sat Apr 30 20:49:00 2011 (r221271)
+++ projects/altix/sys/amd64/conf/GENERIC Sat Apr 30 21:00:36 2011 (r221272)
@@ -34,8 +34,8 @@ options UFS_ACL # Support for access
options UFS_DIRHASH # Improve performance on big directories
options UFS_GJOURNAL # Enable gjournal-based UFS journaling
options MD_ROOT # MD is a potential root device
-options NFSCLIENT # Network Filesystem Client
-options NFSSERVER # Network Filesystem Server
+options NFSCL # New Network Filesystem Client
+options NFSD # New Network Filesystem Server
options NFSLOCKD # Network Lock Manager
options NFS_ROOT # NFS usable as /, requires NFSCLIENT
options MSDOSFS # MSDOS Filesystem
@@ -316,6 +316,7 @@ device udav # Davicom DM9601E USB
device rum # Ralink Technology RT2501USB wireless NICs
device uath # Atheros AR5523 wireless NICs
device ural # Ralink Technology RT2500USB wireless NICs
+device urtw # Realtek RTL8187B/L wireless NICs
device zyd # ZyDAS zb1211/zb1211b wireless NICs
# FireWire support
Modified: projects/altix/sys/amd64/include/specialreg.h
==============================================================================
--- projects/altix/sys/amd64/include/specialreg.h Sat Apr 30 20:49:00 2011 (r221271)
+++ projects/altix/sys/amd64/include/specialreg.h Sat Apr 30 21:00:36 2011 (r221272)
@@ -134,6 +134,7 @@
#define CPUID2_MOVBE 0x00400000
#define CPUID2_POPCNT 0x00800000
#define CPUID2_AESNI 0x02000000
+#define CPUID2_HV 0x80000000
/*
* Important bits in the Thermal and Power Management flags
Modified: projects/altix/sys/arm/arm/dump_machdep.c
==============================================================================
--- projects/altix/sys/arm/arm/dump_machdep.c Sat Apr 30 20:49:00 2011 (r221271)
+++ projects/altix/sys/arm/arm/dump_machdep.c Sat Apr 30 21:00:36 2011 (r221272)
@@ -27,6 +27,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "opt_watchdog.h"
+
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>
@@ -35,6 +37,9 @@ __FBSDID("$FreeBSD$");
#include <sys/kernel.h>
#include <sys/proc.h>
#include <sys/kerneldump.h>
+#ifdef SW_WATCHDOG
+#include <sys/watchdog.h>
+#endif
#include <vm/vm.h>
#include <vm/pmap.h>
#include <machine/elf.h>
@@ -189,6 +194,9 @@ cb_dumpdata(struct md_pa *mdp, int seqnr
cpu_tlb_flushID_SE(0);
cpu_cpwait();
}
+#ifdef SW_WATCHDOG
+ wdog_kern_pat(WD_LASTVAL);
+#endif
error = dump_write(di,
(void *)(pa - (pa & L1_ADDR_BITS)),0, dumplo, sz);
if (error)
Modified: projects/altix/sys/arm/arm/minidump_machdep.c
==============================================================================
--- projects/altix/sys/arm/arm/minidump_machdep.c Sat Apr 30 20:49:00 2011 (r221271)
+++ projects/altix/sys/arm/arm/minidump_machdep.c Sat Apr 30 21:00:36 2011 (r221272)
@@ -29,6 +29,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "opt_watchdog.h"
+
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>
@@ -36,6 +38,9 @@ __FBSDID("$FreeBSD$");
#include <sys/kernel.h>
#include <sys/kerneldump.h>
#include <sys/msgbuf.h>
+#ifdef SW_WATCHDOG
+#include <sys/watchdog.h>
+#endif
#include <vm/vm.h>
#include <vm/pmap.h>
#include <machine/pmap.h>
@@ -138,6 +143,9 @@ blk_write(struct dumperinfo *di, char *p
counter &= (1<<22) - 1;
}
+#ifdef SW_WATCHDOG
+ wdog_kern_pat(WD_LASTVAL);
+#endif
if (ptr) {
error = dump_write(di, ptr, 0, dumplo, len);
if (error)
Modified: projects/altix/sys/arm/arm/nexus.c
==============================================================================
--- projects/altix/sys/arm/arm/nexus.c Sat Apr 30 20:49:00 2011 (r221271)
+++ projects/altix/sys/arm/arm/nexus.c Sat Apr 30 21:00:36 2011 (r221272)
@@ -138,10 +138,10 @@ nexus_attach(device_t dev)
{
mem_rman.rm_start = 0;
- mem_rman.rm_end = ~0u;
+ mem_rman.rm_end = ~0ul;
mem_rman.rm_type = RMAN_ARRAY;
mem_rman.rm_descr = "I/O memory addresses";
- if (rman_init(&mem_rman) || rman_manage_region(&mem_rman, 0, ~0u))
+ if (rman_init(&mem_rman) || rman_manage_region(&mem_rman, 0, ~0))
panic("nexus_probe mem_rman");
/*
Modified: projects/altix/sys/arm/conf/CAMBRIA
==============================================================================
--- projects/altix/sys/arm/conf/CAMBRIA Sat Apr 30 20:49:00 2011 (r221271)
+++ projects/altix/sys/arm/conf/CAMBRIA Sat Apr 30 21:00:36 2011 (r221272)
@@ -144,7 +144,7 @@ device ath_rf5112
device ath_rf5413
#
#device ath_ar5416
-#options AH_SUPPORT_AR5416 # NB: for 11n descriptor format
+options AH_SUPPORT_AR5416 # NB: for 11n descriptor format
#device ath_ar9160
#device ath_ar9280
Modified: projects/altix/sys/boot/i386/boot2/Makefile
==============================================================================
--- projects/altix/sys/boot/i386/boot2/Makefile Sat Apr 30 20:49:00 2011 (r221271)
+++ projects/altix/sys/boot/i386/boot2/Makefile Sat Apr 30 21:00:36 2011 (r221272)
@@ -32,6 +32,7 @@ CFLAGS= -Os \
-mno-align-long-strings \
-mrtd \
-mregparm=3 \
+ -DUSE_XREAD \
-D${BOOT2_UFS} \
-DFLAGS=${BOOT_BOOT1_FLAGS} \
-DSIOPRT=${BOOT_COMCONSOLE_PORT} \
Modified: projects/altix/sys/boot/i386/common/drv.c
==============================================================================
--- projects/altix/sys/boot/i386/common/drv.c Sat Apr 30 20:49:00 2011 (r221271)
+++ projects/altix/sys/boot/i386/common/drv.c Sat Apr 30 21:00:36 2011 (r221272)
@@ -26,7 +26,7 @@ __FBSDID("$FreeBSD$");
#include "rbx.h"
#include "util.h"
#include "drv.h"
-#ifndef GPT
+#ifdef USE_XREAD
#include "xreadorg.h"
#endif
@@ -58,7 +58,7 @@ drvsize(struct dsk *dskp)
}
#endif /* GPT */
-#ifdef GPT
+#ifndef USE_XREAD
static struct {
uint16_t len;
uint16_t count;
@@ -66,7 +66,7 @@ static struct {
uint16_t seg;
uint64_t lba;
} packet;
-#endif /* GPT */
+#endif
int
drvread(struct dsk *dskp, void *buf, daddr_t lba, unsigned nblk)
@@ -75,7 +75,7 @@ drvread(struct dsk *dskp, void *buf, dad
if (!OPT_CHECK(RBX_QUIET))
printf("%c\b", c = c << 8 | c >> 24);
-#ifdef GPT
+#ifndef USE_XREAD
packet.len = 0x10;
packet.count = nblk;
packet.off = VTOPOFF(buf);
@@ -87,7 +87,7 @@ drvread(struct dsk *dskp, void *buf, dad
v86.edx = dskp->drive;
v86.ds = VTOPSEG(&packet);
v86.esi = VTOPOFF(&packet);
-#else /* !GPT */
+#else /* USE_XREAD */
v86.ctl = V86_ADDR | V86_CALLF | V86_FLAGS;
v86.addr = XREADORG; /* call to xread in boot1 */
v86.es = VTOPSEG(buf);
@@ -95,7 +95,7 @@ drvread(struct dsk *dskp, void *buf, dad
v86.ebx = VTOPOFF(buf);
v86.ecx = lba >> 32;
v86.edx = nblk << 8 | dskp->drive;
-#endif /* !GPT */
+#endif /* USE_XREAD */
v86int();
if (V86_CY(v86.efl)) {
printf("%s: error %u lba %u\n",
Modified: projects/altix/sys/boot/i386/zfsboot/Makefile
==============================================================================
--- projects/altix/sys/boot/i386/zfsboot/Makefile Sat Apr 30 20:49:00 2011 (r221271)
+++ projects/altix/sys/boot/i386/zfsboot/Makefile Sat Apr 30 21:00:36 2011 (r221272)
@@ -6,9 +6,6 @@ FILES= zfsboot
NM?= nm
-# A value of 0x80 enables LBA support.
-BOOT_BOOT1_FLAGS?= 0x80
-
BOOT_COMCONSOLE_PORT?= 0x3f8
BOOT_COMCONSOLE_SPEED?= 9600
B2SIOFMT?= 0x3
@@ -25,7 +22,6 @@ CFLAGS= -DBOOTPROG=\"zfsboot\" \
-mno-align-long-strings \
-mrtd \
-DBOOT2 \
- -DFLAGS=${BOOT_BOOT1_FLAGS} \
-DSIOPRT=${BOOT_COMCONSOLE_PORT} \
-DSIOFMT=${B2SIOFMT} \
-DSIOSPD=${BOOT_COMCONSOLE_SPEED} \
@@ -64,8 +60,7 @@ zfsldr.out: zfsldr.o
${LD} ${LDFLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} zfsldr.o
CLEANFILES+= zfsboot2 zfsboot.ld zfsboot.ldr zfsboot.bin zfsboot.out \
- zfsboot.o zfsboot.s zfsboot.s.tmp xreadorg.h sio.o cons.o \
- drv.o util.o
+ zfsboot.o zfsboot.s zfsboot.s.tmp sio.o cons.o drv.o util.o
# We currently allow 65536 bytes for zfsboot - in practice it could be
# any size up to 3.5Mb but keeping it fixed size simplifies zfsldr.
@@ -92,20 +87,13 @@ zfsboot.out: ${BTXCRT} zfsboot.o sio.o d
zfsboot.o: zfsboot.s
-SRCS= zfsboot.c xreadorg.h
+SRCS= zfsboot.c
-zfsboot.s: zfsboot.c xreadorg.h ${.CURDIR}/../../zfs/zfsimpl.c
+zfsboot.s: zfsboot.c ${.CURDIR}/../../zfs/zfsimpl.c
${CC} ${CFLAGS} -S -o zfsboot.s.tmp ${.CURDIR}/zfsboot.c
sed -e '/align/d' -e '/nop/d' < zfsboot.s.tmp > zfsboot.s
rm -f zfsboot.s.tmp
-xreadorg.h: zfsldr.out
- ${NM} -t d ${.ALLSRC} | awk '/([0-9])+ T xread/ \
- { x = $$1 - ORG1; \
- printf("#define XREADORG %#x\n", REL1 + x) }' \
- ORG1=`printf "%d" ${ORG1}` \
- REL1=`printf "%d" ${REL1}` > ${.TARGET}
-
.if ${MACHINE_CPUARCH} == "amd64"
beforedepend zfsboot.s: machine
CLEANFILES+= machine
Modified: projects/altix/sys/boot/i386/zfsboot/zfsldr.S
==============================================================================
--- projects/altix/sys/boot/i386/zfsboot/zfsldr.S Sat Apr 30 20:49:00 2011 (r221271)
+++ projects/altix/sys/boot/i386/zfsboot/zfsldr.S Sat Apr 30 21:00:36 2011 (r221272)
@@ -30,16 +30,12 @@
.set PRT_NUM,0x4 # Partitions
.set PRT_BSD,0xa5 # Partition type
-/* Flag Bits */
- .set FL_PACKET,0x80 # Packet mode
-
/* Misc. Constants */
.set SIZ_PAG,0x1000 # Page size
.set SIZ_SEC,0x200 # Sector size
.set NSECT,0x80
.globl start
- .globl xread
.code16
start: jmp main # Start recognizably
@@ -49,7 +45,7 @@ start: jmp main # Start recognizably
* FAT disks have this at the start of their MBR. While normal BIOS's will
* work fine without this section, IBM's El Torito emulation "fixes" up the
* BPB by writing into the memory copy of the MBR. Rather than have data
- * written into our xread routine, we'll define a BPB to work around it.
+ * written into our code, we'll define a BPB to work around it.
* The data marked with (T) indicates a field required for a ThinkPad to
* recognize the disk and (W) indicates fields written from IBM BIOS code.
* The use of the BPB is based on what OpenBSD and NetBSD implemented in
@@ -80,34 +76,7 @@ ebpb: .byte 0 # BIOS physical drive nu
.org 0x25,0x90
/*
- * Trampoline used by boot2 to call read to read data from the disk via
- * the BIOS. Call with:
- *
- * %ecx:%eax - long - LBA to read in
- * %es:(%bx) - caddr_t - buffer to read data into
- * %dl - byte - drive to read from
- * %dh - byte - num sectors to read
- */
-
-xread: push %ss # Address
- pop %ds # data
-/*
- * Setup an EDD disk packet and pass it to read
- */
-xread.1: pushl %ecx # Starting absolute block
- pushl %eax # block number
- push %es # Address of
- push %bx # transfer buffer
- xor %ax,%ax # Number of
- movb %dh,%al # blocks to
- push %ax # transfer
- push $0x10 # Size of packet
- mov %sp,%bp # Packet pointer
- callw read # Read from disk
- lea 0x10(%bp),%sp # Clear stack
- lret # To far caller
-/*
- * Load the rest of boot2 and BTX up, copy the parts to the right locations,
+ * Load the rest of zfsboot2 and BTX up, copy the parts to the right locations,
* and start it all up.
*/
@@ -181,7 +150,7 @@ main.4: xor %dx,%dx # Partition:drive
* itself to 0x9000 - doing it in this order means that none of the
* memcpy regions overlap which would corrupt the copy. Normally, BTX
* clients start at MEM_USR, or 0xa000, but when we use btxld to
- * create boot2, we use an entry point of 0x2000. That entry point is
+ * create zfsboot2, we use an entry point of 0x2000. That entry point is
* relative to MEM_USR; thus boot2.bin starts at 0xc000.
*
* The load area and the target area for the client overlap so we have
@@ -241,15 +210,29 @@ seta20.3: sti # Enable interrupts
/*
- * Trampoline used to call read from within boot1.
+ * Trampoline used to call read from within zfsldr. Sets up an EDD
+ * packet on the stack and passes it to read.
+ *
+ * %eax - int - LBA to read in relative to partition start
+ * %dl - byte - drive to read from
+ * %dh - byte - num sectors to read
+ * %si - ptr - MBR partition entry
*/
nread: xor %eax,%eax # Sector offset in partition
-nread.1: mov $MEM_BUF,%bx # Transfer buffer
- xor %ecx,%ecx # Get
+nread.1: xor %ecx,%ecx # Get
addl 0x8(%si),%eax # LBA
adc $0,%ecx
- push %cs # Read from
- callw xread.1 # disk
+ pushl %ecx # Starting absolute block
+ pushl %eax # block number
+ push %es # Address of
+ push $MEM_BUF # transfer buffer
+ xor %ax,%ax # Number of
+ movb %dh,%al # blocks to
+ push %ax # transfer
+ push $0x10 # Size of packet
+ mov %sp,%bp # Packet pointer
+ callw read # Read from disk
+ lea 0x10(%bp),%sp # Clear stack
jnc return # If success, return
mov $msg_read,%si # Otherwise, set the error
# message and fall through to
@@ -293,9 +276,7 @@ return: retw # To caller
* %dl - byte - drive number
* stack - 10 bytes - EDD Packet
*/
-read: testb $FL_PACKET,%cs:MEM_REL+flags-start # LBA support enabled?
- jz read.1 # No, use CHS
- cmpb $0x80,%dl # Hard drive?
+read: cmpb $0x80,%dl # Hard drive?
jb read.1 # No, use CHS
mov $0x55aa,%bx # Magic
push %dx # Save
@@ -311,73 +292,9 @@ read: testb $FL_PACKET,%cs:MEM_REL+flag
movb $0x42,%ah # BIOS: Extended
int $0x13 # read
retw # To caller
-#if 0
-read.1: push %dx # Save
- movb $0x8,%ah # BIOS: Get drive
- int $0x13 # parameters
- movb %dh,%ch # Max head number
- pop %dx # Restore
- jc return # If error
- andb $0x3f,%cl # Sectors per track
- jz ereturn # If zero
- cli # Disable interrupts
- mov 0x8(%bp),%eax # Get LBA
- push %dx # Save
- movzbl %cl,%ebx # Divide by
- xor %edx,%edx # sectors
- div %ebx # per track
- movb %ch,%bl # Max head number
- movb %dl,%ch # Sector number
- inc %bx # Divide by
- xorb %dl,%dl # number
- div %ebx # of heads
- movb %dl,%bh # Head number
- pop %dx # Restore
- cmpl $0x3ff,%eax # Cylinder number supportable?
- sti # Enable interrupts
- ja ereturn # No, return an error
- xchgb %al,%ah # Set up cylinder
- rorb $0x2,%al # number
- orb %ch,%al # Merge
- inc %ax # sector
- xchg %ax,%cx # number
- movb %bh,%dh # Head number
- subb %ah,%al # Sectors this track
- mov 0x2(%bp),%ah # Blocks to read
- cmpb %ah,%al # To read
- jb read.2 # this
-#ifdef TRACK_AT_A_TIME
- movb %ah,%al # track
-#else
- movb $1,%al # one sector
-#endif
-read.2: mov $0x5,%di # Try count
-read.3: les 0x4(%bp),%bx # Transfer buffer
- push %ax # Save
- movb $0x2,%ah # BIOS: Read
- int $0x13 # from disk
- pop %bx # Restore
- jnc read.4 # If success
- dec %di # Retry?
- jz read.6 # No
- xorb %ah,%ah # BIOS: Reset
- int $0x13 # disk system
- xchg %bx,%ax # Block count
- jmp read.3 # Continue
-read.4: movzbw %bl,%ax # Sectors read
- add %ax,0x8(%bp) # Adjust
- jnc read.5 # LBA,
- incw 0xa(%bp) # transfer
-read.5: shlb %bl # buffer
- add %bl,0x5(%bp) # pointer,
- sub %al,0x2(%bp) # block count
- ja read.1 # If not done
-read.6: retw # To caller
-#else
read.1: mov $msg_chs,%si
jmp error
msg_chs: .asciz "CHS not supported"
-#endif
/* Messages */
@@ -386,8 +303,6 @@ msg_part: .asciz "Boot"
prompt: .asciz " error\r\n"
-flags: .byte FLAGS # Flags
-
.org PRT_OFF,0x90
/* Partition table */
Modified: projects/altix/sys/boot/ia64/common/copy.c
==============================================================================
--- projects/altix/sys/boot/ia64/common/copy.c Sat Apr 30 20:49:00 2011 (r221271)
+++ projects/altix/sys/boot/ia64/common/copy.c Sat Apr 30 21:00:36 2011 (r221272)
@@ -29,6 +29,7 @@ __FBSDID("$FreeBSD$");
#include <stand.h>
#include <machine/param.h>
+#include <machine/pte.h>
#include "libia64.h"
@@ -40,6 +41,7 @@ uint32_t ia64_pgtblsz;
static int
pgtbl_extend(u_int idx)
{
+ vm_paddr_t pa;
uint64_t *pgtbl;
uint32_t pgtblsz;
u_int pot;
@@ -65,9 +67,10 @@ pgtbl_extend(u_int idx)
pgtblsz <<= 1;
/* Allocate naturally aligned memory. */
- pgtbl = (void *)ia64_platform_alloc(0, pgtblsz);
- if (pgtbl == NULL)
+ pa = ia64_platform_alloc(0, pgtblsz);
+ if (pa == ~0UL)
return (ENOMEM);
+ pgtbl = (void *)pa;
/* Initialize new page table. */
if (ia64_pgtbl != NULL && ia64_pgtbl != pgtbl)
@@ -85,7 +88,7 @@ pgtbl_extend(u_int idx)
void *
ia64_va2pa(vm_offset_t va, size_t *len)
{
- uint64_t pa;
+ uint64_t pa, pte;
u_int idx, ofs;
int error;
@@ -111,16 +114,18 @@ ia64_va2pa(vm_offset_t va, size_t *len)
}
ofs = va & IA64_PBVM_PAGE_MASK;
- pa = ia64_pgtbl[idx];
- if (pa == 0) {
+ pte = ia64_pgtbl[idx];
+ if ((pte & PTE_PRESENT) == 0) {
pa = ia64_platform_alloc(va - ofs, IA64_PBVM_PAGE_SIZE);
- if (pa == 0) {
+ if (pa == ~0UL) {
error = ENOMEM;
goto fail;
}
- ia64_pgtbl[idx] = pa;
+ pte = PTE_AR_RWX | PTE_DIRTY | PTE_ACCESSED | PTE_PRESENT;
+ pte |= (pa & PTE_PPN_MASK);
+ ia64_pgtbl[idx] = pte;
}
- pa += ofs;
+ pa = (pte & PTE_PPN_MASK) + ofs;
/* We can not cross page boundaries (in general). */
if (*len + ofs > IA64_PBVM_PAGE_SIZE)
Modified: projects/altix/sys/boot/ia64/efi/efimd.c
==============================================================================
--- projects/altix/sys/boot/ia64/efi/efimd.c Sat Apr 30 20:49:00 2011 (r221271)
+++ projects/altix/sys/boot/ia64/efi/efimd.c Sat Apr 30 21:00:36 2011 (r221272)
@@ -90,6 +90,10 @@ ia64_efi_memmap_update(void)
return (TRUE);
}
+/*
+ * Returns 0 on failure. Successful allocations return an address
+ * larger or equal to IA64_EFI_ALLOC_BOUNDARY.
+ */
static vm_paddr_t
ia64_efi_alloc(vm_size_t sz)
{
@@ -144,11 +148,12 @@ ia64_efi_alloc(vm_size_t sz)
vm_paddr_t
ia64_platform_alloc(vm_offset_t va, vm_size_t sz)
{
+ vm_paddr_t pa;
if (va == 0) {
/* Page table itself. */
if (sz > IA64_EFI_PGTBLSZ_MAX)
- return (0);
+ return (~0UL);
if (ia64_efi_pgtbl == 0)
ia64_efi_pgtbl = ia64_efi_alloc(IA64_EFI_PGTBLSZ_MAX);
if (ia64_efi_pgtbl != 0)
@@ -156,7 +161,7 @@ ia64_platform_alloc(vm_offset_t va, vm_s
return (ia64_efi_pgtbl);
} else if (va < IA64_PBVM_BASE) {
/* Should not happen. */
- return (0);
+ return (~0UL);
}
/* Loader virtual memory page. */
@@ -169,7 +174,8 @@ ia64_platform_alloc(vm_offset_t va, vm_s
return (ia64_efi_chunk + va);
/* Allocate a page at a time when we go beyond the chunk. */
- return (ia64_efi_alloc(sz));
+ pa = ia64_efi_alloc(sz);
+ return ((pa == 0) ? ~0UL : pa);
}
void
Modified: projects/altix/sys/cam/cam_xpt.c
==============================================================================
--- projects/altix/sys/cam/cam_xpt.c Sat Apr 30 20:49:00 2011 (r221271)
+++ projects/altix/sys/cam/cam_xpt.c Sat Apr 30 21:00:36 2011 (r221272)
@@ -2328,19 +2328,18 @@ xpt_action(union ccb *start_ccb)
void
xpt_action_default(union ccb *start_ccb)
{
+#ifdef CAMDEBUG
+ char cdb_str[(SCSI_MAX_CDBLEN * 3) + 1];
+#endif
+ struct cam_path *path;
- CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("xpt_action_default\n"));
+ path = start_ccb->ccb_h.path;
+ CAM_DEBUG(path, CAM_DEBUG_TRACE, ("xpt_action_default\n"));
switch (start_ccb->ccb_h.func_code) {
case XPT_SCSI_IO:
{
struct cam_ed *device;
-#ifdef CAMDEBUG
- char cdb_str[(SCSI_MAX_CDBLEN * 3) + 1];
- struct cam_path *path;
-
- path = start_ccb->ccb_h.path;
-#endif
/*
* For the sake of compatibility with SCSI-1
@@ -2358,7 +2357,7 @@ xpt_action_default(union ccb *start_ccb)
* This means that this code will be exercised while probing
* devices with an ANSI revision greater than 2.
*/
- device = start_ccb->ccb_h.path->device;
+ device = path->device;
if (device->protocol_version <= SCSI_REV_2
&& start_ccb->ccb_h.target_lun < 8
&& (start_ccb->ccb_h.flags & CAM_CDB_POINTER) == 0) {
@@ -2382,13 +2381,16 @@ xpt_action_default(union ccb *start_ccb)
case XPT_ATA_IO:
if (start_ccb->ccb_h.func_code == XPT_ATA_IO) {
start_ccb->ataio.resid = 0;
+ CAM_DEBUG(path, CAM_DEBUG_CDB,("%s. ACB: %s\n",
+ ata_op_string(&start_ccb->ataio.cmd),
+ ata_cmd_string(&start_ccb->ataio.cmd,
+ cdb_str, sizeof(cdb_str))));
}
/* FALLTHROUGH */
case XPT_RESET_DEV:
case XPT_ENG_EXEC:
case XPT_SMP_IO:
{
- struct cam_path *path = start_ccb->ccb_h.path;
int frozen;
frozen = cam_ccbq_insert_ccb(&path->device->ccbq, start_ccb);
@@ -2427,7 +2429,7 @@ xpt_action_default(union ccb *start_ccb)
break;
}
#endif
- sim = start_ccb->ccb_h.path->bus->sim;
+ sim = path->bus->sim;
(*(sim->sim_action))(sim, start_ccb);
break;
}
@@ -2495,7 +2497,7 @@ xpt_action_default(union ccb *start_ccb)
{
struct cam_sim *sim;
- sim = start_ccb->ccb_h.path->bus->sim;
+ sim = path->bus->sim;
(*(sim->sim_action))(sim, start_ccb);
break;
}
@@ -2503,20 +2505,19 @@ xpt_action_default(union ccb *start_ccb)
{
struct cam_sim *sim;
- sim = start_ccb->ccb_h.path->bus->sim;
+ sim = path->bus->sim;
(*(sim->sim_action))(sim, start_ccb);
break;
}
case XPT_PATH_STATS:
- start_ccb->cpis.last_reset =
- start_ccb->ccb_h.path->bus->last_reset;
+ start_ccb->cpis.last_reset = path->bus->last_reset;
start_ccb->ccb_h.status = CAM_REQ_CMP;
break;
case XPT_GDEV_TYPE:
{
struct cam_ed *dev;
- dev = start_ccb->ccb_h.path->device;
+ dev = path->device;
if ((dev->flags & CAM_DEV_UNCONFIGURED) != 0) {
start_ccb->ccb_h.status = CAM_DEV_NOT_THERE;
} else {
@@ -2540,7 +2541,7 @@ xpt_action_default(union ccb *start_ccb)
{
struct cam_ed *dev;
- dev = start_ccb->ccb_h.path->device;
+ dev = path->device;
if ((dev->flags & CAM_DEV_UNCONFIGURED) != 0) {
start_ccb->ccb_h.status = CAM_DEV_NOT_THERE;
} else {
@@ -2549,8 +2550,8 @@ xpt_action_default(union ccb *start_ccb)
struct cam_et *tar;
cgds = &start_ccb->cgds;
- bus = cgds->ccb_h.path->bus;
- tar = cgds->ccb_h.path->target;
+ bus = path->bus;
+ tar = path->target;
cgds->dev_openings = dev->ccbq.dev_openings;
cgds->dev_active = dev->ccbq.dev_active;
cgds->devq_openings = dev->ccbq.devq_openings;
@@ -2580,7 +2581,7 @@ xpt_action_default(union ccb *start_ccb)
/*
* Don't want anyone mucking with our data.
*/
- device = start_ccb->ccb_h.path->device;
+ device = path->device;
periph_head = &device->periphs;
cgdl = &start_ccb->cgdl;
@@ -2697,7 +2698,7 @@ xpt_action_default(union ccb *start_ccb)
csa = &start_ccb->csa;
added = csa->event_enable;
- async_head = &csa->ccb_h.path->device->asyncs;
+ async_head = &path->device->asyncs;
/*
* If there is already an entry for us, simply
@@ -2720,7 +2721,7 @@ xpt_action_default(union ccb *start_ccb)
if (csa->event_enable == 0) {
SLIST_REMOVE(async_head, cur_entry,
async_node, links);
- xpt_release_device(csa->ccb_h.path->device);
+ xpt_release_device(path->device);
free(cur_entry, M_CAMXPT);
} else {
cur_entry->event_enable = csa->event_enable;
@@ -2737,7 +2738,7 @@ xpt_action_default(union ccb *start_ccb)
cur_entry->callback_arg = csa->callback_arg;
cur_entry->callback = csa->callback;
SLIST_INSERT_HEAD(async_head, cur_entry, links);
- xpt_acquire_device(csa->ccb_h.path->device);
+ xpt_acquire_device(path->device);
}
start_ccb->ccb_h.status = CAM_REQ_CMP;
break;
@@ -2748,7 +2749,7 @@ xpt_action_default(union ccb *start_ccb)
struct cam_ed *dev;
crs = &start_ccb->crs;
- dev = crs->ccb_h.path->device;
+ dev = path->device;
if (dev == NULL) {
crs->ccb_h.status = CAM_DEV_NOT_THERE;
@@ -2760,11 +2761,11 @@ xpt_action_default(union ccb *start_ccb)
if (INQ_DATA_TQ_ENABLED(&dev->inq_data)) {
/* Don't ever go below one opening */
if (crs->openings > 0) {
- xpt_dev_ccbq_resize(crs->ccb_h.path,
+ xpt_dev_ccbq_resize(path,
crs->openings);
if (bootverbose) {
- xpt_print(crs->ccb_h.path,
+ xpt_print(path,
"tagged openings now %d\n",
crs->openings);
}
@@ -2826,7 +2827,7 @@ xpt_action_default(union ccb *start_ccb)
}
if ((start_ccb->ccb_h.flags & CAM_DEV_QFREEZE) == 0) {
- xpt_release_devq_rl(crs->ccb_h.path, /*runlevel*/
+ xpt_release_devq_rl(path, /*runlevel*/
(crs->release_flags & RELSIM_RELEASE_RUNLEVEL) ?
crs->release_timeout : 0,
/*count*/1, /*run_queue*/TRUE);
@@ -2872,7 +2873,7 @@ xpt_action_default(union ccb *start_ccb)
{
struct ccb_relsim *crs = &start_ccb->crs;
- xpt_freeze_devq_rl(crs->ccb_h.path, /*runlevel*/
+ xpt_freeze_devq_rl(path, /*runlevel*/
(crs->release_flags & RELSIM_RELEASE_RUNLEVEL) ?
crs->release_timeout : 0, /*count*/1);
start_ccb->ccb_h.status = CAM_REQ_CMP;
@@ -2880,7 +2881,7 @@ xpt_action_default(union ccb *start_ccb)
}
case XPT_NOOP:
if ((start_ccb->ccb_h.flags & CAM_DEV_QFREEZE) != 0)
- xpt_freeze_devq(start_ccb->ccb_h.path, 1);
+ xpt_freeze_devq(path, 1);
start_ccb->ccb_h.status = CAM_REQ_CMP;
break;
default:
Modified: projects/altix/sys/cddl/contrib/opensolaris/common/atomic/ia64/opensolaris_atomic.S
==============================================================================
--- projects/altix/sys/cddl/contrib/opensolaris/common/atomic/ia64/opensolaris_atomic.S Sat Apr 30 20:49:00 2011 (r221271)
+++ projects/altix/sys/cddl/contrib/opensolaris/common/atomic/ia64/opensolaris_atomic.S Sat Apr 30 21:00:36 2011 (r221272)
@@ -39,7 +39,7 @@ ENTRY(atomic_cas_32, 3)
cmpxchg4.acq r8 = [r32], r34, ar.ccv
;;
br.ret.sptk rp
-END(atomic_cas_64)
+END(atomic_cas_32)
/*
* uint64_t atomic_cas_64(volatile uint64_t *p, uint64_t cmp, uint64_t v)
Modified: projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
==============================================================================
--- projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Sat Apr 30 20:49:00 2011 (r221271)
+++ projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Sat Apr 30 21:00:36 2011 (r221272)
@@ -21,6 +21,9 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
*/
+/*
+ * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+ */
#include <sys/dmu.h>
#include <sys/dmu_impl.h>
@@ -851,61 +854,6 @@ guid_compare(const void *arg1, const voi
return (0);
}
-/*
- * This function is a callback used by dmu_objset_find() (which
- * enumerates the object sets) to build an avl tree that maps guids
- * to datasets. The resulting table is used when processing DRR_WRITE_BYREF
- * send stream records. These records, which are used in dedup'ed
- * streams, do not contain data themselves, but refer to a copy
- * of the data block that has already been written because it was
- * earlier in the stream. That previous copy is identified by the
- * guid of the dataset with the referenced data.
- */
-int
-find_ds_by_guid(const char *name, void *arg)
-{
- avl_tree_t *guid_map = arg;
- dsl_dataset_t *ds, *snapds;
- guid_map_entry_t *gmep;
- dsl_pool_t *dp;
- int err;
- uint64_t lastobj, firstobj;
-
- if (dsl_dataset_hold(name, FTAG, &ds) != 0)
- return (0);
-
- dp = ds->ds_dir->dd_pool;
- rw_enter(&dp->dp_config_rwlock, RW_READER);
- firstobj = ds->ds_dir->dd_phys->dd_origin_obj;
- lastobj = ds->ds_phys->ds_prev_snap_obj;
-
- while (lastobj != firstobj) {
- err = dsl_dataset_hold_obj(dp, lastobj, guid_map, &snapds);
- if (err) {
- /*
- * Skip this snapshot and move on. It's not
- * clear why this would ever happen, but the
- * remainder of the snapshot streadm can be
- * processed.
- */
- rw_exit(&dp->dp_config_rwlock);
- dsl_dataset_rele(ds, FTAG);
- return (0);
- }
-
- gmep = kmem_alloc(sizeof (guid_map_entry_t), KM_SLEEP);
- gmep->guid = snapds->ds_phys->ds_guid;
- gmep->gme_ds = snapds;
- avl_add(guid_map, gmep);
- lastobj = snapds->ds_phys->ds_prev_snap_obj;
- }
-
- rw_exit(&dp->dp_config_rwlock);
- dsl_dataset_rele(ds, FTAG);
-
- return (0);
-}
-
static void
free_guid_map_onexit(void *arg)
{
@@ -1413,9 +1361,6 @@ dmu_recv_stream(dmu_recv_cookie_t *drc,
avl_create(ra.guid_to_ds_map, guid_compare,
sizeof (guid_map_entry_t),
offsetof(guid_map_entry_t, avlnode));
- (void) dmu_objset_find(drc->drc_top_ds, find_ds_by_guid,
- (void *)ra.guid_to_ds_map,
- DS_FIND_CHILDREN);
ra.err = zfs_onexit_add_cb(minor,
free_guid_map_onexit, ra.guid_to_ds_map,
action_handlep);
@@ -1427,6 +1372,8 @@ dmu_recv_stream(dmu_recv_cookie_t *drc,
if (ra.err)
goto out;
}
+
+ drc->drc_guid_to_ds_map = ra.guid_to_ds_map;
}
/*
@@ -1565,6 +1512,30 @@ recv_end_sync(void *arg1, void *arg2, dm
}
static int
+add_ds_to_guidmap(avl_tree_t *guid_map, dsl_dataset_t *ds)
+{
+ dsl_pool_t *dp = ds->ds_dir->dd_pool;
+ uint64_t snapobj = ds->ds_phys->ds_prev_snap_obj;
+ dsl_dataset_t *snapds;
+ guid_map_entry_t *gmep;
+ int err;
+
+ ASSERT(guid_map != NULL);
+
+ rw_enter(&dp->dp_config_rwlock, RW_READER);
+ err = dsl_dataset_hold_obj(dp, snapobj, guid_map, &snapds);
+ if (err == 0) {
+ gmep = kmem_alloc(sizeof (guid_map_entry_t), KM_SLEEP);
+ gmep->guid = snapds->ds_phys->ds_guid;
+ gmep->gme_ds = snapds;
+ avl_add(guid_map, gmep);
+ }
+
+ rw_exit(&dp->dp_config_rwlock);
+ return (err);
+}
+
+static int
dmu_recv_existing_end(dmu_recv_cookie_t *drc)
{
struct recvendsyncarg resa;
@@ -1604,6 +1575,8 @@ dmu_recv_existing_end(dmu_recv_cookie_t
out:
mutex_exit(&ds->ds_recvlock);
+ if (err == 0 && drc->drc_guid_to_ds_map != NULL)
+ (void) add_ds_to_guidmap(drc->drc_guid_to_ds_map, ds);
dsl_dataset_disown(ds, dmu_recv_tag);
(void) dsl_dataset_destroy(drc->drc_real_ds, dmu_recv_tag, B_FALSE);
return (err);
@@ -1633,6 +1606,8 @@ dmu_recv_new_end(dmu_recv_cookie_t *drc)
/* clean up the fs we just recv'd into */
(void) dsl_dataset_destroy(ds, dmu_recv_tag, B_FALSE);
} else {
+ if (drc->drc_guid_to_ds_map != NULL)
+ (void) add_ds_to_guidmap(drc->drc_guid_to_ds_map, ds);
/* release the hold from dmu_recv_begin */
dsl_dataset_disown(ds, dmu_recv_tag);
}
Modified: projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h
==============================================================================
--- projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Sat Apr 30 20:49:00 2011 (r221271)
+++ projects/altix/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h Sat Apr 30 21:00:36 2011 (r221272)
@@ -21,6 +21,9 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
*/
+/*
+ * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+ */
/* Portions Copyright 2010 Robert Milkowski */
@@ -718,6 +721,7 @@ typedef struct dmu_recv_cookie {
char *drc_top_ds;
boolean_t drc_newfs;
boolean_t drc_force;
+ struct avl_tree *drc_guid_to_ds_map;
} dmu_recv_cookie_t;
int dmu_recv_begin(char *tofs, char *tosnap, char *topds, struct drr_begin *,
Modified: projects/altix/sys/conf/NOTES
==============================================================================
--- projects/altix/sys/conf/NOTES Sat Apr 30 20:49:00 2011 (r221271)
+++ projects/altix/sys/conf/NOTES Sat Apr 30 21:00:36 2011 (r221272)
@@ -2094,6 +2094,7 @@ device nxge # Neterion Xframe 10GbE Se
device ti # Alteon Networks Tigon I/II gigabit Ethernet
device txp # 3Com 3cR990 (``Typhoon'')
device vx # 3Com 3c590, 3c595 (``Vortex'')
+device vxge # Exar/Neterion XFrame 3100 10GbE
# PCI FDDI NICs.
device fpa
@@ -2729,6 +2730,9 @@ device uath
# Ralink Technology RT2500USB wireless driver
device ural
#
+# Realtek RTL8187B/L wireless driver
+device urtw
+#
# ZyDas ZD1211/ZD1211B wireless driver
device zyd
Modified: projects/altix/sys/conf/files
==============================================================================
--- projects/altix/sys/conf/files Sat Apr 30 20:49:00 2011 (r221271)
+++ projects/altix/sys/conf/files Sat Apr 30 21:00:36 2011 (r221272)
@@ -757,6 +757,14 @@ dev/ath/ath_hal/ar5416/ar5416_reset.c \
dev/ath/ath_hal/ar5416/ar5416_xmit.c \
optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
+# ar9130 (depends upon ar5416) - also requires AH_SUPPORT_AR9130
+dev/ath/ath_hal/ar9001/ar9130_attach.c optional ath_hal | ath_ar9130 \
+ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
+dev/ath/ath_hal/ar9001/ar9130_phy.c optional ath_hal | ath_ar9130 \
+ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
+dev/ath/ath_hal/ar9001/ar9130_eeprom.c optional ath_hal | ath_ar9130 \
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list