svn commit: r271088 - in head/sys: kern sys

2014-09-04 Thread Gleb Smirnoff
Author: glebius
Date: Thu Sep  4 09:07:14 2014
New Revision: 271088
URL: http://svnweb.freebsd.org/changeset/base/271088

Log:
  Provide m_catpkt(), a wrapper around m_cat() that deals with M_PKTHDR mbufs.
  
  Sponsored by: Netflix
  Sponsored by: Nginx, Inc.

Modified:
  head/sys/kern/uipc_mbuf.c
  head/sys/sys/mbuf.h

Modified: head/sys/kern/uipc_mbuf.c
==
--- head/sys/kern/uipc_mbuf.c   Thu Sep  4 06:07:32 2014(r271087)
+++ head/sys/kern/uipc_mbuf.c   Thu Sep  4 09:07:14 2014(r271088)
@@ -990,6 +990,22 @@ m_cat(struct mbuf *m, struct mbuf *n)
}
 }
 
+/*
+ * Concatenate two pkthdr mbuf chains.
+ */
+void
+m_catpkt(struct mbuf *m, struct mbuf *n)
+{
+
+   M_ASSERTPKTHDR(m);
+   M_ASSERTPKTHDR(n);
+
+   m->m_pkthdr.len += n->m_pkthdr.len;
+   m_demote(n, 1);
+
+   m_cat(m, n);
+}
+
 void
 m_adj(struct mbuf *mp, int req_len)
 {

Modified: head/sys/sys/mbuf.h
==
--- head/sys/sys/mbuf.h Thu Sep  4 06:07:32 2014(r271087)
+++ head/sys/sys/mbuf.h Thu Sep  4 09:07:14 2014(r271088)
@@ -915,6 +915,7 @@ int  m_apply(struct mbuf *, int, int,
int (*)(void *, void *, u_int), void *);
 int m_append(struct mbuf *, int, c_caddr_t);
 voidm_cat(struct mbuf *, struct mbuf *);
+voidm_catpkt(struct mbuf *, struct mbuf *);
 int m_extadd(struct mbuf *, caddr_t, u_int,
void (*)(struct mbuf *, void *, void *), void *, void *,
int, int, 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: r271089 - head/sys/netinet

2014-09-04 Thread Gleb Smirnoff
Author: glebius
Date: Thu Sep  4 09:15:44 2014
New Revision: 271089
URL: http://svnweb.freebsd.org/changeset/base/271089

Log:
  Improve r265338. When inserting mbufs into TCP reassembly queue,
  try to collapse adjacent pieces using m_catpkt(). In best case
  scenario it copies data and frees mbufs, making mbuf exhaustion
  attack harder.
  
  Suggested by: Jonathan Looney 
  Security: Hardens against remote mbuf exhaustion attack.
  Sponsored by: Netflix
  Sponsored by: Nginx, Inc.

Modified:
  head/sys/netinet/tcp_reass.c

Modified: head/sys/netinet/tcp_reass.c
==
--- head/sys/netinet/tcp_reass.cThu Sep  4 09:07:14 2014
(r271088)
+++ head/sys/netinet/tcp_reass.cThu Sep  4 09:15:44 2014
(r271089)
@@ -214,16 +214,29 @@ tcp_reass(struct tcpcb *tp, struct tcphd
mq = nq;
}
 
-   /* Insert the new segment queue entry into place. */
+   /*
+* Insert the new segment queue entry into place.  Try to collapse
+* mbuf chains if segments are adjacent.
+*/
if (mp) {
-   m->m_nextpkt = mp->m_nextpkt;
-   mp->m_nextpkt = m;
+   if (M_TCPHDR(mp)->th_seq + mp->m_pkthdr.len == th->th_seq)
+   m_catpkt(mp, m);
+   else {
+   m->m_nextpkt = mp->m_nextpkt;
+   mp->m_nextpkt = m;
+   m->m_pkthdr.pkt_tcphdr = th;
+   }
} else {
-   m->m_nextpkt = tp->t_segq;
-   tp->t_segq = m ;
+   mq = tp->t_segq;
+   tp->t_segq = m;
+   if (mq && th->th_seq + *tlenp == M_TCPHDR(mq)->th_seq) {
+   m->m_nextpkt = mq->m_nextpkt;
+   m_catpkt(m, mq);
+   } else
+   m->m_nextpkt = mq;
+   m->m_pkthdr.pkt_tcphdr = th;
}
-   m->m_pkthdr.pkt_tcphdr = th;
-   tp->t_segqlen += m->m_pkthdr.len;
+   tp->t_segqlen += *tlenp;
 
 present:
/*
___
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: r270999 - head/sys/kern

2014-09-04 Thread Gleb Smirnoff
On Wed, Sep 03, 2014 at 12:10:28PM -0700, John-Mark Gurney wrote:
J> > M> > + if (p->p_pptr) {
J> > M> >   kp->ki_ppid = proc_realparent(p)->p_pid;
J> > M> > - if (p->p_flag & P_TRACED)
J> > M> > - kp->ki_tracer = p->p_pptr->p_pid;
J> > M> > + if (p->p_flag & P_TRACED)
J> > M> > + kp->ki_tracer = p->p_pptr->p_pid;
J> > M> > + }
J> > M> >  }
J> > M> >  
J> > M> >  /*
J> > M> > 
J> > M> 
J> > M> p_pptr must be non-NULL if P_TRACED is set. If there is no way to
J> > M> annotate it for coverity, this change deserves a comment in the code
J> > M> (and in retrospect previous code should have had appropriate comment as
J> > M> well).
J> > 
J> > Thanks for explanation.
J> > 
J> > I'd suggest to leave the change in, since now it is a 
micro-micro-optimization :)
J> 
J> If you must leave it in, then at least compare the pointer against
J> NULL, and collapse two if statements into one...
J> 
J> We should never introduce new pointer checks that aren't against NULL...

I don't see how two if statements can be collapsed? We need to assign
ki_ppid regardless of P_TRACED flag.

-- 
Totus tuus, Glebius.
___
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: r271093 - in head/sys: arm/altera arm/altera/socfpga arm/conf boot/fdt/dts/arm

2014-09-04 Thread Ruslan Bukin
Author: br
Date: Thu Sep  4 12:44:40 2014
New Revision: 271093
URL: http://svnweb.freebsd.org/changeset/base/271093

Log:
  Add initial support for Altera SOCFPGA (heterogeneous ARM/FPGA) SoC family.
  Include board configuration for Terasic SoCKit (Altera Cyclone V).
  
  Sponsored by: DARPA, AFRL

Added:
  head/sys/arm/altera/
  head/sys/arm/altera/socfpga/
  head/sys/arm/altera/socfpga/files.socfpga   (contents, props changed)
  head/sys/arm/altera/socfpga/socfpga_common.c   (contents, props changed)
  head/sys/arm/altera/socfpga/socfpga_machdep.c   (contents, props changed)
  head/sys/arm/altera/socfpga/std.socfpga   (contents, props changed)
  head/sys/arm/conf/SOCKIT   (contents, props changed)
  head/sys/boot/fdt/dts/arm/socfpga-sockit.dts   (contents, props changed)
  head/sys/boot/fdt/dts/arm/socfpga.dtsi   (contents, props changed)

Added: head/sys/arm/altera/socfpga/files.socfpga
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm/altera/socfpga/files.socfpga   Thu Sep  4 12:44:40 2014
(r271093)
@@ -0,0 +1,17 @@
+# $FreeBSD$
+
+kern/kern_clocksource.cstandard
+
+arm/arm/bus_space_generic.cstandard
+arm/arm/bus_space_asm_generic.Sstandard
+arm/arm/cpufunc_asm_armv5.Sstandard
+arm/arm/cpufunc_asm_arm10.Sstandard
+arm/arm/cpufunc_asm_arm11.Sstandard
+arm/arm/cpufunc_asm_armv7.Sstandard
+
+arm/arm/bus_space-v6.c standard
+arm/arm/gic.c  standard
+arm/arm/mpcore_timer.c standard
+
+arm/altera/socfpga/socfpga_common.cstandard
+arm/altera/socfpga/socfpga_machdep.c   standard

Added: head/sys/arm/altera/socfpga/socfpga_common.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm/altera/socfpga/socfpga_common.cThu Sep  4 12:44:40 
2014(r271093)
@@ -0,0 +1,83 @@
+/*-
+ * Copyright (c) 2014 Ruslan Bukin 
+ * All rights reserved.
+ *
+ * This software was developed by SRI International and the University of
+ * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
+ * ("CTSRD"), as part of the DARPA CRASH research programme.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+
+#defineRESMAN_BASE 0xFFD05000
+#defineRESMAN_CTRL 0x4
+#defineSWWARMRSTREQ(1 << 1)
+
+void
+cpu_reset(void)
+{
+   bus_addr_t vaddr;
+
+   if (bus_space_map(fdtbus_bs_tag, RESMAN_BASE, 0x10, 0, &vaddr) == 0) {
+   bus_space_write_4(fdtbus_bs_tag, vaddr,
+   RESMAN_CTRL, SWWARMRSTREQ);
+   }
+
+   while (1);
+}
+
+struct fdt_fixup_entry fdt_fixup_table[] = {
+   { NULL, NULL }
+};
+
+static int
+fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig,
+int *pol)
+{
+
+   if (!fdt_is_compatible(node, "arm,gic"))
+   return (ENXIO);
+
+   *interrupt = fdt32_to_cpu(intr[0]);
+   *trig = INTR_TRIGGER_CONFORM;
+   *pol = INTR_POLARITY_CONFORM;
+   return (0);
+}
+
+fdt_pic_decode_t fdt_pic_table[] = {
+   &fdt_pic_decode_ic,
+   NULL
+};

Added: head/sys/arm/altera/socfpga/socfpga_machdep.c
==
--- /dev/null   00:00:00 1970   (empty, becau

svn commit: r271094 - head/sys/arm/freescale/imx

2014-09-04 Thread Ian Lepore
Author: ian
Date: Thu Sep  4 13:13:42 2014
New Revision: 271094
URL: http://svnweb.freebsd.org/changeset/base/271094

Log:
  Fix typo in variable name.

Modified:
  head/sys/arm/freescale/imx/imx51_iomux.c

Modified: head/sys/arm/freescale/imx/imx51_iomux.c
==
--- head/sys/arm/freescale/imx/imx51_iomux.cThu Sep  4 12:44:40 2014
(r271093)
+++ head/sys/arm/freescale/imx/imx51_iomux.cThu Sep  4 13:13:42 2014
(r271094)
@@ -222,7 +222,7 @@ imx_iomux_gpr_get(u_int regnum)
 {
 
KASSERT(iomuxsc != NULL, ("imx_iomux_gpr_get() called before attach"));
-   KASSERT(regnum >= 0 && renum <= 1, 
+   KASSERT(regnum >= 0 && regnum <= 1, 
("imx_iomux_gpr_get bad regnum %u", regnum));
return (IOMUX_READ(iomuxsc, IOMUXC_GPR0 + regnum));
 }
@@ -232,7 +232,7 @@ imx_iomux_gpr_set(u_int regnum, uint32_t
 {
 
KASSERT(iomuxsc != NULL, ("imx_iomux_gpr_set() called before attach"));
-   KASSERT(regnum >= 0 && renum <= 1, 
+   KASSERT(regnum >= 0 && regnum <= 1, 
("imx_iomux_gpr_set bad regnum %u", regnum));
IOMUX_WRITE(iomuxsc, IOMUXC_GPR0 + regnum, val);
 }
@@ -244,7 +244,7 @@ imx_iomux_gpr_set_masked(u_int regnum, u
 
KASSERT(iomuxsc != NULL, 
("imx_iomux_gpr_set_masked called before attach"));
-   KASSERT(regnum >= 0 && renum <= 1, 
+   KASSERT(regnum >= 0 && regnum <= 1, 
("imx_iomux_gpr_set_masked bad regnum %u", regnum));
 
val = IOMUX_READ(iomuxsc, IOMUXC_GPR0 + regnum);
___
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: r271097 - head/sys/arm/freescale/imx

2014-09-04 Thread Ian Lepore
Author: ian
Date: Thu Sep  4 14:25:32 2014
New Revision: 271097
URL: http://svnweb.freebsd.org/changeset/base/271097

Log:
  Add a basic iomux driver for imx6.
  
  Submitted by: bsam@

Added:
  head/sys/arm/freescale/imx/imx6_iomux.c   (contents, props changed)
  head/sys/arm/freescale/imx/imx6_iomuxreg.h   (contents, props changed)
Modified:
  head/sys/arm/freescale/imx/files.imx6
  head/sys/arm/freescale/imx/imx_iomuxvar.h

Modified: head/sys/arm/freescale/imx/files.imx6
==
--- head/sys/arm/freescale/imx/files.imx6   Thu Sep  4 13:47:55 2014
(r271096)
+++ head/sys/arm/freescale/imx/files.imx6   Thu Sep  4 14:25:32 2014
(r271097)
@@ -19,11 +19,12 @@ arm/arm/bus_space-v6.c  standard
 arm/arm/mpcore_timer.c standard
 arm/freescale/fsl_ocotp.c  standard
 arm/freescale/imx/imx6_anatop.cstandard
-arm/freescale/imx/imx_common.c standard
 arm/freescale/imx/imx6_ccm.c   standard
+arm/freescale/imx/imx6_iomux.c standard
 arm/freescale/imx/imx6_machdep.c   standard
 arm/freescale/imx/imx6_mp.coptional smp
 arm/freescale/imx/imx6_pl310.c standard
+arm/freescale/imx/imx_common.c standard
 arm/freescale/imx/imx_machdep.cstandard
 arm/freescale/imx/imx_gpt.cstandard
 arm/freescale/imx/imx_gpio.c   optional gpio

Added: head/sys/arm/freescale/imx/imx6_iomux.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm/freescale/imx/imx6_iomux.c Thu Sep  4 14:25:32 2014
(r271097)
@@ -0,0 +1,189 @@
+/*-
+ * Copyright (c) 2014 Boris Samorodov 
+ * 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$
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include "imx6_iomuxreg.h"
+
+#defineIOMUX_WRITE(_sc, _r, _v) \
+   bus_write_4((_sc)->sc_res, (_r), (_v))
+#defineIOMUX_READ(_sc, _r) \
+   bus_read_4((_sc)->sc_res, (_r))
+#defineIOMUX_SET(_sc, _r, _m) \
+   IOMUX_WRITE((_sc), (_r), IOMUX_READ((_sc), (_r)) | (_m))
+#defineIOMUX_CLEAR(_sc, _r, _m) \
+   IOMUX_WRITE((_sc), (_r), IOMUX_READ((_sc), (_r)) & ~(_m))
+
+struct imx6_iomux_softc {
+   struct resource *sc_res;
+   device_t sc_dev;
+};
+
+static struct imx6_iomux_softc *iomuxsc = NULL;
+
+static struct resource_spec imx6_iomux_spec[] = {
+   { SYS_RES_MEMORY,   0,  RF_ACTIVE },
+   { SYS_RES_IRQ,  0,  RF_ACTIVE },
+   { -1, 0 }
+};
+
+static int
+imx6_iomux_probe(device_t dev)
+{
+   if (!ofw_bus_status_okay(dev))
+   return (ENXIO);
+
+   if (!ofw_bus_is_compatible(dev, "fsl,imx6-iomux"))
+   return (ENXIO);
+
+   device_set_desc(dev, "Freescale i.MX6 IO pins multiplexor");
+   return (BUS_PROBE_DEFAULT);
+
+}
+
+static int
+imx6_iomux_attach(device_t dev)
+{
+   struct imx6_iomux_softc * sc;
+
+   sc = device_get_softc(dev);
+
+   if (bus_alloc_resources(dev, imx6_iomux_spec, &sc->sc_res)) {
+   device_printf(dev, "could not allocate resources\n");
+   return (ENXIO);
+   }
+
+   iomuxsc = sc;
+
+   /*
+* XXX: place to fetch all info about pinmuxing from loader data
+* (FDT blob) and apply. Loader (1st one) must care about
+* device-to-device difference.
+*/
+
+   return (0);
+}
+
+static int
+imx6_iomux_detach

svn commit: r271098 - in head/sys: amd64/amd64 conf i386/i386 i386/include x86/x86

2014-09-04 Thread John Baldwin
Author: jhb
Date: Thu Sep  4 14:26:25 2014
New Revision: 271098
URL: http://svnweb.freebsd.org/changeset/base/271098

Log:
  Merge the amd64 and i386 identcpu.c into a single x86 implementation.
  This brings the structured extended features mask and VT-x reporting to
  i386 and Intel cache and TLB info (under bootverbose) to amd64.

Added:
  head/sys/x86/x86/identcpu.c
 - copied, changed from r271083, head/sys/amd64/amd64/identcpu.c
Deleted:
  head/sys/amd64/amd64/identcpu.c
  head/sys/i386/i386/identcpu.c
Modified:
  head/sys/conf/files.amd64
  head/sys/conf/files.i386
  head/sys/conf/files.pc98
  head/sys/i386/i386/initcpu.c
  head/sys/i386/include/md_var.h

Modified: head/sys/conf/files.amd64
==
--- head/sys/conf/files.amd64   Thu Sep  4 14:25:32 2014(r271097)
+++ head/sys/conf/files.amd64   Thu Sep  4 14:26:25 2014(r271098)
@@ -103,7 +103,6 @@ amd64/amd64/elf_machdep.c   standard
 amd64/amd64/exception.Sstandard
 amd64/amd64/fpu.c  standard
 amd64/amd64/gdb_machdep.c  optionalgdb
-amd64/amd64/identcpu.c standard
 amd64/amd64/in_cksum.c optionalinet | inet6
 amd64/amd64/initcpu.c  standard
 amd64/amd64/io.c   optionalio
@@ -542,6 +541,7 @@ x86/x86/busdma_bounce.c standard
 x86/x86/busdma_machdep.c   standard
 x86/x86/dump_machdep.c standard
 x86/x86/fdt_machdep.c  optionalfdt
+x86/x86/identcpu.c standard
 x86/x86/intr_machdep.c standard
 x86/x86/io_apic.c  standard
 x86/x86/legacy.c   standard

Modified: head/sys/conf/files.i386
==
--- head/sys/conf/files.i386Thu Sep  4 14:25:32 2014(r271097)
+++ head/sys/conf/files.i386Thu Sep  4 14:26:25 2014(r271098)
@@ -443,7 +443,6 @@ i386/xen/exception.soptional xen
 i386/i386/gdb_machdep.coptional gdb
 i386/i386/geode.c  optional cpu_geode
 i386/i386/i686_mem.c   optional mem
-i386/i386/identcpu.c   standard
 i386/i386/in_cksum.c   optional inet | inet6
 i386/i386/initcpu.cstandard
 i386/i386/io.c optional io
@@ -581,6 +580,7 @@ x86/x86/busdma_bounce.c standard
 x86/x86/busdma_machdep.c   standard
 x86/x86/dump_machdep.c standard
 x86/x86/fdt_machdep.c  optional fdt
+x86/x86/identcpu.c standard
 x86/x86/intr_machdep.c standard
 x86/x86/io_apic.c  optional apic
 x86/x86/legacy.c   optional native

Modified: head/sys/conf/files.pc98
==
--- head/sys/conf/files.pc98Thu Sep  4 14:25:32 2014(r271097)
+++ head/sys/conf/files.pc98Thu Sep  4 14:26:25 2014(r271098)
@@ -140,7 +140,6 @@ i386/i386/elf_machdep.c standard
 i386/i386/exception.s  standard
 i386/i386/gdb_machdep.coptional gdb
 i386/i386/i686_mem.c   optional mem
-i386/i386/identcpu.c   standard
 i386/i386/in_cksum.c   optional inet | inet6
 i386/i386/initcpu.cstandard
 i386/i386/io.c optional io
@@ -248,6 +247,7 @@ x86/pci/pci_bus.c   optional pci
 x86/x86/busdma_bounce.cstandard
 x86/x86/busdma_machdep.c   standard
 x86/x86/dump_machdep.c standard
+x86/x86/identcpu.c standard
 x86/x86/intr_machdep.c standard
 x86/x86/io_apic.c  optional apic
 x86/x86/legacy.c   standard

Modified: head/sys/i386/i386/initcpu.c
==
--- head/sys/i386/i386/initcpu.cThu Sep  4 14:25:32 2014
(r271097)
+++ head/sys/i386/i386/initcpu.cThu Sep  4 14:26:25 2014
(r271098)
@@ -95,6 +95,7 @@ u_int cpu_fxsr;   /* SSE enabled */
 u_int  cpu_mxcsr_mask; /* Valid bits in mxcsr */
 #endif
 u_int  cpu_clflush_line_size = 32;
+u_int  cpu_stdext_feature;
 u_int  cpu_mon_mwait_flags;/* MONITOR/MWAIT flags (CPUID.05H.ECX) */
 u_int  cpu_mon_min_size;   /* MONITOR minimum range size, bytes */
 u_int  cpu_mon_max_size;   /* MONITOR minimum range size, bytes */

Modified: head/sys/i386/include/md_var.h
==
--- head/sys/i386/include/md_var.h  Thu Sep  4 14:25:32 2014
(r271097)
+++ head/sys/i386/include/md_var.h  Thu Sep  4 14:26:25 2014
(r271098)
@@ -48,6 +48,7 @@ externu_int   amd_pminfo;
 extern u_int   via_feature_rng;
 extern u_int   via_feature_xcrypt;
 extern u_int   cpu_clflush_line_size;
+extern u_int   cpu_stdext_feature;
 extern u_int   cpu_fxsr;
 extern u_int   cpu_high;
 extern u_int   cpu_id;

Copied and

Re: svn commit: r270232 - head/tools/tools/vt/keymaps

2014-09-04 Thread Jan Beich
Stefan Esser  writes:

> Author: se
> Date: Wed Aug 20 17:07:41 2014
> New Revision: 270232
> URL: http://svnweb.freebsd.org/changeset/base/270232
>
> Log:
>   The conversion tools have been further improved and some erroneous
>   conversions have been detected and fixed.
[...]
>  sub local_to_UCS_code
>  {
>  my ($char) = @_;
>  
> -return prettyprint_token(ord(Encode::decode("UTF-8", 
> local_to_UCS_string($char;
> +my $ucs_char = ord(Encode::decode("UTF-8", local_to_UCS_string($char)));
> +
> +$current_char = lc(chr($ucs_char)), print("SETCUR: $ucs_char\n")
> + if $current_char eq "";

The script now emits |SETCUR: 123| lines that kbdcontrol(1) doesn't like.
Either removing debug |print| or adding STDERR seems to fix.

  $ perl tools/tools/vt/keymaps/convert-keymap.pl \
share/vt/keymaps/us.kbd ASCII >foo.kbd

  $ kbdcontrol -l ./foo.kbd http://www.vfemail.net
ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  
___
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: r271099 - head/sys/dev/xen/blkfront

2014-09-04 Thread Roger Pau Monné
Author: royger
Date: Thu Sep  4 14:56:24 2014
New Revision: 271099
URL: http://svnweb.freebsd.org/changeset/base/271099

Log:
  Revert r269814: blkfront: add support for unmapped IO
  
  Current busdma code for unmapped bios will not properly align the segment
  size, causing corruption on blkfront devices. Revert the commit until
  busdma code is fixed.
  
  Reported by:  mav
  MFC after:1 day

Modified:
  head/sys/dev/xen/blkfront/blkfront.c

Modified: head/sys/dev/xen/blkfront/blkfront.c
==
--- head/sys/dev/xen/blkfront/blkfront.cThu Sep  4 14:26:25 2014
(r271098)
+++ head/sys/dev/xen/blkfront/blkfront.cThu Sep  4 14:56:24 2014
(r271099)
@@ -272,12 +272,8 @@ xbd_queue_request(struct xbd_softc *sc, 
 {
int error;
 
-   if (cm->cm_bp != NULL)
-   error = bus_dmamap_load_bio(sc->xbd_io_dmat, cm->cm_map,
-   cm->cm_bp, xbd_queue_cb, cm, 0);
-   else
-   error = bus_dmamap_load(sc->xbd_io_dmat, cm->cm_map,
-   cm->cm_data, cm->cm_datalen, xbd_queue_cb, cm, 0);
+   error = bus_dmamap_load(sc->xbd_io_dmat, cm->cm_map, cm->cm_data,
+   cm->cm_datalen, xbd_queue_cb, cm, 0);
if (error == EINPROGRESS) {
/*
 * Maintain queuing order by freezing the queue.  The next
@@ -337,6 +333,8 @@ xbd_bio_command(struct xbd_softc *sc)
}
 
cm->cm_bp = bp;
+   cm->cm_data = bp->bio_data;
+   cm->cm_datalen = bp->bio_bcount;
cm->cm_sector_number = (blkif_sector_t)bp->bio_pblkno;
 
switch (bp->bio_cmd) {
@@ -995,7 +993,7 @@ xbd_instance_create(struct xbd_softc *sc
 
sc->xbd_disk->d_mediasize = sectors * sector_size;
sc->xbd_disk->d_maxsize = sc->xbd_max_request_size;
-   sc->xbd_disk->d_flags = DISKFLAG_UNMAPPED_BIO;
+   sc->xbd_disk->d_flags = 0;
if ((sc->xbd_flags & (XBDF_FLUSH|XBDF_BARRIER)) != 0) {
sc->xbd_disk->d_flags |= DISKFLAG_CANFLUSHCACHE;
device_printf(sc->xbd_dev,
___
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: r271100 - head/sys/arm/freescale/imx

2014-09-04 Thread Ian Lepore
Author: ian
Date: Thu Sep  4 14:57:04 2014
New Revision: 271100
URL: http://svnweb.freebsd.org/changeset/base/271100

Log:
  Implement the same public interface in imx51 and imx6 iomux; use the common
  header file for both.  Remove some unused code from imx51_iomux.  The iomux
  drivers are required, not optional, adjust the files.* entries accordingly.

Deleted:
  head/sys/arm/freescale/imx/imx51_iomuxvar.h
Modified:
  head/sys/arm/freescale/imx/files.imx51
  head/sys/arm/freescale/imx/files.imx53
  head/sys/arm/freescale/imx/files.imx6
  head/sys/arm/freescale/imx/imx51_iomux.c

Modified: head/sys/arm/freescale/imx/files.imx51
==
--- head/sys/arm/freescale/imx/files.imx51  Thu Sep  4 14:56:24 2014
(r271099)
+++ head/sys/arm/freescale/imx/files.imx51  Thu Sep  4 14:57:04 2014
(r271100)
@@ -19,7 +19,7 @@ arm/arm/bus_space-v6.cstandard
 arm/freescale/imx/tzic.c   standard
 
 # IOMUX - external pins multiplexor
-arm/freescale/imx/imx51_iomux.coptional iomux
+arm/freescale/imx/imx51_iomux.cstandard
 
 # GPIO
 arm/freescale/imx/imx_gpio.c   optional gpio

Modified: head/sys/arm/freescale/imx/files.imx53
==
--- head/sys/arm/freescale/imx/files.imx53  Thu Sep  4 14:56:24 2014
(r271099)
+++ head/sys/arm/freescale/imx/files.imx53  Thu Sep  4 14:57:04 2014
(r271100)
@@ -22,7 +22,7 @@ dev/uart/uart_dev_imx.c   optional uart
 arm/freescale/imx/tzic.c   standard
 
 # IOMUX - external pins multiplexor
-arm/freescale/imx/imx51_iomux.coptional iomux
+arm/freescale/imx/imx51_iomux.cstandard
 
 # GPIO
 arm/freescale/imx/imx_gpio.c   optional gpio

Modified: head/sys/arm/freescale/imx/files.imx6
==
--- head/sys/arm/freescale/imx/files.imx6   Thu Sep  4 14:56:24 2014
(r271099)
+++ head/sys/arm/freescale/imx/files.imx6   Thu Sep  4 14:57:04 2014
(r271100)
@@ -52,6 +52,4 @@ arm/freescale/imx/imx6_usbphy.c   optiona
 #
 # Not ready yet...
 #
-#arm/freescale/imx/imx51_iomux.c   optional iomux
-#dev/ata/chipsets/ata-fsl.coptional imxata
 #arm/freescale/imx/imx51_ipuv3.c   optional sc

Modified: head/sys/arm/freescale/imx/imx51_iomux.c
==
--- head/sys/arm/freescale/imx/imx51_iomux.cThu Sep  4 14:56:24 2014
(r271099)
+++ head/sys/arm/freescale/imx/imx51_iomux.cThu Sep  4 14:57:04 2014
(r271100)
@@ -75,8 +75,7 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #include 
-#include 
-#include 
+#include "imx51_iomuxreg.h"
 
 
 #defineIOMUX_WRITE(_sc, _r, _v)
\
@@ -177,45 +176,23 @@ iomux_set_pad(unsigned int pin, unsigned
iomux_set_pad_sub(iomuxsc, pin, config);
 }
 
-#ifdef notyet
-void
-iomux_set_input(unsigned int input, unsigned int config)
+static uint32_t
+iomux_get_pad_config_sub(struct iomux_softc *sc, uint32_t pin)
 {
-   bus_size_t input_ctl_reg = input;
-
-   bus_space_write_4(iomuxsc->iomux_memt, iomuxsc->iomux_memh,
-   input_ctl_reg, config);
-}
-#endif
+   bus_size_t pad_reg = IOMUX_PIN_TO_PAD_ADDRESS(pin);
+   uint32_t result;
 
-void
-iomux_mux_config(const struct iomux_conf *conflist)
-{
-   int i;
+   result = IOMUX_READ(sc, pad_reg);
 
-   if (iomuxsc == NULL)
-   return;
-   for (i = 0; conflist[i].pin != IOMUX_CONF_EOT; i++) {
-   iomux_set_pad_sub(iomuxsc, conflist[i].pin, conflist[i].pad);
-   iomux_set_function_sub(iomuxsc, conflist[i].pin,
-   conflist[i].mux);
-   }
+   return(result);
 }
 
-#ifdef notyet
-void
-iomux_input_config(const struct iomux_input_conf *conflist)
+unsigned int
+iomux_get_pad_config(unsigned int pin)
 {
-   int i;
 
-   if (iomuxsc == NULL)
-   return;
-   for (i = 0; conflist[i].inout != -1; i++) {
-   iomux_set_inout(iomuxsc, conflist[i].inout,
-   conflist[i].inout_mode);
-   }
+   return(iomux_get_pad_config_sub(iomuxsc, pin));
 }
-#endif
 
 uint32_t
 imx_iomux_gpr_get(u_int regnum)
@@ -268,5 +245,5 @@ static driver_t imx_iomux_driver = {
 static devclass_t imx_iomux_devclass;
 
 EARLY_DRIVER_MODULE(imx_iomux, simplebus, imx_iomux_driver,
-imx_iomux_devclass, 0, 0, BUS_PASS_BUS - 1);
+imx_iomux_devclass, 0, 0, BUS_PASS_CPU + BUS_PASS_ORDER_LATE);
 
___
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: r269814 - head/sys/dev/xen/blkfront

2014-09-04 Thread Roger Pau Monné
El 03/09/14 a les 18.03, Alexander Motin ha escrit:
> On 03.09.2014 18:48, Roger Pau Monné wrote:
>> El 02/09/14 a les 19.18, John-Mark Gurney ha escrit:
>>> Roger Pau Monn wrote this message on Tue, Sep 02, 2014 at 11:30 +0200:
 El 29/08/14 a les 19.52, Roger Pau Monné ha escrit:
> El 28/08/14 a les 20.58, Alexander Motin ha escrit:
>> On 28.08.2014 21:45, John-Mark Gurney wrote:
>>> Alexander Motin wrote this message on Thu, Aug 28, 2014 at 21:23 +0300:
 Hi, Roger.

 It looks to me like this commit does not work as it should. I got
 problem when I just tried `newfs /dev/ada0 ; mount /dev/ada0 /mnt`.
 Somehow newfs does not produce valid filesystem. Problem is reliably
 repeatable and reverting this commit fixes it.

 I found at least one possible cause there: If original data buffer is
 unmapped, misaligned and not physically contiguous, then present x86
 bus_dmamap_load_bio() implementation will process each physically
 contiguous segment separately. Due to the misalignment first and last
 physical segments may have size not multiple to 512 bytes. Since each
 segment processed separately, they are not joined together, and
 xbd_queue_cb() is getting segments not multiple to 512 bytes. Attempt 
 to
 convert them to exact number of sectors in the driver cause data 
 corruption.
>>>
>>> Are you sure this isn't a problem w/ the tag not properly specifying
>>> the correct alignement? 
>>
>> I don't know how to specify it stronger then this:
>> error = bus_dma_tag_create(
>> bus_get_dma_tag(sc->xbd_dev),   /* parent */
>> 512, PAGE_SIZE, /* algnmnt, boundary */
>> BUS_SPACE_MAXADDR,  /* lowaddr */
>> BUS_SPACE_MAXADDR,  /* highaddr */
>> NULL, NULL, /* filter, filterarg */
>> sc->xbd_max_request_size,
>> sc->xbd_max_request_segments,
>> PAGE_SIZE,  /* maxsegsize */
>> BUS_DMA_ALLOCNOW,   /* flags */
>> busdma_lock_mutex,  /* lockfunc */
>> &sc->xbd_io_lock,   /* lockarg */
>> &sc->xbd_io_dmat);
>>
>>> Also, I don't think there is a way for busdma
>>> to say that you MUST have a segment be a multiple of 512, though you
>>> could use a 512 boundary, but that would force all segments to only be
>>> 512 bytes...
>>
>> As I understand, that is mandatory requirement for this "hardware".
>> Alike 4K alignment requirement also exist at least for SDHCI, and IIRC
>> UHCI/OHCI hardware. Even AHCI requires both segment addresses and
>> lengths to be even.
>>
>> I may be wrong, but I think it is quite likely that hardware that
>> requires segment address alignment quite likely will have the same
>> requirements for segments length.

 Hello,

 I have the following fix, which makes sure the total length and the 
 size of each segment is aligned. I'm not very knowledgeable of the 
 busdma code, so someone has to review it.
>>>
>>> I feel that this alignment should only be enforced via a new option on
>>> the tag...  I don't see how alignment and segment size should be
>>> conflated...  I could totally see a device that requires an alignement
>>> of 8 bytes, but has a segment size of 16, or vice versa, and requiring
>>> them to be the same means we will bounce unnecesarily...
>>>
>>> cc'd scottl since he knows this code better than I... and cperciva as
>>> he touched it for similar reasons..
>>>
>>> Oh, I just found PR 152818, where cperciva did a similar fix to
>>> bounce_bus_dmamap_load_buffer for the exact same reason...  It was
>>> committed in r216194...
>>
>> Since Xen blkfront seems to be the only driver to have such segment 
>> size requirements, 
> 
> No, it is not. I've already posted other examples I can recall: SDHCI,
> UHCI/OHCI and AHCI. Their limitations are different and less strict, but
> still may need handling. For SDHCI, since it is quite slow and has many
> other bugs, I practically implemented custom buffer bouncing. AHCI I
> suppose works only because limitation is only for even addresses, and
> odd ones happen extremely rarely (does not happen). For USB I am not
> sure, but at least umass driver does not support unmapped I/O.
> 
>> it might be best to just fix blkfront to always 
>> roundup segment size to 512, like the following:
> 
> I think some coffee is needed here. ;) Rounding addresses won't make
> data properly aligned. Some copy is unavoidable in such cases. It would
> be good if it was done properly by default buffer bouncer.

I've just reverted the commit, will look into fixing busdma when I'm
ba

svn commit: r271101 - head/sys/arm/conf

2014-09-04 Thread Ian Lepore
Author: ian
Date: Thu Sep  4 14:59:27 2014
New Revision: 271101
URL: http://svnweb.freebsd.org/changeset/base/271101

Log:
  The iomux driver is no longer optional, all imx platforms have it as
  standard now, so remove it from kernel configs.

Modified:
  head/sys/arm/conf/DIGI-CCWMX53
  head/sys/arm/conf/EFIKA_MX
  head/sys/arm/conf/IMX53-QSB
  head/sys/arm/conf/IMX6

Modified: head/sys/arm/conf/DIGI-CCWMX53
==
--- head/sys/arm/conf/DIGI-CCWMX53  Thu Sep  4 14:57:04 2014
(r271100)
+++ head/sys/arm/conf/DIGI-CCWMX53  Thu Sep  4 14:59:27 2014
(r271101)
@@ -120,8 +120,6 @@ device  atapci  # Only for 
helper funct
 device imxata
 optionsATA_STATIC_ID   # Static device numbering
 
-device iomux   # IO Multiplexor
-
 device gpio
 device gpioled
 

Modified: head/sys/arm/conf/EFIKA_MX
==
--- head/sys/arm/conf/EFIKA_MX  Thu Sep  4 14:57:04 2014(r271100)
+++ head/sys/arm/conf/EFIKA_MX  Thu Sep  4 14:59:27 2014(r271101)
@@ -116,8 +116,6 @@ device  atapci  # Only for 
helper funct
 device imxata
 optionsATA_STATIC_ID   # Static device numbering
 
-device iomux   # IO Multiplexor
-
 device gpio
 device gpioled
 

Modified: head/sys/arm/conf/IMX53-QSB
==
--- head/sys/arm/conf/IMX53-QSB Thu Sep  4 14:57:04 2014(r271100)
+++ head/sys/arm/conf/IMX53-QSB Thu Sep  4 14:59:27 2014(r271101)
@@ -119,8 +119,6 @@ options ALT_BREAK_TO_DEBUGGER
 #deviceimxata
 #options   ATA_STATIC_ID   # Static device numbering
 
-device iomux   # IO Multiplexor
-
 device gpio
 device gpioled
 

Modified: head/sys/arm/conf/IMX6
==
--- head/sys/arm/conf/IMX6  Thu Sep  4 14:57:04 2014(r271100)
+++ head/sys/arm/conf/IMX6  Thu Sep  4 14:59:27 2014(r271101)
@@ -80,7 +80,6 @@ devicemd  # Memory "disks"
 device ether   # Ethernet support
 device miibus  # Required for ethernet
 device bpf # Berkeley packet filter (required for 
DHCP)
-#deviceiomux   # IO Multiplexor
 
 # General-purpose input/output
 device gpio
___
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: r271102 - head/sys/arm/freescale/imx

2014-09-04 Thread Ian Lepore
Author: ian
Date: Thu Sep  4 15:11:57 2014
New Revision: 271102
URL: http://svnweb.freebsd.org/changeset/base/271102

Log:
  Implement the imx_iomux_get/set_gpr() interface for imx6.

Modified:
  head/sys/arm/freescale/imx/imx6_iomux.c

Modified: head/sys/arm/freescale/imx/imx6_iomux.c
==
--- head/sys/arm/freescale/imx/imx6_iomux.c Thu Sep  4 14:59:27 2014
(r271101)
+++ head/sys/arm/freescale/imx/imx6_iomux.c Thu Sep  4 15:11:57 2014
(r271102)
@@ -166,6 +166,42 @@ iomux_get_pad_config(unsigned int pin)
return(iomux_get_pad_config_sub(iomuxsc, pin));
 }
 
+
+uint32_t
+imx_iomux_gpr_get(u_int regnum)
+{
+
+   KASSERT(iomuxsc != NULL, ("imx_iomux_gpr_get() called before attach"));
+   KASSERT(regnum >= 0 && regnum <= 13, 
+   ("imx_iomux_gpr_get bad regnum %u", regnum));
+   return (IOMUX_READ(iomuxsc, IOMUXC_GPR0 + regnum));
+}
+
+void
+imx_iomux_gpr_set(u_int regnum, uint32_t val)
+{
+
+   KASSERT(iomuxsc != NULL, ("imx_iomux_gpr_set() called before attach"));
+   KASSERT(regnum >= 0 && regnum <= 13, 
+   ("imx_iomux_gpr_set bad regnum %u", regnum));
+   IOMUX_WRITE(iomuxsc, IOMUXC_GPR0 + regnum, val);
+}
+
+void
+imx_iomux_gpr_set_masked(u_int regnum, uint32_t clrbits, uint32_t setbits)
+{
+   uint32_t val;
+
+   KASSERT(iomuxsc != NULL, 
+   ("imx_iomux_gpr_set_masked called before attach"));
+   KASSERT(regnum >= 0 && regnum <= 13, 
+   ("imx_iomux_gpr_set_masked bad regnum %u", regnum));
+
+   val = IOMUX_READ(iomuxsc, IOMUXC_GPR0 + regnum);
+   val = (val & ~clrbits) | setbits;
+   IOMUX_WRITE(iomuxsc, IOMUXC_GPR0 + regnum, val);
+}
+
 static device_method_t imx6_iomux_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, imx6_iomux_probe),
___
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: r270759 - in head/sys: cddl/compat/opensolaris/kern cddl/compat/opensolaris/sys cddl/contrib/opensolaris/uts/common/fs/zfs vm

2014-09-04 Thread Nikolai Lifanov
On 09/03/14 21:18, Steven Hartland wrote:
> 
> - Original Message - From: "Andriy Gapon" 
> 
> 
>> on 03/09/2014 23:22 Nikolai Lifanov said the following:
>>> On 09/03/14 15:22, John Baldwin wrote:
 On Wednesday, September 03, 2014 11:05:04 AM Nikolai Lifanov wrote:
> On 09/03/14 04:09, Steven Hartland wrote:
>> I'm looking to MFC this change so wanted to check if
>> anyone had an final feedback / objections?
>>
>> I know we currently have Alan's feedback on changing
>> the #ifdef __i386__ to #ifndef UMA_MD_SMALL_ALLOC
>> which sounds sensible but waiting Peter to comment on.
>>
>>Regards
>>Steve
>
> I have no technical input, but this change improves ARC usefulness for
> me quite a bit. I would like to see the improvement in 10-STABLE.

 Can you verify that the current 10-STABLE (as of today) with all the
 various pagedaemon fixes still has ARC issues for your workload?

>>>
>>> It doesn't have any issues, but I noticed the improvement on CURRENT. I
>>> observed that just after this change, my package builder is much more
>>> likely to retain MFU and not evict useful things from there (the port
>>> tree) after large builds.
>>> However, I run a lot more 10.0-RELEASE than CURRENT and I would like to
>>> see this improvement release-bound.
>>>
>>> I would be happy to test this on 10-STABLE if you think that this is
>>> relevant.
>>
>>
>> As noted before, unfortunately, this commit (plus its fixups) contains
>> at least
>> two related but distinct changes.  So, to separate the wheat from the
>> chaff,
>> could you please try to comment out the following block in
>> sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c, function
>> arc_reclaim_needed:
>>
>>if (kmem_free_count() < zfs_arc_free_target) {
>>DTRACE_PROBE2(arc__reclaim_freetarget, uint64_t,
>>kmem_free_count(), uint64_t, zfs_arc_free_target);
>>return (1);
>>}
>>
>> Alternatively, I think that the same effect can be achieved by setting
>> sysctl
>> vfs.zfs.arc_free_target to the same value as vm.stats.vm.v_free_min.
> 
> Thats correct that would achieve the same thing.
> 
>> It's interesting to me whether you would still see the better
>> performance or if
>> that improvement would be undone.
> 
> Indeed that would be interesting, but we might find that its quite
> memory size
> dependent given the scaling so confirming HW details would be nice too.
> 
> I'd also be interested to know who wins the free race between the VM and
> ARC
> when using that value.
> 
> For those following this thread but not the review, I've added some
> additional
> information there which you might be interested in:
> https://reviews.freebsd.org/D702
> 
>Regards
>Steve

Just an update: I'm in the middle of testing this. I have to finish a
large bulk build to observe the behavior one way or another.

I have 32G of physical memory and 2x16G dedicated swap SSDs (L2ARC
wasn't very useful, but I should probably retest this) on this machine.
My ARC is usually at 14G with ~5G of MFU full of things I benefit from
keeping there (port trees, base jails). Builds themselves happen in
tmpfs and I usually have around 1.5G - 4G "Free" memory (unless building
something like pypy).

- Nikolai Lifanov
___
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: r271076 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98

2014-09-04 Thread John Baldwin
On Wednesday, September 03, 2014 07:37:21 PM Don Lewis wrote:
> On  4 Sep, John Baldwin wrote:
> > Author: jhb
> > Date: Thu Sep  4 01:46:06 2014
> > New Revision: 271076
> > URL: http://svnweb.freebsd.org/changeset/base/271076
> > 
> > Log:
> >   - Move the declaration of has_f00f_hack out of identcpu.c to machdep.c.
> 
> That certainly brings back memories ...

Hopefully not too traumatic. :-P

-- 
John Baldwin
___
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: r271082 - in head/sys: i386/i386 x86/x86

2014-09-04 Thread John Baldwin
On Thursday, September 04, 2014 02:26:00 AM John Baldwin wrote:
> Author: jhb
> Date: Thu Sep  4 02:25:59 2014
> New Revision: 271082
> URL: http://svnweb.freebsd.org/changeset/base/271082
> 
> Log:
>   - Move blacklists of broken TSCs out of the printcpuinfo() function
> and into the TSC probe routine.

I believe the previous code that set tsc_freq to 0 didn't fully work since
the ticker was still set to use the TSC in init_TC().

-- 
John Baldwin
___
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: r271085 - head/lib/libgeom

2014-09-04 Thread John Baldwin
On Thursday, September 04, 2014 03:31:49 AM Benno Rice wrote:
> Author: benno
> Date: Thu Sep  4 03:31:48 2014
> New Revision: 271085
> URL: http://svnweb.freebsd.org/changeset/base/271085
> 
> Log:
>   Systems with lots of geom providers can end up with a kern.geom.confxml
>   value too large for the buffer allocated. Work around this by retrying
>   a few times with larger buffer sizes.

Are these systems having lots of changes to the GEOM tree while the sysctl 
handler is being invoked?  If the tree is static, the first call with an old 
of NULL should return the correct length in 'l' regardless of the size as it 
generates the entire buffer and SYSCTL_OUT's it.  (It doesn't do it piecemeal 
and fail on ENOMEM part way through the way some other broken sysctl handlers 
do.)

-- 
John Baldwin
___
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: r271076 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98

2014-09-04 Thread Don Lewis
On  4 Sep, John Baldwin wrote:
> On Wednesday, September 03, 2014 07:37:21 PM Don Lewis wrote:
>> On  4 Sep, John Baldwin wrote:
>> > Author: jhb
>> > Date: Thu Sep  4 01:46:06 2014
>> > New Revision: 271076
>> > URL: http://svnweb.freebsd.org/changeset/base/271076
>> > 
>> > Log:
>> >   - Move the declaration of has_f00f_hack out of identcpu.c to machdep.c.
>> 
>> That certainly brings back memories ...
> 
> Hopefully not too traumatic. :-P

Not really.  I remember the general sense of panic when the
vulnerability was announced and then the sense of relief when the
workaround was found.  After that, I got lots of reminders because
of the boot message.

I've still got the old hardware and am often tempted to see if it will
run a recent version of FreeBSD.  I don't think I want to know how long
it would take to run buildworld post-clang.

___
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: r271085 - head/lib/libgeom

2014-09-04 Thread Benno Rice
On Sep 4, 2014, at 6:51 AM, John Baldwin  wrote:

> On Thursday, September 04, 2014 03:31:49 AM Benno Rice wrote:
>> Author: benno
>> Date: Thu Sep  4 03:31:48 2014
>> New Revision: 271085
>> URL: http://svnweb.freebsd.org/changeset/base/271085
>> 
>> Log:
>>  Systems with lots of geom providers can end up with a kern.geom.confxml
>>  value too large for the buffer allocated. Work around this by retrying
>>  a few times with larger buffer sizes.
> 
> Are these systems having lots of changes to the GEOM tree while the sysctl 
> handler is being invoked?  If the tree is static, the first call with an old 
> of NULL should return the correct length in 'l' regardless of the size as it 
> generates the entire buffer and SYSCTL_OUT's it.  (It doesn't do it piecemeal 
> and fail on ENOMEM part way through the way some other broken sysctl handlers 
> do.)

These systems have a lot of drives in them and around the time when we’re 
trying to enumerate there can be lots of activity. In the case where the tree 
hasn’t changed we’re not doing that much extra work here and it saves us having 
to retry everything that happens around the geom_getxml calls inside libgeom 
when the tree does change.
___
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: r271104 - head/sys/arm/at91

2014-09-04 Thread Warner Losh
Author: imp
Date: Thu Sep  4 16:40:54 2014
New Revision: 271104
URL: http://svnweb.freebsd.org/changeset/base/271104

Log:
  Wrap some long lines.

Modified:
  head/sys/arm/at91/at91_pinctrl.c

Modified: head/sys/arm/at91/at91_pinctrl.c
==
--- head/sys/arm/at91/at91_pinctrl.cThu Sep  4 16:05:12 2014
(r271103)
+++ head/sys/arm/at91/at91_pinctrl.cThu Sep  4 16:40:54 2014
(r271104)
@@ -138,8 +138,8 @@ at91_pinctrl_setup_dinfo(device_t dev, p
}
if (OF_searchencprop(OF_node_from_xref(iparent), 
"#interrupt-cells", &icells, sizeof(icells)) == -1) {
-   device_printf(dev, "Missing #interrupt-cells property, "
-   "assuming <1>\n");
+   device_printf(dev, "Missing #interrupt-cells property,"
+   " assuming <1>\n");
icells = 1;
}
if (icells < 1 || icells > nintr) {
@@ -388,19 +388,22 @@ pinctrl_walk_tree(device_t bus, phandle_
OF_getprop(node, "status", status, sizeof(status));
OF_getprop(node, "name", name, sizeof(name));
if (strcmp(status, "okay") != 0) {
-// printf("pinctrl: omitting node %s since it isn't 
active\n", name);
+// printf("pinctrl: skipping node %s status %s\n", name,
+// status);
continue;
}
len = OF_getencprop(node, "pinctrl-0", pinctrl, 
sizeof(pinctrl));
if (len <= 0) {
-// printf("pinctrl: no pinctrl-0 property for node %s, 
omitting\n", name);
+// printf("pinctrl: skipping node %s no pinctrl-0\n",
+// name, status);
continue;
}
len /= sizeof(phandle_t);
printf("pinctrl: Found active node %s\n", name);
for (i = 0; i < len; i++) {
scratch = OF_node_from_xref(pinctrl[i]);
-   npins = OF_getencprop(scratch, "atmel,pins", pins, 
sizeof(pins));
+   npins = OF_getencprop(scratch, "atmel,pins", pins,
+   sizeof(pins));
if (npins <= 0) {
printf("We're doing it wrong %s\n", name);
continue;
@@ -408,29 +411,40 @@ pinctrl_walk_tree(device_t bus, phandle_
memset(name, 0, sizeof(name));
OF_getprop(scratch, "name", name, sizeof(name));
npins /= (4 * 4);
-   printf("> need to cope with %d more pins for %s\n", 
npins, name);
+   printf("> need to cope with %d more pins for %s\n",
+   npins, name);
for (j = 0; j < npins; j++) {
uint32_t unit = pins[j * 4];
uint32_t pin = pins[j * 4 + 1];
uint32_t periph = pins[j * 4 + 2];
uint32_t flags = pins[j * 4 + 3];
-   uint32_t pio = (0xfff & sc->ranges[0].bus) 
+ 0x200 * unit;
-   printf("P%c%d %s %#x\n", unit + 'A', pin, 
periphs[periph],
-  flags);
+   uint32_t pio;
+
+   pio = (0xfff & sc->ranges[0].bus) +
+   0x200 * unit;
+   printf("P%c%d %s %#x\n", unit + 'A', pin,
+   periphs[periph], flags);
switch (periph) {
case 0:
at91_pio_use_gpio(pio, 1u << pin);
-   at91_pio_gpio_pullup(pio, 1u << pin, 
!!(flags & 1));
-   at91_pio_gpio_high_z(pio, 1u << pin, 
!!(flags & 2));
-   at91_pio_gpio_set_deglitch(pio, 1u << 
pin, !!(flags & 4));
-   // at91_pio_gpio_pulldown(pio, 1u << 
pin, !!(flags & 8));
-   // at91_pio_gpio_dis_schmidt(pio, 1u << 
pin, !!(flags & 16));
+   at91_pio_gpio_pullup(pio, 1u << pin,
+   !!(flags & 1));
+   at91_pio_gpio_high_z(pio, 1u << pin,
+   !!(flags & 2));
+   at91_pio_gpio_set_deglitch(pio,
+   1u << pin, !!(flags & 4));
+// at91_pio_gpio_pulldown(pio, 1u << pin,
+//   

Re: svn commit: r271076 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98

2014-09-04 Thread Alexey Dokuchaev
On Thu, Sep 04, 2014 at 09:22:48AM -0700, Don Lewis wrote:
> I've still got the old hardware and am often tempted to see if it will
> run a recent version of FreeBSD.  I don't think I want to know how long
> it would take to run buildworld post-clang.

My router machine at home is Mendocino-based, runs 9-STABLE flawlessly, not
sure how long does it take to do buildworld (I don't disable Clang).

I have a couple of P55-based mobos, but never bothered to install our fresh
-CURRENT on them.  I guess I should, just to see if we still rock. ;-)

./danfe
___
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: r271107 - head/sys/netinet

2014-09-04 Thread Gleb Smirnoff
Author: glebius
Date: Thu Sep  4 17:05:57 2014
New Revision: 271107
URL: http://svnweb.freebsd.org/changeset/base/271107

Log:
  Fixes for tcp_respond() comment.

Modified:
  head/sys/netinet/tcp_subr.c

Modified: head/sys/netinet/tcp_subr.c
==
--- head/sys/netinet/tcp_subr.c Thu Sep  4 16:55:01 2014(r271106)
+++ head/sys/netinet/tcp_subr.c Thu Sep  4 17:05:57 2014(r271107)
@@ -539,16 +539,16 @@ tcpip_maketemplate(struct inpcb *inp)
 /*
  * Send a single message to the TCP at address specified by
  * the given TCP/IP header.  If m == NULL, then we make a copy
- * of the tcpiphdr at ti and send directly to the addressed host.
+ * of the tcpiphdr at th and send directly to the addressed host.
  * This is used to force keep alive messages out using the TCP
  * template for a connection.  If flags are given then we send
- * a message back to the TCP which originated the * segment ti,
+ * a message back to the TCP which originated the segment th,
  * and discard the mbuf containing it and any other attached mbufs.
  *
  * In any case the ack and sequence number of the transmitted
  * segment are as specified by the parameters.
  *
- * NOTE: If m != NULL, then ti must point to *inside* the mbuf.
+ * NOTE: If m != NULL, then th must point to *inside* the mbuf.
  */
 void
 tcp_respond(struct tcpcb *tp, void *ipgen, struct tcphdr *th, struct mbuf *m,
___
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: r270999 - head/sys/kern

2014-09-04 Thread John-Mark Gurney
Gleb Smirnoff wrote this message on Thu, Sep 04, 2014 at 13:18 +0400:
> On Wed, Sep 03, 2014 at 12:10:28PM -0700, John-Mark Gurney wrote:
> J> > M> > +   if (p->p_pptr) {
> J> > M> > kp->ki_ppid = proc_realparent(p)->p_pid;
> J> > M> > -   if (p->p_flag & P_TRACED)
> J> > M> > -   kp->ki_tracer = p->p_pptr->p_pid;
> J> > M> > +   if (p->p_flag & P_TRACED)
> J> > M> > +   kp->ki_tracer = p->p_pptr->p_pid;
> J> > M> > +   }
> J> > M> >  }
> J> > M> >  
> J> > M> >  /*
> J> > M> > 
> J> > M> 
> J> > M> p_pptr must be non-NULL if P_TRACED is set. If there is no way to
> J> > M> annotate it for coverity, this change deserves a comment in the code
> J> > M> (and in retrospect previous code should have had appropriate comment 
> as
> J> > M> well).
> J> > 
> J> > Thanks for explanation.
> J> > 
> J> > I'd suggest to leave the change in, since now it is a 
> micro-micro-optimization :)
> J> 
> J> If you must leave it in, then at least compare the pointer against
> J> NULL, and collapse two if statements into one...
> J> 
> J> We should never introduce new pointer checks that aren't against NULL...
> 
> I don't see how two if statements can be collapsed? We need to assign
> ki_ppid regardless of P_TRACED flag.

Sorry, misread the diff, you are correct...

-- 
  John-Mark Gurney  Voice: +1 415 225 5579

 "All that I will do, has been done, All that I have, has not."
___
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: r271108 - head/tools/tools/vt/keymaps

2014-09-04 Thread Stefan Esser
Author: se
Date: Thu Sep  4 17:19:16 2014
New Revision: 271108
URL: http://svnweb.freebsd.org/changeset/base/271108

Log:
  Fix debug output that has erroneously been committed with the last update.
  
  Obtained from:Jan Beich
  MFC after:3 days

Modified:
  head/tools/tools/vt/keymaps/convert-keymap.pl

Modified: head/tools/tools/vt/keymaps/convert-keymap.pl
==
--- head/tools/tools/vt/keymaps/convert-keymap.pl   Thu Sep  4 17:05:57 
2014(r271107)
+++ head/tools/tools/vt/keymaps/convert-keymap.pl   Thu Sep  4 17:19:16 
2014(r271108)
@@ -51,7 +51,7 @@ sub local_to_UCS_code
 
 my $ucs_char = ord(Encode::decode("UTF-8", local_to_UCS_string($char)));
 
-$current_char = lc(chr($ucs_char)), print("SETCUR: $ucs_char\n")
+$current_char = lc(chr($ucs_char))
if $current_char eq "";
 
 $ucs_char = 0x20ac # replace with Euro character
___
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: r271076 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98

2014-09-04 Thread John-Mark Gurney
Don Lewis wrote this message on Thu, Sep 04, 2014 at 09:22 -0700:
> On  4 Sep, John Baldwin wrote:
> > On Wednesday, September 03, 2014 07:37:21 PM Don Lewis wrote:
> >> On  4 Sep, John Baldwin wrote:
> >> > Author: jhb
> >> > Date: Thu Sep  4 01:46:06 2014
> >> > New Revision: 271076
> >> > URL: http://svnweb.freebsd.org/changeset/base/271076
> >> > 
> >> > Log:
> >> >   - Move the declaration of has_f00f_hack out of identcpu.c to machdep.c.
> >> 
> >> That certainly brings back memories ...
> > 
> > Hopefully not too traumatic. :-P
> 
> Not really.  I remember the general sense of panic when the
> vulnerability was announced and then the sense of relief when the
> workaround was found.  After that, I got lots of reminders because
> of the boot message.
> 
> I've still got the old hardware and am often tempted to see if it will
> run a recent version of FreeBSD.  I don't think I want to know how long
> it would take to run buildworld post-clang.

Almost as old:
FreeBSD 11.0-CURRENT #0 r266964:267061M: Wed Jun 11 15:35:27 PDT 2014
j...@carbon.funkthat.com:/usr/obj/i386.i386/usr/src/sys/serbox i386
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
CPU: AMD-K6tm w/ multimedia extensions (200.46-MHz 586-class CPU)
  Origin="AuthenticAMD"  Id=0x562  Family=0x5  Model=0x6  Stepping=2
  Features=0x8001bf
  AMD Features=0x400<>
 
Works great... :)

Though I'll admit I didn't buildworld on this, but another newer 
machine and then dd'd an image onto a CF card..

-- 
  John-Mark Gurney  Voice: +1 415 225 5579

 "All that I will do, has been done, All that I have, has not."
___
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: r270232 - head/tools/tools/vt/keymaps

2014-09-04 Thread Stefan Esser
Am 04.09.2014 um 16:52 schrieb Jan Beich:
> Stefan Esser  writes:
> 
>> Author: se
>> Date: Wed Aug 20 17:07:41 2014
>> New Revision: 270232
>> URL: http://svnweb.freebsd.org/changeset/base/270232
>>
>> Log:
>>   The conversion tools have been further improved and some erroneous
>>   conversions have been detected and fixed.
> [...]
>>  sub local_to_UCS_code
>>  {
>>  my ($char) = @_;
>>  
>> -return prettyprint_token(ord(Encode::decode("UTF-8", 
>> local_to_UCS_string($char;
>> +my $ucs_char = ord(Encode::decode("UTF-8", local_to_UCS_string($char)));
>> +
>> +$current_char = lc(chr($ucs_char)), print("SETCUR: $ucs_char\n")
>> +if $current_char eq "";
> 
> The script now emits |SETCUR: 123| lines that kbdcontrol(1) doesn't like.
> Either removing debug |print| or adding STDERR seems to fix.

Hi Jan,

this is (obviously) a left-over from some tests, which I have now
removed again.

Thanks for reporting!

Best regards, STefan
___
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: r271076 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98

2014-09-04 Thread Don Lewis
On  4 Sep, Alexey Dokuchaev wrote:
> On Thu, Sep 04, 2014 at 09:22:48AM -0700, Don Lewis wrote:
>> I've still got the old hardware and am often tempted to see if it will
>> run a recent version of FreeBSD.  I don't think I want to know how long
>> it would take to run buildworld post-clang.
> 
> My router machine at home is Mendocino-based, runs 9-STABLE flawlessly, not
> sure how long does it take to do buildworld (I don't disable Clang).

My first home machine had a Pentium II CPU.  I've got a fair amount of
retired Pentium III hardware around still, mostly socket 370 (both
Coppermine and Tualatin), but there might be some slot 1 stuff as well.
My firewall is still running on a Via C3 CPU in a socket 370, but I
don't run buildworld on it.  I just use PXE to reinstall for upgrades.

> I have a couple of P55-based mobos, but never bothered to install our fresh
> -CURRENT on them.  I guess I should, just to see if we still rock. ;-)

RAM size is the probably the biggest issue.  Also, I think all of my
boards use the Dallas RTC chip with builtin battery.  These boards are
approaching twenty years old and Li battery shelf life is only about ten
years.  Unfortunately this chip is soldered to the motherboard, which
makes either the chip replacement or the battery replacement hack more
difficult.

___
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: r271110 - head/lib/libc/locale

2014-09-04 Thread Pedro F. Giffuni
Author: pfg
Date: Thu Sep  4 17:36:21 2014
New Revision: 271110
URL: http://svnweb.freebsd.org/changeset/base/271110

Log:
  libc/locale: Remove a wrong comma.
  
  This only had some effect when debugging.
  
  Obtained from:DragonflyBSD
  MFC after:3 days

Modified:
  head/lib/libc/locale/lmonetary.c

Modified: head/lib/libc/locale/lmonetary.c
==
--- head/lib/libc/locale/lmonetary.cThu Sep  4 17:21:54 2014
(r271109)
+++ head/lib/libc/locale/lmonetary.cThu Sep  4 17:36:21 2014
(r271110)
@@ -192,7 +192,7 @@ printf( "int_curr_symbol = %s\n"
"n_cs_precedes = %d\n"
"n_sep_by_space = %d\n"
"p_sign_posn = %d\n"
-   "n_sign_posn = %d\n",
+   "n_sign_posn = %d\n"
"int_p_cs_precedes = %d\n"
"int_p_sep_by_space = %d\n"
"int_n_cs_precedes = %d\n"
___
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: r271076 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98

2014-09-04 Thread Don Lewis
On  4 Sep, John-Mark Gurney wrote:
> Don Lewis wrote this message on Thu, Sep 04, 2014 at 09:22 -0700:
>> On  4 Sep, John Baldwin wrote:
>> > On Wednesday, September 03, 2014 07:37:21 PM Don Lewis wrote:
>> >> On  4 Sep, John Baldwin wrote:
>> >> > Author: jhb
>> >> > Date: Thu Sep  4 01:46:06 2014
>> >> > New Revision: 271076
>> >> > URL: http://svnweb.freebsd.org/changeset/base/271076
>> >> > 
>> >> > Log:
>> >> >   - Move the declaration of has_f00f_hack out of identcpu.c to 
>> >> > machdep.c.
>> >> 
>> >> That certainly brings back memories ...
>> > 
>> > Hopefully not too traumatic. :-P
>> 
>> Not really.  I remember the general sense of panic when the
>> vulnerability was announced and then the sense of relief when the
>> workaround was found.  After that, I got lots of reminders because
>> of the boot message.
>> 
>> I've still got the old hardware and am often tempted to see if it will
>> run a recent version of FreeBSD.  I don't think I want to know how long
>> it would take to run buildworld post-clang.
> 
> Almost as old:
> FreeBSD 11.0-CURRENT #0 r266964:267061M: Wed Jun 11 15:35:27 PDT 2014
> j...@carbon.funkthat.com:/usr/obj/i386.i386/usr/src/sys/serbox i386
> FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
> CPU: AMD-K6tm w/ multimedia extensions (200.46-MHz 586-class CPU)
>   Origin="AuthenticAMD"  Id=0x562  Family=0x5  Model=0x6  Stepping=2
>   Features=0x8001bf
>   AMD Features=0x400<>
>  
> Works great... :)
> 
> Though I'll admit I didn't buildworld on this, but another newer 
> machine and then dd'd an image onto a CF card..

How much RAM?  I think my boards are using 16 MB DIMMs.  Some have two
and some have four.  It's even ECC RAM.  I suspect that ZFS is out of
the question, though ...


___
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: r271076 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98

2014-09-04 Thread Alexey Dokuchaev
On Thu, Sep 04, 2014 at 10:31:24AM -0700, Don Lewis wrote:
> On 4 Sep, Alexey Dokuchaev wrote:
> > I have a couple of P55-based mobos, but never bothered to install our
> > fresh -CURRENT on them.  I guess I should, just to see if we still rock.
> 
> RAM size is the probably the biggest issue.  [...]

Moments like this I thank that FreeBSD is pretty much the same from the user
POV, be it now or 15 years ago.  It's still the same console-based install
process, with no one pouring full X11 stack on you by default.  Not sure how
much RAM is required these days to boot into single user and gpart && untar
the kernel+base distsets to obtain a minimal working system, but should not
be too much.  Did anyone try to find out the minimum?  16MB?  32MB?

./danfe

P.S.  ZFS, well yes, is probably out of question.  But UFS is very good FS
even by modern standards (no pun intended).
___
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: r271076 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include pc98/pc98

2014-09-04 Thread John-Mark Gurney
Don Lewis wrote this message on Thu, Sep 04, 2014 at 10:41 -0700:
> On  4 Sep, John-Mark Gurney wrote:
> > Don Lewis wrote this message on Thu, Sep 04, 2014 at 09:22 -0700:
> >> On  4 Sep, John Baldwin wrote:
> >> > On Wednesday, September 03, 2014 07:37:21 PM Don Lewis wrote:
> >> >> On  4 Sep, John Baldwin wrote:
> >> >> > Author: jhb
> >> >> > Date: Thu Sep  4 01:46:06 2014
> >> >> > New Revision: 271076
> >> >> > URL: http://svnweb.freebsd.org/changeset/base/271076
> >> >> > 
> >> >> > Log:
> >> >> >   - Move the declaration of has_f00f_hack out of identcpu.c to 
> >> >> > machdep.c.
> >> >> 
> >> >> That certainly brings back memories ...
> >> > 
> >> > Hopefully not too traumatic. :-P
> >> 
> >> Not really.  I remember the general sense of panic when the
> >> vulnerability was announced and then the sense of relief when the
> >> workaround was found.  After that, I got lots of reminders because
> >> of the boot message.
> >> 
> >> I've still got the old hardware and am often tempted to see if it will
> >> run a recent version of FreeBSD.  I don't think I want to know how long
> >> it would take to run buildworld post-clang.
> > 
> > Almost as old:
> > FreeBSD 11.0-CURRENT #0 r266964:267061M: Wed Jun 11 15:35:27 PDT 2014
> > j...@carbon.funkthat.com:/usr/obj/i386.i386/usr/src/sys/serbox i386
> > FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
> > CPU: AMD-K6tm w/ multimedia extensions (200.46-MHz 586-class CPU)
> >   Origin="AuthenticAMD"  Id=0x562  Family=0x5  Model=0x6  Stepping=2
> >   Features=0x8001bf
> >   AMD Features=0x400<>
> >  
> > Works great... :)
> > 
> > Though I'll admit I didn't buildworld on this, but another newer 
> > machine and then dd'd an image onto a CF card..
> 
> How much RAM?  I think my boards are using 16 MB DIMMs.  Some have two
> and some have four.  It's even ECC RAM.  I suspect that ZFS is out of
> the question, though ...

It has 128MB... I think I have sticks that I could up it 256MB iirc,
but for it's needs (serial terminal server), it doesn't need that much
ram...

I've attached /var/run/dmesg.boot...

The other nice thing is that USB finally works on this thing.. :)

-- 
  John-Mark Gurney  Voice: +1 415 225 5579

 "All that I will do, has been done, All that I have, has not."
Copyright (c) 1992-2014 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.0-CURRENT #0 r266964:267061M: Wed Jun 11 15:35:27 PDT 2014
j...@carbon.funkthat.com:/usr/obj/i386.i386/usr/src/sys/serbox i386
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
CPU: AMD-K6tm w/ multimedia extensions (200.46-MHz 586-class CPU)
  Origin="AuthenticAMD"  Id=0x562  Family=0x5  Model=0x6  Stepping=2
  Features=0x8001bf
  AMD Features=0x400<>
real memory  = 134217728 (128 MB)
avail memory = 120770560 (115 MB)
random:  initialized
kbd1 at kbdmux0
ACPI BIOS Error (bug): A valid RSDP was not found (20130823/tbxfroot-223)
ACPI: Table initialisation failed: AE_NOT_FOUND
ACPI: Try disabling either ACPI or apic support.
pcib0 pcibus 0 on motherboard
pir0:  on motherboard
pci0:  on pcib0
$PIR: No matching entry for 0.7.INTD
isab0:  at device 7.0 on pci0
isa0:  on isab0
atapci0:  port 
0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x6000-0x600f at device 7.1 on pci0
ata0:  at channel 0 on atapci0
ata1:  at channel 1 on atapci0
uhci0:  port 0x6400-0x641f irq 10 at device 7.2 on 
pci0
usbus0 on uhci0
fxp0:  port 0x6800-0x683f mem 
0xe010-0xe0100fff,0xe000-0xe00f irq 11 at device 10.0 on pci0
miibus0:  on fxp0
inphy0:  PHY 1 on miibus0
inphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto, auto-flow
fxp0: Ethernet address: 00:d0:b7:90:17:c9
cpu0 on motherboard
attimer0:  at port 0x40-0x43 irq 0 pnpid PNP0100 on isa0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
atrtc0:  at port 0x70-0x71 irq 8 pnpid PNP0b00 on isa0
Event timer "RTC" frequency 32768 Hz quality 0
atkbdc0:  at port 0x60,0x64 irq 1 pnpid PNP0303 on 
isa0
atkbd0:  irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
unknown:  can't assign resources (memory)
uart0: <16550 or compatible> at port 0x3f8-0x3ff irq 4 flags 0x10 pnpid PNP0501 
on isa0
fdc0:  at port 0x3f2-0x3f3,0x3f4-0x3f5,0x3f7 irq 6 
drq 2 pnpid PNP0700 on isa0
ppc0:  at port 0x378-0x37f,0x778-0x77b irq 7 
pnpid PNP0400 on isa0
ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
ppbus0:  on ppc0
lpt0:  on ppbus0
lpt0: Interrupt-driven port
ppi0:  on ppbus0
uart1: <16550 or compatible> at port 0x2f8-0x2ff irq 3 pnpid PNP0501 on isa0
orm0:  at iomem 0xc-0xc7fff,0xc8000-0xc8fff pnpid ORM 
on isa0
sc0:  at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0:  at port 0x3c0-0x3df iomem 0xa-0xb on isa0
unknown:  can't assign 

svn commit: r271119 - head/sys/netinet

2014-09-04 Thread John Baldwin
Author: jhb
Date: Thu Sep  4 19:09:08 2014
New Revision: 271119
URL: http://svnweb.freebsd.org/changeset/base/271119

Log:
  In tcp_input(), don't acquire the pcbinfo global write lock for SYN
  packets targeting a listening socket.  Permit to reduce TCP input
  processing starvation in context of high SYN load (e.g. short-lived TCP
  connections or SYN flood).
  
  Submitted by: Julien Charbon 
  Reviewed by:  adrian, hiren, jhb, Mike Bentkofsky

Modified:
  head/sys/netinet/tcp_input.c
  head/sys/netinet/tcp_syncache.c

Modified: head/sys/netinet/tcp_input.c
==
--- head/sys/netinet/tcp_input.cThu Sep  4 18:54:01 2014
(r271118)
+++ head/sys/netinet/tcp_input.cThu Sep  4 19:09:08 2014
(r271119)
@@ -748,12 +748,12 @@ tcp_input(struct mbuf **mp, int *offp, i
 
/*
 * Locate pcb for segment; if we're likely to add or remove a
-* connection then first acquire pcbinfo lock.  There are two cases
+* connection then first acquire pcbinfo lock.  There are three cases
 * where we might discover later we need a write lock despite the
-* flags: ACKs moving a connection out of the syncache, and ACKs for
-* a connection in TIMEWAIT.
+* flags: ACKs moving a connection out of the syncache, ACKs for a
+* connection in TIMEWAIT and SYNs not targeting a listening socket.
 */
-   if ((thflags & (TH_SYN | TH_FIN | TH_RST)) != 0) {
+   if ((thflags & (TH_FIN | TH_RST)) != 0) {
INP_INFO_WLOCK(&V_tcbinfo);
ti_locked = TI_WLOCKED;
} else
@@ -982,10 +982,11 @@ relocked:
 * now be in TIMEWAIT.
 */
 #ifdef INVARIANTS
-   if ((thflags & (TH_SYN | TH_FIN | TH_RST)) != 0)
+   if ((thflags & (TH_FIN | TH_RST)) != 0)
INP_INFO_WLOCK_ASSERT(&V_tcbinfo);
 #endif
-   if (tp->t_state != TCPS_ESTABLISHED) {
+   if (!((tp->t_state == TCPS_ESTABLISHED && (thflags & TH_SYN) == 0) ||
+   (tp->t_state == TCPS_LISTEN && (thflags & TH_SYN {
if (ti_locked == TI_UNLOCKED) {
if (INP_INFO_TRY_WLOCK(&V_tcbinfo) == 0) {
in_pcbref(inp);
@@ -1026,17 +1027,13 @@ relocked:
/*
 * When the socket is accepting connections (the INPCB is in LISTEN
 * state) we look into the SYN cache if this is a new connection
-* attempt or the completion of a previous one.  Because listen
-* sockets are never in TCPS_ESTABLISHED, the V_tcbinfo lock will be
-* held in this case.
+* attempt or the completion of a previous one.
 */
if (so->so_options & SO_ACCEPTCONN) {
struct in_conninfo inc;
 
KASSERT(tp->t_state == TCPS_LISTEN, ("%s: so accepting but "
"tp not listening", __func__));
-   INP_INFO_WLOCK_ASSERT(&V_tcbinfo);
-
bzero(&inc, sizeof(inc));
 #ifdef INET6
if (isipv6) {
@@ -1059,6 +1056,8 @@ relocked:
 * socket appended to the listen queue in SYN_RECEIVED state.
 */
if ((thflags & (TH_RST|TH_ACK|TH_SYN)) == TH_ACK) {
+
+   INP_INFO_WLOCK_ASSERT(&V_tcbinfo);
/*
 * Parse the TCP options here because
 * syncookies need access to the reflected
@@ -1339,8 +1338,12 @@ relocked:
syncache_add(&inc, &to, th, inp, &so, m, NULL, NULL);
/*
 * Entry added to syncache and mbuf consumed.
-* Everything already unlocked by syncache_add().
+* Only the listen socket is unlocked by syncache_add().
 */
+   if (ti_locked == TI_WLOCKED) {
+   INP_INFO_WUNLOCK(&V_tcbinfo);
+   ti_locked = TI_UNLOCKED;
+   }
INP_INFO_UNLOCK_ASSERT(&V_tcbinfo);
return (IPPROTO_DONE);
} else if (tp->t_state == TCPS_LISTEN) {

Modified: head/sys/netinet/tcp_syncache.c
==
--- head/sys/netinet/tcp_syncache.c Thu Sep  4 18:54:01 2014
(r271118)
+++ head/sys/netinet/tcp_syncache.c Thu Sep  4 19:09:08 2014
(r271119)
@@ -1118,7 +1118,6 @@ syncache_add(struct in_conninfo *inc, st
struct syncache scs;
struct ucred *cred;
 
-   INP_INFO_WLOCK_ASSERT(&V_tcbinfo);
INP_WLOCK_ASSERT(inp);  /* listen socket */
KASSERT((th->th_flags & (TH_RST|TH_ACK|TH_SYN)) == TH_SYN,
("%s: unexpected tcp flags", __func__));
@@ -1149,13 +1148,11 @@ syncache_add(struct in_conninfo *inc, st
 #ifdef MAC
if (mac_syncache_init(&maclabel) != 0) {
INP_WUNLOCK(inp);
-   INP_INFO_WUNLOCK(&V_tcbinfo);

Re: svn commit: r271085 - head/lib/libgeom

2014-09-04 Thread John Baldwin
On Thursday, September 04, 2014 09:29:24 AM Benno Rice wrote:
> On Sep 4, 2014, at 6:51 AM, John Baldwin  wrote:
> > On Thursday, September 04, 2014 03:31:49 AM Benno Rice wrote:
> >> Author: benno
> >> Date: Thu Sep  4 03:31:48 2014
> >> New Revision: 271085
> >> URL: http://svnweb.freebsd.org/changeset/base/271085
> >> 
> >> Log:
> >>  Systems with lots of geom providers can end up with a kern.geom.confxml
> >>  value too large for the buffer allocated. Work around this by retrying
> >>  a few times with larger buffer sizes.
> > 
> > Are these systems having lots of changes to the GEOM tree while the sysctl
> > handler is being invoked?  If the tree is static, the first call with an
> > old of NULL should return the correct length in 'l' regardless of the
> > size as it generates the entire buffer and SYSCTL_OUT's it.  (It doesn't
> > do it piecemeal and fail on ENOMEM part way through the way some other
> > broken sysctl handlers do.)
> 
> These systems have a lot of drives in them and around the time when we’re
> trying to enumerate there can be lots of activity. In the case where the
> tree hasn’t changed we’re not doing that much extra work here and it saves
> us having to retry everything that happens around the geom_getxml calls
> inside libgeom when the tree does change.

I more meant that the commit message implied you needed this to handle a large 
buffer, but that shouldn't be true.  You should only need this to handle large 
changes in the size of the buffer.  (I.e. it grows by more than 4k in between 
the first two sysctl() invocations.)  Doubling the size on each iteration is 
one approach (and is fine), another common one is to keep both sysctls in the 
loop so you fetch the new size in each iteration, e.g.:

   buf = NULL;
   for (;;) {
   sysctl(..., NULL, &len);
   buf = realloc(buf, len);
   sysctl(..., buf, &len);
   }


-- 
John Baldwin
___
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: r271122 - head/sys/kern

2014-09-04 Thread Gleb Smirnoff
Author: glebius
Date: Thu Sep  4 19:27:30 2014
New Revision: 271122
URL: http://svnweb.freebsd.org/changeset/base/271122

Log:
  Change a very strange code in m_demote() to simple assertion.
  
  Sponsored by: Nginx, Inc.

Modified:
  head/sys/kern/uipc_mbuf.c

Modified: head/sys/kern/uipc_mbuf.c
==
--- head/sys/kern/uipc_mbuf.c   Thu Sep  4 19:22:01 2014(r271121)
+++ head/sys/kern/uipc_mbuf.c   Thu Sep  4 19:27:30 2014(r271122)
@@ -393,17 +393,13 @@ m_demote(struct mbuf *m0, int all)
struct mbuf *m;
 
for (m = all ? m0 : m0->m_next; m != NULL; m = m->m_next) {
+   KASSERT(m->m_nextpkt == NULL, ("%s: m_nextpkt in m %p, m0 %p",
+   __func__, m, m0));
if (m->m_flags & M_PKTHDR) {
m_tag_delete_chain(m, NULL);
m->m_flags &= ~M_PKTHDR;
bzero(&m->m_pkthdr, sizeof(struct pkthdr));
}
-   if (m != m0 && m->m_nextpkt != NULL) {
-   KASSERT(m->m_nextpkt == NULL,
-   ("%s: m_nextpkt not NULL", __func__));
-   m_freem(m->m_nextpkt);
-   m->m_nextpkt = NULL;
-   }
m->m_flags = m->m_flags & (M_EXT|M_RDONLY|M_NOFREE);
}
 }
___
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: r271123 - head/sys/netinet

2014-09-04 Thread Gleb Smirnoff
Author: glebius
Date: Thu Sep  4 19:28:02 2014
New Revision: 271123
URL: http://svnweb.freebsd.org/changeset/base/271123

Log:
  Satisfy assertion in m_demote().
  
  Sponsored by: Nginx, Inc.

Modified:
  head/sys/netinet/tcp_reass.c

Modified: head/sys/netinet/tcp_reass.c
==
--- head/sys/netinet/tcp_reass.cThu Sep  4 19:27:30 2014
(r271122)
+++ head/sys/netinet/tcp_reass.cThu Sep  4 19:28:02 2014
(r271123)
@@ -231,6 +231,7 @@ tcp_reass(struct tcpcb *tp, struct tcphd
tp->t_segq = m;
if (mq && th->th_seq + *tlenp == M_TCPHDR(mq)->th_seq) {
m->m_nextpkt = mq->m_nextpkt;
+   mq->m_nextpkt = NULL;
m_catpkt(m, mq);
} else
m->m_nextpkt = mq;
___
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: r271124 - head/sys/boot/fdt/dts/arm

2014-09-04 Thread Ian Lepore
Author: ian
Date: Thu Sep  4 19:52:17 2014
New Revision: 271124
URL: http://svnweb.freebsd.org/changeset/base/271124

Log:
  Stop setting the iomux device status to disabled, now that we have a driver.

Modified:
  head/sys/boot/fdt/dts/arm/imx6.dtsi
  head/sys/boot/fdt/dts/arm/wandboard-dual.dts
  head/sys/boot/fdt/dts/arm/wandboard-quad.dts
  head/sys/boot/fdt/dts/arm/wandboard-solo.dts

Modified: head/sys/boot/fdt/dts/arm/imx6.dtsi
==
--- head/sys/boot/fdt/dts/arm/imx6.dtsi Thu Sep  4 19:28:02 2014
(r271123)
+++ head/sys/boot/fdt/dts/arm/imx6.dtsi Thu Sep  4 19:52:17 2014
(r271124)
@@ -134,7 +134,6 @@
reg = <0x020e 0x4000>;
interrupt-parent = <&gic>;
interrupts = <32>;
-   status = "disabled";
};
 
gpio1: gpio@0209c000 {

Modified: head/sys/boot/fdt/dts/arm/wandboard-dual.dts
==
--- head/sys/boot/fdt/dts/arm/wandboard-dual.dtsThu Sep  4 19:28:02 
2014(r271123)
+++ head/sys/boot/fdt/dts/arm/wandboard-dual.dtsThu Sep  4 19:52:17 
2014(r271124)
@@ -44,7 +44,6 @@
 
SOC: soc@ {
aips@0200 { /* AIPS1 */
-   iomux@020e  { status = "disabled"; };
gpio@0209c000   { status = "okay"; };
gpio@020a   { status = "okay"; };
gpio@020a4000   { status = "okay"; };

Modified: head/sys/boot/fdt/dts/arm/wandboard-quad.dts
==
--- head/sys/boot/fdt/dts/arm/wandboard-quad.dtsThu Sep  4 19:28:02 
2014(r271123)
+++ head/sys/boot/fdt/dts/arm/wandboard-quad.dtsThu Sep  4 19:52:17 
2014(r271124)
@@ -44,7 +44,6 @@
 
SOC: soc@ {
aips@0200 { /* AIPS1 */
-   iomux@020e  { status = "disabled"; };
gpio@0209c000   { status = "okay"; };
gpio@020a   { status = "okay"; };
gpio@020a4000   { status = "okay"; };

Modified: head/sys/boot/fdt/dts/arm/wandboard-solo.dts
==
--- head/sys/boot/fdt/dts/arm/wandboard-solo.dtsThu Sep  4 19:28:02 
2014(r271123)
+++ head/sys/boot/fdt/dts/arm/wandboard-solo.dtsThu Sep  4 19:52:17 
2014(r271124)
@@ -44,7 +44,6 @@
 
SOC: soc@ {
aips@0200 { /* AIPS1 */
-   iomux@020e  { status = "disabled"; };
gpio@0209c000   { status = "okay"; };
gpio@020a   { status = "okay"; };
gpio@020a4000   { status = "okay"; };
___
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: r271133 - in head/sys/gnu/dts/include/dt-bindings: clk clock dma gpio input interrupt-controller mfd phy pinctrl pwm reset reset-controller soc sound spmi thermal

2014-09-04 Thread Warner Losh
Author: imp
Date: Thu Sep  4 20:48:16 2014
New Revision: 271133
URL: http://svnweb.freebsd.org/changeset/base/271133

Log:
  Update bindings to latest vendor branch representing 3.17-rc2 level of
  Linux DTS API.

Added:
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clk/ti-dra7-atl.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/at91.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/bcm21664.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/bcm281xx.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/berlin2.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/berlin2q.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/clps711x-clock.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/exynos-audss-clk.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/exynos3250.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/exynos5260-clk.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/exynos5410.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/hip04-clock.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/hix5hd2-clock.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/imx1-clock.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/imx21-clock.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/imx27-clock.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/imx6qdl-clock.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/imx6sx-clock.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/lsi,axm5516-clks.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/qcom,gcc-apq8084.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/qcom,gcc-ipq806x.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/qcom,mmcc-apq8084.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/r7s72100-clock.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/r8a7779-clock.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/rk3066a-cru.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/rk3188-cru-common.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/rk3188-cru.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/rk3288-cru.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/s3c2410.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/s3c2412.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/s3c2443.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/s5pv210-audss.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/s5pv210.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/stih415-clks.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/clock/stih416-clks.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/dma/nbpfaxi.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/mfd/palmas.h
 - copied from r270866, vendor/device-tree/dist/include/dt-bindings/phy/
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/pinctrl/pinctrl-tegra-xusb.h
 - copied from r270866, 
vendor/device-tree/dist/include/dt-bindings/reset-controller/
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/reset/altr,rst-mgr.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/reset/qcom,gcc-apq8084.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/reset/qcom,gcc-ipq806x.h
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/reset/qcom,mmcc-apq8084.h
 - copied from r270866, vendor/device-tree/dist/include/dt-bindings/soc/
 - copied unchanged from r270866, 
vendor/device-tree/dist/include/dt-bindings/sound/tlv320aic31xx-micbias.h
 - copied from r270866, vendor/device-tree/dist/include/dt-bindings/

svn commit: r271137 - in head/sys: amd64/conf conf i386/conf

2014-09-04 Thread Mark Johnston
Author: markj
Date: Thu Sep  4 21:06:33 2014
New Revision: 271137
URL: http://svnweb.freebsd.org/changeset/base/271137

Log:
  Add mrsas(4) to GENERIC for i386 and amd64.
  
  Approved by:  ambrisko, kadesai
  MFC after:3 days

Modified:
  head/sys/amd64/conf/GENERIC
  head/sys/conf/NOTES
  head/sys/i386/conf/GENERIC

Modified: head/sys/amd64/conf/GENERIC
==
--- head/sys/amd64/conf/GENERIC Thu Sep  4 21:05:04 2014(r271136)
+++ head/sys/amd64/conf/GENERIC Thu Sep  4 21:06:33 2014(r271137)
@@ -164,6 +164,7 @@ device  aacraid # Adaptec by 
PMC RAID
 device ida # Compaq Smart RAID
 device mfi # LSI MegaRAID SAS
 device mlx # Mylex DAC960 family
+device mrsas   # LSI/Avago MegaRAID SAS/SATA, 6Gb/s 
and 12Gb/s
 #XXX pointer/int warnings
 #devicepst # Promise Supertrak SX6000
 device twe # 3ware ATA RAID

Modified: head/sys/conf/NOTES
==
--- head/sys/conf/NOTES Thu Sep  4 21:05:04 2014(r271136)
+++ head/sys/conf/NOTES Thu Sep  4 21:06:33 2014(r271137)
@@ -1677,6 +1677,7 @@ deviceamrp# SCSI Passthrough 
interfa
 device mfi # LSI MegaRAID SAS
 device mfip# LSI MegaRAID SAS passthrough, requires CAM
 optionsMFI_DEBUG
+device mrsas   # LSI/Avago MegaRAID SAS/SATA, 6Gb/s and 12Gb/s
 
 #
 # 3ware ATA RAID

Modified: head/sys/i386/conf/GENERIC
==
--- head/sys/i386/conf/GENERIC  Thu Sep  4 21:05:04 2014(r271136)
+++ head/sys/i386/conf/GENERIC  Thu Sep  4 21:06:33 2014(r271137)
@@ -168,6 +168,7 @@ device  aacraid # Adaptec by 
PMC RAID
 device ida # Compaq Smart RAID
 device mfi # LSI MegaRAID SAS
 device mlx # Mylex DAC960 family
+device mrsas   # LSI/Avago MegaRAID SAS/SATA, 6Gb/s 
and 12Gb/s
 device pst # Promise Supertrak SX6000
 device twe # 3ware ATA RAID
 
___
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: r271140 - head/sys/gnu/dts/arm

2014-09-04 Thread Warner Losh
Author: imp
Date: Thu Sep  4 21:28:25 2014
New Revision: 271140
URL: http://svnweb.freebsd.org/changeset/base/271140

Log:
  Delete old arm dts tree. This was created by cherry picking from a
  full vendor tree. This worked great until it was time to update, but
  now it is time to update. Hit the rest button by removing this branch
  and re-adding it by a full copy of whatever is in the vendor tree.

Deleted:
  head/sys/gnu/dts/arm/
___
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: r271141 - in head/sys: kern sys

2014-09-04 Thread Sean Bruno
Author: sbruno
Date: Thu Sep  4 21:31:25 2014
New Revision: 271141
URL: http://svnweb.freebsd.org/changeset/base/271141

Log:
  Allow multiple image activators to run on the same execution by changing
  imgp->interpreted to a bitmask instead of, functionally, a bool. Each
  imgactivator now requires its own flag in interpreted to indicate whether
  or not it has already examined argv[0].
  
  Change imgp->interpreted to an unsigned char to add one extra bit for
  future use.
  
  With this change, one can execute a shell script from a 64bit host native
  make and still get the binmisc image activator to fire for the script
  interpreter.  Prior to this, execution would fail.
  
  Phabric:  https://reviews.freebsd.org/D696
  Reviewed by:  jhb@
  MFC after:4 weeks

Modified:
  head/sys/kern/imgact_binmisc.c
  head/sys/kern/imgact_shell.c
  head/sys/sys/imgact.h

Modified: head/sys/kern/imgact_binmisc.c
==
--- head/sys/kern/imgact_binmisc.c  Thu Sep  4 21:28:25 2014
(r271140)
+++ head/sys/kern/imgact_binmisc.c  Thu Sep  4 21:31:25 2014
(r271141)
@@ -600,12 +600,12 @@ imgact_binmisc_exec(struct image_params 
}
 
/* No interpreter nesting allowed. */
-   if (imgp->interpreted) {
+   if (imgp->interpreted & IMGACT_BINMISC) {
mtx_unlock(&interp_list_mtx);
return (ENOEXEC);
}
 
-   imgp->interpreted = 1;
+   imgp->interpreted |= IMGACT_BINMISC;
 
if (imgp->args->fname != NULL) {
fname = imgp->args->fname;

Modified: head/sys/kern/imgact_shell.c
==
--- head/sys/kern/imgact_shell.cThu Sep  4 21:28:25 2014
(r271140)
+++ head/sys/kern/imgact_shell.cThu Sep  4 21:31:25 2014
(r271141)
@@ -115,10 +115,10 @@ exec_shell_imgact(imgp)
 * Don't allow a shell script to be the shell for a shell
 *  script. :-)
 */
-   if (imgp->interpreted)
+   if (imgp->interpreted & IMGACT_SHELL)
return (ENOEXEC);
 
-   imgp->interpreted = 1;
+   imgp->interpreted |= IMGACT_SHELL;
 
/*
 * At this point we have the first page of the file mapped.

Modified: head/sys/sys/imgact.h
==
--- head/sys/sys/imgact.h   Thu Sep  4 21:28:25 2014(r271140)
+++ head/sys/sys/imgact.h   Thu Sep  4 21:31:25 2014(r271141)
@@ -61,7 +61,9 @@ struct image_params {
unsigned long entry_addr; /* entry address of target executable */
unsigned long reloc_base; /* load address of image */
char vmspace_destroyed; /* flag - we've blown away original vm space */
-   char interpreted;   /* flag - this executable is interpreted */
+#define IMGACT_SHELL   0x1
+#define IMGACT_BINMISC 0x2
+   unsigned char interpreted;  /* mask of interpreters that have run */
char opened;/* flag - we have opened executable vnode */
char *interpreter_name; /* name of the interpreter */
void *auxargs;  /* ELF Auxinfo structure pointer */
___
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: r271144 - head/bin/sh

2014-09-04 Thread Jilles Tjoelker
Author: jilles
Date: Thu Sep  4 21:48:33 2014
New Revision: 271144
URL: http://svnweb.freebsd.org/changeset/base/271144

Log:
  sh: Allow enabling job control without a tty in non-interactive mode.
  
  If no tty is available, 'set -m' is still useful to put jobs in their own
  process groups.

Modified:
  head/bin/sh/jobs.c
  head/bin/sh/sh.1

Modified: head/bin/sh/jobs.c
==
--- head/bin/sh/jobs.c  Thu Sep  4 21:48:33 2014(r271143)
+++ head/bin/sh/jobs.c  Thu Sep  4 21:48:33 2014(r271144)
@@ -118,6 +118,24 @@ static void showjob(struct job *, int);
 static int jobctl;
 
 #if JOBS
+static void
+jobctl_notty(void)
+{
+   if (ttyfd >= 0) {
+   close(ttyfd);
+   ttyfd = -1;
+   }
+   if (!iflag) {
+   setsignal(SIGTSTP);
+   setsignal(SIGTTOU);
+   setsignal(SIGTTIN);
+   jobctl = 1;
+   return;
+   }
+   out2fmt_flush("sh: can't access tty; job control turned off\n");
+   mflag = 0;
+}
+
 void
 setjobctl(int on)
 {
@@ -133,8 +151,10 @@ setjobctl(int on)
while (i <= 2 && !isatty(i))
i++;
if (i > 2 ||
-   (ttyfd = fcntl(i, F_DUPFD_CLOEXEC, 10)) < 0)
-   goto out;
+   (ttyfd = fcntl(i, F_DUPFD_CLOEXEC, 10)) < 0) {
+   jobctl_notty();
+   return;
+   }
}
if (ttyfd < 10) {
/*
@@ -142,9 +162,8 @@ setjobctl(int on)
 * the user's redirections.
 */
if ((i = fcntl(ttyfd, F_DUPFD_CLOEXEC, 10)) < 0) {
-   close(ttyfd);
-   ttyfd = -1;
-   goto out;
+   jobctl_notty();
+   return;
}
close(ttyfd);
ttyfd = i;
@@ -152,11 +171,15 @@ setjobctl(int on)
do { /* while we are in the background */
initialpgrp = tcgetpgrp(ttyfd);
if (initialpgrp < 0) {
-out:   out2fmt_flush("sh: can't access tty; job 
control turned off\n");
-   mflag = 0;
+   jobctl_notty();
return;
}
if (initialpgrp != getpgrp()) {
+   if (!iflag) {
+   initialpgrp = -1;
+   jobctl_notty();
+   return;
+   }
kill(0, SIGTTIN);
continue;
}
@@ -168,9 +191,11 @@ out:   out2fmt_flush("sh: 
can't access 
tcsetpgrp(ttyfd, rootpid);
} else { /* turning job control off */
setpgid(0, initialpgrp);
-   tcsetpgrp(ttyfd, initialpgrp);
-   close(ttyfd);
-   ttyfd = -1;
+   if (ttyfd >= 0) {
+   tcsetpgrp(ttyfd, initialpgrp);
+   close(ttyfd);
+   ttyfd = -1;
+   }
setsignal(SIGTSTP);
setsignal(SIGTTOU);
setsignal(SIGTTIN);
@@ -195,7 +220,8 @@ fgcmd(int argc __unused, char **argv __u
printjobcmd(jp);
flushout(&output);
pgrp = jp->ps[0].pid;
-   tcsetpgrp(ttyfd, pgrp);
+   if (ttyfd >= 0)
+   tcsetpgrp(ttyfd, pgrp);
restartjob(jp);
jp->foreground = 1;
INTOFF;
@@ -847,7 +873,8 @@ forkshell(struct job *jp, union node *n,
pgrp = getpid();
else
pgrp = jp->ps[0].pid;
-   if (setpgid(0, pgrp) == 0 && mode == FORK_FG) {
+   if (setpgid(0, pgrp) == 0 && mode == FORK_FG &&
+   ttyfd >= 0) {
/*** this causes superfluous TIOCSPGRPS ***/
if (tcsetpgrp(ttyfd, pgrp) < 0)
error("tcsetpgrp failed, errno=%d", 
errno);
@@ -1007,7 +1034,7 @@ waitforjob(struct job *jp, int *origstat
dotrap();
 #if JOBS
if (jp->jobctl) {
-   if (tcsetpgrp(ttyfd, rootpid) < 0)
+   if (ttyfd >= 0 && tcsetpgrp(ttyfd, rootpid) < 0)
error("tcsetpgrp failed, errno=%d\n", errno);
}
if (jp->state == JOBSTOPPED)

Modified: head/bin/sh/sh.1
==

svn commit: r271143 - head/sys/gnu/dts/arm

2014-09-04 Thread Warner Losh
Author: imp
Date: Thu Sep  4 21:48:33 2014
New Revision: 271143
URL: http://svnweb.freebsd.org/changeset/base/271143

Log:
  Reimport dts files from vendor repo now that it has been properly
  trimmed.

Added:
  head/sys/gnu/dts/arm/
 - copied from r271142, vendor/device-tree/dist/src/arm/
___
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: r271145 - head/etc/rc.d

2014-09-04 Thread Hiroki Sato
Author: hrs
Date: Thu Sep  4 22:00:52 2014
New Revision: 271145
URL: http://svnweb.freebsd.org/changeset/base/271145

Log:
  Fix a bug which prevented mount.fstab parameter from being converted
  when jail_JID_devfs_enable=NO.
  
  Spotted by:   peter

Modified:
  head/etc/rc.d/jail

Modified: head/etc/rc.d/jail
==
--- head/etc/rc.d/jail  Thu Sep  4 21:48:33 2014(r271144)
+++ head/etc/rc.d/jail  Thu Sep  4 22:00:52 2014(r271145)
@@ -207,6 +207,10 @@ parse_options()
extract_var $_j consolelog exec.consolelog - \
/var/log/jail_${_j}_console.log
 
+   if [ -r $_fstab ]; then
+   echo "  mount.fstab = \"$_fstab\";"
+   fi
+
eval : \${jail_${_j}_devfs_enable:=${jail_devfs_enable:-NO}}
if checkyesno jail_${_j}_devfs_enable; then
echo "  mount.devfs;"
@@ -222,11 +226,7 @@ parse_options()
;;
*)  warn "devfs_ruleset must be an integer." ;;
esac
-   if [ -r $_fstab ]; then
-   echo "  mount.fstab = \"$_fstab\";"
-   fi
fi
-
eval : \${jail_${_j}_fdescfs_enable:=${jail_fdescfs_enable:-NO}}
if checkyesno jail_${_j}_fdescfs_enable; then
echo "  mount.fdescfs;"
___
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: r271146 - in head/sys: conf dev/ahci modules/ahci

2014-09-04 Thread Warner Losh
Author: imp
Date: Thu Sep  4 22:22:53 2014
New Revision: 271146
URL: http://svnweb.freebsd.org/changeset/base/271146

Log:
  Separate out PCI attachment from the main AHCI driver. Move checks of
  PCI IDs into quirks, which mostly fit (though you'd get no argument
  from me that AHCI_Q_SATA1_UNIT0 is oddly specific). Set these quirks
  in the PCI attachment. Make some shared functions public so that PCI
  and possibly other bus attachments can use them.
  
  The split isn't perfect yet, but it is functional. The split will be
  perfected as other bus attachments for AHCI are written.
  
  Sponsored by: Netflix
  Reviewed by: kan, mav
  Differential Revision: https://reviews.freebsd.org/D699

Added:
  head/sys/dev/ahci/ahci_pci.c
 - copied, changed from r271145, head/sys/dev/ahci/ahci.c
Modified:
  head/sys/conf/files
  head/sys/dev/ahci/ahci.c
  head/sys/dev/ahci/ahci.h
  head/sys/modules/ahci/Makefile

Modified: head/sys/conf/files
==
--- head/sys/conf/files Thu Sep  4 22:00:52 2014(r271145)
+++ head/sys/conf/files Thu Sep  4 22:22:53 2014(r271146)
@@ -622,8 +622,9 @@ dev/aha/aha.c   optional aha
 dev/aha/aha_isa.c  optional aha isa
 dev/aha/aha_mca.c  optional aha mca
 dev/ahb/ahb.c  optional ahb eisa
-dev/ahci/ahci.coptional ahci pci
-dev/ahci/ahciem.c  optional ahci pci
+dev/ahci/ahci.coptional ahci
+dev/ahci/ahciem.c  optional ahci
+dev/ahci/ahci_pci.coptional ahci pci
 dev/aic/aic.c  optional aic
 dev/aic/aic_pccard.c   optional aic pccard
 dev/aic7xxx/ahc_eisa.c optional ahc eisa

Modified: head/sys/dev/ahci/ahci.c
==
--- head/sys/dev/ahci/ahci.cThu Sep  4 22:00:52 2014(r271145)
+++ head/sys/dev/ahci/ahci.cThu Sep  4 22:22:53 2014(r271146)
@@ -41,8 +41,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
-#include 
 #include "ahci.h"
 
 #include 
@@ -52,12 +50,9 @@ __FBSDID("$FreeBSD$");
 #include 
 
 /* local prototypes */
-static int ahci_setup_interrupt(device_t dev);
 static void ahci_intr(void *data);
 static void ahci_intr_one(void *data);
 static void ahci_intr_one_edge(void *data);
-static int ahci_suspend(device_t dev);
-static int ahci_resume(device_t dev);
 static int ahci_ch_init(device_t dev);
 static int ahci_ch_deinit(device_t dev);
 static int ahci_ch_suspend(device_t dev);
@@ -66,8 +61,6 @@ static void ahci_ch_pm(void *arg);
 static void ahci_ch_intr(void *arg);
 static void ahci_ch_intr_direct(void *arg);
 static void ahci_ch_intr_main(struct ahci_channel *ch, uint32_t istatus);
-static int ahci_ctlr_reset(device_t dev);
-static int ahci_ctlr_setup(device_t dev);
 static void ahci_begin_transaction(device_t dev, union ccb *ccb);
 static void ahci_dmasetprd(void *arg, bus_dma_segment_t *segs, int nsegs, int 
error);
 static void ahci_execute_transaction(struct ahci_slot *slot);
@@ -99,366 +92,76 @@ static void ahcipoll(struct cam_sim *sim
 
 static MALLOC_DEFINE(M_AHCI, "AHCI driver", "AHCI driver data buffers");
 
-static struct {
-   uint32_tid;
-   uint8_t rev;
-   const char  *name;
-   int quirks;
-#define AHCI_Q_NOFORCE 1
-#define AHCI_Q_NOPMP   2
-#define AHCI_Q_NONCQ   4
-#define AHCI_Q_1CH 8
-#define AHCI_Q_2CH 16
-#define AHCI_Q_4CH 32
-#define AHCI_Q_EDGEIS  64
-#define AHCI_Q_SATA2   128
-#define AHCI_Q_NOBSYRES256
-#define AHCI_Q_NOAA512
-#define AHCI_Q_NOCOUNT 1024
-#define AHCI_Q_ALTSIG  2048
-#define AHCI_Q_NOMSI   4096
-
-#define AHCI_Q_BIT_STRING  \
-   "\020"  \
-   "\001NOFORCE"   \
-   "\002NOPMP" \
-   "\003NONCQ" \
-   "\0041CH"   \
-   "\0052CH"   \
-   "\0064CH"   \
-   "\007EDGEIS"\
-   "\010SATA2" \
-   "\011NOBSYRES"  \
-   "\012NOAA"  \
-   "\013NOCOUNT"   \
-   "\014ALTSIG"\
-   "\015NOMSI"
-} ahci_ids[] = {
-   {0x43801002, 0x00, "AMD SB600", AHCI_Q_NOMSI},
-   {0x43901002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0},
-   {0x43911002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0},
-   {0x43921002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0},
-   {0x43931002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0},
-   {0x43941002, 0x00, "AMD SB7x0/SB8x0/SB9x0", 0},
-   {0x43951002, 0x00, "AMD SB8x0/SB9x0",   0},
-   {0x78001022, 0x00, "AMD Hudson-2",  0},
-   {0x78011022, 0x00, "AMD Hudson-2",  0},
-   {0x78021022, 0x00, "AMD Hudson-2",  0},
-   {0x78031022, 0x00, "AMD Hudson-2",  0},
-   {0x78041022, 0x00, "AMD Hudson-2",  0},
-   {0x06111b21, 0x00, "ASMed

svn commit: r271147 - head/lib/msun/src

2014-09-04 Thread Steve Kargl
Author: kargl
Date: Thu Sep  4 23:50:05 2014
New Revision: 271147
URL: http://svnweb.freebsd.org/changeset/base/271147

Log:
  Remove an initialized, but otherwise, unused variable.

Modified:
  head/lib/msun/src/e_lgamma_r.c
  head/lib/msun/src/e_lgammaf_r.c

Modified: head/lib/msun/src/e_lgamma_r.c
==
--- head/lib/msun/src/e_lgamma_r.c  Thu Sep  4 22:22:53 2014
(r271146)
+++ head/lib/msun/src/e_lgamma_r.c  Thu Sep  4 23:50:05 2014
(r271147)
@@ -90,7 +90,6 @@ static const volatile double vzero = 0;
 
 static const double
 zero=  0.e+00,
-two52=  4.5035996273704960e+15, /* 0x4330, 0x */
 half=  5.e-01, /* 0x3FE0, 0x */
 one =  1.e+00, /* 0x3FF0, 0x */
 pi  =  3.14159265358979311600e+00, /* 0x400921FB, 0x54442D18 */

Modified: head/lib/msun/src/e_lgammaf_r.c
==
--- head/lib/msun/src/e_lgammaf_r.c Thu Sep  4 22:22:53 2014
(r271146)
+++ head/lib/msun/src/e_lgammaf_r.c Thu Sep  4 23:50:05 2014
(r271147)
@@ -23,7 +23,6 @@ static const volatile float vzero = 0;
 
 static const float
 zero=  0.00e+00,
-two23=  8.388608e+06, /* 0x4b00 */
 half=  5.00e-01, /* 0x3f00 */
 one =  1.00e+00, /* 0x3f80 */
 pi  =  3.1415927410e+00, /* 0x40490fdb */
___
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: r271148 - head/sys/geom/eli

2014-09-04 Thread John-Mark Gurney
Author: jmg
Date: Thu Sep  4 23:53:51 2014
New Revision: 271148
URL: http://svnweb.freebsd.org/changeset/base/271148

Log:
  use a straight buffer instead of an iov w/ 1 segment...  The aesni
  driver when it hits a mbuf/iov buffer, it mallocs and copies the data
  for processing..  This improves perf by ~8-10% on my machine...
  
  I have thoughts of fixing AES-NI so that it can better handle segmented
  buffers, which should help improve IPSEC performance, but that is for
  the future...

Modified:
  head/sys/geom/eli/g_eli_crypto.c
  head/sys/geom/eli/g_eli_integrity.c
  head/sys/geom/eli/g_eli_privacy.c

Modified: head/sys/geom/eli/g_eli_crypto.c
==
--- head/sys/geom/eli/g_eli_crypto.cThu Sep  4 23:50:05 2014
(r271147)
+++ head/sys/geom/eli/g_eli_crypto.cThu Sep  4 23:53:51 2014
(r271148)
@@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #else
 #include 
 #include 
@@ -63,8 +62,6 @@ g_eli_crypto_cipher(u_int algo, int enc,
struct cryptoini cri;
struct cryptop *crp;
struct cryptodesc *crd;
-   struct uio *uio;
-   struct iovec *iov;
uint64_t sid;
u_char *p;
int error;
@@ -79,24 +76,13 @@ g_eli_crypto_cipher(u_int algo, int enc,
error = crypto_newsession(&sid, &cri, CRYPTOCAP_F_SOFTWARE);
if (error != 0)
return (error);
-   p = malloc(sizeof(*crp) + sizeof(*crd) + sizeof(*uio) + sizeof(*iov),
-   M_ELI, M_NOWAIT | M_ZERO);
+   p = malloc(sizeof(*crp) + sizeof(*crd), M_ELI, M_NOWAIT | M_ZERO);
if (p == NULL) {
crypto_freesession(sid);
return (ENOMEM);
}
crp = (struct cryptop *)p;  p += sizeof(*crp);
crd = (struct cryptodesc *)p;   p += sizeof(*crd);
-   uio = (struct uio *)p;  p += sizeof(*uio);
-   iov = (struct iovec *)p;p += sizeof(*iov);
-
-   iov->iov_len = datasize;
-   iov->iov_base = data;
-
-   uio->uio_iov = iov;
-   uio->uio_iovcnt = 1;
-   uio->uio_segflg = UIO_SYSSPACE;
-   uio->uio_resid = datasize;
 
crd->crd_skip = 0;
crd->crd_len = datasize;
@@ -114,8 +100,8 @@ g_eli_crypto_cipher(u_int algo, int enc,
crp->crp_olen = datasize;
crp->crp_opaque = NULL;
crp->crp_callback = g_eli_crypto_done;
-   crp->crp_buf = (void *)uio;
-   crp->crp_flags = CRYPTO_F_IOV | CRYPTO_F_CBIFSYNC | CRYPTO_F_REL;
+   crp->crp_buf = (void *)data;
+   crp->crp_flags = CRYPTO_F_CBIFSYNC | CRYPTO_F_REL;
crp->crp_desc = crd;
 
error = crypto_dispatch(crp);

Modified: head/sys/geom/eli/g_eli_integrity.c
==
--- head/sys/geom/eli/g_eli_integrity.c Thu Sep  4 23:50:05 2014
(r271147)
+++ head/sys/geom/eli/g_eli_integrity.c Thu Sep  4 23:53:51 2014
(r271148)
@@ -41,7 +41,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
@@ -363,8 +362,6 @@ g_eli_auth_read(struct g_eli_softc *sc, 
size += sizeof(struct cryptop) * nsec;
size += sizeof(struct cryptodesc) * nsec * 2;
size += G_ELI_AUTH_SECKEYLEN * nsec;
-   size += sizeof(struct uio) * nsec;
-   size += sizeof(struct iovec) * nsec;
cbp->bio_offset = (bp->bio_offset / bp->bio_to->sectorsize) * 
sc->sc_bytes_per_sector;
bp->bio_driver2 = malloc(size, M_ELI, M_WAITOK);
cbp->bio_data = bp->bio_driver2;
@@ -409,8 +406,6 @@ g_eli_auth_run(struct g_eli_worker *wr, 
struct g_eli_softc *sc;
struct cryptop *crp;
struct cryptodesc *crde, *crda;
-   struct uio *uio;
-   struct iovec *iov;
u_int i, lsec, nsec, data_secsize, decr_secsize, encr_secsize;
off_t dstoff;
int err, error;
@@ -449,8 +444,6 @@ g_eli_auth_run(struct g_eli_worker *wr, 
size += sizeof(*crde) * nsec;
size += sizeof(*crda) * nsec;
size += G_ELI_AUTH_SECKEYLEN * nsec;
-   size += sizeof(*uio) * nsec;
-   size += sizeof(*iov) * nsec;
data = malloc(size, M_ELI, M_WAITOK);
bp->bio_driver2 = data;
p = data + encr_secsize * nsec;
@@ -464,8 +457,6 @@ g_eli_auth_run(struct g_eli_worker *wr, 
crde = (struct cryptodesc *)p;  p += sizeof(*crde);
crda = (struct cryptodesc *)p;  p += sizeof(*crda);
authkey = (u_char *)p;  p += G_ELI_AUTH_SECKEYLEN;
-   uio = (struct uio *)p;  p += sizeof(*uio);
-   iov = (struct iovec *)p;p += sizeof(*iov);
 
data_secsize = sc->sc_data_per_sector;
if ((i % lsec) == 0)
@@ -482,21 +473,13 @@ g_eli_auth_run(struct g_eli_worker *wr, 
plaindata += data_secsize;
 

svn commit: r271149 - in head/sys: amd64/amd64 i386/i386

2014-09-04 Thread Pedro F. Giffuni
Author: pfg
Date: Fri Sep  5 01:06:45 2014
New Revision: 271149
URL: http://svnweb.freebsd.org/changeset/base/271149

Log:
  Apply known workarounds for modern MacBooks.
  
  The legacy USB circuit tends to give trouble on MacBook.
  While the original report covered MacBook, extend the fix
  preemptively for the newer MacBookPro too.
  
  PR:   191693
  Reviewed by:  emaste
  MFC after:5 days

Modified:
  head/sys/amd64/amd64/machdep.c
  head/sys/i386/i386/machdep.c

Modified: head/sys/amd64/amd64/machdep.c
==
--- head/sys/amd64/amd64/machdep.c  Thu Sep  4 23:53:51 2014
(r271148)
+++ head/sys/amd64/amd64/machdep.c  Fri Sep  5 01:06:45 2014
(r271149)
@@ -250,9 +250,11 @@ cpu_startup(dummy)
if (sysenv != NULL) {
if (strncmp(sysenv, "MacBook1,1", 10) == 0 ||
strncmp(sysenv, "MacBook3,1", 10) == 0 ||
+   strncmp(sysenv, "MacBook4,1", 10) == 0 ||
strncmp(sysenv, "MacBookPro1,1", 13) == 0 ||
strncmp(sysenv, "MacBookPro1,2", 13) == 0 ||
strncmp(sysenv, "MacBookPro3,1", 13) == 0 ||
+   strncmp(sysenv, "MacBookPro4,1", 13) == 0 ||
strncmp(sysenv, "Macmini1,1", 10) == 0) {
if (bootverbose)
printf("Disabling LEGACY_USB_EN bit on "

Modified: head/sys/i386/i386/machdep.c
==
--- head/sys/i386/i386/machdep.cThu Sep  4 23:53:51 2014
(r271148)
+++ head/sys/i386/i386/machdep.cFri Sep  5 01:06:45 2014
(r271149)
@@ -273,9 +273,11 @@ cpu_startup(dummy)
if (sysenv != NULL) {
if (strncmp(sysenv, "MacBook1,1", 10) == 0 ||
strncmp(sysenv, "MacBook3,1", 10) == 0 ||
+   strncmp(sysenv, "MacBook4,1", 10) == 0 ||
strncmp(sysenv, "MacBookPro1,1", 13) == 0 ||
strncmp(sysenv, "MacBookPro1,2", 13) == 0 ||
strncmp(sysenv, "MacBookPro3,1", 13) == 0 ||
+   strncmp(sysenv, "MacBookPro4,1", 13) == 0 ||
strncmp(sysenv, "Macmini1,1", 10) == 0) {
if (bootverbose)
printf("Disabling LEGACY_USB_EN bit on "
___
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: r271151 - head/sys/gnu/dts/arm

2014-09-04 Thread Warner Losh
Author: imp
Date: Fri Sep  5 02:21:45 2014
New Revision: 271151
URL: http://svnweb.freebsd.org/changeset/base/271151

Log:
  Merge forgotten .h files from vendor branch.

Added:
  head/sys/gnu/dts/arm/imx51-pinfunc.h
 - copied unchanged from r271150, 
vendor/device-tree/dist/src/arm/imx51-pinfunc.h
  head/sys/gnu/dts/arm/imx53-pinfunc.h
 - copied unchanged from r271150, 
vendor/device-tree/dist/src/arm/imx53-pinfunc.h
  head/sys/gnu/dts/arm/imx6dl-pinfunc.h
 - copied unchanged from r271150, 
vendor/device-tree/dist/src/arm/imx6dl-pinfunc.h
  head/sys/gnu/dts/arm/imx6q-pinfunc.h
 - copied unchanged from r271150, 
vendor/device-tree/dist/src/arm/imx6q-pinfunc.h
  head/sys/gnu/dts/arm/imx6sl-pinfunc.h
 - copied unchanged from r271150, 
vendor/device-tree/dist/src/arm/imx6sl-pinfunc.h
Modified:
Directory Properties:
  head/sys/gnu/dts/arm/   (props changed)

Copied: head/sys/gnu/dts/arm/imx51-pinfunc.h (from r271150, 
vendor/device-tree/dist/src/arm/imx51-pinfunc.h)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/gnu/dts/arm/imx51-pinfunc.hFri Sep  5 02:21:45 2014
(r271151, copy of r271150, vendor/device-tree/dist/src/arm/imx51-pinfunc.h)
@@ -0,0 +1,773 @@
+/*
+ * Copyright 2013 Freescale Semiconductor, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#ifndef __DTS_IMX51_PINFUNC_H
+#define __DTS_IMX51_PINFUNC_H
+
+/*
+ * The pin function ID is a tuple of
+ * 
+ */
+#define MX51_PAD_EIM_D16__AUD4_RXFS0x05c 0x3f0 0x000 0x5 
0x0
+#define MX51_PAD_EIM_D16__AUD5_TXD 0x05c 0x3f0 0x8d8 0x7 
0x0
+#define MX51_PAD_EIM_D16__EIM_D16  0x05c 0x3f0 0x000 0x0 
0x0
+#define MX51_PAD_EIM_D16__GPIO2_0  0x05c 0x3f0 0x000 0x1 
0x0
+#define MX51_PAD_EIM_D16__I2C1_SDA 0x05c 0x3f0 0x9b4 0x4 
0x0
+#define MX51_PAD_EIM_D16__UART2_CTS0x05c 0x3f0 0x000 0x3 
0x0
+#define MX51_PAD_EIM_D16__USBH2_DATA0  0x05c 0x3f0 0x000 0x2 
0x0
+#define MX51_PAD_EIM_D17__AUD5_RXD 0x060 0x3f4 0x8d4 0x7 
0x0
+#define MX51_PAD_EIM_D17__EIM_D17  0x060 0x3f4 0x000 0x0 
0x0
+#define MX51_PAD_EIM_D17__GPIO2_1  0x060 0x3f4 0x000 0x1 
0x0
+#define MX51_PAD_EIM_D17__UART2_RXD0x060 0x3f4 0x9ec 0x3 
0x0
+#define MX51_PAD_EIM_D17__UART3_CTS0x060 0x3f4 0x000 0x4 
0x0
+#define MX51_PAD_EIM_D17__USBH2_DATA1  0x060 0x3f4 0x000 0x2 
0x0
+#define MX51_PAD_EIM_D18__AUD5_TXC 0x064 0x3f8 0x8e4 0x7 
0x0
+#define MX51_PAD_EIM_D18__EIM_D18  0x064 0x3f8 0x000 0x0 
0x0
+#define MX51_PAD_EIM_D18__GPIO2_2  0x064 0x3f8 0x000 0x1 
0x0
+#define MX51_PAD_EIM_D18__UART2_TXD0x064 0x3f8 0x000 0x3 
0x0
+#define MX51_PAD_EIM_D18__UART3_RTS0x064 0x3f8 0x9f0 0x4 
0x1
+#define MX51_PAD_EIM_D18__USBH2_DATA2  0x064 0x3f8 0x000 0x2 
0x0
+#define MX51_PAD_EIM_D19__AUD4_RXC 0x068 0x3fc 0x000 0x5 
0x0
+#define MX51_PAD_EIM_D19__AUD5_TXFS0x068 0x3fc 0x8e8 0x7 
0x0
+#define MX51_PAD_EIM_D19__EIM_D19  0x068 0x3fc 0x000 0x0 
0x0
+#define MX51_PAD_EIM_D19__GPIO2_3  0x068 0x3fc 0x000 0x1 
0x0
+#define MX51_PAD_EIM_D19__I2C1_SCL 0x068 0x3fc 0x9b0 0x4 
0x0
+#define MX51_PAD_EIM_D19__UART2_RTS0x068 0x3fc 0x9e8 0x3 
0x1
+#define MX51_PAD_EIM_D19__USBH2_DATA3  0x068 0x3fc 0x000 0x2 
0x0
+#define MX51_PAD_EIM_D20__AUD4_TXD 0x06c 0x400 0x8c8 0x5 
0x0
+#define MX51_PAD_EIM_D20__EIM_D20  0x06c 0x400 0x000 0x0 
0x0
+#define MX51_PAD_EIM_D20__GPIO2_4  0x06c 0x400 0x000 0x1 
0x0
+#define MX51_PAD_EIM_D20__SRTC_ALARM_DEB   0x06c 0x400 0x000 0x4 
0x0
+#define MX51_PAD_EIM_D20__USBH2_DATA4  0x06c 0x400 0x000 0x2 
0x0
+#define MX51_PAD_EIM_D21__AUD4_RXD 0x070 0x404 0x8c4 0x5 
0x0
+#define MX51_PAD_EIM_D21__EIM_D21  0x070 0x404 0x000 0x0 
0x0
+#define MX51_PAD_EIM_D21__GPIO2_5  0x070 0x404 0x000 0x1 
0x0
+#define MX51_PAD_EIM_D21__SRTC_ALARM_DEB   0x070 0x404 0x000 0x3 
0x0
+#define MX51_PAD_EIM_D21__USBH2_DATA5  0x070 0x404 0x000 0x2 
0x0
+#define MX51_PAD_EIM_D22__AUD4_TXC 0x074 0x408 0x8cc 0x5 
0x0
+#define MX51_PAD_EIM_D22__EIM_D22  0x074 0x408 0x000 0x0 
0x0
+#define MX51_PAD_EIM_D22__GPIO2_6  0x074 0x408 0x000 0x1 
0x0
+#define MX51_PAD_EIM_D22__USBH2_DATA6  0x074 0x408 

Re: svn commit: r270850 - in head/sys: i386/i386 i386/include i386/isa x86/acpica

2014-09-04 Thread John Baldwin
On Tuesday, September 02, 2014 06:41:27 PM Konstantin Belousov wrote:
> On Tue, Sep 02, 2014 at 11:00:57AM -0400, John Baldwin wrote:
> > I thought about that.  I could easily make a parallel array, or perhaps
> > use a separate 'susppcb' structure that includes a pcb and the savefpu
> > union and change susppcbs to be an array of those.  Which do you prefer? 
> > If we want to move some state out of the PCB on amd64 into this, then a
> > separate struct for susppcbs might be the sanest.
> 
> Yes, separate structure seems to be a way forward.

Please see www.freebsd.org/~jhb/patches/susppcb.patch  Note that I moved
fpususpend() out into a C function on amd64 so that resumectx() could still 
operate on just a pcb.  This also makes savectx and resumectx more symmetric
and matches what I ended up doing on i386.  This is tested for suspend and
resume on both i386 and amd64.

> FWIW, I do not understand the need for pcb in its current form, allocated
> on the thread kernel stack, at all.  It looks like a vestige of the
> u-area, but serves no real purpose except to consume now precious stack
> space.
> 
> The idea of the part of the thread state that can be swapped out, together
> with the stack, seems to become alien.  Most of the thread state which is
> not needed when the thread is not runnable, now goes to struct thread
> anyway.  Might be, we should move the pcb into td_md.  People actively
> object to the idea of the swappable kernel stack when they learn
> hard that local vars cannot participate in the global lists.
> 
> The only thing which is currently allocated below the pcb and which
> seems to be reasonable to swap out, is the FPU context on amd64.

I will defer to Peter on this as I believe he is the one that split the PCB 
out from the rest of the u-area (or what was left of it).  My gut is that you 
are probably right and that it would be better to leave that room for the 
stack than to use it for the pcb.

-- 
John Baldwin
___
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: r271154 - head/sys/sys

2014-09-04 Thread Ed Schouten
Author: ed
Date: Fri Sep  5 05:20:52 2014
New Revision: 271154
URL: http://svnweb.freebsd.org/changeset/base/271154

Log:
  Partially revert r271012.
  
  Incredibly weird: GCC 4.7/4.9 do support the _Noreturn and _Thread_local
  keywords, but not during bootstrapping. GCC is by far the weirdest
  compiler that I've ever used.
  
  Reported by:  andreast@

Modified:
  head/sys/sys/cdefs.h

Modified: head/sys/sys/cdefs.h
==
--- head/sys/sys/cdefs.hFri Sep  5 05:07:38 2014(r271153)
+++ head/sys/sys/cdefs.hFri Sep  5 05:20:52 2014(r271154)
@@ -280,13 +280,11 @@
 #define_Atomic(T)  struct { T volatile __val; }
 #endif
 
-#if !__GNUC_PREREQ__(4, 7)
 #if defined(__cplusplus) && __cplusplus >= 201103L
 #define_Noreturn   [[noreturn]]
 #else
 #define_Noreturn   __dead2
 #endif
-#endif
 
 #if !__has_extension(c_static_assert) && !__GNUC_PREREQ__(4, 7)
 #if (defined(__cplusplus) && __cplusplus >= 201103L) || \
@@ -301,7 +299,7 @@
 #endif
 #endif
 
-#if !__has_extension(c_thread_local) && !__GNUC_PREREQ__(4, 9)
+#if !__has_extension(c_thread_local)
 /*
  * XXX: Some compilers (Clang 3.3, GCC 4.7) falsely announce C++11 mode
  * without actually supporting the thread_local keyword. Don't check for
___
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: r271155 - in head: include sys/sys

2014-09-04 Thread Ed Schouten
Author: ed
Date: Fri Sep  5 05:36:32 2014
New Revision: 271155
URL: http://svnweb.freebsd.org/changeset/base/271155

Log:
  Roll back r271012 even more aggressively.
  
  I've looked at the GCC sources and I now understand what's going wrong.
  THe C11 keywords are simply nonexistent when using C++ mode. They are
  marked as C-only in the parser. This is absolutely impractical for
  multiple reasons:
  
  - The C11 keywords do not conflict with C++ naming rules. They all start
with _[A-Z]. There is no reason to make them C-only.
  
  - It makes it practically impossible for people to use these keywords in
C header files and expect them to work from within C++ sources.
  
  As I said in my previous commit message: GCC is by far the weirdest
  compiler that I've ever used.

Modified:
  head/include/tgmath.h
  head/sys/sys/cdefs.h

Modified: head/include/tgmath.h
==
--- head/include/tgmath.h   Fri Sep  5 05:20:52 2014(r271154)
+++ head/include/tgmath.h   Fri Sep  5 05:36:32 2014(r271155)
@@ -61,7 +61,7 @@
  */
 
 #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \
-__has_extension(c_generic_selections) || __GNUC_PREREQ__(4, 9)
+__has_extension(c_generic_selections)
 #define__tg_generic(x, cfnl, cfn, cfnf, fnl, fn, fnf)  
\
_Generic(x, \
long double _Complex: cfnl, \

Modified: head/sys/sys/cdefs.h
==
--- head/sys/sys/cdefs.hFri Sep  5 05:20:52 2014(r271154)
+++ head/sys/sys/cdefs.hFri Sep  5 05:36:32 2014(r271155)
@@ -254,7 +254,7 @@
 
 #if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L
 
-#if !__has_extension(c_alignas) && !__GNUC_PREREQ__(4, 7)
+#if !__has_extension(c_alignas)
 #if (defined(__cplusplus) && __cplusplus >= 201103L) || \
 __has_extension(cxx_alignas)
 #define_Alignas(x) alignas(x)
@@ -264,13 +264,11 @@
 #endif
 #endif
 
-#if !__GNUC_PREREQ__(4, 7)
 #if defined(__cplusplus) && __cplusplus >= 201103L
 #define_Alignof(x) alignof(x)
 #else
 #define_Alignof(x) __alignof(x)
 #endif
-#endif
 
 #if !__has_extension(c_atomic) && !__has_extension(cxx_atomic)
 /*
@@ -286,7 +284,7 @@
 #define_Noreturn   __dead2
 #endif
 
-#if !__has_extension(c_static_assert) && !__GNUC_PREREQ__(4, 7)
+#if !__has_extension(c_static_assert)
 #if (defined(__cplusplus) && __cplusplus >= 201103L) || \
 __has_extension(cxx_static_assert)
 #define_Static_assert(x, y)static_assert(x, y)
@@ -325,7 +323,7 @@
  */
 
 #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \
-__has_extension(c_generic_selections) || __GNUC_PREREQ__(4, 9)
+__has_extension(c_generic_selections)
 #define__generic(expr, t, yes, no) 
\
_Generic(expr, t: yes, default: no)
 #elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus)
___
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"