Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Oct 2010 15:58:31 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r214350 - in user/nwhitehorn/ps3: amd64/amd64 amd64/include arm/at91 arm/econa arm/mv arm/xscale/ixp425 boot/common boot/i386/boot2 boot/pc98/boot2 cam cam/ata cam/scsi cddl/contrib/ope...
Message-ID:  <201010251558.o9PFwV8K070279@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nwhitehorn
Date: Mon Oct 25 15:58:31 2010
New Revision: 214350
URL: http://svn.freebsd.org/changeset/base/214350

Log:
  IFC @ r214349

Added:
  user/nwhitehorn/ps3/dev/iicbus/ds1775.c
     - copied unchanged from r214349, head/sys/dev/iicbus/ds1775.c
  user/nwhitehorn/ps3/dev/iicbus/max6690.c
     - copied unchanged from r214349, head/sys/dev/iicbus/max6690.c
  user/nwhitehorn/ps3/dev/xen/control/
     - copied from r214349, head/sys/dev/xen/control/
  user/nwhitehorn/ps3/net/if_debug.c
     - copied unchanged from r214349, head/sys/net/if_debug.c
  user/nwhitehorn/ps3/net80211/ieee80211_ratectl_none.c
     - copied unchanged from r214349, head/sys/net80211/ieee80211_ratectl_none.c
  user/nwhitehorn/ps3/netinet/in_debug.c
     - copied unchanged from r214349, head/sys/netinet/in_debug.c
  user/nwhitehorn/ps3/nfs/nfs_mountcommon.h
     - copied unchanged from r214349, head/sys/nfs/nfs_mountcommon.h
  user/nwhitehorn/ps3/powerpc/powermac/fcu.c
     - copied unchanged from r214349, head/sys/powerpc/powermac/fcu.c
  user/nwhitehorn/ps3/xen/blkif.h
     - copied unchanged from r214349, head/sys/xen/blkif.h
  user/nwhitehorn/ps3/xen/xenbus/xenbus.c
     - copied unchanged from r214349, head/sys/xen/xenbus/xenbus.c
  user/nwhitehorn/ps3/xen/xenbus/xenbusb.c
     - copied unchanged from r214349, head/sys/xen/xenbus/xenbusb.c
  user/nwhitehorn/ps3/xen/xenbus/xenbusb.h
     - copied unchanged from r214349, head/sys/xen/xenbus/xenbusb.h
  user/nwhitehorn/ps3/xen/xenbus/xenbusb_back.c
     - copied unchanged from r214349, head/sys/xen/xenbus/xenbusb_back.c
  user/nwhitehorn/ps3/xen/xenbus/xenbusb_front.c
     - copied unchanged from r214349, head/sys/xen/xenbus/xenbusb_front.c
  user/nwhitehorn/ps3/xen/xenbus/xenbusb_if.m
     - copied unchanged from r214349, head/sys/xen/xenbus/xenbusb_if.m
  user/nwhitehorn/ps3/xen/xenstore/
     - copied from r214349, head/sys/xen/xenstore/
Deleted:
  user/nwhitehorn/ps3/xen/reboot.c
  user/nwhitehorn/ps3/xen/xenbus/init.txt
  user/nwhitehorn/ps3/xen/xenbus/xenbus_client.c
  user/nwhitehorn/ps3/xen/xenbus/xenbus_comms.c
  user/nwhitehorn/ps3/xen/xenbus/xenbus_comms.h
  user/nwhitehorn/ps3/xen/xenbus/xenbus_dev.c
  user/nwhitehorn/ps3/xen/xenbus/xenbus_probe.c
  user/nwhitehorn/ps3/xen/xenbus/xenbus_probe_backend.c
  user/nwhitehorn/ps3/xen/xenbus/xenbus_xs.c
Modified:
  user/nwhitehorn/ps3/amd64/amd64/fpu.c
  user/nwhitehorn/ps3/amd64/amd64/pmap.c
  user/nwhitehorn/ps3/amd64/include/profile.h
  user/nwhitehorn/ps3/arm/at91/if_ate.c
  user/nwhitehorn/ps3/arm/at91/if_macb.c
  user/nwhitehorn/ps3/arm/econa/if_ece.c
  user/nwhitehorn/ps3/arm/mv/mv_sata.c
  user/nwhitehorn/ps3/arm/xscale/ixp425/if_npe.c
  user/nwhitehorn/ps3/boot/common/gpt.c
  user/nwhitehorn/ps3/boot/i386/boot2/boot2.c
  user/nwhitehorn/ps3/boot/pc98/boot2/boot2.c
  user/nwhitehorn/ps3/cam/ata/ata_da.c
  user/nwhitehorn/ps3/cam/cam_xpt.c
  user/nwhitehorn/ps3/cam/scsi/scsi_da.c
  user/nwhitehorn/ps3/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
  user/nwhitehorn/ps3/compat/linux/linux_util.h
  user/nwhitehorn/ps3/conf/files
  user/nwhitehorn/ps3/conf/files.amd64
  user/nwhitehorn/ps3/conf/files.powerpc
  user/nwhitehorn/ps3/dev/acpica/acpi.c
  user/nwhitehorn/ps3/dev/acpica/acpi_if.m
  user/nwhitehorn/ps3/dev/acpica/acpi_pci.c
  user/nwhitehorn/ps3/dev/ae/if_ae.c
  user/nwhitehorn/ps3/dev/ae/if_aevar.h
  user/nwhitehorn/ps3/dev/age/if_age.c
  user/nwhitehorn/ps3/dev/ahci/ahci.c
  user/nwhitehorn/ps3/dev/aic7xxx/aicasm/aicasm_macro_scan.l
  user/nwhitehorn/ps3/dev/aic7xxx/aicasm/aicasm_scan.l
  user/nwhitehorn/ps3/dev/alc/if_alc.c
  user/nwhitehorn/ps3/dev/ale/if_ale.c
  user/nwhitehorn/ps3/dev/ata/ata-all.c
  user/nwhitehorn/ps3/dev/ata/ata-all.h
  user/nwhitehorn/ps3/dev/ata/ata-pci.c
  user/nwhitehorn/ps3/dev/ata/ata-sata.c
  user/nwhitehorn/ps3/dev/ata/chipsets/ata-ahci.c
  user/nwhitehorn/ps3/dev/ata/chipsets/ata-intel.c
  user/nwhitehorn/ps3/dev/ata/chipsets/ata-marvell.c
  user/nwhitehorn/ps3/dev/ata/chipsets/ata-nvidia.c
  user/nwhitehorn/ps3/dev/ata/chipsets/ata-promise.c
  user/nwhitehorn/ps3/dev/ata/chipsets/ata-siliconimage.c
  user/nwhitehorn/ps3/dev/ata/chipsets/ata-via.c
  user/nwhitehorn/ps3/dev/bce/if_bce.c
  user/nwhitehorn/ps3/dev/bfe/if_bfe.c
  user/nwhitehorn/ps3/dev/bge/if_bge.c
  user/nwhitehorn/ps3/dev/bge/if_bgereg.h
  user/nwhitehorn/ps3/dev/bm/if_bm.c
  user/nwhitehorn/ps3/dev/cas/if_cas.c
  user/nwhitehorn/ps3/dev/cas/if_casvar.h
  user/nwhitehorn/ps3/dev/dc/dcphy.c
  user/nwhitehorn/ps3/dev/dc/if_dc.c
  user/nwhitehorn/ps3/dev/dc/if_dcreg.h
  user/nwhitehorn/ps3/dev/dc/pnphy.c
  user/nwhitehorn/ps3/dev/ed/if_ed_pccard.c
  user/nwhitehorn/ps3/dev/et/if_et.c
  user/nwhitehorn/ps3/dev/firewire/fwohci.c
  user/nwhitehorn/ps3/dev/fxp/if_fxp.c
  user/nwhitehorn/ps3/dev/gem/if_gem.c
  user/nwhitehorn/ps3/dev/gem/if_gemvar.h
  user/nwhitehorn/ps3/dev/hme/if_hme.c
  user/nwhitehorn/ps3/dev/if_ndis/if_ndis.c
  user/nwhitehorn/ps3/dev/iwi/if_iwi.c
  user/nwhitehorn/ps3/dev/jme/if_jme.c
  user/nwhitehorn/ps3/dev/lge/if_lge.c
  user/nwhitehorn/ps3/dev/md/md.c
  user/nwhitehorn/ps3/dev/mfi/mfireg.h
  user/nwhitehorn/ps3/dev/mge/if_mge.c
  user/nwhitehorn/ps3/dev/mge/if_mgevar.h
  user/nwhitehorn/ps3/dev/mii/acphy.c
  user/nwhitehorn/ps3/dev/mii/amphy.c
  user/nwhitehorn/ps3/dev/mii/atphy.c
  user/nwhitehorn/ps3/dev/mii/axphy.c
  user/nwhitehorn/ps3/dev/mii/bmtphy.c
  user/nwhitehorn/ps3/dev/mii/brgphy.c
  user/nwhitehorn/ps3/dev/mii/ciphy.c
  user/nwhitehorn/ps3/dev/mii/e1000phy.c
  user/nwhitehorn/ps3/dev/mii/exphy.c
  user/nwhitehorn/ps3/dev/mii/gentbi.c
  user/nwhitehorn/ps3/dev/mii/icsphy.c
  user/nwhitehorn/ps3/dev/mii/inphy.c
  user/nwhitehorn/ps3/dev/mii/ip1000phy.c
  user/nwhitehorn/ps3/dev/mii/jmphy.c
  user/nwhitehorn/ps3/dev/mii/lxtphy.c
  user/nwhitehorn/ps3/dev/mii/mii.c
  user/nwhitehorn/ps3/dev/mii/mii.h
  user/nwhitehorn/ps3/dev/mii/mii_physubr.c
  user/nwhitehorn/ps3/dev/mii/miivar.h
  user/nwhitehorn/ps3/dev/mii/mlphy.c
  user/nwhitehorn/ps3/dev/mii/nsgphy.c
  user/nwhitehorn/ps3/dev/mii/nsphy.c
  user/nwhitehorn/ps3/dev/mii/nsphyter.c
  user/nwhitehorn/ps3/dev/mii/pnaphy.c
  user/nwhitehorn/ps3/dev/mii/qsphy.c
  user/nwhitehorn/ps3/dev/mii/rgephy.c
  user/nwhitehorn/ps3/dev/mii/rlphy.c
  user/nwhitehorn/ps3/dev/mii/rlswitch.c
  user/nwhitehorn/ps3/dev/mii/ruephy.c
  user/nwhitehorn/ps3/dev/mii/smcphy.c
  user/nwhitehorn/ps3/dev/mii/tdkphy.c
  user/nwhitehorn/ps3/dev/mii/tlphy.c
  user/nwhitehorn/ps3/dev/mii/truephy.c
  user/nwhitehorn/ps3/dev/mii/ukphy.c
  user/nwhitehorn/ps3/dev/mii/xmphy.c
  user/nwhitehorn/ps3/dev/mps/mps.c
  user/nwhitehorn/ps3/dev/mps/mps_user.c
  user/nwhitehorn/ps3/dev/mps/mpsvar.h
  user/nwhitehorn/ps3/dev/msk/if_msk.c
  user/nwhitehorn/ps3/dev/mvs/mvs.c
  user/nwhitehorn/ps3/dev/mvs/mvs_pci.c
  user/nwhitehorn/ps3/dev/mvs/mvs_soc.c
  user/nwhitehorn/ps3/dev/nfe/if_nfe.c
  user/nwhitehorn/ps3/dev/nge/if_nge.c
  user/nwhitehorn/ps3/dev/nve/if_nve.c
  user/nwhitehorn/ps3/dev/pci/pci.c
  user/nwhitehorn/ps3/dev/pci/pci_pci.c
  user/nwhitehorn/ps3/dev/pci/pci_private.h
  user/nwhitehorn/ps3/dev/pci/pcireg.h
  user/nwhitehorn/ps3/dev/pci/pcivar.h
  user/nwhitehorn/ps3/dev/pcn/if_pcn.c
  user/nwhitehorn/ps3/dev/re/if_re.c
  user/nwhitehorn/ps3/dev/sf/if_sf.c
  user/nwhitehorn/ps3/dev/sge/if_sge.c
  user/nwhitehorn/ps3/dev/siis/siis.c
  user/nwhitehorn/ps3/dev/sis/if_sis.c
  user/nwhitehorn/ps3/dev/sk/if_sk.c
  user/nwhitehorn/ps3/dev/smc/if_smc.c
  user/nwhitehorn/ps3/dev/sound/pcm/channel.c
  user/nwhitehorn/ps3/dev/ste/if_ste.c
  user/nwhitehorn/ps3/dev/stge/if_stge.c
  user/nwhitehorn/ps3/dev/tl/if_tl.c
  user/nwhitehorn/ps3/dev/tl/if_tlreg.h
  user/nwhitehorn/ps3/dev/tsec/if_tsec.c
  user/nwhitehorn/ps3/dev/tx/if_tx.c
  user/nwhitehorn/ps3/dev/usb/controller/ehci.c
  user/nwhitehorn/ps3/dev/usb/controller/ehci.h
  user/nwhitehorn/ps3/dev/usb/controller/ehci_pci.c
  user/nwhitehorn/ps3/dev/usb/controller/ehcireg.h
  user/nwhitehorn/ps3/dev/usb/net/usb_ethernet.c
  user/nwhitehorn/ps3/dev/usb/quirk/usb_quirk.c
  user/nwhitehorn/ps3/dev/usb/serial/u3g.c
  user/nwhitehorn/ps3/dev/usb/serial/uftdi.c
  user/nwhitehorn/ps3/dev/usb/serial/usb_serial.c
  user/nwhitehorn/ps3/dev/usb/storage/umass.c
  user/nwhitehorn/ps3/dev/usb/usb_device.c
  user/nwhitehorn/ps3/dev/usb/usb_freebsd.h
  user/nwhitehorn/ps3/dev/usb/usb_ioctl.h
  user/nwhitehorn/ps3/dev/usb/usbdevs
  user/nwhitehorn/ps3/dev/usb/wlan/if_rum.c
  user/nwhitehorn/ps3/dev/vge/if_vge.c
  user/nwhitehorn/ps3/dev/vr/if_vr.c
  user/nwhitehorn/ps3/dev/vr/if_vrreg.h
  user/nwhitehorn/ps3/dev/wb/if_wb.c
  user/nwhitehorn/ps3/dev/xen/balloon/balloon.c
  user/nwhitehorn/ps3/dev/xen/blkback/blkback.c
  user/nwhitehorn/ps3/dev/xen/blkfront/blkfront.c
  user/nwhitehorn/ps3/dev/xen/blkfront/block.h
  user/nwhitehorn/ps3/dev/xen/netfront/netfront.c
  user/nwhitehorn/ps3/dev/xen/xenpci/evtchn.c
  user/nwhitehorn/ps3/dev/xen/xenpci/xenpci.c
  user/nwhitehorn/ps3/dev/xl/if_xl.c
  user/nwhitehorn/ps3/fs/msdosfs/msdosfs_lookup.c
  user/nwhitehorn/ps3/fs/nfs/nfs_var.h
  user/nwhitehorn/ps3/fs/nfs/nfsdport.h
  user/nwhitehorn/ps3/fs/nfsclient/nfs_clnode.c
  user/nwhitehorn/ps3/fs/nfsclient/nfs_clvfsops.c
  user/nwhitehorn/ps3/fs/nfsclient/nfs_clvnops.c
  user/nwhitehorn/ps3/fs/nfsclient/nfsmount.h
  user/nwhitehorn/ps3/fs/nfsserver/nfs_nfsdport.c
  user/nwhitehorn/ps3/geom/eli/g_eli.c
  user/nwhitehorn/ps3/geom/eli/g_eli.h
  user/nwhitehorn/ps3/geom/eli/g_eli_ctl.c
  user/nwhitehorn/ps3/geom/eli/g_eli_integrity.c
  user/nwhitehorn/ps3/geom/eli/g_eli_key.c
  user/nwhitehorn/ps3/geom/eli/g_eli_privacy.c
  user/nwhitehorn/ps3/geom/geom_dev.c
  user/nwhitehorn/ps3/i386/i386/elan-mmcr.c
  user/nwhitehorn/ps3/i386/i386/identcpu.c
  user/nwhitehorn/ps3/i386/i386/initcpu.c
  user/nwhitehorn/ps3/i386/i386/longrun.c
  user/nwhitehorn/ps3/i386/i386/perfmon.c
  user/nwhitehorn/ps3/i386/include/profile.h
  user/nwhitehorn/ps3/i386/isa/npx.c
  user/nwhitehorn/ps3/i386/xen/xen_machdep.c
  user/nwhitehorn/ps3/kern/init_main.c
  user/nwhitehorn/ps3/kern/kern_cpuset.c
  user/nwhitehorn/ps3/kern/kern_exec.c
  user/nwhitehorn/ps3/kern/kern_exit.c
  user/nwhitehorn/ps3/kern/kern_fork.c
  user/nwhitehorn/ps3/kern/kern_kthread.c
  user/nwhitehorn/ps3/kern/kern_ktrace.c
  user/nwhitehorn/ps3/kern/kern_resource.c
  user/nwhitehorn/ps3/kern/kern_shutdown.c
  user/nwhitehorn/ps3/kern/kern_syscalls.c
  user/nwhitehorn/ps3/kern/kern_thr.c
  user/nwhitehorn/ps3/kern/kern_thread.c
  user/nwhitehorn/ps3/kern/subr_acl_nfs4.c
  user/nwhitehorn/ps3/kern/subr_clock.c
  user/nwhitehorn/ps3/kern/vfs_bio.c
  user/nwhitehorn/ps3/kern/vfs_cache.c
  user/nwhitehorn/ps3/kern/vfs_mount.c
  user/nwhitehorn/ps3/kern/vfs_mountroot.c
  user/nwhitehorn/ps3/mips/atheros/if_arge.c
  user/nwhitehorn/ps3/mips/cavium/octe/octe.c
  user/nwhitehorn/ps3/mips/idt/if_kr.c
  user/nwhitehorn/ps3/mips/rmi/board.c
  user/nwhitehorn/ps3/mips/rmi/dev/nlge/if_nlge.c
  user/nwhitehorn/ps3/mips/rmi/xlr_machdep.c
  user/nwhitehorn/ps3/modules/acpi/acpi/Makefile
  user/nwhitehorn/ps3/modules/mii/Makefile
  user/nwhitehorn/ps3/modules/mps/Makefile
  user/nwhitehorn/ps3/modules/wlan/Makefile
  user/nwhitehorn/ps3/net/if.c
  user/nwhitehorn/ps3/net/if.h
  user/nwhitehorn/ps3/net/if_llatbl.c
  user/nwhitehorn/ps3/net/if_llatbl.h
  user/nwhitehorn/ps3/net/rtsock.c
  user/nwhitehorn/ps3/net80211/ieee80211_ratectl.c
  user/nwhitehorn/ps3/net80211/ieee80211_ratectl.h
  user/nwhitehorn/ps3/netinet/in.c
  user/nwhitehorn/ps3/netinet/ip_ipsec.c
  user/nwhitehorn/ps3/netinet/libalias/libalias.3
  user/nwhitehorn/ps3/netinet/tcp_reass.c
  user/nwhitehorn/ps3/netinet6/ip6_ipsec.c
  user/nwhitehorn/ps3/netipsec/ipsec_output.c
  user/nwhitehorn/ps3/netipsec/key.c
  user/nwhitehorn/ps3/netipsec/keydb.h
  user/nwhitehorn/ps3/nfs/nfs_lock.c
  user/nwhitehorn/ps3/nfs/nfs_lock.h
  user/nwhitehorn/ps3/nfsclient/nfs.h
  user/nwhitehorn/ps3/nfsclient/nfs_bio.c
  user/nwhitehorn/ps3/nfsclient/nfs_nfsiod.c
  user/nwhitehorn/ps3/nfsclient/nfs_node.c
  user/nwhitehorn/ps3/nfsclient/nfs_vfsops.c
  user/nwhitehorn/ps3/nfsclient/nfs_vnops.c
  user/nwhitehorn/ps3/nfsclient/nfsmount.h
  user/nwhitehorn/ps3/nfsclient/nfsnode.h
  user/nwhitehorn/ps3/nfsserver/nfs_serv.c
  user/nwhitehorn/ps3/nlm/nlm_advlock.c
  user/nwhitehorn/ps3/nlm/nlm_prot_impl.c
  user/nwhitehorn/ps3/pc98/pc98/machdep.c
  user/nwhitehorn/ps3/pci/if_rl.c
  user/nwhitehorn/ps3/powerpc/conf/GENERIC
  user/nwhitehorn/ps3/powerpc/conf/GENERIC64
  user/nwhitehorn/ps3/powerpc/conf/NOTES
  user/nwhitehorn/ps3/powerpc/mambo/mambo_console.c
  user/nwhitehorn/ps3/security/mac/mac_vfs.c
  user/nwhitehorn/ps3/sparc64/include/tick.h
  user/nwhitehorn/ps3/sparc64/sparc64/machdep.c
  user/nwhitehorn/ps3/sparc64/sparc64/mp_machdep.c
  user/nwhitehorn/ps3/sparc64/sparc64/tick.c
  user/nwhitehorn/ps3/sys/ktrace.h
  user/nwhitehorn/ps3/sys/proc.h
  user/nwhitehorn/ps3/sys/sockio.h
  user/nwhitehorn/ps3/sys/systm.h
  user/nwhitehorn/ps3/vm/swap_pager.c
  user/nwhitehorn/ps3/vm/uma.h
  user/nwhitehorn/ps3/vm/uma_core.c
  user/nwhitehorn/ps3/vm/vm_map.c
  user/nwhitehorn/ps3/vm/vm_map.h
  user/nwhitehorn/ps3/x86/isa/atrtc.c
  user/nwhitehorn/ps3/x86/x86/local_apic.c
  user/nwhitehorn/ps3/xen/evtchn/evtchn.c
  user/nwhitehorn/ps3/xen/gnttab.c
  user/nwhitehorn/ps3/xen/gnttab.h
  user/nwhitehorn/ps3/xen/interface/grant_table.h
  user/nwhitehorn/ps3/xen/interface/hvm/params.h
  user/nwhitehorn/ps3/xen/interface/io/blkif.h
  user/nwhitehorn/ps3/xen/interface/io/protocols.h
  user/nwhitehorn/ps3/xen/interface/io/ring.h
  user/nwhitehorn/ps3/xen/interface/io/xenbus.h
  user/nwhitehorn/ps3/xen/xen_intr.h
  user/nwhitehorn/ps3/xen/xenbus/xenbus_if.m
  user/nwhitehorn/ps3/xen/xenbus/xenbusvar.h
Directory Properties:
  user/nwhitehorn/ps3/   (props changed)
  user/nwhitehorn/ps3/amd64/include/xen/   (props changed)
  user/nwhitehorn/ps3/boot/powerpc/ps3/   (props changed)
  user/nwhitehorn/ps3/cddl/contrib/opensolaris/   (props changed)
  user/nwhitehorn/ps3/contrib/dev/acpica/   (props changed)
  user/nwhitehorn/ps3/contrib/pf/   (props changed)
  user/nwhitehorn/ps3/contrib/x86emu/   (props changed)
  user/nwhitehorn/ps3/dev/xen/xenpci/   (props changed)
  user/nwhitehorn/ps3/powerpc/ps3/   (props changed)

Modified: user/nwhitehorn/ps3/amd64/amd64/fpu.c
==============================================================================
--- user/nwhitehorn/ps3/amd64/amd64/fpu.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/amd64/amd64/fpu.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -113,14 +113,14 @@ static	struct savefpu		fpu_initialstate;
 void
 fpuinit(void)
 {
-	register_t savecrit;
+	register_t saveintr;
 	u_int mxcsr;
 	u_short control;
 
 	/*
 	 * It is too early for critical_enter() to work on AP.
 	 */
-	savecrit = intr_disable();
+	saveintr = intr_disable();
 	stop_emulating();
 	fninit();
 	control = __INITIAL_FPUCW__;
@@ -137,7 +137,7 @@ fpuinit(void)
 		bzero(fpu_initialstate.sv_xmm, sizeof(fpu_initialstate.sv_xmm));
 	}
 	start_emulating();
-	intr_restore(savecrit);
+	intr_restore(saveintr);
 }
 
 /*

Modified: user/nwhitehorn/ps3/amd64/amd64/pmap.c
==============================================================================
--- user/nwhitehorn/ps3/amd64/amd64/pmap.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/amd64/amd64/pmap.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -1163,26 +1163,33 @@ pmap_is_current(pmap_t pmap)
 vm_paddr_t 
 pmap_extract(pmap_t pmap, vm_offset_t va)
 {
-	vm_paddr_t rtval;
+	pdp_entry_t *pdpe;
+	pd_entry_t *pde;
 	pt_entry_t *pte;
-	pd_entry_t pde, *pdep;
+	vm_paddr_t pa;
 
-	rtval = 0;
+	pa = 0;
 	PMAP_LOCK(pmap);
-	pdep = pmap_pde(pmap, va);
-	if (pdep != NULL) {
-		pde = *pdep;
-		if (pde) {
-			if ((pde & PG_PS) != 0)
-				rtval = (pde & PG_PS_FRAME) | (va & PDRMASK);
-			else {
-				pte = pmap_pde_to_pte(pdep, va);
-				rtval = (*pte & PG_FRAME) | (va & PAGE_MASK);
+	pdpe = pmap_pdpe(pmap, va);
+	if (pdpe != NULL && (*pdpe & PG_V) != 0) {
+		if ((*pdpe & PG_PS) != 0)
+			pa = (*pdpe & PG_PS_FRAME) | (va & PDPMASK);
+		else {
+			pde = pmap_pdpe_to_pde(pdpe, va);
+			if ((*pde & PG_V) != 0) {
+				if ((*pde & PG_PS) != 0) {
+					pa = (*pde & PG_PS_FRAME) |
+					    (va & PDRMASK);
+				} else {
+					pte = pmap_pde_to_pte(pde, va);
+					pa = (*pte & PG_FRAME) |
+					    (va & PAGE_MASK);
+				}
 			}
 		}
 	}
 	PMAP_UNLOCK(pmap);
-	return (rtval);
+	return (pa);
 }
 
 /*

Modified: user/nwhitehorn/ps3/amd64/include/profile.h
==============================================================================
--- user/nwhitehorn/ps3/amd64/include/profile.h	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/amd64/include/profile.h	Mon Oct 25 15:58:31 2010	(r214350)
@@ -77,17 +77,17 @@
 #error this file needs to be ported to your compiler
 #endif /* !__GNUCLIKE_ASM */
 #else /* !GUPROF */
-#define	MCOUNT_DECL(s)	u_long s;
+#define	MCOUNT_DECL(s)	register_t s;
 #ifdef SMP
 extern int	mcount_lock;
-#define	MCOUNT_ENTER(s)	{ s = read_rflags(); disable_intr(); \
+#define	MCOUNT_ENTER(s)	{ s = intr_disable(); \
  			  while (!atomic_cmpset_acq_int(&mcount_lock, 0, 1)) \
 			  	/* nothing */ ; }
 #define	MCOUNT_EXIT(s)	{ atomic_store_rel_int(&mcount_lock, 0); \
-			  write_rflags(s); }
+			  intr_restore(s); }
 #else
-#define	MCOUNT_ENTER(s)	{ s = read_rflags(); disable_intr(); }
-#define	MCOUNT_EXIT(s)	(write_rflags(s))
+#define	MCOUNT_ENTER(s)	{ s = intr_disable(); }
+#define	MCOUNT_EXIT(s)	(intr_restore(s))
 #endif
 #endif /* GUPROF */
 

Modified: user/nwhitehorn/ps3/arm/at91/if_ate.c
==============================================================================
--- user/nwhitehorn/ps3/arm/at91/if_ate.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/arm/at91/if_ate.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -318,9 +318,10 @@ ate_attach(device_t dev)
 	}
 
 	sc->ifp = ifp = if_alloc(IFT_ETHER);
-	if (mii_phy_probe(dev, &sc->miibus, ate_ifmedia_upd, ate_ifmedia_sts)) {
-		device_printf(dev, "Cannot find my PHY.\n");
-		err = ENXIO;
+	err = mii_attach(dev, &sc->miibus, ifp, ate_ifmedia_upd,
+	    ate_ifmedia_sts, BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY, 0);
+	if (err != 0) {
+		device_printf(dev, "attaching PHYs failed\n");
 		goto out;
 	}
 	/*

Modified: user/nwhitehorn/ps3/arm/at91/if_macb.c
==============================================================================
--- user/nwhitehorn/ps3/arm/at91/if_macb.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/arm/at91/if_macb.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -67,7 +67,6 @@ __FBSDID("$FreeBSD$");
 #include <arm/at91/if_macbvar.h>
 #include <arm/at91/at91_piovar.h>
 
-#include <arm/at91/at91_pio_sam9.h>
 #include <arm/at91/at91sam9g20reg.h>
 
 #include <machine/bus.h>
@@ -1365,9 +1364,10 @@ macb_attach(device_t dev)
 	write_4(sc, EMAC_NCR, MPE_ENABLE); //enable MPE
 
 	sc->ifp = ifp = if_alloc(IFT_ETHER);
-	if (mii_phy_probe(dev, &sc->miibus, macb_ifmedia_upd, macb_ifmedia_sts)) {
-		device_printf(dev, "Cannot find my PHY.\n");
-		err = ENXIO;
+	err = mii_attach(dev, &sc->miibus, ifp, macb_ifmedia_upd,
+	    macb_ifmedia_sts, BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY, 0);
+	if (err != 0) {
+		device_printf(dev, "attaching PHYs failed\n");
 		goto out;
 	}
 

Modified: user/nwhitehorn/ps3/arm/econa/if_ece.c
==============================================================================
--- user/nwhitehorn/ps3/arm/econa/if_ece.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/arm/econa/if_ece.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -353,10 +353,11 @@ ece_attach(device_t dev)
 	}
 	ece_set_mac(sc, eaddr);
 	sc->ifp = ifp = if_alloc(IFT_ETHER);
-	if (mii_phy_probe(dev, &sc->miibus, ece_ifmedia_upd,
-		    ece_ifmedia_sts)) {
-		device_printf(dev, "Cannot find my PHY.\n");
-		err = ENXIO;
+	/* Only one PHY at address 0 in this device. */
+	err = mii_attach(dev, &sc->miibus, ifp, ece_ifmedia_upd,
+	    ece_ifmedia_sts, BMSR_DEFCAPMASK, 0, MII_OFFSET_ANY, 0);
+	if (err != 0) {
+		device_printf(dev, "attaching PHYs failed\n");
 		goto out;
 	}
 	ifp->if_softc = sc;
@@ -1904,9 +1905,6 @@ static int
 ece_miibus_readreg(device_t dev, int phy, int reg)
 {
 	struct ece_softc *sc;
-	/* Only one phy in this device. */
-	if (phy>0)
-		return (0);
 	sc = device_get_softc(dev);
 	return (phy_read(sc, phy, reg));
 }

Modified: user/nwhitehorn/ps3/arm/mv/mv_sata.c
==============================================================================
--- user/nwhitehorn/ps3/arm/mv/mv_sata.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/arm/mv/mv_sata.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -710,7 +710,7 @@ sata_channel_status(device_t dev)
 	if ((icr & SATA_ICR_DEV(ch->unit)) || iecr) {
 		/* Disable EDMA before accessing SATA registers */
 		sata_edma_ctrl(dev, 0);
-		ata_sata_phy_check_events(dev);
+		ata_sata_phy_check_events(dev, -1);
 
 		/* Ack device and error interrupt */
 		SATA_OUTL(sc, SATA_ICR, ~SATA_ICR_DEV(ch->unit));

Modified: user/nwhitehorn/ps3/arm/xscale/ixp425/if_npe.c
==============================================================================
--- user/nwhitehorn/ps3/arm/xscale/ixp425/if_npe.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/arm/xscale/ixp425/if_npe.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -137,7 +137,6 @@ struct npe_softc {
 	int		rx_freeqid;	/* rx free buffers qid */
 	int		tx_qid;		/* tx qid */
 	int		tx_doneqid;	/* tx completed qid */
-	int		sc_phy;		/* PHY id */
 	struct ifmib_iso_8802_3 mibdata;
 	bus_dma_tag_t	sc_stats_tag;	/* bus dma tag for stats block */
 	struct npestats	*sc_stats;
@@ -668,7 +667,7 @@ static int
 npe_activate(device_t dev)
 {
 	struct npe_softc *sc = device_get_softc(dev);
-	int error, i, macbase, miibase;
+	int error, i, macbase, miibase, phy;
 
 	/*
 	 * Setup NEP ID, MAC, and MII bindings.  We allow override
@@ -693,8 +692,8 @@ npe_activate(device_t dev)
 	}
 
 	/* PHY */
-	if (!override_unit(dev, "phy", &sc->sc_phy, 0, MII_NPHY-1))
-		sc->sc_phy = npeconfig[sc->sc_npeid].phy;
+	if (!override_unit(dev, "phy", &phy, 0, MII_NPHY - 1))
+		phy = npeconfig[sc->sc_npeid].phy;
 	if (!override_addr(dev, "mii", &miibase))
 		miibase = npeconfig[sc->sc_npeid].miibase;
 	device_printf(sc->sc_dev, "MII at 0x%x\n", miibase);
@@ -721,10 +720,12 @@ npe_activate(device_t dev)
 		return error;
 	}
 
-	/* probe for PHY */
-	if (mii_phy_probe(dev, &sc->sc_mii, npe_ifmedia_update, npe_ifmedia_status)) {
-		device_printf(dev, "cannot find PHY %d.\n", sc->sc_phy);
-		return ENXIO;
+	/* attach PHY */
+	error = mii_attach(dev, &sc->sc_mii, sc->sc_ifp, npe_ifmedia_update,
+	    npe_ifmedia_status, BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, 0);
+	if (error != 0) {
+		device_printf(dev, "attaching PHYs failed\n");
+		return error;
 	}
 
 	error = npe_dma_setup(sc, &sc->txdma, "tx", npe_txbuf, NPE_MAXSEG);
@@ -1700,8 +1701,6 @@ npe_miibus_readreg(device_t dev, int phy
 	struct npe_softc *sc = device_get_softc(dev);
 	uint32_t v;
 
-	if (phy != sc->sc_phy)		/* XXX no auto-detect */
-		return 0xffff;
 	v = (phy << NPE_MII_ADDR_SHL) | (reg << NPE_MII_REG_SHL) | NPE_MII_GO;
 	npe_mii_mdio_write(sc, NPE_MAC_MDIO_CMD, v);
 	if (npe_mii_mdio_wait(sc))
@@ -1717,8 +1716,6 @@ npe_miibus_writereg(device_t dev, int ph
 	struct npe_softc *sc = device_get_softc(dev);
 	uint32_t v;
 
-	if (phy != sc->sc_phy)		/* XXX */
-		return (0);
 	v = (phy << NPE_MII_ADDR_SHL) | (reg << NPE_MII_REG_SHL)
 	  | data | NPE_MII_WRITE
 	  | NPE_MII_GO;

Modified: user/nwhitehorn/ps3/boot/common/gpt.c
==============================================================================
--- user/nwhitehorn/ps3/boot/common/gpt.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/boot/common/gpt.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -49,7 +49,7 @@ static int curent, bootonce;
 
 /*
  * Buffer below 64kB passed on gptread(), which can hold at least
- * one sector od data (512 bytes).
+ * one sector of data (512 bytes).
  */
 static char *secbuf;
 
@@ -62,7 +62,7 @@ gptupdate(const char *which, struct dsk 
 
 	/*
 	 * We need to update the following for both primary and backup GPT:
-	 * 1. Sector on disk that contains curent partition.
+	 * 1. Sector on disk that contains current partition.
 	 * 2. Partition table checksum.
 	 * 3. Header checksum.
 	 * 4. Header on disk.

Modified: user/nwhitehorn/ps3/boot/i386/boot2/boot2.c
==============================================================================
--- user/nwhitehorn/ps3/boot/i386/boot2/boot2.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/boot/i386/boot2/boot2.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -348,7 +348,7 @@ load(void)
 	    return;
 	p += hdr.ex.a_data + roundup2(hdr.ex.a_bss, PAGE_SIZE);
 	bootinfo.bi_symtab = VTOP(p);
-	memcpy(p, &hdr.ex.a_syms, sizeof(hdr.ex.a_syms));
+	*(uint32_t*)p = hdr.ex.a_syms;
 	p += sizeof(hdr.ex.a_syms);
 	if (hdr.ex.a_syms) {
 	    if (xfsread(ino, p, hdr.ex.a_syms))
@@ -385,7 +385,7 @@ load(void)
 	    if (xfsread(ino, &es, sizeof(es)))
 		return;
 	    for (i = 0; i < 2; i++) {
-		memcpy(p, &es[i].sh_size, sizeof(es[i].sh_size));
+		*(Elf32_Word *)p = es[i].sh_size;
 		p += sizeof(es[i].sh_size);
 		fs_off = es[i].sh_offset;
 		if (xfsread(ino, p, es[i].sh_size))

Modified: user/nwhitehorn/ps3/boot/pc98/boot2/boot2.c
==============================================================================
--- user/nwhitehorn/ps3/boot/pc98/boot2/boot2.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/boot/pc98/boot2/boot2.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -485,7 +485,7 @@ load(void)
 	    return;
 	p += hdr.ex.a_data + roundup2(hdr.ex.a_bss, PAGE_SIZE);
 	bootinfo.bi_symtab = VTOP(p);
-	memcpy(p, &hdr.ex.a_syms, sizeof(hdr.ex.a_syms));
+	*(uint32_t*)p = hdr.ex.a_syms;
 	p += sizeof(hdr.ex.a_syms);
 	if (hdr.ex.a_syms) {
 	    if (xfsread(ino, p, hdr.ex.a_syms))
@@ -522,7 +522,7 @@ load(void)
 	    if (xfsread(ino, &es, sizeof(es)))
 		return;
 	    for (i = 0; i < 2; i++) {
-		memcpy(p, &es[i].sh_size, sizeof(es[i].sh_size));
+		*(Elf32_Word *)p = es[i].sh_size;
 		p += sizeof(es[i].sh_size);
 		fs_off = es[i].sh_offset;
 		if (xfsread(ino, p, es[i].sh_size))

Modified: user/nwhitehorn/ps3/cam/ata/ata_da.c
==============================================================================
--- user/nwhitehorn/ps3/cam/ata/ata_da.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/cam/ata/ata_da.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/eventhandler.h>
 #include <sys/malloc.h>
 #include <sys/cons.h>
+#include <sys/reboot.h>
 #include <geom/geom_disk.h>
 #endif /* _KERNEL */
 
@@ -79,7 +80,8 @@ typedef enum {
 	ADA_FLAG_CAN_TRIM	= 0x080,
 	ADA_FLAG_OPEN		= 0x100,
 	ADA_FLAG_SCTX_INIT	= 0x200,
-	ADA_FLAG_CAN_CFA        = 0x400
+	ADA_FLAG_CAN_CFA        = 0x400,
+	ADA_FLAG_CAN_POWERMGT   = 0x800
 } ada_flags;
 
 typedef enum {
@@ -180,6 +182,10 @@ static void		adashutdown(void *arg, int 
 #define	ADA_DEFAULT_SEND_ORDERED	1
 #endif
 
+#ifndef	ADA_DEFAULT_SPINDOWN_SHUTDOWN
+#define	ADA_DEFAULT_SPINDOWN_SHUTDOWN	1
+#endif
+
 /*
  * Most platforms map firmware geometry to actual, but some don't.  If
  * not overridden, default to nothing.
@@ -191,6 +197,7 @@ static void		adashutdown(void *arg, int 
 static int ada_retry_count = ADA_DEFAULT_RETRY;
 static int ada_default_timeout = ADA_DEFAULT_TIMEOUT;
 static int ada_send_ordered = ADA_DEFAULT_SEND_ORDERED;
+static int ada_spindown_shutdown = ADA_DEFAULT_SPINDOWN_SHUTDOWN;
 
 SYSCTL_NODE(_kern_cam, OID_AUTO, ada, CTLFLAG_RD, 0,
             "CAM Direct Access Disk driver");
@@ -203,6 +210,9 @@ TUNABLE_INT("kern.cam.ada.default_timeou
 SYSCTL_INT(_kern_cam_ada, OID_AUTO, ada_send_ordered, CTLFLAG_RW,
            &ada_send_ordered, 0, "Send Ordered Tags");
 TUNABLE_INT("kern.cam.ada.ada_send_ordered", &ada_send_ordered);
+SYSCTL_INT(_kern_cam_ada, OID_AUTO, spindown_shutdown, CTLFLAG_RW,
+           &ada_spindown_shutdown, 0, "Spin down upon shutdown");
+TUNABLE_INT("kern.cam.ada.spindown_shutdown", &ada_spindown_shutdown);
 
 /*
  * ADA_ORDEREDTAG_INTERVAL determines how often, relative
@@ -665,6 +675,8 @@ adaregister(struct cam_periph *periph, v
 		softc->flags |= ADA_FLAG_CAN_48BIT;
 	if (cgd->ident_data.support.command2 & ATA_SUPPORT_FLUSHCACHE)
 		softc->flags |= ADA_FLAG_CAN_FLUSHCACHE;
+	if (cgd->ident_data.support.command1 & ATA_SUPPORT_POWERMGT)
+		softc->flags |= ADA_FLAG_CAN_POWERMGT;
 	if (cgd->ident_data.satacapabilities & ATA_SUPPORT_NCQ &&
 	    cgd->inq_flags & SID_CmdQue)
 		softc->flags |= ADA_FLAG_CAN_NCQ;
@@ -1227,6 +1239,56 @@ adashutdown(void * arg, int howto)
 					 /*getcount_only*/0);
 		cam_periph_unlock(periph);
 	}
+
+	if (ada_spindown_shutdown == 0 ||
+	    (howto & (RB_HALT | RB_POWEROFF)) == 0)
+		return;
+
+	TAILQ_FOREACH(periph, &adadriver.units, unit_links) {
+		union ccb ccb;
+
+		/* If we paniced with lock held - not recurse here. */
+		if (cam_periph_owned(periph))
+			continue;
+		cam_periph_lock(periph);
+		softc = (struct ada_softc *)periph->softc;
+		/*
+		 * We only spin-down the drive if it is capable of it..
+		 */
+		if ((softc->flags & ADA_FLAG_CAN_POWERMGT) == 0) {
+			cam_periph_unlock(periph);
+			continue;
+		}
+
+		if (bootverbose)
+			xpt_print(periph->path, "spin-down\n");
+
+		xpt_setup_ccb(&ccb.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
+
+		ccb.ccb_h.ccb_state = ADA_CCB_DUMP;
+		cam_fill_ataio(&ccb.ataio,
+				    1,
+				    adadone,
+				    CAM_DIR_NONE,
+				    0,
+				    NULL,
+				    0,
+				    ada_default_timeout*1000);
+
+		ata_28bit_cmd(&ccb.ataio, ATA_STANDBY_IMMEDIATE, 0, 0, 0);
+		xpt_polled_action(&ccb);
+
+		if ((ccb.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)
+			xpt_print(periph->path, "Spin-down disk failed\n");
+
+		if ((ccb.ccb_h.status & CAM_DEV_QFRZN) != 0)
+			cam_release_devq(ccb.ccb_h.path,
+					 /*relsim_flags*/0,
+					 /*reduction*/0,
+					 /*timeout*/0,
+					 /*getcount_only*/0);
+		cam_periph_unlock(periph);
+	}
 }
 
 #endif /* _KERNEL */

Modified: user/nwhitehorn/ps3/cam/cam_xpt.c
==============================================================================
--- user/nwhitehorn/ps3/cam/cam_xpt.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/cam/cam_xpt.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/time.h>
 #include <sys/conf.h>
 #include <sys/fcntl.h>
-#include <sys/reboot.h>
 #include <sys/interrupt.h>
 #include <sys/sbuf.h>
 #include <sys/taskqueue.h>
@@ -153,10 +152,6 @@ static struct xpt_softc xsoftc;
 TUNABLE_INT("kern.cam.boot_delay", &xsoftc.boot_delay);
 SYSCTL_INT(_kern_cam, OID_AUTO, boot_delay, CTLFLAG_RDTUN,
            &xsoftc.boot_delay, 0, "Bus registration wait time");
-static int	xpt_power_down = 0;
-TUNABLE_INT("kern.cam.power_down", &xpt_power_down);
-SYSCTL_INT(_kern_cam, OID_AUTO, power_down, CTLFLAG_RW,
-           &xpt_power_down, 0, "Power down devices on shutdown");
 
 /* Queues for our software interrupt handler */
 typedef TAILQ_HEAD(cam_isrq, ccb_hdr) cam_isrq_t;
@@ -250,7 +245,6 @@ static struct cam_ed*
 		 xpt_find_device(struct cam_et *target, lun_id_t lun_id);
 static void	 xpt_config(void *arg);
 static xpt_devicefunc_t xptpassannouncefunc;
-static void	 xpt_shutdown(void *arg, int howto);
 static void	 xptaction(struct cam_sim *sim, union ccb *work_ccb);
 static void	 xptpoll(struct cam_sim *sim);
 static void	 camisr(void *);
@@ -4538,12 +4532,6 @@ xpt_config(void *arg)
 #endif /* CAM_DEBUG_BUS */
 #endif /* CAMDEBUG */
 
-	/* Register our shutdown event handler */
-	if ((EVENTHANDLER_REGISTER(shutdown_final, xpt_shutdown, 
-				   NULL, SHUTDOWN_PRI_FIRST)) == NULL) {
-		printf("xpt_config: failed to register shutdown event.\n");
-	}
-
 	periphdriver_init(1);
 	xpt_hold_boot();
 	callout_init(&xsoftc.boot_callout, 1);
@@ -4625,87 +4613,6 @@ xpt_finishconfig_task(void *context, int
 	free(context, M_CAMXPT);
 }
 
-/*
- * Power down all devices when we are going to power down the system.
- */
-static void
-xpt_shutdown_dev_done(struct cam_periph *periph, union ccb *done_ccb)
-{
-
-	/* No-op. We're polling. */
-	return;
-}
-
-static int
-xpt_shutdown_dev(struct cam_ed *device, void *arg)
-{
-	union ccb ccb;
-	struct cam_path path;
-
-	if (device->flags & CAM_DEV_UNCONFIGURED)
-		return (1);
-
-	if (device->protocol == PROTO_ATA) {
-		/* Only power down device if it supports power management. */
-		if ((device->ident_data.support.command1 &
-		    ATA_SUPPORT_POWERMGT) == 0)
-			return (1);
-	} else if (device->protocol != PROTO_SCSI)
-		return (1);
-
-	xpt_compile_path(&path,
-			 NULL,
-			 device->target->bus->path_id,
-			 device->target->target_id,
-			 device->lun_id);
-	xpt_setup_ccb(&ccb.ccb_h, &path, CAM_PRIORITY_NORMAL);
-	if (device->protocol == PROTO_ATA) {
-		cam_fill_ataio(&ccb.ataio,
-				    1,
-				    xpt_shutdown_dev_done,
-				    CAM_DIR_NONE,
-				    0,
-				    NULL,
-				    0,
-				    30*1000);
-		ata_28bit_cmd(&ccb.ataio, ATA_SLEEP, 0, 0, 0);
-	} else {
-		scsi_start_stop(&ccb.csio,
-				/*retries*/1,
-				xpt_shutdown_dev_done,
-				MSG_SIMPLE_Q_TAG,
-				/*start*/FALSE,
-				/*load/eject*/FALSE,
-				/*immediate*/TRUE,
-				SSD_FULL_SIZE,
-				/*timeout*/50*1000);
-	}
-	xpt_polled_action(&ccb);
-
-	if ((ccb.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)
-		xpt_print(&path, "Device power down failed\n");
-	if ((ccb.ccb_h.status & CAM_DEV_QFRZN) != 0)
-		cam_release_devq(ccb.ccb_h.path,
-				 /*relsim_flags*/0,
-				 /*reduction*/0,
-				 /*timeout*/0,
-				 /*getcount_only*/0);
-	xpt_release_path(&path);
-	return (1);
-}
-
-static void
-xpt_shutdown(void * arg, int howto)
-{
-
-	if (!xpt_power_down)
-		return;
-	if ((howto & RB_POWEROFF) == 0)
-		return;
-
-	xpt_for_all_devices(xpt_shutdown_dev, NULL);
-}
-
 cam_status
 xpt_register_async(int event, ac_callback_t *cbfunc, void *cbarg,
 		   struct cam_path *path)

Modified: user/nwhitehorn/ps3/cam/scsi/scsi_da.c
==============================================================================
--- user/nwhitehorn/ps3/cam/scsi/scsi_da.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/cam/scsi/scsi_da.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -1667,7 +1667,10 @@ dadone(struct cam_periph *periph, union 
 			 * give them an 'illegal' value we'll avoid that
 			 * here.
 			 */
-			if (block_size >= MAXPHYS || block_size == 0) {
+			if (block_size == 0 && maxsector == 0) {
+				snprintf(announce_buf, sizeof(announce_buf),
+				        "0MB (no media?)");
+			} else if (block_size >= MAXPHYS || block_size == 0) {
 				xpt_print(periph->path,
 				    "unsupportable block size %ju\n",
 				    (uintmax_t) block_size);

Modified: user/nwhitehorn/ps3/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
==============================================================================
--- user/nwhitehorn/ps3/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -4199,6 +4199,96 @@ ioflags(int ioflags)
 }
 
 static int
+zfs_getpages(struct vnode *vp, vm_page_t *m, int count, int reqpage)
+{
+	znode_t *zp = VTOZ(vp);
+	zfsvfs_t *zfsvfs = zp->z_zfsvfs;
+	objset_t *os = zp->z_zfsvfs->z_os;
+	vm_page_t mreq;
+	vm_object_t object;
+	caddr_t va;
+	struct sf_buf *sf;
+	int i, error;
+	int pcount, size;
+
+	ZFS_ENTER(zfsvfs);
+	ZFS_VERIFY_ZP(zp);
+
+	pcount = round_page(count) / PAGE_SIZE;
+	mreq = m[reqpage];
+	object = mreq->object;
+	error = 0;
+
+	KASSERT(vp->v_object == object, ("mismatching object"));
+
+	VM_OBJECT_LOCK(object);
+
+	for (i = 0; i < pcount; i++) {
+		if (i != reqpage) {
+			vm_page_lock(m[i]);
+			vm_page_free(m[i]);
+			vm_page_unlock(m[i]);
+		}
+	}
+
+	if (mreq->valid) {
+		if (mreq->valid != VM_PAGE_BITS_ALL)
+			vm_page_zero_invalid(mreq, TRUE);
+		VM_OBJECT_UNLOCK(object);
+		ZFS_EXIT(zfsvfs);
+		return (VM_PAGER_OK);
+	}
+
+	PCPU_INC(cnt.v_vnodein);
+	PCPU_INC(cnt.v_vnodepgsin);
+
+	if (IDX_TO_OFF(mreq->pindex) >= object->un_pager.vnp.vnp_size) {
+		VM_OBJECT_UNLOCK(object);
+		ZFS_EXIT(zfsvfs);
+		return (VM_PAGER_BAD);
+	}
+
+	size = PAGE_SIZE;
+	if (IDX_TO_OFF(mreq->pindex) + size > object->un_pager.vnp.vnp_size)
+		size = object->un_pager.vnp.vnp_size - IDX_TO_OFF(mreq->pindex);
+
+	VM_OBJECT_UNLOCK(object);
+
+	va = zfs_map_page(mreq, &sf);
+	error = dmu_read(os, zp->z_id, IDX_TO_OFF(mreq->pindex),
+	    size, va, DMU_READ_PREFETCH);
+	if (size != PAGE_SIZE)
+		bzero(va + size, PAGE_SIZE - size);
+	zfs_unmap_page(sf);
+
+	VM_OBJECT_LOCK(object);
+
+	if (!error)
+		mreq->valid = VM_PAGE_BITS_ALL;
+	KASSERT(mreq->dirty == 0, ("zfs_getpages: page %p is dirty", mreq));
+
+	VM_OBJECT_UNLOCK(object);
+
+	ZFS_ACCESSTIME_STAMP(zfsvfs, zp);
+	ZFS_EXIT(zfsvfs);
+	return (error ? VM_PAGER_ERROR : VM_PAGER_OK);
+}
+
+static int
+zfs_freebsd_getpages(ap)
+	struct vop_getpages_args /* {
+		struct vnode *a_vp;
+		vm_page_t *a_m;
+		int a_count;
+		int a_reqpage;
+		vm_ooffset_t a_offset;
+	} */ *ap;
+{
+
+	return (zfs_getpages(ap->a_vp, ap->a_m, ap->a_count, ap->a_reqpage));
+}
+
+static int
 zfs_freebsd_open(ap)
 	struct vop_open_args /* {
 		struct vnode *a_vp;
@@ -5314,6 +5404,7 @@ struct vop_vector zfs_vnodeops = {
 	.vop_getacl =		zfs_freebsd_getacl,
 	.vop_setacl =		zfs_freebsd_setacl,
 	.vop_aclcheck =		zfs_freebsd_aclcheck,
+	.vop_getpages =		zfs_freebsd_getpages,
 };
 
 struct vop_vector zfs_fifoops = {

Modified: user/nwhitehorn/ps3/compat/linux/linux_util.h
==============================================================================
--- user/nwhitehorn/ps3/compat/linux/linux_util.h	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/compat/linux/linux_util.h	Mon Oct 25 15:58:31 2010	(r214350)
@@ -31,11 +31,6 @@
  * $FreeBSD$
  */
 
-/*
- * This file is pretty much the same as Christos' svr4_util.h
- * (for now).
- */
-
 #ifndef	_LINUX_UTIL_H_
 #define	_LINUX_UTIL_H_
 

Modified: user/nwhitehorn/ps3/conf/files
==============================================================================
--- user/nwhitehorn/ps3/conf/files	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/conf/files	Mon Oct 25 15:58:31 2010	(r214350)
@@ -2384,6 +2384,7 @@ net/if_atmsubr.c		optional atm
 net/if_bridge.c			optional bridge inet | if_bridge inet
 net/if_clone.c			standard
 net/if_dead.c			standard
+net/if_debug.c			optional ddb
 net/if_disc.c			optional disc
 net/if_edsc.c			optional edsc
 net/if_ef.c			optional ef
@@ -2453,6 +2454,7 @@ net80211/ieee80211_power.c	optional wlan
 net80211/ieee80211_proto.c	optional wlan
 net80211/ieee80211_radiotap.c	optional wlan
 net80211/ieee80211_ratectl.c	optional wlan
+net80211/ieee80211_ratectl_none.c optional wlan
 net80211/ieee80211_regdomain.c	optional wlan
 net80211/ieee80211_rssadapt.c	optional wlan wlan_rssadapt
 net80211/ieee80211_scan.c	optional wlan
@@ -2558,6 +2560,7 @@ netinet/if_atm.c		optional atm
 netinet/if_ether.c		optional inet ether
 netinet/igmp.c			optional inet
 netinet/in.c			optional inet
+netinet/in_debug.c		optional inet ddb
 netinet/ip_carp.c		optional inet carp | inet6 carp
 netinet/in_gif.c		optional gif inet | netgraph_gif inet
 netinet/ip_gre.c		optional gre inet
@@ -3007,19 +3010,20 @@ xen/gnttab.c			optional xen | xenhvm
 xen/features.c			optional xen | xenhvm
 xen/evtchn/evtchn.c		optional xen
 xen/evtchn/evtchn_dev.c		optional xen | xenhvm
-xen/reboot.c			optional xen
-xen/xenbus/xenbus_client.c	optional xen | xenhvm
-xen/xenbus/xenbus_comms.c	optional xen | xenhvm
-xen/xenbus/xenbus_dev.c		optional xen | xenhvm
 xen/xenbus/xenbus_if.m		optional xen | xenhvm
-xen/xenbus/xenbus_probe.c	optional xen | xenhvm
-#xen/xenbus/xenbus_probe_backend.c	optional xen
-xen/xenbus/xenbus_xs.c		optional xen | xenhvm
+xen/xenbus/xenbus.c		optional xen | xenhvm
+xen/xenbus/xenbusb_if.m		optional xen | xenhvm
+xen/xenbus/xenbusb.c		optional xen | xenhvm
+xen/xenbus/xenbusb_front.c	optional xen | xenhvm
+xen/xenbus/xenbusb_back.c	optional xen | xenhvm
+xen/xenstore/xenstore.c		optional xen | xenhvm
+xen/xenstore/xenstore_dev.c	optional xen | xenhvm
 dev/xen/balloon/balloon.c	optional xen | xenhvm
+dev/xen/blkfront/blkfront.c	optional xen | xenhvm
+dev/xen/blkback/blkback.c	optional xen | xenhvm
 dev/xen/console/console.c	optional xen
 dev/xen/console/xencons_ring.c	optional xen
-dev/xen/blkfront/blkfront.c	optional xen | xenhvm
+dev/xen/control/control.c	optional xen | xenhvm
 dev/xen/netfront/netfront.c	optional xen | xenhvm
 dev/xen/xenpci/xenpci.c		optional xenpci
 dev/xen/xenpci/evtchn.c         optional xenpci
-dev/xen/xenpci/machine_reboot.c optional xenpci

Modified: user/nwhitehorn/ps3/conf/files.amd64
==============================================================================
--- user/nwhitehorn/ps3/conf/files.amd64	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/conf/files.amd64	Mon Oct 25 15:58:31 2010	(r214350)
@@ -87,7 +87,7 @@ acpi_wakecode.h			optional	acpi			\
 	clean		"acpi_wakecode.h"
 acpi_wakedata.h			optional	acpi			\
 	dependency	"acpi_wakecode.o"				\
-	compile-with	'nm -n --defined-only acpi_wakecode.o | while read offset dummy what; do echo "#define	$${what}	0x$${offset}"; done > ${.TARGET}' \
+	compile-with	'${NM} -n --defined-only acpi_wakecode.o | while read offset dummy what; do echo "#define	$${what}	0x$${offset}"; done > ${.TARGET}' \
 	no-obj no-implicit-rule	before-depend				\
 	clean		"acpi_wakedata.h"
 #

Modified: user/nwhitehorn/ps3/conf/files.powerpc
==============================================================================
--- user/nwhitehorn/ps3/conf/files.powerpc	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/conf/files.powerpc	Mon Oct 25 15:58:31 2010	(r214350)
@@ -26,6 +26,8 @@ dev/cfi/cfi_bus_fdt.c		optional	cfi fdt
 dev/fb/fb.c			optional	sc
 dev/fdt/fdt_powerpc.c		optional	fdt
 dev/hwpmc/hwpmc_powerpc.c	optional	hwpmc
+dev/iicbus/ds1775.c		optional	ds1775 powermac
+dev/iicbus/max6690.c		optional	max6690 powermac
 dev/kbd/kbd.c			optional	sc
 dev/mem/memutil.c		optional	mem
 dev/ofw/openfirm.c		optional	aim | fdt
@@ -139,6 +141,7 @@ powerpc/powermac/ata_dbdma.c	optional	po
 powerpc/powermac/cuda.c		optional	powermac cuda
 powerpc/powermac/cpcht.c	optional	powermac pci
 powerpc/powermac/dbdma.c	optional	powermac pci
+powerpc/powermac/fcu.c		optional	powermac fcu
 powerpc/powermac/grackle.c	optional	powermac pci
 powerpc/powermac/hrowpic.c	optional	powermac pci
 powerpc/powermac/kiic.c		optional	powermac kiic

Modified: user/nwhitehorn/ps3/dev/acpica/acpi.c
==============================================================================
--- user/nwhitehorn/ps3/dev/acpica/acpi.c	Mon Oct 25 15:51:43 2010	(r214349)
+++ user/nwhitehorn/ps3/dev/acpica/acpi.c	Mon Oct 25 15:58:31 2010	(r214350)
@@ -66,10 +66,6 @@ __FBSDID("$FreeBSD$");
 #include <dev/acpica/acpivar.h>
 #include <dev/acpica/acpiio.h>
 
-#include "pci_if.h"
-#include <dev/pci/pcivar.h>
-#include <dev/pci/pci_private.h>
-
 #include <vm/vm_param.h>
 
 MALLOC_DEFINE(M_ACPIDEV, "acpidev", "ACPI devices");
@@ -133,8 +129,7 @@ static ACPI_STATUS acpi_device_scan_cb(A
 		    void *context, void **retval);
 static ACPI_STATUS acpi_device_scan_children(device_t bus, device_t dev,
 		    int max_depth, acpi_scan_cb_t user_fn, void *arg);
-static int	acpi_set_powerstate_method(device_t bus, device_t child,
-		    int state);
+static int	acpi_set_powerstate(device_t child, int state);
 static int	acpi_isa_pnp_probe(device_t bus, device_t child,
 		    struct isa_pnp_id *ids);
 static void	acpi_probe_children(device_t bus);
@@ -205,9 +200,6 @@ static device_method_t acpi_methods[] = 
     DEVMETHOD(acpi_pwr_for_sleep,	acpi_device_pwr_for_sleep),
     DEVMETHOD(acpi_scan_children,	acpi_device_scan_children),
 
-    /* PCI emulation */
-    DEVMETHOD(pci_set_powerstate,	acpi_set_powerstate_method),
-
     /* ISA emulation */
     DEVMETHOD(isa_pnp_probe,		acpi_isa_pnp_probe),
 
@@ -262,12 +254,6 @@ TUNABLE_INT("debug.acpi.interpreter_slac
 SYSCTL_INT(_debug_acpi, OID_AUTO, interpreter_slack, CTLFLAG_RDTUN,
     &acpi_interpreter_slack, 1, "Turn on interpreter slack mode.");
 
-/* Power devices off and on in suspend and resume.  XXX Remove once tested. */
-static int acpi_do_powerstate = 1;
-TUNABLE_INT("debug.acpi.do_powerstate", &acpi_do_powerstate);
-SYSCTL_INT(_debug_acpi, OID_AUTO, do_powerstate, CTLFLAG_RW,
-    &acpi_do_powerstate, 1, "Turn off devices when suspending.");
-
 /* Reset system clock while resuming.  XXX Remove once tested. */
 static int acpi_reset_clock = 1;
 TUNABLE_INT("debug.acpi.reset_clock", &acpi_reset_clock);
@@ -668,45 +654,43 @@ acpi_attach(device_t dev)
     return_VALUE (error);
 }
 
+static void
+acpi_set_power_children(device_t dev, int state)
+{
+	device_t child, parent;
+	device_t *devlist;
+	struct pci_devinfo *dinfo;
+	int dstate, i, numdevs;
+
+	if (device_get_children(dev, &devlist, &numdevs) != 0)
+		return;
+
+	/*
+	 * Retrieve and set D-state for the sleep state if _SxD is present.
+	 * Skip children who aren't attached since they are handled separately.
+	 */
+	parent = device_get_parent(dev);
+	for (i = 0; i < numdevs; i++) {
+		child = devlist[i];
+		dinfo = device_get_ivars(child);
+		dstate = state;
+		if (device_is_attached(child) &&
+		    acpi_device_pwr_for_sleep(parent, dev, &dstate) == 0)
+			acpi_set_powerstate(child, dstate);
+	}
+	free(devlist, M_TEMP);
+}
+
 static int
 acpi_suspend(device_t dev)
 {
-    device_t child, *devlist;
-    int error, i, numdevs, pstate;
+    int error;
 
     GIANT_REQUIRED;
 
-    /* First give child devices a chance to suspend. */
     error = bus_generic_suspend(dev);
-    if (error)
-	return (error);
-
-    /*
-     * Now, set them into the appropriate power state, usually D3.  If the
-     * device has an _SxD method for the next sleep state, use that power
-     * state instead.
-     */
-    error = device_get_children(dev, &devlist, &numdevs);
-    if (error)
-	return (error);
-    for (i = 0; i < numdevs; i++) {
-	/* If the device is not attached, we've powered it down elsewhere. */
-	child = devlist[i];
-	if (!device_is_attached(child))
-	    continue;
-
-	/*
-	 * Default to D3 for all sleep states.  The _SxD method is optional
-	 * so set the powerstate even if it's absent.
-	 */
-	pstate = PCI_POWERSTATE_D3;
-	error = acpi_device_pwr_for_sleep(device_get_parent(child),
-	    child, &pstate);
-	if ((error == 0 || error == ESRCH) && acpi_do_powerstate)
-	    pci_set_powerstate(child, pstate);
-    }
-    free(devlist, M_TEMP);
-    error = 0;
+    if (error == 0)
+	acpi_set_power_children(dev, ACPI_STATE_D3);
 
     return (error);
 }
@@ -714,28 +698,10 @@ acpi_suspend(device_t dev)
 static int
 acpi_resume(device_t dev)
 {
-    ACPI_HANDLE handle;
-    int i, numdevs, error;
-    device_t child, *devlist;
 
     GIANT_REQUIRED;
 
-    /*
-     * Put all devices in D0 before resuming them.  Call _S0D on each one
-     * since some systems expect this.
-     */
-    error = device_get_children(dev, &devlist, &numdevs);
-    if (error)
-	return (error);
-    for (i = 0; i < numdevs; i++) {
-	child = devlist[i];
-	handle = acpi_get_handle(child);
-	if (handle)
-	    AcpiEvaluateObject(handle, "_S0D", NULL, NULL);
-	if (device_is_attached(child) && acpi_do_powerstate)
-	    pci_set_powerstate(child, PCI_POWERSTATE_D0);
-    }
-    free(devlist, M_TEMP);
+    acpi_set_power_children(dev, ACPI_STATE_D0);
 
     return (bus_generic_resume(dev));
 }
@@ -811,7 +777,7 @@ static void
 acpi_probe_nomatch(device_t bus, device_t child)
 {
 #ifdef ACPI_ENABLE_POWERDOWN_NODRIVER
-    pci_set_powerstate(child, PCI_POWERSTATE_D3);
+    acpi_set_powerstate(child, ACPI_STATE_D3);
 #endif
 }
 
@@ -833,9 +799,9 @@ acpi_driver_added(device_t dev, driver_t
 	child = devlist[i];
 	if (device_get_state(child) == DS_NOTPRESENT) {
 #ifdef ACPI_ENABLE_POWERDOWN_NODRIVER
-	    pci_set_powerstate(child, PCI_POWERSTATE_D0);
+	    acpi_set_powerstate(child, ACPI_STATE_D0);
 	    if (device_probe_and_attach(child) != 0)
-		pci_set_powerstate(child, PCI_POWERSTATE_D3);
+		acpi_set_powerstate(child, ACPI_STATE_D3);
 #else
 	    device_probe_and_attach(child);
 #endif
@@ -1401,9 +1367,7 @@ acpi_device_pwr_for_sleep(device_t bus, 
     ACPI_HANDLE handle;
     ACPI_STATUS status;
     char sxd[8];
-    int error;
 
-    sc = device_get_softc(bus);
     handle = acpi_get_handle(dev);
 
     /*
@@ -1412,7 +1376,7 @@ acpi_device_pwr_for_sleep(device_t bus, 
      * set to D3 and it appears that such legacy devices may
      * need special handling in their drivers.
      */
-    if (handle == NULL ||
+    if (dstate == NULL || handle == NULL ||
 	acpi_MatchHid(handle, "PNP0500") ||
 	acpi_MatchHid(handle, "PNP0501") ||
 	acpi_MatchHid(handle, "PNP0502") ||
@@ -1421,28 +1385,19 @@ acpi_device_pwr_for_sleep(device_t bus, 
 	return (ENXIO);
 
     /*
-     * Override next state with the value from _SxD, if present.  If no
-     * dstate argument was provided, don't fetch the return value.
+     * Override next state with the value from _SxD, if present.
+     * Note illegal _S0D is evaluated because some systems expect this.
      */
+    sc = device_get_softc(bus);
     snprintf(sxd, sizeof(sxd), "_S%dD", sc->acpi_sstate);
-    if (dstate)
-	status = acpi_GetInteger(handle, sxd, dstate);
-    else
-	status = AcpiEvaluateObject(handle, sxd, NULL, NULL);
-
-    switch (status) {
-    case AE_OK:
-	error = 0;
-	break;
-    case AE_NOT_FOUND:
-	error = ESRCH;
-	break;
-    default:
-	error = ENXIO;
-	break;
+    status = acpi_GetInteger(handle, sxd, dstate);
+    if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
+	    device_printf(dev, "failed to get %s on %s: %s\n", sxd,
+		acpi_name(handle), AcpiFormatException(status));
+	    return (ENXIO);
     }
 
-    return (error);
+    return (0);
 }

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



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