svn commit: r275790 - in head/sys/dev/usb: net serial

2014-12-15 Thread Hans Petter Selasky
Author: hselasky
Date: Mon Dec 15 09:23:40 2014
New Revision: 275790
URL: https://svnweb.freebsd.org/changeset/base/275790

Log:
  Resolve USB driver identification conflict.
  
  Reported by:  Anish Mistry amis...@am-productions.biz
  MFC after:1 week

Modified:
  head/sys/dev/usb/net/if_urndis.c
  head/sys/dev/usb/serial/umodem.c

Modified: head/sys/dev/usb/net/if_urndis.c
==
--- head/sys/dev/usb/net/if_urndis.cMon Dec 15 08:35:07 2014
(r275789)
+++ head/sys/dev/usb/net/if_urndis.cMon Dec 15 09:23:40 2014
(r275790)
@@ -170,15 +170,15 @@ static const struct usb_ether_methods ur
 };
 
 static const STRUCT_USB_HOST_ID urndis_host_devs[] = {
-#if 0
-   /* XXX this entry has a conflict an entry the umodem driver XXX */
-   {USB_IFACE_CLASS(UICLASS_CDC), 
USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL),
-   USB_IFACE_PROTOCOL(0xff)},
-#endif
+   /* Generic RNDIS class match */
{USB_IFACE_CLASS(UICLASS_WIRELESS), USB_IFACE_SUBCLASS(UISUBCLASS_RF),
-   USB_IFACE_PROTOCOL(UIPROTO_RNDIS)},
+   USB_IFACE_PROTOCOL(UIPROTO_RNDIS)},
{USB_IFACE_CLASS(UICLASS_IAD), USB_IFACE_SUBCLASS(UISUBCLASS_SYNC),
-   USB_IFACE_PROTOCOL(UIPROTO_ACTIVESYNC)},
+   USB_IFACE_PROTOCOL(UIPROTO_ACTIVESYNC)},
+   /* HP-WebOS */
+   {USB_VENDOR(USB_VENDOR_PALM), USB_IFACE_CLASS(UICLASS_CDC),
+   USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL),
+   USB_IFACE_PROTOCOL(0xff)},
 };
 
 static int

Modified: head/sys/dev/usb/serial/umodem.c
==
--- head/sys/dev/usb/serial/umodem.cMon Dec 15 08:35:07 2014
(r275789)
+++ head/sys/dev/usb/serial/umodem.cMon Dec 15 09:23:40 2014
(r275790)
@@ -125,7 +125,7 @@ static const STRUCT_USB_HOST_ID umodem_d
USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL),
USB_IFACE_PROTOCOL(UIPROTO_CDC_NONE)},
/* Huawei Modem class match */
-   {USB_IFACE_CLASS(UICLASS_CDC),
+   {USB_VENDOR(USB_VENDOR_HUAWEI),USB_IFACE_CLASS(UICLASS_CDC),
USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL),
USB_IFACE_PROTOCOL(0xFF)},
/* Kyocera AH-K3001V */
___
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: r275791 - head/etc/devd

2014-12-15 Thread Hans Petter Selasky
Author: hselasky
Date: Mon Dec 15 09:35:46 2014
New Revision: 275791
URL: https://svnweb.freebsd.org/changeset/base/275791

Log:
  Regenerate usb.conf .
  
  MFC after:1 week

Modified:
  head/etc/devd/usb.conf

Modified: head/etc/devd/usb.conf
==
--- head/etc/devd/usb.conf  Mon Dec 15 09:23:40 2014(r275790)
+++ head/etc/devd/usb.conf  Mon Dec 15 09:35:46 2014(r275791)
@@ -1017,7 +1017,23 @@ nomatch 32 {
match bus uhub[0-9]+;
match mode host;
match vendor 0x056e;
-   match product (0x200c|0x4002|0x4005|0x400b|0x4010);
+   match product (0x200c|0x4002|0x4005);
+   action kldload -n if_aue;
+};
+
+nomatch 32 {
+   match bus uhub[0-9]+;
+   match mode host;
+   match vendor 0x056e;
+   match product 0x4008;
+   action kldload -n if_urtwn;
+};
+
+nomatch 32 {
+   match bus uhub[0-9]+;
+   match mode host;
+   match vendor 0x056e;
+   match product (0x400b|0x4010);
action kldload -n if_aue;
 };
 
@@ -1177,7 +1193,7 @@ nomatch 32 {
match bus uhub[0-9]+;
match mode host;
match vendor 0x05c6;
-   match product (0x1000|0x6000|0x6613|0x9000|0x9204|0x9205);
+   match product (0x1000|0x6000|0x6500|0x6613|0x9000|0x9204|0x9205);
action kldload -n u3g;
 };
 
@@ -2545,7 +2561,7 @@ nomatch 32 {
match bus uhub[0-9]+;
match mode host;
match vendor 0x0bda;
-   match product 
(0x8176|0x8176|0x8177|0x8178|0x8179|0x817a|0x817b|0x817c|0x817d|0x817e);
+   match product 
(0x8176|0x8176|0x8177|0x8178|0x8179|0x817a|0x817b|0x817c|0x817d|0x817e|0x817f);
action kldload -n if_urtwn;
 };
 
@@ -3617,7 +3633,7 @@ nomatch 32 {
match bus uhub[0-9]+;
match mode host;
match vendor 0x12d1;
-   match product 
(0x1001|0x1003|0x1004|0x1401|0x1402|0x1403|0x1404|0x1405|0x1406|0x1407|0x1408|0x1409|0x140a|0x140b|0x140c|0x140d|0x140e|0x140f|0x1410|0x1411|0x1412|0x1413|0x1414|0x1415|0x1416|0x1417|0x1418|0x1419|0x141a|0x141b|0x141c|0x141d|0x141e|0x141f|0x1420|0x1421|0x1422|0x1423|0x1424|0x1425|0x1426|0x1427|0x1428|0x1429|0x142a|0x142b|0x142c|0x142d|0x142e|0x142f|0x1430|0x1431|0x1432|0x1433|0x1434|0x1435|0x1436|0x1437|0x1438|0x1439|0x143a|0x143b|0x143c|0x143d|0x143e|0x143f|0x1446|0x1464|0x1465|0x14ac|0x14c9|0x14d1|0x14fe|0x1505|0x1506|0x1520|0x1521);
+   match product 
(0x1001|0x1003|0x1004|0x1401|0x1402|0x1403|0x1404|0x1405|0x1406|0x1407|0x1408|0x1409|0x140a|0x140b|0x140c|0x140d|0x140e|0x140f|0x1410|0x1411|0x1412|0x1413|0x1414|0x1415|0x1416|0x1417|0x1418|0x1419|0x141a|0x141b|0x141c|0x141d|0x141e|0x141f|0x1420|0x1421|0x1422|0x1423|0x1424|0x1425|0x1426|0x1427|0x1428|0x1429|0x142a|0x142b|0x142c|0x142d|0x142e|0x142f|0x1430|0x1431|0x1432|0x1433|0x1434|0x1435|0x1436|0x1437|0x1438|0x1439|0x143a|0x143b|0x143c|0x143d|0x143e|0x143f|0x1446|0x1464|0x1465|0x14ac|0x14c9|0x14cf|0x14d1|0x14fe|0x1505|0x1506|0x1520|0x1521|0x1526);
action kldload -n u3g;
 };
 
@@ -4489,7 +4505,15 @@ nomatch 32 {
match bus uhub[0-9]+;
match mode host;
match vendor 0x19d2;
-   match product 
(0x0001|0x0002|0x0003|0x0004|0x0005|0x0006|0x0007|0x0008|0x0009|0x000a|0x000b|0x000c|0x000d|0x000e|0x000f|0x0010|0x0011|0x0012|0x0013|0x0014|0x0015|0x0016|0x0017|0x0018|0x0019|0x0020|0x0021|0x0022|0x0023|0x0024|0x0025|0x0026|0x0027|0x0028|0x0029|0x0030|0x0031|0x0032|0x0033|0x0037|0x0039|0x0042|0x0043|0x0048|0x0049|0x0051|0x0052|0x0053|0x0054|0x0055|0x0057|0x0058|0x0059|0x0060|0x0061|0x0062|0x0063|0x0064|0x0066|0x0069|0x0070|0x0073|0x0076|0x0078|0x0082|0x0086|0x0117|0x1179|0x2000|0x2002|0x2003|0xfff1|0xfff5|0xfffe);
+   match product 
(0x0001|0x0002|0x0003|0x0004|0x0005|0x0006|0x0007|0x0008|0x0009|0x000a|0x000b|0x000c|0x000d|0x000e|0x000f|0x0010|0x0011|0x0012|0x0013|0x0014|0x0015|0x0016|0x0017|0x0018|0x0019|0x0020|0x0021|0x0022|0x0023|0x0024|0x0025|0x0026|0x0027|0x0028|0x0029|0x0030|0x0031|0x0032|0x0033|0x0037|0x0039|0x0042|0x0043|0x0048|0x0049|0x0051|0x0052|0x0053|0x0054|0x0055|0x0057|0x0058|0x0059|0x0060|0x0061|0x0062|0x0063|0x0064|0x0066|0x0069|0x0070|0x0073|0x0076|0x0078|0x0082|0x0086|0x0117|0x1179|0x1181|0x1514|0x1516|0x2000|0x2002|0x2003|0xffdd|0xffde|0xfff1|0xfff5|0xfffe);
+   action kldload -n u3g;
+};
+
+nomatch 32 {
+   match bus uhub[0-9]+;
+   match mode host;
+   match vendor 0x19f5;
+   match product 0x9909;
action kldload -n u3g;
 };
 
@@ -4609,7 +4633,7 @@ nomatch 32 {
match bus uhub[0-9]+;
match mode host;
match vendor 0x1cf1;
-   match product (0x0001|0x0004|0x0022);
+   match product (0x0001|0x0004|0x001c|0x0022);
action kldload -n uftdi;
 };
 
@@ -4697,7 +4721,7 @@ nomatch 32 {
match bus uhub[0-9]+;
match mode host;
match vendor 0x2001;
-   match product (0x3307|0x3308|0x3309|0x330a|0x330d|0x330f);
+   match product 

svn commit: r275792 - head/sys/dev/fdt

2014-12-15 Thread Ruslan Bukin
Author: br
Date: Mon Dec 15 09:40:25 2014
New Revision: 275792
URL: https://svnweb.freebsd.org/changeset/base/275792

Log:
  Eliminate fdt_data_verify(). The verification it proceed is wrong
  disallowing us to encode 64-bit register numbers.
  
  Discussed with:   nwhitehorn, andrew

Modified:
  head/sys/dev/fdt/fdt_common.c
  head/sys/dev/fdt/fdt_common.h

Modified: head/sys/dev/fdt/fdt_common.c
==
--- head/sys/dev/fdt/fdt_common.c   Mon Dec 15 09:35:46 2014
(r275791)
+++ head/sys/dev/fdt/fdt_common.c   Mon Dec 15 09:40:25 2014
(r275792)
@@ -102,10 +102,9 @@ fdt_get_range_by_busaddr(phandle_t node,
tuple_size = addr_cells + par_addr_cells + size_cells;
tuples = len / (tuple_size * sizeof(cell_t));
 
-   if (fdt_ranges_verify(ranges, tuples, par_addr_cells,
-   addr_cells, size_cells)) {
+   if (par_addr_cells  2 || addr_cells  2 || size_cells  2)
return (ERANGE);
-   }
+
*base = 0;
*size = 0;
 
@@ -173,10 +172,9 @@ fdt_get_range(phandle_t node, int range_
size_cells);
tuples = len / tuple_size;
 
-   if (fdt_ranges_verify(ranges, tuples, par_addr_cells,
-   addr_cells, size_cells)) {
+   if (par_addr_cells  2 || addr_cells  2 || size_cells  2)
return (ERANGE);
-   }
+
*base = 0;
*size = 0;
rangesptr = ranges[range_id];
@@ -381,20 +379,6 @@ fdt_parent_addr_cells(phandle_t node)
 }
 
 int
-fdt_data_verify(void *data, int cells)
-{
-   uint64_t d64;
-
-   if (cells  1) {
-   d64 = fdt64_to_cpu(*((uint64_t *)data));
-   if (((d64  32)  0xull) != 0 || cells  2)
-   return (ERANGE);
-   }
-
-   return (0);
-}
-
-int
 fdt_pm_is_enabled(phandle_t node)
 {
int ret;
@@ -441,61 +425,19 @@ fdt_addrsize_cells(phandle_t node, int *
 }
 
 int
-fdt_ranges_verify(pcell_t *ranges, int tuples, int par_addr_cells,
-int this_addr_cells, int this_size_cells)
-{
-   int i, rv, ulsz;
-
-   if (par_addr_cells  2 || this_addr_cells  2 || this_size_cells  2)
-   return (ERANGE);
-
-   /*
-* This is the max size the resource manager can handle for addresses
-* and sizes.
-*/
-   ulsz = sizeof(u_long);
-   if (par_addr_cells = ulsz  this_addr_cells = ulsz 
-   this_size_cells = ulsz)
-   /* We can handle everything */
-   return (0);
-
-   rv = 0;
-   for (i = 0; i  tuples; i++) {
-
-   if (fdt_data_verify((void *)ranges, par_addr_cells))
-   goto err;
-   ranges += par_addr_cells;
-
-   if (fdt_data_verify((void *)ranges, this_addr_cells))
-   goto err;
-   ranges += this_addr_cells;
-
-   if (fdt_data_verify((void *)ranges, this_size_cells))
-   goto err;
-   ranges += this_size_cells;
-   }
-
-   return (0);
-
-err:
-   debugf(using address range %d-bit not supported\n, ulsz * 8);
-   return (ERANGE);
-}
-
-int
 fdt_data_to_res(pcell_t *data, int addr_cells, int size_cells, u_long *start,
 u_long *count)
 {
 
/* Address portion. */
-   if (fdt_data_verify((void *)data, addr_cells))
+   if (addr_cells  2)
return (ERANGE);
 
*start = fdt_data_get((void *)data, addr_cells);
data += addr_cells;
 
/* Size portion. */
-   if (fdt_data_verify((void *)data, size_cells))
+   if (size_cells  2)
return (ERANGE);
 
*count = fdt_data_get((void *)data, size_cells);

Modified: head/sys/dev/fdt/fdt_common.h
==
--- head/sys/dev/fdt/fdt_common.h   Mon Dec 15 09:35:46 2014
(r275791)
+++ head/sys/dev/fdt/fdt_common.h   Mon Dec 15 09:40:25 2014
(r275792)
@@ -79,7 +79,6 @@ extern u_char fdt_static_dtb;
 int fdt_addrsize_cells(phandle_t, int *, int *);
 u_long fdt_data_get(void *, int);
 int fdt_data_to_res(pcell_t *, int, int, u_long *, u_long *);
-int fdt_data_verify(void *, int);
 phandle_t fdt_find_compatible(phandle_t, const char *, int);
 phandle_t fdt_depth_search_compatible(phandle_t, const char *, int);
 int fdt_get_mem_regions(struct mem_region *, int *, uint32_t *);
@@ -94,7 +93,6 @@ int fdt_is_enabled(phandle_t);
 int fdt_pm_is_enabled(phandle_t);
 int fdt_is_type(phandle_t, const char *);
 int fdt_parent_addr_cells(phandle_t);
-int fdt_ranges_verify(pcell_t *, int, int, int, int);
 int fdt_reg_to_rl(phandle_t, struct resource_list *);
 int fdt_pm(phandle_t);
 int fdt_get_unit(device_t);
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to 

svn commit: r275799 - head/sys/arm/mv

2014-12-15 Thread Ruslan Bukin
Author: br
Date: Mon Dec 15 11:57:39 2014
New Revision: 275799
URL: https://svnweb.freebsd.org/changeset/base/275799

Log:
  Follow r275792 eliminating fdt_data_verify().

Modified:
  head/sys/arm/mv/mv_common.c
  head/sys/arm/mv/mv_pci.c

Modified: head/sys/arm/mv/mv_common.c
==
--- head/sys/arm/mv/mv_common.c Mon Dec 15 11:05:53 2014(r275798)
+++ head/sys/arm/mv/mv_common.c Mon Dec 15 11:57:39 2014(r275799)
@@ -1939,8 +1939,7 @@ fdt_get_ranges(const char *nodename, voi
if (tuples_count = 0)
return (ERANGE);
 
-   if (fdt_ranges_verify(buf, tuples_count, par_addr_cells,
-   addr_cells, size_cells) != 0)
+   if (par_addr_cells  2 || addr_cells  2 || size_cells  2)
return (ERANGE);
 
*tuples = tuples_count;

Modified: head/sys/arm/mv/mv_pci.c
==
--- head/sys/arm/mv/mv_pci.cMon Dec 15 11:05:53 2014(r275798)
+++ head/sys/arm/mv/mv_pci.cMon Dec 15 11:57:39 2014(r275799)
@@ -180,8 +180,7 @@ mv_pci_ranges_decode(phandle_t node, str
rangesptr += offset_cells;
}
 
-   if (fdt_data_verify((void *)rangesptr, par_addr_cells -
-   offset_cells)) {
+   if ((par_addr_cells - offset_cells)  2) {
rv = ERANGE;
goto out;
}
@@ -189,7 +188,7 @@ mv_pci_ranges_decode(phandle_t node, str
par_addr_cells - offset_cells);
rangesptr += par_addr_cells - offset_cells;
 
-   if (fdt_data_verify((void *)rangesptr, size_cells)) {
+   if (size_cells  2)
rv = ERANGE;
goto out;
}
___
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: r275800 - in head: lib/libc/sys sys/compat/freebsd32 sys/conf sys/kern sys/sys

2014-12-15 Thread Konstantin Belousov
Author: kib
Date: Mon Dec 15 12:01:42 2014
New Revision: 275800
URL: https://svnweb.freebsd.org/changeset/base/275800

Log:
  Add a facility for non-init process to declare itself the reaper of
  the orphaned descendants.  Base of the API is modelled after the same
  feature from the DragonFlyBSD.
  
  Requested by: bapt
  Reviewed by:  jilles (previous version)
  Tested by:pho
  Sponsored by: The FreeBSD Foundation
  MFC after:3 weeks

Added:
  head/sys/kern/kern_procctl.c
 - copied, changed from r275798, head/sys/kern/sys_process.c
Modified:
  head/lib/libc/sys/procctl.2
  head/sys/compat/freebsd32/freebsd32.h
  head/sys/compat/freebsd32/freebsd32_misc.c
  head/sys/conf/files
  head/sys/kern/init_main.c
  head/sys/kern/kern_exit.c
  head/sys/kern/kern_fork.c
  head/sys/kern/sys_process.c
  head/sys/sys/proc.h
  head/sys/sys/procctl.h

Modified: head/lib/libc/sys/procctl.2
==
--- head/lib/libc/sys/procctl.2 Mon Dec 15 11:57:39 2014(r275799)
+++ head/lib/libc/sys/procctl.2 Mon Dec 15 12:01:42 2014(r275800)
@@ -2,6 +2,10 @@
 .\ Written by: John H. Baldwin j...@freebsd.org
 .\ All rights reserved.
 .\
+.\ Copyright (c) 2014 The FreeBSD Foundation
+.\ Portions of this documentation were written by Konstantin Belousov
+.\ under sponsorship from the FreeBSD Foundation.
+.\
 .\ Redistribution and use in source and binary forms, with or without
 .\ modification, are permitted provided that the following conditions
 .\ are met:
@@ -25,7 +29,7 @@
 .\
 .\ $FreeBSD$
 .\
-.Dd September 19, 2013
+.Dd December 15, 2014
 .Dt PROCCTL 2
 .Os
 .Sh NAME
@@ -67,7 +71,7 @@ The control request to perform is specif
 .Fa cmd
 argument.
 The following commands are supported:
-.Bl -tag -width Dv PROC_SPROTECT
+.Bl -tag -width Dv PROC_REAP_GETPIDS
 .It Dv PROC_SPROTECT
 Set process protection state.
 This is used to mark a process as protected from being killed if the system
@@ -95,6 +99,174 @@ When used with
 mark all future child processes of each selected process as protected.
 Future child processes will also mark all of their future child processes.
 .El
+.It Dv PROC_REAP_ACQUIRE
+Acquires the reaper status for the current process.
+The status means that orphaned children by the reaper descendants,
+forked after the acquisition of the status, are reparented to the
+reaper.
+After the system initialization,
+.Xr init 8
+is the default reaper.
+.Pp
+.It Dv PROC_REAP_RELEASE
+Releases the reaper state fpr the current process.
+The reaper of the current process becomes the new reaper of the
+current process descendants.
+.It Dv PROC_REAP_STATUS
+Provides the information about the reaper of the specified process,
+or the process itself, in case it is a reaper.
+The
+.Fa data
+argument must point to the
+.Vt struct procctl_reaper_status ,
+which if filled by the syscall on successfull return.
+.Bd -literal
+struct procctl_reaper_status {
+   u_int   rs_flags;
+   u_int   rs_children;
+   u_int   rs_descendants;
+   pid_t   rs_reaper;
+   pid_t   rs_pid;
+};
+.Ed
+The
+.Fa rs_flags
+may have the following flags returned:
+.Bl -tag -width Dv REAPER_STATUS_REALINIT
+.It Dv REAPER_STATUS_OWNED
+The specified process has acquired the reaper status and did not
+released it.
+When the flag is returned, the
+.Fa id
+pid identifies reaper, otherwise the
+.Fa rs_reaper
+field of the structure is the pid of the reaper for passed process id.
+.It Dv REAPER_STATUS_REALINIT
+The specified process is the root of the reaper tree, i.e.
+.Xr init 8.
+.El
+The
+.Fa rs_children
+returns the number of the children of the reaper.
+The
+.Fa rs_descendants
+returns the total number of descendants of the reaper,
+not counting descendants of the reapers in the subtree.
+The
+.Fa rs_reaper
+returns the reaper pid.
+The
+.Fa rs_pid
+returns pid of some reaper child if there is any descendant.
+.It Dv PROC_REAP_GETPIDS
+Queries the list of descendants of the reaper of the specified process.
+The request takes the pointer to
+.Vt struct procctl_reaper_pids
+as
+.Fa data .
+.Bd -literal
+struct procctl_reaper_pids {
+   u_int   rp_count;
+   struct procctl_reaper_pidinfo *rp_pids;
+};
+.Ed
+On call, the
+.Fa rp_pids
+must point to the array of
+.Vt procctl_reaper_pidinfo
+structures, to be filled on return,
+and the
+.Fa rp_count
+must specify the size of the array,
+no more than rp_count elements is filled by kernel.
+.Pp
+The
+.Vt struct procctl_reaper_pidinfo
+structure provides some information about one reaper' descendant.
+Note that for the descendant which is not child, it is the subject
+of usual race with process exiting and pid reuse.
+.Bd -literal
+struct procctl_reaper_pidinfo {
+   pid_t   pi_pid;
+   pid_t   pi_subtree;
+   u_int   pi_flags;
+};
+.Ed
+The
+.Fa pi_pid
+is the process id of the descendant.
+The
+.Fa pi_subtree
+provides the pid of the child of the reaper, which is (grand-)parent
+of the 

svn commit: r275802 - head/sys/arm/mv

2014-12-15 Thread Ruslan Bukin
Author: br
Date: Mon Dec 15 12:15:18 2014
New Revision: 275802
URL: https://svnweb.freebsd.org/changeset/base/275802

Log:
  Fix typo.

Modified:
  head/sys/arm/mv/mv_pci.c

Modified: head/sys/arm/mv/mv_pci.c
==
--- head/sys/arm/mv/mv_pci.cMon Dec 15 12:14:41 2014(r275801)
+++ head/sys/arm/mv/mv_pci.cMon Dec 15 12:15:18 2014(r275802)
@@ -188,7 +188,7 @@ mv_pci_ranges_decode(phandle_t node, str
par_addr_cells - offset_cells);
rangesptr += par_addr_cells - offset_cells;
 
-   if (size_cells  2)
+   if (size_cells  2) {
rv = ERANGE;
goto out;
}
___
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: r275804 - head/gnu/usr.bin/cc/cc1plus

2014-12-15 Thread Ed Maste
Author: emaste
Date: Mon Dec 15 14:25:42 2014
New Revision: 275804
URL: https://svnweb.freebsd.org/changeset/base/275804

Log:
  Remove empty generated file upon gperf failure
  
  Prior to this change the build could fail as follows, if gperf is not
  available (or fails):
  
- make(1) stops due to the gperf error, but an empty target file
  (cfns.h) is still created
- the empty cfns.h is newer than the source cfns.gperf so it is not
  regenerated on subsequent builds
- the gcc build fails (undefined reference to libc_name_p)
  
  Sponsored by: The FreeBSD Foundation
  MFC after:3 days

Modified:
  head/gnu/usr.bin/cc/cc1plus/Makefile

Modified: head/gnu/usr.bin/cc/cc1plus/Makefile
==
--- head/gnu/usr.bin/cc/cc1plus/MakefileMon Dec 15 12:16:09 2014
(r275803)
+++ head/gnu/usr.bin/cc/cc1plus/MakefileMon Dec 15 14:25:42 2014
(r275804)
@@ -30,7 +30,7 @@ LDADD=${LIBBACKEND} ${LIBCPP} ${LIBDECN
 # C++ parser
 cfns.h: cfns.gperf
gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
-   ${.ALLSRC}  ${.TARGET}
+   ${.ALLSRC}  ${.TARGET} || (rm -f ${.TARGET}; false)
 CLEANFILES= cfns.h
 
 DOBJS+=${SRCS:N*.h:R:S/$/.o/g}
___
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: r275805 - head/lib/libc/iconv

2014-12-15 Thread Jun Kuriyama
Author: kuriyama
Date: Mon Dec 15 14:36:04 2014
New Revision: 275805
URL: https://svnweb.freebsd.org/changeset/base/275805

Log:
  Fix incorrect type of invalids argument in __iconv() prototype.

Modified:
  head/lib/libc/iconv/iconv.3

Modified: head/lib/libc/iconv/iconv.3
==
--- head/lib/libc/iconv/iconv.3 Mon Dec 15 14:25:42 2014(r275804)
+++ head/lib/libc/iconv/iconv.3 Mon Dec 15 14:36:04 2014(r275805)
@@ -48,7 +48,7 @@
 .Ft size_t
 .Fn iconv iconv_t cd char ** restrict src size_t * restrict srcleft 
char ** restrict dst size_t * restrict dstleft
 .Ft size_t
-.Fn __iconv iconv_t cd const char ** restrict src size_t * restrict 
srcleft char ** restrict dst size_t * restrict dstleft uint32_t flags 
size_t invalids
+.Fn __iconv iconv_t cd const char ** restrict src size_t * restrict 
srcleft char ** restrict dst size_t * restrict dstleft uint32_t flags 
size_t * invalids
 .Sh DESCRIPTION
 The
 .Fn iconv_open
___
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: r275804 - head/gnu/usr.bin/cc/cc1plus

2014-12-15 Thread Ed Maste
On 15 December 2014 at 09:25, Ed Maste ema...@freebsd.org wrote:
 Author: emaste
 Date: Mon Dec 15 14:25:42 2014
 New Revision: 275804
 URL: https://svnweb.freebsd.org/changeset/base/275804

 Log:
   Remove empty generated file upon gperf failure
...
 -   ${.ALLSRC}  ${.TARGET}
 +   ${.ALLSRC}  ${.TARGET} || (rm -f ${.TARGET}; false)

There are additional cases of this potential issue in the tree. In
most cases I examined the target invokes tools that are expected to
exist on the build host (such as sed or awk) so should not be a
problem in practice. There are some cases (gensnmptree, make-roken)
that we may want to revisit as part of a more holistic build
infrastructure project.
___
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: r275806 - head/lib/libc/sys

2014-12-15 Thread Konstantin Belousov
Author: kib
Date: Mon Dec 15 14:58:10 2014
New Revision: 275806
URL: https://svnweb.freebsd.org/changeset/base/275806

Log:
  Markup fixes for kqueue(2), no content changes.
  
  Reviewed by:  brueffer (previous version)
  Sponsored by: The FreeBSD Foundation
  MFC after:3 days

Modified:
  head/lib/libc/sys/kqueue.2

Modified: head/lib/libc/sys/kqueue.2
==
--- head/lib/libc/sys/kqueue.2  Mon Dec 15 14:36:04 2014(r275805)
+++ head/lib/libc/sys/kqueue.2  Mon Dec 15 14:58:10 2014(r275806)
@@ -162,56 +162,56 @@ struct kevent {
 The fields of
 .Fa struct kevent
 are:
-.Bl -tag -width XXXfilter
-.It ident
+.Bl -tag -width Fa filter
+.It Fa ident
 Value used to identify this event.
 The exact interpretation is determined by the attached filter,
 but often is a file descriptor.
-.It filter
+.It Fa filter
 Identifies the kernel filter used to process this event.
 The pre-defined
 system filters are described below.
-.It flags
+.It Fa flags
 Actions to perform on the event.
-.It fflags
+.It Fa fflags
 Filter-specific flags.
-.It data
+.It Fa data
 Filter-specific data value.
-.It udata
+.It Fa udata
 Opaque user-defined value passed through the kernel unchanged.
 .El
 .Pp
 The
 .Va flags
 field can contain the following values:
-.Bl -tag -width XXXEV_ONESHOT
-.It EV_ADD
+.Bl -tag -width EV_DISPATCH
+.It Dv EV_ADD
 Adds the event to the kqueue.
 Re-adding an existing event
 will modify the parameters of the original event, and not result
 in a duplicate entry.
 Adding an event automatically enables it,
 unless overridden by the EV_DISABLE flag.
-.It EV_ENABLE
+.It Dv EV_ENABLE
 Permit
 .Fn kevent
 to return the event if it is triggered.
-.It EV_DISABLE
+.It Dv EV_DISABLE
 Disable the event so
 .Fn kevent
 will not return it.
 The filter itself is not disabled.
-.It EV_DISPATCH
+.It Dv EV_DISPATCH
 Disable the event source immediately after delivery of an event.
 See
 .Dv EV_DISABLE
 above.
-.It EV_DELETE
+.It Dv EV_DELETE
 Removes the event from the kqueue.
 Events which are attached to
 file descriptors are automatically deleted on the last close of
 the descriptor.
-.It EV_RECEIPT
+.It Dv EV_RECEIPT
 This flag is useful for making bulk changes to a kqueue without draining
 any pending events.
 When passed as input, it forces
@@ -220,20 +220,20 @@ to always be returned.
 When a filter is successfully added the
 .Va data
 field will be zero.
-.It EV_ONESHOT
+.It Dv EV_ONESHOT
 Causes the event to return only the first occurrence of the filter
 being triggered.
 After the user retrieves the event from the kqueue,
 it is deleted.
-.It EV_CLEAR
+.It Dv EV_CLEAR
 After the event is retrieved by the user, its state is reset.
 This is useful for filters which report state transitions
 instead of the current state.
 Note that some filters may automatically
 set this flag internally.
-.It EV_EOF
+.It Dv EV_EOF
 Filters may set this flag to indicate filter-specific EOF condition.
-.It EV_ERROR
+.It Dv EV_ERROR
 See
 .Sx RETURN VALUES
 below.
@@ -245,8 +245,8 @@ Arguments may be passed to and from the 
 and
 .Va data
 fields in the kevent structure.
-.Bl -tag -width EVFILT_PROCDESC
-.It EVFILT_READ
+.Bl -tag -width Dv EVFILT_PROCDESC
+.It Dv EVFILT_READ
 Takes a descriptor as the identifier, and returns whenever
 there is data available to read.
 The behavior of the filter is slightly different depending
@@ -265,7 +265,7 @@ subject to the
 value of the socket buffer.
 This may be overridden with a per-filter low water mark at the
 time the filter is added by setting the
-NOTE_LOWAT
+.Dv NOTE_LOWAT
 flag in
 .Va fflags ,
 and specifying the new low water mark in
@@ -275,7 +275,9 @@ On return,
 contains the number of bytes of protocol data available to read.
 .Pp
 If the read direction of the socket has shutdown, then the filter
-also sets EV_EOF in
+also sets
+.Dv EV_EOF
+in
 .Va flags ,
 and returns the socket error (if any) in
 .Va fflags .
@@ -291,9 +293,13 @@ Returns when the there is data to read;
 .Va data
 contains the number of bytes available.
 .Pp
-When the last writer disconnects, the filter will set EV_EOF in
+When the last writer disconnects, the filter will set
+.Dv EV_EOF
+in
 .Va flags .
-This may be cleared by passing in EV_CLEAR, at which point the
+This may be cleared by passing in
+.Dv EV_CLEAR ,
+at which point the
 filter will resume waiting for data to become available before
 returning.
 .It BPF devices
@@ -304,7 +310,7 @@ enabled and there is any data to read;
 .Va data
 contains the number of bytes available.
 .El
-.It EVFILT_WRITE
+.It Dv EVFILT_WRITE
 Takes a descriptor as the identifier, and returns whenever
 it is possible to write to the descriptor.
 For sockets, pipes
@@ -312,23 +318,30 @@ and fifos,
 .Va data
 will contain the amount of space remaining in the write buffer.
 The filter will set EV_EOF when the reader disconnects, and for
-the fifo case, this may be cleared by use of EV_CLEAR.
+the 

svn commit: r275808 - in head/sys: dev/cxgbe/tom kern

2014-12-15 Thread John Baldwin
Author: jhb
Date: Mon Dec 15 17:52:08 2014
New Revision: 275808
URL: https://svnweb.freebsd.org/changeset/base/275808

Log:
  Check for SS_NBIO in so-so_state instead of sb-sb_flags in
  soreceive_stream().
  
  Differential Revision:https://reviews.freebsd.org/D1299
  Reviewed by:  bz, gnn
  MFC after:1 week

Modified:
  head/sys/dev/cxgbe/tom/t4_ddp.c
  head/sys/kern/uipc_socket.c

Modified: head/sys/dev/cxgbe/tom/t4_ddp.c
==
--- head/sys/dev/cxgbe/tom/t4_ddp.c Mon Dec 15 16:14:49 2014
(r275807)
+++ head/sys/dev/cxgbe/tom/t4_ddp.c Mon Dec 15 17:52:08 2014
(r275808)
@@ -1173,7 +1173,7 @@ restart:
 
/* Socket buffer got some data that we shall deliver now. */
if (sbused(sb)  !(flags  MSG_WAITALL) 
-   ((sb-sb_flags  SS_NBIO) ||
+   ((so-so_state  SS_NBIO) ||
 (flags  (MSG_DONTWAIT|MSG_NBIO)) ||
 sbused(sb) = sb-sb_lowat ||
 sbused(sb) = uio-uio_resid ||

Modified: head/sys/kern/uipc_socket.c
==
--- head/sys/kern/uipc_socket.c Mon Dec 15 16:14:49 2014(r275807)
+++ head/sys/kern/uipc_socket.c Mon Dec 15 17:52:08 2014(r275808)
@@ -2002,7 +2002,7 @@ restart:
 
/* Socket buffer got some data that we shall deliver now. */
if (sbavail(sb)  0  !(flags  MSG_WAITALL) 
-   ((sb-sb_flags  SS_NBIO) ||
+   ((so-so_state  SS_NBIO) ||
 (flags  (MSG_DONTWAIT|MSG_NBIO)) ||
 sbavail(sb) = sb-sb_lowat ||
 sbavail(sb) = uio-uio_resid ||
___
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: r275810 - head/contrib/elftoolchain/elfcopy

2014-12-15 Thread Ed Maste
Author: emaste
Date: Mon Dec 15 18:18:57 2014
New Revision: 275810
URL: https://svnweb.freebsd.org/changeset/base/275810

Log:
  Correct elftoolchain strip(1) memory size calculation
  
  Calculate the segment's memory size (p_memsz) using the virtual
  addresses, not the file offsets. Otherwise padding preceeding SHT_NOBITS
  sections may be excluded from the calculation, resulting in a segment
  that is too small.
  
  PR:   195653
  Sponsored by: The FreeBSD Foundation

Modified:
  head/contrib/elftoolchain/elfcopy/segments.c

Modified: head/contrib/elftoolchain/elfcopy/segments.c
==
--- head/contrib/elftoolchain/elfcopy/segments.cMon Dec 15 18:13:03 
2014(r275809)
+++ head/contrib/elftoolchain/elfcopy/segments.cMon Dec 15 18:18:57 
2014(r275810)
@@ -439,7 +439,7 @@ copy_phdr(struct elfcopy *ecp)
seg-fsz = seg-msz = 0;
for (i = 0; i  seg-nsec; i++) {
s = seg-v_sec[i];
-   seg-msz = s-off + s-sz - seg-off;
+   seg-msz = s-vma + s-sz - seg-addr;
if (s-type != SHT_NOBITS)
seg-fsz = seg-msz;
}
___
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: r275811 - in head: cddl/contrib/opensolaris/cmd/zdb sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys

2014-12-15 Thread Xin LI
Author: delphij
Date: Mon Dec 15 18:22:45 2014
New Revision: 275811
URL: https://svnweb.freebsd.org/changeset/base/275811

Log:
  MFV r275783:
  
  Convert ARC flags to use enum.  Previously, public flags are defined in
  arc.h and private flags are defined in arc.c which can lead to confusion
  and programming errors.
  
  Consistently use 'hdr' (when referencing arc_buf_hdr_t) instead of 'buf'
  or 'ab' because arc_buf_t are often named 'buf' as well.
  
  Illumos issue:
  5369 arc flags should be an enum
  5370 consistent arc_buf_hdr_t naming scheme
  
  MFC after:2 weeks

Modified:
  head/cddl/contrib/opensolaris/cmd/zdb/zdb.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
Directory Properties:
  head/cddl/contrib/opensolaris/   (props changed)
  head/sys/cddl/contrib/opensolaris/   (props changed)

Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c
==
--- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Dec 15 18:18:57 2014
(r275810)
+++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Mon Dec 15 18:22:45 2014
(r275811)
@@ -1184,7 +1184,7 @@ visit_indirect(spa_t *spa, const dnode_p
print_indirect(bp, zb, dnp);
 
if (BP_GET_LEVEL(bp)  0  !BP_IS_HOLE(bp)) {
-   uint32_t flags = ARC_WAIT;
+   arc_flags_t flags = ARC_FLAG_WAIT;
int i;
blkptr_t *cbp;
int epb = BP_GET_LSIZE(bp)  SPA_BLKPTRSHIFT;

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c   Mon Dec 15 
18:18:57 2014(r275810)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c   Mon Dec 15 
18:22:45 2014(r275811)
@@ -618,7 +618,7 @@ struct arc_buf_hdr {
 
arc_buf_hdr_t   *b_hash_next;
arc_buf_t   *b_buf;
-   uint32_tb_flags;
+   arc_flags_t b_flags;
uint32_tb_datacnt;
 
arc_callback_t  *b_acb;
@@ -666,52 +666,26 @@ sysctl_vfs_zfs_arc_meta_limit(SYSCTL_HAN
 static arc_buf_t *arc_eviction_list;
 static kmutex_t arc_eviction_mtx;
 static arc_buf_hdr_t arc_eviction_hdr;
-static void arc_get_data_buf(arc_buf_t *buf);
-static void arc_access(arc_buf_hdr_t *buf, kmutex_t *hash_lock);
-static int arc_evict_needed(arc_buf_contents_t type);
-static void arc_evict_ghost(arc_state_t *state, uint64_t spa, int64_t bytes);
-#ifdef illumos
-static void arc_buf_watch(arc_buf_t *buf);
-#endif /* illumos */
-
-static boolean_t l2arc_write_eligible(uint64_t spa_guid, arc_buf_hdr_t *ab);
 
 #defineGHOST_STATE(state)  \
((state) == arc_mru_ghost || (state) == arc_mfu_ghost ||\
(state) == arc_l2c_only)
 
-/*
- * Private ARC flags.  These flags are private ARC only flags that will show up
- * in b_flags in the arc_hdr_buf_t.  Some flags are publicly declared, and can
- * be passed in as arc_flags in things like arc_read.  However, these flags
- * should never be passed and should only be set by ARC code.  When adding new
- * public flags, make sure not to smash the private ones.
- */
-
-#defineARC_IN_HASH_TABLE   (1  9)/* this buffer is 
hashed */
-#defineARC_IO_IN_PROGRESS  (1  10)   /* I/O in progress for 
buf */
-#defineARC_IO_ERROR(1  11)   /* I/O failed for buf */
-#defineARC_FREED_IN_READ   (1  12)   /* buf freed while in 
read */
-#defineARC_BUF_AVAILABLE   (1  13)   /* block not in active 
use */
-#defineARC_INDIRECT(1  14)   /* this is an indirect 
block */
-#defineARC_FREE_IN_PROGRESS(1  15)   /* hdr about to be 
freed */
-#defineARC_L2_WRITING  (1  16)   /* L2ARC write in 
progress */
-#defineARC_L2_EVICTED  (1  17)   /* evicted during I/O */
-#defineARC_L2_WRITE_HEAD   (1  18)   /* head of write list */
-
-#defineHDR_IN_HASH_TABLE(hdr)  ((hdr)-b_flags  ARC_IN_HASH_TABLE)
-#defineHDR_IO_IN_PROGRESS(hdr) ((hdr)-b_flags  ARC_IO_IN_PROGRESS)
-#defineHDR_IO_ERROR(hdr)   ((hdr)-b_flags  ARC_IO_ERROR)
-#defineHDR_PREFETCH(hdr)   ((hdr)-b_flags  

svn commit: r275812 - head/cddl/contrib/opensolaris/lib/libzfs/common

2014-12-15 Thread Xin LI
Author: delphij
Date: Mon Dec 15 18:28:22 2014
New Revision: 275812
URL: https://svnweb.freebsd.org/changeset/base/275812

Log:
  MFV r275784:
  
  Plug a memory leak in libzfs.  In zfs_iter_bookmarks, an nvlist is allocated
  before calling lzc_get_bookmarks, which allocates the nvlist again (and
  overwrites the pointer to previously allocated list).
  
  Illumos issue:
  5427 memory leak in libzfs when doing rollback
  
  MFC after:2 weeks

Modified:
  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c
Directory Properties:
  head/cddl/contrib/opensolaris/   (props changed)
  head/cddl/contrib/opensolaris/lib/libzfs/   (props changed)

Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c
==
--- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c   Mon Dec 
15 18:22:45 2014(r275811)
+++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c   Mon Dec 
15 18:28:22 2014(r275812)
@@ -24,7 +24,7 @@
  * Copyright (c) 2013 by Delphix. All rights reserved.
  * Copyright (c) 2012 Pawel Jakub Dawidek pa...@dawidek.net.
  * All rights reserved.
- * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
+ * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
  */
 
 #include stdio.h
@@ -193,9 +193,6 @@ zfs_iter_bookmarks(zfs_handle_t *zhp, zf
fnvlist_add_boolean(props, zfs_prop_to_name(ZFS_PROP_CREATETXG));
fnvlist_add_boolean(props, zfs_prop_to_name(ZFS_PROP_CREATION));
 
-   /* Allocate an nvlist to hold the bookmarks. */
-   bmarks = fnvlist_alloc();
-
if ((err = lzc_get_bookmarks(zhp-zfs_name, props, bmarks)) != 0)
goto out;
 
___
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: r275813 - head/share/man/man9

2014-12-15 Thread Dmitry Chagin
Author: dchagin
Date: Mon Dec 15 20:48:06 2014
New Revision: 275813
URL: https://svnweb.freebsd.org/changeset/base/275813

Log:
  Properly sort Xr to silence mandoc warnings.
  
  Differential Revision:https://reviews.freebsd.org/D1314
  Reviewed by:  wblock
  MFC after:1 Month

Modified:
  head/share/man/man9/rmlock.9
  head/share/man/man9/sx.9

Modified: head/share/man/man9/rmlock.9
==
--- head/share/man/man9/rmlock.9Mon Dec 15 18:28:22 2014
(r275812)
+++ head/share/man/man9/rmlock.9Mon Dec 15 20:48:06 2014
(r275813)
@@ -289,8 +289,8 @@ Assert that the current thread does not 
 .Xr mutex 9 ,
 .Xr panic 9 ,
 .Xr rwlock 9 ,
-.Xr sleep 9 ,
 .Xr sema 9 ,
+.Xr sleep 9 ,
 .Xr sx 9
 .Sh HISTORY
 These

Modified: head/share/man/man9/sx.9
==
--- head/share/man/man9/sx.9Mon Dec 15 18:28:22 2014(r275812)
+++ head/share/man/man9/sx.9Mon Dec 15 20:48:06 2014(r275813)
@@ -315,8 +315,8 @@ lock while another thread blocked on the
 lock after acquiring a mutex, then the second thread would effectively
 end up sleeping while holding a mutex, which is not allowed.
 .Sh SEE ALSO
-.Xr locking 9 ,
 .Xr lock 9 ,
+.Xr locking 9 ,
 .Xr mutex 9 ,
 .Xr panic 9 ,
 .Xr rwlock 9 ,
___
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: r275804 - head/gnu/usr.bin/cc/cc1plus

2014-12-15 Thread Craig Rodrigues
On Mon, Dec 15, 2014 at 6:25 AM, Ed Maste ema...@freebsd.org wrote:

  cfns.h: cfns.gperf
 gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
 -   ${.ALLSRC}  ${.TARGET}
 +   ${.ALLSRC}  ${.TARGET} || (rm -f ${.TARGET}; false)


Instead of removing the target you could have done something like:

 cfns.h: cfns.gperf
gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
   ${.ALLSRC}  ${.TARGET}_temp
   mv ${.TARGET}_temp ${.TARGET}

--
Craig
___
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: r275804 - head/gnu/usr.bin/cc/cc1plus

2014-12-15 Thread Ed Maste
On 15 December 2014 at 16:04, Craig Rodrigues rodr...@freebsd.org wrote:


 On Mon, Dec 15, 2014 at 6:25 AM, Ed Maste ema...@freebsd.org wrote:

  cfns.h: cfns.gperf
 gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
 -   ${.ALLSRC}  ${.TARGET}
 +   ${.ALLSRC}  ${.TARGET} || (rm -f ${.TARGET}; false)


 Instead of removing the target you could have done something like:

  cfns.h: cfns.gperf
 gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
${.ALLSRC}  ${.TARGET}_temp
mv ${.TARGET}_temp ${.TARGET}

Yeah.  There are already examples of both approaches in the tree; I
don't see a reason to strongly prefer one over the other.
___
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: r275804 - head/gnu/usr.bin/cc/cc1plus

2014-12-15 Thread Craig Rodrigues
On Mon, Dec 15, 2014 at 1:38 PM, Ed Maste ema...@freebsd.org wrote:


   cfns.h: cfns.gperf
  gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \
 ${.ALLSRC}  ${.TARGET}_temp
 mv ${.TARGET}_temp ${.TARGET}

 Yeah.  There are already examples of both approaches in the tree; I
 don't see a reason to strongly prefer one over the other.


For very large build systems, sometimes it is easier to debug
weird build problems when the make operations do not have
conditional logic in them.  Also, not removing temporary files upon failure
makes things easier to debug.

--
Craig
___
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: r275815 - head/sys/dev/ofw

2014-12-15 Thread Ed Maste
Author: emaste
Date: Mon Dec 15 22:20:14 2014
New Revision: 275815
URL: https://svnweb.freebsd.org/changeset/base/275815

Log:
  Use standard BSD license disclaimer text
  
  Approved by:  benno, nwhitehorn

Modified:
  head/sys/dev/ofw/ofw_cpu.c

Modified: head/sys/dev/ofw/ofw_cpu.c
==
--- head/sys/dev/ofw/ofw_cpu.c  Mon Dec 15 21:22:42 2014(r275814)
+++ head/sys/dev/ofw/ofw_cpu.c  Mon Dec 15 22:20:14 2014(r275815)
@@ -11,16 +11,17 @@
  *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 Benno Rice ``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 TOOLS GMBH 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.
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
  */
 
 #include sys/cdefs.h
___
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: r275804 - head/gnu/usr.bin/cc/cc1plus

2014-12-15 Thread Alfred Perlstein


On 12/15/14 1:44 PM, Craig Rodrigues wrote:



On Mon, Dec 15, 2014 at 1:38 PM, Ed Maste ema...@freebsd.org 
mailto:ema...@freebsd.org wrote:



  cfns.h: cfns.gperf
 gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L
ANSI-C \
${.ALLSRC}  ${.TARGET}_temp
mv ${.TARGET}_temp ${.TARGET}

Yeah.  There are already examples of both approaches in the tree; I
don't see a reason to strongly prefer one over the other.


For very large build systems, sometimes it is easier to debug
weird build problems when the make operations do not have
conditional logic in them.

+1

  Also, not removing temporary files upon failure
makes things easier to debug.


+100


--
Craig


___
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: r275804 - head/gnu/usr.bin/cc/cc1plus

2014-12-15 Thread Ed Maste
   Also, not removing temporary files upon failure
 makes things easier to debug.

 +100

In general I agree completely. In this case though such a change would
just create an empty temporary file upon failure, which provides no
additional help in tracking down the failure over the gperf: not
found error that is already emitted.
___
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: r275816 - head/sys/dev/sis

2014-12-15 Thread Pyun YongHyeon
Author: yongari
Date: Tue Dec 16 06:13:30 2014
New Revision: 275816
URL: https://svnweb.freebsd.org/changeset/base/275816

Log:
  Fix a bug introdiced in r217548.  According to NS DP83815 data
  sheet, RX filter should be disabled before programming.
  Previously it was clearing wrong bits so RX filter was not
  disabled in RX filter configuration.
  
  Reported by:  b...@openbsd.org

Modified:
  head/sys/dev/sis/if_sis.c

Modified: head/sys/dev/sis/if_sis.c
==
--- head/sys/dev/sis/if_sis.c   Mon Dec 15 22:20:14 2014(r275815)
+++ head/sys/dev/sis/if_sis.c   Tue Dec 16 06:13:30 2014(r275816)
@@ -780,7 +780,7 @@ sis_rxfilter_sis(struct sis_softc *sc)
 
filter = CSR_READ_4(sc, SIS_RXFILT_CTL);
if (filter  SIS_RXFILTCTL_ENABLE) {
-   CSR_WRITE_4(sc, SIS_RXFILT_CTL, filter  ~SIS_RXFILT_CTL);
+   CSR_WRITE_4(sc, SIS_RXFILT_CTL, filter  ~SIS_RXFILTCTL_ENABLE);
CSR_READ_4(sc, SIS_RXFILT_CTL);
}
filter = ~(SIS_RXFILTCTL_ALLPHYS | SIS_RXFILTCTL_BROAD |
___
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: r275817 - head/sys/amd64/vmm/io

2014-12-15 Thread Neel Natu
Author: neel
Date: Tue Dec 16 06:33:57 2014
New Revision: 275817
URL: https://svnweb.freebsd.org/changeset/base/275817

Log:
  For level triggered interrupts clear the PIC IRR bit when the interrupt pin
  is deasserted. Prior to this change each assertion on a level triggered irq
  pin resulted in two interrupts being delivered to the CPU.
  
  Differential Revision:https://reviews.freebsd.org/D1310
  Reviewed by:  tychon
  MFC after:1 week

Modified:
  head/sys/amd64/vmm/io/vatpic.c

Modified: head/sys/amd64/vmm/io/vatpic.c
==
--- head/sys/amd64/vmm/io/vatpic.c  Tue Dec 16 06:13:30 2014
(r275816)
+++ head/sys/amd64/vmm/io/vatpic.c  Tue Dec 16 06:33:57 2014
(r275817)
@@ -388,6 +388,8 @@ vatpic_set_pinstate(struct vatpic *vatpi
} else if (oldcnt == 1  newcnt == 0) {
/* falling edge */
VATPIC_CTR1(vatpic, atpic pin%d: deasserted, pin);
+   if (level)
+   atpic-request = ~(1  (pin  0x7));
} else {
VATPIC_CTR3(vatpic, atpic pin%d: %s, ignored, acnt %d,
pin, newstate ? asserted : deasserted, newcnt);
___
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