From owner-svn-src-projects@FreeBSD.ORG Wed Jan 14 14:50:39 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 50B3423C; Wed, 14 Jan 2015 14:50:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39661C2E; Wed, 14 Jan 2015 14:50:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0EEodJk029483; Wed, 14 Jan 2015 14:50:39 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0EEoWgf028829; Wed, 14 Jan 2015 14:50:32 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201501141450.t0EEoWgf028829@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 14 Jan 2015 14:50:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r277182 - in projects/ifnet: contrib/elftoolchain/libdwarf etc etc/mtree lib lib/libclang_rt lib/libmagic lib/libpmc lib/libusb sbin/devd share/man/man7 sys/amd64/include sys/amd64/vmm ... X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 14:50:39 -0000 Author: glebius Date: Wed Jan 14 14:50:31 2015 New Revision: 277182 URL: https://svnweb.freebsd.org/changeset/base/277182 Log: Merge head up to r277179. Added: projects/ifnet/sys/dev/usb/template/usb_template_serialnet.c - copied unchanged from r277179, head/sys/dev/usb/template/usb_template_serialnet.c projects/ifnet/sys/powerpc/powerpc/ptrace_machdep.c - copied unchanged from r277179, head/sys/powerpc/powerpc/ptrace_machdep.c projects/ifnet/usr.sbin/pmcstudy/ - copied from r277179, head/usr.sbin/pmcstudy/ Modified: projects/ifnet/contrib/elftoolchain/libdwarf/dwarf_attrval.c projects/ifnet/etc/devd.conf projects/ifnet/etc/mtree/BSD.debug.dist projects/ifnet/etc/mtree/BSD.usr.dist projects/ifnet/lib/Makefile projects/ifnet/lib/libclang_rt/Makefile projects/ifnet/lib/libmagic/config.h projects/ifnet/lib/libpmc/libpmc.c projects/ifnet/lib/libusb/libusb.3 projects/ifnet/sbin/devd/devd.conf.5 projects/ifnet/share/man/man7/hier.7 projects/ifnet/sys/amd64/include/vmm.h (contents, props changed) projects/ifnet/sys/amd64/include/vmm_dev.h (contents, props changed) projects/ifnet/sys/amd64/vmm/amd/svm.c projects/ifnet/sys/amd64/vmm/intel/vmx.c projects/ifnet/sys/amd64/vmm/vmm.c projects/ifnet/sys/amd64/vmm/vmm_dev.c projects/ifnet/sys/amd64/vmm/vmm_ioport.c projects/ifnet/sys/arm/arm/cpufunc.c projects/ifnet/sys/arm/arm/identcpu.c projects/ifnet/sys/arm/include/armreg.h projects/ifnet/sys/arm/samsung/exynos/exynos_uart.c projects/ifnet/sys/boot/usb/usbcore.mk projects/ifnet/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c projects/ifnet/sys/conf/files projects/ifnet/sys/conf/files.powerpc projects/ifnet/sys/dev/ahci/ahci.h projects/ifnet/sys/dev/cardbus/cardbus.c projects/ifnet/sys/dev/cxgbe/iw_cxgbe/cm.c projects/ifnet/sys/dev/hwpmc/hwpmc_core.c projects/ifnet/sys/dev/hwpmc/hwpmc_intel.c projects/ifnet/sys/dev/hwpmc/hwpmc_logging.c projects/ifnet/sys/dev/hwpmc/hwpmc_mod.c projects/ifnet/sys/dev/hwpmc/hwpmc_piv.c projects/ifnet/sys/dev/hwpmc/hwpmc_uncore.c projects/ifnet/sys/dev/hwpmc/hwpmc_x86.c projects/ifnet/sys/dev/hwpmc/pmc_events.h projects/ifnet/sys/dev/ixl/if_ixl.c projects/ifnet/sys/dev/ixl/ixl_txrx.c projects/ifnet/sys/dev/mii/jmphy.c projects/ifnet/sys/dev/mii/mii.c projects/ifnet/sys/dev/mii/mii_physubr.c projects/ifnet/sys/dev/mii/miivar.h projects/ifnet/sys/dev/mii/rgephy.c projects/ifnet/sys/dev/pccbb/pccbb.c projects/ifnet/sys/dev/pccbb/pccbb_isa.c projects/ifnet/sys/dev/pccbb/pccbb_pci.c projects/ifnet/sys/dev/pccbb/pccbbvar.h projects/ifnet/sys/dev/uart/uart.h projects/ifnet/sys/dev/uart/uart_bus_fdt.c projects/ifnet/sys/dev/usb/controller/usb_controller.c projects/ifnet/sys/dev/usb/template/usb_template.c projects/ifnet/sys/dev/usb/template/usb_template.h projects/ifnet/sys/dev/usb/usb_bus.h projects/ifnet/sys/dev/usb/usb_dev.c projects/ifnet/sys/dev/usb/usb_device.c projects/ifnet/sys/dev/usb/usb_device.h projects/ifnet/sys/dev/usb/usb_ioctl.h projects/ifnet/sys/fs/cuse/cuse.c projects/ifnet/sys/geom/geom_dev.c projects/ifnet/sys/kern/kern_conf.c projects/ifnet/sys/kern/kern_jail.c projects/ifnet/sys/modules/cardbus/Makefile projects/ifnet/sys/modules/cbb/Makefile projects/ifnet/sys/modules/usb/template/Makefile projects/ifnet/sys/powerpc/aim/mmu_oea64.c projects/ifnet/sys/powerpc/include/ptrace.h projects/ifnet/sys/powerpc/include/reg.h projects/ifnet/sys/sys/capsicum.h projects/ifnet/sys/sys/conf.h projects/ifnet/sys/sys/jail.h projects/ifnet/sys/sys/pmc.h projects/ifnet/tools/build/mk/OptionalObsoleteFiles.inc projects/ifnet/usr.bin/gcore/elfcore.c projects/ifnet/usr.sbin/Makefile projects/ifnet/usr.sbin/fstyp/ext2fs.c projects/ifnet/usr.sbin/fstyp/fstyp.8 Directory Properties: projects/ifnet/ (props changed) projects/ifnet/contrib/elftoolchain/ (props changed) projects/ifnet/etc/ (props changed) projects/ifnet/sbin/ (props changed) projects/ifnet/share/ (props changed) projects/ifnet/sys/ (props changed) projects/ifnet/sys/amd64/vmm/ (props changed) projects/ifnet/sys/boot/ (props changed) projects/ifnet/sys/cddl/contrib/opensolaris/ (props changed) projects/ifnet/sys/conf/ (props changed) Modified: projects/ifnet/contrib/elftoolchain/libdwarf/dwarf_attrval.c ============================================================================== --- projects/ifnet/contrib/elftoolchain/libdwarf/dwarf_attrval.c Wed Jan 14 14:49:58 2015 (r277181) +++ projects/ifnet/contrib/elftoolchain/libdwarf/dwarf_attrval.c Wed Jan 14 14:50:31 2015 (r277182) @@ -125,6 +125,7 @@ dwarf_attrval_signed(Dwarf_Die die, Dwar break; case DW_FORM_data4: *valp = (int32_t) at->u[0].s64; + break; case DW_FORM_data8: case DW_FORM_sdata: *valp = at->u[0].s64; Modified: projects/ifnet/etc/devd.conf ============================================================================== --- projects/ifnet/etc/devd.conf Wed Jan 14 14:49:58 2015 (r277181) +++ projects/ifnet/etc/devd.conf Wed Jan 14 14:50:31 2015 (r277182) @@ -318,16 +318,11 @@ notify 0 { action "/usr/local/etc/rc.d/postgresql restart"; }; -# Discard autofs caches, useful for the -media special map. The one -# second delay is for GEOM to finish tasting. -# -# XXX: We should probably have a devctl(4) event that fires after GEOM -# tasting. -# +# Discard autofs caches, useful for the -media special map. notify 100 { - match "system" "DEVFS"; - match "cdev" "(da|mmcsd)[0-9]+"; - action "sleep 1 && /usr/sbin/automount -c"; + match "system" "GEOM"; + match "subsystem" "DEV"; + action "/usr/sbin/automount -c"; }; */ Modified: projects/ifnet/etc/mtree/BSD.debug.dist ============================================================================== --- projects/ifnet/etc/mtree/BSD.debug.dist Wed Jan 14 14:49:58 2015 (r277181) +++ projects/ifnet/etc/mtree/BSD.debug.dist Wed Jan 14 14:50:31 2015 (r277182) @@ -24,6 +24,14 @@ games .. lib + clang + 3.5.0 + lib + freebsd + .. + .. + .. + .. engines .. i18n Modified: projects/ifnet/etc/mtree/BSD.usr.dist ============================================================================== --- projects/ifnet/etc/mtree/BSD.usr.dist Wed Jan 14 14:49:58 2015 (r277181) +++ projects/ifnet/etc/mtree/BSD.usr.dist Wed Jan 14 14:50:31 2015 (r277182) @@ -14,6 +14,14 @@ lib aout .. + clang + 3.5.0 + lib + freebsd + .. + .. + .. + .. compat aout .. Modified: projects/ifnet/lib/Makefile ============================================================================== --- projects/ifnet/lib/Makefile Wed Jan 14 14:49:58 2015 (r277181) +++ projects/ifnet/lib/Makefile Wed Jan 14 14:50:31 2015 (r277182) @@ -13,6 +13,7 @@ SUBDIR_ORDERED= ${_csu} \ libc \ libc_nonshared \ libcompiler_rt \ + ${_libclang_rt} \ ${_libcplusplus} \ ${_libcxxrt} \ libelf \ @@ -211,6 +212,15 @@ _libcom_err= libcom_err _libldns= libldns .endif +# The libraries under libclang_rt can only be built by clang, and only make +# sense to build when clang is enabled at all. Furthermore, they can only be +# built for certain architectures. +.if ${MK_CLANG} != "no" && ${COMPILER_TYPE} == "clang" && \ + (${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" || \ + (${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH} != "armeb")) +_libclang_rt= libclang_rt +.endif + .if ${MK_LIBCPLUSPLUS} != "no" _libcxxrt= libcxxrt _libcplusplus= libc++ Modified: projects/ifnet/lib/libclang_rt/Makefile ============================================================================== --- projects/ifnet/lib/libclang_rt/Makefile Wed Jan 14 14:49:58 2015 (r277181) +++ projects/ifnet/lib/libclang_rt/Makefile Wed Jan 14 14:50:31 2015 (r277182) @@ -1,10 +1,18 @@ # $FreeBSD$ -SUBDIR= asan\ - asan_cxx\ - profile\ - san\ - ubsan\ - ubsan_cxx +.include + +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" +SUBDIR+= asan\ + asan_cxx\ + san\ + ubsan\ + ubsan_cxx +.endif + +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" || \ + (${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH} != "armeb") +SUBDIR+= profile +.endif .include Modified: projects/ifnet/lib/libmagic/config.h ============================================================================== --- projects/ifnet/lib/libmagic/config.h Wed Jan 14 14:49:58 2015 (r277181) +++ projects/ifnet/lib/libmagic/config.h Wed Jan 14 14:50:31 2015 (r277182) @@ -1,5 +1,13 @@ /* $FreeBSD$ */ +/* Get __FreeBSD_version. */ +#include + +/* Only specific versions of FreeBSD support xlocale */ +#if __FreeBSD_version >= 1000002 || (__FreeBSD_version < 1000000 && __FreeBSD_version >= 900506) +#define FREEBSD_XLOCALE_SUPPORT 1 +#endif + /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ @@ -48,7 +56,9 @@ #define HAVE_FORK 1 /* Define to 1 if you have the `freelocale' function. */ +#ifdef FREEBSD_XLOCALE_SUPPORT #define HAVE_FREELOCALE 1 +#endif /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ #define HAVE_FSEEKO 1 @@ -102,7 +112,9 @@ #define HAVE_MMAP 1 /* Define to 1 if you have the `newlocale' function. */ +#ifdef FREEBSD_XLOCALE_SUPPORT #define HAVE_NEWLOCALE 1 +#endif /* Define to 1 if you have the `pread' function. */ #define HAVE_PREAD 1 @@ -195,7 +207,9 @@ #define HAVE_UNISTD_H 1 /* Define to 1 if you have the `uselocale' function. */ +#ifdef FREEBSD_XLOCALE_SUPPORT #define HAVE_USELOCALE 1 +#endif /* Define to 1 if you have the `utime' function. */ #define HAVE_UTIME 1 @@ -235,7 +249,9 @@ #define HAVE_WORKING_VFORK 1 /* Define to 1 if you have the header file. */ +#ifdef FREEBSD_XLOCALE_SUPPORT #define HAVE_XLOCALE_H 1 +#endif /* Define to 1 if you have the header file. */ #define HAVE_ZLIB_H 1 Modified: projects/ifnet/lib/libpmc/libpmc.c ============================================================================== --- projects/ifnet/lib/libpmc/libpmc.c Wed Jan 14 14:49:58 2015 (r277181) +++ projects/ifnet/lib/libpmc/libpmc.c Wed Jan 14 14:50:31 2015 (r277182) @@ -200,6 +200,12 @@ static const struct pmc_event_descr hasw __PMC_EV_ALIAS_HASWELL() }; +static const struct pmc_event_descr haswell_xeon_event_table[] = +{ + __PMC_EV_ALIAS_HASWELL_XEON() +}; + + static const struct pmc_event_descr ivybridge_event_table[] = { __PMC_EV_ALIAS_IVYBRIDGE() @@ -267,6 +273,7 @@ PMC_MDEP_TABLE(core2, IAP, PMC_CLASS_SOF PMC_MDEP_TABLE(corei7, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); PMC_MDEP_TABLE(nehalem_ex, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(haswell, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); +PMC_MDEP_TABLE(haswell_xeon, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); PMC_MDEP_TABLE(ivybridge, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(ivybridge_xeon, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(sandybridge, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); @@ -312,6 +319,7 @@ PMC_CLASS_TABLE_DESC(core2, IAP, core2, PMC_CLASS_TABLE_DESC(corei7, IAP, corei7, iap); PMC_CLASS_TABLE_DESC(nehalem_ex, IAP, nehalem_ex, iap); PMC_CLASS_TABLE_DESC(haswell, IAP, haswell, iap); +PMC_CLASS_TABLE_DESC(haswell_xeon, IAP, haswell, iap); PMC_CLASS_TABLE_DESC(ivybridge, IAP, ivybridge, iap); PMC_CLASS_TABLE_DESC(ivybridge_xeon, IAP, ivybridge_xeon, iap); PMC_CLASS_TABLE_DESC(sandybridge, IAP, sandybridge, iap); @@ -626,6 +634,8 @@ static struct pmc_event_alias core2_alia #define nehalem_ex_aliases_without_iaf core2_aliases_without_iaf #define haswell_aliases core2_aliases #define haswell_aliases_without_iaf core2_aliases_without_iaf +#define haswell_xeon_aliases core2_aliases +#define haswell_xeon_aliases_without_iaf core2_aliases_without_iaf #define ivybridge_aliases core2_aliases #define ivybridge_aliases_without_iaf core2_aliases_without_iaf #define ivybridge_xeon_aliases core2_aliases @@ -896,7 +906,8 @@ iap_allocate_pmc(enum pmc_event pe, char n = pmc_parse_mask(iap_rsp_mask_sb_sbx_ib, p, &rsp); } else return (-1); - } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_HASWELL) { + } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_HASWELL || + cpu_info.pm_cputype == PMC_CPU_INTEL_HASWELL_XEON) { if (KWPREFIXMATCH(p, IAP_KW_RSP "=")) { n = pmc_parse_mask(iap_rsp_mask_haswell, p, &rsp); } else @@ -2788,6 +2799,10 @@ pmc_event_names_of_class(enum pmc_class ev = haswell_event_table; count = PMC_EVENT_TABLE_SIZE(haswell); break; + case PMC_CPU_INTEL_HASWELL_XEON: + ev = haswell_xeon_event_table; + count = PMC_EVENT_TABLE_SIZE(haswell_xeon); + break; case PMC_CPU_INTEL_IVYBRIDGE: ev = ivybridge_event_table; count = PMC_EVENT_TABLE_SIZE(ivybridge); @@ -3115,6 +3130,9 @@ pmc_init(void) pmc_class_table[n++] = &haswelluc_class_table_descr; PMC_MDEP_INIT_INTEL_V2(haswell); break; + case PMC_CPU_INTEL_HASWELL_XEON: + PMC_MDEP_INIT_INTEL_V2(haswell_xeon); + break; case PMC_CPU_INTEL_IVYBRIDGE: PMC_MDEP_INIT_INTEL_V2(ivybridge); break; @@ -3280,6 +3298,11 @@ _pmc_name_of_event(enum pmc_event pe, en ev = haswell_event_table; evfence = haswell_event_table + PMC_EVENT_TABLE_SIZE(haswell); break; + case PMC_CPU_INTEL_HASWELL_XEON: + ev = haswell_xeon_event_table; + evfence = haswell_xeon_event_table + PMC_EVENT_TABLE_SIZE(haswell_xeon); + break; + case PMC_CPU_INTEL_IVYBRIDGE: ev = ivybridge_event_table; evfence = ivybridge_event_table + PMC_EVENT_TABLE_SIZE(ivybridge); Modified: projects/ifnet/lib/libusb/libusb.3 ============================================================================== --- projects/ifnet/lib/libusb/libusb.3 Wed Jan 14 14:49:58 2015 (r277181) +++ projects/ifnet/lib/libusb/libusb.3 Wed Jan 14 14:50:31 2015 (r277182) @@ -42,9 +42,9 @@ The .Nm library contains interfaces for directly managing a usb device. The current implementation supports v1.0 of the libusb API. -.Sh LIBRARY INITIALISATION / DEINITIALISATION +.Sh LIBRARY INITIALISATION AND DEINITIALISATION .Ft int -.Fn libusb_init libusb_context **ctx +.Fn libusb_init "libusb_context **ctx" This function initialises libusb. It must be called at the beginning of the program, before other libusb routines are used. Modified: projects/ifnet/sbin/devd/devd.conf.5 ============================================================================== --- projects/ifnet/sbin/devd/devd.conf.5 Wed Jan 14 14:49:58 2015 (r277181) +++ projects/ifnet/sbin/devd/devd.conf.5 Wed Jan 14 14:50:31 2015 (r277182) @@ -41,7 +41,7 @@ .\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS .\" SOFTWARE. .\" -.Dd February 22, 2013 +.Dd January 14, 2015 .Dt DEVD.CONF 5 .Os .Sh NAME @@ -370,6 +370,33 @@ node is destroyed. .El .El .Pp +.It Li GEOM +Events related to the +.Xr geom 4 +framework. +The difference compared to +.Li DEVFS +is that +.Li GEOM +only includes disk-like devices. +.Bl -tag -width ".Sy Subsystem" -compact +.It Sy Subsystem +.It Li DEV +.Bl -tag -width ".Li MEDIACHANGE" -compact +.It Sy Type +.It Li CREATE +A +.Xr geom 4 +device node is created. +.It Li DESTROY +A +.Xr geom 4 +device node is destroyed. +.It Li MEDIACHANGE +Physical media has changed. +.El +.El +.Pp .It Li USB Events related to the USB subsystem. .Bl -tag -width ".Sy Subsystem" -compact Modified: projects/ifnet/share/man/man7/hier.7 ============================================================================== --- projects/ifnet/share/man/man7/hier.7 Wed Jan 14 14:49:58 2015 (r277181) +++ projects/ifnet/share/man/man7/hier.7 Wed Jan 14 14:50:31 2015 (r277182) @@ -28,7 +28,7 @@ .\" @(#)hier.7 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd November 10, 2014 +.Dd January 14, 2015 .Dt HIER 7 .Os .Sh NAME @@ -159,6 +159,10 @@ floppy disks .It Pa /mnt/ empty directory commonly used by system administrators as a temporary mount point +.It Pa /net/ +automounted NFS shares; +see +.Xr auto_master 5 .It Pa /proc/ process file system; see Modified: projects/ifnet/sys/amd64/include/vmm.h ============================================================================== --- projects/ifnet/sys/amd64/include/vmm.h Wed Jan 14 14:49:58 2015 (r277181) +++ projects/ifnet/sys/amd64/include/vmm.h Wed Jan 14 14:50:31 2015 (r277182) @@ -289,7 +289,7 @@ struct vpmtmr *vm_pmtmr(struct vm *vm); struct vrtc *vm_rtc(struct vm *vm); /* - * Inject exception 'vme' into the guest vcpu. This function returns 0 on + * Inject exception 'vector' into the guest vcpu. This function returns 0 on * success and non-zero on failure. * * Wrapper functions like 'vm_inject_gp()' should be preferred to calling @@ -299,7 +299,8 @@ struct vrtc *vm_rtc(struct vm *vm); * This function should only be called in the context of the thread that is * executing this vcpu. */ -int vm_inject_exception(struct vm *vm, int vcpuid, struct vm_exception *vme); +int vm_inject_exception(struct vm *vm, int vcpuid, int vector, int err_valid, + uint32_t errcode, int restart_instruction); /* * This function is called after a VM-exit that occurred during exception or @@ -628,4 +629,6 @@ vm_inject_ss(void *vm, int vcpuid, int e void vm_inject_pf(void *vm, int vcpuid, int error_code, uint64_t cr2); +int vm_restart_instruction(void *vm, int vcpuid); + #endif /* _VMM_H_ */ Modified: projects/ifnet/sys/amd64/include/vmm_dev.h ============================================================================== --- projects/ifnet/sys/amd64/include/vmm_dev.h Wed Jan 14 14:49:58 2015 (r277181) +++ projects/ifnet/sys/amd64/include/vmm_dev.h Wed Jan 14 14:50:31 2015 (r277182) @@ -63,6 +63,7 @@ struct vm_exception { int vector; uint32_t error_code; int error_code_valid; + int restart_instruction; }; struct vm_lapic_msi { Modified: projects/ifnet/sys/amd64/vmm/amd/svm.c ============================================================================== --- projects/ifnet/sys/amd64/vmm/amd/svm.c Wed Jan 14 14:49:58 2015 (r277181) +++ projects/ifnet/sys/amd64/vmm/amd/svm.c Wed Jan 14 14:50:31 2015 (r277182) @@ -1201,7 +1201,6 @@ svm_vmexit(struct svm_softc *svm_sc, int struct vmcb_state *state; struct vmcb_ctrl *ctrl; struct svm_regctx *ctx; - struct vm_exception exception; uint64_t code, info1, info2, val; uint32_t eax, ecx, edx; int error, errcode_valid, handled, idtvec, reflect; @@ -1315,6 +1314,7 @@ svm_vmexit(struct svm_softc *svm_sc, int /* fallthru */ default: errcode_valid = 0; + info1 = 0; break; } KASSERT(vmexit->inst_length == 0, ("invalid inst_length (%d) " @@ -1323,17 +1323,10 @@ svm_vmexit(struct svm_softc *svm_sc, int if (reflect) { /* Reflect the exception back into the guest */ - bzero(&exception, sizeof(struct vm_exception)); - exception.vector = idtvec; - if (errcode_valid) { - exception.error_code = info1; - exception.error_code_valid = 1; - } VCPU_CTR2(svm_sc->vm, vcpu, "Reflecting exception " - "%d/%#x into the guest", exception.vector, - exception.error_code); - error = vm_inject_exception(svm_sc->vm, vcpu, - &exception); + "%d/%#x into the guest", idtvec, (int)info1); + error = vm_inject_exception(svm_sc->vm, vcpu, idtvec, + errcode_valid, info1, 0); KASSERT(error == 0, ("%s: vm_inject_exception error %d", __func__, error)); } Modified: projects/ifnet/sys/amd64/vmm/intel/vmx.c ============================================================================== --- projects/ifnet/sys/amd64/vmm/intel/vmx.c Wed Jan 14 14:49:58 2015 (r277181) +++ projects/ifnet/sys/amd64/vmm/intel/vmx.c Wed Jan 14 14:50:31 2015 (r277182) @@ -1784,7 +1784,7 @@ vmexit_inst_emul(struct vm_exit *vmexit, { struct vm_guest_paging *paging; uint32_t csar; - + paging = &vmexit->u.inst_emul.paging; vmexit->exitcode = VM_EXITCODE_INST_EMUL; @@ -2073,12 +2073,11 @@ emulate_rdmsr(struct vmx *vmx, int vcpui static int vmx_exit_process(struct vmx *vmx, int vcpu, struct vm_exit *vmexit) { - int error, handled, in; + int error, errcode, errcode_valid, handled, in; struct vmxctx *vmxctx; struct vlapic *vlapic; struct vm_inout_str *vis; struct vm_task_switch *ts; - struct vm_exception vmexc; uint32_t eax, ecx, edx, idtvec_info, idtvec_err, intr_info, inst_info; uint32_t intr_type, intr_vec, reason; uint64_t exitintinfo, qual, gpa; @@ -2263,6 +2262,7 @@ vmx_exit_process(struct vmx *vmx, int vc case EXIT_REASON_MTF: vmm_stat_incr(vmx->vm, vcpu, VMEXIT_MTRAP, 1); vmexit->exitcode = VM_EXITCODE_MTRAP; + vmexit->inst_length = 0; break; case EXIT_REASON_PAUSE: vmm_stat_incr(vmx->vm, vcpu, VMEXIT_PAUSE, 1); @@ -2389,15 +2389,15 @@ vmx_exit_process(struct vmx *vmx, int vc vmcs_write(VMCS_ENTRY_INST_LENGTH, vmexit->inst_length); /* Reflect all other exceptions back into the guest */ - bzero(&vmexc, sizeof(struct vm_exception)); - vmexc.vector = intr_vec; + errcode_valid = errcode = 0; if (intr_info & VMCS_INTR_DEL_ERRCODE) { - vmexc.error_code_valid = 1; - vmexc.error_code = vmcs_read(VMCS_EXIT_INTR_ERRCODE); + errcode_valid = 1; + errcode = vmcs_read(VMCS_EXIT_INTR_ERRCODE); } VCPU_CTR2(vmx->vm, vcpu, "Reflecting exception %d/%#x into " - "the guest", vmexc.vector, vmexc.error_code); - error = vm_inject_exception(vmx->vm, vcpu, &vmexc); + "the guest", intr_vec, errcode); + error = vm_inject_exception(vmx->vm, vcpu, intr_vec, + errcode_valid, errcode, 0); KASSERT(error == 0, ("%s: vm_inject_exception error %d", __func__, error)); return (1); Modified: projects/ifnet/sys/amd64/vmm/vmm.c ============================================================================== --- projects/ifnet/sys/amd64/vmm/vmm.c Wed Jan 14 14:49:58 2015 (r277181) +++ projects/ifnet/sys/amd64/vmm/vmm.c Wed Jan 14 14:50:31 2015 (r277182) @@ -101,8 +101,10 @@ struct vcpu { uint64_t exitintinfo; /* (i) events pending at VM exit */ int nmi_pending; /* (i) NMI pending */ int extint_pending; /* (i) INTR pending */ - struct vm_exception exception; /* (x) exception collateral */ int exception_pending; /* (i) exception pending */ + int exc_vector; /* (x) exception collateral */ + int exc_errcode_valid; + uint32_t exc_errcode; struct savefpu *guestfpu; /* (a,i) guest fpu state */ uint64_t guest_xcr0; /* (i) guest %xcr0 register */ void *stats; /* (a,i) statistics */ @@ -1223,7 +1225,7 @@ vm_handle_paging(struct vm *vm, int vcpu return (EFAULT); done: /* restart execution at the faulting instruction */ - vme->inst_length = 0; + vm_restart_instruction(vm, vcpuid); return (0); } @@ -1526,6 +1528,20 @@ restart: } int +vm_restart_instruction(void *arg, int vcpuid) +{ + struct vcpu *vcpu; + struct vm *vm = arg; + + if (vcpuid < 0 || vcpuid >= VM_MAXCPU) + return (EINVAL); + + vcpu = &vm->vcpu[vcpuid]; + vcpu->exitinfo.inst_length = 0; + return (0); +} + +int vm_exit_intinfo(struct vm *vm, int vcpuid, uint64_t info) { struct vcpu *vcpu; @@ -1655,11 +1671,11 @@ vcpu_exception_intinfo(struct vcpu *vcpu uint64_t info = 0; if (vcpu->exception_pending) { - info = vcpu->exception.vector & 0xff; + info = vcpu->exc_vector & 0xff; info |= VM_INTINFO_VALID | VM_INTINFO_HWEXCEPTION; - if (vcpu->exception.error_code_valid) { + if (vcpu->exc_errcode_valid) { info |= VM_INTINFO_DEL_ERRCODE; - info |= (uint64_t)vcpu->exception.error_code << 32; + info |= (uint64_t)vcpu->exc_errcode << 32; } } return (info); @@ -1684,7 +1700,7 @@ vm_entry_intinfo(struct vm *vm, int vcpu info2 = vcpu_exception_intinfo(vcpu); vcpu->exception_pending = 0; VCPU_CTR2(vm, vcpuid, "Exception %d delivered: %#lx", - vcpu->exception.vector, info2); + vcpu->exc_vector, info2); } if ((info1 & VM_INTINFO_VALID) && (info2 & VM_INTINFO_VALID)) { @@ -1722,7 +1738,8 @@ vm_get_intinfo(struct vm *vm, int vcpuid } int -vm_inject_exception(struct vm *vm, int vcpuid, struct vm_exception *exception) +vm_inject_exception(struct vm *vm, int vcpuid, int vector, int errcode_valid, + uint32_t errcode, int restart_instruction) { struct vcpu *vcpu; int error; @@ -1730,7 +1747,7 @@ vm_inject_exception(struct vm *vm, int v if (vcpuid < 0 || vcpuid >= VM_MAXCPU) return (EINVAL); - if (exception->vector < 0 || exception->vector >= 32) + if (vector < 0 || vector >= 32) return (EINVAL); /* @@ -1738,15 +1755,14 @@ vm_inject_exception(struct vm *vm, int v * the guest. It is a derived exception that results from specific * combinations of nested faults. */ - if (exception->vector == IDT_DF) + if (vector == IDT_DF) return (EINVAL); vcpu = &vm->vcpu[vcpuid]; if (vcpu->exception_pending) { VCPU_CTR2(vm, vcpuid, "Unable to inject exception %d due to " - "pending exception %d", exception->vector, - vcpu->exception.vector); + "pending exception %d", vector, vcpu->exc_vector); return (EBUSY); } @@ -1760,9 +1776,14 @@ vm_inject_exception(struct vm *vm, int v KASSERT(error == 0, ("%s: error %d clearing interrupt shadow", __func__, error)); + if (restart_instruction) + vm_restart_instruction(vm, vcpuid); + vcpu->exception_pending = 1; - vcpu->exception = *exception; - VCPU_CTR1(vm, vcpuid, "Exception %d pending", exception->vector); + vcpu->exc_vector = vector; + vcpu->exc_errcode = errcode; + vcpu->exc_errcode_valid = errcode_valid; + VCPU_CTR1(vm, vcpuid, "Exception %d pending", vector); return (0); } @@ -1770,28 +1791,15 @@ void vm_inject_fault(void *vmarg, int vcpuid, int vector, int errcode_valid, int errcode) { - struct vm_exception exception; - struct vm_exit *vmexit; struct vm *vm; - int error; + int error, restart_instruction; vm = vmarg; + restart_instruction = 1; - exception.vector = vector; - exception.error_code = errcode; - exception.error_code_valid = errcode_valid; - error = vm_inject_exception(vm, vcpuid, &exception); + error = vm_inject_exception(vm, vcpuid, vector, errcode_valid, + errcode, restart_instruction); KASSERT(error == 0, ("vm_inject_exception error %d", error)); - - /* - * A fault-like exception allows the instruction to be restarted - * after the exception handler returns. - * - * By setting the inst_length to 0 we ensure that the instruction - * pointer remains at the faulting instruction. - */ - vmexit = vm_exitinfo(vm, vcpuid); - vmexit->inst_length = 0; } void Modified: projects/ifnet/sys/amd64/vmm/vmm_dev.c ============================================================================== --- projects/ifnet/sys/amd64/vmm/vmm_dev.c Wed Jan 14 14:49:58 2015 (r277181) +++ projects/ifnet/sys/amd64/vmm/vmm_dev.c Wed Jan 14 14:50:31 2015 (r277182) @@ -310,7 +310,9 @@ vmmdev_ioctl(struct cdev *cdev, u_long c break; case VM_INJECT_EXCEPTION: vmexc = (struct vm_exception *)data; - error = vm_inject_exception(sc->vm, vmexc->cpuid, vmexc); + error = vm_inject_exception(sc->vm, vmexc->cpuid, + vmexc->vector, vmexc->error_code_valid, vmexc->error_code, + vmexc->restart_instruction); break; case VM_INJECT_NMI: vmnmi = (struct vm_nmi *)data; Modified: projects/ifnet/sys/amd64/vmm/vmm_ioport.c ============================================================================== --- projects/ifnet/sys/amd64/vmm/vmm_ioport.c Wed Jan 14 14:49:58 2015 (r277181) +++ projects/ifnet/sys/amd64/vmm/vmm_ioport.c Wed Jan 14 14:50:31 2015 (r277182) @@ -74,7 +74,7 @@ inout_instruction(struct vm_exit *vmexit static const char *iodesc[] = { "outb", "outw", "outl", "inb", "inw", "inl", - "outsb", "outsw", "outsd" + "outsb", "outsw", "outsd", "insb", "insw", "insd", }; Modified: projects/ifnet/sys/arm/arm/cpufunc.c ============================================================================== --- projects/ifnet/sys/arm/arm/cpufunc.c Wed Jan 14 14:49:58 2015 (r277181) +++ projects/ifnet/sys/arm/arm/cpufunc.c Wed Jan 14 14:50:31 2015 (r277182) @@ -1067,6 +1067,7 @@ set_cpufuncs() cputype == CPU_ID_CORTEXA9R1 || cputype == CPU_ID_CORTEXA9R2 || cputype == CPU_ID_CORTEXA9R3 || + cputype == CPU_ID_CORTEXA12R0 || cputype == CPU_ID_CORTEXA15R0 || cputype == CPU_ID_CORTEXA15R1 || cputype == CPU_ID_CORTEXA15R2 || Modified: projects/ifnet/sys/arm/arm/identcpu.c ============================================================================== --- projects/ifnet/sys/arm/arm/identcpu.c Wed Jan 14 14:49:58 2015 (r277181) +++ projects/ifnet/sys/arm/arm/identcpu.c Wed Jan 14 14:50:31 2015 (r277182) @@ -185,6 +185,8 @@ const struct cpuidtab cpuids[] = { generic_steppings }, { CPU_ID_CORTEXA9R3, CPU_CLASS_CORTEXA, "Cortex A9-r3", generic_steppings }, + { CPU_ID_CORTEXA12R0, CPU_CLASS_CORTEXA, "Cortex A12-r0", + generic_steppings }, { CPU_ID_CORTEXA15R0, CPU_CLASS_CORTEXA, "Cortex A15-r0", generic_steppings }, { CPU_ID_CORTEXA15R1, CPU_CLASS_CORTEXA, "Cortex A15-r1", Modified: projects/ifnet/sys/arm/include/armreg.h ============================================================================== --- projects/ifnet/sys/arm/include/armreg.h Wed Jan 14 14:49:58 2015 (r277181) +++ projects/ifnet/sys/arm/include/armreg.h Wed Jan 14 14:50:31 2015 (r277182) @@ -133,6 +133,7 @@ #define CPU_ID_CORTEXA9R1 0x411fc090 #define CPU_ID_CORTEXA9R2 0x412fc090 #define CPU_ID_CORTEXA9R3 0x413fc090 +#define CPU_ID_CORTEXA12R0 0x410fc0d0 #define CPU_ID_CORTEXA15R0 0x410fc0f0 #define CPU_ID_CORTEXA15R1 0x411fc0f0 #define CPU_ID_CORTEXA15R2 0x412fc0f0 Modified: projects/ifnet/sys/arm/samsung/exynos/exynos_uart.c ============================================================================== --- projects/ifnet/sys/arm/samsung/exynos/exynos_uart.c Wed Jan 14 14:49:58 2015 (r277181) +++ projects/ifnet/sys/arm/samsung/exynos/exynos_uart.c Wed Jan 14 14:50:31 2015 (r277182) @@ -50,17 +50,17 @@ __FBSDID("$FreeBSD$"); #define DEF_CLK 100000000 static int sscomspeed(long, long); -static int s3c24x0_uart_param(struct uart_bas *, int, int, int, int); +static int exynos4210_uart_param(struct uart_bas *, int, int, int, int); /* * Low-level UART interface. */ -static int s3c2410_probe(struct uart_bas *bas); -static void s3c2410_init(struct uart_bas *bas, int, int, int, int); -static void s3c2410_term(struct uart_bas *bas); -static void s3c2410_putc(struct uart_bas *bas, int); -static int s3c2410_rxready(struct uart_bas *bas); -static int s3c2410_getc(struct uart_bas *bas, struct mtx *mtx); +static int exynos4210_probe(struct uart_bas *bas); +static void exynos4210_init(struct uart_bas *bas, int, int, int, int); +static void exynos4210_term(struct uart_bas *bas); +static void exynos4210_putc(struct uart_bas *bas, int); +static int exynos4210_rxready(struct uart_bas *bas); +static int exynos4210_getc(struct uart_bas *bas, struct mtx *mtx); extern SLIST_HEAD(uart_devinfo_list, uart_devinfo) uart_sysdevs; @@ -76,7 +76,7 @@ sscomspeed(long speed, long frequency) } static int -s3c24x0_uart_param(struct uart_bas *bas, int baudrate, int databits, +exynos4210_uart_param(struct uart_bas *bas, int baudrate, int databits, int stopbits, int parity) { int brd, ulcon; @@ -127,38 +127,38 @@ s3c24x0_uart_param(struct uart_bas *bas, return (0); } -struct uart_ops uart_s3c2410_ops = { - .probe = s3c2410_probe, - .init = s3c2410_init, - .term = s3c2410_term, - .putc = s3c2410_putc, - .rxready = s3c2410_rxready, - .getc = s3c2410_getc, +struct uart_ops uart_exynos4210_ops = { + .probe = exynos4210_probe, + .init = exynos4210_init, + .term = exynos4210_term, + .putc = exynos4210_putc, + .rxready = exynos4210_rxready, + .getc = exynos4210_getc, }; static int -s3c2410_probe(struct uart_bas *bas) +exynos4210_probe(struct uart_bas *bas) { return (0); } static void -s3c2410_init(struct uart_bas *bas, int baudrate, int databits, int stopbits, +exynos4210_init(struct uart_bas *bas, int baudrate, int databits, int stopbits, int parity) { if (bas->rclk == 0) bas->rclk = DEF_CLK; - KASSERT(bas->rclk != 0, ("s3c2410_init: Invalid rclk")); + KASSERT(bas->rclk != 0, ("exynos4210_init: Invalid rclk")); uart_setreg(bas, SSCOM_UCON, 0); uart_setreg(bas, SSCOM_UFCON, UFCON_TXTRIGGER_8 | UFCON_RXTRIGGER_8 | UFCON_TXFIFO_RESET | UFCON_RXFIFO_RESET | UFCON_FIFO_ENABLE); - s3c24x0_uart_param(bas, baudrate, databits, stopbits, parity); + exynos4210_uart_param(bas, baudrate, databits, stopbits, parity); /* Enable UART. */ uart_setreg(bas, SSCOM_UCON, UCON_TXMODE_INT | UCON_RXMODE_INT | @@ -167,13 +167,13 @@ s3c2410_init(struct uart_bas *bas, int b } static void -s3c2410_term(struct uart_bas *bas) +exynos4210_term(struct uart_bas *bas) { /* XXX */ } static void -s3c2410_putc(struct uart_bas *bas, int c) +exynos4210_putc(struct uart_bas *bas, int c) { while ((bus_space_read_4(bas->bst, bas->bsh, SSCOM_UFSTAT) & @@ -184,7 +184,7 @@ s3c2410_putc(struct uart_bas *bas, int c } static int -s3c2410_rxready(struct uart_bas *bas) +exynos4210_rxready(struct uart_bas *bas) { return ((uart_getreg(bas, SSCOM_UTRSTAT) & UTRSTAT_RXREADY) == @@ -192,7 +192,7 @@ s3c2410_rxready(struct uart_bas *bas) } static int -s3c2410_getc(struct uart_bas *bas, struct mtx *mtx) +exynos4210_getc(struct uart_bas *bas, struct mtx *mtx) { int utrstat; @@ -205,34 +205,34 @@ s3c2410_getc(struct uart_bas *bas, struc return (bus_space_read_1(bas->bst, bas->bsh, SSCOM_URXH)); } -static int s3c2410_bus_probe(struct uart_softc *sc); -static int s3c2410_bus_attach(struct uart_softc *sc); -static int s3c2410_bus_flush(struct uart_softc *, int); -static int s3c2410_bus_getsig(struct uart_softc *); -static int s3c2410_bus_ioctl(struct uart_softc *, int, intptr_t); -static int s3c2410_bus_ipend(struct uart_softc *); -static int s3c2410_bus_param(struct uart_softc *, int, int, int, int); -static int s3c2410_bus_receive(struct uart_softc *); -static int s3c2410_bus_setsig(struct uart_softc *, int); -static int s3c2410_bus_transmit(struct uart_softc *); - -static kobj_method_t s3c2410_methods[] = { - KOBJMETHOD(uart_probe, s3c2410_bus_probe), - KOBJMETHOD(uart_attach, s3c2410_bus_attach), - KOBJMETHOD(uart_flush, s3c2410_bus_flush), - KOBJMETHOD(uart_getsig, s3c2410_bus_getsig), - KOBJMETHOD(uart_ioctl, s3c2410_bus_ioctl), - KOBJMETHOD(uart_ipend, s3c2410_bus_ipend), - KOBJMETHOD(uart_param, s3c2410_bus_param), - KOBJMETHOD(uart_receive, s3c2410_bus_receive), - KOBJMETHOD(uart_setsig, s3c2410_bus_setsig), - KOBJMETHOD(uart_transmit, s3c2410_bus_transmit), +static int exynos4210_bus_probe(struct uart_softc *sc); +static int exynos4210_bus_attach(struct uart_softc *sc); +static int exynos4210_bus_flush(struct uart_softc *, int); +static int exynos4210_bus_getsig(struct uart_softc *); +static int exynos4210_bus_ioctl(struct uart_softc *, int, intptr_t); +static int exynos4210_bus_ipend(struct uart_softc *); +static int exynos4210_bus_param(struct uart_softc *, int, int, int, int); +static int exynos4210_bus_receive(struct uart_softc *); +static int exynos4210_bus_setsig(struct uart_softc *, int); +static int exynos4210_bus_transmit(struct uart_softc *); + +static kobj_method_t exynos4210_methods[] = { + KOBJMETHOD(uart_probe, exynos4210_bus_probe), + KOBJMETHOD(uart_attach, exynos4210_bus_attach), + KOBJMETHOD(uart_flush, exynos4210_bus_flush), + KOBJMETHOD(uart_getsig, exynos4210_bus_getsig), + KOBJMETHOD(uart_ioctl, exynos4210_bus_ioctl), + KOBJMETHOD(uart_ipend, exynos4210_bus_ipend), + KOBJMETHOD(uart_param, exynos4210_bus_param), + KOBJMETHOD(uart_receive, exynos4210_bus_receive), + KOBJMETHOD(uart_setsig, exynos4210_bus_setsig), + KOBJMETHOD(uart_transmit, exynos4210_bus_transmit), {0, 0 } }; int -s3c2410_bus_probe(struct uart_softc *sc) +exynos4210_bus_probe(struct uart_softc *sc) { sc->sc_txfifosz = 16; @@ -242,7 +242,7 @@ s3c2410_bus_probe(struct uart_softc *sc) } static int -s3c2410_bus_attach(struct uart_softc *sc) +exynos4210_bus_attach(struct uart_softc *sc) { sc->sc_hwiflow = 0; @@ -252,7 +252,7 @@ s3c2410_bus_attach(struct uart_softc *sc } static int -s3c2410_bus_transmit(struct uart_softc *sc) +exynos4210_bus_transmit(struct uart_softc *sc) { int i; int reg; @@ -260,7 +260,7 @@ s3c2410_bus_transmit(struct uart_softc * uart_lock(sc->sc_hwmtx); for (i = 0; i < sc->sc_txdatasz; i++) { - s3c2410_putc(&sc->sc_bas, sc->sc_txbuf[i]); + exynos4210_putc(&sc->sc_bas, sc->sc_txbuf[i]); uart_barrier(&sc->sc_bas); } @@ -277,14 +277,14 @@ s3c2410_bus_transmit(struct uart_softc * } static int -s3c2410_bus_setsig(struct uart_softc *sc, int sig) +exynos4210_bus_setsig(struct uart_softc *sc, int sig) { return (0); } static int -s3c2410_bus_receive(struct uart_softc *sc) +exynos4210_bus_receive(struct uart_softc *sc) { struct uart_bas *bas; @@ -297,7 +297,7 @@ s3c2410_bus_receive(struct uart_softc *s } static int -s3c2410_bus_param(struct uart_softc *sc, int baudrate, int databits, +exynos4210_bus_param(struct uart_softc *sc, int baudrate, int databits, int stopbits, int parity) { int error; @@ -305,10 +305,10 @@ s3c2410_bus_param(struct uart_softc *sc, if (sc->sc_bas.rclk == 0) sc->sc_bas.rclk = DEF_CLK; - KASSERT(sc->sc_bas.rclk != 0, ("s3c2410_init: Invalid rclk")); + KASSERT(sc->sc_bas.rclk != 0, ("exynos4210_init: Invalid rclk")); uart_lock(sc->sc_hwmtx); - error = s3c24x0_uart_param(&sc->sc_bas, baudrate, databits, stopbits, + error = exynos4210_uart_param(&sc->sc_bas, baudrate, databits, stopbits, parity); uart_unlock(sc->sc_hwmtx); @@ -316,7 +316,7 @@ s3c2410_bus_param(struct uart_softc *sc, } static int -s3c2410_bus_ipend(struct uart_softc *sc) +exynos4210_bus_ipend(struct uart_softc *sc) { uint32_t ints; uint32_t txempty, rxready; @@ -352,31 +352,31 @@ s3c2410_bus_ipend(struct uart_softc *sc) } static int -s3c2410_bus_flush(struct uart_softc *sc, int what) +exynos4210_bus_flush(struct uart_softc *sc, int what) { return (0); } static int -s3c2410_bus_getsig(struct uart_softc *sc) +exynos4210_bus_getsig(struct uart_softc *sc) { return (0); } static int -s3c2410_bus_ioctl(struct uart_softc *sc, int request, intptr_t data) +exynos4210_bus_ioctl(struct uart_softc *sc, int request, intptr_t data) { return (EINVAL); } -struct uart_class uart_s3c2410_class = { - "s3c2410 class", - s3c2410_methods, +struct uart_class uart_exynos4210_class = { + "exynos4210 class", + exynos4210_methods, 1, - .uc_ops = &uart_s3c2410_ops, + .uc_ops = &uart_exynos4210_ops, .uc_range = 8, .uc_rclk = 0, }; Modified: projects/ifnet/sys/boot/usb/usbcore.mk ============================================================================== --- projects/ifnet/sys/boot/usb/usbcore.mk Wed Jan 14 14:49:58 2015 (r277181) +++ projects/ifnet/sys/boot/usb/usbcore.mk Wed Jan 14 14:50:31 2015 (r277182) @@ -142,6 +142,7 @@ KSRCS+= usb_template_mouse.c KSRCS+= usb_template_kbd.c KSRCS+= usb_template_audio.c KSRCS+= usb_template_phone.c +KSRCS+= usb_template_serialnet.c # # USB mass storage support Modified: projects/ifnet/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c ============================================================================== --- projects/ifnet/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Wed Jan 14 14:49:58 2015 (r277181) +++ projects/ifnet/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Wed Jan 14 14:50:31 2015 (r277182) @@ -40,17 +40,20 @@ #define TRIM_ZIO_END(vd, offset, size) (offset + \ P2ROUNDUP(size, 1ULL << vd->vdev_top->vdev_ashift)) -#define TRIM_MAP_SINC(tm, size) \ - atomic_add_64(&(tm)->tm_bytes, (size)) +/* Maximal segment size for ATA TRIM. */ +#define TRIM_MAP_SIZE_FACTOR (512 << 16) -#define TRIM_MAP_SDEC(tm, size) \ - atomic_add_64(&(tm)->tm_bytes, -(size)) +#define TRIM_MAP_SEGS(size) (1 + (size) / TRIM_MAP_SIZE_FACTOR) -#define TRIM_MAP_QINC(tm) \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***