svn commit: r326051 - head/usr.sbin/efidp

2017-11-20 Thread Warner Losh
Author: imp
Date: Tue Nov 21 07:35:29 2017
New Revision: 326051
URL: https://svnweb.freebsd.org/changeset/base/326051

Log:
  This program is more useful if it skips leading whitespace when
  parsing a textual UEFI Device Path, since otherwise it things the
  passed in path is a filename. While here, reduce the repetition of
  8192.
  
  Sponsored by: Netflix

Modified:
  head/usr.sbin/efidp/efidp.c

Modified: head/usr.sbin/efidp/efidp.c
==
--- head/usr.sbin/efidp/efidp.c Tue Nov 21 07:35:24 2017(r326050)
+++ head/usr.sbin/efidp/efidp.c Tue Nov 21 07:35:29 2017(r326051)
@@ -27,6 +27,7 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include 
 #include 
 #include 
 #include 
@@ -133,16 +134,22 @@ main(int argc, char **argv)
} else if (flag_parse) {
efidp dp;
ssize_t dplen;
-   char *str;
+   char *str, *walker;
 
-   dp = malloc(8192);
+   dplen = 8192;
+   dp = malloc(dplen);
str = realloc(data, len + 1);
if (str == NULL || dp == NULL)
errx(1, "Can't allocate memory.");
str[len] = '\0';
-   dplen = efidp_parse_device_path(str, dp, 8192);
+   walker = str;
+   while (isspace(*walker))
+   walker++;
+   dplen = efidp_parse_device_path(walker, dp, dplen);
if (dplen == -1)
-   errx(1, "Can't parse %s", str);
+   errx(1, "Can't parse %s", walker);
write(STDOUT_FILENO, dp, dplen);
+   free(dp);
+   free(str);
}
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r326050 - head/usr.sbin/efidp

2017-11-20 Thread Warner Losh
Author: imp
Date: Tue Nov 21 07:35:24 2017
New Revision: 326050
URL: https://svnweb.freebsd.org/changeset/base/326050

Log:
  Document what the command line arguments actually do. List some of the
  size limitations.
  
  Sponsored by: Netflix

Modified:
  head/usr.sbin/efidp/efidp.8

Modified: head/usr.sbin/efidp/efidp.8
==
--- head/usr.sbin/efidp/efidp.8 Tue Nov 21 06:12:21 2017(r326049)
+++ head/usr.sbin/efidp/efidp.8 Tue Nov 21 07:35:24 2017(r326050)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd May 24, 2017
+.Dd November 21, 2017
 .Dt EFIDP 8
 .Os
 .Sh NAME
@@ -36,16 +36,35 @@
 .Op Fl -parse
 .Op Fl -format
 .Sh DESCRIPTION
-This program manages
+This program converts
 .Dq Unified Extensible Firmware Interface
 .Pq UEFI
-Device Paths, as defined in the UEFI standard.
+Device Paths, as defined in the UEFI standard, to and from binary form.
+Binary and textual forms are defined in Chapter 9 of the UEFI
+Specification.
+.Pp
+.Bl -tag -width 20m
+.It Fl f Fl -format
+Formats a binary UEFI Device Path into its canonical UTF-8 textual form.
+A binary Device Path can be no longer than 8192 bytes.
+The textual form must fit into 4096 bytes.
+.It Fl p Fl -parse
+Parses a UEFI Device Path UTF-8 specification and outputs the binary
+Device Path form.
+Only one device path is parsed, even if there are multiple present in
+the input.
+Leading white space is ignored.
+The resulting binary Device Path can be no longer than 8192 bytes.
+.El
 .Sh SEE ALSO
 Appendix A of the UEFI specification has the format for GUIDs.
 All GUIDs
 .Dq Globally Unique Identifiers
 have the format described in RFC 4122.
-.El
+.Pp
+The Unified Extensible Firmware Interface Specification is available
+from
+.Pa www.uefi.org .
 .Sh HISTORY
 The
 .Nm
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r326045 - head/sys/powerpc/booke

2017-11-20 Thread Marcel Moolenaar


> On Nov 20, 2017, at 7:12 PM, Justin Hibbits  wrote:
> 
> Author: jhibbits
> Date: Tue Nov 21 03:12:16 2017
> New Revision: 326045
> URL: https://svnweb.freebsd.org/changeset/base/326045
> 
> Log:
>  Check the page table before TLB1 in pmap_kextract()
> 
>  The vast majority of pmap_kextract() calls are looking for a physical memory
>  address, not a device address.  By checking the page table first this saves
>  the formerly inevitable 64 (on e500mc and derivatives) iteration loop
>  through TLB1 in the most common cases.
> 
>  Benchmarking this on the P5020 (e5500 core) yields a 300% throughput
>  improvement on dtsec(4) (115Mbit/s -> 460Mbit/s) measured with iperf.
> 
>  Benchmarked on the P1022 (e500v2 core, 16 TLB1 entries) yields a 50%
>  throughput improvement on tsec(4) (~93Mbit/s -> 165Mbit/s) measured with
>  iperf.

Nice!

-- 
Marcel Moolenaar
mar...@xcllnt.net


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


svn commit: r326049 - head/sys/geom/part

2017-11-20 Thread Warner Losh
Author: imp
Date: Tue Nov 21 06:12:21 2017
New Revision: 326049
URL: https://svnweb.freebsd.org/changeset/base/326049

Log:
  While the EFI spec allows numbers to be in many forms, libefivar
  produces hex numbers for the dsn. Since that come is from EDK2, change
  this for symmetry, by generating the dsn as a hex number.
  
  Noticed by: gpart list | grep efimedia | awk -F: '{print $2;}' | \
sed -e 's/^ *//g;s/,,/,/' | grep MBR | efidp -p | efidp -f
  Sponsored by: Netflix

Modified:
  head/sys/geom/part/g_part_mbr.c

Modified: head/sys/geom/part/g_part_mbr.c
==
--- head/sys/geom/part/g_part_mbr.c Tue Nov 21 05:42:13 2017
(r326048)
+++ head/sys/geom/part/g_part_mbr.c Tue Nov 21 06:12:21 2017
(r326049)
@@ -322,7 +322,7 @@ g_part_mbr_dumpconf(struct g_part_table *basetable, st
if (entry->ent.dp_flag & 0x80)
sbuf_printf(sb, "%sactive\n", indent);
dsn = le32dec(table->mbr + DOSDSNOFF);
-   sbuf_printf(sb, "%sHD(%d,MBR,%d,%#jx,%#jx)", indent,
+   sbuf_printf(sb, "%sHD(%d,MBR,%#08x,%#jx,%#jx)", 
indent,
entry->base.gpe_index, dsn, (intmax_t)entry->base.gpe_start,
(intmax_t)(entry->base.gpe_end - entry->base.gpe_start + 
1));
sbuf_printf(sb, "\n");
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r326038 - in head/stand: . arm/uboot efi efi/fdt fdt i386 mips/beri mips/beri/boot2 mips/beri/loader mips/uboot ofw/libofw powerpc/boot1.chrp powerpc/kboot powerpc/ofw powerpc/ps3 powe

2017-11-20 Thread Warner Losh
On Mon, Nov 20, 2017 at 10:30 PM, Mark Millard  wrote:

> It looks to me like head/stand/powerpc/boot1.chrp/Makefile might
> have += vs. = issues compared to the other examples:
>
> Warner Losh imp at FreeBSD.org wrote on
> Mon Nov 20 22:42:21 UTC 2017 :
>
> Modified: head/stand/powerpc/boot1.chrp/Makefile
> 
> ==
> --- head/stand/powerpc/boot1.chrp/Makefile  Mon Nov 20 22:41:22 2017
>   (r326037)
> +++ head/stand/powerpc/boot1.chrp/Makefile  Mon Nov 20 22:42:17 2017
>   (r326038)
> @@ -13,9 +13,7 @@ SRCS= boot1.c ashldi3.c syncicache.c
>
>  MAN=
>
> -CFLAGS= -ffreestanding -msoft-float \
> -   -I${LDRSRC} -I${SYSDIR} -I${SASRC} \
> -   -D_STANDALONE
> +CFLAGS= -I${LDRSRC} -I${SYSDIR} -I${SASRC} -D_STANDALONE
>  LDFLAGS=-nostdlib -static -Wl,-N
>
>  .PATH:  ${SYSDIR}/libkern ${SRCTOP}/lib/libc/powerpc/gen ${.CURDIR}
>
> but the other files tend to use += for at least CFLAGS. In
> one case you converted an = into only using += locally:
>
> -CFLAGS=-ffreestanding  \
> -   -I${.CURDIR}\
> +CFLAGS+=   -I${.CURDIR}\
>
> (Generally the mix seems to be as it was before
> the changes but it likely looked odd before the
> changes when the files were view together.)
>
> There are also examples like:
>
>  LDFLAGS=   -nostdlib -static -T ${.CURDIR}/ldscript.${MACHINE_
> CPUARCH}
>  LDFLAGS+=  -Wl,-znotext
>
> and others with just = . But some files seem to always
> use += for LDFLAGS.
>
> May be a round of = vs. += checking is appropriate
> for the involved files?
>

Yea. I've done it once or twice already. It's quite likely another pass may
be necessary, so it doesn't surprise me you've found at least one places
that needs a good close look... There's a few places LDFLAGS are used, and
it seems everywhere it has -nostdlib, and maybe a few others. And there's
likely a few places where some of the defines need to be moved around to.

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


svn commit: r326048 - head/sys/geom/part

2017-11-20 Thread Warner Losh
Author: imp
Date: Tue Nov 21 05:42:13 2017
New Revision: 326048
URL: https://svnweb.freebsd.org/changeset/base/326048

Log:
  Remove trailing whitespace (one I just introduced and a bunch of
  others in the same directory).
  
  Sponsored by: Netflix

Modified:
  head/sys/geom/part/g_part.c
  head/sys/geom/part/g_part_apm.c
  head/sys/geom/part/g_part_bsd.c
  head/sys/geom/part/g_part_bsd64.c
  head/sys/geom/part/g_part_ebr.c
  head/sys/geom/part/g_part_gpt.c
  head/sys/geom/part/g_part_mbr.c

Modified: head/sys/geom/part/g_part.c
==
--- head/sys/geom/part/g_part.c Tue Nov 21 05:35:21 2017(r326047)
+++ head/sys/geom/part/g_part.c Tue Nov 21 05:42:13 2017(r326048)
@@ -1352,7 +1352,7 @@ g_part_ctl_resize(struct gctl_req *req, struct g_part_
/* Deny shrinking of an opened partition. */
gctl_error(req, "%d", EBUSY);
return (EBUSY);
-   } 
+   }
}
 
error = G_PART_RESIZE(table, entry, gpp);

Modified: head/sys/geom/part/g_part_apm.c
==
--- head/sys/geom/part/g_part_apm.c Tue Nov 21 05:35:21 2017
(r326047)
+++ head/sys/geom/part/g_part_apm.c Tue Nov 21 05:42:13 2017
(r326048)
@@ -207,7 +207,7 @@ apm_read_ent(struct g_consumer *cp, uint32_t blk, stru
 }
 
 static int
-g_part_apm_add(struct g_part_table *basetable, struct g_part_entry *baseentry, 
+g_part_apm_add(struct g_part_table *basetable, struct g_part_entry *baseentry,
 struct g_part_parms *gpp)
 {
struct g_part_apm_entry *entry;

Modified: head/sys/geom/part/g_part_bsd.c
==
--- head/sys/geom/part/g_part_bsd.c Tue Nov 21 05:35:21 2017
(r326047)
+++ head/sys/geom/part/g_part_bsd.c Tue Nov 21 05:42:13 2017
(r326048)
@@ -72,7 +72,7 @@ static int g_part_bsd_destroy(struct g_part_table *, s
 static void g_part_bsd_dumpconf(struct g_part_table *, struct g_part_entry *,
 struct sbuf *, const char *);
 static int g_part_bsd_dumpto(struct g_part_table *, struct g_part_entry *);
-static int g_part_bsd_modify(struct g_part_table *, struct g_part_entry *,  
+static int g_part_bsd_modify(struct g_part_table *, struct g_part_entry *,
 struct g_part_parms *);
 static const char *g_part_bsd_name(struct g_part_table *, struct g_part_entry 
*,
 char *, size_t);
@@ -256,7 +256,7 @@ g_part_bsd_destroy(struct g_part_table *basetable, str
 }
 
 static void
-g_part_bsd_dumpconf(struct g_part_table *table, struct g_part_entry 
*baseentry, 
+g_part_bsd_dumpconf(struct g_part_table *table, struct g_part_entry *baseentry,
 struct sbuf *sb, const char *indent)
 {
struct g_part_bsd_entry *entry;
@@ -275,7 +275,7 @@ g_part_bsd_dumpconf(struct g_part_table *table, struct
 }
 
 static int
-g_part_bsd_dumpto(struct g_part_table *table, struct g_part_entry *baseentry)  
+g_part_bsd_dumpto(struct g_part_table *table, struct g_part_entry *baseentry)
 {
struct g_part_bsd_entry *entry;
 
@@ -471,7 +471,7 @@ g_part_bsd_read(struct g_part_table *basetable, struct
 }
 
 static const char *
-g_part_bsd_type(struct g_part_table *basetable, struct g_part_entry 
*baseentry, 
+g_part_bsd_type(struct g_part_table *basetable, struct g_part_entry *baseentry,
 char *buf, size_t bufsz)
 {
struct g_part_bsd_entry *entry;

Modified: head/sys/geom/part/g_part_bsd64.c
==
--- head/sys/geom/part/g_part_bsd64.c   Tue Nov 21 05:35:21 2017
(r326047)
+++ head/sys/geom/part/g_part_bsd64.c   Tue Nov 21 05:42:13 2017
(r326048)
@@ -127,7 +127,7 @@ static int g_part_bsd64_destroy(struct g_part_table *,
 static void g_part_bsd64_dumpconf(struct g_part_table *, struct g_part_entry *,
 struct sbuf *, const char *);
 static int g_part_bsd64_dumpto(struct g_part_table *, struct g_part_entry *);
-static int g_part_bsd64_modify(struct g_part_table *, struct g_part_entry *,  
+static int g_part_bsd64_modify(struct g_part_table *, struct g_part_entry *,
 struct g_part_parms *);
 static const char *g_part_bsd64_name(struct g_part_table *, struct 
g_part_entry *,
 char *, size_t);
@@ -409,7 +409,7 @@ g_part_bsd64_dumpconf(struct g_part_table *basetable,
 }
 
 static int
-g_part_bsd64_dumpto(struct g_part_table *table, struct g_part_entry 
*baseentry)  
+g_part_bsd64_dumpto(struct g_part_table *table, struct g_part_entry *baseentry)
 {
struct g_part_bsd64_entry *entry;
 
@@ -577,7 +577,7 @@ invalid_label:
 }
 
 static const char *
-g_part_bsd64_type(struct g_part_table *basetable, struct g_part_entry 
*baseentry, 
+g_part_bsd64_type(struct g_part_table *basetable, struct g_part_entry 
*baseentry,
 char *buf, size_t bufsz)
 {
struct g_part_bsd64_entry *entry;


svn commit: r326047 - head/sys/geom/part

2017-11-20 Thread Warner Losh
Author: imp
Date: Tue Nov 21 05:35:21 2017
New Revision: 326047
URL: https://svnweb.freebsd.org/changeset/base/326047

Log:
  Implement efi media tagging for MBR partitioning types.
  
  Sponsored by: Netflix

Modified:
  head/sys/geom/part/g_part_mbr.c

Modified: head/sys/geom/part/g_part_mbr.c
==
--- head/sys/geom/part/g_part_mbr.c Tue Nov 21 03:15:32 2017
(r326046)
+++ head/sys/geom/part/g_part_mbr.c Tue Nov 21 05:35:21 2017
(r326047)
@@ -303,11 +303,14 @@ g_part_mbr_destroy(struct g_part_table *basetable, str
 }
 
 static void
-g_part_mbr_dumpconf(struct g_part_table *table, struct g_part_entry 
*baseentry, 
+g_part_mbr_dumpconf(struct g_part_table *basetable, struct g_part_entry 
*baseentry, 
 struct sbuf *sb, const char *indent)
 {
struct g_part_mbr_entry *entry;
+   struct g_part_mbr_table *table;
+   uint32_t dsn;
  
+   table = (struct g_part_mbr_table *)basetable;
entry = (struct g_part_mbr_entry *)baseentry;
if (indent == NULL) {
/* conftxt: libdisk compatibility */
@@ -318,6 +321,11 @@ g_part_mbr_dumpconf(struct g_part_table *table, struct
entry->ent.dp_typ);
if (entry->ent.dp_flag & 0x80)
sbuf_printf(sb, "%sactive\n", indent);
+   dsn = le32dec(table->mbr + DOSDSNOFF);
+   sbuf_printf(sb, "%sHD(%d,MBR,%d,%#jx,%#jx)", indent,
+   entry->base.gpe_index, dsn, (intmax_t)entry->base.gpe_start,
+   (intmax_t)(entry->base.gpe_end - entry->base.gpe_start + 
1));
+   sbuf_printf(sb, "\n");
} else {
/* confxml: scheme information */
}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r326038 - in head/stand: . arm/uboot efi efi/fdt fdt i386 mips/beri mips/beri/boot2 mips/beri/loader mips/uboot ofw/libofw powerpc/boot1.chrp powerpc/kboot powerpc/ofw powerpc/ps3 powe

2017-11-20 Thread Mark Millard
It looks to me like head/stand/powerpc/boot1.chrp/Makefile might
have += vs. = issues compared to the other examples:

Warner Losh imp at FreeBSD.org wrote on
Mon Nov 20 22:42:21 UTC 2017 :

Modified: head/stand/powerpc/boot1.chrp/Makefile
==
--- head/stand/powerpc/boot1.chrp/Makefile  Mon Nov 20 22:41:22 2017
(r326037)
+++ head/stand/powerpc/boot1.chrp/Makefile  Mon Nov 20 22:42:17 2017
(r326038)
@@ -13,9 +13,7 @@ SRCS= boot1.c ashldi3.c syncicache.c
 
 MAN=
 
-CFLAGS= -ffreestanding -msoft-float \
-   -I${LDRSRC} -I${SYSDIR} -I${SASRC} \
-   -D_STANDALONE
+CFLAGS= -I${LDRSRC} -I${SYSDIR} -I${SASRC} -D_STANDALONE
 LDFLAGS=-nostdlib -static -Wl,-N
 
 .PATH:  ${SYSDIR}/libkern ${SRCTOP}/lib/libc/powerpc/gen ${.CURDIR}

but the other files tend to use += for at least CFLAGS. In
one case you converted an = into only using += locally:

-CFLAGS=-ffreestanding  \
-   -I${.CURDIR}\
+CFLAGS+=   -I${.CURDIR}\

(Generally the mix seems to be as it was before
the changes but it likely looked odd before the
changes when the files were view together.)

There are also examples like:

 LDFLAGS=   -nostdlib -static -T ${.CURDIR}/ldscript.${MACHINE_CPUARCH}
 LDFLAGS+=  -Wl,-znotext

and others with just = . But some files seem to always
use += for LDFLAGS.

May be a round of = vs. += checking is appropriate
for the involved files?


===
Mark Millard
markmi at dsl-only.net

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


svn commit: r326046 - head/cddl/contrib/opensolaris/lib/libdtrace/common

2017-11-20 Thread Ed Maste
Author: emaste
Date: Tue Nov 21 03:15:32 2017
New Revision: 326046
URL: https://svnweb.freebsd.org/changeset/base/326046

Log:
  dt_modtext: return error on archs lacking an implementation
  
  Reported by:  mmel
  Reviewed by:  markj
  MFC after:1 week
  MFC with: r325042
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D13176

Modified:
  head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c

Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c
==
--- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.cTue Nov 
21 03:12:16 2017(r326045)
+++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.cTue Nov 
21 03:15:32 2017(r326046)
@@ -808,7 +808,7 @@ dt_modtext(dtrace_hdl_t *dtp, char *p, int isenabled, 
 {
printf("%s:%s(%d): aarch64 not implemented\n", __FUNCTION__, __FILE__,
__LINE__);
-   return (0);
+   return (-1);
 }
 #elif defined(__arm__)
 /* XXX */
@@ -818,7 +818,7 @@ dt_modtext(dtrace_hdl_t *dtp, char *p, int isenabled, 
 {
printf("%s:%s(%d): arm not implemented\n", __FUNCTION__, __FILE__,
__LINE__);
-   return (0);
+   return (-1);
 }
 #elif defined(__mips__)
 /* XXX */
@@ -828,7 +828,7 @@ dt_modtext(dtrace_hdl_t *dtp, char *p, int isenabled, 
 {
printf("%s:%s(%d): MIPS not implemented\n", __FUNCTION__, __FILE__,
__LINE__);
-   return (0);
+   return (-1);
 }
 #elif defined(__powerpc__)
 /* The sentinel is 'xor r3,r3,r3'. */
@@ -919,7 +919,7 @@ dt_modtext(dtrace_hdl_t *dtp, char *p, int isenabled, 
 {
printf("%s:%s(%d): RISC-V implementation required\n", __FUNCTION__,
__FILE__, __LINE__);
-   return (0);
+   return (-1);
 }
 #elif defined(__sparc)
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r326045 - head/sys/powerpc/booke

2017-11-20 Thread Justin Hibbits
Author: jhibbits
Date: Tue Nov 21 03:12:16 2017
New Revision: 326045
URL: https://svnweb.freebsd.org/changeset/base/326045

Log:
  Check the page table before TLB1 in pmap_kextract()
  
  The vast majority of pmap_kextract() calls are looking for a physical memory
  address, not a device address.  By checking the page table first this saves
  the formerly inevitable 64 (on e500mc and derivatives) iteration loop
  through TLB1 in the most common cases.
  
  Benchmarking this on the P5020 (e5500 core) yields a 300% throughput
  improvement on dtsec(4) (115Mbit/s -> 460Mbit/s) measured with iperf.
  
  Benchmarked on the P1022 (e500v2 core, 16 TLB1 entries) yields a 50%
  throughput improvement on tsec(4) (~93Mbit/s -> 165Mbit/s) measured with
  iperf.
  
  MFC after:1 week
  Relnotes: Maybe (significant performance improvement)

Modified:
  head/sys/powerpc/booke/pmap.c

Modified: head/sys/powerpc/booke/pmap.c
==
--- head/sys/powerpc/booke/pmap.c   Tue Nov 21 02:09:59 2017
(r326044)
+++ head/sys/powerpc/booke/pmap.c   Tue Nov 21 03:12:16 2017
(r326045)
@@ -2089,18 +2089,23 @@ static vm_paddr_t
 mmu_booke_kextract(mmu_t mmu, vm_offset_t va)
 {
tlb_entry_t e;
+   vm_paddr_t p;
int i;
 
-   /* Check TLB1 mappings */
-   for (i = 0; i < TLB1_ENTRIES; i++) {
-   tlb1_read_entry(, i);
-   if (!(e.mas1 & MAS1_VALID))
-   continue;
-   if (va >= e.virt && va < e.virt + e.size)
-   return (e.phys + (va - e.virt));
+   p = pte_vatopa(mmu, kernel_pmap, va);
+   
+   if (p == 0) {
+   /* Check TLB1 mappings */
+   for (i = 0; i < TLB1_ENTRIES; i++) {
+   tlb1_read_entry(, i);
+   if (!(e.mas1 & MAS1_VALID))
+   continue;
+   if (va >= e.virt && va < e.virt + e.size)
+   return (e.phys + (va - e.virt));
+   }
}
 
-   return (pte_vatopa(mmu, kernel_pmap, va));
+   return (p);
 }
 
 /*
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r326039 - in head: etc/mtree usr.bin/head usr.bin/head/tests

2017-11-20 Thread Alan Somers
On Mon, Nov 20, 2017 at 6:48 PM, Benjamin Kaduk  wrote:
> On Mon, Nov 20, 2017 at 7:36 PM, Alan Somers  wrote:
>>
>>
>> Are there any automated tools that care about the "Differential
>> Revision" field?  If so, they should be able to tell the difference
>> between GitHub revisions and Phabricator revisions based on the URL.
>
>
>
> Yes, Phabricator itself uses the link to close out the review.
>
>
>>
>> Using "Differential Revision" instead of "Pull request" is handy,
>> because it's part of the standard commit template, which encourages
>> consistency.
>
>
> As Warner says, we could just add a new thing to the template instead
> of overloading an existing one for convenience.
>
> -Ben

Okeedookee.  Here you go:
https://reviews.freebsd.org/D13179
https://reviews.freebsd.org/D13178

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


svn commit: r326043 - in head/sys/mips: include mips

2017-11-20 Thread Landon J. Fuller
Author: landonf
Date: Tue Nov 21 01:54:48 2017
New Revision: 326043
URL: https://svnweb.freebsd.org/changeset/base/326043

Log:
  Preemptively map MIPS INTRNG interrupts on non-FDT MIPS targets
  
  This replaces a partial workaround introduced in r305527 that was
  incompatible with nested INTRNG interrupt controllers if not also using
  FDT.
  
  On non-FDT MIPS INTRNG targets, we now preemptively produce a set of fixed
  mappings for the MIPS IRQ range during nexus attach. On FDT targets,
  OFW_BUS_MAP_INTR() remains responsible for mapping the MIPS IRQs.
  
  Approved by:  adrian (mentor)
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D12385

Modified:
  head/sys/mips/include/intr.h
  head/sys/mips/mips/mips_pic.c
  head/sys/mips/mips/nexus.c

Modified: head/sys/mips/include/intr.h
==
--- head/sys/mips/include/intr.hTue Nov 21 01:18:58 2017
(r326042)
+++ head/sys/mips/include/intr.hTue Nov 21 01:54:48 2017
(r326043)
@@ -55,16 +55,23 @@
 #defineNIRQMIPS_NIRQ
 #endif
 
+#ifndef FDT
+#defineMIPS_PIC_XREF   1   /**< unique xref */
+#endif
+
 #define INTR_IRQ_NSPC_SWI  4
 
+/* MIPS32 PIC APIs */
+int mips_pic_map_fixed_intrs(void);
+int mips_pic_activate_intr(device_t child, struct resource *r);
+int mips_pic_deactivate_intr(device_t child, struct resource *r);
+
 /* MIPS compatibility for legacy mips code */
 void cpu_init_interrupts(void);
 void cpu_establish_hardintr(const char *, driver_filter_t *, driver_intr_t *,
 void *, int, int, void **);
 void cpu_establish_softintr(const char *, driver_filter_t *, void (*)(void*),
 void *, int, int, void **);
-int cpu_create_intr_map(int);
-struct resource *cpu_get_irq_resource(int);
 /* MIPS interrupt C entry point */
 void cpu_intr(struct trapframe *);
 

Modified: head/sys/mips/mips/mips_pic.c
==
--- head/sys/mips/mips/mips_pic.c   Tue Nov 21 01:18:58 2017
(r326042)
+++ head/sys/mips/mips/mips_pic.c   Tue Nov 21 01:54:48 2017
(r326043)
@@ -2,8 +2,12 @@
  * Copyright (c) 2015 Alexander Kabaev
  * Copyright (c) 2006 Oleksandr Tymoshenko
  * Copyright (c) 2002-2004 Juli Mallett 
+ * Copyright (c) 2017 The FreeBSD Foundation
  * All rights reserved.
  *
+ * Portions of this software were developed by Landon Fuller
+ * 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:
@@ -44,6 +48,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -69,24 +74,56 @@ __FBSDID("$FreeBSD$");
 #define NSOFT_IRQS 2
 #define NREAL_IRQS (NHARD_IRQS + NSOFT_IRQS)
 
-static int mips_pic_intr(void *);
+struct mips_pic_softc;
 
+static int  mips_pic_intr(void *);
+static struct mips_pic_intr*mips_pic_find_intr(struct resource *r);
+static int  mips_pic_map_fixed_intr(u_int irq,
+struct mips_pic_intr **mapping);
+static void cpu_establish_intr(struct mips_pic_softc *sc,
+const char *name, driver_filter_t *filt,
+void (*handler)(void*), void *arg, int irq,
+int flags, void **cookiep);
+
+#defineINTR_MAP_DATA_MIPS  INTR_MAP_DATA_PLAT_1
+
 struct intr_map_data_mips_pic {
struct intr_map_datahdr;
u_int   irq;
 };
 
+/**
+ * MIPS interrupt state; available prior to MIPS PIC device attachment.
+ */
+static struct mips_pic_intr {
+   u_intmips_irq;  /**< MIPS IRQ# 0-7 */
+   u_intintr_irq;  /**< INTRNG IRQ#, or 
INTR_IRQ_INVALID if unmapped */
+   u_intconsumers; /**< INTRNG activation refcount 
*/
+   struct resource *res;   /**< resource shared by all 
interrupt handlers registered via
+cpu_establish_hardintr() 
or cpu_establish_softintr(); NULL
+if no interrupt handlers 
are yet registered. */
+} mips_pic_intrs[] = {
+   { 0, INTR_IRQ_INVALID, 0, NULL },
+   { 1, INTR_IRQ_INVALID, 0, NULL },
+   { 2, INTR_IRQ_INVALID, 0, NULL },
+   { 3, INTR_IRQ_INVALID, 0, NULL },
+   { 4, INTR_IRQ_INVALID, 0, NULL },
+   { 5, INTR_IRQ_INVALID, 0, NULL },
+   { 6, INTR_IRQ_INVALID, 0, NULL },
+   { 7, INTR_IRQ_INVALID, 0, NULL },
+};
+
+struct mtx mips_pic_mtx;
+MTX_SYSINIT(mips_pic_mtx, _pic_mtx, "mips intr controller mutex", 
MTX_DEF);
+
 struct mips_pic_irqsrc {

Re: svn commit: r326039 - in head: etc/mtree usr.bin/head usr.bin/head/tests

2017-11-20 Thread Benjamin Kaduk
On Mon, Nov 20, 2017 at 7:36 PM, Alan Somers  wrote:
>
>
> Are there any automated tools that care about the "Differential
> Revision" field?  If so, they should be able to tell the difference
> between GitHub revisions and Phabricator revisions based on the URL.
>


Yes, Phabricator itself uses the link to close out the review.



> Using "Differential Revision" instead of "Pull request" is handy,
> because it's part of the standard commit template, which encourages
> consistency.
>

As Warner says, we could just add a new thing to the template instead
of overloading an existing one for convenience.

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


Re: svn commit: r326039 - in head: etc/mtree usr.bin/head usr.bin/head/tests

2017-11-20 Thread Warner Losh
On Nov 20, 2017 6:36 PM, "Alan Somers"  wrote:

On Mon, Nov 20, 2017 at 6:32 PM, Ed Maste  wrote:
> On 20 November 2017 at 17:55, Alan Somers  wrote:
>> Author: asomers
>> Date: Mon Nov 20 22:55:02 2017
>> New Revision: 326039
>> URL: https://svnweb.freebsd.org/changeset/base/326039
>>
>> Log:
>>   Add ATF tests for head(1)
>>
>>   Submitted by: Fred Schlecter 
>>   Reviewed by:  asomers, jilles
>>   MFC after:3 weeks
>>   Differential Revision:https://github.com/freebsd/
freebsd/pull/127
>
> It's certainly a good idea to capture the source of changes that come
> in via GitHub pull requests, but the 'Differential Revision' field is
> specifically for reviews in our own hosted Phabricator instance.
>
> We don't have an officially established metadata field for changes
> that come in via pull requests at the moment. I'd suggest we just go
> with:
> Pull request: https://github.com/freebsd/freebsd/pull/127

Are there any automated tools that care about the "Differential
Revision" field?  If so, they should be able to tell the difference
between GitHub revisions and Phabricator revisions based on the URL.
Using "Differential Revision" instead of "Pull request" is handy,
because it's part of the standard commit template, which encourages
consistency.



We should add Pull Request: to the template. Differential Revision really
is a specific thing for phabricator...

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


Re: svn commit: r326039 - in head: etc/mtree usr.bin/head usr.bin/head/tests

2017-11-20 Thread Alan Somers
On Mon, Nov 20, 2017 at 6:32 PM, Ed Maste  wrote:
> On 20 November 2017 at 17:55, Alan Somers  wrote:
>> Author: asomers
>> Date: Mon Nov 20 22:55:02 2017
>> New Revision: 326039
>> URL: https://svnweb.freebsd.org/changeset/base/326039
>>
>> Log:
>>   Add ATF tests for head(1)
>>
>>   Submitted by: Fred Schlecter 
>>   Reviewed by:  asomers, jilles
>>   MFC after:3 weeks
>>   Differential Revision:https://github.com/freebsd/freebsd/pull/127
>
> It's certainly a good idea to capture the source of changes that come
> in via GitHub pull requests, but the 'Differential Revision' field is
> specifically for reviews in our own hosted Phabricator instance.
>
> We don't have an officially established metadata field for changes
> that come in via pull requests at the moment. I'd suggest we just go
> with:
> Pull request: https://github.com/freebsd/freebsd/pull/127

Are there any automated tools that care about the "Differential
Revision" field?  If so, they should be able to tell the difference
between GitHub revisions and Phabricator revisions based on the URL.
Using "Differential Revision" instead of "Pull request" is handy,
because it's part of the standard commit template, which encourages
consistency.

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


Re: svn commit: r326039 - in head: etc/mtree usr.bin/head usr.bin/head/tests

2017-11-20 Thread Ed Maste
On 20 November 2017 at 20:32, Ed Maste  wrote:
> I'd suggest we just go with:
> Pull request: https://github.com/freebsd/freebsd/pull/127

In fact, imp@ has already used this format for a number of changes
from pull requests, e.g. r314407, r314408, r314422...
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r326039 - in head: etc/mtree usr.bin/head usr.bin/head/tests

2017-11-20 Thread Ed Maste
On 20 November 2017 at 17:55, Alan Somers  wrote:
> Author: asomers
> Date: Mon Nov 20 22:55:02 2017
> New Revision: 326039
> URL: https://svnweb.freebsd.org/changeset/base/326039
>
> Log:
>   Add ATF tests for head(1)
>
>   Submitted by: Fred Schlecter 
>   Reviewed by:  asomers, jilles
>   MFC after:3 weeks
>   Differential Revision:https://github.com/freebsd/freebsd/pull/127

It's certainly a good idea to capture the source of changes that come
in via GitHub pull requests, but the 'Differential Revision' field is
specifically for reviews in our own hosted Phabricator instance.

We don't have an officially established metadata field for changes
that come in via pull requests at the moment. I'd suggest we just go
with:
Pull request: https://github.com/freebsd/freebsd/pull/127
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r326042 - head/sys/dev/cxgbe/cudbg

2017-11-20 Thread Navdeep Parhar
Author: np
Date: Tue Nov 21 01:18:58 2017
New Revision: 326042
URL: https://svnweb.freebsd.org/changeset/base/326042

Log:
  cxgbe(4): Fix unsafe mailbox access in cudbg.
  
  MFC after:1 week
  Sponsored by: Chelsio Communications

Modified:
  head/sys/dev/cxgbe/cudbg/cudbg_lib.c

Modified: head/sys/dev/cxgbe/cudbg/cudbg_lib.c
==
--- head/sys/dev/cxgbe/cudbg/cudbg_lib.cMon Nov 20 23:51:51 2017
(r326041)
+++ head/sys/dev/cxgbe/cudbg/cudbg_lib.cTue Nov 21 01:18:58 2017
(r326042)
@@ -77,10 +77,17 @@ static void read_sge_ctxt(struct cudbg_init *pdbg_init
struct adapter *padap = pdbg_init->adap;
int rc = -1;
 
-   if (is_fw_attached(pdbg_init))
+   if (is_fw_attached(pdbg_init)) {
+   rc = begin_synchronized_op(padap, NULL, SLEEP_OK | INTR_OK,
+   "t4cudf");
+   if (rc != 0)
+   goto out;
rc = t4_sge_ctxt_rd(padap, padap->mbox, cid, ctype,
data);
+   end_synchronized_op(padap, 0);
+   }
 
+out:
if (rc)
t4_sge_ctxt_rd_bd(padap, cid, ctype, data);
 }
@@ -2720,7 +2727,12 @@ static void cudbg_t4_fwcache(struct cudbg_init *pdbg_i
if (is_fw_attached(pdbg_init)) {
 
/* Flush uP dcache before reading edcX/mcX  */
-   rc = t4_fwcache(padap, FW_PARAM_DEV_FWCACHE_FLUSH);
+   rc = begin_synchronized_op(padap, NULL, SLEEP_OK | INTR_OK,
+   "t4cudl");
+   if (rc == 0) {
+   rc = t4_fwcache(padap, FW_PARAM_DEV_FWCACHE_FLUSH);
+   end_synchronized_op(padap, 0);
+   }
 
if (rc) {
if (pdbg_init->verbose)
@@ -3331,6 +3343,9 @@ static int collect_tid(struct cudbg_init *pdbg_init,
para[5] = FW_PARAM_PFVF_A(SERVER_START);
para[6] = FW_PARAM_PFVF_A(SERVER_END);
 
+   rc = begin_synchronized_op(padap, NULL, SLEEP_OK | INTR_OK, "t4cudq");
+   if (rc)
+   goto err;
mbox = padap->mbox;
pf = padap->pf;
rc = t4_query_params(padap, mbox, pf, 0, 7, para, val);
@@ -3417,6 +3432,7 @@ static int collect_tid(struct cudbg_init *pdbg_init,
rc = compress_buff(_buff, dbg_buff);
 
 err1:
+   end_synchronized_op(padap, 0);
release_scratch_buff(_buff, dbg_buff);
 err:
return rc;
@@ -3602,8 +3618,13 @@ static int collect_mps_tcam(struct cudbg_init *pdbg_in
htons(V_FW_LDST_CMD_FID(FW_LDST_MPS_RPLC) |
  V_FW_LDST_CMD_IDX(i));
 
-   rc = t4_wr_mbox(padap, padap->mbox, _cmd,
-   sizeof(ldst_cmd), _cmd);
+   rc = begin_synchronized_op(padap, NULL,
+   SLEEP_OK | INTR_OK, "t4cudm");
+   if (rc == 0) {
+   rc = t4_wr_mbox(padap, padap->mbox, _cmd,
+   sizeof(ldst_cmd), _cmd);
+   end_synchronized_op(padap, 0);
+   }
 
if (rc)
mps_rpl_backdoor(padap, _rplc);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r326041 - head/usr.sbin/periodic

2017-11-20 Thread Alan Somers
Author: asomers
Date: Mon Nov 20 23:51:51 2017
New Revision: 326041
URL: https://svnweb.freebsd.org/changeset/base/326041

Log:
  periodic: fix exit status for nonexistent arguments
  
  When called with an absolute pathname, periodic should attempt to execute
  every script in that directory. If the directory does not exist, it should
  print an error and exit 1. Due to a copy/paste mistake in r231568, it exits
  0 in that case.
  
  Reported by:  devel/hs-ShellCheck
  MFC after:3 weeks
  Sponsored by: Spectra Logic Corp
  Differential Revision:https://reviews.freebsd.org/D13070

Modified:
  head/usr.sbin/periodic/periodic.sh

Modified: head/usr.sbin/periodic/periodic.sh
==
--- head/usr.sbin/periodic/periodic.sh  Mon Nov 20 23:45:42 2017
(r326040)
+++ head/usr.sbin/periodic/periodic.sh  Mon Nov 20 23:51:51 2017
(r326041)
@@ -103,7 +103,7 @@ case $arg in
 dirlist="$arg"
 else
 echo "$0: $arg not found" >&2
-continue
+exit 1
 fi
 ;;
 *)  dirlist=
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r326040 - in head/sys/cam: ata scsi

2017-11-20 Thread Alan Somers
Author: asomers
Date: Mon Nov 20 23:45:42 2017
New Revision: 326040
URL: https://svnweb.freebsd.org/changeset/base/326040

Log:
  Quirk Seagate ST8000AS0003-2HH
  
  Like its predecessor ST8000AS0002, this is a drive-managed SMR drive, but
  doesn't declare that in its ATA identify data.
  
  MFC after:3 weeks
  Sponsored by: Spectra Logic Corp

Modified:
  head/sys/cam/ata/ata_da.c
  head/sys/cam/scsi/scsi_da.c

Modified: head/sys/cam/ata/ata_da.c
==
--- head/sys/cam/ata/ata_da.c   Mon Nov 20 22:55:02 2017(r326039)
+++ head/sys/cam/ata/ata_da.c   Mon Nov 20 23:45:42 2017(r326040)
@@ -753,7 +753,7 @@ static struct ada_quirk_entry ada_quirk_table[] =
 * Drive Managed SATA hard drive.  This drive doesn't report
 * in firmware that it is a drive managed SMR drive.
 */
-   { T_DIRECT, SIP_MEDIA_FIXED, "*", "ST8000AS0002*", "*" },
+   { T_DIRECT, SIP_MEDIA_FIXED, "*", "ST8000AS000[23]*", "*" },
/*quirks*/ADA_Q_SMR_DM
},
{

Modified: head/sys/cam/scsi/scsi_da.c
==
--- head/sys/cam/scsi/scsi_da.c Mon Nov 20 22:55:02 2017(r326039)
+++ head/sys/cam/scsi/scsi_da.c Mon Nov 20 23:45:42 2017(r326040)
@@ -1346,7 +1346,7 @@ static struct da_quirk_entry da_quirk_table[] =
 * Drive Managed SATA hard drive.  This drive doesn't report
 * in firmware that it is a drive managed SMR drive.
 */
-   { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "ST8000AS0002*", "*" },
+   { T_DIRECT, SIP_MEDIA_FIXED, "ATA", "ST8000AS000[23]*", "*" },
/*quirks*/DA_Q_SMR_DM
},
{
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r326039 - in head: etc/mtree usr.bin/head usr.bin/head/tests

2017-11-20 Thread Alan Somers
Author: asomers
Date: Mon Nov 20 22:55:02 2017
New Revision: 326039
URL: https://svnweb.freebsd.org/changeset/base/326039

Log:
  Add ATF tests for head(1)
  
  Submitted by: Fred Schlecter 
  Reviewed by:  asomers, jilles
  MFC after:3 weeks
  Differential Revision:https://github.com/freebsd/freebsd/pull/127

Added:
  head/usr.bin/head/tests/
  head/usr.bin/head/tests/Makefile   (contents, props changed)
  head/usr.bin/head/tests/head_test.sh   (contents, props changed)
Modified:
  head/etc/mtree/BSD.tests.dist
  head/usr.bin/head/Makefile

Modified: head/etc/mtree/BSD.tests.dist
==
--- head/etc/mtree/BSD.tests.dist   Mon Nov 20 22:42:17 2017
(r326038)
+++ head/etc/mtree/BSD.tests.dist   Mon Nov 20 22:55:02 2017
(r326039)
@@ -660,6 +660,8 @@
 ..
 gzip
 ..
+head
+..
 hexdump
 ..
 ident

Modified: head/usr.bin/head/Makefile
==
--- head/usr.bin/head/Makefile  Mon Nov 20 22:42:17 2017(r326038)
+++ head/usr.bin/head/Makefile  Mon Nov 20 22:55:02 2017(r326039)
@@ -1,6 +1,11 @@
 #  @(#)Makefile8.1 (Berkeley) 6/6/93
 # $FreeBSD$
 
+.include 
+
 PROG=  head
+
+HAS_TESTS=
+SUBDIR.${MK_TESTS}+= tests
 
 .include 

Added: head/usr.bin/head/tests/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/head/tests/MakefileMon Nov 20 22:55:02 2017
(r326039)
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+PACKAGE=   tests
+
+ATF_TESTS_SH=  head_test
+
+.include 

Added: head/usr.bin/head/tests/head_test.sh
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/usr.bin/head/tests/head_test.shMon Nov 20 22:55:02 2017
(r326039)
@@ -0,0 +1,132 @@
+# Copyright (c) 2017 Fred Schlechter 
+# 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$
+
+atf_test_case empty_file 
+empty_file_head() {
+   atf_set "descr" "Test head(1)'s handling of an empty file"
+}
+empty_file_body() {
+   touch infile expectfile
+   head infile > outfile
+   head < infile > outpipe
+   atf_check cmp expectfile outfile
+   atf_check cmp expectfile outpipe
+}
+
+atf_test_case default_no_options
+default_no_options_head() {
+   atf_set "descr" "Test head(1)'s default mode"
+}
+default_no_options_body() {
+   #head(1) is supposed to default to 10 lines of output. Verify that it 
does that.
+   jot -b test 10 > expectfile
+   jot -b test 100 > infile
+   head infile > outfile
+   atf_check -e empty cmp expectfile outfile
+}
+
+atf_test_case line_count
+line_count_head() {
+   atf_set "descr" "Test head(1)'s -n option" 
+}
+line_count_body() {
+   jot -b test 100 > outfile
+   head -n 50 outfile > expectfile
+   atf_check -o inline:"  50 expectfile\n" wc -l expectfile
+}
+
+atf_test_case byte_count
+byte_count_head() {
+   atf_set "descr" "Test head(1)'s -c option"
+}
+byte_count_body() {
+   jot -b test 100 > outfile
+   head -c 50 outfile > expectfile
+   atf_check -o inline:"  50 expectfile\n" wc -c expectfile
+}
+
+atf_test_case sparse_file_text_at_beginning
+sparse_file_text_at_beginning_head() {
+   atf_set "descr" "Test head(1)'s handling of a sparse file with text at 
the beginning of the file"
+}
+sparse_file_text_at_beginning_body () {
+   jot -b test 10 > outfile
+   

svn commit: r326038 - in head/stand: . arm/uboot efi efi/fdt fdt i386 mips/beri mips/beri/boot2 mips/beri/loader mips/uboot ofw/libofw powerpc/boot1.chrp powerpc/kboot powerpc/ofw powerpc/ps3 power...

2017-11-20 Thread Warner Losh
Author: imp
Date: Mon Nov 20 22:42:17 2017
New Revision: 326038
URL: https://svnweb.freebsd.org/changeset/base/326038

Log:
  Move some more common stuff up to Makefile.inc. In particular, the no
  simd / no float stuff is centeralized here. Also centralise
  -ffreestanding since it is specified everywhere.
  
  This, along with a change to share/mk/bsd.cpu.mk to include -mno-avx2
  in CFLAGS_NO_SIMD should fix building for newer machines (eg with
  CPUTYPE=haswell) where clang was generating avx2 instructions.
  
  Sponsored by: Netflix

Modified:
  head/stand/Makefile.inc
  head/stand/arm/uboot/Makefile
  head/stand/efi/Makefile.inc
  head/stand/efi/fdt/Makefile
  head/stand/fdt/Makefile
  head/stand/i386/Makefile.inc
  head/stand/mips/beri/Makefile.inc
  head/stand/mips/beri/boot2/Makefile
  head/stand/mips/beri/loader/Makefile
  head/stand/mips/uboot/Makefile
  head/stand/ofw/libofw/Makefile
  head/stand/powerpc/boot1.chrp/Makefile
  head/stand/powerpc/kboot/Makefile
  head/stand/powerpc/ofw/Makefile
  head/stand/powerpc/ps3/Makefile
  head/stand/powerpc/uboot/Makefile
  head/stand/sparc64/Makefile.inc
  head/stand/uboot/fdt/Makefile
  head/stand/uboot/lib/Makefile
  head/stand/usb/Makefile
  head/stand/usb/Makefile.test
  head/stand/userboot/userboot/Makefile

Modified: head/stand/Makefile.inc
==
--- head/stand/Makefile.inc Mon Nov 20 22:41:22 2017(r326037)
+++ head/stand/Makefile.inc Mon Nov 20 22:42:17 2017(r326038)
@@ -9,6 +9,20 @@ CFLAGS+=-I${SASRC}
 
 SSP_CFLAGS=
 
+# Add in the no float / no SIMD stuff and announce we're freestanding
+CFLAGS+=   -ffreestanding ${CFLAGS_NO_SIMD}
+.if ${MACHINE_CPUARCH} == "aarch64"
+CFLAGS+=   -mgeneral-regs-only
+.else
+CFLAGS+=   -msoft-float
+.endif
+
+.if ${MACHINE_CPUARCH} == "i386" || (${MACHINE_CPUARCH} == "amd64" && 
${DO32:U0} == 1)
+CFLAGS+=   -march=i386
+CFLAGS.gcc+=   -mpreferred-stack-boundary=2
+.endif
+
+
 .if ${MACHINE_CPUARCH} == "arm"
 # Do not generate movt/movw, because the relocation fixup for them does not
 # translate to the -Bsymbolic -pie format required by self_reloc() in 
loader(8).

Modified: head/stand/arm/uboot/Makefile
==
--- head/stand/arm/uboot/Makefile   Mon Nov 20 22:41:22 2017
(r326037)
+++ head/stand/arm/uboot/Makefile   Mon Nov 20 22:42:17 2017
(r326038)
@@ -33,8 +33,6 @@ HELP_FILES+=   help.uboot ${BOOTSRC}/fdt/help.fdt
 # Always add MI sources
 .include   "${BOOTSRC}/loader.mk"
 
-CFLAGS+=   -ffreestanding -msoft-float
-
 LDFLAGS=   -nostdlib -static -T ${.CURDIR}/ldscript.${MACHINE_CPUARCH}
 LDFLAGS+=  -Wl,-znotext
 

Modified: head/stand/efi/Makefile.inc
==
--- head/stand/efi/Makefile.inc Mon Nov 20 22:41:22 2017(r326037)
+++ head/stand/efi/Makefile.inc Mon Nov 20 22:42:17 2017(r326038)
@@ -1,23 +1,13 @@
 # $FreeBSD$
 
-.if ${MACHINE_CPUARCH} == "i386"
-CFLAGS+=-march=i386
-CFLAGS+=   -mno-aes
-.endif
-
 # Options used when building app-specific efi components
 # See conf/kern.mk for the correct set of these
-CFLAGS+=   -ffreestanding -Wformat ${CFLAGS_NO_SIMD}
+CFLAGS+=   -Wformat
 LDFLAGS+=  -nostdlib
 
-.if ${MACHINE_CPUARCH} != "aarch64"
-CFLAGS+=   -msoft-float
-.endif
-
 .if ${MACHINE_CPUARCH} == "amd64"
 CFLAGS+=   -fshort-wchar
 CFLAGS+=   -mno-red-zone
-CFLAGS+=   -mno-aes
 .endif
 
 .if ${MACHINE_CPUARCH} == "aarch64"

Modified: head/stand/efi/fdt/Makefile
==
--- head/stand/efi/fdt/Makefile Mon Nov 20 22:41:22 2017(r326037)
+++ head/stand/efi/fdt/Makefile Mon Nov 20 22:42:17 2017(r326038)
@@ -10,13 +10,6 @@ WARNS?=  6
 
 SRCS=  efi_fdt.c
 
-CFLAGS+=   -ffreestanding
-.if ${MACHINE_CPUARCH} == "aarch64"
-CFLAGS+=   -mgeneral-regs-only
-.else
-CFLAGS+=   -msoft-float
-.endif
-
 # EFI library headers
 CFLAGS+=   -I${EFISRC}/include
 CFLAGS+=   -I${EFISRC}/include/${MACHINE}

Modified: head/stand/fdt/Makefile
==
--- head/stand/fdt/Makefile Mon Nov 20 22:41:22 2017(r326037)
+++ head/stand/fdt/Makefile Mon Nov 20 22:42:17 2017(r326038)
@@ -16,12 +16,6 @@ SRCS+=   fdt_loader_cmd.c fdt_overlay.c
 
 CFLAGS+=   -I${SYSDIR}/contrib/libfdt/ -I${LDRSRC}
 
-CFLAGS+=   -ffreestanding
-
-.if ${MACHINE_CPUARCH} == "powerpc" || ${MACHINE_CPUARCH} == "arm" || 
${MACHINE_CPUARCH} == "mips"
-CFLAGS+=   -msoft-float
-.endif
-
 CFLAGS+=   -Wformat -Wall
 
 .include 

Modified: head/stand/i386/Makefile.inc
==
--- head/stand/i386/Makefile.inc   

svn commit: r326037 - head/share/mk

2017-11-20 Thread Warner Losh
Author: imp
Date: Mon Nov 20 22:41:22 2017
New Revision: 326037
URL: https://svnweb.freebsd.org/changeset/base/326037

Log:
  Add -mno-avx2 for clang as well as -mno-avx. We don't want either of
  them when asking for no SIMD.
  
  Reviewed by: emaste@
  Sponsored by: Netflix

Modified:
  head/share/mk/bsd.cpu.mk

Modified: head/share/mk/bsd.cpu.mk
==
--- head/share/mk/bsd.cpu.mkMon Nov 20 22:27:33 2017(r326036)
+++ head/share/mk/bsd.cpu.mkMon Nov 20 22:41:22 2017(r326037)
@@ -393,7 +393,7 @@ CFLAGS += ${_CPUCFLAGS}
 # (-mfpmath= is not supported)
 #
 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
-CFLAGS_NO_SIMD.clang= -mno-avx
+CFLAGS_NO_SIMD.clang= -mno-avx -mno-avx2
 CFLAGS_NO_SIMD= -mno-mmx -mno-sse
 .endif
 CFLAGS_NO_SIMD += ${CFLAGS_NO_SIMD.${COMPILER_TYPE}}
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r304443 - head/sys/cam

2017-11-20 Thread Alan Somers
Can we MFC this now?  Perhaps in tandem with 326034 ?

On Thu, Aug 18, 2016 at 10:30 PM, Warner Losh  wrote:
> Author: imp
> Date: Fri Aug 19 04:30:29 2016
> New Revision: 304443
> URL: https://svnweb.freebsd.org/changeset/base/304443
>
> Log:
>   Improve the pattern matching so that internal *'s work, as well as
>   [set] notation. This fixes pattern matching for recently added drives
>   that would set the NCQ Trim being broken incorrectly.
>
>   PR: 210686
>   Tested-by: Tomoaki AOKI
>   MFC After: 3 days
>
> Modified:
>   head/sys/cam/cam.c
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r326036 - head/sys/cam/scsi

2017-11-20 Thread Alan Somers
Author: asomers
Date: Mon Nov 20 22:27:33 2017
New Revision: 326036
URL: https://svnweb.freebsd.org/changeset/base/326036

Log:
  da(4): Short-circuit unnecessary BIO_FLUSH commands
  
  sys/cam/scsi/scsi_da.c
Complete BIO_FLUSH commands immediately if the da(4) device hasn't
been written to since the last flush. If we haven't written to the
device, there is no reason to send a flush.
  
  Submitted by: gibbs
  Reviewed by:  imp
  MFC after:3 weeks
  Sponsored by: Spectra Logic Corp
  Differential Revision:https://reviews.freebsd.org/D13106

Modified:
  head/sys/cam/scsi/scsi_da.c

Modified: head/sys/cam/scsi/scsi_da.c
==
--- head/sys/cam/scsi/scsi_da.c Mon Nov 20 22:18:24 2017(r326035)
+++ head/sys/cam/scsi/scsi_da.c Mon Nov 20 22:27:33 2017(r326036)
@@ -3038,6 +3038,18 @@ more:
}
case BIO_FLUSH:
/*
+* If we don't support sync cache, or the disk
+* isn't dirty, FLUSH is a no-op.  Use the
+* allocated * CCB for the next bio if one is
+* available.
+*/
+   if ((softc->quirks & DA_Q_NO_SYNC_CACHE) != 0 ||
+   (softc->flags & DA_FLAG_DIRTY) == 0) {
+   biodone(bp);
+   goto skipstate;
+   }
+
+   /*
 * BIO_FLUSH doesn't currently communicate
 * range data, so we synchronize the cache
 * over the whole disk.  We also force
@@ -3052,6 +3064,15 @@ more:
   /*lb_count*/0,
   SSD_FULL_SIZE,
   da_default_timeout*1000);
+   /*
+* Clear the dirty flag before sending the command.
+* Either this sync cache will be successful, or it
+* will fail after a retry.  If it fails, it is
+* unlikely to be successful if retried later, so
+* we'll save ourselves time by just marking the
+* device clean.
+*/
+   softc->flags &= ~DA_FLAG_DIRTY;
break;
case BIO_ZONE: {
int error, queue_ccb;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r326035 - head/sys/mips/beri

2017-11-20 Thread Brooks Davis
Author: brooks
Date: Mon Nov 20 22:18:24 2017
New Revision: 326035
URL: https://svnweb.freebsd.org/changeset/base/326035

Log:
  Remove a couple variables that are unused after r325790.
  
  Reported by:  rpokala

Modified:
  head/sys/mips/beri/beri_machdep.c

Modified: head/sys/mips/beri/beri_machdep.c
==
--- head/sys/mips/beri/beri_machdep.c   Mon Nov 20 22:01:45 2017
(r326034)
+++ head/sys/mips/beri/beri_machdep.c   Mon Nov 20 22:18:24 2017
(r326035)
@@ -174,9 +174,7 @@ platform_start(__register_t a0, __register_t a1,  __re
char **envp = (char **)a2;
long memsize;
 #ifdef FDT
-   char buf[2048]; /* early stack supposedly big enough */
vm_offset_t dtbp;
-   phandle_t chosen;
void *kmdp;
 #endif
int i;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r326034 - in head: lib/libcam/tests sys/cam

2017-11-20 Thread Alan Somers
Author: asomers
Date: Mon Nov 20 22:01:45 2017
New Revision: 326034
URL: https://svnweb.freebsd.org/changeset/base/326034

Log:
  Fix multiple bugs in cam_strmatch
  
  * Wrongly matches strings that are shorter than the pattern
  * Fails to match negative character sets
  * Fails to match character sets that aren't at the end of the pattern
  * Fails to match character ranges
  
  Reviewed by:  imp
  MFC after:3 weeks
  Sponsored by: Spectra Logic Corp
  Differential Revision:https://reviews.freebsd.org/D13173

Added:
  head/lib/libcam/tests/cam_test.c   (contents, props changed)
Modified:
  head/lib/libcam/tests/Makefile
  head/lib/libcam/tests/libcam_test.c
  head/sys/cam/cam.c

Modified: head/lib/libcam/tests/Makefile
==
--- head/lib/libcam/tests/Makefile  Mon Nov 20 21:57:04 2017
(r326033)
+++ head/lib/libcam/tests/Makefile  Mon Nov 20 22:01:45 2017
(r326034)
@@ -1,6 +1,7 @@
 # $FreeBSD$
 
 ATF_TESTS_C+=  libcam_test
+ATF_TESTS_C+=  cam_test
 
 LIBADD+=   cam
 

Added: head/lib/libcam/tests/cam_test.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/libcam/tests/cam_test.cMon Nov 20 22:01:45 2017
(r326034)
@@ -0,0 +1,111 @@
+/*-
+ * Copyright (c) 2017 Spectra Logic Corporation
+ * 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.
+ */
+
+/* Tests functions in sys/cam/cam.c */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#define ATF_CHECK_NE(x, y) ATF_CHECK((x) != (y))
+
+ATF_TC_WITHOUT_HEAD(cam_strmatch);
+ATF_TC_BODY(cam_strmatch, tc)
+{
+   /* Basic fixed patterns */
+   ATF_CHECK_EQ(0, cam_strmatch("foo", "foo", 3));
+   ATF_CHECK_NE(0, cam_strmatch("foo", "bar", 3));
+   ATF_CHECK_NE(0, cam_strmatch("foo", "foobar", 3));
+
+   /* The str is not necessarily null-terminated */
+   ATF_CHECK_EQ(0, cam_strmatch("fooxuehfxeuf", "foo", 3));
+   ATF_CHECK_NE(0, cam_strmatch("foo\0bar", "foo", 7));
+
+   /* Eat trailing spaces, which get added by SAT */
+   ATF_CHECK_EQ(0, cam_strmatch("foo ", "foo", 16));
+
+   /* '*' matches everything, like shell globbing */
+   ATF_CHECK_EQ(0, cam_strmatch("foobar", "foo*", 6));
+   ATF_CHECK_EQ(0, cam_strmatch("foobar", "*bar", 6));
+   ATF_CHECK_NE(0, cam_strmatch("foobar", "foo*x", 6));
+   ATF_CHECK_EQ(0, cam_strmatch("foobarbaz", "*bar*", 9));
+   /* Even NUL */
+   ATF_CHECK_EQ(0, cam_strmatch("foo\0bar", "foo*", 7));
+   /* Or nothing */
+   ATF_CHECK_EQ(0, cam_strmatch("foo", "foo*", 3));
+   /* But stuff after the * still must match */
+   ATF_CHECK_NE(0, cam_strmatch("foo", "foo*x", 3));
+
+   /* '?' matches exactly one single character */
+   ATF_CHECK_EQ(0, cam_strmatch("foobar", "foo?ar", 6));
+   ATF_CHECK_NE(0, cam_strmatch("foo", "foo?", 3));
+   /* Even NUL */
+   ATF_CHECK_EQ(0, cam_strmatch("foo\0bar", "foo?bar", 7));
+
+   /* '[]' contains a set of characters */
+   ATF_CHECK_EQ(0, cam_strmatch("foobar", "foo[abc]ar", 6));
+   ATF_CHECK_EQ(0, cam_strmatch("foobar", "foo[b]ar", 6));
+   ATF_CHECK_NE(0, cam_strmatch("foobar", "foo[ac]ar", 6));
+
+   /* '[]' can contain a range of characters, too */
+   ATF_CHECK_EQ(0, cam_strmatch("foobar", "foo[a-c]ar", 6));
+   ATF_CHECK_EQ(0, cam_strmatch("fooxar", "foo[a-cx]ar", 6));
+   ATF_CHECK_NE(0, cam_strmatch("foodar", "foo[a-c]ar", 6));
+   
+   /* Back-to-back '[]' character sets */
+   ATF_CHECK_EQ(0, 

Re: svn commit: r325965 - head/libexec/rtld-elf

2017-11-20 Thread Brooks Davis
On Sat, Nov 18, 2017 at 01:21:22PM +, Edward Tomasz Napierala wrote:
> Author: trasz
> Date: Sat Nov 18 13:21:22 2017
> New Revision: 325965
> URL: https://svnweb.freebsd.org/changeset/base/325965
> 
> Log:
>   Increase rtld initial memory pool size from 32kB to 128kB.
>   
>   The old value was probably fine back in 1998, when that code was imported
>   (although the comments still mention VAX, which was quite obsolete by then);
>   now, however, it's too small to handle our libc, which results in some
>   additional calls to munmap/mmap later on.  Asking for more virtual address
>   space is virtually free, and syscalls are not, thus the change.

Not specificaly about this commit, but a general comment:

The power-of-2 sized buckets used by this allocator are likely suboptimal
both in terms of space use (largely irrelevent in practice) and cache
effects (in particular, unnecessicary false sharing of TLS segments).
There is probably a fair bit of room for optimization here.

-- Brooks


signature.asc
Description: PGP signature


svn commit: r326033 - head/sys/net

2017-11-20 Thread Stephen Hurd
Author: shurd
Date: Mon Nov 20 21:57:04 2017
New Revision: 326033
URL: https://svnweb.freebsd.org/changeset/base/326033

Log:
  Fix off-by-one error in bit_nclear() usage
  
  bit_nclear() takes the bit numbers for the start and end bits, not the start
  and a count.  This was resulting in memory corruption past the end of the
  bitstr_t.
  
  Sponsored by: Limelight Networks

Modified:
  head/sys/net/iflib.c

Modified: head/sys/net/iflib.c
==
--- head/sys/net/iflib.cMon Nov 20 21:56:25 2017(r326032)
+++ head/sys/net/iflib.cMon Nov 20 21:57:04 2017(r326033)
@@ -2025,7 +2025,7 @@ iflib_fl_setup(iflib_fl_t fl)
if_ctx_t ctx = rxq->ifr_ctx;
if_softc_ctx_t sctx = >ifc_softc_ctx;
 
-   bit_nclear(fl->ifl_rx_bitmap, 0, fl->ifl_size);
+   bit_nclear(fl->ifl_rx_bitmap, 0, fl->ifl_size - 1);
/*
** Free current RX buffer structs and their mbufs
*/
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r326032 - head/sbin/camcontrol

2017-11-20 Thread Alan Somers
Author: asomers
Date: Mon Nov 20 21:56:25 2017
New Revision: 326032
URL: https://svnweb.freebsd.org/changeset/base/326032

Log:
  Print ZAC device type in "camcontrol identify" output
  
  ZAC (Zoned-device ATA Command set) is the standard for addressing SMR
  (shingled magnetic recording) devices over SATA.  Drives indicate their
  support for ZAC in their IDENTIFY block. Print whether and how a drive
  supports ZAC in the output of "camcontrol identify".
  
  Reviewed by:  ken, imp
  MFC after:3 weeks
  Sponsored by: Spectra Logic Corp
  Differential Revision:https://reviews.freebsd.org/D13171

Modified:
  head/sbin/camcontrol/camcontrol.c

Modified: head/sbin/camcontrol/camcontrol.c
==
--- head/sbin/camcontrol/camcontrol.c   Mon Nov 20 21:38:24 2017
(r326031)
+++ head/sbin/camcontrol/camcontrol.c   Mon Nov 20 21:56:25 2017
(r326032)
@@ -1403,6 +1403,18 @@ atacapprint(struct ata_params *parm)
parm->media_rotation_rate);
}
 
+   printf("Zoned-Device Commands ");
+   switch (parm->support3 & ATA_SUPPORT_ZONE_MASK) {
+   case ATA_SUPPORT_ZONE_DEV_MANAGED:
+   printf("device managed\n");
+   break;
+   case ATA_SUPPORT_ZONE_HOST_AWARE:
+   printf("host aware\n");
+   break;
+   default:
+   printf("no\n");
+   }
+
printf("\nFeature  "
"Support  Enabled   Value   Vendor\n");
printf("read ahead %s   %s\n",
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r326031 - head/sys/fs/msdosfs

2017-11-20 Thread Conrad Meyer
Author: cem
Date: Mon Nov 20 21:38:24 2017
New Revision: 326031
URL: https://svnweb.freebsd.org/changeset/base/326031

Log:
  msdosfs(5): Reflect READONLY attribute in file mode
  
  Msdosfs allows setting READONLY by clearing the owner write bit of the file
  mode.  (While here, correct the misspelling of S_IWUSR as VWRITE.  No
  functional change.)
  
  In msdosfs_getattr, intuitively reflect that READONLY attribute to userspace
  in the file mode.
  
  Reported by:  Karl Denninger 
  Sponsored by: Dell EMC Isilon

Modified:
  head/sys/fs/msdosfs/msdosfs_vnops.c

Modified: head/sys/fs/msdosfs/msdosfs_vnops.c
==
--- head/sys/fs/msdosfs/msdosfs_vnops.c Mon Nov 20 20:55:41 2017
(r326030)
+++ head/sys/fs/msdosfs/msdosfs_vnops.c Mon Nov 20 21:38:24 2017
(r326031)
@@ -287,6 +287,8 @@ msdosfs_getattr(struct vop_getattr_args *ap)
vap->va_fileid = fileid;
 
mode = S_IRWXU|S_IRWXG|S_IRWXO;
+   if (dep->de_Attributes & ATTR_READONLY)
+   mode &= ~(S_IWUSR|S_IWGRP|S_IWOTH);
vap->va_mode = mode & 
(ap->a_vp->v_type == VDIR ? pmp->pm_dirmask : pmp->pm_mask);
vap->va_uid = pmp->pm_uid;
@@ -502,7 +504,7 @@ msdosfs_setattr(struct vop_setattr_args *ap)
}
if (vp->v_type != VDIR) {
/* We ignore the read and execute bits. */
-   if (vap->va_mode & VWRITE)
+   if (vap->va_mode & S_IWUSR)
dep->de_Attributes &= ~ATTR_READONLY;
else
dep->de_Attributes |= ATTR_READONLY;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r326030 - in head: lib usr.bin

2017-11-20 Thread Ed Maste
Author: emaste
Date: Mon Nov 20 20:55:41 2017
New Revision: 326030
URL: https://svnweb.freebsd.org/changeset/base/326030

Log:
  Install strings unconditionally
  
  Previously it was enabled by WITH_/WITHOUT_TOOLCHAIN, but it is commonly
  expected to be available and may have non-toolchain consumers.  As it
  is now taken from the BSD-licensed ELF Tool Chain project, just install
  it unconditionally.
  
  PR:   213665, 223725
  Reviewed by:  bdrewery
  MFC after:1 month
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D8398

Modified:
  head/lib/Makefile
  head/usr.bin/Makefile

Modified: head/lib/Makefile
==
--- head/lib/Makefile   Mon Nov 20 20:53:03 2017(r326029)
+++ head/lib/Makefile   Mon Nov 20 20:55:41 2017(r326030)
@@ -44,6 +44,7 @@ SUBDIR=   ${SUBDIR_BOOTSTRAP} \
${_libdl} \
libdwarf \
libedit \
+   libelftc \
libevent \
libexecinfo \
libexpat \
@@ -136,7 +137,7 @@ SUBDIR.${MK_CLANG}+=clang
 
 SUBDIR.${MK_CUSE}+=libcuse
 SUBDIR.${MK_CXX}+= libdevdctl
-SUBDIR.${MK_TOOLCHAIN}+=libelftc libpe
+SUBDIR.${MK_TOOLCHAIN}+=libpe
 SUBDIR.${MK_DIALOG}+=  libdpv
 SUBDIR.${MK_FILE}+=libmagic
 SUBDIR.${MK_GPIO}+=libgpio

Modified: head/usr.bin/Makefile
==
--- head/usr.bin/Makefile   Mon Nov 20 20:53:03 2017(r326029)
+++ head/usr.bin/Makefile   Mon Nov 20 20:55:41 2017(r326030)
@@ -150,6 +150,7 @@ SUBDIR= alias \
split \
stat \
stdbuf \
+   strings \
su \
systat \
tabs \
@@ -277,7 +278,6 @@ SUBDIR.${MK_TOOLCHAIN}+=readelf
 SUBDIR.${MK_TOOLCHAIN}+=   rpcgen
 SUBDIR.${MK_TOOLCHAIN}+=   unifdef
 SUBDIR.${MK_TOOLCHAIN}+=   size
-SUBDIR.${MK_TOOLCHAIN}+=   strings
 SUBDIR.${MK_TOOLCHAIN}+=   xstr
 SUBDIR.${MK_TOOLCHAIN}+=   yacc
 SUBDIR.${MK_VI}+=  vi
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r326029 - head/sys/kern

2017-11-20 Thread Scott Long
Author: scottl
Date: Mon Nov 20 20:53:03 2017
New Revision: 326029
URL: https://svnweb.freebsd.org/changeset/base/326029

Log:
  Update a comment in brelse() to match reality.

Modified:
  head/sys/kern/vfs_bio.c

Modified: head/sys/kern/vfs_bio.c
==
--- head/sys/kern/vfs_bio.c Mon Nov 20 20:05:30 2017(r326028)
+++ head/sys/kern/vfs_bio.c Mon Nov 20 20:53:03 2017(r326029)
@@ -2340,9 +2340,18 @@ brelse(struct buf *bp)
!(bp->b_flags & B_INVAL)) {
/*
 * Failed write, redirty.  All errors except ENXIO (which
-* means the device is gone) are expected to be potentially
-* transient - underlying media might work if tried again
-* after EIO, and memory might be available after an ENOMEM.
+* means the device is gone) are treated as being
+* transient.
+*
+* XXX Treating EIO as transient is not correct; the
+* contract with the local storage device drivers is that
+* they will only return EIO once the I/O is no longer
+* retriable.  Network I/O also respects this through the
+* guarantees of TCP and/or the internal retries of NFS.
+* ENOMEM might be transient, but we also have no way of
+* knowing when its ok to retry/reschedule.  In general,
+* this entire case should be made obsolete through better
+* error handling/recovery and resource scheduling.
 *
 * Do this also for buffers that failed with ENXIO, but have
 * non-empty dependencies - the soft updates code might need
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r326028 - head/lib/libc/iconv

2017-11-20 Thread Pedro F. Giffuni
Author: pfg
Date: Mon Nov 20 20:05:30 2017
New Revision: 326028
URL: https://svnweb.freebsd.org/changeset/base/326028

Log:
  iconv: Fix a pointer mismatch.
  
  Catch NULL pointer earlier, check for empty string later.
  Apparently this fixes a GCC8 warning.
  
  Obtained from:NetBSD (CVS Rev. 1.21, 1.22) through DragonFlyBSD
  MFC after:1 week

Modified:
  head/lib/libc/iconv/citrus_none.c

Modified: head/lib/libc/iconv/citrus_none.c
==
--- head/lib/libc/iconv/citrus_none.c   Mon Nov 20 19:56:11 2017
(r326027)
+++ head/lib/libc/iconv/citrus_none.c   Mon Nov 20 20:05:30 2017
(r326028)
@@ -164,7 +164,7 @@ _citrus_NONE_stdenc_mbtowc(struct _citrus_stdenc * __r
 struct iconv_hooks *hooks)
 {
 
-   if (s == NULL) {
+   if (*s == NULL) {
*nresult = 0;
return (0);
}
@@ -176,7 +176,7 @@ _citrus_NONE_stdenc_mbtowc(struct _citrus_stdenc * __r
if (pwc != NULL)
*pwc = (_wc_t)(unsigned char) **s;
 
-   *nresult = *s == '\0' ? 0 : 1;
+   *nresult = **s == '\0' ? 0 : 1;
 
if ((hooks != NULL) && (hooks->wc_hook != NULL))
hooks->wc_hook(*pwc, hooks->data);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r326027 - in head: include/arpa sys/arm/xscale/ixp425 sys/conf

2017-11-20 Thread Pedro F. Giffuni
Author: pfg
Date: Mon Nov 20 19:56:11 2017
New Revision: 326027
URL: https://svnweb.freebsd.org/changeset/base/326027

Log:
  Indent protection and some other oops from the prvious commits.

Modified:
  head/include/arpa/tftp.h
  head/sys/arm/xscale/ixp425/if_npereg.h
  head/sys/conf/newvers.sh

Modified: head/include/arpa/tftp.h
==
--- head/include/arpa/tftp.hMon Nov 20 19:50:48 2017(r326026)
+++ head/include/arpa/tftp.hMon Nov 20 19:56:11 2017(r326027)
@@ -1,4 +1,4 @@
-/**-
+/*-
  * SPDX-License-Identifier: BSD-3-Clause
  *
  * Copyright (c) 1983, 1993

Modified: head/sys/arm/xscale/ixp425/if_npereg.h
==
--- head/sys/arm/xscale/ixp425/if_npereg.h  Mon Nov 20 19:50:48 2017
(r326026)
+++ head/sys/arm/xscale/ixp425/if_npereg.h  Mon Nov 20 19:56:11 2017
(r326027)
@@ -29,7 +29,7 @@
  * $FreeBSD$
  */
 
-/*
+/*-
  * SPDX-License-Identifier: BSD-3-Clause
  *
  * Copyright (c) 2001-2005, Intel Corporation.

Modified: head/sys/conf/newvers.sh
==
--- head/sys/conf/newvers.shMon Nov 20 19:50:48 2017(r326026)
+++ head/sys/conf/newvers.shMon Nov 20 19:56:11 2017(r326027)
@@ -1,6 +1,6 @@
 #!/bin/sh -
-# SPDX-License-Identifier: BSD-3-Clause
 #
+# SPDX-License-Identifier: BSD-3-Clause
 #
 # Copyright (c) 1984, 1986, 1990, 1993
 #  The Regents of the University of California.  All rights reserved.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2017-11-20 Thread Navdeep Parhar
Author: np
Date: Mon Nov 20 19:50:48 2017
New Revision: 326026
URL: https://svnweb.freebsd.org/changeset/base/326026

Log:
  cxgbe(4): Add a custom board to the device id list.
  
  MFC after:1 week
  Sponsored by: Chelsio Communications

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

Modified: head/sys/dev/cxgbe/t4_main.c
==
--- head/sys/dev/cxgbe/t4_main.cMon Nov 20 19:49:47 2017
(r326025)
+++ head/sys/dev/cxgbe/t4_main.cMon Nov 20 19:50:48 2017
(r326026)
@@ -677,6 +677,7 @@ struct {
/* Custom */
{0x6480, "Chelsio T6225 80"},
{0x6481, "Chelsio T62100 81"},
+   {0x6484, "Chelsio T62100 84"},
 };
 
 #ifdef TCP_OFFLOAD
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r326025 - in head: bin/cat bin/chflags bin/chmod bin/cp bin/date bin/dd bin/df bin/domainname bin/echo bin/ed bin/hostname bin/kill bin/ln bin/ls bin/mkdir bin/mv bin/pax bin/ps bin/pwd...

2017-11-20 Thread Pedro F. Giffuni
Author: pfg
Date: Mon Nov 20 19:49:47 2017
New Revision: 326025
URL: https://svnweb.freebsd.org/changeset/base/326025

Log:
  General further adoption of SPDX licensing ID tags.
  
  Mainly focus on files that use BSD 3-Clause license.
  
  The Software Package Data Exchange (SPDX) group provides a specification
  to make it easier for automated tools to detect and summarize well known
  opensource licenses. We are gradually adopting the specification, noting
  that the tags are considered only advisory and do not, in any way,
  superceed or replace the license texts.
  
  Special thanks to Wind River for providing access to "The Duke of
  Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
  starting point.

Modified:
  head/bin/cat/cat.c
  head/bin/chflags/chflags.c
  head/bin/chmod/chmod.c
  head/bin/cp/cp.c
  head/bin/cp/extern.h
  head/bin/cp/utils.c
  head/bin/date/date.c
  head/bin/date/extern.h
  head/bin/date/netdate.c
  head/bin/dd/args.c
  head/bin/dd/conv.c
  head/bin/dd/conv_tab.c
  head/bin/dd/dd.c
  head/bin/dd/dd.h
  head/bin/dd/extern.h
  head/bin/dd/misc.c
  head/bin/dd/position.c
  head/bin/df/df.c
  head/bin/domainname/domainname.c
  head/bin/echo/echo.c
  head/bin/ed/cbc.c
  head/bin/hostname/hostname.c
  head/bin/kill/kill.c
  head/bin/ln/ln.c
  head/bin/ls/cmp.c
  head/bin/ls/extern.h
  head/bin/ls/ls.c
  head/bin/ls/ls.h
  head/bin/ls/print.c
  head/bin/ls/util.c
  head/bin/mkdir/mkdir.c
  head/bin/mv/mv.c
  head/bin/pax/ar_io.c
  head/bin/pax/ar_subs.c
  head/bin/pax/buf_subs.c
  head/bin/pax/cache.c
  head/bin/pax/cache.h
  head/bin/pax/cpio.c
  head/bin/pax/cpio.h
  head/bin/pax/extern.h
  head/bin/pax/file_subs.c
  head/bin/pax/ftree.c
  head/bin/pax/ftree.h
  head/bin/pax/gen_subs.c
  head/bin/pax/options.c
  head/bin/pax/options.h
  head/bin/pax/pat_rep.c
  head/bin/pax/pat_rep.h
  head/bin/pax/pax.c
  head/bin/pax/pax.h
  head/bin/pax/sel_subs.c
  head/bin/pax/sel_subs.h
  head/bin/pax/tables.c
  head/bin/pax/tables.h
  head/bin/pax/tar.c
  head/bin/pax/tar.h
  head/bin/pax/tty_subs.c
  head/bin/ps/extern.h
  head/bin/ps/fmt.c
  head/bin/ps/keyword.c
  head/bin/ps/nlist.c
  head/bin/ps/print.c
  head/bin/ps/ps.c
  head/bin/ps/ps.h
  head/bin/pwd/pwd.c
  head/bin/realpath/realpath.c
  head/bin/rm/rm.c
  head/bin/rmdir/rmdir.c
  head/bin/sh/bltin/bltin.h
  head/bin/sh/bltin/echo.c
  head/bin/sh/mail.h
  head/bin/sh/main.c
  head/bin/sh/main.h
  head/bin/sh/memalloc.c
  head/bin/sh/memalloc.h
  head/bin/sh/miscbltin.c
  head/bin/sh/mknodes.c
  head/bin/sh/mksyntax.c
  head/bin/sh/myhistedit.h
  head/bin/sh/mystring.c
  head/bin/sh/mystring.h
  head/bin/sh/options.c
  head/bin/sh/options.h
  head/bin/sh/output.c
  head/bin/sh/output.h
  head/bin/sh/parser.c
  head/bin/sh/parser.h
  head/bin/sh/redir.c
  head/bin/sh/redir.h
  head/bin/sh/shell.h
  head/bin/sh/show.c
  head/bin/sh/show.h
  head/bin/sh/trap.c
  head/bin/sh/trap.h
  head/bin/sh/var.c
  head/bin/sh/var.h
  head/lib/libc/amd64/SYS.h
  head/lib/libc/arm/SYS.h
  head/lib/libc/compat-43/creat.c
  head/lib/libc/compat-43/gethostid.c
  head/lib/libc/compat-43/getwd.c
  head/lib/libc/compat-43/killpg.c
  head/lib/libc/compat-43/sethostid.c
  head/lib/libc/compat-43/setpgrp.c
  head/lib/libc/compat-43/setrgid.c
  head/lib/libc/compat-43/setruid.c
  head/lib/libc/compat-43/sigcompat.c
  head/lib/libc/db/btree/bt_close.c
  head/lib/libc/db/btree/bt_conv.c
  head/lib/libc/db/btree/bt_debug.c
  head/lib/libc/db/btree/bt_delete.c
  head/lib/libc/db/btree/bt_get.c
  head/lib/libc/db/btree/bt_open.c
  head/lib/libc/db/btree/bt_overflow.c
  head/lib/libc/db/btree/bt_page.c
  head/lib/libc/db/btree/bt_put.c
  head/lib/libc/db/btree/bt_search.c
  head/lib/libc/db/btree/bt_seq.c
  head/lib/libc/db/btree/bt_split.c
  head/lib/libc/db/btree/bt_utils.c
  head/lib/libc/db/btree/btree.h
  head/lib/libc/db/btree/extern.h
  head/lib/libc/db/db/db.c
  head/lib/libc/db/hash/extern.h
  head/lib/libc/db/hash/hash.c
  head/lib/libc/db/hash/hash.h
  head/lib/libc/db/hash/hash_bigkey.c
  head/lib/libc/db/hash/hash_buf.c
  head/lib/libc/db/hash/hash_func.c
  head/lib/libc/db/hash/hash_log2.c
  head/lib/libc/db/hash/hash_page.c
  head/lib/libc/db/hash/ndbm.c
  head/lib/libc/db/hash/page.h
  head/lib/libc/db/mpool/mpool.c
  head/lib/libc/db/recno/extern.h
  head/lib/libc/db/recno/rec_close.c
  head/lib/libc/db/recno/rec_delete.c
  head/lib/libc/db/recno/rec_get.c
  head/lib/libc/db/recno/rec_open.c
  head/lib/libc/db/recno/rec_put.c
  head/lib/libc/db/recno/rec_search.c
  head/lib/libc/db/recno/rec_seq.c
  head/lib/libc/db/recno/rec_utils.c
  head/lib/libc/db/recno/recno.h
  head/lib/libc/db/test/btree.tests/main.c
  head/lib/libc/db/test/dbtest.c
  head/lib/libc/db/test/hash.tests/driver2.c
  head/lib/libc/db/test/hash.tests/tcreat3.c
  head/lib/libc/db/test/hash.tests/tdel.c
  head/lib/libc/db/test/hash.tests/thash4.c
  head/lib/libc/db/test/hash.tests/tread2.c
  head/lib/libc/db/test/hash.tests/tseq.c
  

svn commit: r326024 - in head/include: . arpa protocols rpc rpcsvc

2017-11-20 Thread Pedro F. Giffuni
Author: pfg
Date: Mon Nov 20 19:45:28 2017
New Revision: 326024
URL: https://svnweb.freebsd.org/changeset/base/326024

Log:
  include: further adoption of SPDX licensing ID tags.
  
  Mainly focus on files that use BSD 3-Clause license.
  
  The Software Package Data Exchange (SPDX) group provides a specification
  to make it easier for automated tools to detect and summarize well known
  opensource licenses. We are gradually adopting the specification, noting
  that the tags are considered only advisory and do not, in any way,
  superceed or replace the license texts.
  
  Special thanks to Wind River for providing access to "The Duke of
  Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
  starting point.

Modified:
  head/include/_ctype.h
  head/include/a.out.h
  head/include/ar.h
  head/include/arpa/ftp.h
  head/include/arpa/inet.h
  head/include/arpa/nameser.h
  head/include/arpa/nameser_compat.h
  head/include/arpa/telnet.h
  head/include/arpa/tftp.h
  head/include/assert.h
  head/include/ctype.h
  head/include/db.h
  head/include/dirent.h
  head/include/dlfcn.h
  head/include/err.h
  head/include/fnmatch.h
  head/include/fstab.h
  head/include/fts.h
  head/include/glob.h
  head/include/grp.h
  head/include/limits.h
  head/include/locale.h
  head/include/memory.h
  head/include/mpool.h
  head/include/ndbm.h
  head/include/netdb.h
  head/include/nlist.h
  head/include/paths.h
  head/include/protocols/dumprestore.h
  head/include/protocols/routed.h
  head/include/protocols/rwhod.h
  head/include/protocols/talkd.h
  head/include/protocols/timed.h
  head/include/pthread_np.h
  head/include/pwd.h
  head/include/ranlib.h
  head/include/regex.h
  head/include/resolv.h
  head/include/rpc/auth.h
  head/include/rpc/auth_des.h
  head/include/rpc/auth_kerb.h
  head/include/rpc/auth_unix.h
  head/include/rpc/clnt.h
  head/include/rpc/clnt_soc.h
  head/include/rpc/des.h
  head/include/rpc/des_crypt.h
  head/include/rpc/nettype.h
  head/include/rpc/pmap_clnt.h
  head/include/rpc/pmap_prot.h
  head/include/rpc/pmap_rmt.h
  head/include/rpc/raw.h
  head/include/rpc/rpc.h
  head/include/rpc/rpc_com.h
  head/include/rpc/rpc_msg.h
  head/include/rpc/rpcb_clnt.h
  head/include/rpc/rpcent.h
  head/include/rpc/svc.h
  head/include/rpc/svc_auth.h
  head/include/rpc/svc_dg.h
  head/include/rpc/svc_soc.h
  head/include/rpc/xdr.h
  head/include/rpcsvc/nis_tags.h
  head/include/runetype.h
  head/include/setjmp.h
  head/include/signal.h
  head/include/stab.h
  head/include/stddef.h
  head/include/stdio.h
  head/include/stdlib.h
  head/include/string.h
  head/include/sysexits.h
  head/include/tar.h
  head/include/termios.h
  head/include/time.h
  head/include/timeconv.h
  head/include/ttyent.h
  head/include/unistd.h
  head/include/utime.h

Modified: head/include/_ctype.h
==
--- head/include/_ctype.h   Mon Nov 20 19:43:44 2017(r326023)
+++ head/include/_ctype.h   Mon Nov 20 19:45:28 2017(r326024)
@@ -1,4 +1,6 @@
-/*
+/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
  * Copyright (c) 1989, 1993
  * The Regents of the University of California.  All rights reserved.
  * (c) UNIX System Laboratories, Inc.

Modified: head/include/a.out.h
==
--- head/include/a.out.hMon Nov 20 19:43:44 2017(r326023)
+++ head/include/a.out.hMon Nov 20 19:45:28 2017(r326024)
@@ -1,4 +1,6 @@
 /*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
  * Copyright (c) 1991, 1993
  * The Regents of the University of California.  All rights reserved.
  *

Modified: head/include/ar.h
==
--- head/include/ar.h   Mon Nov 20 19:43:44 2017(r326023)
+++ head/include/ar.h   Mon Nov 20 19:45:28 2017(r326024)
@@ -1,4 +1,6 @@
 /*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
  * Copyright (c) 1991, 1993
  * The Regents of the University of California.  All rights reserved.
  * (c) UNIX System Laboratories, Inc.

Modified: head/include/arpa/ftp.h
==
--- head/include/arpa/ftp.h Mon Nov 20 19:43:44 2017(r326023)
+++ head/include/arpa/ftp.h Mon Nov 20 19:45:28 2017(r326024)
@@ -1,4 +1,6 @@
-/*
+/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
  * Copyright (c) 1983, 1989, 1993
  * The Regents of the University of California.  All rights reserved.
  *

Modified: head/include/arpa/inet.h
==
--- head/include/arpa/inet.hMon Nov 20 19:43:44 2017(r326023)
+++ head/include/arpa/inet.hMon Nov 20 19:45:28 2017(r326024)
@@ -1,4 +1,6 @@
-/*
+/*-
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
  * ++Copyright++ 1983, 1993
  * -
  * Copyright (c) 1983, 1993


svn commit: r326023 - in head/sys: amd64/amd64 amd64/ia32 amd64/include amd64/vmm arm/arm arm/freescale/imx arm/include arm/mv arm/mv/discovery arm/mv/kirkwood arm/mv/orion arm/ti arm/versatile arm...

2017-11-20 Thread Pedro F. Giffuni
Author: pfg
Date: Mon Nov 20 19:43:44 2017
New Revision: 326023
URL: https://svnweb.freebsd.org/changeset/base/326023

Log:
  sys: further adoption of SPDX licensing ID tags.
  
  Mainly focus on files that use BSD 3-Clause license.
  
  The Software Package Data Exchange (SPDX) group provides a specification
  to make it easier for automated tools to detect and summarize well known
  opensource licenses. We are gradually adopting the specification, noting
  that the tags are considered only advisory and do not, in any way,
  superceed or replace the license texts.
  
  Special thanks to Wind River for providing access to "The Duke of
  Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
  starting point.

Modified:
  head/sys/amd64/amd64/bpf_jit_machdep.c
  head/sys/amd64/amd64/bpf_jit_machdep.h
  head/sys/amd64/amd64/fpu.c
  head/sys/amd64/amd64/genassym.c
  head/sys/amd64/amd64/mem.c
  head/sys/amd64/amd64/sys_machdep.c
  head/sys/amd64/amd64/uio_machdep.c
  head/sys/amd64/ia32/ia32_signal.c
  head/sys/amd64/include/asm.h
  head/sys/amd64/include/asmacros.h
  head/sys/amd64/include/cpu.h
  head/sys/amd64/include/cpufunc.h
  head/sys/amd64/include/exec.h
  head/sys/amd64/include/fpu.h
  head/sys/amd64/include/in_cksum.h
  head/sys/amd64/include/limits.h
  head/sys/amd64/include/md_var.h
  head/sys/amd64/include/pcb.h
  head/sys/amd64/include/pmap.h
  head/sys/amd64/include/proc.h
  head/sys/amd64/include/profile.h
  head/sys/amd64/include/reloc.h
  head/sys/amd64/include/segments.h
  head/sys/amd64/include/tss.h
  head/sys/amd64/vmm/vmm_stat.h
  head/sys/arm/arm/mem.c
  head/sys/arm/arm/sys_machdep.c
  head/sys/arm/arm/uio_machdep.c
  head/sys/arm/freescale/imx/imx_common.c
  head/sys/arm/include/_limits.h
  head/sys/arm/include/asm.h
  head/sys/arm/include/endian.h
  head/sys/arm/include/exec.h
  head/sys/arm/include/float.h
  head/sys/arm/include/ieee.h
  head/sys/arm/include/in_cksum.h
  head/sys/arm/include/limits.h
  head/sys/arm/include/md_var.h
  head/sys/arm/include/pmap.h
  head/sys/arm/include/signal.h
  head/sys/arm/include/stdarg.h
  head/sys/arm/include/vmparam.h
  head/sys/arm/mv/discovery/discovery.c
  head/sys/arm/mv/kirkwood/kirkwood.c
  head/sys/arm/mv/mv_common.c
  head/sys/arm/mv/mv_pci.c
  head/sys/arm/mv/mvreg.h
  head/sys/arm/mv/mvwin.h
  head/sys/arm/mv/orion/db88f5xxx.c
  head/sys/arm/mv/orion/orion.c
  head/sys/arm/mv/rtc.c
  head/sys/arm/ti/ti_edma3.c
  head/sys/arm/versatile/versatile_common.c
  head/sys/arm/xscale/ixp425/if_npereg.h
  head/sys/arm/xscale/ixp425/ixp425_npe.c
  head/sys/arm/xscale/ixp425/ixp425_npereg.h
  head/sys/arm/xscale/ixp425/ixp425_qmgr.c
  head/sys/arm/xscale/ixp425/ixp425_qmgr.h
  head/sys/bsm/audit.h
  head/sys/bsm/audit_domain.h
  head/sys/bsm/audit_errno.h
  head/sys/bsm/audit_fcntl.h
  head/sys/bsm/audit_internal.h
  head/sys/bsm/audit_kevents.h
  head/sys/bsm/audit_record.h
  head/sys/bsm/audit_socket_type.h
  head/sys/compat/freebsd32/freebsd32_ioctl.c
  head/sys/compat/freebsd32/freebsd32_ioctl.h
  head/sys/conf/newvers.sh
  head/sys/conf/systags.sh
  head/sys/crypto/sha1.c
  head/sys/crypto/sha1.h
  head/sys/ddb/db_ps.c
  head/sys/ddb/ddb.h
  head/sys/fs/cd9660/cd9660_bmap.c
  head/sys/fs/cd9660/cd9660_lookup.c
  head/sys/fs/cd9660/cd9660_mount.h
  head/sys/fs/cd9660/cd9660_node.c
  head/sys/fs/cd9660/cd9660_node.h
  head/sys/fs/cd9660/cd9660_rrip.c
  head/sys/fs/cd9660/cd9660_rrip.h
  head/sys/fs/cd9660/cd9660_util.c
  head/sys/fs/cd9660/cd9660_vfsops.c
  head/sys/fs/cd9660/cd9660_vnops.c
  head/sys/fs/cd9660/iso.h
  head/sys/fs/cd9660/iso_rrip.h
  head/sys/fs/deadfs/dead_vnops.c
  head/sys/fs/ext2fs/ext2_alloc.c
  head/sys/fs/ext2fs/ext2_balloc.c
  head/sys/fs/ext2fs/ext2_bmap.c
  head/sys/fs/ext2fs/ext2_extern.h
  head/sys/fs/ext2fs/ext2_inode.c
  head/sys/fs/ext2fs/ext2_lookup.c
  head/sys/fs/ext2fs/ext2_mount.h
  head/sys/fs/ext2fs/ext2_subr.c
  head/sys/fs/ext2fs/ext2_vfsops.c
  head/sys/fs/ext2fs/ext2_vnops.c
  head/sys/fs/ext2fs/fs.h
  head/sys/fs/ext2fs/inode.h
  head/sys/fs/fdescfs/fdesc.h
  head/sys/fs/fdescfs/fdesc_vfsops.c
  head/sys/fs/fdescfs/fdesc_vnops.c
  head/sys/fs/fifofs/fifo_vnops.c
  head/sys/fs/fuse/fuse.h
  head/sys/fs/fuse/fuse_debug.h
  head/sys/fs/fuse/fuse_device.c
  head/sys/fs/fuse/fuse_file.c
  head/sys/fs/fuse/fuse_file.h
  head/sys/fs/fuse/fuse_internal.c
  head/sys/fs/fuse/fuse_internal.h
  head/sys/fs/fuse/fuse_io.c
  head/sys/fs/fuse/fuse_io.h
  head/sys/fs/fuse/fuse_ipc.c
  head/sys/fs/fuse/fuse_ipc.h
  head/sys/fs/fuse/fuse_kernel.h
  head/sys/fs/fuse/fuse_main.c
  head/sys/fs/fuse/fuse_node.c
  head/sys/fs/fuse/fuse_node.h
  head/sys/fs/fuse/fuse_param.h
  head/sys/fs/fuse/fuse_vfsops.c
  head/sys/fs/fuse/fuse_vnops.c
  head/sys/fs/nfs/nfs.h
  head/sys/fs/nfs/nfs_commonkrpc.c
  head/sys/fs/nfs/nfs_commonport.c
  head/sys/fs/nfs/nfs_commonsubs.c
  head/sys/fs/nfs/nfs_var.h
  head/sys/fs/nfs/nfsm_subs.h
  head/sys/fs/nfs/nfsport.h
  head/sys/fs/nfs/nfsproto.h
  

svn commit: r326022 - in head/sys/dev: bce bwi bxe cfi cy dpms e1000 et fb fdc fxp ic ixgb ixgbe md mge mii mps mpt mpt/mpilib nmdm oce ofw sio tws usb usb/controller usb/misc usb/net virtio virtio...

2017-11-20 Thread Pedro F. Giffuni
Author: pfg
Date: Mon Nov 20 19:36:21 2017
New Revision: 326022
URL: https://svnweb.freebsd.org/changeset/base/326022

Log:
  sys/dev: further adoption of SPDX licensing ID tags.
  
  Mainly focus on files that use BSD 3-Clause license.
  
  The Software Package Data Exchange (SPDX) group provides a specification
  to make it easier for automated tools to detect and summarize well known
  opensource licenses. We are gradually adopting the specification, noting
  that the tags are considered only advisory and do not, in any way,
  superceed or replace the license texts.
  
  Special thanks to Wind River for providing access to "The Duke of
  Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
  starting point.

Modified:
  head/sys/dev/bce/if_bce.c
  head/sys/dev/bce/if_bcefw.h
  head/sys/dev/bce/if_bcereg.h
  head/sys/dev/bwi/bwimac.c
  head/sys/dev/bwi/bwimac.h
  head/sys/dev/bwi/bwiphy.c
  head/sys/dev/bwi/bwiphy.h
  head/sys/dev/bwi/bwirf.c
  head/sys/dev/bwi/bwirf.h
  head/sys/dev/bwi/if_bwi.c
  head/sys/dev/bwi/if_bwireg.h
  head/sys/dev/bwi/if_bwivar.h
  head/sys/dev/bxe/57710_init_values.c
  head/sys/dev/bxe/57710_int_offsets.h
  head/sys/dev/bxe/57711_init_values.c
  head/sys/dev/bxe/57711_int_offsets.h
  head/sys/dev/bxe/57712_init_values.c
  head/sys/dev/bxe/57712_int_offsets.h
  head/sys/dev/bxe/bxe.c
  head/sys/dev/bxe/bxe.h
  head/sys/dev/bxe/bxe_dcb.h
  head/sys/dev/bxe/bxe_debug.c
  head/sys/dev/bxe/bxe_elink.c
  head/sys/dev/bxe/bxe_elink.h
  head/sys/dev/bxe/bxe_stats.c
  head/sys/dev/bxe/bxe_stats.h
  head/sys/dev/bxe/ecore_fw_defs.h
  head/sys/dev/bxe/ecore_hsi.h
  head/sys/dev/bxe/ecore_init.h
  head/sys/dev/bxe/ecore_init_ops.h
  head/sys/dev/bxe/ecore_mfw_req.h
  head/sys/dev/bxe/ecore_reg.h
  head/sys/dev/bxe/ecore_sp.c
  head/sys/dev/bxe/ecore_sp.h
  head/sys/dev/cfi/cfi_bus_fdt.c
  head/sys/dev/cfi/cfi_core.c
  head/sys/dev/cfi/cfi_dev.c
  head/sys/dev/cfi/cfi_reg.h
  head/sys/dev/cfi/cfi_var.h
  head/sys/dev/cy/cyreg.h
  head/sys/dev/dpms/dpms.c
  head/sys/dev/e1000/e1000_80003es2lan.c
  head/sys/dev/e1000/e1000_80003es2lan.h
  head/sys/dev/e1000/e1000_82540.c
  head/sys/dev/e1000/e1000_82541.c
  head/sys/dev/e1000/e1000_82541.h
  head/sys/dev/e1000/e1000_82542.c
  head/sys/dev/e1000/e1000_82543.c
  head/sys/dev/e1000/e1000_82543.h
  head/sys/dev/e1000/e1000_82571.c
  head/sys/dev/e1000/e1000_82571.h
  head/sys/dev/e1000/e1000_82575.c
  head/sys/dev/e1000/e1000_82575.h
  head/sys/dev/e1000/e1000_api.c
  head/sys/dev/e1000/e1000_api.h
  head/sys/dev/e1000/e1000_defines.h
  head/sys/dev/e1000/e1000_hw.h
  head/sys/dev/e1000/e1000_i210.c
  head/sys/dev/e1000/e1000_i210.h
  head/sys/dev/e1000/e1000_ich8lan.c
  head/sys/dev/e1000/e1000_ich8lan.h
  head/sys/dev/e1000/e1000_mac.c
  head/sys/dev/e1000/e1000_mac.h
  head/sys/dev/e1000/e1000_manage.c
  head/sys/dev/e1000/e1000_manage.h
  head/sys/dev/e1000/e1000_mbx.c
  head/sys/dev/e1000/e1000_mbx.h
  head/sys/dev/e1000/e1000_nvm.c
  head/sys/dev/e1000/e1000_nvm.h
  head/sys/dev/e1000/e1000_osdep.c
  head/sys/dev/e1000/e1000_osdep.h
  head/sys/dev/e1000/e1000_phy.c
  head/sys/dev/e1000/e1000_phy.h
  head/sys/dev/e1000/e1000_regs.h
  head/sys/dev/e1000/e1000_vf.c
  head/sys/dev/e1000/e1000_vf.h
  head/sys/dev/e1000/if_em.c
  head/sys/dev/e1000/if_em.h
  head/sys/dev/et/if_et.c
  head/sys/dev/et/if_etreg.h
  head/sys/dev/et/if_etvar.h
  head/sys/dev/fb/gallant12x22.c
  head/sys/dev/fdc/fdc.c
  head/sys/dev/fxp/inphy.c
  head/sys/dev/fxp/inphyreg.h
  head/sys/dev/fxp/rcvbundl.h
  head/sys/dev/ic/esp.h
  head/sys/dev/ic/i8253reg.h
  head/sys/dev/ic/nec765.h
  head/sys/dev/ic/ns16550.h
  head/sys/dev/ixgb/if_ixgb.c
  head/sys/dev/ixgb/if_ixgb.h
  head/sys/dev/ixgb/if_ixgb_osdep.h
  head/sys/dev/ixgb/ixgb_ee.c
  head/sys/dev/ixgb/ixgb_ee.h
  head/sys/dev/ixgb/ixgb_hw.c
  head/sys/dev/ixgb/ixgb_hw.h
  head/sys/dev/ixgb/ixgb_ids.h
  head/sys/dev/ixgbe/ixgbe.h
  head/sys/dev/ixgbe/ixgbe_82598.c
  head/sys/dev/ixgbe/ixgbe_82598.h
  head/sys/dev/ixgbe/ixgbe_82599.c
  head/sys/dev/ixgbe/ixgbe_82599.h
  head/sys/dev/ixgbe/ixgbe_api.c
  head/sys/dev/ixgbe/ixgbe_api.h
  head/sys/dev/ixgbe/ixgbe_common.c
  head/sys/dev/ixgbe/ixgbe_common.h
  head/sys/dev/ixgbe/ixgbe_dcb.c
  head/sys/dev/ixgbe/ixgbe_dcb.h
  head/sys/dev/ixgbe/ixgbe_dcb_82598.c
  head/sys/dev/ixgbe/ixgbe_dcb_82598.h
  head/sys/dev/ixgbe/ixgbe_dcb_82599.c
  head/sys/dev/ixgbe/ixgbe_dcb_82599.h
  head/sys/dev/ixgbe/ixgbe_mbx.c
  head/sys/dev/ixgbe/ixgbe_mbx.h
  head/sys/dev/ixgbe/ixgbe_osdep.h
  head/sys/dev/ixgbe/ixgbe_phy.c
  head/sys/dev/ixgbe/ixgbe_phy.h
  head/sys/dev/ixgbe/ixgbe_type.h
  head/sys/dev/ixgbe/ixgbe_vf.c
  head/sys/dev/ixgbe/ixgbe_vf.h
  head/sys/dev/ixgbe/ixgbe_x540.c
  head/sys/dev/ixgbe/ixgbe_x540.h
  head/sys/dev/md/md.c
  head/sys/dev/mge/if_mge.c
  head/sys/dev/mge/if_mgevar.h
  head/sys/dev/mii/e1000phyreg.h
  head/sys/dev/mii/truephy.c
  head/sys/dev/mii/truephyreg.h
  head/sys/dev/mps/mps_ioctl.h
  head/sys/dev/mps/mps_user.c
  

svn commit: r326021 - head/sys/dev/evdev

2017-11-20 Thread Vladimir Kondratyev
Author: wulf
Date: Mon Nov 20 19:25:22 2017
New Revision: 326021
URL: https://svnweb.freebsd.org/changeset/base/326021

Log:
  evdev: change USB scancode 0x54 from KEY_SLASH to KEY_KPSLASH
  
  Submitted by: dumbbell
  Reviewed by:  gonzo, wulf
  Approved by:  gonzo (mentor)
  MFC after:2 weeks
  Differential Revision:https://reviews.freebsd.org/D12983

Modified:
  head/sys/dev/evdev/evdev_utils.c

Modified: head/sys/dev/evdev/evdev_utils.c
==
--- head/sys/dev/evdev/evdev_utils.cMon Nov 20 19:20:05 2017
(r326020)
+++ head/sys/dev/evdev/evdev_utils.cMon Nov 20 19:25:22 2017
(r326021)
@@ -64,7 +64,7 @@ static uint16_t evdev_usb_scancodes[256] = {
KEY_PAUSE,  KEY_INSERT, KEY_HOME,   KEY_PAGEUP,
KEY_DELETE, KEY_END,KEY_PAGEDOWN,   KEY_RIGHT,
KEY_LEFT,   KEY_DOWN,   KEY_UP, KEY_NUMLOCK,
-   KEY_SLASH,  KEY_KPASTERISK, KEY_KPMINUS,KEY_KPPLUS,
+   KEY_KPSLASH,KEY_KPASTERISK, KEY_KPMINUS,KEY_KPPLUS,
KEY_KPENTER,KEY_KP1,KEY_KP2,KEY_KP3,
KEY_KP4,KEY_KP5,KEY_KP6,KEY_KP7,
/* 0x60 - 0x7f */
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r326020 - head/sys/dev/evdev

2017-11-20 Thread Vladimir Kondratyev
Author: wulf
Date: Mon Nov 20 19:20:05 2017
New Revision: 326020
URL: https://svnweb.freebsd.org/changeset/base/326020

Log:
  Fix evdev codes for slash and asterisk numpad keys of AT-keyboards
  
  Reviewed by:  gonzo
  Approved by:  gonzo (mentor)
  MFC after:2 weeks

Modified:
  head/sys/dev/evdev/evdev_utils.c

Modified: head/sys/dev/evdev/evdev_utils.c
==
--- head/sys/dev/evdev/evdev_utils.cMon Nov 20 19:17:43 2017
(r326019)
+++ head/sys/dev/evdev/evdev_utils.cMon Nov 20 19:20:05 2017
(r326020)
@@ -131,7 +131,7 @@ static uint16_t evdev_at_set1_scancodes[] = {
KEY_APOSTROPHE, KEY_GRAVE,  KEY_LEFTSHIFT,  KEY_BACKSLASH,
KEY_Z,  KEY_X,  KEY_C,  KEY_V,
KEY_B,  KEY_N,  KEY_M,  KEY_COMMA,
-   KEY_DOT,KEY_SLASH,  KEY_RIGHTSHIFT, NONE,
+   KEY_DOT,KEY_SLASH,  KEY_RIGHTSHIFT, KEY_KPASTERISK,
KEY_LEFTALT,KEY_SPACE,  KEY_CAPSLOCK,   KEY_F1,
KEY_F2, KEY_F3, KEY_F4, KEY_F5,
/* 0x40 - 0x5f */
@@ -167,7 +167,7 @@ static uint16_t evdev_at_set1_scancodes[] = {
NONE,   NONE,   NONE,   NONE,
NONE,   NONE,   KEY_VOLUMEDOWN, NONE,
KEY_VOLUMEUP,   NONE,   KEY_HOMEPAGE,   NONE,
-   NONE,   KEY_KPASTERISK, NONE,   KEY_SYSRQ,
+   NONE,   KEY_KPSLASH,NONE,   KEY_SYSRQ,
KEY_RIGHTALT,   NONE,   NONE,   NONE,
NONE,   NONE,   NONE,   NONE,
/* 0x40 - 0x5f. 0xE0 prefixed */
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r326019 - head/sys/dev/evdev

2017-11-20 Thread Vladimir Kondratyev
Author: wulf
Date: Mon Nov 20 19:17:43 2017
New Revision: 326019
URL: https://svnweb.freebsd.org/changeset/base/326019

Log:
  evdev: Export EVDEV_SUPPORT kernel option through feature facility
  
  Suggested by: netchild
  Reviewed by:  gonzo
  Approved by:  gonzo (mentor)
  MFC after:1 week

Modified:
  head/sys/dev/evdev/evdev.c

Modified: head/sys/dev/evdev/evdev.c
==
--- head/sys/dev/evdev/evdev.c  Mon Nov 20 19:05:53 2017(r326018)
+++ head/sys/dev/evdev/evdev.c  Mon Nov 20 19:17:43 2017(r326019)
@@ -50,6 +50,9 @@
 
 #ifdef FEATURE
 FEATURE(evdev, "Input event devices support");
+#ifdef EVDEV_SUPPORT
+FEATURE(evdev_support, "Evdev support in hybrid drivers");
+#endif
 #endif
 
 enum evdev_sparse_result
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r325988 - head/sys/libkern

2017-11-20 Thread Warner Losh
On Nov 20, 2017 9:57 AM, "Ed Maste"  wrote:

Hi Bruce, notes on a few of the points you raised (I'll look at others
later):

On 19 November 2017 at 04:07, Bruce Evans  wrote:
>
> The vendor version is in libc/string.  It has been ANSIfied, but the
> libkern version has large churning to "optimize" it.  It is the libkern
> version that should have been optimized, since bcmp is unimportant in
> the kernel and in most applications, but applications have a wider range
> so a few might benefit from optimizing it.

I presume you meant "it is the _libc_ version that should have been
optimized", but could also read this as a distinction between
optimized and scare-quotes "optimized."

> bcmp is actually optimized
> in the kernel in support.[sS] for all arches except powerpc and riscv,
> so optimizing the kernel MI version of it is especially unimportant.
> In libc where MD optimizations are more important, they are also not
> done for arm, arm64 and sparc64.

This could make a nice small project for someone to take on.

> - libc version copyright comment not marked for indent protection using
>   "/*-" (this has been subverted to have another meaning which I forget).

I don't believe there's another meaning. IIRC imp@ has pointed out
that it means precisely what you've mentioned above.


All our copyright notices are marked for protection from indent. I made
that change. It was so that we could filter out all the extra junk quickly
in the conformance scripts people were writing. And these things should be
protected from indent too.

Warner

>> Modified: head/sys/libkern/cmpdi2.c
>> Modified: head/sys/libkern/divdi3.c
>> Modified: head/sys/libkern/lshrdi3.c
>
> Like ashrdi3.c (not ANSIfied in libc/quad).

Ok, I will update libc/quad to match.

> The above declaration was already correctly ANSIfied in libc/gmon.  This
> unimproves the style by keeping the comment misplaced at the right of the
> code where it is a larger style bug than before -- not the line is too
long.
> ANSIfication in libc/gmon put it on a separate line.

Will update the comment along with other mcount tidying.

>> Modified: head/sys/libkern/strcmp.c
>
> The vendor version is in libc/string.  It has been ANSIfied, but the
commit
> that did that also made another style fix.  This change catches up with
half
> of the older change.

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


Re: svn commit: r325988 - head/sys/libkern

2017-11-20 Thread Ed Maste
Hi Bruce, notes on a few of the points you raised (I'll look at others later):

On 19 November 2017 at 04:07, Bruce Evans  wrote:
>
> The vendor version is in libc/string.  It has been ANSIfied, but the
> libkern version has large churning to "optimize" it.  It is the libkern
> version that should have been optimized, since bcmp is unimportant in
> the kernel and in most applications, but applications have a wider range
> so a few might benefit from optimizing it.

I presume you meant "it is the _libc_ version that should have been
optimized", but could also read this as a distinction between
optimized and scare-quotes "optimized."

> bcmp is actually optimized
> in the kernel in support.[sS] for all arches except powerpc and riscv,
> so optimizing the kernel MI version of it is especially unimportant.
> In libc where MD optimizations are more important, they are also not
> done for arm, arm64 and sparc64.

This could make a nice small project for someone to take on.

> - libc version copyright comment not marked for indent protection using
>   "/*-" (this has been subverted to have another meaning which I forget).

I don't believe there's another meaning. IIRC imp@ has pointed out
that it means precisely what you've mentioned above.

>> Modified: head/sys/libkern/cmpdi2.c
>> Modified: head/sys/libkern/divdi3.c
>> Modified: head/sys/libkern/lshrdi3.c
>
> Like ashrdi3.c (not ANSIfied in libc/quad).

Ok, I will update libc/quad to match.

> The above declaration was already correctly ANSIfied in libc/gmon.  This
> unimproves the style by keeping the comment misplaced at the right of the
> code where it is a larger style bug than before -- not the line is too long.
> ANSIfication in libc/gmon put it on a separate line.

Will update the comment along with other mcount tidying.

>> Modified: head/sys/libkern/strcmp.c
>
> The vendor version is in libc/string.  It has been ANSIfied, but the commit
> that did that also made another style fix.  This change catches up with half
> of the older change.

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


svn commit: r326013 - head/release/arm64

2017-11-20 Thread Glen Barber
Author: gjb
Date: Mon Nov 20 15:03:03 2017
New Revision: 326013
URL: https://svnweb.freebsd.org/changeset/base/326013

Log:
  Use chroot(8) when invoking realpath(1) when setting BOOTFILES,
  otherwise realpath(1) exits due to a nonexistent directory.
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/release/arm64/PINE64.conf
  head/release/arm64/RPI3.conf

Modified: head/release/arm64/PINE64.conf
==
--- head/release/arm64/PINE64.conf  Mon Nov 20 09:24:01 2017
(r326012)
+++ head/release/arm64/PINE64.conf  Mon Nov 20 15:03:03 2017
(r326013)
@@ -31,7 +31,7 @@ arm_install_uboot() {
env TARGET=${EMBEDDED_TARGET} TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \
WITH_UNIFIED_OBJDIR=yes \
make -C ${WORLDDIR}/stand -V .OBJDIR)"
-   BOOTFILES="$(realpath ${BOOTFILES})"
+   BOOTFILES="$(chroot ${CHROOTDIR} realpath ${BOOTFILES})"
 
chroot ${CHROOTDIR} mkdir -p ${FATMOUNT}/EFI/BOOT
chroot ${CHROOTDIR} cp -p ${BOOTFILES}/efi/boot1/boot1.efi \

Modified: head/release/arm64/RPI3.conf
==
--- head/release/arm64/RPI3.confMon Nov 20 09:24:01 2017
(r326012)
+++ head/release/arm64/RPI3.confMon Nov 20 15:03:03 2017
(r326013)
@@ -44,7 +44,7 @@ arm_install_uboot() {
env TARGET=${EMBEDDED_TARGET} 
TARGET_ARCH=${EMBEDDED_TARGET_ARCH} \
WITH_UNIFIED_OBJDIR=yes \
make -C ${WORLDDIR}/stand -V .OBJDIR)"
-   BOOTFILES="$(realpath ${BOOTFILES})"
+   BOOTFILES="$(chroot ${CHROOTDIR} realpath ${BOOTFILES})"
 
chroot ${CHROOTDIR} mkdir -p ${FATMOUNT}/EFI/BOOT
chroot ${CHROOTDIR} cp -p ${BOOTFILES}/efi/boot1/boot1.efi \
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r326010 - in head: contrib/less usr.bin/less

2017-11-20 Thread Xin LI
Author: delphij
Date: Mon Nov 20 08:52:33 2017
New Revision: 326010
URL: https://svnweb.freebsd.org/changeset/base/326010

Log:
  MFV r326007: less v529.
  
  MFC after:2 weeks

Added:
  head/contrib/less/fmt.uni
 - copied unchanged from r326007, vendor/less/dist/fmt.uni
Deleted:
  head/contrib/less/mkhelp.c
Modified:
  head/contrib/less/NEWS
  head/contrib/less/README
  head/contrib/less/ch.c
  head/contrib/less/charset.c
  head/contrib/less/cmd.h
  head/contrib/less/cmdbuf.c
  head/contrib/less/command.c
  head/contrib/less/compose.uni
  head/contrib/less/cvt.c
  head/contrib/less/decode.c
  head/contrib/less/edit.c
  head/contrib/less/filename.c
  head/contrib/less/forwback.c
  head/contrib/less/funcs.h
  head/contrib/less/help.c
  head/contrib/less/ifile.c
  head/contrib/less/input.c
  head/contrib/less/jump.c
  head/contrib/less/less.h
  head/contrib/less/less.hlp
  head/contrib/less/less.nro
  head/contrib/less/lessecho.nro
  head/contrib/less/lesskey.c
  head/contrib/less/lesskey.nro
  head/contrib/less/line.c
  head/contrib/less/main.c
  head/contrib/less/mark.c
  head/contrib/less/mkutable
  head/contrib/less/optfunc.c
  head/contrib/less/option.h
  head/contrib/less/opttbl.c
  head/contrib/less/output.c
  head/contrib/less/pattern.h
  head/contrib/less/position.c
  head/contrib/less/prompt.c
  head/contrib/less/screen.c
  head/contrib/less/search.c
  head/contrib/less/signal.c
  head/contrib/less/tags.c
  head/contrib/less/ubin.uni
  head/contrib/less/version.c
  head/contrib/less/wide.uni
  head/usr.bin/less/defines.h
Directory Properties:
  head/contrib/less/   (props changed)

Modified: head/contrib/less/NEWS
==
--- head/contrib/less/NEWS  Mon Nov 20 08:12:40 2017(r326009)
+++ head/contrib/less/NEWS  Mon Nov 20 08:52:33 2017(r326010)
@@ -11,17 +11,59 @@
 
 ==
 
-   Major changes between "less" versions 487 and 491
+   Major changes between "less" versions 487 and 529
 
 * Don't output terminal init sequence if using -F and file fits on one screen.
 
-* Use ANSI prototypes in funcs.h declarations.
+* When using -S, mark truncated lines with a special character.
+  The character can be changed or disabled via the new --rscroll option.
 
-* Fix some const mismatches.
+* New command M marks the last line displayed on the screen.
 
-* Remove "register" in variable declarations.
+* New command ESC-m removes a line mark.
 
+* Status column (enabled via -J) now shows mark letters.
+
+* Status column shows search matches even if highlighting is disabled via -G.
+
+* A second ESC-u command will clear search match markers in the status column.
+
+* Do same ANSI escape code filtering for tag matching that we do for 
+  searching, to help when viewing syntax-highlighted code.
+  
+* Catch SIGTERM and clean up before exiting.
+
+* Fix bug initializing default charset on Windows.
+
+* Handle keypad ENTER key correctly if it sends something other than newline.
+
+* Fix buffering bug when using stdin with a LESSOPEN pipe.
+
+* On Windows, allow 'u' in -D option to enable underlining.
+
+* On Windows, use underline in sgr mode.
+
+* On Windows, convert UTF-8 to multibyte if console is not UTF-8.
+
+* Update Unicode tables to 2017-03-08.
+
+* Pass-thru Unicode formating chars (Cf type) instead of treating them
+  as binary chars. But treat them as binary if -U is set.
+
+* Fix erroneous binary file warning when UTF-8 file contains ANSI SGR 
sequences.
+
+* Fix bugs when using LESSOPEN and switching between stdin and other files.
+
+* Fix some bugs handling filenames containing shell metacharacters.
+
 * Fix some memory leaks.
+
+* Allow some debugging environment variables to be set in lesskey file.
+
+* Code improvements:
+  . Use ANSI prototypes in funcs.h declarations.
+  . Fix some const mismatches.
+  . Remove archaic "register" in variable declarations.
 
 ==
 

Modified: head/contrib/less/README
==
--- head/contrib/less/READMEMon Nov 20 08:12:40 2017(r326009)
+++ head/contrib/less/READMEMon Nov 20 08:52:33 2017(r326010)
@@ -7,9 +7,9 @@
 **
 **
 
-Less, version 491
+Less, version 529
 
-This is the distribution of less, version 491, released 07 Apr 2017.
+This is the distribution of less, version 529, released 13 Nov 2017.
 This program is part of the GNU project (http://www.gnu.org).
 
 This program is free software.  You may redistribute it and/or
@@ -23,6 +23,7 @@
 
 Please report any problems to bug-l...@gnu.org.
 See