From owner-svn-src-projects@FreeBSD.ORG Thu Jan 29 21:31:31 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 431ACC00; Thu, 29 Jan 2015 21:31:31 +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 2E6FEC64; Thu, 29 Jan 2015 21:31:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0TLVVjt052646; Thu, 29 Jan 2015 21:31:31 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0TLVTeX052641; Thu, 29 Jan 2015 21:31:29 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501292131.t0TLVTeX052641@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 29 Jan 2015 21:31:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r277902 - in projects/clang360-import/sys: fs/cd9660 fs/msdosfs libkern sys x86/x86 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: Thu, 29 Jan 2015 21:31:31 -0000 Author: dim Date: Thu Jan 29 21:31:29 2015 New Revision: 277902 URL: https://svnweb.freebsd.org/changeset/base/277902 Log: Merge ^/head r277896 through r277901. Modified: projects/clang360-import/sys/fs/cd9660/cd9660_util.c projects/clang360-import/sys/fs/msdosfs/msdosfs_conv.c projects/clang360-import/sys/libkern/strtol.c projects/clang360-import/sys/sys/conf.h projects/clang360-import/sys/x86/x86/tsc.c Directory Properties: projects/clang360-import/ (props changed) projects/clang360-import/sys/ (props changed) Modified: projects/clang360-import/sys/fs/cd9660/cd9660_util.c ============================================================================== --- projects/clang360-import/sys/fs/cd9660/cd9660_util.c Thu Jan 29 21:16:45 2015 (r277901) +++ projects/clang360-import/sys/fs/cd9660/cd9660_util.c Thu Jan 29 21:31:29 2015 (r277902) @@ -80,7 +80,8 @@ isochar(isofn, isoend, joliet_level, c, inbuf[2]='\0'; inp = inbuf; outp = outbuf; - cd9660_iconv->convchr(handle, (const char **)&inp, &i, &outp, &j); + cd9660_iconv->convchr(handle, __DECONST(const char **, &inp), &i, + &outp, &j); len -= j; if (clen) *clen = len; *c = '\0'; @@ -121,7 +122,8 @@ isofncmp(fn, fnlen, isofn, isolen, jolie u_char *fnend = fn + fnlen, *isoend = isofn + isolen; for (; fn < fnend; ) { - d = sgetrune(fn, fnend - fn, (char const **)&fn, flags, lhandle); + d = sgetrune(fn, fnend - fn, __DECONST(const char **, &fn), + flags, lhandle); if (isofn == isoend) return d; isofn += isochar(isofn, isoend, joliet_level, &c, NULL, flags, handle); Modified: projects/clang360-import/sys/fs/msdosfs/msdosfs_conv.c ============================================================================== --- projects/clang360-import/sys/fs/msdosfs/msdosfs_conv.c Thu Jan 29 21:16:45 2015 (r277901) +++ projects/clang360-import/sys/fs/msdosfs/msdosfs_conv.c Thu Jan 29 21:31:29 2015 (r277902) @@ -253,7 +253,7 @@ dos2unixfn(u_char dn[11], u_char *un, in * Copy the name portion into the unix filename string. */ for (i = 8; i > 0 && *dn != ' ';) { - c = dos2unixchr(tmpbuf, (const u_char **)&dn, &i, + c = dos2unixchr(tmpbuf, __DECONST(const u_char **, &dn), &i, lower & LCASE_BASE, pmp); while (*c != '\0') { *un++ = *c++; @@ -270,8 +270,8 @@ dos2unixfn(u_char dn[11], u_char *un, in *un++ = '.'; thislong++; for (i = 3; i > 0 && *dn != ' ';) { - c = dos2unixchr(tmpbuf, (const u_char **)&dn, &i, - lower & LCASE_EXT, pmp); + c = dos2unixchr(tmpbuf, __DECONST(const u_char **, &dn), + &i, lower & LCASE_EXT, pmp); while (*c != '\0') { *un++ = *c++; thislong++; @@ -612,7 +612,8 @@ winChkName(struct mbnambuf *nbp, const u * to look up or create files in case sensitive even when * it's a long file name. */ - c1 = unix2winchr((const u_char **)&np, &len, LCASE_BASE, pmp); + c1 = unix2winchr(__DECONST(const u_char **, &np), &len, + LCASE_BASE, pmp); c2 = unix2winchr(&un, &unlen, LCASE_BASE, pmp); if (c1 != c2) return -2; @@ -922,8 +923,8 @@ win2unixchr(u_char *outbuf, u_int16_t wc ilen = 2; olen = len = 4; inp = inbuf; - msdosfs_iconv->convchr(pmp->pm_w2u, (const char **)&inp, &ilen, - (char **)&outp, &olen); + msdosfs_iconv->convchr(pmp->pm_w2u, __DECONST(const char **, + &inp), &ilen, (char **)&outp, &olen); len -= olen; /* Modified: projects/clang360-import/sys/libkern/strtol.c ============================================================================== --- projects/clang360-import/sys/libkern/strtol.c Thu Jan 29 21:16:45 2015 (r277901) +++ projects/clang360-import/sys/libkern/strtol.c Thu Jan 29 21:31:29 2015 (r277902) @@ -124,6 +124,6 @@ strtol(nptr, endptr, base) } else if (neg) acc = -acc; if (endptr != 0) - *((const char **)endptr) = any ? s - 1 : nptr; + *endptr = __DECONST(char *, any ? s - 1 : nptr); return (acc); } Modified: projects/clang360-import/sys/sys/conf.h ============================================================================== --- projects/clang360-import/sys/sys/conf.h Thu Jan 29 21:16:45 2015 (r277901) +++ projects/clang360-import/sys/sys/conf.h Thu Jan 29 21:31:29 2015 (r277902) @@ -106,24 +106,6 @@ struct clonedevs; struct vm_object; struct vnode; -/* - * Note: d_thread_t is provided as a transition aid for those drivers - * that treat struct proc/struct thread as an opaque data type and - * exist in substantially the same form in both 4.x and 5.x. Writers - * of drivers that dips into the d_thread_t structure should use - * struct thread or struct proc as appropriate for the version of the - * OS they are using. It is provided in lieu of each device driver - * inventing its own way of doing this. While it does violate style(9) - * in a number of ways, this violation is deemed to be less - * important than the benefits that a uniform API between releases - * gives. - * - * Users of struct thread/struct proc that aren't device drivers should - * not use d_thread_t. - */ - -typedef struct thread d_thread_t; - typedef int d_open_t(struct cdev *dev, int oflags, int devtype, struct thread *td); typedef int d_fdopen_t(struct cdev *dev, int oflags, struct thread *td, struct file *fp); typedef int d_close_t(struct cdev *dev, int fflag, int devtype, struct thread *td); Modified: projects/clang360-import/sys/x86/x86/tsc.c ============================================================================== --- projects/clang360-import/sys/x86/x86/tsc.c Thu Jan 29 21:16:45 2015 (r277901) +++ projects/clang360-import/sys/x86/x86/tsc.c Thu Jan 29 21:31:29 2015 (r277902) @@ -522,17 +522,22 @@ init_TSC_tc(void) } /* - * We cannot use the TSC if it stops incrementing while idle. * Intel CPUs without a C-state invariant TSC can stop the TSC - * in either C2 or C3. + * in either C2 or C3. Disable use of C2 and C3 while using + * the TSC as the timecounter. The timecounter can be changed + * to enable C2 and C3. + * + * Note that the TSC is used as the cputicker for computing + * thread runtime regardless of the timecounter setting, so + * using an alternate timecounter and enabling C2 or C3 can + * result incorrect runtimes for kernel idle threads (but not + * for any non-idle threads). */ if (cpu_deepest_sleep >= 2 && cpu_vendor_id == CPU_VENDOR_INTEL && (amd_pminfo & AMDPM_TSC_INVARIANT) == 0) { - tsc_timecounter.tc_quality = -1000; tsc_timecounter.tc_flags |= TC_FLAGS_C2STOP; if (bootverbose) - printf("TSC timecounter disabled: C2/C3 may halt it.\n"); - goto init; + printf("TSC timecounter disables C2 and C3.\n"); } /*