Date: Thu, 29 Jan 2015 08:41:35 +0000 (UTC) From: Garrett Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r277872 - in projects/building-blocks: bin/expr contrib/amd/amd contrib/amd/hlfsd contrib/elftoolchain/elfcopy contrib/netbsd-tests/bin/expr contrib/sendmail/cf/m4 etc/rc.d etc/sendmail... Message-ID: <201501290841.t0T8fZNu086671@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Thu Jan 29 08:41:34 2015 New Revision: 277872 URL: https://svnweb.freebsd.org/changeset/base/277872 Log: MFhead @ r277871 Added: projects/building-blocks/sys/dev/hwpmc/hwpmc_armv7.c - copied unchanged from r277871, head/sys/dev/hwpmc/hwpmc_armv7.c projects/building-blocks/sys/dev/hwpmc/hwpmc_armv7.h - copied unchanged from r277871, head/sys/dev/hwpmc/hwpmc_armv7.h Modified: projects/building-blocks/bin/expr/expr.y projects/building-blocks/contrib/amd/amd/amfs_generic.c projects/building-blocks/contrib/amd/hlfsd/homedir.c projects/building-blocks/contrib/elftoolchain/elfcopy/main.c projects/building-blocks/contrib/netbsd-tests/bin/expr/t_expr.sh projects/building-blocks/contrib/sendmail/cf/m4/cfhead.m4 projects/building-blocks/etc/rc.d/ipfilter projects/building-blocks/etc/sendmail/Makefile projects/building-blocks/lib/libc/gen/sem_new.c projects/building-blocks/lib/libc/gen/sem_post.3 projects/building-blocks/lib/libpmc/libpmc.c projects/building-blocks/lib/libthread_db/arch/i386/libpthread_md.c projects/building-blocks/release/Makefile projects/building-blocks/release/scripts/make-manifest.sh projects/building-blocks/sbin/geom/class/mountver/gmountver.8 projects/building-blocks/share/man/man7/release.7 projects/building-blocks/share/man/man9/pmap_enter.9 projects/building-blocks/sys/arm/arm/intr.c projects/building-blocks/sys/arm/include/pmc_mdep.h projects/building-blocks/sys/arm/ti/am335x/am335x_prcm.c projects/building-blocks/sys/arm/ti/files.ti projects/building-blocks/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c projects/building-blocks/sys/conf/files.arm projects/building-blocks/sys/dev/acpica/acpi.c projects/building-blocks/sys/dev/ath/ath_hal/ah_internal.h projects/building-blocks/sys/dev/ath/ath_rate/sample/sample.c projects/building-blocks/sys/dev/ath/ath_rate/sample/sample.h projects/building-blocks/sys/dev/fb/fbd.c projects/building-blocks/sys/dev/hwpmc/hwpmc_arm.c projects/building-blocks/sys/dev/hwpmc/pmc_events.h projects/building-blocks/sys/dev/syscons/syscons.c projects/building-blocks/sys/dev/virtio/block/virtio_blk.c projects/building-blocks/sys/dev/vt/hw/fb/vt_fb.c projects/building-blocks/sys/dev/vt/hw/fb/vt_fb.h projects/building-blocks/sys/dev/vt/vt.h projects/building-blocks/sys/dev/vt/vt_core.c projects/building-blocks/sys/fs/fdescfs/fdesc_vfsops.c projects/building-blocks/sys/fs/tmpfs/tmpfs.h projects/building-blocks/sys/fs/tmpfs/tmpfs_subr.c projects/building-blocks/sys/fs/tmpfs/tmpfs_vfsops.c projects/building-blocks/sys/fs/tmpfs/tmpfs_vnops.c projects/building-blocks/sys/kern/kern_jail.c projects/building-blocks/sys/netinet/sctp_input.c projects/building-blocks/sys/netinet/sctp_usrreq.c projects/building-blocks/sys/netipsec/key.c projects/building-blocks/sys/powerpc/pseries/plpar_iommu.c projects/building-blocks/sys/sys/eventhandler.h projects/building-blocks/sys/sys/jail.h projects/building-blocks/sys/sys/pmc.h projects/building-blocks/sys/ufs/ufs/ufs_quota.c projects/building-blocks/sys/ufs/ufs/ufs_vfsops.c projects/building-blocks/sys/vm/vm_fault.c projects/building-blocks/sys/vm/vm_object.c projects/building-blocks/sys/vm/vm_object.h projects/building-blocks/usr.bin/sed/main.c projects/building-blocks/usr.bin/sed/process.c projects/building-blocks/usr.sbin/autofs/autounmountd.c projects/building-blocks/usr.sbin/binmiscctl/binmiscctl.c projects/building-blocks/usr.sbin/jail/jail.8 projects/building-blocks/usr.sbin/pciconf/pciconf.c projects/building-blocks/usr.sbin/pmcstudy/pmcstudy.c projects/building-blocks/usr.sbin/ppp/command.c projects/building-blocks/usr.sbin/ppp/ipcp.c projects/building-blocks/usr.sbin/ppp/ipv6cp.c projects/building-blocks/usr.sbin/ppp/radius.c projects/building-blocks/usr.sbin/ppp/server.c projects/building-blocks/usr.sbin/sa/db.c Directory Properties: projects/building-blocks/ (props changed) projects/building-blocks/contrib/amd/ (props changed) projects/building-blocks/contrib/elftoolchain/ (props changed) projects/building-blocks/contrib/sendmail/ (props changed) projects/building-blocks/etc/ (props changed) projects/building-blocks/lib/libc/ (props changed) projects/building-blocks/sbin/ (props changed) projects/building-blocks/share/ (props changed) projects/building-blocks/sys/ (props changed) projects/building-blocks/sys/cddl/contrib/opensolaris/ (props changed) projects/building-blocks/sys/conf/ (props changed) projects/building-blocks/usr.sbin/jail/ (props changed) Modified: projects/building-blocks/bin/expr/expr.y ============================================================================== --- projects/building-blocks/bin/expr/expr.y Thu Jan 29 01:59:42 2015 (r277871) +++ projects/building-blocks/bin/expr/expr.y Thu Jan 29 08:41:34 2015 (r277872) @@ -444,14 +444,26 @@ op_minus(struct val *a, struct val *b) return (r); } +/* + * We depend on undefined behaviour giving a result (in r). + * To test this result, pass it as volatile. This prevents + * optimizing away of the test based on the undefined behaviour. + */ void -assert_times(intmax_t a, intmax_t b, intmax_t r) +assert_times(intmax_t a, intmax_t b, volatile intmax_t r) { /* - * if first operand is 0, no overflow is possible, - * else result of division test must match second operand + * If the first operand is 0, no overflow is possible, + * else the result of the division test must match the + * second operand. + * + * Be careful to avoid overflow in the overflow test, as + * in assert_div(). Overflow in division would kill us + * with a SIGFPE before getting the test wrong. In old + * buggy versions, optimization used to give a null test + * instead of a SIGFPE. */ - if (a != 0 && r / a != b) + if ((a == -1 && b == INTMAX_MIN) || (a != 0 && r / a != b)) errx(ERR_EXIT, "overflow"); } Modified: projects/building-blocks/contrib/amd/amd/amfs_generic.c ============================================================================== --- projects/building-blocks/contrib/amd/amd/amfs_generic.c Thu Jan 29 01:59:42 2015 (r277871) +++ projects/building-blocks/contrib/amd/amd/amfs_generic.c Thu Jan 29 08:41:34 2015 (r277872) @@ -1113,7 +1113,7 @@ amfs_generic_mount_child(am_node *new_mp new_mp->am_transp = (SVCXPRT *) xmalloc(sizeof(SVCXPRT)); *(new_mp->am_transp) = *current_transp; } - if (error && (new_mp->am_mnt->mf_ops == &amfs_error_ops)) + if (error && new_mp->am_mnt && (new_mp->am_mnt->mf_ops == &amfs_error_ops)) new_mp->am_error = error; if (new_mp->am_error > 0) Modified: projects/building-blocks/contrib/amd/hlfsd/homedir.c ============================================================================== --- projects/building-blocks/contrib/amd/hlfsd/homedir.c Thu Jan 29 01:59:42 2015 (r277871) +++ projects/building-blocks/contrib/amd/hlfsd/homedir.c Thu Jan 29 08:41:34 2015 (r277872) @@ -494,7 +494,7 @@ readent: buf[0] = '\0'; fgets(buf, 256, passwd_fp); passwd_line++; - if (!buf || buf[0] == '\0') + if (buf[0] == '\0') goto readent; /* read user name */ Modified: projects/building-blocks/contrib/elftoolchain/elfcopy/main.c ============================================================================== --- projects/building-blocks/contrib/elftoolchain/elfcopy/main.c Thu Jan 29 01:59:42 2015 (r277871) +++ projects/building-blocks/contrib/elftoolchain/elfcopy/main.c Thu Jan 29 08:41:34 2015 (r277872) @@ -210,7 +210,7 @@ static struct { }; static int copy_from_tempfile(const char *src, const char *dst, - int infd, int *outfd); + int infd, int *outfd, int in_place); static void create_file(struct elfcopy *ecp, const char *src, const char *dst); static void elfcopy_main(struct elfcopy *ecp, int argc, char **argv); @@ -523,33 +523,39 @@ create_tempfile(char **fn, int *fd) #undef _TEMPFILEPATH } +/* + * Copy temporary file with path src and file descriptor infd to path dst. + * If in_place is set act as if editing the file in place, avoiding rename() + * to preserve hard and symbolic links. Output file remains open, with file + * descriptor returned in outfd. + */ static int -copy_from_tempfile(const char *src, const char *dst, int infd, int *outfd) +copy_from_tempfile(const char *src, const char *dst, int infd, int *outfd, + int in_place) { int tmpfd; /* * First, check if we can use rename(). */ - if (rename(src, dst) >= 0) { - *outfd = infd; - return (0); - } else if (errno != EXDEV) - return (-1); - - /* - * If the rename() failed due to 'src' and 'dst' residing in - * two different file systems, invoke a helper function in - * libelftc to do the copy. - */ - - if (unlink(dst) < 0) - return (-1); + if (in_place == 0) { + if (rename(src, dst) >= 0) { + *outfd = infd; + return (0); + } else if (errno != EXDEV) + return (-1); + + /* + * If the rename() failed due to 'src' and 'dst' residing in + * two different file systems, invoke a helper function in + * libelftc to do the copy. + */ - if ((tmpfd = open(dst, O_CREAT | O_WRONLY, 0755)) < 0) - return (-1); + if (unlink(dst) < 0) + return (-1); + } - if (lseek(infd, 0, SEEK_SET) < 0) + if ((tmpfd = open(dst, O_CREAT | O_TRUNC | O_WRONLY, 0755)) < 0) return (-1); if (elftc_copyfile(infd, tmpfd) < 0) @@ -578,6 +584,7 @@ create_file(struct elfcopy *ecp, const c struct stat sb; char *tempfile, *elftemp; int efd, ifd, ofd, ofd0, tfd; + int in_place; tempfile = NULL; @@ -718,10 +725,15 @@ copy_done: #endif if (tempfile != NULL) { - if (dst == NULL) + in_place = 0; + if (dst == NULL) { dst = src; + if (lstat(dst, &sb) != -1 && + (sb.st_nlink > 1 || S_ISLNK(sb.st_mode))) + in_place = 1; + } - if (copy_from_tempfile(tempfile, dst, ofd, &tfd) < 0) + if (copy_from_tempfile(tempfile, dst, ofd, &tfd, in_place) < 0) err(EXIT_FAILURE, "creation of %s failed", dst); free(tempfile); Modified: projects/building-blocks/contrib/netbsd-tests/bin/expr/t_expr.sh ============================================================================== --- projects/building-blocks/contrib/netbsd-tests/bin/expr/t_expr.sh Thu Jan 29 01:59:42 2015 (r277871) +++ projects/building-blocks/contrib/netbsd-tests/bin/expr/t_expr.sh Thu Jan 29 08:41:34 2015 (r277872) @@ -54,9 +54,6 @@ overflow_head() { atf_set "descr" "Test overflow cases" } overflow_body() { - # Begin FreeBSD - atf_expect_fail "FreeBSD's expr does not check overflow to the same degree NetBSD's expr does; see bug 196867 for more details" - # End FreeBSD test_expr '4611686018427387904 + 4611686018427387903' \ '9223372036854775807' test_expr '4611686018427387904 + 4611686018427387904' \ Modified: projects/building-blocks/contrib/sendmail/cf/m4/cfhead.m4 ============================================================================== --- projects/building-blocks/contrib/sendmail/cf/m4/cfhead.m4 Thu Jan 29 01:59:42 2015 (r277871) +++ projects/building-blocks/contrib/sendmail/cf/m4/cfhead.m4 Thu Jan 29 08:41:34 2015 (r277872) @@ -20,7 +20,7 @@ ifdef(`__win32__', `dnl', `dnl ifdef(`TEMPFILE', `dnl', `define(`TEMPFILE', maketemp(/tmp/cfXXXXXX))dnl syscmd(sh _CF_DIR_`'sh/makeinfo.sh _CF_DIR_ > TEMPFILE)dnl -include(TEMPFILE)dnl +ifdef(`_NO_MAKEINFO_',, `include(TEMPFILE)')dnl syscmd(rm -f TEMPFILE)dnl')') ##### ###################################################################### Modified: projects/building-blocks/etc/rc.d/ipfilter ============================================================================== --- projects/building-blocks/etc/rc.d/ipfilter Thu Jan 29 01:59:42 2015 (r277871) +++ projects/building-blocks/etc/rc.d/ipfilter Thu Jan 29 08:41:34 2015 (r277872) @@ -65,7 +65,6 @@ ipfilter_reload() err 1 'Load of rules into alternate set failed; aborting reload' fi fi - ${ipfilter_program:-/sbin/ipf} -I -6 -Fa if [ -r "${ipv6_ipfilter_rules}" ]; then ${ipfilter_program:-/sbin/ipf} -I -6 \ -f "${ipv6_ipfilter_rules}" ${ipfilter_flags} Modified: projects/building-blocks/etc/sendmail/Makefile ============================================================================== --- projects/building-blocks/etc/sendmail/Makefile Thu Jan 29 01:59:42 2015 (r277871) +++ projects/building-blocks/etc/sendmail/Makefile Thu Jan 29 08:41:34 2015 (r277872) @@ -17,7 +17,8 @@ M4FILES!= find ${SENDMAIL_CF_DIR} -type .mc.cf: ${M4FILES} ${RM} ${.TARGET} - ${M4} -D_CF_DIR_=${SENDMAIL_CF_DIR}/ ${SENDMAIL_M4_FLAGS} \ + ${M4} -D_CF_DIR_=${SENDMAIL_CF_DIR}/ -D_NO_MAKEINFO_ \ + ${SENDMAIL_M4_FLAGS} \ ${SENDMAIL_CF_DIR}/m4/cf.m4 ${.IMPSRC} > ${.TARGET} ${CHMOD} ${ROMODE} ${.TARGET} Modified: projects/building-blocks/lib/libc/gen/sem_new.c ============================================================================== --- projects/building-blocks/lib/libc/gen/sem_new.c Thu Jan 29 01:59:42 2015 (r277871) +++ projects/building-blocks/lib/libc/gen/sem_new.c Thu Jan 29 08:41:34 2015 (r277872) @@ -439,8 +439,10 @@ _sem_post(sem_t *sem) do { count = sem->_kern._count; - if (USEM_COUNT(count) + 1 > SEM_VALUE_MAX) - return (EOVERFLOW); + if (USEM_COUNT(count) + 1 > SEM_VALUE_MAX) { + errno = EOVERFLOW; + return (-1); + } } while (!atomic_cmpset_rel_int(&sem->_kern._count, count, count + 1)); if (count & USEM_HAS_WAITERS) usem_wake(&sem->_kern); Modified: projects/building-blocks/lib/libc/gen/sem_post.3 ============================================================================== --- projects/building-blocks/lib/libc/gen/sem_post.3 Thu Jan 29 01:59:42 2015 (r277871) +++ projects/building-blocks/lib/libc/gen/sem_post.3 Thu Jan 29 08:41:34 2015 (r277872) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 15, 2000 +.Dd January 28, 2015 .Dt SEM_POST 3 .Os .Sh NAME @@ -65,6 +65,9 @@ The .Fa sem argument points to an invalid semaphore. +.It Bq Er EOVERFLOW +The semaphore value would exceed +.Dv SEM_VALUE_MAX . .El .Sh SEE ALSO .Xr sem_getvalue 3 , Modified: projects/building-blocks/lib/libpmc/libpmc.c ============================================================================== --- projects/building-blocks/lib/libpmc/libpmc.c Thu Jan 29 01:59:42 2015 (r277871) +++ projects/building-blocks/lib/libpmc/libpmc.c Thu Jan 29 08:41:34 2015 (r277872) @@ -74,10 +74,14 @@ static int p6_allocate_pmc(enum pmc_even static int tsc_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct pmc_op_pmcallocate *_pmc_config); #endif +#if defined(__arm__) #if defined(__XSCALE__) static int xscale_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct pmc_op_pmcallocate *_pmc_config); #endif +static int armv7_allocate_pmc(enum pmc_event _pe, char *_ctrspec, + struct pmc_op_pmcallocate *_pmc_config); +#endif #if defined(__mips__) static int mips_allocate_pmc(enum pmc_event _pe, char* ctrspec, struct pmc_op_pmcallocate *_pmc_config); @@ -153,6 +157,7 @@ PMC_CLASSDEP_TABLE(p4, P4); PMC_CLASSDEP_TABLE(p5, P5); PMC_CLASSDEP_TABLE(p6, P6); PMC_CLASSDEP_TABLE(xscale, XSCALE); +PMC_CLASSDEP_TABLE(armv7, ARMV7); PMC_CLASSDEP_TABLE(mips24k, MIPS24K); PMC_CLASSDEP_TABLE(octeon, OCTEON); PMC_CLASSDEP_TABLE(ucf, UCF); @@ -286,6 +291,7 @@ PMC_MDEP_TABLE(p4, P4, PMC_CLASS_SOFT, P PMC_MDEP_TABLE(p5, P5, PMC_CLASS_SOFT, PMC_CLASS_TSC); PMC_MDEP_TABLE(p6, P6, PMC_CLASS_SOFT, PMC_CLASS_TSC); PMC_MDEP_TABLE(xscale, XSCALE, PMC_CLASS_SOFT, PMC_CLASS_XSCALE); +PMC_MDEP_TABLE(armv7, ARMV7, PMC_CLASS_SOFT, PMC_CLASS_ARMV7); PMC_MDEP_TABLE(mips24k, MIPS24K, PMC_CLASS_SOFT, PMC_CLASS_MIPS24K); PMC_MDEP_TABLE(octeon, OCTEON, PMC_CLASS_SOFT, PMC_CLASS_OCTEON); PMC_MDEP_TABLE(ppc7450, PPC7450, PMC_CLASS_SOFT, PMC_CLASS_PPC7450); @@ -346,9 +352,12 @@ PMC_CLASS_TABLE_DESC(p6, P6, p6, p6); #if defined(__i386__) || defined(__amd64__) PMC_CLASS_TABLE_DESC(tsc, TSC, tsc, tsc); #endif +#if defined(__arm__) #if defined(__XSCALE__) PMC_CLASS_TABLE_DESC(xscale, XSCALE, xscale, xscale); #endif +PMC_CLASS_TABLE_DESC(armv7, ARMV7, armv7, armv7); +#endif #if defined(__mips__) PMC_CLASS_TABLE_DESC(mips24k, MIPS24K, mips24k, mips); PMC_CLASS_TABLE_DESC(octeon, OCTEON, octeon, mips); @@ -2371,6 +2380,7 @@ soft_allocate_pmc(enum pmc_event pe, cha return (0); } +#if defined(__arm__) #if defined(__XSCALE__) static struct pmc_event_alias xscale_aliases[] = { @@ -2394,6 +2404,25 @@ xscale_allocate_pmc(enum pmc_event pe, c } #endif +static struct pmc_event_alias armv7_aliases[] = { + EV_ALIAS("dc-misses", "L1_DCACHE_REFILL"), + EV_ALIAS("ic-misses", "L1_ICACHE_REFILL"), + EV_ALIAS("instructions", "INSTR_EXECUTED"), + EV_ALIAS(NULL, NULL) +}; +static int +armv7_allocate_pmc(enum pmc_event pe, char *ctrspec __unused, + struct pmc_op_pmcallocate *pmc_config __unused) +{ + switch (pe) { + default: + break; + } + + return (0); +} +#endif + #if defined(__mips__) static struct pmc_event_alias mips24k_aliases[] = { @@ -2886,6 +2915,10 @@ pmc_event_names_of_class(enum pmc_class ev = xscale_event_table; count = PMC_EVENT_TABLE_SIZE(xscale); break; + case PMC_CLASS_ARMV7: + ev = armv7_event_table; + count = PMC_EVENT_TABLE_SIZE(armv7); + break; case PMC_CLASS_MIPS24K: ev = mips24k_event_table; count = PMC_EVENT_TABLE_SIZE(mips24k); @@ -3163,12 +3196,18 @@ pmc_init(void) case PMC_CPU_GENERIC: PMC_MDEP_INIT(generic); break; +#if defined(__arm__) #if defined(__XSCALE__) case PMC_CPU_INTEL_XSCALE: PMC_MDEP_INIT(xscale); pmc_class_table[n] = &xscale_class_table_descr; break; #endif + case PMC_CPU_ARMV7: + PMC_MDEP_INIT(armv7); + pmc_class_table[n] = &armv7_class_table_descr; + break; +#endif #if defined(__mips__) case PMC_CPU_MIPS_24K: PMC_MDEP_INIT(mips24k); @@ -3369,6 +3408,9 @@ _pmc_name_of_event(enum pmc_event pe, en } else if (pe >= PMC_EV_XSCALE_FIRST && pe <= PMC_EV_XSCALE_LAST) { ev = xscale_event_table; evfence = xscale_event_table + PMC_EVENT_TABLE_SIZE(xscale); + } else if (pe >= PMC_EV_ARMV7_FIRST && pe <= PMC_EV_ARMV7_LAST) { + ev = armv7_event_table; + evfence = armv7_event_table + PMC_EVENT_TABLE_SIZE(armv7); } else if (pe >= PMC_EV_MIPS24K_FIRST && pe <= PMC_EV_MIPS24K_LAST) { ev = mips24k_event_table; evfence = mips24k_event_table + PMC_EVENT_TABLE_SIZE(mips24k); Modified: projects/building-blocks/lib/libthread_db/arch/i386/libpthread_md.c ============================================================================== --- projects/building-blocks/lib/libthread_db/arch/i386/libpthread_md.c Thu Jan 29 01:59:42 2015 (r277871) +++ projects/building-blocks/lib/libthread_db/arch/i386/libpthread_md.c Thu Jan 29 08:41:34 2015 (r277872) @@ -72,7 +72,7 @@ pt_ucontext_to_fpreg(const ucontext_t *u memcpy(r, &uc->uc_mcontext.mc_fpstate, sizeof(struct save87)); else { int i; - struct savexmm *sx = (struct savexmm *)&uc->uc_mcontext.mc_fpstate; + const struct savexmm *sx = (const struct savexmm *)&uc->uc_mcontext.mc_fpstate; memcpy(&r->fpr_env, &sx->sv_env, sizeof(r->fpr_env)); for (i = 0; i < 8; ++i) memcpy(&r->fpr_acc[i], &sx->sv_fp[i].fp_acc, 10); Modified: projects/building-blocks/release/Makefile ============================================================================== --- projects/building-blocks/release/Makefile Thu Jan 29 01:59:42 2015 (r277871) +++ projects/building-blocks/release/Makefile Thu Jan 29 08:41:34 2015 (r277872) @@ -109,7 +109,7 @@ IMAGES+= memstick.img IMAGES+= mini-memstick.img .endif -CLEANFILES= packagesystem *.txz MANIFEST system ${IMAGES} +CLEANFILES= packagesystem *.txz MANIFEST release ${IMAGES} .if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) . for I in ${IMAGES} CLEANFILES+= ${I}.xz @@ -118,7 +118,7 @@ CLEANFILES+= ${I}.xz .if defined(WITH_DVD) && !empty(WITH_DVD) CLEANFILES+= pkg-stage .endif -CLEANDIRS= dist ftp release bootonly dvd +CLEANDIRS= dist ftp disc1 bootonly dvd beforeclean: chflags -R noschg . .include <bsd.obj.mk> @@ -165,57 +165,57 @@ reldoc: .endfor cp rdoc/${RELNOTES_LANG}/readme/docbook.css reldoc -system: packagesystem +disc1: packagesystem # Install system - mkdir -p release + mkdir -p ${.TARGET} cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \ - DESTDIR=${.OBJDIR}/release MK_RESCUE=no MK_KERNEL_SYMBOLS=no \ + DESTDIR=${.OBJDIR}/${.TARGET} MK_RESCUE=no MK_KERNEL_SYMBOLS=no \ MK_PROFILE=no MK_SENDMAIL=no MK_TESTS=no MK_LIB32=no \ MK_DEBUG_FILES=no # Copy distfiles - mkdir -p release/usr/freebsd-dist + mkdir -p ${.TARGET}/usr/freebsd-dist for dist in MANIFEST $$(ls *.txz | grep -v -- '-dbg'); \ - do cp $${dist} release/usr/freebsd-dist; \ + do cp $${dist} ${.TARGET}/usr/freebsd-dist; \ done # Copy documentation, if generated .if !defined(NODOC) - cp reldoc/* release + cp reldoc/* ${.TARGET} .endif # Set up installation environment - ln -fs /tmp/bsdinstall_etc/resolv.conf release/etc/resolv.conf - echo sendmail_enable=\"NONE\" > release/etc/rc.conf - echo hostid_enable=\"NO\" >> release/etc/rc.conf - echo debug.witness.trace=0 >> release/etc/sysctl.conf - echo vfs.mountroot.timeout=\"10\" >> release/boot/loader.conf - cp ${.CURDIR}/rc.local release/etc + ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf + echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf + echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf + echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf + echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf + cp ${.CURDIR}/rc.local ${.TARGET}/etc touch ${.TARGET} bootonly: packagesystem # Install system - mkdir -p bootonly + mkdir -p ${.TARGET} cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \ - DESTDIR=${.OBJDIR}/bootonly MK_AMD=no MK_AT=no \ + DESTDIR=${.OBJDIR}/${.TARGET} MK_AMD=no MK_AT=no \ MK_GAMES=no MK_GROFF=no \ MK_INSTALLLIB=no MK_LIB32=no MK_MAIL=no \ MK_NCP=no MK_TOOLCHAIN=no MK_PROFILE=no \ MK_INSTALLIB=no MK_RESCUE=no MK_DICT=no \ MK_KERNEL_SYMBOLS=no MK_TESTS=no MK_DEBUG_FILES=no # Copy manifest only (no distfiles) to get checksums - mkdir -p bootonly/usr/freebsd-dist - cp MANIFEST bootonly/usr/freebsd-dist + mkdir -p ${.TARGET}/usr/freebsd-dist + cp MANIFEST ${.TARGET}/usr/freebsd-dist # Copy documentation, if generated .if !defined(NODOC) - cp reldoc/* bootonly + cp reldoc/* ${.TARGET} .endif # Set up installation environment - ln -fs /tmp/bsdinstall_etc/resolv.conf bootonly/etc/resolv.conf - echo sendmail_enable=\"NONE\" > bootonly/etc/rc.conf - echo hostid_enable=\"NO\" >> bootonly/etc/rc.conf - echo debug.witness.trace=0 >> bootonly/etc/sysctl.conf - echo vfs.mountroot.timeout=\"10\" >> bootonly/boot/loader.conf - cp ${.CURDIR}/rc.local bootonly/etc + ln -fs /tmp/bsdinstall_etc/resolv.conf ${.TARGET}/etc/resolv.conf + echo sendmail_enable=\"NONE\" > ${.TARGET}/etc/rc.conf + echo hostid_enable=\"NO\" >> ${.TARGET}/etc/rc.conf + echo debug.witness.trace=0 >> ${.TARGET}/etc/sysctl.conf + echo vfs.mountroot.timeout=\"10\" >> ${.TARGET}/boot/loader.conf + cp ${.CURDIR}/rc.local ${.TARGET}/etc -dvd: +dvd: packagesystem # Install system mkdir -p ${.TARGET} cd ${WORLDDIR} && ${IMAKE} installkernel installworld distribution \ @@ -240,8 +240,8 @@ dvd: touch ${.TARGET} release.iso: disc1.iso -disc1.iso: system - sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_CD ${.TARGET} release +disc1.iso: disc1 + sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_CD ${.TARGET} disc1 dvd1.iso: dvd pkg-stage sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_DVD ${.TARGET} dvd @@ -250,11 +250,11 @@ bootonly.iso: bootonly sh ${.CURDIR}/${TARGET}/mkisoimages.sh -b ${VOLUME_LABEL}_BO ${.TARGET} bootonly memstick: memstick.img -memstick.img: system - sh ${.CURDIR}/${TARGET}/make-memstick.sh release ${.TARGET} +memstick.img: disc1 + sh ${.CURDIR}/${TARGET}/make-memstick.sh disc1 ${.TARGET} mini-memstick: mini-memstick.img -mini-memstick.img: system +mini-memstick.img: bootonly sh ${.CURDIR}/${TARGET}/make-memstick.sh bootonly ${.TARGET} packagesystem: base.txz kernel.txz ${EXTRA_PACKAGES} @@ -279,7 +279,7 @@ ftp: packagesystem cp *.txz MANIFEST ftp release: real-release vm-release cloudware-release - @true + touch ${.TARGET} real-release: ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj Modified: projects/building-blocks/release/scripts/make-manifest.sh ============================================================================== --- projects/building-blocks/release/scripts/make-manifest.sh Thu Jan 29 01:59:42 2015 (r277871) +++ projects/building-blocks/release/scripts/make-manifest.sh Thu Jan 29 08:41:34 2015 (r277872) @@ -5,7 +5,7 @@ # Usage: make-manifest.sh foo1.txz foo2.txz ... # # The output file looks like this (tab-delimited): -# foo1.txz SHA256-checksu Number-of-files foo1 Description Install-by-default +# foo1.txz SHA256-checksum Number-of-files foo1 Description Install-by-default # # $FreeBSD$ @@ -17,7 +17,9 @@ desc_games="Games (fortune, etc.)" desc_lib32="32-bit compatibility libraries" desc_ports="Ports tree" desc_src="System source code" +desc_tests="Test suite" src_default=off +tests_default=off for i in $*; do echo "`basename $i` `sha256 -q $i` `tar tvf $i | wc -l | tr -d ' '` `basename $i .txz` \"`eval echo \\\$desc_$(basename $i .txz)`\" `eval echo \\\${$(basename $i .txz)_default:-on}`" Modified: projects/building-blocks/sbin/geom/class/mountver/gmountver.8 ============================================================================== --- projects/building-blocks/sbin/geom/class/mountver/gmountver.8 Thu Jan 29 01:59:42 2015 (r277871) +++ projects/building-blocks/sbin/geom/class/mountver/gmountver.8 Thu Jan 29 08:41:34 2015 (r277872) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 14, 2010 +.Dd January 27, 2015 .Dt GMOUNTVER 8 .Os .Sh NAME @@ -110,7 +110,7 @@ GEOM class. This can be set to a number between 0 and 3 inclusive. If set to 0 minimal debug information is printed, and if set to 3 the maximum amount of debug information is printed. -.It Va kern.geom.mountver.check.check_ident : No 1 +.It Va kern.geom.mountver.check_ident : No 1 This can be set to 0 or 1. If set to 0, .Nm Modified: projects/building-blocks/share/man/man7/release.7 ============================================================================== --- projects/building-blocks/share/man/man7/release.7 Thu Jan 29 01:59:42 2015 (r277871) +++ projects/building-blocks/share/man/man7/release.7 Thu Jan 29 08:41:34 2015 (r277872) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 16, 2015 +.Dd January 28, 2015 .Dt RELEASE 7 .Os .Sh NAME @@ -546,7 +546,7 @@ Major subtargets called by targets above Generates all the distribution archives .Pq base, kernel, ports, doc applicable on this platform. -.It Cm system +.It Cm disc1 Builds a bootable installation system containing all the distribution files packaged by the .Cm packagesystem Modified: projects/building-blocks/share/man/man9/pmap_enter.9 ============================================================================== --- projects/building-blocks/share/man/man9/pmap_enter.9 Thu Jan 29 01:59:42 2015 (r277871) +++ projects/building-blocks/share/man/man9/pmap_enter.9 Thu Jan 29 08:41:34 2015 (r277872) @@ -1,5 +1,6 @@ .\" .\" Copyright (c) 2003 Bruce M Simpson <bms@spc.org> +.\" Copyright (c) 2014 The FreeBSD Foundation .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 21, 2003 +.Dd January 27, 2015 .Dt PMAP_ENTER 9 .Os .Sh NAME @@ -35,34 +36,129 @@ .In sys/param.h .In vm/vm.h .In vm/pmap.h -.Ft void +.Ft int .Fo pmap_enter -.Fa "pmap_t pmap" "vm_offset_t va" "vm_page_t p" "vm_prot_t prot" -.Fa "boolean_t wired" +.Fa "pmap_t pmap" "vm_offset_t va" "vm_page_t m" "vm_prot_t prot" +.Fa "u_int flags" "int8_t psind" .Fc .Sh DESCRIPTION The .Fn pmap_enter -function inserts the given physical page -.Fa p , -into the physical map -.Fa pmap , -at the virtual address -.Fa va , +function creates a mapping in the physical map +.Fa pmap +from the virtual address +.Fa va +to the physical page +.Fa m with the protection .Fa prot . -If -.Fa wired -is -.Dv TRUE , -then increment the wired count for the page as soon as the mapping -is inserted into -.Fa pmap . -.Sh IMPLEMENTATION NOTES -This routine MAY NOT lazy-evaluate the entry; it is required by -specification to make the requested entry at the time it is called. +Any previous mapping at the virtual address +.Fa va +is destroyed. +.Pp +The +.Fa flags +argument may have the following values: +.Bl -tag -width ".Dv PMAP_ENTER_NOSLEEP" +.It Dv VM_PROT_READ +A read access to the given virtual address triggered the call. +.It Dv VM_PROT_WRITE +A write access to the given virtual address triggered the call. +.It Dv VM_PROT_EXECUTE +An execute access to the given virtual address triggered the call. +.It Dv PMAP_ENTER_WIRED +The mapping should be marked as wired. +.It Dv PMAP_ENTER_NOSLEEP +This function may not sleep during creation of the mapping. +If the mapping cannot be created without sleeping, an appropriate +Mach VM error is returned. +.El +If the +.Dv PMAP_ENTER_NOSLEEP +flag is not specified, this function must create the requested mapping +before returning. +It may not fail. +In order to create the requested mapping, this function may destroy +any non-wired mapping in any pmap. +.Pp +The +.Fa psind +parameter specifies the page size that should be used by the mapping. +The supported page sizes are described by the global array +.Dv pagesizes[] . +The desired page size is specified by passing the index of the array +element that equals the desired page size. +.Pp +When the +.Fn pmap_enter +function destroys or updates a managed mapping, including an existing +mapping at virtual address +.Fa va , +it updates the +.Ft vm_page +structure corresponding to the previously mapped physical page. +If the physical page was accessed through the managed mapping, +then the +.Ft vm_page +structure's +.Dv PGA_REFERENCED +aflag is set. +If the physical page was modified through the managed mapping, then the +.Fn vm_page_dirty +function is called on the +.Ft vm_page +structure. +.Pp +The +.Dv PGA_WRITEABLE +aflag must be set for the page +.Fa m +if the new mapping is managed and writeable. +It is advised to clear +.Dv PGA_WRITEABLE +for destroyed mappings if the implementation can ensure +that no other writeable managed mappings for the previously +mapped pages exist. +.Pp +If the page +.Fa m +is managed, the page must be busied by the caller +or the owning object must be locked. +In the later case, the +.Dv PMAP_ENTER_NOSLEEP +must be specified by the caller. +.Pp +The +.Fn pmap_enter +function must handle the multiprocessor TLB consistency for the +given address. +.Sh NOTES +On amd64, arm and i386 architectures the existing implementation +of the +.Nm +function is incomplete, only value 0 for +.Fa psind +is supported. +Other supported architectures have +.Dv pagesizes[] +array of size 1. +.Sh RETURN VALUES +If successful, the +.Fn pmap_enter +function returns +.Er KERN_SUCCESS . +If the +.Dv PMAP_ENTER_NOSLEEP +flag was specified and the resources required for the mapping cannot +be acquired without sleeping, +.Dv KERN_RESOURCE_SHORTAGE +is returned. .Sh SEE ALSO .Xr pmap 9 .Sh AUTHORS -This manual page was written by -.An Bruce M Simpson Aq Mt bms@spc.org . +This manual page was first written by +.An Bruce M Simpson Aq Mt bms@spc.org +and then rewritten by +.An Alan Cox Aq Mt alc@FreeBSD.org +and +.An Konstantin Belousov Aq Mt kib@FreeBSD.org . Modified: projects/building-blocks/sys/arm/arm/intr.c ============================================================================== --- projects/building-blocks/sys/arm/arm/intr.c Thu Jan 29 01:59:42 2015 (r277871) +++ projects/building-blocks/sys/arm/arm/intr.c Thu Jan 29 08:41:34 2015 (r277872) @@ -37,6 +37,7 @@ */ #include "opt_platform.h" +#include "opt_hwpmc_hooks.h" #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); @@ -50,6 +51,8 @@ __FBSDID("$FreeBSD$"); #include <sys/bus.h> #include <sys/interrupt.h> #include <sys/conf.h> +#include <sys/pmc.h> +#include <sys/pmckern.h> #include <machine/atomic.h> #include <machine/intr.h> @@ -190,6 +193,10 @@ arm_irq_handler(struct trapframe *frame) arm_mask_irq(i); } } +#ifdef HWPMC_HOOKS + if (pmc_hook && (PCPU_GET(curthread)->td_pflags & TDP_CALLCHAIN)) + pmc_hook(PCPU_GET(curthread), PMC_FN_USER_CALLCHAIN, frame); +#endif } /* Modified: projects/building-blocks/sys/arm/include/pmc_mdep.h ============================================================================== --- projects/building-blocks/sys/arm/include/pmc_mdep.h Thu Jan 29 01:59:42 2015 (r277871) +++ projects/building-blocks/sys/arm/include/pmc_mdep.h Thu Jan 29 08:41:34 2015 (r277872) @@ -30,12 +30,15 @@ #define _MACHINE_PMC_MDEP_H_ #define PMC_MDEP_CLASS_INDEX_XSCALE 1 +#define PMC_MDEP_CLASS_INDEX_ARMV7 1 /* * On the ARM platform we support the following PMCs. * * XSCALE Intel XScale processors + * ARMV7 ARM Cortex-A processors */ #include <dev/hwpmc/hwpmc_xscale.h> +#include <dev/hwpmc/hwpmc_armv7.h> union pmc_md_op_pmcallocate { uint64_t __pad[4]; @@ -48,6 +51,7 @@ union pmc_md_op_pmcallocate { #ifdef _KERNEL union pmc_md_pmc { struct pmc_md_xscale_pmc pm_xscale; + struct pmc_md_armv7_pmc pm_armv7; }; #define PMC_IN_KERNEL_STACK(S,START,END) \ @@ -73,6 +77,8 @@ union pmc_md_pmc { */ struct pmc_mdep *pmc_xscale_initialize(void); void pmc_xscale_finalize(struct pmc_mdep *_md); +struct pmc_mdep *pmc_armv7_initialize(void); +void pmc_armv7_finalize(struct pmc_mdep *_md); #endif /* _KERNEL */ #endif /* !_MACHINE_PMC_MDEP_H_ */ Modified: projects/building-blocks/sys/arm/ti/am335x/am335x_prcm.c ============================================================================== --- projects/building-blocks/sys/arm/ti/am335x/am335x_prcm.c Thu Jan 29 01:59:42 2015 (r277871) +++ projects/building-blocks/sys/arm/ti/am335x/am335x_prcm.c Thu Jan 29 08:41:34 2015 (r277872) @@ -729,10 +729,10 @@ am335x_clk_lcdc_activate(struct ti_clock DELAY(10); /* - * For now set frequency to 5xSYSFREQ - * More flexible control might be required + * For now set frequency to 99*SYSFREQ/8 which is twice as + * HDMI 1080p pixel clock (minimum LCDC freq divisor is 2) */ - prcm_write_4(CM_WKUP_CM_CLKSEL_DPLL_DISP, (5 << 8) | 0); + prcm_write_4(CM_WKUP_CM_CLKSEL_DPLL_DISP, (99 << 8) | 8); /* Locked mode */ prcm_write_4(CM_WKUP_CM_CLKMODE_DPLL_DISP, 0x7); Modified: projects/building-blocks/sys/arm/ti/files.ti ============================================================================== --- projects/building-blocks/sys/arm/ti/files.ti Thu Jan 29 01:59:42 2015 (r277871) +++ projects/building-blocks/sys/arm/ti/files.ti Thu Jan 29 08:41:34 2015 (r277872) @@ -9,6 +9,7 @@ arm/arm/cpufunc_asm_armv5.S standard arm/arm/cpufunc_asm_arm10.S standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard +arm/arm/pmu.c optional hwpmc arm/ti/ti_common.c standard arm/ti/ti_cpuid.c standard Modified: projects/building-blocks/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- projects/building-blocks/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Jan 29 01:59:42 2015 (r277871) +++ projects/building-blocks/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Jan 29 08:41:34 2015 (r277872) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2014 by Saso Kiselkov. All rights reserved. * Copyright 2014 Nexenta Systems, Inc. All rights reserved. Modified: projects/building-blocks/sys/conf/files.arm ============================================================================== --- projects/building-blocks/sys/conf/files.arm Thu Jan 29 01:59:42 2015 (r277871) +++ projects/building-blocks/sys/conf/files.arm Thu Jan 29 08:41:34 2015 (r277872) @@ -70,6 +70,7 @@ crypto/des/des_enc.c optional crypto | dev/fb/fb.c optional sc dev/fdt/fdt_arm_platform.c optional platform fdt dev/hwpmc/hwpmc_arm.c optional hwpmc +dev/hwpmc/hwpmc_armv7.c optional hwpmc dev/kbd/kbd.c optional sc | vt dev/syscons/scgfbrndr.c optional sc dev/syscons/scterm-teken.c optional sc Modified: projects/building-blocks/sys/dev/acpica/acpi.c ============================================================================== --- projects/building-blocks/sys/dev/acpica/acpi.c Thu Jan 29 01:59:42 2015 (r277871) +++ projects/building-blocks/sys/dev/acpica/acpi.c Thu Jan 29 08:41:34 2015 (r277872) @@ -2749,6 +2749,8 @@ acpi_EnterSleepState(struct acpi_softc * return_ACPI_STATUS (AE_OK); } + EVENTHANDLER_INVOKE(power_suspend_early); + stop_all_proc(); EVENTHANDLER_INVOKE(power_suspend); if (smp_started) { @@ -2892,6 +2894,8 @@ backout: thread_unlock(curthread); } + resume_all_proc(); + EVENTHANDLER_INVOKE(power_resume); /* Allow another sleep request after a while. */ Modified: projects/building-blocks/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- projects/building-blocks/sys/dev/ath/ath_hal/ah_internal.h Thu Jan 29 01:59:42 2015 (r277871) +++ projects/building-blocks/sys/dev/ath/ath_hal/ah_internal.h Thu Jan 29 08:41:34 2015 (r277872) @@ -282,7 +282,8 @@ typedef struct { halRadioRetentionSupport : 1, halSpectralScanSupport : 1, halRxUsingLnaMixing : 1, - halRxDoMyBeacon : 1; + halRxDoMyBeacon : 1, + halHwUapsdTrig : 1; uint32_t halWirelessModes; uint16_t halTotalQueues; Modified: projects/building-blocks/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- projects/building-blocks/sys/dev/ath/ath_rate/sample/sample.c Thu Jan 29 01:59:42 2015 (r277871) +++ projects/building-blocks/sys/dev/ath/ath_rate/sample/sample.c Thu Jan 29 08:41:34 2015 (r277872) @@ -891,8 +891,8 @@ ath_rate_tx_complete(struct ath_softc *s if (!mrr || ts->ts_finaltsi == 0) { if (!IS_RATE_DEFINED(sn, final_rix)) { - device_printf(sc->sc_dev, "%s: ts_rate=%d ts_finaltsi=%d\n", - __func__, ts->ts_rate, ts->ts_finaltsi); + device_printf(sc->sc_dev, "%s: ts_rate=%d ts_finaltsi=%d, final_rix=%d\n", + __func__, ts->ts_rate, ts->ts_finaltsi, final_rix); badrate(ifp, 0, ts->ts_rate, long_tries, status); return; } Modified: projects/building-blocks/sys/dev/ath/ath_rate/sample/sample.h ============================================================================== --- projects/building-blocks/sys/dev/ath/ath_rate/sample/sample.h Thu Jan 29 01:59:42 2015 (r277871) +++ projects/building-blocks/sys/dev/ath/ath_rate/sample/sample.h Thu Jan 29 08:41:34 2015 (r277872) @@ -113,7 +113,7 @@ struct sample_node { #ifdef _KERNEL #define ATH_NODE_SAMPLE(an) ((struct sample_node *)&(an)[1]) -#define IS_RATE_DEFINED(sn, rix) (((sn)->ratemask & (1<<(rix))) != 0) +#define IS_RATE_DEFINED(sn, rix) (((uint64_t) (sn)->ratemask & (1ULL<<((uint64_t) rix))) != 0) #ifndef MIN #define MIN(a,b) ((a) < (b) ? (a) : (b)) Modified: projects/building-blocks/sys/dev/fb/fbd.c ============================================================================== --- projects/building-blocks/sys/dev/fb/fbd.c Thu Jan 29 01:59:42 2015 (r277871) +++ projects/building-blocks/sys/dev/fb/fbd.c Thu Jan 29 08:41:34 2015 (r277872) @@ -332,22 +332,6 @@ fbd_detach(device_t dev) return (err); } -static int -fbd_suspend(device_t dev) -{ - - vt_fb_suspend(); - return (bus_generic_suspend(dev)); -} - -static int -fbd_resume(device_t dev) -{ - - vt_fb_resume(); - return (bus_generic_resume(dev)); -} - static device_method_t fbd_methods[] = { /* Device interface */ DEVMETHOD(device_probe, fbd_probe), @@ -355,8 +339,6 @@ static device_method_t fbd_methods[] = { DEVMETHOD(device_detach, fbd_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, fbd_suspend), - DEVMETHOD(device_resume, fbd_resume), { 0, 0 } }; Modified: projects/building-blocks/sys/dev/hwpmc/hwpmc_arm.c ============================================================================== --- projects/building-blocks/sys/dev/hwpmc/hwpmc_arm.c Thu Jan 29 01:59:42 2015 (r277871) +++ projects/building-blocks/sys/dev/hwpmc/hwpmc_arm.c Thu Jan 29 08:41:34 2015 (r277872) @@ -47,9 +47,12 @@ pmc_md_initialize() #ifdef CPU_XSCALE_IXP425 if (cpu_class == CPU_CLASS_XSCALE) return pmc_xscale_initialize(); - else #endif - return NULL; +#ifdef CPU_CORTEXA + if (cpu_class == CPU_CLASS_CORTEXA) + return pmc_armv7_initialize(); +#endif + return NULL; } void @@ -62,6 +65,10 @@ pmc_md_finalize(struct pmc_mdep *md) KASSERT(0, ("[arm,%d] Unknown CPU Class 0x%x", __LINE__, cpu_class)); #endif +#ifdef CPU_CORTEXA + if (cpu_class == CPU_CLASS_CORTEXA) + pmc_armv7_finalize(md); +#endif } int Copied: projects/building-blocks/sys/dev/hwpmc/hwpmc_armv7.c (from r277871, head/sys/dev/hwpmc/hwpmc_armv7.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/building-blocks/sys/dev/hwpmc/hwpmc_armv7.c Thu Jan 29 08:41:34 2015 (r277872, copy of r277871, head/sys/dev/hwpmc/hwpmc_armv7.c) @@ -0,0 +1,652 @@ +/*- + * Copyright (c) 2015 Ruslan Bukin <br@bsdpad.com> + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); + +#include <sys/param.h> +#include <sys/systm.h> +#include <sys/pmc.h> +#include <sys/pmckern.h> + +#include <machine/pmc_mdep.h> *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501290841.t0T8fZNu086671>