Date: Mon, 18 Mar 2013 15:38:15 +0000 (UTC) From: Aleksandr Rybalko <ray@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r248469 - in projects/efika_mx: contrib/binutils/gas/config crypto/openssh gnu/lib/libgcc lib/libc/stdlib lib/libc/sys sbin/ccdconfig sbin/ffsinfo sbin/geom/class/concat sbin/geom/class... Message-ID: <201303181538.r2IFcFHF094819@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ray Date: Mon Mar 18 15:38:15 2013 New Revision: 248469 URL: http://svnweb.freebsd.org/changeset/base/248469 Log: MFC @r248468 Added: projects/efika_mx/sys/cddl/dev/fbt/fbt_powerpc.c - copied unchanged from r248468, head/sys/cddl/dev/fbt/fbt_powerpc.c projects/efika_mx/sys/libkern/arm/memset.S - copied unchanged from r248468, head/sys/libkern/arm/memset.S projects/efika_mx/sys/vm/_vm_radix.h - copied unchanged from r248468, head/sys/vm/_vm_radix.h projects/efika_mx/sys/vm/vm_radix.c - copied unchanged from r248468, head/sys/vm/vm_radix.c projects/efika_mx/sys/vm/vm_radix.h - copied unchanged from r248468, head/sys/vm/vm_radix.h Modified: projects/efika_mx/contrib/binutils/gas/config/tc-arm.c projects/efika_mx/crypto/openssh/sshd_config projects/efika_mx/gnu/lib/libgcc/Makefile projects/efika_mx/lib/libc/stdlib/realpath.3 projects/efika_mx/lib/libc/sys/chflags.2 projects/efika_mx/sbin/ccdconfig/ccdconfig.8 projects/efika_mx/sbin/ffsinfo/ffsinfo.8 projects/efika_mx/sbin/geom/class/concat/gconcat.8 projects/efika_mx/sbin/geom/class/mirror/gmirror.8 projects/efika_mx/sbin/geom/class/raid/graid.8 projects/efika_mx/sbin/geom/class/stripe/gstripe.8 projects/efika_mx/sbin/gvinum/gvinum.8 projects/efika_mx/share/man/man4/ccd.4 projects/efika_mx/sys/amd64/amd64/pmap.c projects/efika_mx/sys/amd64/include/pmap.h projects/efika_mx/sys/amd64/vmm/intel/vmx.c projects/efika_mx/sys/amd64/vmm/vmm.c projects/efika_mx/sys/amd64/vmm/vmm_stat.c projects/efika_mx/sys/amd64/vmm/vmm_stat.h projects/efika_mx/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c projects/efika_mx/sys/arm/include/bus.h projects/efika_mx/sys/arm/ti/cpsw/if_cpsw.c projects/efika_mx/sys/arm/ti/ti_mmchs.c projects/efika_mx/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c projects/efika_mx/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h projects/efika_mx/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S projects/efika_mx/sys/cddl/dev/dtrace/powerpc/dtrace_isa.c projects/efika_mx/sys/cddl/dev/dtrace/powerpc/dtrace_subr.c projects/efika_mx/sys/conf/Makefile.arm projects/efika_mx/sys/conf/files projects/efika_mx/sys/conf/files.arm projects/efika_mx/sys/dev/acpica/acpi_powerres.c projects/efika_mx/sys/dev/ath/if_ath_rx_edma.c projects/efika_mx/sys/dev/ath/if_ath_sysctl.c projects/efika_mx/sys/dev/sis/if_sis.c projects/efika_mx/sys/dev/sis/if_sisreg.h projects/efika_mx/sys/dev/sound/pcm/sndstat.c projects/efika_mx/sys/dev/usb/usbdevs projects/efika_mx/sys/dev/usb/wlan/if_run.c projects/efika_mx/sys/fs/tmpfs/tmpfs_vnops.c projects/efika_mx/sys/i386/i386/pmap.c projects/efika_mx/sys/i386/include/pmap.h projects/efika_mx/sys/i386/xen/pmap.c projects/efika_mx/sys/kern/uipc_mbuf.c projects/efika_mx/sys/kern/vfs_syscalls.c projects/efika_mx/sys/modules/dtrace/Makefile projects/efika_mx/sys/modules/dtrace/dtraceall/dtraceall.c projects/efika_mx/sys/modules/dtrace/fbt/Makefile projects/efika_mx/sys/modules/uart/Makefile projects/efika_mx/sys/netinet/libalias/alias.c projects/efika_mx/sys/powerpc/aim/trap.c projects/efika_mx/sys/powerpc/aim/trap_subr32.S projects/efika_mx/sys/powerpc/aim/trap_subr64.S projects/efika_mx/sys/sys/mbuf.h projects/efika_mx/sys/ufs/ufs/ufs_vnops.c projects/efika_mx/sys/vm/vm_object.c projects/efika_mx/sys/vm/vm_object.h projects/efika_mx/sys/vm/vm_page.c projects/efika_mx/sys/vm/vm_page.h projects/efika_mx/sys/vm/vm_reserv.c projects/efika_mx/tools/regression/security/cap_test/cap_test_capabilities.c projects/efika_mx/usr.bin/find/find.h projects/efika_mx/usr.bin/find/function.c projects/efika_mx/usr.bin/head/head.1 projects/efika_mx/usr.bin/renice/renice.8 projects/efika_mx/usr.bin/script/script.1 projects/efika_mx/usr.bin/tail/tail.1 projects/efika_mx/usr.sbin/ac/ac.8 Directory Properties: projects/efika_mx/ (props changed) projects/efika_mx/contrib/binutils/ (props changed) projects/efika_mx/crypto/openssh/ (props changed) projects/efika_mx/gnu/lib/ (props changed) projects/efika_mx/lib/libc/ (props changed) projects/efika_mx/sbin/ (props changed) projects/efika_mx/share/man/man4/ (props changed) projects/efika_mx/sys/ (props changed) projects/efika_mx/sys/amd64/vmm/ (props changed) projects/efika_mx/sys/cddl/contrib/opensolaris/ (props changed) projects/efika_mx/sys/conf/ (props changed) Modified: projects/efika_mx/contrib/binutils/gas/config/tc-arm.c ============================================================================== --- projects/efika_mx/contrib/binutils/gas/config/tc-arm.c Mon Mar 18 15:27:59 2013 (r248468) +++ projects/efika_mx/contrib/binutils/gas/config/tc-arm.c Mon Mar 18 15:38:15 2013 (r248469) @@ -651,6 +651,7 @@ struct asm_opcode #define BAD_ARGS _("bad arguments to instruction") #define BAD_PC _("r15 not allowed here") +#define BAD_SP _("r13 not allowed here") #define BAD_COND _("instruction cannot be conditional") #define BAD_OVERLAP _("registers may not be the same") #define BAD_HIREG _("lo register required") @@ -659,6 +660,7 @@ struct asm_opcode #define BAD_BRANCH _("branch must be last instruction in IT block") #define BAD_NOT_IT _("instruction not allowed in IT block") #define BAD_FPU _("selected FPU does not support instruction") +#define BAD_VMRS _("APSR_nzcv may only be used with fpscr") static struct hash_control *arm_ops_hsh; static struct hash_control *arm_cond_hsh; @@ -5164,10 +5166,6 @@ parse_neon_mov (char **str, int *which_o Case 10: VMOV.F32 <Sd>, #<imm> Case 11: VMOV.F64 <Dd>, #<imm> */ inst.operands[i].immisfloat = 1; - else if (parse_big_immediate (&ptr, i) == SUCCESS) - /* Case 2: VMOV<c><q>.<dt> <Qd>, #<imm> - Case 3: VMOV<c><q>.<dt> <Dd>, #<imm> */ - ; else if ((val = arm_typed_reg_parse (&ptr, REG_TYPE_NSDQ, &rtype, &optype)) != FAIL) { @@ -5207,6 +5205,10 @@ parse_neon_mov (char **str, int *which_o inst.operands[i++].present = 1; } } + else if (parse_big_immediate (&ptr, i) == SUCCESS) + /* Case 2: VMOV<c><q>.<dt> <Qd>, #<imm> + Case 3: VMOV<c><q>.<dt> <Dd>, #<imm> */ + ; else { first_error (_("expected <Rm> or <Dm> or <Qm> operand")); @@ -7096,6 +7098,64 @@ do_vfp_nsyn_msr (void) } static void +do_vfp_vmrs (void) +{ + int rt; + + /* The destination register can be r0-r14 or APSR_nzcv */ + if (inst.operands[0].reg > 14) + { + inst.error = BAD_PC; + return; + } + + /* If the destination is r13 and not in ARM mode then unprefictable */ + if (thumb_mode && inst.operands[0].reg == REG_SP) + { + inst.error = BAD_SP; + return; + } + + /* If the destination is APSR_nzcv */ + if (inst.operands[0].isvec && inst.operands[1].reg != 1) + { + inst.error = BAD_VMRS; + return; + } + + if (inst.operands[0].isvec) + rt = 15; + else + rt = inst.operands[0].reg; + + /* Or in the registers to use */ + inst.instruction |= rt << 12; + inst.instruction |= inst.operands[1].reg << 16; +} + +static void +do_vfp_vmsr (void) +{ + /* The destination register can be r0-r14 or APSR_nzcv */ + if (inst.operands[1].reg > 14) + { + inst.error = BAD_PC; + return; + } + + /* If the destination is r13 and not in ARM mode then unprefictable */ + if (thumb_mode && inst.operands[0].reg == REG_SP) + { + inst.error = BAD_SP; + return; + } + + /* Or in the registers to use */ + inst.instruction |= inst.operands[1].reg << 12; + inst.instruction |= inst.operands[0].reg << 16; +} + +static void do_mrs (void) { if (do_vfp_nsyn_mrs () == SUCCESS) @@ -15726,6 +15786,8 @@ static const struct asm_opcode insns[] = cCE(ftouizs, ebc0ac0, 2, (RVS, RVS), vfp_sp_monadic), cCE(fmrx, ef00a10, 2, (RR, RVC), rd_rn), cCE(fmxr, ee00a10, 2, (RVC, RR), rn_rd), + cCE(vmrs, ef00a10, 2, (APSR_RR, RVC), vfp_vmrs), + cCE(vmsr, ee00a10, 2, (RVC, RR), vfp_vmsr), /* Memory operations. */ cCE(flds, d100a00, 2, (RVS, ADDRGLDC), vfp_sp_ldst), Modified: projects/efika_mx/crypto/openssh/sshd_config ============================================================================== --- projects/efika_mx/crypto/openssh/sshd_config Mon Mar 18 15:27:59 2013 (r248468) +++ projects/efika_mx/crypto/openssh/sshd_config Mon Mar 18 15:38:15 2013 (r248469) @@ -50,8 +50,7 @@ #PubkeyAuthentication yes # The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2 -# but this is overridden so installations will only check .ssh/authorized_keys -AuthorizedKeysFile .ssh/authorized_keys +#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2 #AuthorizedPrincipalsFile none Modified: projects/efika_mx/gnu/lib/libgcc/Makefile ============================================================================== --- projects/efika_mx/gnu/lib/libgcc/Makefile Mon Mar 18 15:27:59 2013 (r248468) +++ projects/efika_mx/gnu/lib/libgcc/Makefile Mon Mar 18 15:38:15 2013 (r248469) @@ -123,10 +123,10 @@ CFLAGS+= -fheinous-gnu-extensions LIB1ASMSRC = lib1funcs.asm LIB1ASMFUNCS = _dvmd_tls _bb_init_func .if ${MK_ARM_EABI} != "no" -LIB1ASMFUNCS+= _addsubdf3 _addsubsf3 _cmpdf2 _cmpsf2 _fixdfsi _fixsfsi \ - _fixunsdfsi _fixunsdfsi _muldivdf3 _muldivsf3 _udivsi3 - LIB2ADDEH = unwind-arm.c libunwind.S pr-support.c unwind-c.c +# Some compilers generate __aeabi_ functions libgcc_s is missing +DPADD+= ${LIBGCC} +LDADD+= -lgcc .else LIB2FUNCS_EXTRA = floatunsidf.c floatunsisf.c .endif Modified: projects/efika_mx/lib/libc/stdlib/realpath.3 ============================================================================== --- projects/efika_mx/lib/libc/stdlib/realpath.3 Mon Mar 18 15:27:59 2013 (r248468) +++ projects/efika_mx/lib/libc/stdlib/realpath.3 Mon Mar 18 15:38:15 2013 (r248469) @@ -42,7 +42,7 @@ .Sh SYNOPSIS .In stdlib.h .Ft "char *" -.Fn realpath "const char *pathname" "char *resolved_path" +.Fn realpath "const char * restrict pathname" "char * restrict resolved_path" .Sh DESCRIPTION The .Fn realpath Modified: projects/efika_mx/lib/libc/sys/chflags.2 ============================================================================== --- projects/efika_mx/lib/libc/sys/chflags.2 Mon Mar 18 15:27:59 2013 (r248468) +++ projects/efika_mx/lib/libc/sys/chflags.2 Mon Mar 18 15:38:15 2013 (r248469) @@ -232,3 +232,7 @@ and .Fn fchflags system calls first appeared in .Bx 4.4 . +The +.Fn lchflags +system call first appeared in +.Fx 5.0 . Modified: projects/efika_mx/sbin/ccdconfig/ccdconfig.8 ============================================================================== --- projects/efika_mx/sbin/ccdconfig/ccdconfig.8 Mon Mar 18 15:27:59 2013 (r248468) +++ projects/efika_mx/sbin/ccdconfig/ccdconfig.8 Mon Mar 18 15:38:15 2013 (r248469) @@ -234,14 +234,14 @@ RAID controllers (see GENERIC), or software RAID systems such as .Xr geom 8 and -.Xr vinum 8 . +.Xr gvinum 8 . .Sh SEE ALSO .Xr dd 1 , .Xr ccd 4 , .Xr disklabel 8 , .Xr fdisk 8 , -.Xr rc 8 , -.Xr vinum 8 +.Xr gvinum 8 , +.Xr rc 8 .Sh HISTORY The .Nm Modified: projects/efika_mx/sbin/ffsinfo/ffsinfo.8 ============================================================================== --- projects/efika_mx/sbin/ffsinfo/ffsinfo.8 Mon Mar 18 15:27:59 2013 (r248468) +++ projects/efika_mx/sbin/ffsinfo/ffsinfo.8 Mon Mar 18 15:38:15 2013 (r248469) @@ -125,9 +125,9 @@ with all available information. .Xr dumpfs 8 , .Xr fsck 8 , .Xr growfs 8 , +.Xr gvinum 8 , .Xr newfs 8 , -.Xr tunefs 8 , -.Xr vinum 8 +.Xr tunefs 8 .Sh HISTORY The .Nm Modified: projects/efika_mx/sbin/geom/class/concat/gconcat.8 ============================================================================== --- projects/efika_mx/sbin/geom/class/concat/gconcat.8 Mon Mar 18 15:27:59 2013 (r248468) +++ projects/efika_mx/sbin/geom/class/concat/gconcat.8 Mon Mar 18 15:38:15 2013 (r248469) @@ -183,11 +183,11 @@ growfs /dev/concat/data .Xr loader.conf 5 , .Xr geom 8 , .Xr growfs 8 , +.Xr gvinum 8 , .Xr mount 8 , .Xr newfs 8 , .Xr sysctl 8 , -.Xr umount 8 , -.Xr vinum 8 +.Xr umount 8 .Sh HISTORY The .Nm Modified: projects/efika_mx/sbin/geom/class/mirror/gmirror.8 ============================================================================== --- projects/efika_mx/sbin/geom/class/mirror/gmirror.8 Mon Mar 18 15:27:59 2013 (r248468) +++ projects/efika_mx/sbin/geom/class/mirror/gmirror.8 Mon Mar 18 15:38:15 2013 (r248469) @@ -340,11 +340,11 @@ there. .Xr geom 4 , .Xr dumpon 8 , .Xr geom 8 , +.Xr gvinum 8 , .Xr mount 8 , .Xr newfs 8 , .Xr savecore 8 , -.Xr umount 8 , -.Xr vinum 8 +.Xr umount 8 .Sh HISTORY The .Nm Modified: projects/efika_mx/sbin/geom/class/raid/graid.8 ============================================================================== --- projects/efika_mx/sbin/geom/class/raid/graid.8 Mon Mar 18 15:27:59 2013 (r248468) +++ projects/efika_mx/sbin/geom/class/raid/graid.8 Mon Mar 18 15:38:15 2013 (r248469) @@ -314,7 +314,7 @@ Exit status is 0 on success, and non-zer .Sh SEE ALSO .Xr geom 4 , .Xr geom 8 , -.Xr vinum 8 +.Xr gvinum 8 .Sh HISTORY The .Nm Modified: projects/efika_mx/sbin/geom/class/stripe/gstripe.8 ============================================================================== --- projects/efika_mx/sbin/geom/class/stripe/gstripe.8 Mon Mar 18 15:27:59 2013 (r248468) +++ projects/efika_mx/sbin/geom/class/stripe/gstripe.8 Mon Mar 18 15:38:15 2013 (r248469) @@ -232,11 +232,11 @@ for .Xr atacontrol 8 , .Xr ccdconfig 8 , .Xr geom 8 , +.Xr gvinum 8 , .Xr mount 8 , .Xr newfs 8 , .Xr sysctl 8 , -.Xr umount 8 , -.Xr vinum 8 +.Xr umount 8 .Sh HISTORY The .Nm Modified: projects/efika_mx/sbin/gvinum/gvinum.8 ============================================================================== --- projects/efika_mx/sbin/gvinum/gvinum.8 Mon Mar 18 15:27:59 2013 (r248468) +++ projects/efika_mx/sbin/gvinum/gvinum.8 Mon Mar 18 15:38:15 2013 (r248469) @@ -422,9 +422,9 @@ This may leave data unprotected and is p Currently, .Nm does not yet fully implement all of the functions found in -.Xr vinum 4 . +.Nm vinum . Specifically, the following commands from -.Xr vinum 4 +.Nm vinum are not supported: .Bl -tag -width indent .It Ic debug Modified: projects/efika_mx/share/man/man4/ccd.4 ============================================================================== --- projects/efika_mx/share/man/man4/ccd.4 Mon Mar 18 15:27:59 2013 (r248468) +++ projects/efika_mx/share/man/man4/ccd.4 Mon Mar 18 15:38:15 2013 (r248469) @@ -279,9 +279,9 @@ device special files .Xr config 8 , .Xr disklabel 8 , .Xr fsck 8 , +.Xr gvinum 8 , .Xr mount 8 , -.Xr newfs 8 , -.Xr vinum 8 +.Xr newfs 8 .Sh HISTORY The concatenated disk driver was originally written at the University of Utah. Modified: projects/efika_mx/sys/amd64/amd64/pmap.c ============================================================================== --- projects/efika_mx/sys/amd64/amd64/pmap.c Mon Mar 18 15:27:59 2013 (r248468) +++ projects/efika_mx/sys/amd64/amd64/pmap.c Mon Mar 18 15:38:15 2013 (r248469) @@ -131,6 +131,7 @@ __FBSDID("$FreeBSD$"); #include <vm/vm_extern.h> #include <vm/vm_pageout.h> #include <vm/vm_pager.h> +#include <vm/vm_radix.h> #include <vm/vm_reserv.h> #include <vm/uma.h> @@ -1497,7 +1498,8 @@ pmap_free_zero_pages(vm_page_t free) while (free != NULL) { m = free; - free = m->right; + free = (void *)m->object; + m->object = NULL; /* Preserve the page's PG_ZERO setting. */ vm_page_free_toq(m); } @@ -1516,7 +1518,7 @@ pmap_add_delayed_free_list(vm_page_t m, m->flags |= PG_ZERO; else m->flags &= ~PG_ZERO; - m->right = *free; + m->object = (void *)*free; *free = m; } @@ -1526,31 +1528,12 @@ pmap_add_delayed_free_list(vm_page_t m, * for mapping a distinct range of virtual addresses. The pmap's collection is * ordered by this virtual address range. */ -static void +static __inline void pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte) { - vm_page_t root; PMAP_LOCK_ASSERT(pmap, MA_OWNED); - root = pmap->pm_root; - if (root == NULL) { - mpte->left = NULL; - mpte->right = NULL; - } else { - root = vm_page_splay(mpte->pindex, root); - if (mpte->pindex < root->pindex) { - mpte->left = root->left; - mpte->right = root; - root->left = NULL; - } else if (mpte->pindex == root->pindex) - panic("pmap_insert_pt_page: pindex already inserted"); - else { - mpte->right = root->right; - mpte->left = root; - root->right = NULL; - } - } - pmap->pm_root = mpte; + vm_radix_insert(&pmap->pm_root, mpte); } /* @@ -1558,19 +1541,12 @@ pmap_insert_pt_page(pmap_t pmap, vm_page * specified pmap's collection of idle page table pages. Returns NULL if there * is no page table page corresponding to the specified virtual address. */ -static vm_page_t +static __inline vm_page_t pmap_lookup_pt_page(pmap_t pmap, vm_offset_t va) { - vm_page_t mpte; - vm_pindex_t pindex = pmap_pde_pindex(va); PMAP_LOCK_ASSERT(pmap, MA_OWNED); - if ((mpte = pmap->pm_root) != NULL && mpte->pindex != pindex) { - mpte = vm_page_splay(pindex, mpte); - if ((pmap->pm_root = mpte)->pindex != pindex) - mpte = NULL; - } - return (mpte); + return (vm_radix_lookup(&pmap->pm_root, pmap_pde_pindex(va))); } /* @@ -1578,25 +1554,12 @@ pmap_lookup_pt_page(pmap_t pmap, vm_offs * of idle page table pages. The specified page table page must be a member of * the pmap's collection. */ -static void +static __inline void pmap_remove_pt_page(pmap_t pmap, vm_page_t mpte) { - vm_page_t root; PMAP_LOCK_ASSERT(pmap, MA_OWNED); - if (mpte != pmap->pm_root) { - root = vm_page_splay(mpte->pindex, pmap->pm_root); - KASSERT(mpte == root, - ("pmap_remove_pt_page: mpte %p is missing from pmap %p", - mpte, pmap)); - } - if (mpte->left == NULL) - root = mpte->right; - else { - root = vm_page_splay(mpte->pindex, mpte->left); - root->right = mpte->right; - } - pmap->pm_root = root; + vm_radix_remove(&pmap->pm_root, mpte->pindex); } /* @@ -1693,7 +1656,7 @@ pmap_pinit0(pmap_t pmap) PMAP_LOCK_INIT(pmap); pmap->pm_pml4 = (pml4_entry_t *)PHYS_TO_DMAP(KPML4phys); - pmap->pm_root = NULL; + pmap->pm_root.rt_root = 0; CPU_ZERO(&pmap->pm_active); PCPU_SET(curpmap, pmap); TAILQ_INIT(&pmap->pm_pvchunk); @@ -1734,7 +1697,7 @@ pmap_pinit(pmap_t pmap) /* install self-referential address mapping entry(s) */ pmap->pm_pml4[PML4PML4I] = VM_PAGE_TO_PHYS(pml4pg) | PG_V | PG_RW | PG_A | PG_M; - pmap->pm_root = NULL; + pmap->pm_root.rt_root = 0; CPU_ZERO(&pmap->pm_active); TAILQ_INIT(&pmap->pm_pvchunk); bzero(&pmap->pm_stats, sizeof pmap->pm_stats); @@ -1976,7 +1939,7 @@ pmap_release(pmap_t pmap) KASSERT(pmap->pm_stats.resident_count == 0, ("pmap_release: pmap resident count %ld != 0", pmap->pm_stats.resident_count)); - KASSERT(pmap->pm_root == NULL, + KASSERT(vm_radix_is_empty(&pmap->pm_root), ("pmap_release: pmap has reserved page table page(s)")); m = PHYS_TO_VM_PAGE(pmap->pm_pml4[PML4PML4I] & PG_FRAME); @@ -2273,7 +2236,7 @@ reclaim_pv_chunk(pmap_t locked_pmap, str } if (m_pc == NULL && free != NULL) { m_pc = free; - free = m_pc->right; + free = (void *)m_pc->object; /* Recycle a freed page table page. */ m_pc->wire_count = 1; atomic_add_int(&cnt.v_wire_count, 1); Modified: projects/efika_mx/sys/amd64/include/pmap.h ============================================================================== --- projects/efika_mx/sys/amd64/include/pmap.h Mon Mar 18 15:27:59 2013 (r248468) +++ projects/efika_mx/sys/amd64/include/pmap.h Mon Mar 18 15:38:15 2013 (r248469) @@ -150,6 +150,8 @@ #include <sys/_lock.h> #include <sys/_mutex.h> +#include <vm/_vm_radix.h> + typedef u_int64_t pd_entry_t; typedef u_int64_t pt_entry_t; typedef u_int64_t pdp_entry_t; @@ -250,7 +252,7 @@ struct pmap { cpuset_t pm_active; /* active on cpus */ /* spare u_int here due to padding */ struct pmap_statistics pm_stats; /* pmap statistics */ - vm_page_t pm_root; /* spare page table pages */ + struct vm_radix pm_root; /* spare page table pages */ }; typedef struct pmap *pmap_t; Modified: projects/efika_mx/sys/amd64/vmm/intel/vmx.c ============================================================================== --- projects/efika_mx/sys/amd64/vmm/intel/vmx.c Mon Mar 18 15:27:59 2013 (r248468) +++ projects/efika_mx/sys/amd64/vmm/intel/vmx.c Mon Mar 18 15:38:15 2013 (r248469) @@ -153,10 +153,7 @@ static int cap_unrestricted_guest; static int cap_monitor_trap; /* statistics */ -static VMM_STAT_DEFINE(VCPU_MIGRATIONS, "vcpu migration across host cpus"); -static VMM_STAT_DEFINE(VMEXIT_EXTINT, "vm exits due to external interrupt"); -static VMM_STAT_DEFINE(VMEXIT_HLT_IGNORED, "number of times hlt was ignored"); -static VMM_STAT_DEFINE(VMEXIT_HLT, "number of times hlt was intercepted"); +static VMM_STAT_INTEL(VMEXIT_HLT_IGNORED, "number of times hlt was ignored"); #ifdef KTR static const char * @@ -1216,6 +1213,8 @@ vmx_exit_process(struct vmx *vmx, int vc qual = vmexit->u.vmx.exit_qualification; vmexit->exitcode = VM_EXITCODE_BOGUS; + vmm_stat_incr(vmx->vm, vcpu, VMEXIT_COUNT, 1); + switch (vmexit->u.vmx.exit_reason) { case EXIT_REASON_CR_ACCESS: handled = vmx_emulate_cr_access(vmx, vcpu, qual); Modified: projects/efika_mx/sys/amd64/vmm/vmm.c ============================================================================== --- projects/efika_mx/sys/amd64/vmm/vmm.c Mon Mar 18 15:27:59 2013 (r248468) +++ projects/efika_mx/sys/amd64/vmm/vmm.c Mon Mar 18 15:38:15 2013 (r248469) @@ -139,7 +139,7 @@ static MALLOC_DEFINE(M_VM, "vm", "vm"); CTASSERT(VMM_MSR_NUM <= 64); /* msr_mask can keep track of up to 64 msrs */ /* statistics */ -static VMM_STAT_DEFINE(VCPU_TOTAL_RUNTIME, "vcpu total runtime"); +static VMM_STAT(VCPU_TOTAL_RUNTIME, "vcpu total runtime"); static void vcpu_cleanup(struct vcpu *vcpu) @@ -612,7 +612,7 @@ save_guest_fpustate(struct vcpu *vcpu) fpu_start_emulating(); } -static VMM_STAT_DEFINE(VCPU_IDLE_TICKS, "number of ticks vcpu was idle"); +static VMM_STAT(VCPU_IDLE_TICKS, "number of ticks vcpu was idle"); int vm_run(struct vm *vm, struct vm_run *vmrun) @@ -717,7 +717,7 @@ vm_inject_event(struct vm *vm, int vcpui return (VMINJECT(vm->cookie, vcpuid, type, vector, code, code_valid)); } -static VMM_STAT_DEFINE(VCPU_NMI_COUNT, "number of NMIs delivered to vcpu"); +static VMM_STAT(VCPU_NMI_COUNT, "number of NMIs delivered to vcpu"); int vm_inject_nmi(struct vm *vm, int vcpuid) @@ -937,7 +937,7 @@ vm_set_x2apic_state(struct vm *vm, int v if (vcpuid < 0 || vcpuid >= VM_MAXCPU) return (EINVAL); - if (state < 0 || state >= X2APIC_STATE_LAST) + if (state >= X2APIC_STATE_LAST) return (EINVAL); vm->vcpu[vcpuid].x2apic_state = state; Modified: projects/efika_mx/sys/amd64/vmm/vmm_stat.c ============================================================================== --- projects/efika_mx/sys/amd64/vmm/vmm_stat.c Mon Mar 18 15:27:59 2013 (r248468) +++ projects/efika_mx/sys/amd64/vmm/vmm_stat.c Mon Mar 18 15:38:15 2013 (r248469) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include <sys/smp.h> #include <machine/vmm.h> +#include "vmm_util.h" #include "vmm_stat.h" static int vstnum; @@ -52,6 +53,12 @@ vmm_stat_init(void *arg) if (vst->desc == NULL) return; + if (vst->scope == VMM_STAT_SCOPE_INTEL && !vmm_is_intel()) + return; + + if (vst->scope == VMM_STAT_SCOPE_AMD && !vmm_is_amd()) + return; + if (vstnum >= MAX_VMM_STAT_TYPES) { printf("Cannot accomodate vmm stat type \"%s\"!\n", vst->desc); return; @@ -102,3 +109,9 @@ vmm_stat_desc(int index) else return (NULL); } + +/* global statistics */ +VMM_STAT(VCPU_MIGRATIONS, "vcpu migration across host cpus"); +VMM_STAT(VMEXIT_COUNT, "total number of vm exits"); +VMM_STAT(VMEXIT_EXTINT, "vm exits due to external interrupt"); +VMM_STAT(VMEXIT_HLT, "number of times hlt was intercepted"); Modified: projects/efika_mx/sys/amd64/vmm/vmm_stat.h ============================================================================== --- projects/efika_mx/sys/amd64/vmm/vmm_stat.h Mon Mar 18 15:27:59 2013 (r248468) +++ projects/efika_mx/sys/amd64/vmm/vmm_stat.h Mon Mar 18 15:38:15 2013 (r248469) @@ -36,19 +36,36 @@ struct vm; #define MAX_VMM_STAT_TYPES 64 /* arbitrary */ +enum vmm_stat_scope { + VMM_STAT_SCOPE_ANY, + VMM_STAT_SCOPE_INTEL, /* Intel VMX specific statistic */ + VMM_STAT_SCOPE_AMD, /* AMD SVM specific statistic */ +}; + struct vmm_stat_type { - const char *desc; /* description of statistic */ int index; /* position in the stats buffer */ + const char *desc; /* description of statistic */ + enum vmm_stat_scope scope; }; void vmm_stat_init(void *arg); -#define VMM_STAT_DEFINE(type, desc) \ +#define VMM_STAT_DEFINE(type, desc, scope) \ struct vmm_stat_type type[1] = { \ - { desc, -1 } \ + { -1, desc, scope } \ }; \ SYSINIT(type##_stat, SI_SUB_KLD, SI_ORDER_ANY, vmm_stat_init, type) +#define VMM_STAT_DECLARE(type) \ + extern struct vmm_stat_type type[1] + +#define VMM_STAT(type, desc) \ + VMM_STAT_DEFINE(type, desc, VMM_STAT_SCOPE_ANY) +#define VMM_STAT_INTEL(type, desc) \ + VMM_STAT_DEFINE(type, desc, VMM_STAT_SCOPE_INTEL) +#define VMM_STAT_AMD(type, desc) \ + VMM_STAT_DEFINE(type, desc, VMM_STAT_SCOPE_AMD) + void *vmm_stat_alloc(void); void vmm_stat_free(void *vp); @@ -68,4 +85,8 @@ vmm_stat_incr(struct vm *vm, int vcpu, s #endif } +VMM_STAT_DECLARE(VCPU_MIGRATIONS); +VMM_STAT_DECLARE(VMEXIT_COUNT); +VMM_STAT_DECLARE(VMEXIT_EXTINT); +VMM_STAT_DECLARE(VMEXIT_HLT); #endif Modified: projects/efika_mx/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- projects/efika_mx/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Mon Mar 18 15:27:59 2013 (r248468) +++ projects/efika_mx/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Mon Mar 18 15:38:15 2013 (r248469) @@ -122,9 +122,7 @@ struct bcm_sdhci_softc { int sc_dma_ch; bus_dma_tag_t sc_dma_tag; bus_dmamap_t sc_dma_map; - void *sc_dma_buffer; - vm_paddr_t sc_dma_buffer_phys; - vm_paddr_t sc_sdhci_buffer_phys;; + vm_paddr_t sc_sdhci_buffer_phys; }; static int bcm_sdhci_probe(device_t); @@ -171,9 +169,6 @@ bcm_sdhci_attach(device_t dev) phandle_t node; pcell_t cell; int default_freq; - void *buffer; - vm_paddr_t buffer_phys; - void *va; sc->sc_dev = dev; sc->sc_req = NULL; @@ -210,7 +205,7 @@ bcm_sdhci_attach(device_t dev) goto fail; } - if (bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_MISC | INTR_MPSAFE, + if (bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, NULL, bcm_sdhci_intr, sc, &sc->sc_intrhand)) { bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); @@ -243,7 +238,7 @@ bcm_sdhci_attach(device_t dev) bcm_dma_setup_intr(sc->sc_dma_ch, bcm_sdhci_dma_intr, sc); - /* Allocate DMA buffers */ + /* Allocate bus_dma resources. */ err = bus_dma_tag_create(bus_get_dma_tag(dev), 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, @@ -256,37 +251,14 @@ bcm_sdhci_attach(device_t dev) goto fail; } - err = bus_dmamem_alloc(sc->sc_dma_tag, &buffer, - BUS_DMA_WAITOK | BUS_DMA_COHERENT| BUS_DMA_ZERO, - &sc->sc_dma_map); - - if (err) { - device_printf(dev, "cannot allocate DMA memory\n"); - goto fail; - } - - err = bus_dmamap_load(sc->sc_dma_tag, sc->sc_dma_map, buffer, - BCM_SDHCI_BUFFER_SIZE, bcm_dmamap_cb, &buffer_phys, - BUS_DMA_WAITOK); + err = bus_dmamap_create(sc->sc_dma_tag, 0, &sc->sc_dma_map); if (err) { - device_printf(dev, "cannot load DMA memory\n"); - goto fail; - } - - /* - * Sanity check: two least bits of address should be zero - */ - if ((uintptr_t)buffer & 3) { - device_printf(dev, - "DMA address is not word-aligned\n"); + device_printf(dev, "bus_dmamap_create failed\n"); goto fail; } - sc->sc_dma_buffer = buffer; - sc->sc_dma_buffer_phys = buffer_phys; - va = (void*)rman_get_start(sc->sc_mem_res); - sc->sc_sdhci_buffer_phys = - pmap_kextract((vm_offset_t)va) + SDHCI_BUFFER; + sc->sc_sdhci_buffer_phys = BUS_SPACE_PHYSADDR(sc->sc_mem_res, + SDHCI_BUFFER); bus_generic_probe(dev); bus_generic_attach(dev); @@ -447,27 +419,23 @@ bcm_sdhci_dma_intr(int ch, void *arg) struct bcm_sdhci_softc *sc = (struct bcm_sdhci_softc *)arg; struct sdhci_slot *slot = &sc->sc_slot; uint32_t reg, mask; - void *buffer; + bus_addr_t pmem; + vm_paddr_t pdst, psrc; size_t len; - int left; + int left, sync_op; mtx_lock(&slot->mtx); - /* copy DMA buffer to VA if READ */ len = bcm_dma_length(sc->sc_dma_ch); if (slot->curcmd->data->flags & MMC_DATA_READ) { - bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, - BUS_DMASYNC_POSTREAD); - + sync_op = BUS_DMASYNC_POSTREAD; mask = SDHCI_INT_DATA_AVAIL; - /* all dma data in single or contiguous page */ - buffer = (uint8_t*)(slot->curcmd->data->data) + slot->offset; - memcpy(buffer, sc->sc_dma_buffer, len); } else { - bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, - BUS_DMASYNC_POSTWRITE); + sync_op = BUS_DMASYNC_POSTWRITE; mask = SDHCI_INT_SPACE_AVAIL; } + bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, sync_op); + bus_dmamap_unload(sc->sc_dma_tag, sc->sc_dma_map); slot->offset += len; sc->sc_dma_inuse = 0; @@ -501,27 +469,22 @@ bcm_sdhci_dma_intr(int ch, void *arg) SDHCI_INT_STATUS, mask); /* continue next DMA transfer */ + bus_dmamap_load(sc->sc_dma_tag, sc->sc_dma_map, + (uint8_t *)slot->curcmd->data->data + + slot->offset, left, bcm_dmamap_cb, &pmem, 0); if (slot->curcmd->data->flags & MMC_DATA_READ) { - bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, - BUS_DMASYNC_PREREAD); - - /* DMA start */ - if (bcm_dma_start(sc->sc_dma_ch, - sc->sc_sdhci_buffer_phys, - sc->sc_dma_buffer_phys, left) != 0) - device_printf(sc->sc_dev, "failed DMA start\n"); + psrc = sc->sc_sdhci_buffer_phys; + pdst = pmem; + sync_op = BUS_DMASYNC_PREREAD; } else { - buffer = (char*)slot->curcmd->data->data + slot->offset; - memcpy(sc->sc_dma_buffer, buffer, left); - - bus_dmamap_sync(sc->sc_dma_tag, - sc->sc_dma_map, BUS_DMASYNC_PREWRITE); - - /* DMA start */ - if (bcm_dma_start(sc->sc_dma_ch, - sc->sc_dma_buffer_phys, - sc->sc_sdhci_buffer_phys, left) != 0) - device_printf(sc->sc_dev, "failed DMA start\n"); + psrc = pmem; + pdst = sc->sc_sdhci_buffer_phys; + sync_op = BUS_DMASYNC_PREWRITE; + } + bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, sync_op); + if (bcm_dma_start(sc->sc_dma_ch, psrc, pdst, left)) { + /* XXX stop xfer, other error recovery? */ + device_printf(sc->sc_dev, "failed DMA start\n"); } } else { /* wait for next data by INT */ @@ -542,6 +505,7 @@ bcm_sdhci_read_dma(struct sdhci_slot *sl { struct bcm_sdhci_softc *sc = device_get_softc(slot->bus); size_t left; + bus_addr_t paddr; if (sc->sc_dma_inuse) { device_printf(sc->sc_dev, "DMA in use\n"); @@ -562,12 +526,16 @@ bcm_sdhci_read_dma(struct sdhci_slot *sl BCM_DMA_INC_ADDR, (left & 0xf) ? BCM_DMA_32BIT : BCM_DMA_128BIT); + bus_dmamap_load(sc->sc_dma_tag, sc->sc_dma_map, + (uint8_t *)slot->curcmd->data->data + slot->offset, left, + bcm_dmamap_cb, &paddr, 0); + bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, BUS_DMASYNC_PREREAD); /* DMA start */ if (bcm_dma_start(sc->sc_dma_ch, sc->sc_sdhci_buffer_phys, - sc->sc_dma_buffer_phys, left) != 0) + paddr, left) != 0) device_printf(sc->sc_dev, "failed DMA start\n"); } @@ -575,8 +543,8 @@ static void bcm_sdhci_write_dma(struct sdhci_slot *slot) { struct bcm_sdhci_softc *sc = device_get_softc(slot->bus); - char *buffer; size_t left; + bus_addr_t paddr; if (sc->sc_dma_inuse) { device_printf(sc->sc_dev, "DMA in use\n"); @@ -591,8 +559,9 @@ bcm_sdhci_write_dma(struct sdhci_slot *s KASSERT((left & 3) == 0, ("%s: len = %d, not word-aligned", __func__, left)); - buffer = (char*)slot->curcmd->data->data + slot->offset; - memcpy(sc->sc_dma_buffer, buffer, left); + bus_dmamap_load(sc->sc_dma_tag, sc->sc_dma_map, + (uint8_t *)slot->curcmd->data->data + slot->offset, left, + bcm_dmamap_cb, &paddr, 0); bcm_dma_setup_src(sc->sc_dma_ch, BCM_DMA_DREQ_NONE, BCM_DMA_INC_ADDR, @@ -604,7 +573,7 @@ bcm_sdhci_write_dma(struct sdhci_slot *s BUS_DMASYNC_PREWRITE); /* DMA start */ - if (bcm_dma_start(sc->sc_dma_ch, sc->sc_dma_buffer_phys, + if (bcm_dma_start(sc->sc_dma_ch, paddr, sc->sc_sdhci_buffer_phys, left) != 0) device_printf(sc->sc_dev, "failed DMA start\n"); } @@ -614,11 +583,16 @@ bcm_sdhci_will_handle_transfer(device_t { size_t left; - /* Do not use DMA for transfers less then block size */ + /* + * Do not use DMA for transfers less than block size or with a length + * that is not a multiple of four. + */ left = min(BCM_DMA_BLOCK_SIZE, slot->curcmd->data->len - slot->offset); if (left < BCM_DMA_BLOCK_SIZE) return (0); + if (left & 0x03) + return (0); return (1); } Modified: projects/efika_mx/sys/arm/include/bus.h ============================================================================== --- projects/efika_mx/sys/arm/include/bus.h Mon Mar 18 15:27:59 2013 (r248468) +++ projects/efika_mx/sys/arm/include/bus.h Mon Mar 18 15:38:15 2013 (r248469) @@ -725,4 +725,12 @@ bs_c_8_proto(f); #include <machine/bus_dma.h> +/* + * Get the physical address of a bus space memory-mapped resource. + * Doing this as a macro is a temporary solution until a more robust fix is + * designed. It also serves to mark the locations needing that fix. + */ +#define BUS_SPACE_PHYSADDR(res, offs) \ + ((u_int)(rman_get_start(res)+(offs))) + #endif /* _MACHINE_BUS_H_ */ Modified: projects/efika_mx/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- projects/efika_mx/sys/arm/ti/cpsw/if_cpsw.c Mon Mar 18 15:27:59 2013 (r248468) +++ projects/efika_mx/sys/arm/ti/cpsw/if_cpsw.c Mon Mar 18 15:38:15 2013 (r248469) @@ -327,7 +327,7 @@ cpsw_debugf(const char *fmt, ...) #define cpsw_cpdma_bd_offset(i) (CPSW_CPPI_RAM_OFFSET + ((i)*16)) #define cpsw_cpdma_bd_paddr(sc, slot) \ - (slot->bd_offset + vtophys(rman_get_start(sc->res[0]))) + BUS_SPACE_PHYSADDR(sc->res[0], slot->bd_offset) #define cpsw_cpdma_read_bd(sc, slot, val) \ bus_read_region_4(sc->res[0], slot->bd_offset, (uint32_t *) val, 4) #define cpsw_cpdma_write_bd(sc, slot, val) \ Modified: projects/efika_mx/sys/arm/ti/ti_mmchs.c ============================================================================== --- projects/efika_mx/sys/arm/ti/ti_mmchs.c Mon Mar 18 15:27:59 2013 (r248468) +++ projects/efika_mx/sys/arm/ti/ti_mmchs.c Mon Mar 18 15:38:15 2013 (r248469) @@ -1584,7 +1584,6 @@ static int ti_mmchs_activate(device_t dev) { struct ti_mmchs_softc *sc = device_get_softc(dev); - unsigned long addr; int rid; int err; @@ -1630,8 +1629,8 @@ ti_mmchs_activate(device_t dev) panic("Unknown OMAP device\n"); /* Get the physical address of the MMC data register, needed for DMA */ - addr = vtophys(rman_get_start(sc->sc_mem_res)); - sc->sc_data_reg_paddr = addr + sc->sc_reg_off + MMCHS_DATA; + sc->sc_data_reg_paddr = BUS_SPACE_PHYSADDR(sc->sc_mem_res, + sc->sc_reg_off + MMCHS_DATA); /* Set the initial power state to off */ sc->sc_cur_power_mode = power_off; Modified: projects/efika_mx/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c ============================================================================== --- projects/efika_mx/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Mon Mar 18 15:27:59 2013 (r248468) +++ projects/efika_mx/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c Mon Mar 18 15:38:15 2013 (r248469) @@ -271,7 +271,7 @@ uint64_t zfs_deadman_synctime = 1000ULL; TUNABLE_QUAD("vfs.zfs.deadman_synctime", &zfs_deadman_synctime); SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, deadman_synctime, CTLFLAG_RDTUN, &zfs_deadman_synctime, 0, - "Stalled ZFS I/O expiration time in units of vfs.zfs.txg_synctime_ms"); + "Stalled ZFS I/O expiration time in units of vfs.zfs.txg.synctime_ms"); /* * Default value of -1 for zfs_deadman_enabled is resolved in Modified: projects/efika_mx/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h ============================================================================== --- projects/efika_mx/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Mon Mar 18 15:27:59 2013 (r248468) +++ projects/efika_mx/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Mon Mar 18 15:38:15 2013 (r248469) @@ -2313,10 +2313,10 @@ extern int dtrace_mach_aframes(void); #if defined(__i386) || defined(__amd64) extern int dtrace_instr_size(uchar_t *instr); extern int dtrace_instr_size_isa(uchar_t *, model_t, int *); -extern void dtrace_invop_add(int (*)(uintptr_t, uintptr_t *, uintptr_t)); -extern void dtrace_invop_remove(int (*)(uintptr_t, uintptr_t *, uintptr_t)); extern void dtrace_invop_callsite(void); #endif +extern void dtrace_invop_add(int (*)(uintptr_t, uintptr_t *, uintptr_t)); +extern void dtrace_invop_remove(int (*)(uintptr_t, uintptr_t *, uintptr_t)); #ifdef __sparc extern int dtrace_blksuword32(uintptr_t, uint32_t *, int); @@ -2349,6 +2349,15 @@ extern void dtrace_helpers_destroy(proc_ #define DTRACE_INVOP_NOP 4 #define DTRACE_INVOP_RET 5 +#elif defined(__powerpc__) + +#define DTRACE_INVOP_RET 1 +#define DTRACE_INVOP_BCTR 2 +#define DTRACE_INVOP_BLR 3 +#define DTRACE_INVOP_JUMP 4 +#define DTRACE_INVOP_MFLR_R0 5 +#define DTRACE_INVOP_NOP 6 + #endif #ifdef __cplusplus Modified: projects/efika_mx/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S ============================================================================== --- projects/efika_mx/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S Mon Mar 18 15:27:59 2013 (r248468) +++ projects/efika_mx/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S Mon Mar 18 15:38:15 2013 (r248469) @@ -85,10 +85,10 @@ ASENTRY_NOPROF(dtrace_cas32) 1: lwarx %r0,0,%r3 cmpw %r4,%r0 - bne 2f + bne 2f stwcx. %r5,0,%r3 - bne 1b -2: mr %r3,%r0 + bne 1b +2: mr %r3,%r0 blr END(dtrace_cas32) @@ -100,22 +100,15 @@ ASENTRY_NOPROF(dtrace_casptr) 1: lwarx %r0,0,%r3 cmpw %r4,%r0 - bne 2f + bne 2f stwcx. %r5,0,%r3 - bne 1b -2: mr %r3,%r0 + bne 1b +2: mr %r3,%r0 blr END(dtrace_casptr) /* -uintptr_t -dtrace_fulword(void *addr) -*/ -ASENTRY_NOPROF(dtrace_fulword) -END(dtrace_fulword) - -/* XXX: unoptimized void dtrace_copy(uintptr_t src, uintptr_t dest, size_t size) @@ -127,7 +120,7 @@ ASENTRY_NOPROF(dtrace_copy) lbzu %r3,1(%r7) stbu %r3,1(%r8) addme %r5,%r5 - beq 2f + beq 2f 2: blr END(dtrace_copy) @@ -144,42 +137,19 @@ ASENTRY_NOPROF(dtrace_copystr) lbzu %r3,1(%r7) stbu %r3,1(%r8) addme %r5,%r5 - beq 2f - or %r3,%r3,%r3 - beq 2f + beq 2f + or %r3,%r3,%r3 + beq 2f andi. %r0,%r5,0x0fff - beq 2f - lwz %r0,0(%r6) + beq 2f + lwz %r0,0(%r6) andi. %r0,%r0,CPU_DTRACE_BADADDR - beq 1b + beq 1b 2: blr END(dtrace_copystr) /* -void dtrace_invop_init(void) -*/ -ASENTRY_NOPROF(dtrace_invop_init) - /* XXX: impement it properly -- implement dtrace_invop_start */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303181538.r2IFcFHF094819>