Re: svn commit: r258686 - head/sbin/fdisk

2013-11-27 Thread Juli Mallett
On Wed, Nov 27, 2013 at 11:00 PM, Gleb Smirnoff  wrote:

>   Juli,
>
> On Wed, Nov 27, 2013 at 05:59:14PM +, Juli Mallett wrote:
> J> Author: jmallett
> J> Date: Wed Nov 27 17:59:13 2013
> J> New Revision: 258686
> J> URL: http://svnweb.freebsd.org/changeset/base/258686
> J>
> J> Log:
> J>   Fix fdisk(8) to create 2TB partitions on disks larger than 2TB,
> rather than
> J>   only being able to create 1TB partitions:
> J>   o) Use an unsigned 32-bit quantity to store the number of disk
> sectors.
> J>   o) Detect overflow of said 32-bit quantity and clamp to 2^32.
> J>   o) Rather than returning the disk sector count from get_params,
> return 0 on
> J>  success, since its return value is only ever compared to -1 to
> detect
> J>  failure.  This would cause returning 2^32 sectors to be
> interpreted as an
> J>  error.
> J>
> J>   Reviewed by:   bde ("good for a quick fix")
>
> What is the reason to use fdisk today, instead of gpart?
>

Habit?  Hysterical reasons?  Ease-of-use?  (The fact that I find fdisk(8)
easier to use than gpart(8) is probably a bug in me and not in gpart(8),
but it always takes me too many steps to get things done with gpart(8),
including some manpage reading.)  Being fairly self-contained so that one
can use it in automated systems without worrying about which geom(4)
modules are in the host system's kernel is probably the most-reasonable
version.

If it's so deprecated that leaving bugs in it is desirable, please remove
it from the tree entirely :)

Thanks,
Juli.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r258686 - head/sbin/fdisk

2013-11-27 Thread Gleb Smirnoff
  Juli,

On Wed, Nov 27, 2013 at 05:59:14PM +, Juli Mallett wrote:
J> Author: jmallett
J> Date: Wed Nov 27 17:59:13 2013
J> New Revision: 258686
J> URL: http://svnweb.freebsd.org/changeset/base/258686
J> 
J> Log:
J>   Fix fdisk(8) to create 2TB partitions on disks larger than 2TB, rather than
J>   only being able to create 1TB partitions:
J>   o) Use an unsigned 32-bit quantity to store the number of disk sectors.
J>   o) Detect overflow of said 32-bit quantity and clamp to 2^32.
J>   o) Rather than returning the disk sector count from get_params, return 0 on
J>  success, since its return value is only ever compared to -1 to detect
J>  failure.  This would cause returning 2^32 sectors to be interpreted as 
an
J>  error.
J>   
J>   Reviewed by:   bde ("good for a quick fix")

What is the reason to use fdisk today, instead of gpart?


-- 
Totus tuus, Glebius.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r258702 - in head: lib/libnetgraph share/man/man4

2013-11-27 Thread Gleb Smirnoff
Author: glebius
Date: Thu Nov 28 06:45:30 2013
New Revision: 258702
URL: http://svnweb.freebsd.org/changeset/base/258702

Log:
  Fix some misinformation in netgraph manual pages.
  
  Submitted by: Dmitry Luhtionov 

Modified:
  head/lib/libnetgraph/netgraph.3
  head/share/man/man4/netgraph.4

Modified: head/lib/libnetgraph/netgraph.3
==
--- head/lib/libnetgraph/netgraph.3 Thu Nov 28 05:44:44 2013
(r258701)
+++ head/lib/libnetgraph/netgraph.3 Thu Nov 28 06:45:30 2013
(r258702)
@@ -35,7 +35,7 @@
 .\" $FreeBSD$
 .\" $Whistle: netgraph.3,v 1.7 1999/01/25 07:14:06 archie Exp $
 .\"
-.Dd January 27, 2004
+.Dd November 25, 2013
 .Dt NETGRAPH 3
 .Os
 .Sh NAME
@@ -57,7 +57,7 @@
 .Sh LIBRARY
 .Lb libnetgraph
 .Sh SYNOPSIS
-.In netgraph.h
+.In netgraph/netgraph.h
 .Ft int
 .Fn NgMkSockNode "const char *name" "int *csp" "int *dsp"
 .Ft int

Modified: head/share/man/man4/netgraph.4
==
--- head/share/man/man4/netgraph.4  Thu Nov 28 05:44:44 2013
(r258701)
+++ head/share/man/man4/netgraph.4  Thu Nov 28 06:45:30 2013
(r258702)
@@ -36,7 +36,7 @@
 .\" $Whistle: netgraph.4,v 1.7 1999/01/28 23:54:52 julian Exp $
 .\" $FreeBSD$
 .\"
-.Dd May 25, 2008
+.Dd November 25, 2013
 .Dt NETGRAPH 4
 .Os
 .Sh NAME
@@ -292,7 +292,7 @@ unless specifically declared to be a rea
 (See
 .Dv NGM_READONLY
 in
-.In ng_message.h . )
+.In netgraph/ng_message.h . )
 .Pp
 While this mode of operation
 results in good performance, it has a few implications for node
@@ -840,26 +840,27 @@ and should be used as a starting point f
 .Ss Netgraph Message Structure
 Control messages have the following structure:
 .Bd -literal
-#define NG_CMDSTRSIZ32  /* Max command string (including nul) */
+#define NG_CMDSTRSIZ32  /* Max command string (including null) */
 
 struct ng_mesg {
   struct ng_msghdr {
 u_char  version;/* Must equal NG_VERSION */
-u_char  spare;  /* Pad to 2 bytes */
-u_short arglen; /* Length of cmd/resp data */
-u_long  flags;  /* Message status flags */
-u_long  token;  /* Reply should have the same token */
-u_long  typecookie; /* Node type understanding this message */
-u_long  cmd;/* Command identifier */
-u_char  cmdstr[NG_CMDSTRSIZ]; /* Cmd string (for debug) */
+u_char  spare;  /* Pad to 4 bytes */
+uint16_tspare2;
+uint32_targlen; /* Length of cmd/resp data */
+uint32_tcmd;/* Command identifier */
+uint32_tflags;  /* Message status flags */
+uint32_ttoken;  /* Reply should have the same token */
+uint32_ttypecookie; /* Node type understanding this message */
+u_char  cmdstr[NG_CMDSTRSIZ];  /* cmd string + \0 */
   } header;
-  char  data[0];/* Start of cmd/resp data */
+  char  data[]; /* placeholder for actual data */
 };
 
-#define NG_ABI_VERSION  5   /* Netgraph kernel ABI version */
-#define NG_VERSION  4   /* Netgraph message version */
-#define NGF_ORIG0x  /* Command */
-#define NGF_RESP0x0001  /* Response */
+#define NG_ABI_VERSION  12  /* Netgraph kernel ABI version */
+#define NG_VERSION  8   /* Netgraph message version */
+#define NGF_ORIG0x  /* The msg is the original request */
+#define NGF_RESP0x0001  /* The message is a response */
 .Ed
 .Pp
 Control messages have the fixed header shown above, followed by a
@@ -1296,7 +1297,7 @@ Used in conjunction with
 either
 .Xr ppp 8
 or the
-.Pa net/mpd
+.Pa net/mpd5
 port.
 .It BRIDGE
 This node, together with the Ethernet nodes, allows a very flexible
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r258700 - head/share/misc

2013-11-27 Thread Mark Peek
Author: mp
Date: Wed Nov 27 23:26:54 2013
New Revision: 258700
URL: http://svnweb.freebsd.org/changeset/base/258700

Log:
  Add myself to the committers-src list.

Modified:
  head/share/misc/committers-src.dot   (contents, props changed)

Modified: head/share/misc/committers-src.dot
==
--- head/share/misc/committers-src.dot  Wed Nov 27 22:18:08 2013
(r258699)
+++ head/share/misc/committers-src.dot  Wed Nov 27 23:26:54 2013
(r258700)
@@ -223,6 +223,7 @@ mjacob [label="Matt Jacob\nmjacob@FreeBS
 mjg [label="Mateusz Guzik\n...@freebsd.org\n2012/06/04"]
 mlaier [label="Max Laier\nmla...@freebsd.org\n2004/02/10"]
 monthadar [label="Monthadar Al Jaberi\nmontha...@freebsd.org\n2012/04/02"]
+mp [label="Mark Peek\n...@freebsd.org\n2001/07/27"]
 mr [label="Michael Reifenberger\n...@freebsd.org\n2001/09/30"]
 neel [label="Neel Natu\nn...@freebsd.org\n2009/09/20"]
 netchild [label="Alexander Leidinger\nnetch...@freebsd.org\n2005/03/31"]
@@ -515,6 +516,7 @@ julian -> davidxu
 julian -> archie
 julian -> adrian
 julian -> zec
+julian -> mp
 
 kan -> kib
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r258699 - in head: sys/amd64/vmm sys/amd64/vmm/io usr.sbin/bhyve

2013-11-27 Thread Neel Natu
Author: neel
Date: Wed Nov 27 22:18:08 2013
New Revision: 258699
URL: http://svnweb.freebsd.org/changeset/base/258699

Log:
  Add support for level triggered interrupt pins on the vioapic. Prior to this
  commit level triggered interrupts would work as long as the pin was not shared
  among multiple interrupt sources.
  
  The vlapic now keeps track of level triggered interrupts in the trigger mode
  register and will forward the EOI for a level triggered interrupt to the
  vioapic. The vioapic in turn uses the EOI to sample the level on the pin and
  re-inject the vector if the pin is still asserted.
  
  The vhpet is the first consumer of level triggered interrupts and advertises
  that it can generate interrupts on pins 20 through 23 of the vioapic.
  
  Discussed with:   grehan@

Modified:
  head/sys/amd64/vmm/io/ppt.c
  head/sys/amd64/vmm/io/vhpet.c
  head/sys/amd64/vmm/io/vioapic.c
  head/sys/amd64/vmm/io/vioapic.h
  head/sys/amd64/vmm/io/vlapic.c
  head/sys/amd64/vmm/io/vlapic.h
  head/sys/amd64/vmm/vmm_dev.c
  head/sys/amd64/vmm/vmm_ktr.h
  head/sys/amd64/vmm/vmm_lapic.c
  head/sys/amd64/vmm/vmm_lapic.h
  head/usr.sbin/bhyve/acpi.c
  head/usr.sbin/bhyve/mptbl.c

Modified: head/sys/amd64/vmm/io/ppt.c
==
--- head/sys/amd64/vmm/io/ppt.c Wed Nov 27 22:17:00 2013(r258698)
+++ head/sys/amd64/vmm/io/ppt.c Wed Nov 27 22:18:08 2013(r258699)
@@ -421,7 +421,7 @@ pptintr(void *arg)
vec = pptarg->vec;
 
if (ppt->vm != NULL)
-   (void) lapic_set_intr(ppt->vm, pptarg->vcpu, vec);
+   lapic_intr_edge(ppt->vm, pptarg->vcpu, vec);
else {
/*
 * XXX

Modified: head/sys/amd64/vmm/io/vhpet.c
==
--- head/sys/amd64/vmm/io/vhpet.c   Wed Nov 27 22:17:00 2013
(r258698)
+++ head/sys/amd64/vmm/io/vhpet.c   Wed Nov 27 22:18:08 2013
(r258699)
@@ -266,14 +266,14 @@ vhpet_timer_interrupt(struct vhpet *vhpe
if (apicid != 0xff) {
/* unicast */
vcpuid = vm_apicid2vcpuid(vhpet->vm, apicid);
-   lapic_set_intr(vhpet->vm, vcpuid, vector);
+   lapic_intr_edge(vhpet->vm, vcpuid, vector);
} else {
/* broadcast */
dmask = vm_active_cpus(vhpet->vm);
while ((vcpuid = CPU_FFS(&dmask)) != 0) {
vcpuid--;
CPU_CLR(vcpuid, &dmask);
-   lapic_set_intr(vhpet->vm, vcpuid, vector);
+   lapic_intr_edge(vhpet->vm, vcpuid, vector);
}
}
return;
@@ -725,8 +725,9 @@ done:
 struct vhpet *
 vhpet_init(struct vm *vm)
 {
-   int i;
+   int i, pincount;
struct vhpet *vhpet;
+   uint64_t allowed_irqs;
struct vhpet_callout_arg *arg;
struct bintime bt;
 
@@ -737,12 +738,20 @@ vhpet_init(struct vm *vm)
FREQ2BT(HPET_FREQ, &bt);
vhpet->freq_sbt = bttosbt(bt);
 
+   pincount = vioapic_pincount(vm);
+   if (pincount >= 24)
+   allowed_irqs = 0x00f0;  /* irqs 20, 21, 22 and 23 */
+   else
+   allowed_irqs = 0;
+
/*
 * Initialize HPET timer hardware state.
 */
for (i = 0; i < VHPET_NUM_TIMERS; i++) {
-   vhpet->timer[i].cap_config = 0UL << 32 |
-   HPET_TCAP_FSB_INT_DEL | HPET_TCAP_PER_INT;
+   vhpet->timer[i].cap_config = allowed_irqs << 32;
+   vhpet->timer[i].cap_config |= HPET_TCAP_PER_INT;
+   vhpet->timer[i].cap_config |= HPET_TCAP_FSB_INT_DEL;
+
vhpet->timer[i].compval = 0x;
callout_init(&vhpet->timer[i].callout, 1);
 

Modified: head/sys/amd64/vmm/io/vioapic.c
==
--- head/sys/amd64/vmm/io/vioapic.c Wed Nov 27 22:17:00 2013
(r258698)
+++ head/sys/amd64/vmm/io/vioapic.c Wed Nov 27 22:18:08 2013
(r258699)
@@ -49,8 +49,8 @@ __FBSDID("$FreeBSD$");
 #defineIOREGSEL0x00
 #defineIOWIN   0x10
 
-#defineREDIR_ENTRIES   16
-#defineINTR_ASSERTED(vioapic, pin) ((vioapic)->rtbl[(pin)].pinstate == 
true)
+#defineREDIR_ENTRIES   24
+#defineRTBL_RO_BITS((uint64_t)(IOART_REM_IRR | IOART_DELIVS))
 
 struct vioapic {
struct vm   *vm;
@@ -59,8 +59,7 @@ struct vioapic {
uint32_tioregsel;
struct {
uint64_t reg;
-   bool pinstate;
-   bool pending;
+   int  acnt;  /* sum of pin asserts (+1) and deasserts (-1) */
} rtbl[REDIR_ENTRIES];
 };
 
@@ -79,6 +78,9 @@ 

svn commit: r258698 - head/tools/tools/cxgbetool

2013-11-27 Thread Navdeep Parhar
Author: np
Date: Wed Nov 27 22:17:00 2013
New Revision: 258698
URL: http://svnweb.freebsd.org/changeset/base/258698

Log:
  cxgbetool: "modinfo" command to display SFP+ module information.
  
  trantor:~# cxgbetool t5nex0 modinfo 1
  ID: SFP
  Vendor FINISAR CORP.
  SN AJ10JQR
  PN FTLX8571D3BCL
  Rev A
  Temp: +35C
  Vcc 3.225600V
  TX Bias 2.176000uA
  TX Power 0.588800mW
  RX Power 0.486400mW
  
  Submitted by: gnn

Modified:
  head/tools/tools/cxgbetool/Makefile
  head/tools/tools/cxgbetool/cxgbetool.c

Modified: head/tools/tools/cxgbetool/Makefile
==
--- head/tools/tools/cxgbetool/Makefile Wed Nov 27 22:02:55 2013
(r258697)
+++ head/tools/tools/cxgbetool/Makefile Wed Nov 27 22:17:00 2013
(r258698)
@@ -3,7 +3,7 @@
 PROG=  cxgbetool
 SRCS=  cxgbetool.c
 NO_MAN=
-CFLAGS+= -I${.CURDIR}/../../../sys/dev/cxgbe -I.
+CFLAGS+= -I${.CURDIR}/../../../sys/dev/cxgbe -I${.CURDIR}/../../../sys -I.
 BINDIR?= /usr/sbin
 
 .include 

Modified: head/tools/tools/cxgbetool/cxgbetool.c
==
--- head/tools/tools/cxgbetool/cxgbetool.c  Wed Nov 27 22:02:55 2013
(r258697)
+++ head/tools/tools/cxgbetool/cxgbetool.c  Wed Nov 27 22:17:00 2013
(r258698)
@@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include "t4_ioctl.h"
 
@@ -94,6 +95,7 @@ usage(FILE *fp)
"\ti2c[] read from i2c device\n"
"\tloadfwinstall firmware\n"
"\tmemdump  dump a memory range\n"
+   "\tmodinfo   optics/cable information\n"
"\treg [=]   read/write register\n"
"\treg64 [=] read/write 64 bit register\n"
"\tregdump [] ...  dump registers\n"
@@ -1828,6 +1830,135 @@ set_tracer(uint8_t idx, int argc, const 
 }
 
 static int
+modinfo(int argc, const char *argv[])
+{
+   long port;
+   char string[16], *p;
+   struct t4_i2c_data i2cd;
+   int rc, i;
+   uint16_t temp, vcc, tx_bias, tx_power, rx_power;
+
+   if (argc != 1) {
+   warnx("must supply a port");
+   return (EINVAL);
+   }
+
+   p = str_to_number(argv[0], &port, NULL);
+   if (*p || port > UCHAR_MAX) {
+   warnx("invalid port id \"%s\"", argv[0]);
+   return (EINVAL);
+   }
+
+   bzero(&i2cd, sizeof(i2cd));
+   i2cd.len = 1;
+   i2cd.port_id = port;
+   i2cd.dev_addr = SFF_8472_BASE;
+
+   i2cd.offset = SFF_8472_ID;
+   if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0)
+   goto fail;
+
+   if (i2cd.data[0] > SFF_8472_ID_LAST)
+   printf("Unknown ID\n");
+   else
+   printf("ID: %s\n", sff_8472_id[i2cd.data[0]]);
+
+   bzero(&string, sizeof(string));
+   for (i = SFF_8472_VENDOR_START; i < SFF_8472_VENDOR_END; i++) {
+   i2cd.offset = i;
+   if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0)
+   goto fail;
+   string[i - SFF_8472_VENDOR_START] = i2cd.data[0];
+   }
+   printf("Vendor %s\n", string);
+
+   bzero(&string, sizeof(string));
+   for (i = SFF_8472_SN_START; i < SFF_8472_SN_END; i++) {
+   i2cd.offset = i;
+   if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0)
+   goto fail;
+   string[i - SFF_8472_SN_START] = i2cd.data[0];
+   }
+   printf("SN %s\n", string);
+
+   bzero(&string, sizeof(string));
+   for (i = SFF_8472_PN_START; i < SFF_8472_PN_END; i++) {
+   i2cd.offset = i;
+   if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0)
+   goto fail;
+   string[i - SFF_8472_PN_START] = i2cd.data[0];
+   }
+   printf("PN %s\n", string);
+
+   bzero(&string, sizeof(string));
+   for (i = SFF_8472_REV_START; i < SFF_8472_REV_END; i++) {
+   i2cd.offset = i;
+   if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0)
+   goto fail;
+   string[i - SFF_8472_REV_START] = i2cd.data[0];
+   }
+   printf("Rev %s\n", string);
+
+   i2cd.offset = SFF_8472_DIAG_TYPE;
+   if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0)
+   goto fail;
+
+   if ((char )i2cd.data[0] & (SFF_8472_DIAG_IMPL |
+  SFF_8472_DIAG_INTERNAL)) {
+
+   /* Switch to reading from the Diagnostic address. */
+   i2cd.dev_addr = SFF_8472_DIAG;
+   i2cd.len = 1;
+
+   i2cd.offset = SFF_8472_TEMP;
+   if ((rc = doit(CHELSIO_T4_GET_I2C, &i2cd)) != 0)
+   goto fail;
+   temp = i2cd.data[0] << 8;
+   printf("Temp: ");
+   if ((temp & SFF_8472_TEMP_SIGN) == SFF_8472_TEMP_

svn commit: r258697 - head/sys/powerpc/pseries

2013-11-27 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Wed Nov 27 22:02:55 2013
New Revision: 258697
URL: http://svnweb.freebsd.org/changeset/base/258697

Log:
  This driver doesn't need the /options node, so don't check for it.

Modified:
  head/sys/powerpc/pseries/phyp_console.c

Modified: head/sys/powerpc/pseries/phyp_console.c
==
--- head/sys/powerpc/pseries/phyp_console.c Wed Nov 27 22:01:09 2013
(r258696)
+++ head/sys/powerpc/pseries/phyp_console.c Wed Nov 27 22:02:55 2013
(r258697)
@@ -192,11 +192,9 @@ uart_phyp_cnprobe(struct consdev *cp)
 {
char buf[64];
ihandle_t stdout;
-   phandle_t input, opts, chosen;
+   phandle_t input, chosen;
static struct uart_phyp_softc sc;
 
-   if ((opts = OF_finddevice("/options")) == -1)
-   goto fail;
if ((chosen = OF_finddevice("/chosen")) == -1)
goto fail;
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r258696 - in head/sys/powerpc: aim booke powermac

2013-11-27 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Wed Nov 27 22:01:09 2013
New Revision: 258696
URL: http://svnweb.freebsd.org/changeset/base/258696

Log:
  badaddr() is used only in the grackle PCI driver, so move its definition
  there. Clean up a spurious setfault() declaration as well.

Modified:
  head/sys/powerpc/aim/machdep.c
  head/sys/powerpc/aim/trap.c
  head/sys/powerpc/booke/trap.c
  head/sys/powerpc/powermac/grackle.c

Modified: head/sys/powerpc/aim/machdep.c
==
--- head/sys/powerpc/aim/machdep.c  Wed Nov 27 21:55:43 2013
(r258695)
+++ head/sys/powerpc/aim/machdep.c  Wed Nov 27 22:01:09 2013
(r258696)
@@ -157,8 +157,6 @@ SYSCTL_INT(_machdep, CPU_CACHELINE, cach
 
 uintptr_t  powerpc_init(vm_offset_t, vm_offset_t, vm_offset_t, void *);
 
-int setfault(faultbuf); /* defined in locore.S */
-
 long   Maxmem = 0;
 long   realmem = 0;
 

Modified: head/sys/powerpc/aim/trap.c
==
--- head/sys/powerpc/aim/trap.c Wed Nov 27 21:55:43 2013(r258695)
+++ head/sys/powerpc/aim/trap.c Wed Nov 27 22:01:09 2013(r258696)
@@ -87,12 +87,6 @@ static int   handle_user_slb_spill(pmap_t 
 extern int n_slbs;
 #endif
 
-intsetfault(faultbuf); /* defined in locore.S */
-
-/* Why are these not defined in a header? */
-intbadaddr(void *, size_t);
-intbadaddr_read(void *, size_t, int *);
-
 struct powerpc_exception {
u_int   vector;
char*name;
@@ -690,59 +684,6 @@ trap_pfault(struct trapframe *frame, int
return (SIGSEGV);
 }
 
-int
-badaddr(void *addr, size_t size)
-{
-   return (badaddr_read(addr, size, NULL));
-}
-
-int
-badaddr_read(void *addr, size_t size, int *rptr)
-{
-   struct thread   *td;
-   faultbufenv;
-   int x;
-
-   /* Get rid of any stale machine checks that have been waiting.  */
-   __asm __volatile ("sync; isync");
-
-   td = curthread;
-
-   if (setfault(env)) {
-   td->td_pcb->pcb_onfault = 0;
-   __asm __volatile ("sync");
-   return 1;
-   }
-
-   __asm __volatile ("sync");
-
-   switch (size) {
-   case 1:
-   x = *(volatile int8_t *)addr;
-   break;
-   case 2:
-   x = *(volatile int16_t *)addr;
-   break;
-   case 4:
-   x = *(volatile int32_t *)addr;
-   break;
-   default:
-   panic("badaddr: invalid size (%zd)", size);
-   }
-
-   /* Make sure we took the machine check, if we caused one. */
-   __asm __volatile ("sync; isync");
-
-   td->td_pcb->pcb_onfault = 0;
-   __asm __volatile ("sync");  /* To be sure. */
-
-   /* Use the value to avoid reorder. */
-   if (rptr)
-   *rptr = x;
-
-   return (0);
-}
-
 /*
  * For now, this only deals with the particular unaligned access case
  * that gcc tends to generate.  Eventually it should handle all of the

Modified: head/sys/powerpc/booke/trap.c
==
--- head/sys/powerpc/booke/trap.c   Wed Nov 27 21:55:43 2013
(r258695)
+++ head/sys/powerpc/booke/trap.c   Wed Nov 27 22:01:09 2013
(r258696)
@@ -87,12 +87,6 @@ static int   fix_unaligned(struct thread *
 static int handle_onfault(struct trapframe *frame);
 static voidsyscall(struct trapframe *frame);
 
-intsetfault(faultbuf); /* defined in locore.S */
-
-/* Why are these not defined in a header? */
-intbadaddr(void *, size_t);
-intbadaddr_read(void *, size_t, int *);
-
 struct powerpc_exception {
u_int   vector;
char*name;
@@ -461,60 +455,6 @@ trap_pfault(struct trapframe *frame, int
return ((rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV);
 }
 
-int
-badaddr(void *addr, size_t size)
-{
-
-   return (badaddr_read(addr, size, NULL));
-}
-
-int
-badaddr_read(void *addr, size_t size, int *rptr)
-{
-   struct thread   *td;
-   faultbufenv;
-   int x;
-
-   /* Get rid of any stale machine checks that have been waiting.  */
-   __asm __volatile ("sync; isync");
-
-   td = curthread;
-
-   if (setfault(env)) {
-   td->td_pcb->pcb_onfault = 0;
-   __asm __volatile ("sync");
-   return (1);
-   }
-
-   __asm __volatile ("sync");
-
-   switch (size) {
-   case 1:
-   x = *(volatile int8_t *)addr;
-   break;
-   case 2:
-   x = *(volatile int16_t *)addr;
-   break;
-   case 4:
-   x = *(volatile int32_t *)addr;
-   break;
-   default:
-   panic("badaddr: invalid size (%d)", size);
-   }
-
-   /* Make sure we took the machine check, if we caused one

svn commit: r258695 - head/usr.sbin/makefs

2013-11-27 Thread Juli Mallett
Author: jmallett
Date: Wed Nov 27 21:55:43 2013
New Revision: 258695
URL: http://svnweb.freebsd.org/changeset/base/258695

Log:
  Provide a helpful diagnostic when the minimum size rounded to the block size
  would exceed the maximum size.  This can be a difficult problem to diagnose
  if one is, for instance, using -s with a fixed size in a script and the bsize
  calculated for a filesystem image changes, necessitating a re-rounding of the
  image size or a hand-setting of the bsize.  Previously one would get a
  cryptic message about how the size exceeded the maximum size, which normally
  only happens if the contents of the image are larger than specified.

Modified:
  head/usr.sbin/makefs/ffs.c

Modified: head/usr.sbin/makefs/ffs.c
==
--- head/usr.sbin/makefs/ffs.c  Wed Nov 27 21:51:34 2013(r258694)
+++ head/usr.sbin/makefs/ffs.c  Wed Nov 27 21:55:43 2013(r258695)
@@ -361,6 +361,13 @@ ffs_validate(const char *dir, fsnode *ro
if (ffs_opts->avgfpdir == -1)
ffs_opts->avgfpdir = AFPDIR;
 
+   if (roundup(fsopts->minsize, ffs_opts->bsize) > fsopts->maxsize)
+   errx(1, "`%s' minsize of %lld rounded up to ffs bsize of %d "
+   "exceeds maxsize %lld.  Lower bsize, or round the minimum "
+   "and maximum sizes to bsize.", dir,
+   (long long)fsopts->minsize, ffs_opts->bsize,
+   (long long)fsopts->maxsize);
+
/* calculate size of tree */
ffs_size_dir(root, fsopts);
fsopts->inodes += ROOTINO;  /* include first two inodes */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r258694 - head/sys/powerpc/ofw

2013-11-27 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Wed Nov 27 21:51:34 2013
New Revision: 258694
URL: http://svnweb.freebsd.org/changeset/base/258694

Log:
  Make RTAS calls, which call setfault() to recover from machine checks,
  preserve any existing fault buffer. RTAS calls are meant to be safe from
  interrupt context (and are indeed used there to implement the xics PIC
  drvier). Without this, calling into RTAS in interrupt context would have
  the effect of clearing any existing onfault state of the interrupted
  thread, potentially leading to a panic.

Modified:
  head/sys/powerpc/ofw/rtas.c

Modified: head/sys/powerpc/ofw/rtas.c
==
--- head/sys/powerpc/ofw/rtas.c Wed Nov 27 20:56:10 2013(r258693)
+++ head/sys/powerpc/ofw/rtas.c Wed Nov 27 21:51:34 2013(r258694)
@@ -192,7 +192,7 @@ int
 rtas_call_method(cell_t token, int nargs, int nreturns, ...)
 {
vm_offset_t argsptr;
-   faultbuf env;
+   faultbuf env, *oldfaultbuf;
va_list ap;
struct {
cell_t token;
@@ -221,6 +221,7 @@ rtas_call_method(cell_t token, int nargs
 
/* Get rid of any stale machine checks that have been waiting.  */
__asm __volatile ("sync; isync");
+   oldfaultbuf = curthread->td_pcb->pcb_onfault;
 if (!setfault(env)) {
__asm __volatile ("sync");
result = rtascall(argsptr, rtas_private_data);
@@ -228,7 +229,7 @@ rtas_call_method(cell_t token, int nargs
} else {
result = RTAS_HW_ERROR;
}
-   curthread->td_pcb->pcb_onfault = 0;
+   curthread->td_pcb->pcb_onfault = oldfaultbuf;
__asm __volatile ("sync");
 
rtas_real_unmap(argsptr, &args, sizeof(args));
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r258693 - head/sys/vm

2013-11-27 Thread Alexander Motin
Author: mav
Date: Wed Nov 27 20:56:10 2013
New Revision: 258693
URL: http://svnweb.freebsd.org/changeset/base/258693

Log:
  Make UMA to not blindly force offpage slab header allocation for large
  (> PAGE_SIZE) zones.  If zone is not multiple to PAGE_SIZE, there may
  be enough space for the header at the last page, so we may avoid extra
  header memory allocation and hash table update/lookup.
  
  ZFS creates bunch of odd-sized UMA zones (5120, 6144, 7168, 10240, 14336).
  This change gives good use to at least some of otherwise lost memory there.
  
  Reviewed by:  avg

Modified:
  head/sys/vm/uma_core.c

Modified: head/sys/vm/uma_core.c
==
--- head/sys/vm/uma_core.c  Wed Nov 27 20:20:02 2013(r258692)
+++ head/sys/vm/uma_core.c  Wed Nov 27 20:56:10 2013(r258693)
@@ -1318,6 +1318,7 @@ keg_small_init(uma_keg_t keg)
 static void
 keg_large_init(uma_keg_t keg)
 {
+   u_int shsize;
 
KASSERT(keg != NULL, ("Keg is null in keg_large_init"));
KASSERT((keg->uk_flags & UMA_ZFLAG_CACHEONLY) == 0,
@@ -1334,8 +1335,21 @@ keg_large_init(uma_keg_t keg)
if (keg->uk_flags & UMA_ZFLAG_INTERNAL)
return;
 
-   keg->uk_flags |= UMA_ZONE_OFFPAGE;
-   if ((keg->uk_flags & UMA_ZONE_VTOSLAB) == 0)
+   /* Check whether we have enough space to not do OFFPAGE. */
+   if ((keg->uk_flags & UMA_ZONE_OFFPAGE) == 0) {
+   shsize = sizeof(struct uma_slab);
+   if (keg->uk_flags & UMA_ZONE_REFCNT)
+   shsize += keg->uk_ipers * sizeof(uint32_t);
+   if (shsize & UMA_ALIGN_PTR)
+   shsize = (shsize & ~UMA_ALIGN_PTR) +
+   (UMA_ALIGN_PTR + 1);
+
+   if ((PAGE_SIZE * keg->uk_ppera) - keg->uk_rsize < shsize)
+   keg->uk_flags |= UMA_ZONE_OFFPAGE;
+   }
+
+   if ((keg->uk_flags & UMA_ZONE_OFFPAGE) &&
+   (keg->uk_flags & UMA_ZONE_VTOSLAB) == 0)
keg->uk_flags |= UMA_ZONE_HASH;
 }
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r258692 - head/sys/net

2013-11-27 Thread George V. Neville-Neil
Author: gnn
Date: Wed Nov 27 20:20:02 2013
New Revision: 258692
URL: http://svnweb.freebsd.org/changeset/base/258692

Log:
  Add constants for use in interrogating various fiber and copper connectors
  most often used with network interfaces.
  
  The SFF-8472 standard defines the information that can be retrieved
  from an optic or a copper cable plugged into a NIC, most often
  referred to as SFP+.  Examples of values that can be read
  include the cable vendor's name, part number, date of manufacture
  as well as running data such as temperature, voltage and tx
  and rx power.
  
  Copious comments on how to use these values with an I2C interface
  are given in the header file itself.
  
  MFC after:2 weeks

Added:
  head/sys/net/sff8472.h   (contents, props changed)

Added: head/sys/net/sff8472.h
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/net/sff8472.h  Wed Nov 27 20:20:02 2013(r258692)
@@ -0,0 +1,433 @@
+/*-
+ * Copyright (c) 2013 George V. Neville-Neil
+ * 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$
+ */
+
+/*
+ * The following set of constants are from Document SFF-8472
+ * "Diagnostic Monitoring Interface for Optical Transceivers" revision
+ * 11.3 published by the SFF Committee on June 11, 2013
+ *
+ * The SFF standard defines two ranges of addresses, each 255 bytes
+ * long for the storage of data and diagnostics on cables, such as
+ * SFP+ optics and TwinAx cables.  The ranges are defined in the
+ * following way:
+ *
+ * Base Address 0xa0 (Identification Data)
+ * 0-95Serial ID Defined by SFP MSA
+ * 96-127  Vendor Specific Data
+ * 128-255 Reserved
+ *
+ * Base Address 0xa2 (Diagnostic Data)
+ * 0-55Alarm and Warning Thresholds
+ * 56-95   Cal Constants
+ * 96-119  Real Time Diagnostic Interface
+ * 120-127 Vendor Specific
+ * 128-247 User Writable EEPROM
+ * 248-255 Vendor Specific
+ *
+ * Note that not all addresses are supported.  Where support is
+ * optional this is noted and instructions for checking for the
+ * support are supplied.
+ *
+ * All these values are read across an I2C (i squared C) bus.  Any
+ * device wishing to read these addresses must first have support for
+ * i2c calls.  The Chelsio T4/T5 driver (dev/cxgbe) is one such
+ * driver.
+ */
+
+
+/* Table 3.1 Two-wire interface ID: Data Fields */
+
+#define SFF_8472_BASE  0xa0   /* Base address for all our queries. */
+#define SFF_8472_ID0  /* Transceiver Type (Table 3.2) */
+#define SFF_8472_EXT_ID1  /* Extended transceiver type (Table 
3.3) */
+#define SFF_8472_CONNECTOR 2  /* Connector type (Table 3.4) */
+#define SFF_8472_TRANS_START   3  /* Elec or Optical Compatibility
+   * (Table 3.5) */
+#define SFF_8472_TRANS_END 10
+#define SFF_8472_ENCODING  11 /* Encoding Code for high speed
+   * serial encoding algorithm (see
+   * Table 3.6) */
+#define SFF_8472_BITRATE   12 /* Nominal signaling rate, units
+   *  of 100MBd.  (see details for
+   *  rates > 25.0Gb/s) */
+#define SFF_8472_RATEID13 /* Type of rate select
+   * functionality (see Table
+   * 3.6a) */
+#define SFF_8472_LEN_SMF_KM14 /* Link length supported for single
+   * mode fiber, units of km */
+#define SFF_8472_LEN_SMF   15 /* Link length supported for single
+   * mode fiber, units 

svn commit: r258691 - head/sys/vm

2013-11-27 Thread Alexander Motin
Author: mav
Date: Wed Nov 27 20:16:18 2013
New Revision: 258691
URL: http://svnweb.freebsd.org/changeset/base/258691

Log:
  Don't count bucket allocation failures for UMA zones as their own failures.
  There are good reasons for this to happen, such as recursion prevention, etc.
  and they are not fatal since buckets are just an optimization mechanism.
  Real bucket allocation failures are any way counted by the bucket zones
  themselves, and we don't need double accounting there.

Modified:
  head/sys/vm/uma_core.c

Modified: head/sys/vm/uma_core.c
==
--- head/sys/vm/uma_core.c  Wed Nov 27 19:55:42 2013(r258690)
+++ head/sys/vm/uma_core.c  Wed Nov 27 20:16:18 2013(r258691)
@@ -2509,7 +2509,7 @@ zone_alloc_bucket(uma_zone_t zone, void 
/* Don't wait for buckets, preserve caller's NOVM setting. */
bucket = bucket_alloc(zone, udata, M_NOWAIT | (flags & M_NOVM));
if (bucket == NULL)
-   goto out;
+   return (NULL);
 
max = MIN(bucket->ub_entries, zone->uz_count);
bucket->ub_cnt = zone->uz_import(zone->uz_arg, bucket->ub_bucket,
@@ -2540,10 +2540,8 @@ zone_alloc_bucket(uma_zone_t zone, void 
}
}
 
-out:
-   if (bucket == NULL || bucket->ub_cnt == 0) {
-   if (bucket != NULL)
-   bucket_free(zone, bucket, udata);
+   if (bucket->ub_cnt == 0) {
+   bucket_free(zone, bucket, udata);
atomic_add_long(&zone->uz_fails, 1);
return (NULL);
}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r258689 - head/sys/dev/cxgbe

2013-11-27 Thread Adrian Chadd
Cool!

Would you please bump those two patches of yours from august? I'd like
to get those more widely reviewed and then into -HEAD if/when
appropriate.

Thanks!



-a


On 27 November 2013 11:54, Navdeep Parhar  wrote:
> Author: np
> Date: Wed Nov 27 19:54:19 2013
> New Revision: 258689
> URL: http://svnweb.freebsd.org/changeset/base/258689
>
> Log:
>   Disable an assertion that relies on some code[1] that isn't in HEAD yet.
>
>   [1] http://lists.freebsd.org/pipermail/freebsd-net/2013-August/036573.html
>
> Modified:
>   head/sys/dev/cxgbe/t4_sge.c
>
> Modified: head/sys/dev/cxgbe/t4_sge.c
> ==
> --- head/sys/dev/cxgbe/t4_sge.c Wed Nov 27 19:51:50 2013(r258688)
> +++ head/sys/dev/cxgbe/t4_sge.c Wed Nov 27 19:54:19 2013(r258689)
> @@ -1392,7 +1392,7 @@ rxb_free(struct mbuf *m, void *arg1, voi
>  {
> uma_zone_t zone = arg1;
> caddr_t cl = arg2;
> -#ifdef INVARIANTS
> +#ifdef notyet
> u_int refcount;
>
> refcount = *find_buf_refcnt(cl);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r258672 - in head: . share/mk

2013-11-27 Thread Peter Wemm
On Wed, Nov 27, 2013 at 8:00 AM, Tijl Coosemans  wrote:
> On Tue, 26 Nov 2013 22:34:30 -0800 Peter Wemm wrote:
>> A slightly longer explanation of what I was thinking:
>>
>> - There's a new round of 'make -j' problems lurking in there.  We are
>> missing chunks of the ordering glue that cause libraries to be built in the
>> right order when they depend on each other.
>> - It's a waste of cpu time for the usual case, particularly for the 11.x
>> cycle for the next 1-2 years.
>> - We don't build them properly - we invent cpu flags etc.
>>
>> The usual use case for 32 bit binaries seems to be:
>> - running a 32 bit chroot or jail - this is unaffected.
>> - running old binaries, usually from 4.x or 6.x when the 64 bit port was
>> really green - WITH_LIB32 doesn't actually help much with this because most
>> of the libraries are missing.
>
> Ugh, please revert this.  You forgot about Wine.

Done, but nothing prevented you from adding WITH_LIB32=yes yourself,
or doing a 'make build32/install32' after buildworld/installworld.

-- 
Peter Wemm - pe...@wemm.org; pe...@freebsd.org; pe...@yahoo-inc.com; KI6FJV
UTF-8: for when a ' just won\342\200\231t do.
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r258690 - head/sys/vm

2013-11-27 Thread Alexander Motin
Author: mav
Date: Wed Nov 27 19:55:42 2013
New Revision: 258690
URL: http://svnweb.freebsd.org/changeset/base/258690

Log:
  Fix bug introduced at r252226, when udata argument passed to bucket_alloc()
  was used without making sure first that it was really passed for us.
  
  On some of my systems this bug made user argument passed by ZFS code to
  uma_zalloc_arg() unexpectedly block UMA per-CPU caches for those zones.

Modified:
  head/sys/vm/uma_core.c

Modified: head/sys/vm/uma_core.c
==
--- head/sys/vm/uma_core.c  Wed Nov 27 19:54:19 2013(r258689)
+++ head/sys/vm/uma_core.c  Wed Nov 27 19:55:42 2013(r258690)
@@ -369,12 +369,13 @@ bucket_alloc(uma_zone_t zone, void *udat
 * buckets via the allocation path or bucket allocations in the
 * free path.
 */
-   if ((uintptr_t)udata & UMA_ZFLAG_BUCKET)
-   return (NULL);
if ((zone->uz_flags & UMA_ZFLAG_BUCKET) == 0)
udata = (void *)(uintptr_t)zone->uz_flags;
-   else
+   else {
+   if ((uintptr_t)udata & UMA_ZFLAG_BUCKET)
+   return (NULL);
udata = (void *)((uintptr_t)udata | UMA_ZFLAG_BUCKET);
+   }
if ((uintptr_t)udata & UMA_ZFLAG_CACHEONLY)
flags |= M_NOVM;
ubz = bucket_zone_lookup(zone->uz_count);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r258689 - head/sys/dev/cxgbe

2013-11-27 Thread Navdeep Parhar
Author: np
Date: Wed Nov 27 19:54:19 2013
New Revision: 258689
URL: http://svnweb.freebsd.org/changeset/base/258689

Log:
  Disable an assertion that relies on some code[1] that isn't in HEAD yet.
  
  [1] http://lists.freebsd.org/pipermail/freebsd-net/2013-August/036573.html

Modified:
  head/sys/dev/cxgbe/t4_sge.c

Modified: head/sys/dev/cxgbe/t4_sge.c
==
--- head/sys/dev/cxgbe/t4_sge.c Wed Nov 27 19:51:50 2013(r258688)
+++ head/sys/dev/cxgbe/t4_sge.c Wed Nov 27 19:54:19 2013(r258689)
@@ -1392,7 +1392,7 @@ rxb_free(struct mbuf *m, void *arg1, voi
 {
uma_zone_t zone = arg1;
caddr_t cl = arg2;
-#ifdef INVARIANTS
+#ifdef notyet
u_int refcount;
 
refcount = *find_buf_refcnt(cl);
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r258688 - in head: . share/mk

2013-11-27 Thread Peter Wemm
Author: peter
Date: Wed Nov 27 19:51:50 2013
New Revision: 258688
URL: http://svnweb.freebsd.org/changeset/base/258688

Log:
  Revert r258672. We clearly don't compile libraries enough times.

Modified:
  head/UPDATING
  head/share/mk/bsd.own.mk

Modified: head/UPDATING
==
--- head/UPDATING   Wed Nov 27 19:12:29 2013(r258687)
+++ head/UPDATING   Wed Nov 27 19:51:50 2013(r258688)
@@ -31,13 +31,6 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
-20131126:
-   WITH_LIB32 has been changed to WITHOUT_LIB32 by default.  You
-   can set WITH_LIB32=yes in make.conf or src.conf, or if you need
-   to do a quick 32 bit library build you can do a 'make build32'
-   and 'make install32' as a separate step AFTER doing a
-   buildworld/installworld.
-
 20131108:
The WITHOUT_ATF build knob has been removed and its functionality
has been subsumed into the more generic WITHOUT_TESTS.  If you were

Modified: head/share/mk/bsd.own.mk
==
--- head/share/mk/bsd.own.mkWed Nov 27 19:12:29 2013(r258687)
+++ head/share/mk/bsd.own.mkWed Nov 27 19:51:50 2013(r258688)
@@ -303,6 +303,7 @@ __DEFAULT_YES_OPTIONS = \
 LDNS \
 LDNS_UTILS \
 LEGACY_CONSOLE \
+LIB32 \
 LIBPTHREAD \
 LIBTHR \
 LOCALES \
@@ -368,7 +369,6 @@ __DEFAULT_NO_OPTIONS = \
 GPL_DTC \
 HESIOD \
 INSTALL_AS_USER \
-LIB32 \
 LLDB \
 NAND \
 OFED \
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r258687 - head/share/misc

2013-11-27 Thread Stefan Esser
Author: se
Date: Wed Nov 27 19:12:29 2013
New Revision: 258687
URL: http://svnweb.freebsd.org/changeset/base/258687

Log:
  - add myself to the committers list (it's about time,
having been a committer for more than 19 years ...)

Modified:
  head/share/misc/committers-src.dot

Modified: head/share/misc/committers-src.dot
==
--- head/share/misc/committers-src.dot  Wed Nov 27 17:59:13 2013
(r258686)
+++ head/share/misc/committers-src.dot  Wed Nov 27 19:12:29 2013
(r258687)
@@ -263,6 +263,7 @@ sbruno [label="Sean Bruno\nsbruno@FreeBS
 scf [label="Sean C. Farley\n...@freebsd.org\n2007/06/24"]
 schweikh [label="Jens Schweikhardt\nschwe...@freebsd.org\n2001/04/06"]
 scottl [label="Scott Long\nsco...@freebsd.org\n2000/09/28"]
+se [label="Stefan Esser\n...@freebsd.org\n1994/08/26"]
 sephe [label="Sepherosa Ziehau\nse...@freebsd.org\n2007/03/28"]
 sepotvin [label="Stephane E. Potvin\nsepot...@freebsd.org\n2007/02/15"]
 simon [label="Simon L. Nielsen\nsi...@freebsd.org\n2006/03/07"]
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r258686 - head/sbin/fdisk

2013-11-27 Thread Juli Mallett
Author: jmallett
Date: Wed Nov 27 17:59:13 2013
New Revision: 258686
URL: http://svnweb.freebsd.org/changeset/base/258686

Log:
  Fix fdisk(8) to create 2TB partitions on disks larger than 2TB, rather than
  only being able to create 1TB partitions:
  o) Use an unsigned 32-bit quantity to store the number of disk sectors.
  o) Detect overflow of said 32-bit quantity and clamp to 2^32.
  o) Rather than returning the disk sector count from get_params, return 0 on
 success, since its return value is only ever compared to -1 to detect
 failure.  This would cause returning 2^32 sectors to be interpreted as an
 error.
  
  Reviewed by:  bde ("good for a quick fix")

Modified:
  head/sbin/fdisk/fdisk.c

Modified: head/sbin/fdisk/fdisk.c
==
--- head/sbin/fdisk/fdisk.c Wed Nov 27 16:08:33 2013(r258685)
+++ head/sbin/fdisk/fdisk.c Wed Nov 27 17:59:13 2013(r258686)
@@ -75,7 +75,8 @@ static int secsize = 0;   /* the sensed s
 
 static char *disk;
 
-static int cyls, sectors, heads, cylsecs, disksecs;
+static int cyls, sectors, heads, cylsecs;
+static u_int32_t disksecs;
 
 struct mboot {
unsigned char *bootinst;  /* boot code */
@@ -873,10 +874,13 @@ get_params()
o = g_mediasize(fd);
if (o < 0)
return (-1);
-   disksecs = o / u;
+   if (o / u <= NO_DISK_SECTORS)
+   disksecs = o / u;
+   else
+   disksecs = NO_DISK_SECTORS;
cyls = dos_cyls = o / (u * dos_heads * dos_sectors);
 
-   return (disksecs);
+   return (0);
 }
 
 static int
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r258672 - in head: . share/mk

2013-11-27 Thread Dmitry Morozovsky
On Tue, 26 Nov 2013, Peter Wemm wrote:

[snip]

> It seems more likely we can do a better job with packages.  With some
> massaging, we should be able to use the compat-6.x/i386 libraries as-is, and
> solve the "old 4.x/6.x binary" issue in one go.

sorry for my possible ignorance, but aren't compat6 suspected to non-closed 
(probablly non-trivial) security concerns?

-- 
Sincerely,
D.Marck [DM5020, MCK-RIPE, DM3-RIPN]
[ FreeBSD committer: ma...@freebsd.org ]

*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- ma...@rinet.ru ***

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r258672 - in head: . share/mk

2013-11-27 Thread Guy Helmer
On Nov 27, 2013, at 12:34 AM, Peter Wemm  wrote:

> On 11/26/13, 9:03 PM, Glen Barber wrote:
>> On Wed, Nov 27, 2013 at 04:54:24AM +, Peter Wemm wrote:
>>> Author: peter
>>> Date: Wed Nov 27 04:54:23 2013
>>> New Revision: 258672
>>> URL: http://svnweb.freebsd.org/changeset/base/258672
>>> 
>>> Log:
>>>  At great personal risk, change the default for LIB32 from yes to no.  As
>>>  mentioned in UPDATING, you can even do it as an as-needed operation after
>>>  doing a buildworld/installworld.  You can set WITH_LIB32=yes in make.conf
>>>  or src.conf.
>>> 
>> 
>> Thank you.  Long overdue, IMHO.
>> 
>> Glen
>> 
> 
> A slightly longer explanation of what I was thinking:
> 
> - There's a new round of 'make -j' problems lurking in there.  We are
> missing chunks of the ordering glue that cause libraries to be built in the
> right order when they depend on each other.
> - It's a waste of cpu time for the usual case, particularly for the 11.x
> cycle for the next 1-2 years.
> - We don't build them properly - we invent cpu flags etc.
> 
> The usual use case for 32 bit binaries seems to be:
> - running a 32 bit chroot or jail - this is unaffected.
> - running old binaries, usually from 4.x or 6.x when the 64 bit port was
> really green - WITH_LIB32 doesn't actually help much with this because most
> of the libraries are missing.
> 
> It seems more likely we can do a better job with packages.  With some
> massaging, we should be able to use the compat-6.x/i386 libraries as-is, and
> solve the "old 4.x/6.x binary" issue in one go.
> 
> However, ld-elf32.so.1 does require special handling.  I have something in
> mind that might make this moot though.
> 
> I suspect I've made the powerpc folks angry though…
> 

FWIW, this would break 3rd-party software I use on amd64 that was only provided 
as i386 binaries.

Guy

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r258672 - in head: . share/mk

2013-11-27 Thread Nikolai Lifanov
On 11/26/13 23:54, Peter Wemm wrote:
> Author: peter
> Date: Wed Nov 27 04:54:23 2013
> New Revision: 258672
> URL: http://svnweb.freebsd.org/changeset/base/258672
> 
> Log:
>   At great personal risk, change the default for LIB32 from yes to no.  As
>   mentioned in UPDATING, you can even do it as an as-needed operation after
>   doing a buildworld/installworld.  You can set WITH_LIB32=yes in make.conf
>   or src.conf.
> 
> Modified:
>   head/UPDATING
>   head/share/mk/bsd.own.mk
> 

If you decide to keep this change, can you add LIB32 stuff to optional
obsoletes? Otherwise people will be left with rotting outdated lib32
directories.

Thanks!

- Nikolai Lifanov

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


[HEADSUP!!!] do not upgrade to or past r258632 if you use ZFS + TRIM

2013-11-27 Thread Andriy Gapon
on 26/11/2013 11:57 Andriy Gapon said the following:
> Author: avg
> Date: Tue Nov 26 09:57:14 2013
> New Revision: 258632
> URL: http://svnweb.freebsd.org/changeset/base/258632
> 
> Log:
>   MFV r255255: 4045 zfs write throttle & i/o scheduler performance work
>   
>   illumos/illumos-gate@69962b5647e4a8b9b14998733b765925381b727e
>   
>   Please note the following changes:
>   - zio_ioctl has lost its priority parameter and now TRIM is executed
> with 'now' priority
>   - some knobs are gone and some new knobs are added; not all of them are
> exposed as tunables / sysctls yet
>   
>   MFC after:  10 days
>   Sponsored by:   HybridCluster [merge]

I think that I've introduced a very serious bug when merging this change.
Please do not upgrade to this revision if you use ZFS with SSDs and have TRIM
support enabled.

If you have already upgraded, please disable TRIM support ASAP and roll back to
a previous version of kernel and then check integrity of your pools.

-- 
Andriy Gapon
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r258685 - in stable/9/sys: amd64/amd64 amd64/ia32 amd64/include amd64/linux32 i386/i386 i386/include i386/linux pc98/pc98

2013-11-27 Thread Ed Maste
Author: emaste
Date: Wed Nov 27 16:08:33 2013
New Revision: 258685
URL: http://svnweb.freebsd.org/changeset/base/258685

Log:
  MFC r258135: x86: Allow users to change PSL_RF via ptrace(PT_SETREGS...)
  
Debuggers may need to change PSL_RF. Note that tf_eflags is already stored
in the signal context during signal handling and PSL_RF previously could
be modified via sigreturn, so this change should not provide any new
ability to userspace.
  
For background see the thread at:
http://lists.freebsd.org/pipermail/freebsd-i386/2007-September/005910.html
  
Reviewed by:jhb, kib
  
  Sponsored by: DARPA, AFRL

Modified:
  stable/9/sys/amd64/amd64/machdep.c
  stable/9/sys/amd64/ia32/ia32_signal.c
  stable/9/sys/amd64/include/psl.h
  stable/9/sys/amd64/linux32/linux32_sysvec.c
  stable/9/sys/i386/i386/machdep.c
  stable/9/sys/i386/include/psl.h
  stable/9/sys/i386/include/vm86.h
  stable/9/sys/i386/linux/linux_sysvec.c
  stable/9/sys/pc98/pc98/machdep.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/amd64/amd64/machdep.c
==
--- stable/9/sys/amd64/amd64/machdep.c  Wed Nov 27 15:58:07 2013
(r258684)
+++ stable/9/sys/amd64/amd64/machdep.c  Wed Nov 27 16:08:33 2013
(r258685)
@@ -486,17 +486,7 @@ sys_sigreturn(td, uap)
/*
 * Don't allow users to change privileged or reserved flags.
 */
-   /*
-* XXX do allow users to change the privileged flag PSL_RF.
-* The cpu sets PSL_RF in tf_rflags for faults.  Debuggers
-* should sometimes set it there too.  tf_rflags is kept in
-* the signal context during signal handling and there is no
-* other place to remember it, so the PSL_RF bit may be
-* corrupted by the signal handler without us knowing.
-* Corruption of the PSL_RF bit at worst causes one more or
-* one less debugger trap, so allowing it is fairly harmless.
-*/
-   if (!EFL_SECURE(rflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) {
+   if (!EFL_SECURE(rflags, regs->tf_rflags)) {
uprintf("pid %d (%s): sigreturn rflags = 0x%lx\n", p->p_pid,
td->td_name, rflags);
return (EINVAL);

Modified: stable/9/sys/amd64/ia32/ia32_signal.c
==
--- stable/9/sys/amd64/ia32/ia32_signal.c   Wed Nov 27 15:58:07 2013
(r258684)
+++ stable/9/sys/amd64/ia32/ia32_signal.c   Wed Nov 27 16:08:33 2013
(r258685)
@@ -719,7 +719,7 @@ ofreebsd32_sigreturn(struct thread *td, 
return (error);
scp = ≻
eflags = scp->sc_eflags;
-   if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) {
+   if (!EFL_SECURE(eflags, regs->tf_rflags)) {
return (EINVAL);
}
if (!CS_SECURE(scp->sc_cs)) {
@@ -787,17 +787,7 @@ freebsd4_freebsd32_sigreturn(td, uap)
/*
 * Don't allow users to change privileged or reserved flags.
 */
-   /*
-* XXX do allow users to change the privileged flag PSL_RF.
-* The cpu sets PSL_RF in tf_eflags for faults.  Debuggers
-* should sometimes set it there too.  tf_eflags is kept in
-* the signal context during signal handling and there is no
-* other place to remember it, so the PSL_RF bit may be
-* corrupted by the signal handler without us knowing.
-* Corruption of the PSL_RF bit at worst causes one more or
-* one less debugger trap, so allowing it is fairly harmless.
-*/
-   if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) {
+   if (!EFL_SECURE(eflags, regs->tf_rflags)) {
uprintf("pid %d (%s): freebsd4_freebsd32_sigreturn eflags = 
0x%x\n",
td->td_proc->p_pid, td->td_name, eflags);
return (EINVAL);
@@ -873,17 +863,7 @@ freebsd32_sigreturn(td, uap)
/*
 * Don't allow users to change privileged or reserved flags.
 */
-   /*
-* XXX do allow users to change the privileged flag PSL_RF.
-* The cpu sets PSL_RF in tf_eflags for faults.  Debuggers
-* should sometimes set it there too.  tf_eflags is kept in
-* the signal context during signal handling and there is no
-* other place to remember it, so the PSL_RF bit may be
-* corrupted by the signal handler without us knowing.
-* Corruption of the PSL_RF bit at worst causes one more or
-* one less debugger trap, so allowing it is fairly harmless.
-*/
-   if (!EFL_SECURE(eflags & ~PSL_RF, regs->tf_rflags & ~PSL_RF)) {
+   if (!EFL_SECURE(eflags, regs->tf_rflags)) {
uprintf("pid %d (%s): freebsd32_sigreturn eflags = 0x%x\n",
td->td_proc->p_pid, td->td_name, eflags);
return (EINVAL);

Modified: stab

Re: svn commit: r258672 - in head: . share/mk

2013-11-27 Thread Tijl Coosemans
On Tue, 26 Nov 2013 22:34:30 -0800 Peter Wemm wrote:
> A slightly longer explanation of what I was thinking:
> 
> - There's a new round of 'make -j' problems lurking in there.  We are
> missing chunks of the ordering glue that cause libraries to be built in the
> right order when they depend on each other.
> - It's a waste of cpu time for the usual case, particularly for the 11.x
> cycle for the next 1-2 years.
> - We don't build them properly - we invent cpu flags etc.
> 
> The usual use case for 32 bit binaries seems to be:
> - running a 32 bit chroot or jail - this is unaffected.
> - running old binaries, usually from 4.x or 6.x when the 64 bit port was
> really green - WITH_LIB32 doesn't actually help much with this because most
> of the libraries are missing.

Ugh, please revert this.  You forgot about Wine.

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r258684 - head/share/misc

2013-11-27 Thread Roger Pau Monnxc3xa9
Author: royger
Date: Wed Nov 27 15:58:07 2013
New Revision: 258684
URL: http://svnweb.freebsd.org/changeset/base/258684

Log:
  Add myself to the committers-src list.
  
  Approved by: gibbs (mentor)

Modified:
  head/share/misc/committers-src.dot

Modified: head/share/misc/committers-src.dot
==
--- head/share/misc/committers-src.dot  Wed Nov 27 14:25:06 2013
(r258683)
+++ head/share/misc/committers-src.dot  Wed Nov 27 15:58:07 2013
(r258684)
@@ -250,6 +250,7 @@ rmacklem [label="Rick Macklem\nrmacklem@
 rmh [label="Robert Millan\n...@freebsd.org\n2011/09/18"]
 rnoland [label="Robert Noland\nrnol...@freebsd.org\n2008/09/15"]
 roberto [label="Ollivier Robert\nrobe...@freebsd.org\n1995/02/22"]
+royger [label="Roger Pau Monne\nroy...@freebsd.org\n2013/11/26"]
 rpaulo [label="Rui Paulo\nrpa...@freebsd.org\n2007/09/25"]
 rrs [label="Randall R Stewart\n...@freebsd.org\n2007/02/08"]
 rse [label="Ralf S. Engelschall\n...@freebsd.org\n1997/07/31"]
@@ -415,6 +416,7 @@ gavin -> versus
 
 gibbs -> mjacob
 gibbs -> njl
+gibbs -> royger
 
 glebius -> mav
 
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r258683 - head/sys/geom

2013-11-27 Thread Alexander Motin
Author: mav
Date: Wed Nov 27 14:25:06 2013
New Revision: 258683
URL: http://svnweb.freebsd.org/changeset/base/258683

Log:
  Escape special XML chars, returned by some devices, confusing XML parsers.
  
  MFC after:1 month

Modified:
  head/sys/geom/geom_disk.c
  head/sys/geom/geom_dump.c
  head/sys/geom/geom_int.h

Modified: head/sys/geom/geom_disk.c
==
--- head/sys/geom/geom_disk.c   Wed Nov 27 14:00:52 2013(r258682)
+++ head/sys/geom/geom_disk.c   Wed Nov 27 14:25:06 2013(r258683)
@@ -460,26 +460,36 @@ g_disk_dumpconf(struct sbuf *sb, const c
bp->bio_length = DISK_IDENT_SIZE;
bp->bio_data = buf;
res = dp->d_getattr(bp);
-   sbuf_printf(sb, "%s%s\n", indent,
+   sbuf_printf(sb, "%s", indent);
+   g_conf_printf_escaped(sb, "%s",
res == 0 ? buf: dp->d_ident);
+   sbuf_printf(sb, "\n");
bp->bio_attribute = "GEOM::lunid";
bp->bio_length = DISK_IDENT_SIZE;
bp->bio_data = buf;
-   if (dp->d_getattr(bp) == 0)
-   sbuf_printf(sb, "%s%s\n",
-   indent, buf);
+   if (dp->d_getattr(bp) == 0) {
+   sbuf_printf(sb, "%s", indent);
+   g_conf_printf_escaped(sb, "%s", buf);
+   sbuf_printf(sb, "\n");
+   }
bp->bio_attribute = "GEOM::lunname";
bp->bio_length = DISK_IDENT_SIZE;
bp->bio_data = buf;
-   if (dp->d_getattr(bp) == 0)
-   sbuf_printf(sb, "%s%s\n",
-   indent, buf);
+   if (dp->d_getattr(bp) == 0) {
+   sbuf_printf(sb, "%s", indent);
+   g_conf_printf_escaped(sb, "%s", buf);
+   sbuf_printf(sb, "\n");
+   }
g_destroy_bio(bp);
g_free(buf);
-   } else
-   sbuf_printf(sb, "%s%s\n", indent,
-   dp->d_ident);
-   sbuf_printf(sb, "%s%s\n", indent, dp->d_descr);
+   } else {
+   sbuf_printf(sb, "%s", indent);
+   g_conf_printf_escaped(sb, "%s", dp->d_ident);
+   sbuf_printf(sb, "\n");
+   }
+   sbuf_printf(sb, "%s", indent);
+   g_conf_printf_escaped(sb, "%s", dp->d_descr);
+   sbuf_printf(sb, "\n");
}
 }
 

Modified: head/sys/geom/geom_dump.c
==
--- head/sys/geom/geom_dump.c   Wed Nov 27 14:00:52 2013(r258682)
+++ head/sys/geom/geom_dump.c   Wed Nov 27 14:25:06 2013(r258683)
@@ -154,25 +154,28 @@ g_conftxt(void *p, int flag)
 }
 
 
-static void
-g_conf_print_escaped(struct sbuf *sb, const char *fmt, const char *str)
+void
+g_conf_printf_escaped(struct sbuf *sb, const char *fmt, ...)
 {
struct sbuf *s;
const u_char *c;
+   va_list ap;
 
s = sbuf_new_auto();
+   va_start(ap, fmt);
+   sbuf_vprintf(s, fmt, ap);
+   va_end(ap);
+   sbuf_finish(s);
 
-   for (c = str; *c != '\0'; c++) {
+   for (c = sbuf_data(s); *c != '\0'; c++) {
if (*c == '&' || *c == '<' || *c == '>' ||
*c == '\'' || *c == '"' || *c > 0x7e)
-   sbuf_printf(s, "&#x%X;", *c);
+   sbuf_printf(sb, "&#x%X;", *c);
else if (*c == '\t' || *c == '\n' || *c == '\r' || *c > 0x1f)
-   sbuf_putc(s, *c);
+   sbuf_putc(sb, *c);
else
-   sbuf_putc(s, '?');
+   sbuf_putc(sb, '?');
}
-   sbuf_finish(s);
-   sbuf_printf(sb, fmt, sbuf_data(s));
sbuf_delete(s);
 }
 
@@ -204,7 +207,9 @@ g_conf_provider(struct sbuf *sb, struct 
sbuf_printf(sb, "\t  \n", pp->geom);
sbuf_printf(sb, "\t  r%dw%de%d\n",
pp->acr, pp->acw, pp->ace);
-   g_conf_print_escaped(sb, "\t  %s\n", pp->name);
+   sbuf_printf(sb, "\t  ");
+   g_conf_printf_escaped(sb, "%s", pp->name);
+   sbuf_printf(sb, "\n");
sbuf_printf(sb, "\t  %jd\n",
(intmax_t)pp->mediasize);
sbuf_printf(sb, "\t  %u\n", pp->sectorsize);
@@ -229,7 +234,9 @@ g_conf_geom(struct sbuf *sb, struct g_ge
 
sbuf_printf(sb, "\n", gp);
sbuf_printf(sb, "  \n", gp->class);
-   g_conf_print_escaped(sb, "  %s\n", gp->name);
+   sbuf_printf(sb, 

Re: svn commit: r258678 - head/sys/boot/fdt/dts

2013-11-27 Thread Luiz Otavio O Souza
On Nov 27, 2013, at 10:21 AM, Alexey Dokuchaev  wrote:
> On Wed, Nov 27, 2013 at 12:12:37PM +, Luiz Otavio O Souza wrote:
>> New Revision: 258678
>> URL: http://svnweb.freebsd.org/changeset/base/258678
>> 
>> Log:
>>  Fix the led 'gpios' definition to match the description on
>>  sys/boot/fdt/dts/bindings-gpio.txt.  Make the led pin an output, add the
>>  missing flag field.  No functional change (gpioled(4) isnБ─≥t supported on
> ^^^
> Folks, please, write your commit logs in ASCII.  Pretty please.

My bad. This sneaked in from a copy and paste.

Sorry for the breakage on the commit log.

Luiz
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Re: svn commit: r258678 - head/sys/boot/fdt/dts

2013-11-27 Thread Alexey Dokuchaev
On Wed, Nov 27, 2013 at 12:12:37PM +, Luiz Otavio O Souza wrote:
> New Revision: 258678
> URL: http://svnweb.freebsd.org/changeset/base/258678
> 
> Log:
>   Fix the led 'gpios' definition to match the description on
>   sys/boot/fdt/dts/bindings-gpio.txt.  Make the led pin an output, add the
>   missing flag field.  No functional change (gpioled(4) isnБ─≥t supported on
  ^^^
Folks, please, write your commit logs in ASCII.  Pretty please.

./danfe
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

svn commit: r258679 - head/share/man/man4

2013-11-27 Thread Luiz Otavio O Souza
Author: loos
Date: Wed Nov 27 12:17:05 2013
New Revision: 258679
URL: http://svnweb.freebsd.org/changeset/base/258679

Log:
  Connect the two recently added man pages to the system's install process.
  
  Approved by:  adrian (mentor)

Modified:
  head/share/man/man4/Makefile

Modified: head/share/man/man4/Makefile
==
--- head/share/man/man4/MakefileWed Nov 27 12:12:37 2013
(r258678)
+++ head/share/man/man4/MakefileWed Nov 27 12:17:05 2013
(r258679)
@@ -157,6 +157,8 @@ MAN=aac.4 \
gif.4 \
gpib.4 \
gpio.4 \
+   gpioiic.4 \
+   gpioled.4 \
gre.4 \
h_ertt.4 \
hatm.4 \
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r258678 - head/sys/boot/fdt/dts

2013-11-27 Thread Luiz Otavio O Souza
Author: loos
Date: Wed Nov 27 12:12:37 2013
New Revision: 258678
URL: http://svnweb.freebsd.org/changeset/base/258678

Log:
  Fix the led 'gpios' definition to match the description on
  sys/boot/fdt/dts/bindings-gpio.txt.  Make the led pin an output, add the
  missing flag field.  No functional change (gpioled(4) isn’t supported on
  FDT systems yet).
  
  Approved by:  adrian (mentor)

Modified:
  head/sys/boot/fdt/dts/rpi.dts

Modified: head/sys/boot/fdt/dts/rpi.dts
==
--- head/sys/boot/fdt/dts/rpi.dts   Wed Nov 27 10:10:25 2013
(r258677)
+++ head/sys/boot/fdt/dts/rpi.dts   Wed Nov 27 12:12:37 2013
(r258678)
@@ -316,7 +316,7 @@
 
ok {
label = "ok";
-   gpios = <&gpio 16 1>;
+   gpios = <&gpio 16 2 0>;
 
/* Don't change this - it configures
 * how the led driver determines if
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

svn commit: r258677 - head/sbin/ipfw

2013-11-27 Thread Alexander V. Chernikov
Author: melifaro
Date: Wed Nov 27 10:10:25 2013
New Revision: 258677
URL: http://svnweb.freebsd.org/changeset/base/258677

Log:
  Fix key lookup in ipfw(8) broken since r232865.
  Print warning for IPv4 address strings which are valid in
  inet_aton() but not valid in inet_pton(). (1)
  
  Found by: Özkan KIRIK 
  Submitted by: Ian Smith  (1)
  MFC after:2 weeks
  Sponsored by: Yandex LLC

Modified:
  head/sbin/ipfw/ipfw2.c

Modified: head/sbin/ipfw/ipfw2.c
==
--- head/sbin/ipfw/ipfw2.c  Wed Nov 27 08:39:48 2013(r258676)
+++ head/sbin/ipfw/ipfw2.c  Wed Nov 27 10:10:25 2013(r258677)
@@ -4274,13 +4274,24 @@ table_fill_xentry(char *arg, ipfw_table_
addrlen = sizeof(struct in6_addr);
} else {
/* Port or any other key */
-   key = strtol(arg, &p, 10);
/* Skip non-base 10 entries like 'fa1' */
-   if (p != arg) {
+   key = strtol(arg, &p, 10);
+   if (*p == '\0') {
pkey = (uint32_t *)paddr;
*pkey = htonl(key);
type = IPFW_TABLE_CIDR;
+   masklen = 32;
addrlen = sizeof(uint32_t);
+   } else if ((p != arg) && (*p == '.')) {
+   /*
+* Warn on IPv4 address strings
+* which are "valid" for inet_aton() but not
+* in inet_pton().
+*
+* Typical examples: '10.5' or '10.0.0.05'
+*/
+   errx(EX_DATAERR,
+   "Invalid IPv4 address: %s", arg);
}
}
}
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

svn commit: r258676 - head/sys/dev/sfxge/common

2013-11-27 Thread Sergey Kandaurov
Author: pluknet
Date: Wed Nov 27 08:39:48 2013
New Revision: 258676
URL: http://svnweb.freebsd.org/changeset/base/258676

Log:
  Bandaid for compiling with gcc.

Modified:
  head/sys/dev/sfxge/common/siena_nic.c

Modified: head/sys/dev/sfxge/common/siena_nic.c
==
--- head/sys/dev/sfxge/common/siena_nic.c   Wed Nov 27 07:21:25 2013
(r258675)
+++ head/sys/dev/sfxge/common/siena_nic.c   Wed Nov 27 08:39:48 2013
(r258676)
@@ -589,6 +589,7 @@ siena_nic_probe(
unsigned int mask;
int rc;
 
+   mask = 0;   /* XXX: pacify gcc */
EFSYS_ASSERT3U(enp->en_family, ==, EFX_FAMILY_SIENA);
 
/* Read clear any assertion state */
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"