Date: Sat, 21 Feb 2009 21:12:55 +0000 (UTC) From: Alan Cox <alc@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r188902 - in user/alc/pagelock/sys: . amd64/linux32 arm/conf boot boot/ficl/mips boot/i386/loader boot/ia64/common boot/ia64/efi boot/ia64/ski boot/pc98/loader boot/powerpc/ofw boot/spa... Message-ID: <200902212112.n1LLCtx0075549@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: alc Date: Sat Feb 21 21:12:54 2009 New Revision: 188902 URL: http://svn.freebsd.org/changeset/base/188902 Log: Merge from HEAD. Added: user/alc/pagelock/sys/boot/ficl/mips/ - copied from r188901, head/sys/boot/ficl/mips/ user/alc/pagelock/sys/dev/ata/ata-raid-ddf.h - copied unchanged from r188901, head/sys/dev/ata/ata-raid-ddf.h user/alc/pagelock/sys/powerpc/include/altivec.h - copied unchanged from r188901, head/sys/powerpc/include/altivec.h user/alc/pagelock/sys/powerpc/powerpc/altivec.c - copied unchanged from r188901, head/sys/powerpc/powerpc/altivec.c Deleted: user/alc/pagelock/sys/dev/usb2/include/Makefile user/alc/pagelock/sys/dev/usb2/include/usb2_devid.h user/alc/pagelock/sys/dev/usb2/include/usb2_devtable.h Modified: user/alc/pagelock/sys/ (props changed) user/alc/pagelock/sys/amd64/linux32/linux32_machdep.c user/alc/pagelock/sys/arm/conf/AVILA user/alc/pagelock/sys/arm/conf/CAMBRIA user/alc/pagelock/sys/boot/Makefile user/alc/pagelock/sys/boot/Makefile.inc user/alc/pagelock/sys/boot/i386/loader/Makefile user/alc/pagelock/sys/boot/ia64/common/Makefile user/alc/pagelock/sys/boot/ia64/efi/Makefile user/alc/pagelock/sys/boot/ia64/ski/Makefile user/alc/pagelock/sys/boot/pc98/loader/Makefile user/alc/pagelock/sys/boot/powerpc/ofw/Makefile user/alc/pagelock/sys/boot/sparc64/loader/Makefile user/alc/pagelock/sys/compat/linux/linux_stats.c user/alc/pagelock/sys/conf/files user/alc/pagelock/sys/conf/files.powerpc user/alc/pagelock/sys/dev/aac/aac.c user/alc/pagelock/sys/dev/aac/aac_debug.c user/alc/pagelock/sys/dev/aac/aac_pci.c user/alc/pagelock/sys/dev/aac/aacreg.h user/alc/pagelock/sys/dev/aac/aacvar.h user/alc/pagelock/sys/dev/acpica/acpi_cpu.c user/alc/pagelock/sys/dev/arcmsr/arcmsr.c user/alc/pagelock/sys/dev/ata/ata-all.c user/alc/pagelock/sys/dev/ata/ata-all.h user/alc/pagelock/sys/dev/ata/ata-card.c user/alc/pagelock/sys/dev/ata/ata-cbus.c user/alc/pagelock/sys/dev/ata/ata-disk.c user/alc/pagelock/sys/dev/ata/ata-dma.c user/alc/pagelock/sys/dev/ata/ata-isa.c user/alc/pagelock/sys/dev/ata/ata-pci.c user/alc/pagelock/sys/dev/ata/ata-pci.h user/alc/pagelock/sys/dev/ata/ata-queue.c user/alc/pagelock/sys/dev/ata/ata-raid.c user/alc/pagelock/sys/dev/ata/ata-raid.h user/alc/pagelock/sys/dev/ata/ata-usb.c user/alc/pagelock/sys/dev/ata/atapi-cd.c user/alc/pagelock/sys/dev/ata/atapi-fd.c user/alc/pagelock/sys/dev/ata/atapi-tape.c user/alc/pagelock/sys/dev/ata/chipsets/ata-acard.c user/alc/pagelock/sys/dev/ata/chipsets/ata-acerlabs.c user/alc/pagelock/sys/dev/ata/chipsets/ata-ahci.c user/alc/pagelock/sys/dev/ata/chipsets/ata-highpoint.c user/alc/pagelock/sys/dev/ata/chipsets/ata-intel.c user/alc/pagelock/sys/dev/ata/chipsets/ata-jmicron.c user/alc/pagelock/sys/dev/ata/chipsets/ata-marvell.c user/alc/pagelock/sys/dev/ata/chipsets/ata-netcell.c user/alc/pagelock/sys/dev/ata/chipsets/ata-nvidia.c user/alc/pagelock/sys/dev/ata/chipsets/ata-promise.c user/alc/pagelock/sys/dev/ata/chipsets/ata-serverworks.c user/alc/pagelock/sys/dev/ata/chipsets/ata-siliconimage.c user/alc/pagelock/sys/dev/ata/chipsets/ata-sis.c user/alc/pagelock/sys/dev/ata/chipsets/ata-via.c user/alc/pagelock/sys/dev/ath/ath_hal/ah.c user/alc/pagelock/sys/dev/ath/ath_hal/ah.h user/alc/pagelock/sys/dev/ath/ath_hal/ah_internal.h user/alc/pagelock/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c user/alc/pagelock/sys/dev/ath/ath_hal/ar5212/ar5212_phy.c user/alc/pagelock/sys/dev/ath/if_ath.c user/alc/pagelock/sys/dev/ath/if_athvar.h user/alc/pagelock/sys/dev/cfi/cfi_bus_ixp4xx.c user/alc/pagelock/sys/dev/ciss/ciss.c user/alc/pagelock/sys/dev/cx/if_cx.c user/alc/pagelock/sys/dev/firewire/firewire.c user/alc/pagelock/sys/dev/firewire/firewire.h user/alc/pagelock/sys/dev/firewire/sbp.c user/alc/pagelock/sys/dev/mmc/mmcsd.c user/alc/pagelock/sys/dev/mxge/eth_z8e.h user/alc/pagelock/sys/dev/mxge/ethp_z8e.h user/alc/pagelock/sys/dev/mxge/if_mxge.c user/alc/pagelock/sys/dev/mxge/if_mxge_var.h user/alc/pagelock/sys/dev/mxge/mxge_mcp.h user/alc/pagelock/sys/dev/mxge/rss_eth_z8e.h user/alc/pagelock/sys/dev/mxge/rss_ethp_z8e.h user/alc/pagelock/sys/dev/sdhci/sdhci.c user/alc/pagelock/sys/dev/tsec/if_tsec.c user/alc/pagelock/sys/dev/tsec/if_tsec.h user/alc/pagelock/sys/dev/tsec/if_tsec_ocp.c user/alc/pagelock/sys/dev/tsec/if_tsecreg.h user/alc/pagelock/sys/dev/usb2/bluetooth/ng_ubt2.c user/alc/pagelock/sys/dev/usb2/bluetooth/ubtbcmfw2.c user/alc/pagelock/sys/dev/usb2/core/usb2_device.c user/alc/pagelock/sys/dev/usb2/ethernet/if_aue2.c user/alc/pagelock/sys/dev/usb2/ethernet/if_axe2.c user/alc/pagelock/sys/dev/usb2/ethernet/if_cdce2.c user/alc/pagelock/sys/dev/usb2/ethernet/if_cue2.c user/alc/pagelock/sys/dev/usb2/ethernet/if_kue2.c user/alc/pagelock/sys/dev/usb2/ethernet/if_rue2.c user/alc/pagelock/sys/dev/usb2/ethernet/if_udav2.c user/alc/pagelock/sys/dev/usb2/image/uscanner2.c user/alc/pagelock/sys/dev/usb2/input/uhid2.c user/alc/pagelock/sys/dev/usb2/input/ums2.c user/alc/pagelock/sys/dev/usb2/misc/udbp2.c user/alc/pagelock/sys/dev/usb2/misc/ufm2.c user/alc/pagelock/sys/dev/usb2/quirk/usb2_quirk.c user/alc/pagelock/sys/dev/usb2/serial/u3g2.c user/alc/pagelock/sys/dev/usb2/serial/uark2.c user/alc/pagelock/sys/dev/usb2/serial/ubsa2.c user/alc/pagelock/sys/dev/usb2/serial/uchcom2.c user/alc/pagelock/sys/dev/usb2/serial/ucycom2.c user/alc/pagelock/sys/dev/usb2/serial/ufoma2.c user/alc/pagelock/sys/dev/usb2/serial/uftdi2.c user/alc/pagelock/sys/dev/usb2/serial/ugensa2.c user/alc/pagelock/sys/dev/usb2/serial/uipaq2.c user/alc/pagelock/sys/dev/usb2/serial/ulpt2.c user/alc/pagelock/sys/dev/usb2/serial/umct2.c user/alc/pagelock/sys/dev/usb2/serial/umodem2.c user/alc/pagelock/sys/dev/usb2/serial/umoscom2.c user/alc/pagelock/sys/dev/usb2/serial/uplcom2.c user/alc/pagelock/sys/dev/usb2/serial/uslcom2.c user/alc/pagelock/sys/dev/usb2/serial/uvisor2.c user/alc/pagelock/sys/dev/usb2/serial/uvscom2.c user/alc/pagelock/sys/dev/usb2/sound/uaudio2.c user/alc/pagelock/sys/dev/usb2/storage/ata-usb2.c user/alc/pagelock/sys/dev/usb2/storage/umass2.c user/alc/pagelock/sys/dev/usb2/storage/urio2.c user/alc/pagelock/sys/dev/usb2/storage/ustorage2_fs.c user/alc/pagelock/sys/dev/usb2/wlan/if_rum2.c user/alc/pagelock/sys/dev/usb2/wlan/if_ural2.c user/alc/pagelock/sys/dev/usb2/wlan/if_zyd2.c user/alc/pagelock/sys/fs/udf/udf_vnops.c user/alc/pagelock/sys/geom/geom_dev.c user/alc/pagelock/sys/geom/part/g_part.c user/alc/pagelock/sys/geom/part/g_part.h user/alc/pagelock/sys/geom/part/g_part_bsd.c user/alc/pagelock/sys/geom/part/g_part_ebr.c user/alc/pagelock/sys/geom/part/g_part_if.m user/alc/pagelock/sys/i386/acpica/acpi_wakeup.c user/alc/pagelock/sys/i386/linux/linux_machdep.c user/alc/pagelock/sys/kern/kern_osd.c user/alc/pagelock/sys/kern/kern_proc.c user/alc/pagelock/sys/kern/tty_pts.c user/alc/pagelock/sys/kern/vfs_cache.c user/alc/pagelock/sys/kern/vfs_syscalls.c user/alc/pagelock/sys/modules/usb2/bluetooth_fw/Makefile user/alc/pagelock/sys/modules/usb2/bluetooth_ng/Makefile user/alc/pagelock/sys/modules/usb2/core/Makefile user/alc/pagelock/sys/modules/usb2/ethernet_aue/Makefile user/alc/pagelock/sys/modules/usb2/ethernet_axe/Makefile user/alc/pagelock/sys/modules/usb2/ethernet_cdce/Makefile user/alc/pagelock/sys/modules/usb2/ethernet_cue/Makefile user/alc/pagelock/sys/modules/usb2/ethernet_dav/Makefile user/alc/pagelock/sys/modules/usb2/ethernet_kue/Makefile user/alc/pagelock/sys/modules/usb2/ethernet_rue/Makefile user/alc/pagelock/sys/modules/usb2/input_hid/Makefile user/alc/pagelock/sys/modules/usb2/input_kbd/Makefile user/alc/pagelock/sys/modules/usb2/input_ms/Makefile user/alc/pagelock/sys/modules/usb2/misc_dbp/Makefile user/alc/pagelock/sys/modules/usb2/misc_fm/Makefile user/alc/pagelock/sys/modules/usb2/quirk/Makefile user/alc/pagelock/sys/modules/usb2/scanner/Makefile user/alc/pagelock/sys/modules/usb2/serial_3g/Makefile user/alc/pagelock/sys/modules/usb2/serial_ark/Makefile user/alc/pagelock/sys/modules/usb2/serial_bsa/Makefile user/alc/pagelock/sys/modules/usb2/serial_bser/Makefile user/alc/pagelock/sys/modules/usb2/serial_chcom/Makefile user/alc/pagelock/sys/modules/usb2/serial_cycom/Makefile user/alc/pagelock/sys/modules/usb2/serial_foma/Makefile user/alc/pagelock/sys/modules/usb2/serial_ftdi/Makefile user/alc/pagelock/sys/modules/usb2/serial_gensa/Makefile user/alc/pagelock/sys/modules/usb2/serial_ipaq/Makefile user/alc/pagelock/sys/modules/usb2/serial_lpt/Makefile user/alc/pagelock/sys/modules/usb2/serial_mct/Makefile user/alc/pagelock/sys/modules/usb2/serial_modem/Makefile user/alc/pagelock/sys/modules/usb2/serial_moscom/Makefile user/alc/pagelock/sys/modules/usb2/serial_plcom/Makefile user/alc/pagelock/sys/modules/usb2/serial_slcom/Makefile user/alc/pagelock/sys/modules/usb2/serial_visor/Makefile user/alc/pagelock/sys/modules/usb2/serial_vscom/Makefile user/alc/pagelock/sys/modules/usb2/sound/Makefile user/alc/pagelock/sys/modules/usb2/storage_ata/Makefile user/alc/pagelock/sys/modules/usb2/storage_fs/Makefile user/alc/pagelock/sys/modules/usb2/storage_mass/Makefile user/alc/pagelock/sys/modules/usb2/storage_rio/Makefile user/alc/pagelock/sys/modules/usb2/template/Makefile user/alc/pagelock/sys/modules/usb2/wlan_ral/Makefile user/alc/pagelock/sys/modules/usb2/wlan_rum/Makefile user/alc/pagelock/sys/modules/usb2/wlan_zyd/Makefile user/alc/pagelock/sys/net80211/_ieee80211.h user/alc/pagelock/sys/net80211/ieee80211.c user/alc/pagelock/sys/net80211/ieee80211_ioctl.c user/alc/pagelock/sys/net80211/ieee80211_node.c user/alc/pagelock/sys/net80211/ieee80211_phy.c user/alc/pagelock/sys/net80211/ieee80211_proto.c user/alc/pagelock/sys/net80211/ieee80211_regdomain.c user/alc/pagelock/sys/net80211/ieee80211_scan.c user/alc/pagelock/sys/net80211/ieee80211_scan_sta.c user/alc/pagelock/sys/net80211/ieee80211_tdma.c user/alc/pagelock/sys/netinet/sctp_constants.h user/alc/pagelock/sys/netinet/sctp_header.h user/alc/pagelock/sys/netinet/sctp_input.c user/alc/pagelock/sys/netinet/sctp_output.c user/alc/pagelock/sys/netinet/sctp_output.h user/alc/pagelock/sys/netinet/sctp_pcb.c user/alc/pagelock/sys/netinet/sctp_structs.h user/alc/pagelock/sys/netinet/sctp_uio.h user/alc/pagelock/sys/netinet/sctp_usrreq.c user/alc/pagelock/sys/netinet/sctputil.c user/alc/pagelock/sys/nfsclient/nfs_vnops.c user/alc/pagelock/sys/nfsclient/nfsnode.h user/alc/pagelock/sys/powerpc/aim/machdep.c user/alc/pagelock/sys/powerpc/aim/swtch.S user/alc/pagelock/sys/powerpc/aim/trap.c user/alc/pagelock/sys/powerpc/aim/trap_subr.S user/alc/pagelock/sys/powerpc/conf/MPC85XX user/alc/pagelock/sys/powerpc/include/pcb.h user/alc/pagelock/sys/powerpc/include/pcpu.h user/alc/pagelock/sys/powerpc/powerpc/genassym.c user/alc/pagelock/sys/sys/disk.h user/alc/pagelock/sys/sys/jail.h user/alc/pagelock/sys/sys/osd.h user/alc/pagelock/sys/sys/param.h user/alc/pagelock/sys/sys/syscallsubr.h user/alc/pagelock/sys/sys/vnode.h user/alc/pagelock/sys/vm/vm_object.c Modified: user/alc/pagelock/sys/amd64/linux32/linux32_machdep.c ============================================================================== --- user/alc/pagelock/sys/amd64/linux32/linux32_machdep.c Sat Feb 21 21:02:53 2009 (r188901) +++ user/alc/pagelock/sys/amd64/linux32/linux32_machdep.c Sat Feb 21 21:12:54 2009 (r188902) @@ -560,7 +560,7 @@ linux_vfork(struct thread *td, struct li /* wait for the children to exit, ie. emulate vfork */ PROC_LOCK(p2); while (p2->p_flag & P_PPWAIT) - msleep(td->td_proc, &p2->p_mtx, PWAIT, "ppwait", 0); + cv_wait(&p2->p_pwait, &p2->p_mtx); PROC_UNLOCK(p2); return (0); @@ -749,7 +749,7 @@ linux_clone(struct thread *td, struct li /* wait for the children to exit, ie. emulate vfork */ PROC_LOCK(p2); while (p2->p_flag & P_PPWAIT) - msleep(td->td_proc, &p2->p_mtx, PWAIT, "ppwait", 0); + cv_wait(&p2->p_pwait, &p2->p_mtx); PROC_UNLOCK(p2); } Modified: user/alc/pagelock/sys/arm/conf/AVILA ============================================================================== --- user/alc/pagelock/sys/arm/conf/AVILA Sat Feb 21 21:02:53 2009 (r188901) +++ user/alc/pagelock/sys/arm/conf/AVILA Sat Feb 21 21:12:54 2009 (r188902) @@ -88,7 +88,7 @@ device npe # Network Processing Engine device npe_fw device firmware device qmgr # Q Manager (required by npe) -device miibus # NB: required by npe +device mii # NB: required by npe device ether device bpf Modified: user/alc/pagelock/sys/arm/conf/CAMBRIA ============================================================================== --- user/alc/pagelock/sys/arm/conf/CAMBRIA Sat Feb 21 21:02:53 2009 (r188901) +++ user/alc/pagelock/sys/arm/conf/CAMBRIA Sat Feb 21 21:12:54 2009 (r188902) @@ -87,7 +87,7 @@ device npe # Network Processing Engine device npe_fw device firmware device qmgr # Q Manager (required by npe) -device miibus # NB: required by npe +device mii # NB: required by npe device ether device bpf Modified: user/alc/pagelock/sys/boot/Makefile ============================================================================== --- user/alc/pagelock/sys/boot/Makefile Sat Feb 21 21:02:53 2009 (r188901) +++ user/alc/pagelock/sys/boot/Makefile Sat Feb 21 21:12:54 2009 (r188902) @@ -2,10 +2,6 @@ .include <bsd.own.mk> -.if ${MACHINE_ARCH} == "mips" -MK_FORTH=no # not yet -.endif - .if ${MK_FORTH} != "no" # Build the add-in FORTH interpreter. SUBDIR+= ficl Modified: user/alc/pagelock/sys/boot/Makefile.inc ============================================================================== --- user/alc/pagelock/sys/boot/Makefile.inc Sat Feb 21 21:02:53 2009 (r188901) +++ user/alc/pagelock/sys/boot/Makefile.inc Sat Feb 21 21:12:54 2009 (r188902) @@ -1,3 +1,3 @@ # $FreeBSD$ -WITHOUT_SSP= +SSP_CFLAGS= Modified: user/alc/pagelock/sys/boot/i386/loader/Makefile ============================================================================== --- user/alc/pagelock/sys/boot/i386/loader/Makefile Sat Feb 21 21:02:53 2009 (r188901) +++ user/alc/pagelock/sys/boot/i386/loader/Makefile Sat Feb 21 21:12:54 2009 (r188902) @@ -1,8 +1,7 @@ # $FreeBSD$ -WITHOUT_SSP= - .include <bsd.own.mk> +MK_SSP= no PROG= loader.sym INTERNALPROG= Modified: user/alc/pagelock/sys/boot/ia64/common/Makefile ============================================================================== --- user/alc/pagelock/sys/boot/ia64/common/Makefile Sat Feb 21 21:02:53 2009 (r188901) +++ user/alc/pagelock/sys/boot/ia64/common/Makefile Sat Feb 21 21:12:54 2009 (r188902) @@ -1,8 +1,7 @@ # $FreeBSD$ -WITHOUT_SSP= - .include <bsd.own.mk> +MK_SSP= no LIB= ia64 INTERNALLIB= Modified: user/alc/pagelock/sys/boot/ia64/efi/Makefile ============================================================================== --- user/alc/pagelock/sys/boot/ia64/efi/Makefile Sat Feb 21 21:02:53 2009 (r188901) +++ user/alc/pagelock/sys/boot/ia64/efi/Makefile Sat Feb 21 21:12:54 2009 (r188902) @@ -1,9 +1,9 @@ # $FreeBSD$ NO_MAN= -WITHOUT_SSP= .include <bsd.own.mk> +MK_SSP= no PROG= loader.sym INTERNALPROG= Modified: user/alc/pagelock/sys/boot/ia64/ski/Makefile ============================================================================== --- user/alc/pagelock/sys/boot/ia64/ski/Makefile Sat Feb 21 21:02:53 2009 (r188901) +++ user/alc/pagelock/sys/boot/ia64/ski/Makefile Sat Feb 21 21:12:54 2009 (r188902) @@ -1,9 +1,9 @@ # $FreeBSD$ NO_MAN= -WITHOUT_SSP= .include <bsd.own.mk> +MK_SSP= no PROG= skiload STRIP= # We must not strip skiload at install time. Modified: user/alc/pagelock/sys/boot/pc98/loader/Makefile ============================================================================== --- user/alc/pagelock/sys/boot/pc98/loader/Makefile Sat Feb 21 21:02:53 2009 (r188901) +++ user/alc/pagelock/sys/boot/pc98/loader/Makefile Sat Feb 21 21:12:54 2009 (r188902) @@ -1,8 +1,7 @@ # $FreeBSD$ -WITHOUT_SSP= - .include <bsd.own.mk> +MK_SSP= no PROG= loader.sym INTERNALPROG= Modified: user/alc/pagelock/sys/boot/powerpc/ofw/Makefile ============================================================================== --- user/alc/pagelock/sys/boot/powerpc/ofw/Makefile Sat Feb 21 21:02:53 2009 (r188901) +++ user/alc/pagelock/sys/boot/powerpc/ofw/Makefile Sat Feb 21 21:12:54 2009 (r188902) @@ -1,8 +1,7 @@ # $FreeBSD$ -WITHOUT_SSP= - .include <bsd.own.mk> +MK_SSP= no PROG= loader NEWVERSWHAT= "Open Firmware loader" ${MACHINE_ARCH} Modified: user/alc/pagelock/sys/boot/sparc64/loader/Makefile ============================================================================== --- user/alc/pagelock/sys/boot/sparc64/loader/Makefile Sat Feb 21 21:02:53 2009 (r188901) +++ user/alc/pagelock/sys/boot/sparc64/loader/Makefile Sat Feb 21 21:12:54 2009 (r188902) @@ -1,8 +1,7 @@ # $FreeBSD$ -WITHOUT_SSP= - .include <bsd.own.mk> +MK_SSP= no PROG= loader NEWVERSWHAT= "bootstrap loader" sparc64 Modified: user/alc/pagelock/sys/compat/linux/linux_stats.c ============================================================================== --- user/alc/pagelock/sys/compat/linux/linux_stats.c Sat Feb 21 21:02:53 2009 (r188901) +++ user/alc/pagelock/sys/compat/linux/linux_stats.c Sat Feb 21 21:12:54 2009 (r188902) @@ -62,6 +62,44 @@ __FBSDID("$FreeBSD$"); #include <security/mac/mac_framework.h> +static void +translate_vnhook_major_minor(struct vnode *vp, struct stat *sb) +{ + int major, minor; + + if (vp->v_type == VCHR && vp->v_rdev != NULL && + linux_driver_get_major_minor(vp->v_rdev->si_name, + &major, &minor) == 0) { + sb->st_rdev = (major << 8 | minor); + } +} + +static int +linux_kern_statat(struct thread *td, int flag, int fd, char *path, + enum uio_seg pathseg, struct stat *sbp) +{ + + return (kern_statat_vnhook(td, flag, fd, path, pathseg, sbp, + translate_vnhook_major_minor)); +} + +static int +linux_kern_stat(struct thread *td, char *path, enum uio_seg pathseg, + struct stat *sbp) +{ + + return (linux_kern_statat(td, 0, AT_FDCWD, path, pathseg, sbp)); +} + +static int +linux_kern_lstat(struct thread *td, char *path, enum uio_seg pathseg, + struct stat *sbp) +{ + + return (linux_kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, path, + pathseg, sbp)); +} + /* * XXX: This was removed from newstat_copyout(), and almost identical * XXX: code was in stat64_copyout(). findcdev() needs to be replaced @@ -102,14 +140,15 @@ static void translate_fd_major_minor(struct thread *td, int fd, struct stat *buf) { struct file *fp; + struct vnode *vp; int major, minor; if ((!S_ISCHR(buf->st_mode) && !S_ISBLK(buf->st_mode)) || fget(td, fd, &fp) != 0) return; - if (fp->f_vnode != NULL && - fp->f_vnode->v_un.vu_cdev != NULL && - linux_driver_get_major_minor(fp->f_vnode->v_un.vu_cdev->si_name, + vp = fp->f_vnode; + if (vp != NULL && vp->v_rdev != NULL && + linux_driver_get_major_minor(vp->v_rdev->si_name, &major, &minor) == 0) { buf->st_rdev = (major << 8 | minor); } else if (fp->f_type == DTYPE_PTS) { @@ -124,32 +163,6 @@ translate_fd_major_minor(struct thread * fdrop(fp, td); } -static void -translate_path_major_minor_at(struct thread *td, char *path, - struct stat *buf, int dfd) -{ - struct proc *p = td->td_proc; - struct filedesc *fdp = p->p_fd; - int fd; - int temp; - - if (!S_ISCHR(buf->st_mode) && !S_ISBLK(buf->st_mode)) - return; - temp = td->td_retval[0]; - if (kern_openat(td, dfd, path, UIO_SYSSPACE, O_RDONLY, 0) != 0) - return; - fd = td->td_retval[0]; - td->td_retval[0] = temp; - translate_fd_major_minor(td, fd, buf); - fdclose(fdp, fdp->fd_ofiles[fd], fd, td); -} - -static inline void -translate_path_major_minor(struct thread *td, char *path, struct stat *buf) -{ - translate_path_major_minor_at(td, path, buf, AT_FDCWD); -} - static int newstat_copyout(struct stat *buf, void *ubuf) { @@ -187,9 +200,7 @@ linux_newstat(struct thread *td, struct printf(ARGS(newstat, "%s, *"), path); #endif - error = kern_stat(td, path, UIO_SYSSPACE, &buf); - if (!error) - translate_path_major_minor(td, path, &buf); + error = linux_kern_stat(td, path, UIO_SYSSPACE, &buf); LFREEPATH(path); if (error) return (error); @@ -210,9 +221,7 @@ linux_newlstat(struct thread *td, struct printf(ARGS(newlstat, "%s, *"), path); #endif - error = kern_lstat(td, path, UIO_SYSSPACE, &sb); - if (!error) - translate_path_major_minor(td, path, &sb); + error = linux_kern_lstat(td, path, UIO_SYSSPACE, &sb); LFREEPATH(path); if (error) return (error); @@ -279,12 +288,11 @@ linux_stat(struct thread *td, struct lin if (ldebug(stat)) printf(ARGS(stat, "%s, *"), path); #endif - error = kern_stat(td, path, UIO_SYSSPACE, &buf); + error = linux_kern_stat(td, path, UIO_SYSSPACE, &buf); if (error) { LFREEPATH(path); return (error); } - translate_path_major_minor(td, path, &buf); LFREEPATH(path); return(stat_copyout(&buf, args->up)); } @@ -302,12 +310,11 @@ linux_lstat(struct thread *td, struct li if (ldebug(lstat)) printf(ARGS(lstat, "%s, *"), path); #endif - error = kern_lstat(td, path, UIO_SYSSPACE, &buf); + error = linux_kern_lstat(td, path, UIO_SYSSPACE, &buf); if (error) { LFREEPATH(path); return (error); } - translate_path_major_minor(td, path, &buf); LFREEPATH(path); return(stat_copyout(&buf, args->up)); } @@ -526,9 +533,7 @@ linux_stat64(struct thread *td, struct l printf(ARGS(stat64, "%s, *"), filename); #endif - error = kern_stat(td, filename, UIO_SYSSPACE, &buf); - if (!error) - translate_path_major_minor(td, filename, &buf); + error = linux_kern_stat(td, filename, UIO_SYSSPACE, &buf); LFREEPATH(filename); if (error) return (error); @@ -549,9 +554,7 @@ linux_lstat64(struct thread *td, struct printf(ARGS(lstat64, "%s, *"), args->filename); #endif - error = kern_lstat(td, filename, UIO_SYSSPACE, &sb); - if (!error) - translate_path_major_minor(td, filename, &sb); + error = linux_kern_lstat(td, filename, UIO_SYSSPACE, &sb); LFREEPATH(filename); if (error) return (error); @@ -597,8 +600,7 @@ linux_fstatat64(struct thread *td, struc printf(ARGS(fstatat64, "%i, %s, %i"), args->dfd, path, args->flag); #endif - error = kern_statat(td, flag, dfd, path, UIO_SYSSPACE, &buf); - translate_path_major_minor_at(td, args->pathname, &buf, dfd); + error = linux_kern_statat(td, flag, dfd, path, UIO_SYSSPACE, &buf); if (!error) error = stat64_copyout(&buf, args->statbuf); LFREEPATH(path); Modified: user/alc/pagelock/sys/conf/files ============================================================================== --- user/alc/pagelock/sys/conf/files Sat Feb 21 21:02:53 2009 (r188901) +++ user/alc/pagelock/sys/conf/files Sat Feb 21 21:12:54 2009 (r188902) @@ -80,12 +80,12 @@ teken_state.h optional sc \ compile-with "${AWK} -f $S/dev/syscons/teken/gensequences $S/dev/syscons/teken/sequences > teken_state.h" \ no-obj no-implicit-rule before-depend \ clean "teken_state.h" -usbdevs.h optional usb \ +usbdevs.h optional usb | usb2_core \ dependency "$S/tools/usbdevs2h.awk $S/dev/usb/usbdevs" \ compile-with "${AWK} -f $S/tools/usbdevs2h.awk $S/dev/usb/usbdevs -h" \ no-obj no-implicit-rule before-depend \ clean "usbdevs.h" -usbdevs_data.h optional usb \ +usbdevs_data.h optional usb | usb2_core \ dependency "$S/tools/usbdevs2h.awk $S/dev/usb/usbdevs" \ compile-with "${AWK} -f $S/tools/usbdevs2h.awk $S/dev/usb/usbdevs -d" \ no-obj no-implicit-rule before-depend \ Modified: user/alc/pagelock/sys/conf/files.powerpc ============================================================================== --- user/alc/pagelock/sys/conf/files.powerpc Sat Feb 21 21:02:53 2009 (r188901) +++ user/alc/pagelock/sys/conf/files.powerpc Sat Feb 21 21:12:54 2009 (r188902) @@ -126,6 +126,7 @@ powerpc/powermac/uninorth.c optional pow powerpc/powermac/cuda.c optional powermac cuda powerpc/powermac/pmu.c optional powermac pmu powerpc/powermac/macgpio.c optional powermac pci +powerpc/powerpc/altivec.c optional aim powerpc/powerpc/atomic.S standard powerpc/powerpc/autoconf.c standard powerpc/powerpc/bcopy.c standard Modified: user/alc/pagelock/sys/dev/aac/aac.c ============================================================================== --- user/alc/pagelock/sys/dev/aac/aac.c Sat Feb 21 21:02:53 2009 (r188901) +++ user/alc/pagelock/sys/dev/aac/aac.c Sat Feb 21 21:12:54 2009 (r188902) @@ -71,6 +71,7 @@ static void aac_startup(void *arg); static void aac_add_container(struct aac_softc *sc, struct aac_mntinforesp *mir, int f); static void aac_get_bus_info(struct aac_softc *sc); +static void aac_daemon(void *arg); /* Command Processing */ static void aac_timeout(struct aac_softc *sc); @@ -292,6 +293,9 @@ aac_attach(struct aac_softc *sc) TAILQ_INIT(&sc->aac_container_tqh); TAILQ_INIT(&sc->aac_ev_cmfree); + /* Initialize the clock daemon callout. */ + callout_init_mtx(&sc->aac_daemontime, &sc->aac_io_lock, 0); + /* * Initialize the adapter. */ @@ -349,9 +353,34 @@ aac_attach(struct aac_softc *sc) aac_get_bus_info(sc); } + mtx_lock(&sc->aac_io_lock); + callout_reset(&sc->aac_daemontime, 30 * 60 * hz, aac_daemon, sc); + mtx_unlock(&sc->aac_io_lock); + return(0); } +static void +aac_daemon(void *arg) +{ + struct timeval tv; + struct aac_softc *sc; + struct aac_fib *fib; + + sc = arg; + mtx_assert(&sc->aac_io_lock, MA_OWNED); + + if (callout_pending(&sc->aac_daemontime) || + callout_active(&sc->aac_daemontime) == 0) + return; + getmicrotime(&tv); + aac_alloc_sync_fib(sc, &fib); + *(uint32_t *)fib->data = tv.tv_sec; + aac_sync_fib(sc, SendHostTime, 0, fib, sizeof(uint32_t)); + aac_release_sync_fib(sc); + callout_schedule(&sc->aac_daemontime, 30 * 60 * hz); +} + void aac_add_event(struct aac_softc *sc, struct aac_event *event) { @@ -632,9 +661,12 @@ aac_free(struct aac_softc *sc) bus_dma_tag_destroy(sc->aac_parent_dmat); /* release the register window mapping */ - if (sc->aac_regs_resource != NULL) + if (sc->aac_regs_res0 != NULL) + bus_release_resource(sc->aac_dev, SYS_RES_MEMORY, + sc->aac_regs_rid0, sc->aac_regs_res0); + if (sc->aac_hwif == AAC_HWIF_NARK && sc->aac_regs_res1 != NULL) bus_release_resource(sc->aac_dev, SYS_RES_MEMORY, - sc->aac_regs_rid, sc->aac_regs_resource); + sc->aac_regs_rid1, sc->aac_regs_res1); } /* @@ -654,6 +686,8 @@ aac_detach(device_t dev) if (sc->aac_state & AAC_STATE_OPEN) return(EBUSY); + callout_drain(&sc->aac_daemontime); + /* Remove the child containers */ while ((co = TAILQ_FIRST(&sc->aac_container_tqh)) != NULL) { error = device_delete_child(dev, co->co_disk); @@ -834,7 +868,7 @@ aac_new_intr(void *arg) } index &= ~2; for (i = 0; i < sizeof(struct aac_fib)/4; ++i) - ((u_int32_t *)fib)[i] = AAC_GETREG4(sc, index + i*4); + ((u_int32_t *)fib)[i] = AAC_MEM1_GETREG4(sc, index + i*4); aac_handle_aif(sc, fib); free(fib, M_AACBUF); @@ -1754,26 +1788,33 @@ aac_check_firmware(struct aac_softc *sc) /* Remap mem. resource, if required */ if ((sc->flags & AAC_FLAGS_NEW_COMM) && - atu_size > rman_get_size(sc->aac_regs_resource)) { + atu_size > rman_get_size(sc->aac_regs_res1)) { bus_release_resource( sc->aac_dev, SYS_RES_MEMORY, - sc->aac_regs_rid, sc->aac_regs_resource); - sc->aac_regs_resource = bus_alloc_resource( - sc->aac_dev, SYS_RES_MEMORY, &sc->aac_regs_rid, + sc->aac_regs_rid1, sc->aac_regs_res1); + sc->aac_regs_res1 = bus_alloc_resource( + sc->aac_dev, SYS_RES_MEMORY, &sc->aac_regs_rid1, 0ul, ~0ul, atu_size, RF_ACTIVE); - if (sc->aac_regs_resource == NULL) { - sc->aac_regs_resource = bus_alloc_resource_any( + if (sc->aac_regs_res1 == NULL) { + sc->aac_regs_res1 = bus_alloc_resource_any( sc->aac_dev, SYS_RES_MEMORY, - &sc->aac_regs_rid, RF_ACTIVE); - if (sc->aac_regs_resource == NULL) { + &sc->aac_regs_rid1, RF_ACTIVE); + if (sc->aac_regs_res1 == NULL) { device_printf(sc->aac_dev, "couldn't allocate register window\n"); return (ENXIO); } sc->flags &= ~AAC_FLAGS_NEW_COMM; } - sc->aac_btag = rman_get_bustag(sc->aac_regs_resource); - sc->aac_bhandle = rman_get_bushandle(sc->aac_regs_resource); + sc->aac_btag1 = rman_get_bustag(sc->aac_regs_res1); + sc->aac_bhandle1 = rman_get_bushandle(sc->aac_regs_res1); + + if (sc->aac_hwif == AAC_HWIF_NARK) { + sc->aac_regs_res0 = sc->aac_regs_res1; + sc->aac_regs_rid0 = sc->aac_regs_rid1; + sc->aac_btag0 = sc->aac_btag1; + sc->aac_bhandle0 = sc->aac_bhandle1; + } } /* Read preferred settings */ @@ -1944,10 +1985,10 @@ aac_init(struct aac_softc *sc) */ switch (sc->aac_hwif) { case AAC_HWIF_I960RX: - AAC_SETREG4(sc, AAC_RX_ODBR, ~0); + AAC_MEM0_SETREG4(sc, AAC_RX_ODBR, ~0); break; case AAC_HWIF_RKT: - AAC_SETREG4(sc, AAC_RKT_ODBR, ~0); + AAC_MEM0_SETREG4(sc, AAC_RKT_ODBR, ~0); break; default: break; @@ -2367,7 +2408,7 @@ aac_sa_get_fwstatus(struct aac_softc *sc { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_SA_FWSTATUS)); + return(AAC_MEM0_GETREG4(sc, AAC_SA_FWSTATUS)); } static int @@ -2375,7 +2416,7 @@ aac_rx_get_fwstatus(struct aac_softc *sc { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_RX_FWSTATUS)); + return(AAC_MEM0_GETREG4(sc, AAC_RX_OMR0)); } static int @@ -2385,7 +2426,7 @@ aac_fa_get_fwstatus(struct aac_softc *sc fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - val = AAC_GETREG4(sc, AAC_FA_FWSTATUS); + val = AAC_MEM0_GETREG4(sc, AAC_FA_FWSTATUS); return (val); } @@ -2394,7 +2435,7 @@ aac_rkt_get_fwstatus(struct aac_softc *s { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_RKT_FWSTATUS)); + return(AAC_MEM0_GETREG4(sc, AAC_RKT_OMR0)); } /* @@ -2406,7 +2447,7 @@ aac_sa_qnotify(struct aac_softc *sc, int { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG2(sc, AAC_SA_DOORBELL1_SET, qbit); + AAC_MEM0_SETREG2(sc, AAC_SA_DOORBELL1_SET, qbit); } static void @@ -2414,7 +2455,7 @@ aac_rx_qnotify(struct aac_softc *sc, int { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_RX_IDBR, qbit); + AAC_MEM0_SETREG4(sc, AAC_RX_IDBR, qbit); } static void @@ -2422,7 +2463,7 @@ aac_fa_qnotify(struct aac_softc *sc, int { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG2(sc, AAC_FA_DOORBELL1, qbit); + AAC_MEM0_SETREG2(sc, AAC_FA_DOORBELL1, qbit); AAC_FA_HACK(sc); } @@ -2431,7 +2472,7 @@ aac_rkt_qnotify(struct aac_softc *sc, in { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_RKT_IDBR, qbit); + AAC_MEM0_SETREG4(sc, AAC_RKT_IDBR, qbit); } /* @@ -2442,7 +2483,7 @@ aac_sa_get_istatus(struct aac_softc *sc) { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG2(sc, AAC_SA_DOORBELL0)); + return(AAC_MEM0_GETREG2(sc, AAC_SA_DOORBELL0)); } static int @@ -2450,7 +2491,7 @@ aac_rx_get_istatus(struct aac_softc *sc) { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_RX_ODBR)); + return(AAC_MEM0_GETREG4(sc, AAC_RX_ODBR)); } static int @@ -2460,7 +2501,7 @@ aac_fa_get_istatus(struct aac_softc *sc) fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - val = AAC_GETREG2(sc, AAC_FA_DOORBELL0); + val = AAC_MEM0_GETREG2(sc, AAC_FA_DOORBELL0); return (val); } @@ -2469,7 +2510,7 @@ aac_rkt_get_istatus(struct aac_softc *sc { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_RKT_ODBR)); + return(AAC_MEM0_GETREG4(sc, AAC_RKT_ODBR)); } /* @@ -2480,7 +2521,7 @@ aac_sa_clear_istatus(struct aac_softc *s { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG2(sc, AAC_SA_DOORBELL0_CLEAR, mask); + AAC_MEM0_SETREG2(sc, AAC_SA_DOORBELL0_CLEAR, mask); } static void @@ -2488,7 +2529,7 @@ aac_rx_clear_istatus(struct aac_softc *s { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_RX_ODBR, mask); + AAC_MEM0_SETREG4(sc, AAC_RX_ODBR, mask); } static void @@ -2496,7 +2537,7 @@ aac_fa_clear_istatus(struct aac_softc *s { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG2(sc, AAC_FA_DOORBELL0_CLEAR, mask); + AAC_MEM0_SETREG2(sc, AAC_FA_DOORBELL0_CLEAR, mask); AAC_FA_HACK(sc); } @@ -2505,7 +2546,7 @@ aac_rkt_clear_istatus(struct aac_softc * { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_RKT_ODBR, mask); + AAC_MEM0_SETREG4(sc, AAC_RKT_ODBR, mask); } /* @@ -2517,11 +2558,11 @@ aac_sa_set_mailbox(struct aac_softc *sc, { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_SA_MAILBOX, command); - AAC_SETREG4(sc, AAC_SA_MAILBOX + 4, arg0); - AAC_SETREG4(sc, AAC_SA_MAILBOX + 8, arg1); - AAC_SETREG4(sc, AAC_SA_MAILBOX + 12, arg2); - AAC_SETREG4(sc, AAC_SA_MAILBOX + 16, arg3); + AAC_MEM1_SETREG4(sc, AAC_SA_MAILBOX, command); + AAC_MEM1_SETREG4(sc, AAC_SA_MAILBOX + 4, arg0); + AAC_MEM1_SETREG4(sc, AAC_SA_MAILBOX + 8, arg1); + AAC_MEM1_SETREG4(sc, AAC_SA_MAILBOX + 12, arg2); + AAC_MEM1_SETREG4(sc, AAC_SA_MAILBOX + 16, arg3); } static void @@ -2530,11 +2571,11 @@ aac_rx_set_mailbox(struct aac_softc *sc, { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_RX_MAILBOX, command); - AAC_SETREG4(sc, AAC_RX_MAILBOX + 4, arg0); - AAC_SETREG4(sc, AAC_RX_MAILBOX + 8, arg1); - AAC_SETREG4(sc, AAC_RX_MAILBOX + 12, arg2); - AAC_SETREG4(sc, AAC_RX_MAILBOX + 16, arg3); + AAC_MEM1_SETREG4(sc, AAC_RX_MAILBOX, command); + AAC_MEM1_SETREG4(sc, AAC_RX_MAILBOX + 4, arg0); + AAC_MEM1_SETREG4(sc, AAC_RX_MAILBOX + 8, arg1); + AAC_MEM1_SETREG4(sc, AAC_RX_MAILBOX + 12, arg2); + AAC_MEM1_SETREG4(sc, AAC_RX_MAILBOX + 16, arg3); } static void @@ -2543,15 +2584,15 @@ aac_fa_set_mailbox(struct aac_softc *sc, { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_FA_MAILBOX, command); + AAC_MEM1_SETREG4(sc, AAC_FA_MAILBOX, command); AAC_FA_HACK(sc); - AAC_SETREG4(sc, AAC_FA_MAILBOX + 4, arg0); + AAC_MEM1_SETREG4(sc, AAC_FA_MAILBOX + 4, arg0); AAC_FA_HACK(sc); - AAC_SETREG4(sc, AAC_FA_MAILBOX + 8, arg1); + AAC_MEM1_SETREG4(sc, AAC_FA_MAILBOX + 8, arg1); AAC_FA_HACK(sc); - AAC_SETREG4(sc, AAC_FA_MAILBOX + 12, arg2); + AAC_MEM1_SETREG4(sc, AAC_FA_MAILBOX + 12, arg2); AAC_FA_HACK(sc); - AAC_SETREG4(sc, AAC_FA_MAILBOX + 16, arg3); + AAC_MEM1_SETREG4(sc, AAC_FA_MAILBOX + 16, arg3); AAC_FA_HACK(sc); } @@ -2561,11 +2602,11 @@ aac_rkt_set_mailbox(struct aac_softc *sc { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_RKT_MAILBOX, command); - AAC_SETREG4(sc, AAC_RKT_MAILBOX + 4, arg0); - AAC_SETREG4(sc, AAC_RKT_MAILBOX + 8, arg1); - AAC_SETREG4(sc, AAC_RKT_MAILBOX + 12, arg2); - AAC_SETREG4(sc, AAC_RKT_MAILBOX + 16, arg3); + AAC_MEM1_SETREG4(sc, AAC_RKT_MAILBOX, command); + AAC_MEM1_SETREG4(sc, AAC_RKT_MAILBOX + 4, arg0); + AAC_MEM1_SETREG4(sc, AAC_RKT_MAILBOX + 8, arg1); + AAC_MEM1_SETREG4(sc, AAC_RKT_MAILBOX + 12, arg2); + AAC_MEM1_SETREG4(sc, AAC_RKT_MAILBOX + 16, arg3); } /* @@ -2576,7 +2617,7 @@ aac_sa_get_mailbox(struct aac_softc *sc, { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_SA_MAILBOX + (mb * 4))); + return(AAC_MEM1_GETREG4(sc, AAC_SA_MAILBOX + (mb * 4))); } static int @@ -2584,7 +2625,7 @@ aac_rx_get_mailbox(struct aac_softc *sc, { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_RX_MAILBOX + (mb * 4))); + return(AAC_MEM1_GETREG4(sc, AAC_RX_MAILBOX + (mb * 4))); } static int @@ -2594,7 +2635,7 @@ aac_fa_get_mailbox(struct aac_softc *sc, fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - val = AAC_GETREG4(sc, AAC_FA_MAILBOX + (mb * 4)); + val = AAC_MEM1_GETREG4(sc, AAC_FA_MAILBOX + (mb * 4)); return (val); } @@ -2603,7 +2644,7 @@ aac_rkt_get_mailbox(struct aac_softc *sc { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_RKT_MAILBOX + (mb * 4))); + return(AAC_MEM1_GETREG4(sc, AAC_RKT_MAILBOX + (mb * 4))); } /* @@ -2615,9 +2656,9 @@ aac_sa_set_interrupts(struct aac_softc * fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "%sable interrupts", enable ? "en" : "dis"); if (enable) { - AAC_SETREG2((sc), AAC_SA_MASK0_CLEAR, AAC_DB_INTERRUPTS); + AAC_MEM0_SETREG2((sc), AAC_SA_MASK0_CLEAR, AAC_DB_INTERRUPTS); } else { - AAC_SETREG2((sc), AAC_SA_MASK0_SET, ~0); + AAC_MEM0_SETREG2((sc), AAC_SA_MASK0_SET, ~0); } } @@ -2628,11 +2669,11 @@ aac_rx_set_interrupts(struct aac_softc * if (enable) { if (sc->flags & AAC_FLAGS_NEW_COMM) - AAC_SETREG4(sc, AAC_RX_OIMR, ~AAC_DB_INT_NEW_COMM); + AAC_MEM0_SETREG4(sc, AAC_RX_OIMR, ~AAC_DB_INT_NEW_COMM); else - AAC_SETREG4(sc, AAC_RX_OIMR, ~AAC_DB_INTERRUPTS); + AAC_MEM0_SETREG4(sc, AAC_RX_OIMR, ~AAC_DB_INTERRUPTS); } else { - AAC_SETREG4(sc, AAC_RX_OIMR, ~0); + AAC_MEM0_SETREG4(sc, AAC_RX_OIMR, ~0); } } @@ -2642,10 +2683,10 @@ aac_fa_set_interrupts(struct aac_softc * fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "%sable interrupts", enable ? "en" : "dis"); if (enable) { - AAC_SETREG2((sc), AAC_FA_MASK0_CLEAR, AAC_DB_INTERRUPTS); + AAC_MEM0_SETREG2((sc), AAC_FA_MASK0_CLEAR, AAC_DB_INTERRUPTS); AAC_FA_HACK(sc); } else { - AAC_SETREG2((sc), AAC_FA_MASK0, ~0); + AAC_MEM0_SETREG2((sc), AAC_FA_MASK0, ~0); AAC_FA_HACK(sc); } } @@ -2657,11 +2698,11 @@ aac_rkt_set_interrupts(struct aac_softc if (enable) { if (sc->flags & AAC_FLAGS_NEW_COMM) - AAC_SETREG4(sc, AAC_RKT_OIMR, ~AAC_DB_INT_NEW_COMM); + AAC_MEM0_SETREG4(sc, AAC_RKT_OIMR, ~AAC_DB_INT_NEW_COMM); else - AAC_SETREG4(sc, AAC_RKT_OIMR, ~AAC_DB_INTERRUPTS); + AAC_MEM0_SETREG4(sc, AAC_RKT_OIMR, ~AAC_DB_INTERRUPTS); } else { - AAC_SETREG4(sc, AAC_RKT_OIMR, ~0); + AAC_MEM0_SETREG4(sc, AAC_RKT_OIMR, ~0); } } @@ -2675,19 +2716,19 @@ aac_rx_send_command(struct aac_softc *sc fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "send command (new comm.)"); - index = AAC_GETREG4(sc, AAC_RX_IQUE); + index = AAC_MEM0_GETREG4(sc, AAC_RX_IQUE); if (index == 0xffffffffL) - index = AAC_GETREG4(sc, AAC_RX_IQUE); + index = AAC_MEM0_GETREG4(sc, AAC_RX_IQUE); if (index == 0xffffffffL) return index; aac_enqueue_busy(cm); device = index; - AAC_SETREG4(sc, device, (u_int32_t)(cm->cm_fibphys & 0xffffffffUL)); + AAC_MEM1_SETREG4(sc, device, (u_int32_t)(cm->cm_fibphys & 0xffffffffUL)); device += 4; - AAC_SETREG4(sc, device, (u_int32_t)(cm->cm_fibphys >> 32)); + AAC_MEM1_SETREG4(sc, device, (u_int32_t)(cm->cm_fibphys >> 32)); device += 4; - AAC_SETREG4(sc, device, cm->cm_fib->Header.Size); - AAC_SETREG4(sc, AAC_RX_IQUE, index); + AAC_MEM1_SETREG4(sc, device, cm->cm_fib->Header.Size); + AAC_MEM0_SETREG4(sc, AAC_RX_IQUE, index); return 0; } @@ -2698,19 +2739,19 @@ aac_rkt_send_command(struct aac_softc *s fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, "send command (new comm.)"); - index = AAC_GETREG4(sc, AAC_RKT_IQUE); + index = AAC_MEM0_GETREG4(sc, AAC_RKT_IQUE); if (index == 0xffffffffL) - index = AAC_GETREG4(sc, AAC_RKT_IQUE); + index = AAC_MEM0_GETREG4(sc, AAC_RKT_IQUE); if (index == 0xffffffffL) return index; aac_enqueue_busy(cm); device = index; - AAC_SETREG4(sc, device, (u_int32_t)(cm->cm_fibphys & 0xffffffffUL)); + AAC_MEM1_SETREG4(sc, device, (u_int32_t)(cm->cm_fibphys & 0xffffffffUL)); device += 4; - AAC_SETREG4(sc, device, (u_int32_t)(cm->cm_fibphys >> 32)); + AAC_MEM1_SETREG4(sc, device, (u_int32_t)(cm->cm_fibphys >> 32)); device += 4; - AAC_SETREG4(sc, device, cm->cm_fib->Header.Size); - AAC_SETREG4(sc, AAC_RKT_IQUE, index); + AAC_MEM1_SETREG4(sc, device, cm->cm_fib->Header.Size); + AAC_MEM0_SETREG4(sc, AAC_RKT_IQUE, index); return 0; } @@ -2722,7 +2763,7 @@ aac_rx_get_outb_queue(struct aac_softc * { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_RX_OQUE)); + return(AAC_MEM0_GETREG4(sc, AAC_RX_OQUE)); } static int @@ -2730,7 +2771,7 @@ aac_rkt_get_outb_queue(struct aac_softc { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - return(AAC_GETREG4(sc, AAC_RKT_OQUE)); + return(AAC_MEM0_GETREG4(sc, AAC_RKT_OQUE)); } static void @@ -2738,7 +2779,7 @@ aac_rx_set_outb_queue(struct aac_softc * { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_RX_OQUE, index); + AAC_MEM0_SETREG4(sc, AAC_RX_OQUE, index); } static void @@ -2746,7 +2787,7 @@ aac_rkt_set_outb_queue(struct aac_softc { fwprintf(sc, HBA_FLAGS_DBG_FUNCTION_ENTRY_B, ""); - AAC_SETREG4(sc, AAC_RKT_OQUE, index); + AAC_MEM0_SETREG4(sc, AAC_RKT_OQUE, index); } /* Modified: user/alc/pagelock/sys/dev/aac/aac_debug.c ============================================================================== --- user/alc/pagelock/sys/dev/aac/aac_debug.c Sat Feb 21 21:02:53 2009 (r188901) +++ user/alc/pagelock/sys/dev/aac/aac_debug.c Sat Feb 21 21:12:54 2009 (r188902) @@ -134,17 +134,18 @@ aac_printstate0(void) aac_print_queues(sc); switch (sc->aac_hwif) { case AAC_HWIF_I960RX: + case AAC_HWIF_NARK: device_printf(sc->aac_dev, "IDBR 0x%08x IIMR 0x%08x " - "IISR 0x%08x\n", AAC_GETREG4(sc, AAC_RX_IDBR), - AAC_GETREG4(sc, AAC_RX_IIMR), AAC_GETREG4(sc, AAC_RX_IISR)); + "IISR 0x%08x\n", AAC_MEM0_GETREG4(sc, AAC_RX_IDBR), + AAC_MEM0_GETREG4(sc, AAC_RX_IIMR), AAC_MEM0_GETREG4(sc, AAC_RX_IISR)); device_printf(sc->aac_dev, "ODBR 0x%08x OIMR 0x%08x " - "OISR 0x%08x\n", AAC_GETREG4(sc, AAC_RX_ODBR), - AAC_GETREG4(sc, AAC_RX_OIMR), AAC_GETREG4(sc, AAC_RX_OISR)); - AAC_SETREG4(sc, AAC_RX_OIMR, 0/*~(AAC_DB_COMMAND_READY | + "OISR 0x%08x\n", AAC_MEM0_GETREG4(sc, AAC_RX_ODBR), + AAC_MEM0_GETREG4(sc, AAC_RX_OIMR), AAC_MEM0_GETREG4(sc, AAC_RX_OISR)); + AAC_MEM0_SETREG4(sc, AAC_RX_OIMR, 0/*~(AAC_DB_COMMAND_READY | AAC_DB_RESPONSE_READY | AAC_DB_PRINTF)*/); device_printf(sc->aac_dev, "ODBR 0x%08x OIMR 0x%08x " - "OISR 0x%08x\n", AAC_GETREG4(sc, AAC_RX_ODBR), - AAC_GETREG4(sc, AAC_RX_OIMR), AAC_GETREG4(sc, AAC_RX_OISR)); + "OISR 0x%08x\n", AAC_MEM0_GETREG4(sc, AAC_RX_ODBR), + AAC_MEM0_GETREG4(sc, AAC_RX_OIMR), AAC_MEM0_GETREG4(sc, AAC_RX_OISR)); break; case AAC_HWIF_STRONGARM: /* XXX implement */ Modified: user/alc/pagelock/sys/dev/aac/aac_pci.c ============================================================================== --- user/alc/pagelock/sys/dev/aac/aac_pci.c Sat Feb 21 21:02:53 2009 (r188901) +++ user/alc/pagelock/sys/dev/aac/aac_pci.c Sat Feb 21 21:12:54 2009 (r188902) @@ -372,21 +372,32 @@ aac_pci_attach(device_t dev) /* * Allocate the PCI register window. */ - sc->aac_regs_rid = PCIR_BAR(0); - if ((sc->aac_regs_resource = bus_alloc_resource_any(sc->aac_dev, - SYS_RES_MEMORY, - &sc->aac_regs_rid, - RF_ACTIVE)) == - NULL) { + sc->aac_regs_rid0 = PCIR_BAR(0); + if ((sc->aac_regs_res0 = bus_alloc_resource_any(sc->aac_dev, + SYS_RES_MEMORY, &sc->aac_regs_rid0, RF_ACTIVE)) == NULL) { device_printf(sc->aac_dev, - "couldn't allocate register window\n"); + "couldn't allocate register window 0\n"); goto out; } - sc->aac_btag = rman_get_bustag(sc->aac_regs_resource); - sc->aac_bhandle = rman_get_bushandle(sc->aac_regs_resource); + sc->aac_btag0 = rman_get_bustag(sc->aac_regs_res0); + sc->aac_bhandle0 = rman_get_bushandle(sc->aac_regs_res0); - /* assume failure is 'out of memory' */ - error = ENOMEM; + if (sc->aac_hwif == AAC_HWIF_NARK) { + sc->aac_regs_rid1 = PCIR_BAR(1); + if ((sc->aac_regs_res1 = bus_alloc_resource_any(sc->aac_dev, + SYS_RES_MEMORY, &sc->aac_regs_rid1, RF_ACTIVE)) == NULL) { + device_printf(sc->aac_dev, + "couldn't allocate register window 1\n"); + goto out; + } + sc->aac_btag1 = rman_get_bustag(sc->aac_regs_res1); + sc->aac_bhandle1 = rman_get_bushandle(sc->aac_regs_res1); + } else { + sc->aac_regs_res1 = sc->aac_regs_res0; + sc->aac_regs_rid1 = sc->aac_regs_rid0; + sc->aac_btag1 = sc->aac_btag0; + sc->aac_bhandle1 = sc->aac_bhandle0; + } /* * Allocate the parent bus DMA tag appropriate for our PCI interface. @@ -416,7 +427,8 @@ aac_pci_attach(device_t dev) sc->aac_hwif = id->hwif; switch(sc->aac_hwif) { case AAC_HWIF_I960RX: - fwprintf(sc, HBA_FLAGS_DBG_INIT_B, "set hardware up for i960Rx"); + case AAC_HWIF_NARK: + fwprintf(sc, HBA_FLAGS_DBG_INIT_B, "set hardware up for i960Rx/NARK"); sc->aac_if = aac_rx_interface; break; case AAC_HWIF_STRONGARM: Modified: user/alc/pagelock/sys/dev/aac/aacreg.h ============================================================================== --- user/alc/pagelock/sys/dev/aac/aacreg.h Sat Feb 21 21:02:53 2009 (r188901) +++ user/alc/pagelock/sys/dev/aac/aacreg.h Sat Feb 21 21:12:54 2009 (r188902) @@ -1468,7 +1468,7 @@ enum { #define AAC_FA_FWSTATUS 0x2c /* Mailbox 7 */ #define AAC_FA_INTSRC 0x900 -#define AAC_FA_HACK(sc) (void)AAC_GETREG4(sc, AAC_FA_INTSRC) +#define AAC_FA_HACK(sc) (void)AAC_MEM0_GETREG4(sc, AAC_FA_INTSRC) /* * Register definitions for the Adaptec AAC-364 'Jalapeno I/II' adapters, based @@ -1495,6 +1495,8 @@ enum { * and other related adapters. */ +#define AAC_RX_OMR0 0x18 /* outbound message register 0 */ +#define AAC_RX_OMR1 0x1c /* outbound message register 1 */ #define AAC_RX_IDBR 0x20 /* inbound doorbell register */ #define AAC_RX_IISR 0x24 /* inbound interrupt status register */ #define AAC_RX_IIMR 0x28 /* inbound interrupt mask register */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902212112.n1LLCtx0075549>