Re: svn commit: r235797 - head/contrib/gcc
On Wed, 23 May 2012, David O'Brien wrote: On Wed, May 23, 2012 at 01:49:45PM +0200, Dimitry Andric wrote: On 2012-05-22 20:18, David E. O'Brien wrote: Log: Do not incorrectly warn when printing a quad_t using "%qd" on 64-bit platforms. ... Until all the additional warnings this causes have been fixed, can this commit please be reverted for now? Yes. I cannot believe we've been abusing "%q" this badly. Using it at all is using it badly, so your change should have had no effect. But when it was used to print quad_t's, its use was almost reasonable, and the change broke that too. Bruce ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235879 - head/sys/modules/aesni
Author: obrien Date: Thu May 24 04:10:34 2012 New Revision: 235879 URL: http://svn.freebsd.org/changeset/base/235879 Log: style.Makefile(5) Modified: head/sys/modules/aesni/Makefile Modified: head/sys/modules/aesni/Makefile == --- head/sys/modules/aesni/Makefile Thu May 24 04:09:47 2012 (r235878) +++ head/sys/modules/aesni/Makefile Thu May 24 04:10:34 2012 (r235879) @@ -4,7 +4,7 @@ KMOD= aesni SRCS= aesni.c aesni_wrap.c -SRCS+= aesencdec_$(MACHINE_CPUARCH).S aeskeys_$(MACHINE_CPUARCH).S +SRCS+= aesencdec_${MACHINE_CPUARCH}.S aeskeys_${MACHINE_CPUARCH}.S SRCS+= device_if.h bus_if.h opt_bus.h cryptodev_if.h .include ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235873 - in head: lib/libpam/modules/pam_exec sbin/atacontrol sbin/etherswitchcfg sbin/geom/class/part sbin/geom/class/raid sbin/geom/class/virstor sbin/gvinum sbin/hastctl sbin/hastd ...
Author: wblock (doc committer) Date: Thu May 24 02:24:03 2012 New Revision: 235873 URL: http://svn.freebsd.org/changeset/base/235873 Log: Fixes to man8 groff mandoc style, usage mistakes, or typos. PR: 168016 Submitted by: Nobuyuki Koganemaru Approved by: gjb MFC after:3 days Modified: head/lib/libpam/modules/pam_exec/pam_exec.8 head/sbin/atacontrol/atacontrol.8 head/sbin/etherswitchcfg/etherswitchcfg.8 head/sbin/geom/class/part/gpart.8 head/sbin/geom/class/raid/graid.8 head/sbin/geom/class/virstor/gvirstor.8 head/sbin/gvinum/gvinum.8 head/sbin/hastctl/hastctl.8 head/sbin/hastd/hastd.8 head/sbin/mount/mount.8 head/sbin/natd/natd.8 head/share/man/man8/picobsd.8 head/share/man/man8/rc.8 head/sys/boot/common/loader.8 head/sys/boot/forth/beastie.4th.8 head/sys/boot/forth/brand.4th.8 head/sys/boot/forth/check-password.4th.8 head/sys/boot/forth/color.4th.8 head/sys/boot/forth/delay.4th.8 head/sys/boot/forth/menu.4th.8 head/sys/boot/forth/version.4th.8 head/usr.bin/ctlstat/ctlstat.8 head/usr.sbin/cpucontrol/cpucontrol.8 head/usr.sbin/ctladm/ctladm.8 head/usr.sbin/flowctl/flowctl.8 head/usr.sbin/freebsd-update/freebsd-update.8 head/usr.sbin/i2c/i2c.8 head/usr.sbin/jail/jail.8 head/usr.sbin/rtadvctl/rtadvctl.8 head/usr.sbin/rtadvd/rtadvd.8 head/usr.sbin/smbmsg/smbmsg.8 head/usr.sbin/wpa/ndis_events/ndis_events.8 Modified: head/lib/libpam/modules/pam_exec/pam_exec.8 == --- head/lib/libpam/modules/pam_exec/pam_exec.8 Thu May 24 01:43:08 2012 (r235872) +++ head/lib/libpam/modules/pam_exec/pam_exec.8 Thu May 24 02:24:03 2012 (r235873) @@ -131,10 +131,10 @@ This is useful in shell scripts for inst .Xr pam 8 , .Xr pam_sm_acct_mgmt 8 , .Xr pam_sm_authenticate 8 , -.Xr pam_sm_chauthtok 8, +.Xr pam_sm_chauthtok 8 , .Xr pam_sm_close_session 8 , .Xr pam_sm_open_session 8 , -.Xr pam_sm_setcred 8 . +.Xr pam_sm_setcred 8 .Sh AUTHORS The .Nm Modified: head/sbin/atacontrol/atacontrol.8 == --- head/sbin/atacontrol/atacontrol.8 Thu May 24 01:43:08 2012 (r235872) +++ head/sbin/atacontrol/atacontrol.8 Thu May 24 02:24:03 2012 (r235873) @@ -367,8 +367,8 @@ You should not set a spindown timeout on or syslog logging on it as the disk will be worn out spinning down and up all the time. .Sh SEE ALSO -.Xr ata 4 -.Xr cam 4 +.Xr ata 4 , +.Xr cam 4 , .Xr camcontrol 8 .Sh HISTORY The Modified: head/sbin/etherswitchcfg/etherswitchcfg.8 == --- head/sbin/etherswitchcfg/etherswitchcfg.8 Thu May 24 01:43:08 2012 (r235872) +++ head/sbin/etherswitchcfg/etherswitchcfg.8 Thu May 24 02:24:03 2012 (r235873) @@ -71,7 +71,8 @@ Specifies the physical media configurati Specifies a list of media options for a port. See .Xr ifconfig 8 for details on -.Ar media and +.Ar media +and .Ar mediaopt . .El .Ss reg Modified: head/sbin/geom/class/part/gpart.8 == --- head/sbin/geom/class/part/gpart.8 Thu May 24 01:43:08 2012 (r235872) +++ head/sbin/geom/class/part/gpart.8 Thu May 24 02:24:03 2012 (r235873) @@ -650,7 +650,7 @@ for MBR, for GPT. .It Cm ms-ldm-metadata A partition that contains Logical Disk Manager (LDM) database. -The scheme-specifig type is +The scheme-specific type is .Qq Li "!5808c8aa-7e8f-42e0-85d2-e1e90434cfb3" for GPT. .El @@ -971,7 +971,7 @@ By default mirrored volumes are shown as .Sx "PARTITION TYPES" section). If this variable set to 1 each component of the mirrored volume will be -present as independet partition. +present as independent partition. .Em NOTE : This may break a mirrored volume and lead to data damage. .El Modified: head/sbin/geom/class/raid/graid.8 == --- head/sbin/geom/class/raid/graid.8 Thu May 24 01:43:08 2012 (r235872) +++ head/sbin/geom/class/raid/graid.8 Thu May 24 02:24:03 2012 (r235873) @@ -294,7 +294,7 @@ Debug level of the .Nm RAID GEOM class. .It Va kern.geom.raid.idle_threshold : No 100 -Time in microseconds to consider a volume idle for rebuild puroses. +Time in microseconds to consider a volume idle for rebuild purposes. .It Va kern.geom.raid.name_format : No 0 Providers name format: 0 -- raid/r{num}, 1 -- raid/{label}. .It Va kern.geom.raid.read_err_thresh : No 10 Modified: head/sbin/geom/class/virstor/gvirstor.8 == --- head/sbin/geom/class/virstor/gvirstor.8 Thu May 24 01:43:08 2012 (r235872) +++ head/sbin/geom/class/virstor/gvirstor.8 Thu May 24 02:24:03 2012 (r235873) @@ -113,7 +113,7 @@ Adds new components to
svn commit: r235870 - head/usr.bin/sockstat
Author: thompsa Date: Thu May 24 01:31:10 2012 New Revision: 235870 URL: http://svn.freebsd.org/changeset/base/235870 Log: Allow the socket list to be limited to a specific jail id. No objections:current@ Modified: head/usr.bin/sockstat/sockstat.1 head/usr.bin/sockstat/sockstat.c Modified: head/usr.bin/sockstat/sockstat.1 == --- head/usr.bin/sockstat/sockstat.1Thu May 24 01:30:17 2012 (r235869) +++ head/usr.bin/sockstat/sockstat.1Thu May 24 01:31:10 2012 (r235870) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 24, 2012 +.Dd May 16, 2012 .Dt SOCKSTAT 1 .Os .Sh NAME @@ -36,6 +36,7 @@ .Sh SYNOPSIS .Nm .Op Fl 46cLlu +.Op Fl j Ar jid .Op Fl p Ar ports .Op Fl P Ar protocols .Sh DESCRIPTION @@ -57,6 +58,8 @@ Show (IPv6) sockets. .It Fl c Show connected sockets. +.It Fl j Ar jid +Show only sockets belonging to the specified jail ID. .It Fl L Only show Internet sockets if the local or foreign addresses are not in the loopback network prefix Modified: head/usr.bin/sockstat/sockstat.c == --- head/usr.bin/sockstat/sockstat.cThu May 24 01:30:17 2012 (r235869) +++ head/usr.bin/sockstat/sockstat.cThu May 24 01:31:10 2012 (r235870) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); static int opt_4; /* Show IPv4 sockets */ static int opt_6; /* Show IPv6 sockets */ static int opt_c; /* Show connected sockets */ +static int opt_j; /* Show specified jail */ static int opt_L; /* Don't show IPv4 or IPv6 loopback sockets */ static int opt_l; /* Show listening sockets */ static int opt_u; /* Show Unix domain sockets */ @@ -549,6 +550,27 @@ getprocname(pid_t pid) } static int +getprocjid(pid_t pid) +{ + static struct kinfo_proc proc; + size_t len; + int mib[4]; + + mib[0] = CTL_KERN; + mib[1] = KERN_PROC; + mib[2] = KERN_PROC_PID; + mib[3] = (int)pid; + len = sizeof proc; + if (sysctl(mib, 4, &proc, &len, NULL, 0) == -1) { + /* Do not warn if the process exits before we get its jid. */ + if (errno != ESRCH) + warn("sysctl()"); + return (-1); + } + return (proc.ki_jid); +} + +static int check_ports(struct sock *s) { int port; @@ -643,6 +665,8 @@ display(void) for (xf = xfiles, n = 0; n < nxfiles; ++n, ++xf) { if (xf->xf_data == NULL) continue; + if (opt_j >= 0 && opt_j != getprocjid(xf->xf_pid)) + continue; hash = (int)((uintptr_t)xf->xf_data % HASHSIZE); for (s = sockhash[hash]; s != NULL; s = s->next) if ((void *)s->socket == xf->xf_data) @@ -668,6 +692,8 @@ display(void) pos += xprintf("%d ", xf->xf_fd); displaysock(s, pos); } + if (opt_j >= 0) + return; for (hash = 0; hash < HASHSIZE; hash++) { for (s = sockhash[hash]; s != NULL; s = s->next) { if (s->shown) @@ -716,7 +742,8 @@ main(int argc, char *argv[]) int protos_defined = -1; int o, i; - while ((o = getopt(argc, argv, "46cLlp:P:uv")) != -1) + opt_j = -1; + while ((o = getopt(argc, argv, "46cj:Llp:P:uv")) != -1) switch (o) { case '4': opt_4 = 1; @@ -727,6 +754,9 @@ main(int argc, char *argv[]) case 'c': opt_c = 1; break; + case 'j': + opt_j = atoi(optarg); + break; case 'L': opt_L = 1; break; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r235746 - head/sys/net
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2012-05-21 18:19:20 -0400, Alexander V. Chernikov wrote: > Author: melifaro Date: Mon May 21 22:19:19 2012 New Revision: > 235746 URL: http://svn.freebsd.org/changeset/base/235746 > > Log: Call bpf_jitter() before acquiring BPF global lock due to > malloc() being used inside bpf_jitter. > > Eliminate bpf_buffer_alloc() and allocate BPF buffers on descriptor > creation and BIOCSBLEN ioctl. This permits us not to allocate > buffers inside bpf_attachd() which is protected by global lock. > > Approved by: kib(mentor) MFC in:4 weeks > > Modified: head/sys/net/bpf.c head/sys/net/bpf_buffer.c > head/sys/net/bpf_buffer.h > > Modified: head/sys/net/bpf.c > == > > - --- head/sys/net/bpf.cMon May 21 22:17:29 2012(r235745) > +++ head/sys/net/bpf.cMon May 21 22:19:19 2012(r235746) ... > @@ -1664,7 +1668,7 @@ bpf_setf(struct bpf_d *d, struct bpf_pro > struct bpf_insn *fcode, *old; u_int wfilter, flen, size; #ifdef > BPF_JITTER - bpf_jit_filter *ofunc; +bpf_jit_filter *ofunc, > *jfunc; #endif int need_upgrade; #ifdef COMPAT_FREEBSD32 @@ -1695,6 > +1699,13 @@ bpf_setf(struct bpf_d *d, struct bpf_pro else fcode = > NULL; /* Make compiler happy */ > > +#ifdef BPF_JITTER + if (fp->bf_insns != NULL) + jfunc = > bpf_jitter(fcode, flen); +else + jfunc = NULL; /* Make compiler > happy */ +#endif + BPF_LOCK(); > > if (cmd == BIOCSETWF) { ... This is completely wrong. First, fcode has not been initialized with copyin(). Second, you must not compile random filter code without validation, i.e., bpf_validate(). Jung-uk Kim -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.19 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk+9fmUACgkQmlay1b9qnVOlBACgtljVNwOiFb7Ds7GgeoQMyRRr jU4An3b43yEND8yPs8GSn20ZeCRrI9pu =z4sw -END PGP SIGNATURE- ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r235797 - head/contrib/gcc
On Tue, May 22, 2012 at 02:07:22PM -0700, m...@freebsd.org wrote: > We run with the following at Isilon, which is somewhat bogus because > it allows a bit of sloppiness in types, but is also terribly > convenient since it means no casting on printf arguments is needed: ... > If there's no objections, I (or David or anyone else) can commit to > the FreeBSD repository. Unfortunately I don't like this change -- it promotes type sloppiness that flies in the face of ISO/IEC 9899:1999 (E). the mixed definition of [u]_?int64_t as it catches improper code -- such as assuming you can printf an int64_t with "%lld" when that is against the standard. -- -- David (obr...@freebsd.org) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235865 - head/contrib/gcc
Author: obrien Date: Wed May 23 23:43:55 2012 New Revision: 235865 URL: http://svn.freebsd.org/changeset/base/235865 Log: Revert r235797. GCC's mis-assumptions has led to incorrect usage of "%q[diouxX]" within FreeBSD sources. Modified: head/contrib/gcc/c-format.c Modified: head/contrib/gcc/c-format.c == --- head/contrib/gcc/c-format.c Wed May 23 21:48:49 2012(r235864) +++ head/contrib/gcc/c-format.c Wed May 23 23:43:55 2012(r235865) @@ -287,11 +287,7 @@ static const format_length_info printf_l { { "h", FMT_LEN_h, STD_C89, "hh", FMT_LEN_hh, STD_C99 }, { "l", FMT_LEN_l, STD_C89, "ll", FMT_LEN_ll, STD_C9L }, -#ifdef __LP64__ - { "q", FMT_LEN_l, STD_EXT, NULL, 0, 0 }, -#else { "q", FMT_LEN_ll, STD_EXT, NULL, 0, 0 }, -#endif { "L", FMT_LEN_L, STD_C89, NULL, 0, 0 }, { "z", FMT_LEN_z, STD_C99, NULL, 0, 0 }, { "Z", FMT_LEN_z, STD_EXT, NULL, 0, 0 }, ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r235797 - head/contrib/gcc
On Wed, May 23, 2012 at 01:49:45PM +0200, Dimitry Andric wrote: > On 2012-05-22 20:18, David E. O'Brien wrote: > > Log: > > Do not incorrectly warn when printing a quad_t using "%qd" on 64-bit > > platforms. ... > Until all the additional warnings this causes have been fixed, can this > commit please be reverted for now? Yes. I cannot believe we've been abusing "%q" this badly. -- -- David (obr...@freebsd.org) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235864 - in head: contrib/llvm/lib/CodeGen/SelectionDAG contrib/llvm/tools/clang/include/clang/AST contrib/llvm/tools/clang/include/clang/Basic contrib/llvm/tools/clang/include/clang/P...
Author: dim Date: Wed May 23 21:48:49 2012 New Revision: 235864 URL: http://svn.freebsd.org/changeset/base/235864 Log: Upgrade our copy of llvm/clang to 3.1 release. Release notes can be found at: http://llvm.org/releases/3.1/docs/ReleaseNotes.html MFC after:3 days Modified: head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp head/contrib/llvm/tools/clang/include/clang/AST/Decl.h head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticParseKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/TokenKinds.def head/contrib/llvm/tools/clang/include/clang/Parse/Parser.h head/contrib/llvm/tools/clang/include/clang/Sema/DeclSpec.h head/contrib/llvm/tools/clang/include/clang/Sema/Initialization.h head/contrib/llvm/tools/clang/include/clang/Sema/Sema.h head/contrib/llvm/tools/clang/lib/Analysis/UninitializedValues.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseCXXInlineMethods.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseDecl.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseExpr.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseExprCXX.cpp head/contrib/llvm/tools/clang/lib/Sema/DeclSpec.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaLookup.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaType.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp head/lib/clang/include/clang/Basic/Version.inc head/lib/clang/include/llvm/Config/config.h Directory Properties: head/contrib/llvm/ (props changed) head/contrib/llvm/tools/clang/ (props changed) Modified: head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp == --- head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp Wed May 23 21:39:39 2012(r235863) +++ head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp Wed May 23 21:48:49 2012(r235864) @@ -131,30 +131,16 @@ static void CheckForPhysRegDependency(SD } } -static void AddGlue(SDNode *N, SDValue Glue, bool AddGlue, SelectionDAG *DAG) { - SmallVector VTs; - SDNode *GlueDestNode = Glue.getNode(); - - // Don't add glue from a node to itself. - if (GlueDestNode == N) return; - - // Don't add glue to something that already has it, either as a use or value. - if (N->getOperand(N->getNumOperands()-1).getValueType() == MVT::Glue || - N->getValueType(N->getNumValues() - 1) == MVT::Glue) { -return; - } - for (unsigned I = 0, E = N->getNumValues(); I != E; ++I) -VTs.push_back(N->getValueType(I)); - - if (AddGlue) -VTs.push_back(MVT::Glue); - +// Helper for AddGlue to clone node operands. +static void CloneNodeWithValues(SDNode *N, SelectionDAG *DAG, +SmallVectorImpl &VTs, +SDValue ExtraOper = SDValue()) { SmallVector Ops; for (unsigned I = 0, E = N->getNumOperands(); I != E; ++I) Ops.push_back(N->getOperand(I)); - if (GlueDestNode) -Ops.push_back(Glue); + if (ExtraOper.getNode()) +Ops.push_back(ExtraOper); SDVTList VTList = DAG->getVTList(&VTs[0], VTs.size()); MachineSDNode::mmo_iterator Begin = 0, End = 0; @@ -173,6 +159,46 @@ static void AddGlue(SDNode *N, SDValue G MN->setMemRefs(Begin, End); } +static bool AddGlue(SDNode *N, SDValue Glue, bool AddGlue, SelectionDAG *DAG) { + SmallVector VTs; + SDNode *GlueDestNode = Glue.getNode(); + + // Don't add glue from a node to itself. + if (GlueDestNode == N) return false; + + // Don't add a glue operand to something that already uses glue. + if (GlueDestNode && + N->getOperand(N->getNumOperands()-1).getValueType() == MVT::Glue) { +return false; + } + // Don't add glue to something that already has a glue value. + if (N->getValueType(N->getNumValues() - 1) == MVT::Glue) return false; + + for (unsigned I = 0, E = N->getNumValues(); I != E; ++I) +VTs.push_back(N->getValueType(I)); + + if (AddGlue) +VTs.push_back(MVT::Glue); + + CloneNodeWithValues(N, DAG, VTs, Glue); + + return true; +} + +// Cleanup after unsuccessful AddGlue. Use the standard method of morphing the +// node even though simply shrinking the value list is sufficient. +static void RemoveUnusedGlue(SDNode *N, SelectionDAG *DAG) { + assert((N->getValueType(N->getNumValues() - 1) == MVT::Glue && + !N->hasAnyUseOfValue(N->getNumValues() - 1)) && + "expected an unused glue value"); + + SmallVector VTs; + for (unsigned I = 0, E = N->getNumValues()-1; I != E; ++I) +VTs.push_back(N->getValueType(I)); + + CloneNodeWithValues(N, DAG, VTs); +} + /// ClusterNeighboringLoads - Force nearby loads together by "gluing" them. /// This f
Re: svn commit: r235859 - in head/sys: i386/conf modules
On 05/23/12 23:07, Konstantin Belousov wrote: Author: kib Date: Wed May 23 21:07:01 2012 New Revision: 235859 URL: http://svn.freebsd.org/changeset/base/235859 Log: Enable drm2 modules build. Sponsored by:The FreeBSD Foundation MFC after: 1 month Modified: head/sys/i386/conf/XEN head/sys/modules/Makefile Hi! Thank you very much for all your work! With this commit, is there any need for any patches from you, or have they all been incorporated by now? Perhaps a note in UPDATING would be good, at least to make people more aware of the fact that GEM/KMS finally has come to FreeBSD as well. An update to the wiki might be good as well. I can help you with patches and updating the wiki, just let me know. Once again, a big thank you! Regards! -- Niclas Zeising ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235859 - in head/sys: i386/conf modules
Author: kib Date: Wed May 23 21:07:01 2012 New Revision: 235859 URL: http://svn.freebsd.org/changeset/base/235859 Log: Enable drm2 modules build. Sponsored by: The FreeBSD Foundation MFC after:1 month Modified: head/sys/i386/conf/XEN head/sys/modules/Makefile Modified: head/sys/i386/conf/XEN == --- head/sys/i386/conf/XEN Wed May 23 20:51:21 2012(r235858) +++ head/sys/i386/conf/XEN Wed May 23 21:07:01 2012(r235859) @@ -7,7 +7,7 @@ cpu I686_CPU ident XEN makeoptionsDEBUG=-g# Build kernel with gdb(1) debug symbols -makeoptionsWITHOUT_MODULES="aha ahb amd cxgb dpt drm hptmv ida malo mps mwl nve sound sym trm xfs" +makeoptionsWITHOUT_MODULES="aha ahb amd cxgb dpt drm drm2 hptmv ida malo mps mwl nve sound sym trm xfs" optionsSCHED_ULE # ULE scheduler optionsPREEMPTION # Enable kernel thread preemption Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Wed May 23 20:51:21 2012(r235858) +++ head/sys/modules/Makefile Wed May 23 21:07:01 2012(r235859) @@ -87,6 +87,7 @@ SUBDIR= ${_3dfx} \ ${_dpms} \ ${_dpt} \ ${_drm} \ + ${_drm2} \ ${_dtrace} \ dummynet \ ${_ed} \ @@ -461,6 +462,7 @@ _cyclic=cyclic .endif _dpms= dpms _drm= drm +_drm2= drm2 .if ${MK_CDDL} != "no" || defined(ALL_MODULES) _dtrace= dtrace .endif @@ -630,6 +632,7 @@ _cyclic=cyclic .endif _dpms= dpms _drm= drm +_drm2= drm2 .if ${MK_CDDL} != "no" || defined(ALL_MODULES) _dtrace= dtrace .endif ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235858 - head/sys/geom
Author: delphij Date: Wed May 23 20:51:21 2012 New Revision: 235858 URL: http://svn.freebsd.org/changeset/base/235858 Log: - Correct signedness for casts; - Wrap long line while I'm there. Noticed by: pjd, avg Modified: head/sys/geom/geom_flashmap.c Modified: head/sys/geom/geom_flashmap.c == --- head/sys/geom/geom_flashmap.c Wed May 23 20:29:16 2012 (r235857) +++ head/sys/geom/geom_flashmap.c Wed May 23 20:51:21 2012 (r235858) @@ -78,8 +78,9 @@ static void g_flashmap_print(struct g_flashmap_slice *slice) { - printf("%08jx-%08jx: %s (%juKB)\n", (intmax_t)slice->sl_start, (intmax_t)slice->sl_end, - slice->sl_name, (uintmax_t)(slice->sl_end - slice->sl_start) / 1024); + printf("%08jx-%08jx: %s (%juKB)\n", (uintmax_t)slice->sl_start, + (uintmax_t)slice->sl_end, slice->sl_name, + (uintmax_t)(slice->sl_end - slice->sl_start) / 1024); } static int ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235857 - head/libexec/tftpd
Author: joel (doc committer) Date: Wed May 23 20:29:16 2012 New Revision: 235857 URL: http://svn.freebsd.org/changeset/base/235857 Log: mdoc: Only use macros inside a reference block. Modified: head/libexec/tftpd/tftpd.8 Modified: head/libexec/tftpd/tftpd.8 == --- head/libexec/tftpd/tftpd.8 Wed May 23 20:22:09 2012(r235856) +++ head/libexec/tftpd/tftpd.8 Wed May 23 20:29:16 2012(r235857) @@ -238,20 +238,16 @@ option. .Pp The following RFC's are supported: .Rs -RFC 1350 -.%T The TFTP Protocol (Revision 2) +.%T RFC 1350: The TFTP Protocol (Revision 2) .Re .Rs -RFC 2347 -.%T TFTP Option Extension +.%T RFC 2347: TFTP Option Extension .Re .Rs -RFC 2348 -.%T TFTP Blocksize Option +.%T RFC 2348: TFTP Blocksize Option .Re .Rs -RFC 2349 -.%T TFTP Timeout Interval and Transfer Size Options +.%T RFC 2349: TFTP Timeout Interval and Transfer Size Options .Re .Pp The non-standard ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235856 - head/libexec/rbootd
Author: joel (doc committer) Date: Wed May 23 20:22:09 2012 New Revision: 235856 URL: http://svn.freebsd.org/changeset/base/235856 Log: mdoc: fix .Bl -offset. Modified: head/libexec/rbootd/rbootd.8 Modified: head/libexec/rbootd/rbootd.8 == --- head/libexec/rbootd/rbootd.8Wed May 23 19:25:46 2012 (r235855) +++ head/libexec/rbootd/rbootd.8Wed May 23 20:22:09 2012 (r235856) @@ -126,7 +126,7 @@ The following signals have the specified process using the .Xr kill 1 command: -.Bl -tag -width SIGUSR1 -offset -compact +.Bl -tag -width SIGUSR1 -offset .It SIGHUP Drop all active connections and reconfigure. .It SIGUSR1 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r235852 - head/sys/geom
on 23/05/2012 22:22 Pawel Jakub Dawidek said the following: > On Wed, May 23, 2012 at 06:17:02PM +, Xin LI wrote: >> Author: delphij Date: Wed May 23 18:17:02 2012 New Revision: 235852 URL: >> http://svn.freebsd.org/changeset/base/235852 >> >> Log: Use %ju to match uintmax_t usage >> >> Modified: head/sys/geom/geom_flashmap.c >> >> Modified: head/sys/geom/geom_flashmap.c >> == >> >> --- head/sys/geom/geom_flashmap.c Wed May 23 18:11:36 2012 (r235851) >> +++ head/sys/geom/geom_flashmap.cWed May 23 18:17:02 2012 >> (r235852) @@ >> -78,7 +78,7 @@ static void g_flashmap_print(struct g_flashmap_slice >> *slice) { >> >> -printf("%08jx-%08jx: %s (%lluKB)\n", (intmax_t)slice->sl_start, >> (intmax_t)slice->sl_end, + printf("%08jx-%08jx: %s (%juKB)\n", >> (intmax_t)slice->sl_start, (intmax_t)slice->sl_end, slice->sl_name, >> (uintmax_t)(slice->sl_end - slice->sl_start) / 1024); > > BTW, %jx is also uintmax_t, not intmax_t, right? > I think that non-decimal representation generally implies unsigned-ness. -- Andriy Gapon ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235855 - head/sbin/shutdown
Author: jilles Date: Wed May 23 19:25:46 2012 New Revision: 235855 URL: http://svn.freebsd.org/changeset/base/235855 Log: shutdown: Remove unnecessary 2-second delay. Modified: head/sbin/shutdown/shutdown.c Modified: head/sbin/shutdown/shutdown.c == --- head/sbin/shutdown/shutdown.c Wed May 23 18:56:29 2012 (r235854) +++ head/sbin/shutdown/shutdown.c Wed May 23 19:25:46 2012 (r235855) @@ -356,7 +356,6 @@ perform_shutdown(void) syslog(LOG_NOTICE, "%s by %s: %s", doreboot ? "reboot" : dohalt ? "halt" : dopower ? "power-down" : "shutdown", whom, mbuf); - (void)sleep(2); (void)printf("\r\nSystem shutdown time has arrived\007\007\r\n"); if (killflg) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r235852 - head/sys/geom
On Wed, May 23, 2012 at 06:17:02PM +, Xin LI wrote: > Author: delphij > Date: Wed May 23 18:17:02 2012 > New Revision: 235852 > URL: http://svn.freebsd.org/changeset/base/235852 > > Log: > Use %ju to match uintmax_t usage > > Modified: > head/sys/geom/geom_flashmap.c > > Modified: head/sys/geom/geom_flashmap.c > == > --- head/sys/geom/geom_flashmap.c Wed May 23 18:11:36 2012 > (r235851) > +++ head/sys/geom/geom_flashmap.c Wed May 23 18:17:02 2012 > (r235852) > @@ -78,7 +78,7 @@ static void > g_flashmap_print(struct g_flashmap_slice *slice) > { > > - printf("%08jx-%08jx: %s (%lluKB)\n", (intmax_t)slice->sl_start, > (intmax_t)slice->sl_end, > + printf("%08jx-%08jx: %s (%juKB)\n", (intmax_t)slice->sl_start, > (intmax_t)slice->sl_end, > slice->sl_name, (uintmax_t)(slice->sl_end - slice->sl_start) / > 1024); BTW, %jx is also uintmax_t, not intmax_t, right? -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl pgpfk8kMZKDtW.pgp Description: PGP signature
svn commit: r235854 - head/sys/vm
Author: emax Date: Wed May 23 18:56:29 2012 New Revision: 235854 URL: http://svn.freebsd.org/changeset/base/235854 Log: Tweak condition for disabling allocation from per-CPU buckets in low memory situation. I've observed a situation where per-CPU allocations were disabled while there were enough free cached pages. Basically, cnt.v_free_count was sitting stable at a value lower than cnt.v_free_min and that caused massive performance drop. Reviewed by: alc MFC after:1 week Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c == --- head/sys/vm/uma_core.c Wed May 23 18:41:45 2012(r235853) +++ head/sys/vm/uma_core.c Wed May 23 18:56:29 2012(r235854) @@ -272,10 +272,7 @@ SYSCTL_PROC(_vm, OID_AUTO, zone_stats, C static void bucket_enable(void) { - if (cnt.v_free_count < cnt.v_free_min) - bucketdisable = 1; - else - bucketdisable = 0; + bucketdisable = vm_page_count_min(); } /* ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r235767 - head/lib/libc/net
On Tue, May 22, 2012 at 08:51:44PM +1000, Bruce Evans wrote: > On Mon, 21 May 2012, Garrett Cooper wrote: > > > On Mon, May 21, 2012 at 6:28 PM, Kevin Lo wrote: > >> Author: kevlo > >> Date: Tue May 22 01:28:32 2012 > >> New Revision: 235767 > >> URL: http://svn.freebsd.org/changeset/base/235767 > >> > >> Log: > >> �Add missing header needed by free() > >> > >> �Reported by: �tinderbox > > Please don't use binary characters in mail. > > > Thank you for saving my mailbox :)!!! > > > > FWIW, it's weird because my STABLE-9 box didn't reproduce this. > > This seems to be a bug in both nsparser.y and the new yacc: > - new yacc: it is incompatible. > >Old yacc includes stdlib.h and string.h as the first thing in the >generated file, so the C code copied from the .y part sees them too. > >New yacc puts more its code including its all includes (which still >involve stdlib.h) at the end of the generated file. > >Including stdlib.h nearly first is from Lite2 (skeleton.c 1.7 in 1997). >Much later, FreeBSD moved it to the very first thing in the generated >file, so as to use namespace pollution (__unused) from it early. >__unused was ifdefed and was defined by the yacc skeleton if >didn't define it. It took much churn to produce this, but it seems to >have been garbage, since old yacc didn't actually generate any use of >__unused. The definition was apparently compatibilty cruft to hide >unportabilities in .y files that use __unused (I guess these failed for >bootstrapping). New yacc doesn't define __unused. > > - nsparser.y: it uses free() but never declared it. It depended on >namespace pollution in the yacc code, and this pollution being in a >particular order. > > The yyparse() incompatibilities seem to be bugs on both sides too: > - Old yacc didn't declare yyparse() automatically, so .y files had to do >it, but probably shouldn't have. > > - New yacc still doesn't declare yylex() or yyerror() automatically, so >applications still have to declare them. > > - Some of these may be more the responsibility of the yacc library (to >supply defaults) than others. I couldn't see who is required to declare >them in POSIX.1-2001. However, a bad example in POSIX.1 has "extern int >yyparse();" in main() just before calling yyparse(). Badness in this >example include several style bugs and the declaration being incomplete >(missing "void"). > Old yacc has about 20 lines of ifdefs half just to supply this "void" > for STDC but not for K&R. New yacc no longer supports K&R, at least > here, but it still has 11 lines of ifdefs to get the declaration of > yyparse() right for bison compatibility). >I don't know if the badness includes having the home made declaration. > > Nearby bugs: all CSRG and FreeBSD changes including copyrights and > history seem to have been lost. Just after the old include of stdlib.h, > skeleton.c used to produce a string yyrcsid[] with __FBSDID() for > skeleton.c itself in it. New yacc generates a string yysccsid with > a hard-coded berkeley 1993 id in it, and the name in this id doesn't > even match the file name (it is "yaccpar"). Another FreeBSD change was > to remove this bogus id from the generated file. > > Some relevant FreeBSD changes: > > % Index: skeleton.c > % === > % RCS file: /home/ncvs/src/usr.bin/yacc/skeleton.c,v > % retrieving revision 1.1.1.2 > % retrieving revision 1.37 > % diff -u -2 -r1.1.1.2 -r1.37 > % --- skeleton.c 6 Jan 1997 03:03:46 - 1.1.1.2 > % +++ skeleton.c 12 Feb 2003 18:03:55 - 1.37 > % @@ -35,7 +35,12 @@ > % */ > % > % +#if 0 > % #ifndef lint > % static char sccsid[] = "@(#)skeleton.c 5.8 (Berkeley) 4/29/95"; > % -#endif /* not lint */ > % +#endif > % +#endif > > FreeBSD normally comments out vendor ids like this. 5.8 is from Lite2; > Lite1 had 5.7. New yacc doesn't have any of this. It apparently started > from older yacc (before Lite1; indeed, it agrees with the FreeBSD-1 == Net/2 > version in not having any CSRG copyrights or this sccsid). > > % + > % +#include > % +__FBSDID("$FreeBSD: src/usr.bin/yacc/skeleton.c,v 1.37 2003/02/12 18:03:55 > davidc Exp $"); > > FreeBSD normally adds this to source files. Except in contrib. yacc is > now mostly in contrib, although it hasn't changed all that much. > > % > % #include "defs.h" > % @@ -53,31 +58,42 @@ > % /* are conditional. > */ > % > % -char *banner[] = > % +const char *banner[] = > > New yacc has this change too. > > % { > % +"#include ", > > See above. > > % "#ifndef lint", > % -"static char yysccsid[] = \"@(#)yaccpar1.9 (Berkeley) > 02/21/93\";", > > Was in Net/2 (?), FreeBSD-1, Lite1 and Lite2. Came back with new yacc. > It's interesting that "yaccpar 1.9 (Berkeley) 1.9 02/21/93" is o
svn commit: r235853 - head/usr.bin/lex
Author: joel (doc committer) Date: Wed May 23 18:41:45 2012 New Revision: 235853 URL: http://svn.freebsd.org/changeset/base/235853 Log: Fix error reported by mandoc. Modified: head/usr.bin/lex/lex.1 Modified: head/usr.bin/lex/lex.1 == --- head/usr.bin/lex/lex.1 Wed May 23 18:17:02 2012(r235852) +++ head/usr.bin/lex/lex.1 Wed May 23 18:41:45 2012(r235853) @@ -2247,8 +2247,7 @@ automatically anyway. .TP .B \-F specifies that the -.ul -fast +.I fast scanner table representation should be used (and stdio bypassed). This representation is about as fast as the full table representation ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235852 - head/sys/geom
Author: delphij Date: Wed May 23 18:17:02 2012 New Revision: 235852 URL: http://svn.freebsd.org/changeset/base/235852 Log: Use %ju to match uintmax_t usage Modified: head/sys/geom/geom_flashmap.c Modified: head/sys/geom/geom_flashmap.c == --- head/sys/geom/geom_flashmap.c Wed May 23 18:11:36 2012 (r235851) +++ head/sys/geom/geom_flashmap.c Wed May 23 18:17:02 2012 (r235852) @@ -78,7 +78,7 @@ static void g_flashmap_print(struct g_flashmap_slice *slice) { - printf("%08jx-%08jx: %s (%lluKB)\n", (intmax_t)slice->sl_start, (intmax_t)slice->sl_end, + printf("%08jx-%08jx: %s (%juKB)\n", (intmax_t)slice->sl_start, (intmax_t)slice->sl_end, slice->sl_name, (uintmax_t)(slice->sl_end - slice->sl_start) / 1024); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235851 - head/bin/ps
Author: kib Date: Wed May 23 18:11:36 2012 New Revision: 235851 URL: http://svn.freebsd.org/changeset/base/235851 Log: Add 'cow' keyword to show per-process cow count. Submitted by: Andrey Zonov MFC after:1 week Modified: head/bin/ps/keyword.c head/bin/ps/ps.1 Modified: head/bin/ps/keyword.c == --- head/bin/ps/keyword.c Wed May 23 18:10:54 2012(r235850) +++ head/bin/ps/keyword.c Wed May 23 18:11:36 2012(r235851) @@ -76,6 +76,7 @@ static VAR var[] = { {"comm", "COMMAND", NULL, LJUST, ucomm, 0, CHAR, NULL, 0}, {"command", "COMMAND", NULL, COMM|LJUST|USER, command, 0, CHAR, NULL, 0}, + {"cow", "COW", NULL, 0, kvar, KOFF(ki_cow), UINT, "u", 0}, {"cpu", "CPU", NULL, 0, kvar, KOFF(ki_estcpu), UINT, "d", 0}, {"cputime", "", "time", 0, NULL, 0, CHAR, NULL, 0}, {"egid", "", "gid", 0, NULL, 0, CHAR, NULL, 0}, Modified: head/bin/ps/ps.1 == --- head/bin/ps/ps.1Wed May 23 18:10:54 2012(r235850) +++ head/bin/ps/ps.1Wed May 23 18:11:36 2012(r235851) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd March 8, 2012 +.Dd May 20, 2012 .Dt PS 1 .Os .Sh NAME @@ -496,6 +496,8 @@ login class command .It Cm command command and arguments +.It Cm cow +number of copy-on-write faults .It Cm cpu short-term CPU usage factor (for scheduling) .It Cm emul ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235850 - in head/sys: kern sys vm
Author: kib Date: Wed May 23 18:10:54 2012 New Revision: 235850 URL: http://svn.freebsd.org/changeset/base/235850 Log: Calculate the count of per-process cow faults. Export the count to userspace using the obscure spare int field in struct kinfo_proc. Submitted by: Andrey Zonov MFC after:1 week Modified: head/sys/kern/kern_proc.c head/sys/sys/proc.h head/sys/sys/user.h head/sys/vm/vm_fault.c Modified: head/sys/kern/kern_proc.c == --- head/sys/kern/kern_proc.c Wed May 23 17:49:59 2012(r235849) +++ head/sys/kern/kern_proc.c Wed May 23 18:10:54 2012(r235850) @@ -878,6 +878,9 @@ fill_kinfo_proc_only(struct proc *p, str kp->ki_childtime = kp->ki_childstime; timevaladd(&kp->ki_childtime, &kp->ki_childutime); + FOREACH_THREAD_IN_PROC(p, td0) + kp->ki_cow += td0->td_cow; + tp = NULL; if (p->p_pgrp) { kp->ki_pgid = p->p_pgrp->pg_id; @@ -990,6 +993,7 @@ fill_kinfo_thread(struct thread *td, str kp->ki_runtime = cputick2usec(td->td_rux.rux_runtime); kp->ki_pctcpu = sched_pctcpu(td); kp->ki_estcpu = td->td_estcpu; + kp->ki_cow = td->td_cow; } /* We can't get this anymore but ps etc never used it anyway. */ Modified: head/sys/sys/proc.h == --- head/sys/sys/proc.h Wed May 23 17:49:59 2012(r235849) +++ head/sys/sys/proc.h Wed May 23 18:10:54 2012(r235850) @@ -247,6 +247,7 @@ struct thread { int td_slptick; /* (t) Time at sleep. */ int td_blktick; /* (t) Time spent blocked. */ int td_swvoltick; /* (t) Time at last SW_VOL switch. */ + u_int td_cow; /* (*) Number of copy-on-write faults */ struct rusage td_ru; /* (t) rusage information. */ struct rusage_ext td_rux; /* (t) Internal rusage information. */ uint64_ttd_incruntime; /* (t) Cpu ticks to transfer to proc. */ Modified: head/sys/sys/user.h == --- head/sys/sys/user.h Wed May 23 17:49:59 2012(r235849) +++ head/sys/sys/user.h Wed May 23 18:10:54 2012(r235850) @@ -159,7 +159,7 @@ struct kinfo_proc { u_int ki_estcpu; /* Time averaged value of ki_cpticks */ u_int ki_slptime; /* Time since last blocked */ u_int ki_swtime; /* Time swapped in or out */ - int ki_spareint1; /* unused (just here for alignment) */ + u_int ki_cow; /* number of copy-on-write faults */ u_int64_t ki_runtime; /* Real time in microsec */ struct timeval ki_start; /* starting time */ struct timeval ki_childtime; /* time used by process children */ Modified: head/sys/vm/vm_fault.c == --- head/sys/vm/vm_fault.c Wed May 23 17:49:59 2012(r235849) +++ head/sys/vm/vm_fault.c Wed May 23 18:10:54 2012(r235850) @@ -805,6 +805,7 @@ vnode_locked: if (!is_first_object_locked) VM_OBJECT_LOCK(fs.object); PCPU_INC(cnt.v_cow_faults); + curthread->td_cow++; } else { prot &= ~VM_PROT_WRITE; } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r235822 - in head: sys/dev/esp sys/gnu/fs/xfs/FreeBSD usr.sbin/ppp usr.sbin/rpc.lockd
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 05/23/12 07:56, Bjoern A. Zeeb wrote: > > On 23. May 2012, at 06:49 , Xin LI wrote: > >> Author: delphij Date: Wed May 23 06:49:50 2012 New Revision: >> 235822 URL: http://svn.freebsd.org/changeset/base/235822 >> >> Log: Fix build: >> >> - Use %ll instead of %q for explicit long long casts; - Use %j >> instead of %q in XFS and cast to intmax_t. >> >> Tested with: make universe > > > I am still seeing XLP64 failing to compile: > > cc1: warnings being treated as errors > /scratch2/tmp/bz/HEAD.svn/sys/geom/geom_flashmap.c: In function > 'g_flashmap_print': > /scratch2/tmp/bz/HEAD.svn/sys/geom/geom_flashmap.c:82: warning: > format '%08llx' expects type 'long long unsigned int', but argument > 2 has type 'off_t' [-Wformat] > /scratch2/tmp/bz/HEAD.svn/sys/geom/geom_flashmap.c:82: warning: > format '%08llx' expects type 'long long unsigned int', but argument > 3 has type 'off_t' [-Wformat] > /scratch2/tmp/bz/HEAD.svn/sys/geom/geom_flashmap.c:82: warning: > format '%llu' expects type 'long long unsigned int', but argument 5 > has type 'off_t' [-Wformat] Weird, I don't know why I didn't caught this :-/ It seems that 'universe_kernel' does not do things after an existing universe build? Should be fixed in r235849. Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBCAAGBQJPvSOSAAoJEG80Jeu8UPuz6YwH/2zRaib16TwoUKMWPvRYgrDi JikyBmSqddhuN7uLJubT9KoiDNmX6dAjVHwGZt+p+EvIkYTCw96hUPR5XY/JrHXz YxKF0u5MsqpOGOkWWtlKIjwC3YE96TG5GAx9l8UzLU3FgGtM4OHjUmj3JUA1zXZ9 Fe4Cw1fzYcIW8xezghBbSzhfcOefWkizRY8gFSDRNUTn8GMEdngJ+f5uetzKBo7F juE3OtcgB6sHNaxf9rNup1RvfN7x9odlQyK/IAPrp2G/LlaeBN8szI1fcJjK2q8A qzA9/QPE3258slir0n8JGy809+9L8VZIC1edSanXqU8CAh/+6SLLNhtfd/XhCjU= =H/R1 -END PGP SIGNATURE- ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235849 - head/sys/geom
Author: delphij Date: Wed May 23 17:49:59 2012 New Revision: 235849 URL: http://svn.freebsd.org/changeset/base/235849 Log: Use %j and cast off_t to intmax_t for now to fix build. Noticed by: bz Modified: head/sys/geom/geom_flashmap.c Modified: head/sys/geom/geom_flashmap.c == --- head/sys/geom/geom_flashmap.c Wed May 23 17:13:30 2012 (r235848) +++ head/sys/geom/geom_flashmap.c Wed May 23 17:49:59 2012 (r235849) @@ -78,8 +78,8 @@ static void g_flashmap_print(struct g_flashmap_slice *slice) { - printf("%08llx-%08llx: %s (%lluKB)\n", slice->sl_start, slice->sl_end, - slice->sl_name, (slice->sl_end - slice->sl_start) / 1024); + printf("%08jx-%08jx: %s (%lluKB)\n", (intmax_t)slice->sl_start, (intmax_t)slice->sl_end, + slice->sl_name, (uintmax_t)(slice->sl_end - slice->sl_start) / 1024); } static int ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235848 - head/lib/libc/stdio
Author: issyl0 (doc committer) Date: Wed May 23 17:13:30 2012 New Revision: 235848 URL: http://svn.freebsd.org/changeset/base/235848 Log: Add two new locale-specific man pages: - libc/stdio/scanf_l.3 - libc/stdio/printf_l.3 Reviewed by: theraven Approved by: gabor (mentor) MFC after:5 days Added: head/lib/libc/stdio/printf_l.3 (contents, props changed) head/lib/libc/stdio/scanf_l.3 (contents, props changed) Modified: head/lib/libc/stdio/Makefile.inc Modified: head/lib/libc/stdio/Makefile.inc == --- head/lib/libc/stdio/Makefile.incWed May 23 17:10:22 2012 (r235847) +++ head/lib/libc/stdio/Makefile.incWed May 23 17:13:30 2012 (r235848) @@ -36,7 +36,8 @@ MAN+= fclose.3 ferror.3 fflush.3 fgetln. fopen.3 fputs.3 \ fputws.3 fread.3 fseek.3 funopen.3 fwide.3 getc.3 \ getline.3 getwc.3 mktemp.3 \ - printf.3 putc.3 putwc.3 remove.3 scanf.3 setbuf.3 stdio.3 tmpnam.3 \ + printf.3 printf_l.3 putc.3 putwc.3 remove.3 scanf.3 scanf_l.3 setbuf.3 \ + stdio.3 tmpnam.3 \ ungetc.3 ungetwc.3 wprintf.3 wscanf.3 MLINKS+=fclose.3 fcloseall.3 @@ -63,11 +64,16 @@ MLINKS+=printf.3 asprintf.3 printf.3 dpr printf.3 vasprintf.3 printf.3 vdprintf.3 \ printf.3 vfprintf.3 printf.3 vprintf.3 printf.3 vsnprintf.3 \ printf.3 vsprintf.3 +MLINKS+=printf_l.3 asprintf_l.3 printf_l.3 fprintf_l.3 printf_l.3 snprintf_l.3 \ + printf_l.3 sprintf_l.3 printf_l.3 vasprintf_l.3 printf_l.3 vfprintf_l.3 \ + printf_l.3 vprintf_l.3 printf_l.3 vsnprintf_l.3 printf_l.3 vsprintf_l.3 MLINKS+=putc.3 fputc.3 putc.3 putc_unlocked.3 putc.3 putchar.3 \ putc.3 putchar_unlocked.3 putc.3 putw.3 MLINKS+=putwc.3 fputwc.3 putwc.3 putwchar.3 MLINKS+=scanf.3 fscanf.3 scanf.3 sscanf.3 scanf.3 vfscanf.3 scanf.3 vscanf.3 \ scanf.3 vsscanf.3 +MLINKS+=scanf_l.3 fscanf_l.3 scanf_l.3 sscanf_l.3 scanf_l.3 vfscanf_l.3 \ + scanf_l.3 vscanf_l.3 scanf_l.3 vsscanf_l.3 MLINKS+=setbuf.3 setbuffer.3 setbuf.3 setlinebuf.3 setbuf.3 setvbuf.3 MLINKS+=tmpnam.3 tempnam.3 tmpnam.3 tmpfile.3 MLINKS+=wprintf.3 fwprintf.3 wprintf.3 swprintf.3 \ Added: head/lib/libc/stdio/printf_l.3 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/stdio/printf_l.3 Wed May 23 17:13:30 2012 (r235848) @@ -0,0 +1,80 @@ +.\" Copyright (c) 2012 Isabell Long +.\" All rights reserved. +.\" +.\" 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. +.\" +.\" $FreeBSD$ +.\" +.Dd April 7, 2012 +.Dt PRINTF_L 3 +.Os +.Sh NAME +.Nm printf_l , +.Nm asprintf_l , +.Nm fprintf_l , +.Nm snprintf_l , +.Nm sprintf_l , +.Nm vasprintf_l , +.Nm vfprintf_l , +.Nm vprintf_l , +.Nm vsnprintf_l , +.Nm vsprintf_l +.Nd formatted output conversion +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In stdio.h +.Ft int +.Fn printf_l "locale_t loc" "const char * restrict format" "..." +.Ft int +.Fn asprintf_l "char **ret" "locale_t loc" "const char * format" "..." +.Ft int +.Fn fprintf_l "FILE * restrict stream" "locale_t loc" "const char * restrict format" "..." +.Ft int +.Fn snprintf_l "char * restrict str" "size_t size" "locale_t loc" "const char * restrict format" "..." +.Ft int +.Fn sprintf_l "char * restrict str" "locale_t loc" "const char * restrict format" "..." +.Ft int +.Fn vasprintf_l "char **ret" "locale_t loc" "const char *format" "va_list ap" +.Ft int +.Fn vfprintf_l "FILE * restrict stream" "locale_t loc" "const char * restrict format" "va_list ap" +.Ft int +.Fn vprintf_l "locale_t loc" "const char * restrict format" "va_list
svn commit: r235847 - in head/sys/modules/drm2: . drm2 i915kms
Author: kib Date: Wed May 23 17:10:22 2012 New Revision: 235847 URL: http://svn.freebsd.org/changeset/base/235847 Log: The drm2 modules makefiles commit. Still not attached to the build. Sponsored by: The FreeBSD Foundation MFC after:1 month Added: head/sys/modules/drm2/ head/sys/modules/drm2/Makefile (contents, props changed) head/sys/modules/drm2/Makefile.inc (contents, props changed) head/sys/modules/drm2/drm2/ head/sys/modules/drm2/drm2/Makefile (contents, props changed) head/sys/modules/drm2/i915kms/ head/sys/modules/drm2/i915kms/Makefile (contents, props changed) Added: head/sys/modules/drm2/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/drm2/Makefile Wed May 23 17:10:22 2012 (r235847) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +.include + +SUBDIR = \ + drm2 \ + i915kms + +.include Added: head/sys/modules/drm2/Makefile.inc == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/drm2/Makefile.inc Wed May 23 17:10:22 2012 (r235847) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +.include "../Makefile.inc" Added: head/sys/modules/drm2/drm2/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/drm2/drm2/Makefile Wed May 23 17:10:22 2012 (r235847) @@ -0,0 +1,39 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../../dev/drm2 +KMOD = drm2 +SRCS = \ + drm_agpsupport.c \ + drm_auth.c \ + drm_bufs.c \ + drm_context.c \ + drm_crtc.c \ + drm_crtc_helper.c \ + drm_dma.c \ + drm_dp_iic_helper.c \ + drm_drawable.c \ + drm_drv.c \ + drm_edid.c \ + drm_fb_helper.c \ + drm_fops.c \ + drm_gem.c \ + drm_gem_names.c \ + drm_hashtab.c \ + drm_ioctl.c \ + drm_irq.c \ + drm_linux_list_sort.c \ + drm_lock.c \ + drm_memory.c \ + drm_mm.c \ + drm_modes.c \ + drm_pci.c \ + drm_scatter.c \ + drm_sman.c \ + drm_stub.c \ + drm_sysctl.c \ + drm_vm.c + +SRCS +=device_if.h bus_if.h pci_if.h device_if.h iicbus_if.h opt_drm.h \ + opt_vm.h + +.include Added: head/sys/modules/drm2/i915kms/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/drm2/i915kms/Makefile Wed May 23 17:10:22 2012 (r235847) @@ -0,0 +1,34 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../../dev/drm2/i915 +KMOD = i915kms +SRCS = \ + i915_debug.c \ + i915_dma.c \ + i915_drv.c \ + i915_gem.c \ + i915_gem_execbuffer.c \ + i915_gem_evict.c \ + i915_gem_gtt.c \ + i915_gem_tiling.c \ + i915_irq.c \ + i915_suspend.c \ + intel_bios.c \ + intel_crt.c \ + intel_display.c \ + intel_dp.c \ + intel_fb.c \ + intel_hdmi.c \ + intel_iic.c \ + intel_lvds.c \ + intel_modes.c \ + intel_opregion.c \ + intel_overlay.c \ + intel_panel.c \ + intel_ringbuffer.c \ + intel_sdvo.c \ + intel_sprite.c \ + intel_tv.c +SRCS += device_if.h bus_if.h pci_if.h iicbus_if.h iicbb_if.h opt_drm.h + +.include ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235846 - head/sys/dev/pci
Author: kib Date: Wed May 23 17:09:14 2012 New Revision: 235846 URL: http://svn.freebsd.org/changeset/base/235846 Log: Add 'drmn' device as another drm child, to allow drm2 drivers to live in parallel with drm1. Sponsored by: The FreeBSD Foundation MFC after:1 month Modified: head/sys/dev/pci/vga_pci.c Modified: head/sys/dev/pci/vga_pci.c == --- head/sys/dev/pci/vga_pci.c Wed May 23 17:03:09 2012(r235845) +++ head/sys/dev/pci/vga_pci.c Wed May 23 17:09:14 2012(r235846) @@ -105,6 +105,7 @@ vga_pci_attach(device_t dev) /* Always create a drm child for now to make it easier on drm. */ device_add_child(dev, "drm", -1); + device_add_child(dev, "drmn", -1); bus_generic_attach(dev); return (0); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235845 - head/sys/dev/acpica
Author: jkim Date: Wed May 23 17:03:09 2012 New Revision: 235845 URL: http://svn.freebsd.org/changeset/base/235845 Log: Restore Processor object path for verbose boot message. Modified: head/sys/dev/acpica/acpi_cpu.c Modified: head/sys/dev/acpica/acpi_cpu.c == --- head/sys/dev/acpica/acpi_cpu.c Wed May 23 16:43:37 2012 (r235844) +++ head/sys/dev/acpica/acpi_cpu.c Wed May 23 17:03:09 2012 (r235845) @@ -489,8 +489,10 @@ acpi_pcpu_get_id(device_t dev, uint32_t } else { if (pc->pc_acpi_id == *acpi_id) { if (bootverbose) - device_printf(dev, "(ACPI ID %u) -> APIC ID %d\n", - *acpi_id, pc->pc_cpuid); + device_printf(dev, + "Processor %s (ACPI ID %u) -> APIC ID %d\n", + acpi_name(acpi_get_handle(dev)), *acpi_id, + pc->pc_cpuid); *cpu_id = pc->pc_cpuid; return (0); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235842 - head/bin/uuidgen
Author: wblock (doc committer) Date: Wed May 23 16:19:19 2012 New Revision: 235842 URL: http://svn.freebsd.org/changeset/base/235842 Log: Mention the upper hard limit for -n option. Patch slightly modified from PR version. PR: 168255 Submitted by: Andy Kosela Approved by: gjb MFC after:3 days Modified: head/bin/uuidgen/uuidgen.1 Modified: head/bin/uuidgen/uuidgen.1 == --- head/bin/uuidgen/uuidgen.1 Wed May 23 15:47:07 2012(r235841) +++ head/bin/uuidgen/uuidgen.1 Wed May 23 16:19:19 2012(r235842) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 7, 2005 +.Dd May 23, 2012 .Dt UUIDGEN 1 .Os .Sh NAME @@ -52,8 +52,11 @@ instructs to not generate them in batch, but one at a time. .It Fl n This option controls the number of identifiers generated. -By default, multiple -identifiers are generated in batch. +By default, multiple identifiers are generated in batch. +The upper hard limit is 2048 +.Po see +.Xr uuidgen 2 +.Pc . .It Fl o Redirect output to .Ar filename ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235840 - head/usr.sbin/jail
Author: jamie Date: Wed May 23 15:30:13 2012 New Revision: 235840 URL: http://svn.freebsd.org/changeset/base/235840 Log: Note that the new jail(8) will be appearing in 9.1. Modified: head/usr.sbin/jail/jail.8 head/usr.sbin/jail/jail.conf.5 Modified: head/usr.sbin/jail/jail.8 == --- head/usr.sbin/jail/jail.8 Wed May 23 15:29:34 2012(r235839) +++ head/usr.sbin/jail/jail.8 Wed May 23 15:30:13 2012(r235840) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 26, 2012 +.Dd May 23, 2012 .Dt JAIL 8 .Os .Sh NAME @@ -1183,7 +1183,7 @@ utility appeared in Hierarchical/extensible jails were introduced in .Fx 8.0 . The configuration file was introduced in -.Fx 10.0 . +.Fx 9.1 . .Sh AUTHORS .An -nosplit The jail feature was written by Modified: head/usr.sbin/jail/jail.conf.5 == --- head/usr.sbin/jail/jail.conf.5 Wed May 23 15:29:34 2012 (r235839) +++ head/usr.sbin/jail/jail.conf.5 Wed May 23 15:30:13 2012 (r235840) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 26, 2012 +.Dd May 23, 2012 .Dt JAIL.CONF 5 .Os .Sh NAME @@ -217,7 +217,7 @@ utility appeared in The .Nm file was added in -.Fx 10.0 . +.Fx 9.1 . .Sh AUTHORS .An -nosplit The jail feature was written by ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235837 - in head/sbin: dump restore
Author: joel (doc committer) Date: Wed May 23 15:06:13 2012 New Revision: 235837 URL: http://svn.freebsd.org/changeset/base/235837 Log: mdoc: move two sentences from synopsis to description (where they really belong). With this change, mandoc now formats these manpages properly. Modified: head/sbin/dump/dump.8 head/sbin/restore/restore.8 Modified: head/sbin/dump/dump.8 == --- head/sbin/dump/dump.8 Wed May 23 14:48:14 2012(r235836) +++ head/sbin/dump/dump.8 Wed May 23 15:06:13 2012(r235837) @@ -51,16 +51,6 @@ .Ar filesystem .Nm .Fl W | Fl w -.Pp -.Nm rdump -is an alternate name for -.Nm . -.Pp -.in \" XXX -(The -.Bx 4.3 -option syntax is implemented for backward compatibility, but -is not documented here.) .Sh DESCRIPTION The .Nm @@ -97,6 +87,14 @@ as either its device-special file or its (if that is in a standard entry in .Pa /etc/fstab ) . .Pp +.Nm +may also be invoked as +.Nm rdump . +The +.Bx 4.3 +option syntax is implemented for backward compatibility, but +is not documented here. +.Pp The following options are supported by .Nm : .Bl -tag -width Ds Modified: head/sbin/restore/restore.8 == --- head/sbin/restore/restore.8 Wed May 23 14:48:14 2012(r235836) +++ head/sbin/restore/restore.8 Wed May 23 15:06:13 2012(r235837) @@ -68,16 +68,6 @@ .Op Fl f Ar file | Fl P Ar pipecommand .Op Fl s Ar fileno .Op Ar -.Pp -.Nm rrestore -is an alternate name for -.Nm . -.Pp -.in \" XXX -(The -.Bx 4.3 -option syntax is implemented for backward compatibility, but -is not documented here.) .Sh DESCRIPTION The .Nm @@ -104,6 +94,14 @@ flag is specified (see below), the appearance of a directory name refers to the files and (recursively) subdirectories of that directory. .Pp +.Nm +may also be invoked as +.Nm rrestore . +The +.Bx 4.3 +option syntax is implemented for backward compatibility, but +is not documented here. +.Pp Exactly one of the following flags is required: .Bl -tag -width Ds .It Fl i ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r235822 - in head: sys/dev/esp sys/gnu/fs/xfs/FreeBSD usr.sbin/ppp usr.sbin/rpc.lockd
On 23. May 2012, at 06:49 , Xin LI wrote: > Author: delphij > Date: Wed May 23 06:49:50 2012 > New Revision: 235822 > URL: http://svn.freebsd.org/changeset/base/235822 > > Log: > Fix build: > > - Use %ll instead of %q for explicit long long casts; > - Use %j instead of %q in XFS and cast to intmax_t. > > Tested with: make universe I am still seeing XLP64 failing to compile: cc1: warnings being treated as errors /scratch2/tmp/bz/HEAD.svn/sys/geom/geom_flashmap.c: In function 'g_flashmap_print': /scratch2/tmp/bz/HEAD.svn/sys/geom/geom_flashmap.c:82: warning: format '%08llx' expects type 'long long unsigned int', but argument 2 has type 'off_t' [-Wformat] /scratch2/tmp/bz/HEAD.svn/sys/geom/geom_flashmap.c:82: warning: format '%08llx' expects type 'long long unsigned int', but argument 3 has type 'off_t' [-Wformat] /scratch2/tmp/bz/HEAD.svn/sys/geom/geom_flashmap.c:82: warning: format '%llu' expects type 'long long unsigned int', but argument 5 has type 'off_t' [-Wformat] -- Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235834 - head/sys/dev/acpica
Author: jhb Date: Wed May 23 13:45:52 2012 New Revision: 235834 URL: http://svn.freebsd.org/changeset/base/235834 Log: Rework the previous change to honor MADT processor IDs when probing processor objects. Instead of forcing the new-bus CPU objects to use a unit number equal to pc_cpuid, adjust acpi_pcpu_get_id() to honor the MADT IDs by default. As with the previous change, setting debug.acpi.cpu_unordered to 1 in the loader will revert to the old behavior. Tested by:jimharris MFC after:1 month Modified: head/sys/dev/acpica/acpi.c head/sys/dev/acpica/acpi_cpu.c Modified: head/sys/dev/acpica/acpi.c == --- head/sys/dev/acpica/acpi.c Wed May 23 13:41:12 2012(r235833) +++ head/sys/dev/acpica/acpi.c Wed May 23 13:45:52 2012(r235834) @@ -289,13 +289,6 @@ SYSCTL_INT(_debug_acpi, OID_AUTO, reset_ &acpi_reset_clock, 1, "Reset system clock while resuming."); #endif -/* Allow users to ignore processor orders in MADT. */ -static int acpi_cpu_unordered; -TUNABLE_INT("debug.acpi.cpu_unordered", &acpi_cpu_unordered); -SYSCTL_INT(_debug_acpi, OID_AUTO, cpu_unordered, CTLFLAG_RDTUN, -&acpi_cpu_unordered, 0, -"Do not use the MADT to match ACPI Processor objects to CPUs."); - /* Allow users to override quirks. */ TUNABLE_INT("debug.acpi.quirks", &acpi_quirks); @@ -1863,15 +1856,11 @@ static ACPI_STATUS acpi_probe_child(ACPI_HANDLE handle, UINT32 level, void *context, void **status) { struct acpi_prw_data prw; -ACPI_BUFFER buf; -ACPI_OBJECT obj; ACPI_OBJECT_TYPE type; ACPI_HANDLE h; -struct pcpu *pc; device_t bus, child; char *handle_str; -u_int cpuid; -int order, unit; +int order; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); @@ -1909,31 +1898,6 @@ acpi_probe_child(ACPI_HANDLE handle, UIN case ACPI_TYPE_PROCESSOR: case ACPI_TYPE_THERMAL: case ACPI_TYPE_POWER: - unit = -1; - if (type == ACPI_TYPE_PROCESSOR && acpi_cpu_unordered == 0) { - ACPI_STATUS s; - buf.Pointer = &obj; - buf.Length = sizeof(obj); - s = AcpiEvaluateObject(handle, NULL, NULL, &buf); - if (ACPI_SUCCESS(s)) { - CPU_FOREACH(cpuid) { - pc = pcpu_find(cpuid); - if (pc->pc_acpi_id == obj.Processor.ProcId) { - unit = cpuid; - if (bootverbose) - printf("ACPI: %s (ACPI ID %u) -> cpu%d\n", - handle_str, obj.Processor.ProcId, unit); - break; - } - } - if (unit == -1) { - if (bootverbose) - printf("ACPI: %s (ACPI ID %u) ignored\n", - handle_str, obj.Processor.ProcId); - break; - } - } - } /* * Create a placeholder device for this node. Sort the * placeholder so that the probe/attach passes will run @@ -1944,7 +1908,7 @@ acpi_probe_child(ACPI_HANDLE handle, UIN ACPI_DEBUG_PRINT((ACPI_DB_OBJECTS, "scanning '%s'\n", handle_str)); order = level * 10 + ACPI_DEV_BASE_ORDER; acpi_probe_order(handle, &order); - child = BUS_ADD_CHILD(bus, order, NULL, unit); + child = BUS_ADD_CHILD(bus, order, NULL, -1); if (child == NULL) break; Modified: head/sys/dev/acpica/acpi_cpu.c == --- head/sys/dev/acpica/acpi_cpu.c Wed May 23 13:41:12 2012 (r235833) +++ head/sys/dev/acpica/acpi_cpu.c Wed May 23 13:45:52 2012 (r235834) @@ -124,6 +124,13 @@ struct acpi_cpu_device { #define PIIX4_STOP_BREAK_MASK (PIIX4_BRLD_EN_IRQ0 | PIIX4_BRLD_EN_IRQ | PIIX4_BRLD_EN_IRQ8) #define PIIX4_PCNTRL_BST_EN(1<<10) +/* Allow users to ignore processor orders in MADT. */ +static int cpu_unordered; +TUNABLE_INT("debug.acpi.cpu_unordered", &cpu_unordered); +SYSCTL_INT(_debug_acpi, OID_AUTO, cpu_unordered, CTLFLAG_RDTUN, +&cpu_unordered, 0, +"Do not use the MADT to match ACPI Processor objects to CPUs."); + /* Platform hardware resource information. */ static uint32_t cpu_smi_cmd; /* Value to write to SMI_CMD. */ static uint8_t cpu_cst_cnt; /* Indicate we are _CST aware. */ @@ -148,7 +155,7 @@ static int acpi_cpu_probe(device_t dev); static int acpi_cpu_attach(device_t dev); static int acpi_cpu_suspend(device_t dev); static int acpi_cpu_resume(device_t dev); -static int acpi_pcpu_get_id(uint32_t idx, uint32_t *acpi_id, +static int acpi_pcpu_get_id(device_t dev, uint32_t *acpi_id,
svn commit: r235833 - head/sys/dev/pci
Author: jhb Date: Wed May 23 13:41:12 2012 New Revision: 235833 URL: http://svn.freebsd.org/changeset/base/235833 Log: Only check to see if a memory resource is a PCI ROM BAR when activating and deactivating PCI resources. Previously, if a device had more than 48 MSI interrupts, then activating message 48 (which has a rid == PCIR_BIOS) would incorrectly try to enable the PCI ROM BAR. Tested by:Olivier Cinquin ocinquin uci edu MFC after:3 days Modified: head/sys/dev/pci/pci.c Modified: head/sys/dev/pci/pci.c == --- head/sys/dev/pci/pci.c Wed May 23 13:39:46 2012(r235832) +++ head/sys/dev/pci/pci.c Wed May 23 13:41:12 2012(r235833) @@ -4260,7 +4260,7 @@ pci_activate_resource(device_t dev, devi if (device_get_parent(child) == dev) { /* Device ROMs need their decoding explicitly enabled. */ dinfo = device_get_ivars(child); - if (PCIR_IS_BIOS(&dinfo->cfg, rid)) + if (type == SYS_RES_MEMORY && PCIR_IS_BIOS(&dinfo->cfg, rid)) pci_write_bar(child, pci_find_bar(child, rid), rman_get_start(r) | PCIM_BIOS_ENABLE); switch (type) { @@ -4287,7 +4287,7 @@ pci_deactivate_resource(device_t dev, de /* Disable decoding for device ROMs. */ if (device_get_parent(child) == dev) { dinfo = device_get_ivars(child); - if (PCIR_IS_BIOS(&dinfo->cfg, rid)) + if (type == SYS_RES_MEMORY && PCIR_IS_BIOS(&dinfo->cfg, rid)) pci_write_bar(child, pci_find_bar(child, rid), rman_get_start(r)); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235831 - in head/sys: arm/arm arm/include dev/hwpmc
Author: fabient Date: Wed May 23 13:23:40 2012 New Revision: 235831 URL: http://svn.freebsd.org/changeset/base/235831 Log: Soft PMC support for ARM. Callgraph is not captured, only current location. Sample system wide profiling: "pmcstat -Sclock.hard -T" Modified: head/sys/arm/arm/machdep.c head/sys/arm/include/pmc_mdep.h head/sys/dev/hwpmc/hwpmc_arm.c Modified: head/sys/arm/arm/machdep.c == --- head/sys/arm/arm/machdep.c Wed May 23 13:01:22 2012(r235830) +++ head/sys/arm/arm/machdep.c Wed May 23 13:23:40 2012(r235831) @@ -674,9 +674,9 @@ fake_preload_metadata(void) static uint32_t fake_preload[35]; fake_preload[i++] = MODINFO_NAME; - fake_preload[i++] = strlen("elf kernel") + 1; - strcpy((char*)&fake_preload[i++], "elf kernel"); - i += 2; + fake_preload[i++] = strlen("kernel") + 1; + strcpy((char*)&fake_preload[i++], "kernel"); + i += 1; fake_preload[i++] = MODINFO_TYPE; fake_preload[i++] = strlen("elf kernel") + 1; strcpy((char*)&fake_preload[i++], "elf kernel"); Modified: head/sys/arm/include/pmc_mdep.h == --- head/sys/arm/include/pmc_mdep.h Wed May 23 13:01:22 2012 (r235830) +++ head/sys/arm/include/pmc_mdep.h Wed May 23 13:23:40 2012 (r235831) @@ -54,6 +54,12 @@ union pmc_md_pmc { #definePMC_TRAPFRAME_TO_FP(TF) ((TF)->tf_usr_lr) #definePMC_TRAPFRAME_TO_SP(TF) ((TF)->tf_usr_sp) +/* Build a fake kernel trapframe from current instruction pointer. */ +#define PMC_FAKE_TRAPFRAME(TF) \ + do {\ + __asm __volatile("mov %0, pc" : "=r" ((TF)->tf_pc));\ + } while (0) + /* * Prototypes */ Modified: head/sys/dev/hwpmc/hwpmc_arm.c == --- head/sys/dev/hwpmc/hwpmc_arm.c Wed May 23 13:01:22 2012 (r235830) +++ head/sys/dev/hwpmc/hwpmc_arm.c Wed May 23 13:23:40 2012 (r235831) @@ -38,38 +38,47 @@ __FBSDID("$FreeBSD$"); struct pmc_mdep * pmc_md_initialize() { +#ifdef CPU_XSCALE_IXP425 if (cpu_class == CPU_CLASS_XSCALE) return pmc_xscale_initialize(); else +#endif return NULL; } void pmc_md_finalize(struct pmc_mdep *md) { +#ifdef CPU_XSCALE_IXP425 if (cpu_class == CPU_CLASS_XSCALE) pmc_xscale_finalize(md); else KASSERT(0, ("[arm,%d] Unknown CPU Class 0x%x", __LINE__, cpu_class)); +#endif +} + +static int +pmc_save_callchain(uintptr_t *cc, int maxsamples, +struct trapframe *tf) +{ + + *cc = PMC_TRAPFRAME_TO_PC(tf); + return (1); } int pmc_save_kernel_callchain(uintptr_t *cc, int maxsamples, struct trapframe *tf) { - (void) cc; - (void) maxsamples; - (void) tf; - return (0); + + return pmc_save_callchain(cc, maxsamples, tf); } int pmc_save_user_callchain(uintptr_t *cc, int maxsamples, struct trapframe *tf) { - (void) cc; - (void) maxsamples; - (void) tf; - return (0); + + return pmc_save_callchain(cc, maxsamples, tf); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235829 - head/sys/vm
Author: avg Date: Wed May 23 12:51:49 2012 New Revision: 235829 URL: http://svn.freebsd.org/changeset/base/235829 Log: vm_pager_object_lookup: small performance optimization do not needlessly lock an object if its handle doesn't match Reviewed by: kib, alc MFC after:1 week Modified: head/sys/vm/vm_pager.c Modified: head/sys/vm/vm_pager.c == --- head/sys/vm/vm_pager.c Wed May 23 11:26:28 2012(r235828) +++ head/sys/vm/vm_pager.c Wed May 23 12:51:49 2012(r235829) @@ -271,14 +271,15 @@ vm_pager_object_lookup(struct pagerlst * vm_object_t object; TAILQ_FOREACH(object, pg_list, pager_object_list) { - VM_OBJECT_LOCK(object); - if (object->handle == handle && - (object->flags & OBJ_DEAD) == 0) { - vm_object_reference_locked(object); + if (object->handle == handle) { + VM_OBJECT_LOCK(object); + if ((object->flags & OBJ_DEAD) == 0) { + vm_object_reference_locked(object); + VM_OBJECT_UNLOCK(object); + break; + } VM_OBJECT_UNLOCK(object); - break; } - VM_OBJECT_UNLOCK(object); } return (object); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r235797 - head/contrib/gcc
On 2012-05-22 20:18, David E. O'Brien wrote: > Author: obrien > Date: Tue May 22 18:18:06 2012 > New Revision: 235797 > URL: http://svn.freebsd.org/changeset/base/235797 > > Log: > Do not incorrectly warn when printing a quad_t using "%qd" on 64-bit > platforms. > > Modified: > head/contrib/gcc/c-format.c > > Modified: head/contrib/gcc/c-format.c > == > --- head/contrib/gcc/c-format.c Tue May 22 17:44:01 2012 > (r235796) > +++ head/contrib/gcc/c-format.c Tue May 22 18:18:06 2012 > (r235797) > @@ -287,7 +287,11 @@ static const format_length_info printf_l > { >{ "h", FMT_LEN_h, STD_C89, "hh", FMT_LEN_hh, STD_C99 }, >{ "l", FMT_LEN_l, STD_C89, "ll", FMT_LEN_ll, STD_C9L }, > +#ifdef __LP64__ > + { "q", FMT_LEN_l, STD_EXT, NULL, 0, 0 }, > +#else >{ "q", FMT_LEN_ll, STD_EXT, NULL, 0, 0 }, > +#endif >{ "L", FMT_LEN_L, STD_C89, NULL, 0, 0 }, >{ "z", FMT_LEN_z, STD_C99, NULL, 0, 0 }, >{ "Z", FMT_LEN_z, STD_EXT, NULL, 0, 0 }, Until all the additional warnings this causes have been fixed, can this commit please be reverted for now? ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235828 - in head/sys: netinet netinet6
Author: tuexen Date: Wed May 23 11:26:28 2012 New Revision: 235828 URL: http://svn.freebsd.org/changeset/base/235828 Log: Use consistent text at the begining of the files. MFC after: 3 days Modified: head/sys/netinet/sctp.h head/sys/netinet/sctp_asconf.c head/sys/netinet/sctp_asconf.h head/sys/netinet/sctp_auth.c head/sys/netinet/sctp_auth.h head/sys/netinet/sctp_bsd_addr.c head/sys/netinet/sctp_bsd_addr.h head/sys/netinet/sctp_cc_functions.c head/sys/netinet/sctp_constants.h head/sys/netinet/sctp_crc32.c head/sys/netinet/sctp_crc32.h head/sys/netinet/sctp_dtrace_declare.h head/sys/netinet/sctp_dtrace_define.h head/sys/netinet/sctp_header.h head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_indata.h head/sys/netinet/sctp_input.c head/sys/netinet/sctp_input.h head/sys/netinet/sctp_lock_bsd.h head/sys/netinet/sctp_os.h head/sys/netinet/sctp_os_bsd.h head/sys/netinet/sctp_output.c head/sys/netinet/sctp_output.h head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_pcb.h head/sys/netinet/sctp_peeloff.c head/sys/netinet/sctp_peeloff.h head/sys/netinet/sctp_ss_functions.c head/sys/netinet/sctp_structs.h head/sys/netinet/sctp_sysctl.c head/sys/netinet/sctp_sysctl.h head/sys/netinet/sctp_timer.c head/sys/netinet/sctp_timer.h head/sys/netinet/sctp_uio.h head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctp_var.h head/sys/netinet/sctputil.c head/sys/netinet/sctputil.h head/sys/netinet6/sctp6_usrreq.c head/sys/netinet6/sctp6_var.h Modified: head/sys/netinet/sctp.h == --- head/sys/netinet/sctp.h Wed May 23 10:35:40 2012(r235827) +++ head/sys/netinet/sctp.h Wed May 23 11:26:28 2012(r235828) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2008, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -29,7 +29,6 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp.h,v 1.18 2005/03/06 16:04:16 itojun Exp $*/ #include __FBSDID("$FreeBSD$"); @@ -37,6 +36,7 @@ __FBSDID("$FreeBSD$"); #ifndef _NETINET_SCTP_H_ #define _NETINET_SCTP_H_ + #include Modified: head/sys/netinet/sctp_asconf.c == --- head/sys/netinet/sctp_asconf.c Wed May 23 10:35:40 2012 (r235827) +++ head/sys/netinet/sctp_asconf.c Wed May 23 11:26:28 2012 (r235828) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,10 +30,9 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_asconf.c,v 1.24 2005/03/06 16:04:16 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); + #include #include #include Modified: head/sys/netinet/sctp_asconf.h == --- head/sys/netinet/sctp_asconf.h Wed May 23 10:35:40 2012 (r235827) +++ head/sys/netinet/sctp_asconf.h Wed May 23 11:26:28 2012 (r235828) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,8 +30,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_asconf.h,v 1.8 2005/03/06 16:04:16 itojun Exp $ */ - #include __FBSDID("$FreeBSD$"); Modified: head/sys/netinet/sctp_auth.c == --- head/sys/netinet/sctp_auth.cWed May 23 10:35:40 2012 (r235827) +++ head/sys/netinet/sctp_auth.cWed May 23 11:26:28 2012 (r235828) @@ -1,7 +1,7 @@ /*- * Copyright (c)
Re: svn commit: r235797 - head/contrib/gcc
On Wed, 23 May 2012, Garrett Cooper wrote: On May 22, 2012, at 11:41 PM, Dimitry Andric wrote: On 2012-05-22 23:07, m...@freebsd.org wrote: ... We run with the following at Isilon, which is somewhat bogus because it allows a bit of sloppiness in types, but is also terribly convenient since it means no casting on printf arguments is needed: Please don't. If you want to write portable code, use the (admittedly horrible) PRId64 macros instead. Please don't. The PRI macros are almost as abominable as long long. Agreed, because the patch attached earlier disguises issues with signedness (for one) and I've seen some interesting bugs creep in because of issues like that, an it's painful cleaning up those problems later on (esp. considering that clang will replace gcc not too far down the line)... Disagreed (except I always notice sign errors in printf formats too. I once fixed -Wformat to detect sign errors, but ran away since it found even more sign errors than size errors. Now I only notice the sign errors when a size error turns up). Apart from being even uglier looking than long long, the PRI macros are not even usable for printing an averaged typedefed type, since unless there is a format letter and a corresponding PRI macro for just that type, you have to peer inside the opaque details of the type to determine its size and perhaps its signedness and then hard-code the corresponding PRI macro. This breaks as soon as the opaque details change and thus defeats the point of having (semi-)opaque typedefed types. If a variable's type is known to be 64 bits, then you can hard-code PRI64 for it. This breaks as soon as the knowledge becomes out of date. Since the type isn't typedefed, it is less likely to change, but there is no guarantee. Everyone knew that all types were 32 bits and had to change too much to support 64 bit systems. Bruce ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r235827 - head/lib/libc/net
Author: tuexen Date: Wed May 23 10:35:40 2012 New Revision: 235827 URL: http://svn.freebsd.org/changeset/base/235827 Log: Update copyright date. MFC after: 3 days Modified: head/lib/libc/net/sctp_sys_calls.c Modified: head/lib/libc/net/sctp_sys_calls.c == --- head/lib/libc/net/sctp_sys_calls.c Wed May 23 09:38:37 2012 (r235826) +++ head/lib/libc/net/sctp_sys_calls.c Wed May 23 10:35:40 2012 (r235827) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. - * Copyright (c) 2008-2011, by Randall Stewart. All rights reserved. - * Copyright (c) 2008-2011, by Michael Tuexen. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -32,6 +32,7 @@ #include __FBSDID("$FreeBSD$"); + #include #include #include ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r235797 - head/contrib/gcc
On Tue, 22 May 2012, Marcel Moolenaar wrote: On May 22, 2012, at 2:07 PM, m...@freebsd.org wrote: On Tue, May 22, 2012 at 1:05 PM, Bruce Evans wrote: On Tue, 22 May 2012, David E. O'Brien wrote: Log: Do not incorrectly warn when printing a quad_t using "%qd" on 64-bit platforms. I think I like this, since it is technically correct, and will find a different set of type mismatches. We run with the following at Isilon, which is somewhat bogus because it allows a bit of sloppiness in types, but is also terribly convenient since it means no casting on printf arguments is needed: Without casts, the code will be unportable (sideways and future). --- contrib/gcc/c-format.c 2012-05-22 14:08:23.538266746 -0700 +++ /data/sb/head/src/contrib/gcc/c-format.c2012-05-16 12:59:40.937016702 -0700 @@ -2298,10 +2570,20 @@ check_format_types (format_wanted_type * equivalent but the above test won't consider them equivalent. */ if (wanted_type == char_type_node && (!pedantic || i < 2) && char_type_flag) continue; + + /* Isilon: FreeBSD defines int64_t (and others) as one type (e.g. long +long) on i386 and another type (e.g. long) on amd64. This prevents +the use of a common format specifier. Treat equal sized integer types +as equivalent. */ + if (TREE_CODE (wanted_type) == INTEGER_TYPE + && TREE_CODE (cur_type) == INTEGER_TYPE + && int_size_in_bytes (wanted_type) == int_size_in_bytes (cur_type)) +continue; + /* Now we have a type mismatch. */ format_type_warning (types->name, format_start, format_length, wanted_type, types->pointer_count, types->wanted_type_name, orig_cur_type, arg_num); } If there's no objections, I (or David or anyone else) can commit to the FreeBSD repository. I think such would make support for external (i.e. non-FreeBSD) toolchains even more problematic. Our format extensions are a big hurdle already. I think we should not tweak the compiler. I certainly object. It breaks the warning, without even an option to control this. The current checking gives some chance of detecting type mismatches in printf formats without compiling all on arches. It is only for some 64-bit types and formats that the warnings don't correspond to runtime bugs on any currently supported arch. This is because 64 bits is the largest integer size on all supported arch. All of %ll, %q and %j are specified to have >= 64 bits and limited by this, so they have precisely 64 bits and there are no runtime incompatibilities. However, %l doesn't give 64 bits on 32-bit arches, and the compile time warning for using %l to print an int64_t value on a 64-bit system is useful on currently supported arches for preventing unportabilty to 32-bit systems, although %l is correct for this on 64 bit systems. Bruce ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r235797 - head/contrib/gcc
On Tue, 22 May 2012 g...@freebsd.org wrote: At Wed, 23 May 2012 06:05:06 +1000 (EST), Bruce Evans wrote: [... excessive quoting deleted] Now I prefer the old way, after fixing the bugs found by switching. It finds more bugs under FreeBSD, and is bug for bug compatible with distribution gcc and probably with other system's headers under !FreeBSD. Except under FreeBSD, I prefer %q to be an error. The above shows it only being used 12 times in /sys, with most uses of it being bugs. Fixing these bugs would leave about 1 correct use of it -- for printing the quad_t in unreachable code in msdosfs. This use would be easy to avoid too (just cast to uintmax_t). Uses in userland are hopefully east to fix and avoid too. In an old userland, there were only about 50, with most in netstat/inet6.c, tcopy.c, ftpd, fsirand, and contrib'ed code. Of course you can't make it an error for the contrib'ed code. Instead of replying to the original commit I'll just add to the chain. Please don't quote the whole thing, especially when not replying to any of it. Note that this change broke buildworld: src/usr.sbin/ppp/throughput.c: In function 'throughput_disp': src/usr.sbin/ppp/throughput.c:119: warning: format '%6qu' expects type 'long unsigned int', but argu And several more. Of course ppp has several style bugs and type mismatches, else its brokenness wouldn't have been exposed: - the variables have the bogus type "unsigned long long" - they are printed with the mismatched format "%6qu", although there is a perfectly bogus format "%6llu" that matches them exactly. Another point is that libc printf doesn't really support %q. It just maps %q to %ll and accesses the arg using va_arg(ap, long long). Thus it is technically correct in userland for the format checker to also map %q to %ll and disallow printing int64_t with each in the LP64 case. This is also bug for bug compatible with the gcc distribution and perhaps with other OS's. However the kernel printf is more careful. It doesn't map %q to %ll, and it accesses %q args using va_arg(ap, quad_t). Thus it is technically correct in the kernel for the format checker to also _not_ map %q to %ll and _allow_ printing int64_t with %q. However, %q should never be used. The history of the kernel printf shows that I objected to adding %q support to it in 1999, but not strongly enough to keep it out. I should have objected more to adding support for %ll. This was slightly before C99 came out. %j support was needed before then but was not added until 2002. I had prepared for killing long long and quad_t in the kernel by removing many uses of them. When the %q mistake was committed, there were just 90 instances of 'long long' in /sys. 61 of these were in the i386 FPU emulator. 20 were in other code that I didn't care about and/or was soon to go away: alpha: 6 (half wrong and/or easy to avoid) coda: 3 (all wrong and/or easy to avoid) svr4: 4 (all wrong and/or easy to avoid) vinum: 4 (all easy to avoid?) powerpc: 3 (cloned from wrong ones for alpha) The remaining 9 were: 3 that I was responsible for in i386 clock code and a copy for pc98 (to avoid overflow in multiplication) 2 that I was responsible for in i386 basic typedefs (only used for non-gcc) 1 that I was responsible for in sys/param.h (to avoid overflow in shift) 3 in ntp code (all wrong and easy to avoid. The code wanted precisely 64 bits and assumed that long long gave that. The type that gives 64 bits, int64_t, has been standard in FreeBSD since FreeBSD-2. It came from 4.4BSD-Lite1. While counting the above, I noticed that in the middle of 1999 just before the %q changes, there were about 700 references to int64_t (now counting ones in comments). Just 1 year earlier, there were only about 300. The count of long longs didn't change much in that time. For quad_t, the raw counts were 419 in the middle of 1998 and 441 in the middle of 1999. About half were in nfs (183) and libkern (64). Now /sys has and oldnfs has 58. For long long, the raw count is 1577. So, 13 years after C99 stdint.h made long long unnecessary and after mostly avoiding long long when it was only a gcc misfeature, the use of long long has exploded by a factor of about 1577/91 = 17 :-(. The use of int64_t has also exploded: its raw count is 66730 (!); it has exploded by a factor of about 66730/700 = 95. int32_t is only used 46715 times. I fear than many of the uses of fixed width types are wrong too. The fixed widths become part of both APIs and ABIs so they will be hard to change to support 128-bit things. off_t is only used 2223 times. It has the opposite problem that its API is perfect and supports it having any width, but you can't actually change its width easily since bugware will have assumptions that it is precisely 64 bits, just like old bugware assumed that it and long are precisely 32 bits, but multiplied by a bloat factor of 95 or so. int
Re: svn commit: r235797 - head/contrib/gcc
On May 22, 2012, at 11:41 PM, Dimitry Andric wrote: > On 2012-05-22 23:07, m...@freebsd.org wrote: > ... >> We run with the following at Isilon, which is somewhat bogus because >> it allows a bit of sloppiness in types, but is also terribly >> convenient since it means no casting on printf arguments is needed: > > Please don't. If you want to write portable code, use the (admittedly > horrible) PRId64 macros instead. Agreed, because the patch attached earlier disguises issues with signedness (for one) and I've seen some interesting bugs creep in because of issues like that, an it's painful cleaning up those problems later on (esp. considering that clang will replace gcc not too far down the line)... Thanks, -Garrett___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"