Re: svn commit: r335629 - in head: share/man/man4 sys/dev/vt/hw/vga

2018-06-25 Thread Alexey Dokuchaev
On Mon, Jun 25, 2018 at 08:43:51AM -0700, Rodney W. Grimes wrote:
> > New Revision: 335629
> > URL: https://svnweb.freebsd.org/changeset/base/335629
> > 
> > Log:
> >   vt: add option to ignore NO_VGA flag in ACPI
> >   
> >   To workaround buggy firmware that sets this flag when there's actually
> >   a VGA present.
> >   
> >   Reported and tested by:   Yasuhiro KIMURA 
> >   Sponsored by: Citrix Systems R
> >   Reviewed by:  kib
> >   Differential revision:https://reviews.freebsd.org/D16003
> 
> It is generally best to avoid double negatives,
> couldnt this of been better named? (hw.vga.acpi_force_vga)

Yes please; I get constantly confused when calculating negatives and
often get them wrong.

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


svn commit: r335654 - head/usr.sbin/config

2018-06-25 Thread Kyle Evans
Author: kevans
Date: Tue Jun 26 04:06:49 2018
New Revision: 335654
URL: https://svnweb.freebsd.org/changeset/base/335654

Log:
  config(8): part of patch disappeared, don't close ifp at the end

Modified:
  head/usr.sbin/config/mkmakefile.c

Modified: head/usr.sbin/config/mkmakefile.c
==
--- head/usr.sbin/config/mkmakefile.c   Tue Jun 26 04:02:25 2018
(r335653)
+++ head/usr.sbin/config/mkmakefile.c   Tue Jun 26 04:06:49 2018
(r335654)
@@ -336,8 +336,6 @@ makeenv(void)
}
}
fprintf(ofp, "\"\\0\"\n};\n");
-   if (ifp)
-   fclose(ifp);
fclose(ofp);
moveifchanged(path("env.c.new"), path("env.c"));
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335653 - head/usr.sbin/config

2018-06-25 Thread Kyle Evans
Author: kevans
Date: Tue Jun 26 04:02:25 2018
New Revision: 335653
URL: https://svnweb.freebsd.org/changeset/base/335653

Log:
  config(8): Flip the order of concatenation for `hints` and `env`
  
  As previously noted, kernel's processing of these means that the first
  appearance of a hint/variable wins. Flipping the order of concatenation
  means that later variables override earlier variables, as expected when one
  does:
  
  hints x
  hints y
  
  Where perhaps x is:
  
  hint.aw_sid.0.disable=1
  
  and y is:
  
  hint.aw_sid.0.disable=0
  
  The expectation would be that a later appearing variable would override an
  earlier appearing variable, such as with `device`/`nodevice`, device.hints,
  and other similarly structured data files.

Modified:
  head/usr.sbin/config/config.5
  head/usr.sbin/config/config.y

Modified: head/usr.sbin/config/config.5
==
--- head/usr.sbin/config/config.5   Tue Jun 26 03:56:10 2018
(r335652)
+++ head/usr.sbin/config/config.5   Tue Jun 26 04:02:25 2018
(r335653)
@@ -129,8 +129,9 @@ All
 .Ic env
 and
 .Ic envvar
-directives will be processed and added to the staitc environment in the order 
of
-appearance.
+directives will be processed and added to the static environment in reversed
+order of appearance so that later specified variables properly override earlier
+specified variables.
 Note that within
 .Ar filename ,
 the first appearance of a given variable will be the first one seen by the
@@ -150,8 +151,9 @@ All
 .Ic env
 and
 .Ic envvar
-directives will be processed and added to the staitc environment in the order 
of
-appearance.
+directives will be processed and added to the static environment in reversed
+order of appearance so that later specified variables properly override earlier
+specified variables.
 .\"  FILES 
 .Pp
 .It Ic files Ar filename
@@ -178,7 +180,9 @@ The file
 must conform to the syntax specified by
 .Xr device.hints 5 .
 Multiple hints lines are allowed.
-The resulting hints will be the files concatenated in the order of appearance.
+The resulting hints will be the files concatenated in reverse order of
+appearance so that hints in later files properly override hints in earlier
+files.
 .\"  IDENT 
 .Pp
 .It Ic ident Ar name

Modified: head/usr.sbin/config/config.y
==
--- head/usr.sbin/config/config.y   Tue Jun 26 03:56:10 2018
(r335652)
+++ head/usr.sbin/config/config.y   Tue Jun 26 04:02:25 2018
(r335653)
@@ -200,7 +200,7 @@ Config_spec:
if (hint == NULL)
err(EXIT_FAILURE, "calloc");
hint->hint_name = $2;
-   STAILQ_INSERT_TAIL(, hint, hint_next);
+   STAILQ_INSERT_HEAD(, hint, hint_next);
hintmode = 1;
}
 
@@ -360,7 +360,7 @@ newenvvar(char *name, bool is_file)
err(EXIT_FAILURE, "calloc");
envvar->env_str = name;
envvar->env_is_file = is_file;
-   STAILQ_INSERT_TAIL(, envvar, envvar_next);
+   STAILQ_INSERT_HEAD(, envvar, envvar_next);
envmode = 1;
 }
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335652 - head/usr.sbin/config

2018-06-25 Thread Kyle Evans
Author: kevans
Date: Tue Jun 26 03:56:10 2018
New Revision: 335652
URL: https://svnweb.freebsd.org/changeset/base/335652

Log:
  config(8): Make 'env' files consistent with other file-accepting options
  
  Previously, only one 'env' file could be specified. Later 'env' directives
  would overwrite earlier 'env' directives. This is inconsistent with every
  other file-accepting directives which process files in order, including
  hints.
  
  A caveat applies to both hints and env that isn't mentioned: they're
  concatenated in the order of appearance, so they're not actually applied in
  the way one might think by supplying:
  
  hints x
  hints y
  
  Hints in x will take precedence over same-name hints in y due to how
  the kernel processes them, stopping at the first line that matches the hint
  we're searching for. Future work will flip the order of concatenation so
  that later files may still properly override earlier files.
  
  In practice, this likely doesn't matter at all due to the nature of the
  beast.

Modified:
  head/usr.sbin/config/config.5
  head/usr.sbin/config/config.h
  head/usr.sbin/config/config.y
  head/usr.sbin/config/mkmakefile.c

Modified: head/usr.sbin/config/config.5
==
--- head/usr.sbin/config/config.5   Tue Jun 26 02:05:45 2018
(r335651)
+++ head/usr.sbin/config/config.5   Tue Jun 26 03:56:10 2018
(r335652)
@@ -23,7 +23,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 22, 2018
+.Dd June 26, 2018
 .Dt CONFIG 5
 .Os
 .Sh NAME
@@ -124,6 +124,18 @@ the compiled-in environment instead, unless the boot e
 This directive is useful for setting kernel tunables in
 embedded environments that do not start from
 .Xr loader 8 .
+.Pp
+All
+.Ic env
+and
+.Ic envvar
+directives will be processed and added to the staitc environment in the order 
of
+appearance.
+Note that within
+.Ar filename ,
+the first appearance of a given variable will be the first one seen by the
+kernel, effectively shadowing any later appearances of the same variable within
+.Ar filename .
 .\"  ENVVAR 
 .Pp
 .It Ic envvar Ar setting
@@ -133,11 +145,13 @@ compiled-in environment.
 must be of the form
 .Dq Va name=value .
 Optional quotes are supported in both name and value.
-All environment variables specified with
-.Ic envvar
-will be set after any
+.Pp
+All
 .Ic env
-files are included.
+and
+.Ic envvar
+directives will be processed and added to the staitc environment in the order 
of
+appearance.
 .\"  FILES 
 .Pp
 .It Ic files Ar filename

Modified: head/usr.sbin/config/config.h
==
--- head/usr.sbin/config/config.h   Tue Jun 26 02:05:45 2018
(r335651)
+++ head/usr.sbin/config/config.h   Tue Jun 26 03:56:10 2018
(r335652)
@@ -37,6 +37,7 @@
  */
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -142,6 +143,7 @@ SLIST_HEAD(, opt_list) otab;
 
 struct envvar {
char*env_str;
+   boolenv_is_file;
STAILQ_ENTRY(envvar) envvar_next;
 };
 
@@ -175,7 +177,6 @@ SLIST_HEAD(, includepath) includepath;
 #define OPT_AUTOGEN"CONFIG_AUTOGENERATED"
 
 extern char*ident;
-extern char*env;
 extern charkernconfstr[];
 extern int do_trace;
 extern int envmode;

Modified: head/usr.sbin/config/config.y
==
--- head/usr.sbin/config/config.y   Tue Jun 26 02:05:45 2018
(r335651)
+++ head/usr.sbin/config/config.y   Tue Jun 26 03:56:10 2018
(r335652)
@@ -82,7 +82,6 @@
 
 struct device_head dtab;
 char   *ident;
-char   *env;
 intenvmode;
 inthintmode;
 intyyline;
@@ -99,6 +98,7 @@ int yywrap(void);
 
 static void newdev(char *name);
 static void newfile(char *name);
+static void newenvvar(char *name, bool is_file);
 static void rmdev_schedule(struct device_head *dh, char *name);
 static void newopt(struct opt_head *list, char *name, char *value, int append);
 static void rmopt_schedule(struct opt_head *list, char *name);
@@ -191,20 +191,8 @@ Config_spec:
|
MAXUSERS NUMBER { maxusers = $2; } |
PROFILE NUMBER { profiling = $2; } |
-   ENV ID {
-   env = $2;
-   envmode = 1;
-   } |
-   ENVVAR ENVLINE {
-   struct envvar *envvar;
-
-   envvar = (struct envvar *)calloc(1, sizeof (struct envvar));
-   if (envvar == NULL)
-   err(EXIT_FAILURE, "calloc");
-   envvar->env_str = $2;
-   STAILQ_INSERT_TAIL(, envvar, envvar_next);
-   envmode = 1;
-   } |
+   ENV ID { newenvvar($2, true); } |
+   ENVVAR ENVLINE { newenvvar($2, false); } |
HINTS ID {
struct hint *hint;
 
@@ -361,7 +349,21 @@ newfile(char *name)
nl->f_name = name;

svn commit: r335651 - head/usr.sbin/config

2018-06-25 Thread Kyle Evans
Author: kevans
Date: Tue Jun 26 02:05:45 2018
New Revision: 335651
URL: https://svnweb.freebsd.org/changeset/base/335651

Log:
  config(8): Set envmode if we accept an envvar
  
  X-MFC-With:   r335642

Modified:
  head/usr.sbin/config/config.y

Modified: head/usr.sbin/config/config.y
==
--- head/usr.sbin/config/config.y   Tue Jun 26 00:39:38 2018
(r335650)
+++ head/usr.sbin/config/config.y   Tue Jun 26 02:05:45 2018
(r335651)
@@ -203,6 +203,7 @@ Config_spec:
err(EXIT_FAILURE, "calloc");
envvar->env_str = $2;
STAILQ_INSERT_TAIL(, envvar, envvar_next);
+   envmode = 1;
} |
HINTS ID {
struct hint *hint;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335650 - head/sys/ufs/ffs

2018-06-25 Thread Warner Losh
Author: imp
Date: Tue Jun 26 00:39:38 2018
New Revision: 335650
URL: https://svnweb.freebsd.org/changeset/base/335650

Log:
  Use buf + strategy rather than bypassing geom_vfs layer
  
  The reference counting that's done in the geom_vfs layer to prevent
  delivery of requests to defunct devices only works if all requests go
  through that layer. UFS was bypassing that layer for BIO_DELETE requests,
  sending them to the geom_consumer directly with g_io_request. Allocate
  a buf, fill it in, and call strategy on it instead.
  
  Submitted by: Chuck Silvers
  Reviewed by: scottl, imp, kirk
  Sponsored by: Netflix
  Differential: https://reviews.freebsd.org/D15456

Modified:
  head/sys/ufs/ffs/ffs_alloc.c

Modified: head/sys/ufs/ffs/ffs_alloc.c
==
--- head/sys/ufs/ffs/ffs_alloc.cMon Jun 25 22:36:25 2018
(r335649)
+++ head/sys/ufs/ffs/ffs_alloc.cTue Jun 26 00:39:38 2018
(r335650)
@@ -88,6 +88,7 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #include 
+#include 
 
 #include 
 #include 
@@ -109,7 +110,7 @@ static ufs2_daddr_t
 static voidffs_blkfree_cg(struct ufsmount *, struct fs *,
struct vnode *, ufs2_daddr_t, long, ino_t,
struct workhead *);
-static voidffs_blkfree_trim_completed(struct bio *);
+static voidffs_blkfree_trim_completed(struct buf *);
 static voidffs_blkfree_trim_task(void *ctx, int pending __unused);
 #ifdef INVARIANTS
 static int ffs_checkblk(struct inode *, ufs2_daddr_t, long);
@@ -2280,13 +2281,13 @@ ffs_blkfree_trim_task(ctx, pending)
 }
 
 static void
-ffs_blkfree_trim_completed(bip)
-   struct bio *bip;
+ffs_blkfree_trim_completed(bp)
+   struct buf *bp;
 {
struct ffs_blkfree_trim_params *tp;
 
-   tp = bip->bio_caller2;
-   g_destroy_bio(bip);
+   tp = bp->b_fsprivate1;
+   free(bp, M_TEMP);
TASK_INIT(>task, 0, ffs_blkfree_trim_task, tp);
taskqueue_enqueue(tp->ump->um_trim_tq, >task);
 }
@@ -2303,7 +2304,7 @@ ffs_blkfree(ump, fs, devvp, bno, size, inum, vtype, de
struct workhead *dephd;
 {
struct mount *mp;
-   struct bio *bip;
+   struct buf *bp;
struct ffs_blkfree_trim_params *tp;
 
/*
@@ -2346,16 +2347,16 @@ ffs_blkfree(ump, fs, devvp, bno, size, inum, vtype, de
} else
tp->pdephd = NULL;
 
-   bip = g_alloc_bio();
-   bip->bio_cmd = BIO_DELETE;
-   bip->bio_offset = dbtob(fsbtodb(fs, bno));
-   bip->bio_done = ffs_blkfree_trim_completed;
-   bip->bio_length = size;
-   bip->bio_caller2 = tp;
+   bp = malloc(sizeof(*bp), M_TEMP, M_WAITOK | M_ZERO);
+   bp->b_iocmd = BIO_DELETE;
+   bp->b_iooffset = dbtob(fsbtodb(fs, bno));
+   bp->b_iodone = ffs_blkfree_trim_completed;
+   bp->b_bcount = size;
+   bp->b_fsprivate1 = tp;
 
mp = UFSTOVFS(ump);
vn_start_secondary_write(NULL, , 0);
-   g_io_request(bip, (struct g_consumer *)devvp->v_bufobj.bo_private);
+   g_vfs_strategy(ump->um_bo, bp);
 }
 
 #ifdef INVARIANTS
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r335647 - head/lib/geom

2018-06-25 Thread Brooks Davis
On Mon, Jun 25, 2018 at 09:54:39PM +, Brad Davis wrote:
> Author: brd
> Date: Mon Jun 25 21:54:39 2018
> New Revision: 335647
> URL: https://svnweb.freebsd.org/changeset/base/335647
> 
> Log:
>   Add a file missed in r335645.
>   
>   Approved by:brooks, allanjude (mentor)
>   Differential Revision:  https://reviews.freebsd.org/D15360

Thanks for fixing this and sorry for the breakage.

-- Brooks


signature.asc
Description: PGP signature


svn commit: r335649 - in head/sys/arm64: arm64 linux

2018-06-25 Thread Andrew Turner
Author: andrew
Date: Mon Jun 25 22:36:25 2018
New Revision: 335649
URL: https://svnweb.freebsd.org/changeset/base/335649

Log:
  Make cpu_set_syscall_retval common between the existing FreeBSD ABI and
  the Linuxulator. We need to translate error values onto Linux errno values
  and return them to userspace when a syscall fails. We also need to preserve
  x1 as all registers are preserved other than the return value.
  
  Reviewed by:  emaste
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D16008

Modified:
  head/sys/arm64/arm64/vm_machdep.c
  head/sys/arm64/linux/linux_sysvec.c

Modified: head/sys/arm64/arm64/vm_machdep.c
==
--- head/sys/arm64/arm64/vm_machdep.c   Mon Jun 25 22:05:33 2018
(r335648)
+++ head/sys/arm64/arm64/vm_machdep.c   Mon Jun 25 22:36:25 2018
(r335649)
@@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -154,7 +155,7 @@ cpu_set_syscall_retval(struct thread *td, int error)
break;
default:
frame->tf_spsr |= PSR_C;/* carry bit */
-   frame->tf_x[0] = error;
+   frame->tf_x[0] = SV_ABI_ERRNO(td->td_proc, error);
break;
}
 }

Modified: head/sys/arm64/linux/linux_sysvec.c
==
--- head/sys/arm64/linux/linux_sysvec.c Mon Jun 25 22:05:33 2018
(r335648)
+++ head/sys/arm64/linux/linux_sysvec.c Mon Jun 25 22:36:25 2018
(r335649)
@@ -143,25 +143,9 @@ linux_fetch_syscall_args(struct thread *td)
 static void
 linux_set_syscall_retval(struct thread *td, int error)
 {
-   struct trapframe *frame;
 
-   frame = td->td_frame;
-
-   switch (error) {
-   case 0:
-   frame->tf_x[0] = td->td_retval[0];
-   frame->tf_x[1] = td->td_retval[1];
-   break;
-   case ERESTART:
-   /* LINUXTODO: verify */
-   frame->tf_elr -= 4;
-   break;
-   case EJUSTRETURN:
-   break;
-   default:
-   frame->tf_x[0] = error;
-   break;
-   }
+   td->td_retval[1] = td->td_frame->tf_x[1];
+   cpu_set_syscall_retval(td, error);
 }
 
 static int
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335648 - head/sys/powerpc/include

2018-06-25 Thread Justin Hibbits
Author: jhibbits
Date: Mon Jun 25 22:05:33 2018
New Revision: 335648
URL: https://svnweb.freebsd.org/changeset/base/335648

Log:
  Expose stopped cpu contexts to ddb on PowerPC
  
  Summary: In r220638, stoppcbs started being tracked. This never got exposed to
  ddb though, so kdb_thr_ctx() didn't know how to look them up.
  
  This allows switching to threads on stopped CPUs in kdb.
  
  Submitted by: Brandon Bergren 
  Differential Revision: https://reviews.freebsd.org/D15986

Modified:
  head/sys/powerpc/include/kdb.h
  head/sys/powerpc/include/smp.h

Modified: head/sys/powerpc/include/kdb.h
==
--- head/sys/powerpc/include/kdb.h  Mon Jun 25 21:54:39 2018
(r335647)
+++ head/sys/powerpc/include/kdb.h  Mon Jun 25 22:05:33 2018
(r335648)
@@ -40,6 +40,8 @@
 void kdb_cpu_clear_singlestep(void);
 void kdb_cpu_set_singlestep(void);
 
+#define KDB_STOPPEDPCB(pc)  [pc->pc_cpuid]
+
 static __inline void
 kdb_cpu_sync_icache(unsigned char *addr, size_t size)
 {

Modified: head/sys/powerpc/include/smp.h
==
--- head/sys/powerpc/include/smp.h  Mon Jun 25 21:54:39 2018
(r335647)
+++ head/sys/powerpc/include/smp.h  Mon Jun 25 22:05:33 2018
(r335648)
@@ -42,6 +42,7 @@
 
 #ifndef LOCORE
 
+#include 
 #include 
 
 void   ipi_all_but_self(int ipi);
@@ -58,6 +59,8 @@ void  cpudep_ap_early_bootstrap(void);
 uintptr_t cpudep_ap_bootstrap(void);
 void   cpudep_ap_setup(void);
 void   machdep_ap_bootstrap(void);
+
+extern struct pcb stoppcbs[];
 
 #endif /* !LOCORE */
 #endif /* _KERNEL */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335647 - head/lib/geom

2018-06-25 Thread Brad Davis
Author: brd
Date: Mon Jun 25 21:54:39 2018
New Revision: 335647
URL: https://svnweb.freebsd.org/changeset/base/335647

Log:
  Add a file missed in r335645.
  
  Approved by:  brooks, allanjude (mentor)
  Differential Revision:https://reviews.freebsd.org/D15360

Added:
  head/lib/geom/Makefile.classes   (contents, props changed)

Added: head/lib/geom/Makefile.classes
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/geom/Makefile.classes  Mon Jun 25 21:54:39 2018
(r335647)
@@ -0,0 +1,26 @@
+# $FreeBSD$
+
+.if !defined(COMPAT_32BIT)
+GEOM_CLASS_DIR?=/lib/geom
+.else
+GEOM_CLASS_DIR?=/usr/lib32/geom
+.endif
+
+GEOM_CLASSES=  cache
+GEOM_CLASSES+= concat
+.if ${MK_OPENSSL} != "no"
+GEOM_CLASSES+= eli
+.endif
+GEOM_CLASSES+= journal
+GEOM_CLASSES+= label
+GEOM_CLASSES+= mirror
+GEOM_CLASSES+= mountver
+GEOM_CLASSES+= multipath
+GEOM_CLASSES+= nop
+GEOM_CLASSES+= part
+GEOM_CLASSES+= raid
+GEOM_CLASSES+= raid3
+GEOM_CLASSES+= sched
+GEOM_CLASSES+= shsec
+GEOM_CLASSES+= stripe
+GEOM_CLASSES+= virstor
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335646 - head/sys/modules/linux64

2018-06-25 Thread Ed Maste
Author: emaste
Date: Mon Jun 25 20:33:04 2018
New Revision: 335646
URL: https://svnweb.freebsd.org/changeset/base/335646

Log:
  linux64: add arm64 linuxulator build details
  
  The arm64 linuxulator needs different arguments for the objcopy
  invocation used to build the linux VDSO.  These arguments are both arch-
  and OS-dependent, so I did not try to use some common setting for them.
  
  Reviewed by:  imp
  Sponsored by: Turing Robotic Industries
  Differential Revision:https://reviews.freebsd.org/D16011

Modified:
  head/sys/modules/linux64/Makefile

Modified: head/sys/modules/linux64/Makefile
==
--- head/sys/modules/linux64/Makefile   Mon Jun 25 19:55:15 2018
(r335645)
+++ head/sys/modules/linux64/Makefile   Mon Jun 25 20:33:04 2018
(r335646)
@@ -35,9 +35,16 @@ linux_locore.o: linux_locore.s linux_assym.h
-Wl,-soname=${VDSO}.so.1,-warn-common -nostdlib \
${.IMPSRC} -o ${.TARGET}
 
+.if ${MACHINE_CPUARCH} == "aarch64"
+OBJCOPY_TARGET=--output-target elf64-littleaarch64 --binary-architecture 
aarch64
+.elif ${MACHINE_CPUARCH} == "amd64"
+OBJCOPY_TARGET=--output-target elf64-x86-64 --binary-architecture i386:x86-64
+.else
+.error ${MACHINE_CPUARCH} not yet supported by linux64
+.endif
 ${VDSO}.so: linux_locore.o
-   ${OBJCOPY} --input-target binary --output-target elf64-x86-64 \
-   -S -g --binary-architecture i386:x86-64 linux_locore.o ${.TARGET}
+   ${OBJCOPY} --input-target binary ${OBJCOPY_TARGET} -S -g \
+   linux_locore.o ${.TARGET}
strip -N _binary_linux_locore_o_size ${.TARGET}
 
 linux_support.o: assym.inc linux_assym.h
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335645 - in head: . etc/mtree lib lib/geom sbin/geom sbin/geom/class sbin/geom/core targets/pseudo/userland targets/pseudo/userland/lib

2018-06-25 Thread Brooks Davis
Author: brooks
Date: Mon Jun 25 19:55:15 2018
New Revision: 335645
URL: https://svnweb.freebsd.org/changeset/base/335645

Log:
  Normalize the g(eom,cache,part,...) build.
  
  Rather then combining hardlink creation for the geom(8) binary with
  shared library build, move libraries to src/lib/geom so they are
  built and installed normally.  Create a common Makefile.classes
  which is included by both lib/geom/Makefile and sbin/geom/Makefile
  so the symlink and libraries stay in sync.
  
  The relocation of libraries allows libraries to be build for 32-bit
  compat.  This also reduces the number of non-standard builds in
  the system.
  
  This commit is not sufficent to run a 32-bit /sbin/geom on a 64-bit
  system out of the box as it will look in the wrong place for libraries
  unless GEOM_LIBRARY_PATH is set appropriatly in the environment.
  
  Reviewed by:  bdrewery
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D15360

Added:
  head/lib/geom/
 - copied from r335644, head/sbin/geom/class/
Deleted:
  head/sbin/geom/Makefile.inc
  head/sbin/geom/class/
  head/sbin/geom/core/Makefile
Modified:
  head/Makefile.inc1
  head/etc/mtree/BSD.lib32.dist
  head/lib/Makefile
  head/lib/geom/Makefile
  head/lib/geom/Makefile.inc
  head/sbin/geom/Makefile
  head/targets/pseudo/userland/Makefile.depend
  head/targets/pseudo/userland/lib/Makefile.depend

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Mon Jun 25 19:24:50 2018(r335644)
+++ head/Makefile.inc1  Mon Jun 25 19:55:15 2018(r335645)
@@ -952,7 +952,7 @@ _worldtmp: .PHONY
@touch ${WORLDTMP}/${.TARGET}
 
 .for _dir in \
-lib lib/casper usr legacy/bin legacy/usr
+lib lib/casper lib/geom usr legacy/bin legacy/usr
mkdir -p ${WORLDTMP}/${_dir}
 .endfor
mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \
@@ -2507,6 +2507,7 @@ _prebuild_libs=   ${_kerberos5_lib_libasn1} \
${_cddl_lib_libavl} \
${_cddl_lib_libzfs_core} \
${_cddl_lib_libctf} \
+   lib/libufs \
lib/libutil lib/libpjdlog ${_lib_libypclnt} lib/libz lib/msun \
${_secure_lib_libcrypto} ${_lib_libldns} \
${_secure_lib_libssh} ${_secure_lib_libssl}

Modified: head/etc/mtree/BSD.lib32.dist
==
--- head/etc/mtree/BSD.lib32.dist   Mon Jun 25 19:24:50 2018
(r335644)
+++ head/etc/mtree/BSD.lib32.dist   Mon Jun 25 19:55:15 2018
(r335645)
@@ -8,6 +8,8 @@
 lib32
 dtrace
 ..
+geom
+..
 i18n
 ..
 ..

Modified: head/lib/Makefile
==
--- head/lib/Makefile   Mon Jun 25 19:24:50 2018(r335644)
+++ head/lib/Makefile   Mon Jun 25 19:55:15 2018(r335645)
@@ -24,6 +24,7 @@ SUBDIR_BOOTSTRAP= \
 
 SUBDIR=${SUBDIR_BOOTSTRAP} \
.WAIT \
+   geom \
libalias \
libarchive \
libauditd \
@@ -100,6 +101,7 @@ SUBDIR= ${SUBDIR_BOOTSTRAP} \
 # Inter-library dependencies.  When the makefile for a library contains LDADD
 # libraries, those libraries should be listed as build order dependencies here.
 
+SUBDIR_DEPEND_geom=libufs
 SUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd
 SUBDIR_DEPEND_libauditdm= libbsm
 SUBDIR_DEPEND_libbsnmp= ${_libnetgraph}

Modified: head/lib/geom/Makefile
==
--- head/sbin/geom/class/Makefile   Mon Jun 25 19:24:50 2018
(r335644)
+++ head/lib/geom/Makefile  Mon Jun 25 19:55:15 2018(r335645)
@@ -1,24 +1,6 @@
 # $FreeBSD$
 
-.include 
+SUBDIR=${GEOM_CLASSES}
 
-SUBDIR=cache
-SUBDIR+=concat
-.if ${MK_OPENSSL} != "no"
-SUBDIR+=eli
-.endif
-SUBDIR+=journal
-SUBDIR+=label
-SUBDIR+=mirror
-SUBDIR+=mountver
-SUBDIR+=multipath
-SUBDIR+=nop
-SUBDIR+=part
-SUBDIR+=raid
-SUBDIR+=raid3
-SUBDIR+=sched
-SUBDIR+=shsec
-SUBDIR+=stripe
-SUBDIR+=virstor
-
+.include "Makefile.inc"
 .include 

Modified: head/lib/geom/Makefile.inc
==
--- head/sbin/geom/class/Makefile.inc   Mon Jun 25 19:24:50 2018
(r335644)
+++ head/lib/geom/Makefile.inc  Mon Jun 25 19:55:15 2018(r335645)
@@ -1,13 +1,16 @@
 # $FreeBSD$
 
-SHLIBDIR?=${GEOM_CLASS_DIR}
+.include 
+
+SHLIBDIR=${GEOM_CLASS_DIR}
 SHLIB_NAME?=geom_${GEOM_CLASS}.so
-LINKS= ${BINDIR}/geom ${BINDIR}/g${GEOM_CLASS}
 MAN=   g${GEOM_CLASS}.8
 SRCS+= geom_${GEOM_CLASS}.c subr.c
+CFLAGS+=-I${SRCTOP}/sbin/geom
 
+.PATH: ${SRCTOP}/sbin/geom/misc
+
 NO_WMISSING_VARIABLE_DECLARATIONS=
 
-CFLAGS+= -I${.CURDIR:H:H}
-
+.include "Makefile.classes"
 .include "../Makefile.inc"

Modified: head/sbin/geom/Makefile

svn commit: r335644 - head/sys/compat/linux

2018-06-25 Thread Ed Maste
Author: emaste
Date: Mon Jun 25 19:24:50 2018
New Revision: 335644
URL: https://svnweb.freebsd.org/changeset/base/335644

Log:
  Quiet unused fn warning for linuxulator w/o legacy syscalls
  
  Sponsored by: Turing Robotic Industries

Modified:
  head/sys/compat/linux/linux_sysctl.c

Modified: head/sys/compat/linux/linux_sysctl.c
==
--- head/sys/compat/linux/linux_sysctl.cMon Jun 25 18:53:06 2018
(r335643)
+++ head/sys/compat/linux/linux_sysctl.cMon Jun 25 19:24:50 2018
(r335644)
@@ -86,6 +86,7 @@ LIN_SDT_PROBE_DEFINE2(sysctl, linux_sysctl, wrong_leng
 LIN_SDT_PROBE_DEFINE1(sysctl, linux_sysctl, unsupported_sysctl, "char *");
 LIN_SDT_PROBE_DEFINE1(sysctl, linux_sysctl, return, "int");
 
+#ifdef LINUX_LEGACY_SYSCALLS
 static int
 handle_string(struct l___sysctl_args *la, char *value)
 {
@@ -115,7 +116,6 @@ handle_string(struct l___sysctl_args *la, char *value)
return (0);
 }
 
-#ifdef LINUX_LEGACY_SYSCALLS
 int
 linux_sysctl(struct thread *td, struct linux_sysctl_args *args)
 {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335643 - stable/11/share/mk

2018-06-25 Thread Bryan Drewery
Author: bdrewery
Date: Mon Jun 25 18:53:06 2018
New Revision: 335643
URL: https://svnweb.freebsd.org/changeset/base/335643

Log:
  MFC r321427,r321445:
  
r321427:
  PROGS: Fix ESTALE errors on NFS while cleaning in directories with PROGS.
r321445:
  cleandir: Fix ESTALE errors from parallel removals.

Modified:
  stable/11/share/mk/bsd.obj.mk
  stable/11/share/mk/bsd.progs.mk
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/share/mk/bsd.obj.mk
==
--- stable/11/share/mk/bsd.obj.mk   Mon Jun 25 17:17:47 2018
(r335642)
+++ stable/11/share/mk/bsd.obj.mk   Mon Jun 25 18:53:06 2018
(r335643)
@@ -157,6 +157,7 @@ whereobj:
@echo ${.OBJDIR}
 .endif
 
+# Same check in bsd.progs.mk
 .if ${CANONICALOBJDIR} != ${.CURDIR} && exists(${CANONICALOBJDIR}/)
 cleanobj:
-rm -rf ${CANONICALOBJDIR}
@@ -182,9 +183,9 @@ clean:
 .endif
 .ORDER: clean all
 
-cleandir: cleanobj
-
 .include 
+
+cleandir: .WAIT cleanobj
 
 .if make(destroy*) && defined(OBJROOT)
 # this (rm -rf objdir) is much faster and more reliable than cleaning.

Modified: stable/11/share/mk/bsd.progs.mk
==
--- stable/11/share/mk/bsd.progs.mk Mon Jun 25 17:17:47 2018
(r335642)
+++ stable/11/share/mk/bsd.progs.mk Mon Jun 25 18:53:06 2018
(r335643)
@@ -116,7 +116,16 @@ ${_PROGS_COMMON_OBJS}: .NOMETA
 
 .if !empty(PROGS) && !defined(_RECURSING_PROGS) && !defined(PROG)
 # tell progs.mk we might want to install things
-PROGS_TARGETS+= checkdpadd clean cleandepend cleandir depend install
+PROGS_TARGETS+= checkdpadd clean depend install
+# Only handle removing depend files from the main process.
+_PROG_MK.cleandir= CLEANDEPENDFILES= CLEANDEPENDDIRS=
+_PROG_MK.cleanobj= CLEANDEPENDFILES= CLEANDEPENDDIRS=
+# Only recurse on these if there is no objdir, meaning a normal
+# 'clean' gets ran via the target defined in bsd.obj.mk.
+# Same check from cleanobj: in bsd.obj.mk
+.if ${CANONICALOBJDIR} == ${.CURDIR} || !exists(${CANONICALOBJDIR}/)
+PROGS_TARGETS+=cleandir cleanobj
+.endif
 
 # Ensure common objects are built before recursing.
 .if !empty(_PROGS_COMMON_OBJS)
@@ -142,7 +151,7 @@ $p.$t: .PHONY .MAKE
(cd ${.CURDIR} && \
DEPENDFILE=.depend.$p \
NO_SUBDIR=1 ${MAKE} -f ${MAKEFILE} _RECURSING_PROGS=t \
-   PROG=$p ${x.$p} ${@:E})
+   ${_PROG_MK.${t}} PROG=$p ${x.$p} ${@:E})
 .endfor
 .endfor
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r335612 - head/sbin/dhclient

2018-06-25 Thread Xin LI
On Sun, Jun 24, 2018 at 6:30 PM Eitan Adler  wrote:
>
> Author: eadler
> Date: Mon Jun 25 01:29:54 2018
> New Revision: 335612
> URL: https://svnweb.freebsd.org/changeset/base/335612
>
> Log:
>   dhclient: recorrect __progname to getprogname()
>
>   A more correct way to modernize code that uses __progname is to just
>   replace each occurance of it with a call to getprogname(3)

We should probably take a look at dhcpcd or ISC dhclient and teach
whatever we have chosen sandbox, etc.  The current FreeBSD dhclient is
based on an ancient ISC dhclient fork with enhancements from OpenBSD
(but not being kept up-to-date with OpenBSD) and do not support IPv6,
etc.

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


svn commit: r335642 - head/usr.sbin/config

2018-06-25 Thread Kyle Evans
Author: kevans
Date: Mon Jun 25 17:17:47 2018
New Revision: 335642
URL: https://svnweb.freebsd.org/changeset/base/335642

Log:
  config(8): Add `envvar` support
  
  envvar allows adding individual environment variables to the kernel's static
  environment without the overhead of pulling in a full file. envvar in a
  config looks like:
  
  envvar some_var=5
  
  All envvar-provided variables will be added after the env file is processed,
  so envvar keys that exist in the previous env will be overwritten by
  whatever value is set here in the kernel configuration directly.
  
  As an aside, envvar lines are intentionally tokenized differently from
  basically every other line. We used a named state when ENVVAR is encountered
  to gobble up the rest of the line, which will later be cleaned and validated
  in post-processing by sanitize_envline. This turns out to be the simplest
  and cleanest way to allow the flexibility that kenv does while not
  compromising on silly hacks.
  
  Reviewed by:  ian (also contributor of sanitize_envline rewrite)
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D15962

Modified:
  head/usr.sbin/config/config.5
  head/usr.sbin/config/config.h
  head/usr.sbin/config/config.y
  head/usr.sbin/config/lang.l
  head/usr.sbin/config/main.c
  head/usr.sbin/config/mkmakefile.c

Modified: head/usr.sbin/config/config.5
==
--- head/usr.sbin/config/config.5   Mon Jun 25 16:42:49 2018
(r335641)
+++ head/usr.sbin/config/config.5   Mon Jun 25 17:17:47 2018
(r335642)
@@ -23,7 +23,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd February 21, 2016
+.Dd June 22, 2018
 .Dt CONFIG 5
 .Os
 .Sh NAME
@@ -124,6 +124,20 @@ the compiled-in environment instead, unless the boot e
 This directive is useful for setting kernel tunables in
 embedded environments that do not start from
 .Xr loader 8 .
+.\"  ENVVAR 
+.Pp
+.It Ic envvar Ar setting
+Specifies an individual environment setting to be added to the kernel's
+compiled-in environment.
+.Ar setting
+must be of the form
+.Dq Va name=value .
+Optional quotes are supported in both name and value.
+All environment variables specified with
+.Ic envvar
+will be set after any
+.Ic env
+files are included.
 .\"  FILES 
 .Pp
 .It Ic files Ar filename

Modified: head/usr.sbin/config/config.h
==
--- head/usr.sbin/config/config.h   Mon Jun 25 16:42:49 2018
(r335641)
+++ head/usr.sbin/config/config.h   Mon Jun 25 17:17:47 2018
(r335642)
@@ -140,6 +140,13 @@ struct opt_list {
 
 SLIST_HEAD(, opt_list) otab;
 
+struct envvar {
+   char*env_str;
+   STAILQ_ENTRY(envvar) envvar_next;
+};
+
+STAILQ_HEAD(envvar_head, envvar) envvars;
+
 struct hint {
char*hint_name;
STAILQ_ENTRY(hint) hint_next;

Modified: head/usr.sbin/config/config.y
==
--- head/usr.sbin/config/config.y   Mon Jun 25 16:42:49 2018
(r335641)
+++ head/usr.sbin/config/config.y   Mon Jun 25 17:17:47 2018
(r335642)
@@ -12,6 +12,7 @@
 %token DEVICE
 %token NODEVICE
 %token ENV
+%token ENVVAR
 %token EQUALS
 %token PLUSEQUALS
 %token HINTS
@@ -26,6 +27,7 @@
 %token INCLUDE
 %token FILES
 
+%tokenENVLINE
 %tokenID
 %tokenNUMBER
 
@@ -193,6 +195,15 @@ Config_spec:
env = $2;
envmode = 1;
} |
+   ENVVAR ENVLINE {
+   struct envvar *envvar;
+
+   envvar = (struct envvar *)calloc(1, sizeof (struct envvar));
+   if (envvar == NULL)
+   err(EXIT_FAILURE, "calloc");
+   envvar->env_str = $2;
+   STAILQ_INSERT_TAIL(, envvar, envvar_next);
+   } |
HINTS ID {
struct hint *hint;
 

Modified: head/usr.sbin/config/lang.l
==
--- head/usr.sbin/config/lang.l Mon Jun 25 16:42:49 2018(r335641)
+++ head/usr.sbin/config/lang.l Mon Jun 25 17:17:47 2018(r335642)
@@ -70,6 +70,7 @@ struct kt {
{ "nodevice",   NODEVICE },
{ "nodevices",  NODEVICE },
{ "env",ENV },
+   { "envvar", ENVVAR },
{ "hints",  HINTS },
{ "ident",  IDENT },
{ "machine",ARCH }, /* MACHINE is defined in /sys/param.h */
@@ -105,7 +106,13 @@ int yyerror(const char *);
 ID [A-Za-z_][-A-Za-z_0-9]*
 PATH   [./][-/.%^A-Za-z_0-9]+
 %START TOEOL
+%START ENVC
 %%
+[^#\n]*  {
+   BEGIN 0;
+   yylval.str = strdup(yytext);
+   return ENVLINE;
+   }
 {ID}   {
int i;
 
@@ -115,6 +122,9 @@ PATH[./][-/.%^A-Za-z_0-9]+

svn commit: r335641 - head/contrib/smbfs/lib/smb

2018-06-25 Thread Brooks Davis
Author: brooks
Date: Mon Jun 25 16:42:49 2018
New Revision: 335641
URL: https://svnweb.freebsd.org/changeset/base/335641

Log:
  Fix a stack overflow in mount_smbfs when hostname is too long.
  
  The local hostname was blindly copied into the to the nn_name array.
  When the hostname exceeded 16 bytes, it would overflow.  Truncate the
  hostname to 15 bytes plus a 0 terminator which is the "workstation name"
  suffix.
  
  Use defensive strlcpy() when filling nn_name in all cases.
  
  PR:   228354
  Reported by:  donald.buchh...@intel.com
  Reviewed by:  jpaetzel,  ian (prior version)
  Discussed with:   Security Officer (gtetlow)
  MFC after:3 days
  Security: Stack overflow with the hostname.
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D15936

Modified:
  head/contrib/smbfs/lib/smb/ctx.c
  head/contrib/smbfs/lib/smb/nbns_rq.c

Modified: head/contrib/smbfs/lib/smb/ctx.c
==
--- head/contrib/smbfs/lib/smb/ctx.cMon Jun 25 15:09:55 2018
(r335640)
+++ head/contrib/smbfs/lib/smb/ctx.cMon Jun 25 16:42:49 2018
(r335641)
@@ -549,7 +549,9 @@ smb_ctx_resolve(struct smb_ctx *ctx)
}
nn.nn_scope = ctx->ct_nb->nb_scope;
nn.nn_type = NBT_SERVER;
-   strcpy(nn.nn_name, ssn->ioc_srvname);
+   if (strlen(ssn->ioc_srvname) > NB_NAMELEN)
+   return NBERROR(NBERR_NAMETOOLONG);
+   strlcpy(nn.nn_name, ssn->ioc_srvname, sizeof(nn.nn_name));
error = nb_sockaddr(sap, , );
nb_snbfree(sap);
if (error) {
@@ -565,7 +567,11 @@ smb_ctx_resolve(struct smb_ctx *ctx)
}
nls_str_upper(ctx->ct_locname, ctx->ct_locname);
}
-   strcpy(nn.nn_name, ctx->ct_locname);
+   /*
+* Truncate the local host name to NB_NAMELEN-1 which gives a
+* suffix of 0 which is "workstation name".
+*/
+   strlcpy(nn.nn_name, ctx->ct_locname, NB_NAMELEN);
nn.nn_type = NBT_WKSTA;
nn.nn_scope = ctx->ct_nb->nb_scope;
error = nb_sockaddr(NULL, , );

Modified: head/contrib/smbfs/lib/smb/nbns_rq.c
==
--- head/contrib/smbfs/lib/smb/nbns_rq.cMon Jun 25 15:09:55 2018
(r335640)
+++ head/contrib/smbfs/lib/smb/nbns_rq.cMon Jun 25 16:42:49 2018
(r335641)
@@ -74,7 +74,7 @@ nbns_resolvename(const char *name, struct nb_ctx *ctx,
if (error)
return error;
bzero(, sizeof(nn));
-   strcpy(nn.nn_name, name);
+   strlcpy(nn.nn_name, name, sizeof(nn.nn_name));
nn.nn_scope = ctx->nb_scope;
nn.nn_type = NBT_SERVER;
rqp->nr_nmflags = NBNS_NMFLAG_RD;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r335629 - in head: share/man/man4 sys/dev/vt/hw/vga

2018-06-25 Thread Rodney W. Grimes
> Author: royger
> Date: Mon Jun 25 09:39:16 2018
> New Revision: 335629
> URL: https://svnweb.freebsd.org/changeset/base/335629
> 
> Log:
>   vt: add option to ignore NO_VGA flag in ACPI
>   
>   To workaround buggy firmware that sets this flag when there's actually
>   a VGA present.
>   
>   Reported and tested by: Yasuhiro KIMURA 
>   Sponsored by:   Citrix Systems R
>   Reviewed by:kib
>   Differential revision:  https://reviews.freebsd.org/D16003

It is generally best to avoid double negatives,
couldnt this of been better named?
hw.vga.acp_force_vga

> 
> Modified:
>   head/share/man/man4/vt.4
>   head/sys/dev/vt/hw/vga/vt_vga.c
> 
> Modified: head/share/man/man4/vt.4
> ==
> --- head/share/man/man4/vt.4  Mon Jun 25 09:19:50 2018(r335628)
> +++ head/share/man/man4/vt.4  Mon Jun 25 09:39:16 2018(r335629)
> @@ -44,6 +44,7 @@
>  In
>  .Xr loader.conf 5 :
>  .Cd hw.vga.textmode=1
> +.Cd hw.vga.acpi_ignore_no_vga=1
>  .Cd kern.vty=vt
>  .Cd kern.vt.color..rgb=""
>  .Cd kern.vt.fb.default_mode="x"
> @@ -196,6 +197,10 @@ prompt or in
>  Set to 1 to use virtual terminals in text mode instead of graphics mode.
>  Features that require graphics mode, like loadable fonts, will be
>  disabled.
> +.It Va hw.vga.acpi_ignore_no_vga
> +Set to 1 to force the usage of the VGA driver regardless of whether
> +ACPI IAPC_BOOT_ARCH signals no VGA support.
> +Can be used to workaround firmware bugs in the ACPI tables.
>  .It Va kern.vty
>  Set this value to
>  .Ql vt
> 
> Modified: head/sys/dev/vt/hw/vga/vt_vga.c
> ==
> --- head/sys/dev/vt/hw/vga/vt_vga.c   Mon Jun 25 09:19:50 2018
> (r335628)
> +++ head/sys/dev/vt/hw/vga/vt_vga.c   Mon Jun 25 09:39:16 2018
> (r335629)
> @@ -1217,6 +1217,12 @@ vga_acpi_disabled(void)
>   ACPI_TABLE_FADT *fadt;
>   vm_paddr_t physaddr;
>   uint16_t flags;
> + int ignore;
> +
> + TUNABLE_INT_FETCH("hw.vga.acpi_ignore_no_vga", );
> +
> + if (ignore)
> + return (false);
>  
>   physaddr = acpi_find_table(ACPI_SIG_FADT);
>   if (physaddr == 0)
> 
> 

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


Re: svn commit: r334329 - head/sys/arm64/arm64

2018-06-25 Thread Andrew Turner
I’ve not seen this on the ThunderX2 I have access to with the latest firmware. 
You’ll need to find out why the kernel is trying to access the memory, and 
where it is in the EFI memory map.

Andrew

> On 21 Jun 2018, at 13:41, Patryk Duda  wrote:
> 
> Hi,
> 
> I'm trying to boot kernel on ThunderX2 but I've got following error:
> 
> panic: efi_init: PA out of range, PA: 0xfafd0018
> 
> This error comes from PHYS_TO_DMAP macro.
> I can workaround this issue by disabling EFI Runtime Services in
> kernel config but it seems to be
> a problem with discontignous DMAP mapping.
> 
> 
> 2018-05-29 15:52 GMT+02:00 Andrew Turner :
>> Author: andrew
>> Date: Tue May 29 13:52:25 2018
>> New Revision: 334329
>> URL: https://svnweb.freebsd.org/changeset/base/334329
>> 
>> Log:
>>  On ThunderX2 we need to be careful to only map the memory the firmware
>>  lists in the EFI memory map. As such we need to reduce the mappings to
>>  restrict them to not be the full 1G block. For now reduce this to a 2M
>>  block, however this may be further restricted to be 4k page aligned as
>>  other SoCs may require.
>> 
>>  This allows ThunderX2 to boot reliably to userspace without performing
>>  any speculative memory accesses to invalid physical memory.
>> 
>>  This is a recommit of r334035 now that we can access the EFI Runtime data
>>  through the DMAP region.
>> 
>>  Tested by:tuexen
>>  Sponsored by: DARPA, AFRL
>> 
>> Modified:
>>  head/sys/arm64/arm64/pmap.c
>> 
>> Modified: head/sys/arm64/arm64/pmap.c
>> ==
>> --- head/sys/arm64/arm64/pmap.c Tue May 29 13:43:16 2018(r334328)
>> +++ head/sys/arm64/arm64/pmap.c Tue May 29 13:52:25 2018(r334329)
>> @@ -590,33 +590,100 @@ pmap_early_vtophys(vm_offset_t l1pt, vm_offset_t va)
>>return ((l2[l2_slot] & ~ATTR_MASK) + (va & L2_OFFSET));
>> }
>> 
>> -static void
>> -pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t min_pa, vm_paddr_t 
>> max_pa)
>> +static vm_offset_t
>> +pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t min_pa,
>> +vm_offset_t freemempos)
>> {
>> +   pt_entry_t *l2;
>>vm_offset_t va;
>> -   vm_paddr_t pa;
>> -   u_int l1_slot;
>> +   vm_paddr_t l2_pa, pa;
>> +   u_int l1_slot, l2_slot, prev_l1_slot;
>>int i;
>> 
>>dmap_phys_base = min_pa & ~L1_OFFSET;
>>dmap_phys_max = 0;
>>dmap_max_addr = 0;
>> +   l2 = NULL;
>> +   prev_l1_slot = -1;
>> 
>> +#defineDMAP_TABLES ((DMAP_MAX_ADDRESS - DMAP_MIN_ADDRESS) >> 
>> L0_SHIFT)
>> +   memset(pagetable_dmap, 0, PAGE_SIZE * DMAP_TABLES);
>> +
>>for (i = 0; i < (physmap_idx * 2); i += 2) {
>> -   pa = physmap[i] & ~L1_OFFSET;
>> +   pa = physmap[i] & ~L2_OFFSET;
>>va = pa - dmap_phys_base + DMAP_MIN_ADDRESS;
>> 
>> -   for (; va < DMAP_MAX_ADDRESS && pa < physmap[i + 1];
>> +   /* Create L2 mappings at the start of the region */
>> +   if ((pa & L1_OFFSET) != 0) {
>> +   l1_slot = ((va - DMAP_MIN_ADDRESS) >> L1_SHIFT);
>> +   if (l1_slot != prev_l1_slot) {
>> +   prev_l1_slot = l1_slot;
>> +   l2 = (pt_entry_t *)freemempos;
>> +   l2_pa = pmap_early_vtophys(kern_l1,
>> +   (vm_offset_t)l2);
>> +   freemempos += PAGE_SIZE;
>> +
>> +   pmap_load_store(_dmap[l1_slot],
>> +   (l2_pa & ~Ln_TABLE_MASK) | L1_TABLE);
>> +
>> +   memset(l2, 0, PAGE_SIZE);
>> +   }
>> +   KASSERT(l2 != NULL,
>> +   ("pmap_bootstrap_dmap: NULL l2 map"));
>> +   for (; va < DMAP_MAX_ADDRESS && pa < physmap[i + 1];
>> +   pa += L2_SIZE, va += L2_SIZE) {
>> +   /*
>> +* We are on a boundary, stop to
>> +* create a level 1 block
>> +*/
>> +   if ((pa & L1_OFFSET) == 0)
>> +   break;
>> +
>> +   l2_slot = pmap_l2_index(va);
>> +   KASSERT(l2_slot != 0, ("..."));
>> +   pmap_load_store([l2_slot],
>> +   (pa & ~L2_OFFSET) | ATTR_DEFAULT | 
>> ATTR_XN |
>> +   ATTR_IDX(CACHED_MEMORY) | L2_BLOCK);
>> +   }
>> +   KASSERT(va == (pa - dmap_phys_base + 
>> DMAP_MIN_ADDRESS),
>> +   ("..."));
>> +   }
>> +
>> +   for (; va < DMAP_MAX_ADDRESS && pa < physmap[i + 1] &&
>> +   (physmap[i + 1] - 

svn commit: r335640 - in stable/11: contrib/libpcap contrib/libpcap/ChmodBPF contrib/libpcap/Win32 contrib/libpcap/Win32/Prj contrib/libpcap/cmake contrib/libpcap/cmake/Modules contrib/libpcap/lbl ...

2018-06-25 Thread Hans Petter Selasky
Author: hselasky
Date: Mon Jun 25 15:09:55 2018
New Revision: 335640
URL: https://svnweb.freebsd.org/changeset/base/335640

Log:
  MFC r334277, r334376, r334378 and r334418:
  
  MFV r333789: libpcap 1.9.0 (pre-release)
  
  - Update local copy of dlt.h with new DLT types.
  
  Sponsored by: Mellanox Technologies

Added:
  stable/11/contrib/libpcap/CHANGES
  stable/11/contrib/libpcap/CMakeLists.txt   (contents, props changed)
  stable/11/contrib/libpcap/CONTRIBUTING
  stable/11/contrib/libpcap/CREDITS
  stable/11/contrib/libpcap/ChmodBPF/
  stable/11/contrib/libpcap/ChmodBPF/ChmodBPF   (contents, props changed)
  stable/11/contrib/libpcap/ChmodBPF/StartupParameters.plist
  stable/11/contrib/libpcap/INSTALL.txt   (contents, props changed)
  stable/11/contrib/libpcap/LICENSE
  stable/11/contrib/libpcap/Makefile-devel-adds   (contents, props changed)
  stable/11/contrib/libpcap/Makefile.in   (contents, props changed)
  stable/11/contrib/libpcap/README
  stable/11/contrib/libpcap/README.Win32
  stable/11/contrib/libpcap/README.aix
  stable/11/contrib/libpcap/README.dag
  stable/11/contrib/libpcap/README.hpux
  stable/11/contrib/libpcap/README.linux
  stable/11/contrib/libpcap/README.macos
  stable/11/contrib/libpcap/README.septel
  stable/11/contrib/libpcap/README.sita
  stable/11/contrib/libpcap/README.tru64
  stable/11/contrib/libpcap/TODO
  stable/11/contrib/libpcap/VERSION
  stable/11/contrib/libpcap/Win32/
  stable/11/contrib/libpcap/Win32/Prj/
  stable/11/contrib/libpcap/Win32/Prj/wpcap.sln
  stable/11/contrib/libpcap/Win32/Prj/wpcap.vcxproj
  stable/11/contrib/libpcap/Win32/Prj/wpcap.vcxproj.filters
  stable/11/contrib/libpcap/aclocal.m4
  stable/11/contrib/libpcap/arcnet.h   (contents, props changed)
  stable/11/contrib/libpcap/atmuni31.h   (contents, props changed)
  stable/11/contrib/libpcap/bpf_dump.c   (contents, props changed)
  stable/11/contrib/libpcap/bpf_filter.c   (contents, props changed)
  stable/11/contrib/libpcap/bpf_image.c   (contents, props changed)
  stable/11/contrib/libpcap/chmod_bpf   (contents, props changed)
  stable/11/contrib/libpcap/cmake/
  stable/11/contrib/libpcap/cmake/Modules/
  stable/11/contrib/libpcap/cmake/Modules/FindDAG.cmake
  stable/11/contrib/libpcap/cmake/Modules/FindFseeko.cmake
  stable/11/contrib/libpcap/cmake/Modules/FindLFS.cmake
  stable/11/contrib/libpcap/cmake/Modules/FindPacket.cmake
  stable/11/contrib/libpcap/cmake/Modules/FindPthreads-w32.cmake
  stable/11/contrib/libpcap/cmake/Modules/FindSNF.cmake
  stable/11/contrib/libpcap/cmake/Modules/FindTC.cmake
  stable/11/contrib/libpcap/cmake/have_siocglifconf.c   (contents, props 
changed)
  stable/11/contrib/libpcap/cmake_uninstall.cmake.in   (contents, props changed)
  stable/11/contrib/libpcap/cmakeconfig.h.in   (contents, props changed)
  stable/11/contrib/libpcap/config.guess   (contents, props changed)
  stable/11/contrib/libpcap/config.h.in   (contents, props changed)
  stable/11/contrib/libpcap/config.sub   (contents, props changed)
  stable/11/contrib/libpcap/configure   (contents, props changed)
  stable/11/contrib/libpcap/configure.ac
  stable/11/contrib/libpcap/diag-control.h   (contents, props changed)
  stable/11/contrib/libpcap/dlpisubs.c   (contents, props changed)
  stable/11/contrib/libpcap/dlpisubs.h   (contents, props changed)
  stable/11/contrib/libpcap/etherent.c   (contents, props changed)
  stable/11/contrib/libpcap/ethertype.h   (contents, props changed)
  stable/11/contrib/libpcap/extract.h   (contents, props changed)
  stable/11/contrib/libpcap/fad-getad.c   (contents, props changed)
  stable/11/contrib/libpcap/fad-gifc.c   (contents, props changed)
  stable/11/contrib/libpcap/fad-glifc.c   (contents, props changed)
  stable/11/contrib/libpcap/fmtutils.c   (contents, props changed)
  stable/11/contrib/libpcap/fmtutils.h   (contents, props changed)
  stable/11/contrib/libpcap/ftmacros.h   (contents, props changed)
  stable/11/contrib/libpcap/gencode.c   (contents, props changed)
  stable/11/contrib/libpcap/gencode.h   (contents, props changed)
  stable/11/contrib/libpcap/grammar.y
  stable/11/contrib/libpcap/ieee80211.h   (contents, props changed)
  stable/11/contrib/libpcap/install-sh   (contents, props changed)
  stable/11/contrib/libpcap/lbl/
  stable/11/contrib/libpcap/lbl/os-aix4.h   (contents, props changed)
  stable/11/contrib/libpcap/lbl/os-aix7.h   (contents, props changed)
  stable/11/contrib/libpcap/lbl/os-hpux11.h   (contents, props changed)
  stable/11/contrib/libpcap/lbl/os-osf4.h   (contents, props changed)
  stable/11/contrib/libpcap/lbl/os-osf5.h   (contents, props changed)
  stable/11/contrib/libpcap/lbl/os-solaris2.h   (contents, props changed)
  stable/11/contrib/libpcap/lbl/os-sunos4.h   (contents, props changed)
  stable/11/contrib/libpcap/lbl/os-ultrix4.h   (contents, props changed)
  stable/11/contrib/libpcap/libpcap.pc.in   (contents, props changed)
  stable/11/contrib/libpcap/llc.h   (contents, props changed)
  stable/11/contrib/libpcap/missing/
  

Re: svn commit: r334329 - head/sys/arm64/arm64

2018-06-25 Thread Patryk Duda
Any updates?

2018-06-21 14:41 GMT+02:00 Patryk Duda :
> Hi,
>
> I'm trying to boot kernel on ThunderX2 but I've got following error:
>
> panic: efi_init: PA out of range, PA: 0xfafd0018
>
> This error comes from PHYS_TO_DMAP macro.
> I can workaround this issue by disabling EFI Runtime Services in
> kernel config but it seems to be
> a problem with discontignous DMAP mapping.
>
>
> 2018-05-29 15:52 GMT+02:00 Andrew Turner :
>> Author: andrew
>> Date: Tue May 29 13:52:25 2018
>> New Revision: 334329
>> URL: https://svnweb.freebsd.org/changeset/base/334329
>>
>> Log:
>>   On ThunderX2 we need to be careful to only map the memory the firmware
>>   lists in the EFI memory map. As such we need to reduce the mappings to
>>   restrict them to not be the full 1G block. For now reduce this to a 2M
>>   block, however this may be further restricted to be 4k page aligned as
>>   other SoCs may require.
>>
>>   This allows ThunderX2 to boot reliably to userspace without performing
>>   any speculative memory accesses to invalid physical memory.
>>
>>   This is a recommit of r334035 now that we can access the EFI Runtime data
>>   through the DMAP region.
>>
>>   Tested by:tuexen
>>   Sponsored by: DARPA, AFRL
>>
>> Modified:
>>   head/sys/arm64/arm64/pmap.c
>>
>> Modified: head/sys/arm64/arm64/pmap.c
>> ==
>> --- head/sys/arm64/arm64/pmap.c Tue May 29 13:43:16 2018(r334328)
>> +++ head/sys/arm64/arm64/pmap.c Tue May 29 13:52:25 2018(r334329)
>> @@ -590,33 +590,100 @@ pmap_early_vtophys(vm_offset_t l1pt, vm_offset_t va)
>> return ((l2[l2_slot] & ~ATTR_MASK) + (va & L2_OFFSET));
>>  }
>>
>> -static void
>> -pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t min_pa, vm_paddr_t 
>> max_pa)
>> +static vm_offset_t
>> +pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t min_pa,
>> +vm_offset_t freemempos)
>>  {
>> +   pt_entry_t *l2;
>> vm_offset_t va;
>> -   vm_paddr_t pa;
>> -   u_int l1_slot;
>> +   vm_paddr_t l2_pa, pa;
>> +   u_int l1_slot, l2_slot, prev_l1_slot;
>> int i;
>>
>> dmap_phys_base = min_pa & ~L1_OFFSET;
>> dmap_phys_max = 0;
>> dmap_max_addr = 0;
>> +   l2 = NULL;
>> +   prev_l1_slot = -1;
>>
>> +#defineDMAP_TABLES ((DMAP_MAX_ADDRESS - DMAP_MIN_ADDRESS) >> 
>> L0_SHIFT)
>> +   memset(pagetable_dmap, 0, PAGE_SIZE * DMAP_TABLES);
>> +
>> for (i = 0; i < (physmap_idx * 2); i += 2) {
>> -   pa = physmap[i] & ~L1_OFFSET;
>> +   pa = physmap[i] & ~L2_OFFSET;
>> va = pa - dmap_phys_base + DMAP_MIN_ADDRESS;
>>
>> -   for (; va < DMAP_MAX_ADDRESS && pa < physmap[i + 1];
>> +   /* Create L2 mappings at the start of the region */
>> +   if ((pa & L1_OFFSET) != 0) {
>> +   l1_slot = ((va - DMAP_MIN_ADDRESS) >> L1_SHIFT);
>> +   if (l1_slot != prev_l1_slot) {
>> +   prev_l1_slot = l1_slot;
>> +   l2 = (pt_entry_t *)freemempos;
>> +   l2_pa = pmap_early_vtophys(kern_l1,
>> +   (vm_offset_t)l2);
>> +   freemempos += PAGE_SIZE;
>> +
>> +   pmap_load_store(_dmap[l1_slot],
>> +   (l2_pa & ~Ln_TABLE_MASK) | L1_TABLE);
>> +
>> +   memset(l2, 0, PAGE_SIZE);
>> +   }
>> +   KASSERT(l2 != NULL,
>> +   ("pmap_bootstrap_dmap: NULL l2 map"));
>> +   for (; va < DMAP_MAX_ADDRESS && pa < physmap[i + 1];
>> +   pa += L2_SIZE, va += L2_SIZE) {
>> +   /*
>> +* We are on a boundary, stop to
>> +* create a level 1 block
>> +*/
>> +   if ((pa & L1_OFFSET) == 0)
>> +   break;
>> +
>> +   l2_slot = pmap_l2_index(va);
>> +   KASSERT(l2_slot != 0, ("..."));
>> +   pmap_load_store([l2_slot],
>> +   (pa & ~L2_OFFSET) | ATTR_DEFAULT | 
>> ATTR_XN |
>> +   ATTR_IDX(CACHED_MEMORY) | L2_BLOCK);
>> +   }
>> +   KASSERT(va == (pa - dmap_phys_base + 
>> DMAP_MIN_ADDRESS),
>> +   ("..."));
>> +   }
>> +
>> +   for (; va < DMAP_MAX_ADDRESS && pa < physmap[i + 1] &&
>> +   (physmap[i + 1] - pa) >= L1_SIZE;
>> pa += L1_SIZE, va += L1_SIZE) {
>> l1_slot = ((va - DMAP_MIN_ADDRESS) >> L1_SHIFT);
>> -   /* We already 

Re: svn commit: r333590 - head/share/man/man9

2018-06-25 Thread Matthew Macy
On Mon, Jun 25, 2018 at 01:30 Andriy Gapon  wrote:

> On 25/06/2018 10:25, Ed Schouten wrote:
> > Hi Andriy, Matthew,
> >
> > 2018-06-24 23:36 GMT+02:00 Andriy Gapon :
> >> Perhaps a little application of google can help.
> >> [keywords: epoch based reclamation]
> >
> > Based on the man page, it wasn't clear that this refers to a generally
> > accepted construct or something that is specific to FreeBSD. Any
> > objections if I were to extend the man page as follows?
>
> Certainly not from me.
> Also, given that epoch(9) is a wrapper around (or based on) the
> implementation
> provided by Concurrency Kit, maybe we should have some kind of a gateway
> manual
> page for the latter.  That page would provide an introduction to
> Concurrency Kit
> and links to its resources.  Then epoch.9 could reference it.
>


There are man pages included with CK. Certain ports install them. For
reasons that he no longer recalls cognet chose to not install them. You'll
need to discuss it with him.

-M



> > Index: epoch.9
> > ===
> > --- epoch.9 (revision 335613)
> > +++ epoch.9 (working copy)
> > @@ -39,7 +39,7 @@
> >  .Nm epoch_wait ,
> >  .Nm epoch_call ,
> >  .Nm in_epoch ,
> > -.Nd kernel epoch based reclamation
> > +.Nd kernel Epoch Based Reclamation (EBR)
> >  .Sh SYNOPSIS
> >  .In sys/param.h
> >  .In sys/proc.h
> > @@ -191,3 +191,10 @@
> >  .Xr sleep 9 ,
> >  .Xr sx 9 ,
> >  .Xr timeout 9
> > +.Rs
> > +.%A K. Fraser
> > +.%T Practical lock-freedom
> > +.%D February 2004
> > +.%P 79-81
> > +.%U https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-579.pdf
> > +.Re
> >
>
>
> --
> Andriy Gapon
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r335579 - head/sys/vm

2018-06-25 Thread Slawa Olhovchenkov
On Sat, Jun 23, 2018 at 08:10:10AM +, Jeff Roberson wrote:

> Author: jeff
> Date: Sat Jun 23 08:10:09 2018
> New Revision: 335579
> URL: https://svnweb.freebsd.org/changeset/base/335579
> 
> Log:
>   Sort uma_zone fields according to 64 byte cache line with adjacent line
>   prefetch on 64bit architectures.  Prior to this, two lines were needed
>   for the fast path and each line may fetch an unused adjacent neighbor.
>- Move fields used by the fast path into a single line.
>- Move constants into the adjacent line which is mostly used for
>  the spare bucket alloc 'medium path'.
>- Unpad the mtx which is only used by the fast path and place it in
>  a line with rarely used data.  This aligns the cachelines better and
>  eliminates 128 bytes of wasted space.
>   
>   This gives a 45% improvement on a will-it-scale test on a 24 core machine.

Can this commint mergered to stable/11? Or this commit depends on other commits?
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335639 - head/sys/arm64/linux

2018-06-25 Thread Ed Maste
Author: emaste
Date: Mon Jun 25 14:12:33 2018
New Revision: 335639
URL: https://svnweb.freebsd.org/changeset/base/335639

Log:
  Initial arm64 linuxulator linux_sysvec
  
  This is sufficient to run Linux arm64 'hello world' and other simple
  binaries.
  
  Reviewed by:  andrew
  Sponsored by: Turing Robotic Industries
  Differential Revision:https://reviews.freebsd.org/D15834

Added:
  head/sys/arm64/linux/linux_sysvec.c   (contents, props changed)

Added: head/sys/arm64/linux/linux_sysvec.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/arm64/linux/linux_sysvec.c Mon Jun 25 14:12:33 2018
(r335639)
@@ -0,0 +1,563 @@
+/*-
+ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ *
+ * Copyright (c) 1994-1996 Søren Schmidt
+ * Copyright (c) 2018 Turing Robotic Industries Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+MODULE_VERSION(linux64elf, 1);
+
+#if defined(DEBUG)
+SYSCTL_PROC(_compat_linux, OID_AUTO, debug, CTLTYPE_STRING | CTLFLAG_RW, 0, 0,
+linux_sysctl_debug, "A", "64-bit Linux debugging control");
+#endif
+
+const char *linux_kplatform;
+static int linux_szsigcode;
+static vm_object_t linux_shared_page_obj;
+static char *linux_shared_page_mapping;
+extern char _binary_linux_locore_o_start;
+extern char _binary_linux_locore_o_end;
+
+extern struct sysent linux_sysent[LINUX_SYS_MAXSYSCALL];
+
+SET_DECLARE(linux_ioctl_handler_set, struct linux_ioctl_handler);
+
+static register_t *linux_copyout_strings(struct image_params *imgp);
+static int linux_elf_fixup(register_t **stack_base,
+   struct image_params *iparams);
+static boollinux_trans_osrel(const Elf_Note *note, int32_t *osrel);
+static voidlinux_vdso_install(const void *param);
+static voidlinux_vdso_deinstall(const void *param);
+static voidlinux_set_syscall_retval(struct thread *td, int error);
+static int linux_fetch_syscall_args(struct thread *td);
+static voidlinux_exec_setregs(struct thread *td, struct image_params *imgp,
+   u_long stack);
+static int linux_vsyscall(struct thread *td);
+
+/* DTrace init */
+LIN_SDT_PROVIDER_DECLARE(LINUX_DTRACE);
+
+/* DTrace probes */
+LIN_SDT_PROBE_DEFINE2(sysvec, linux_translate_traps, todo, "int", "int");
+LIN_SDT_PROBE_DEFINE0(sysvec, linux_exec_setregs, todo);
+LIN_SDT_PROBE_DEFINE0(sysvec, linux_elf_fixup, todo);
+LIN_SDT_PROBE_DEFINE0(sysvec, linux_rt_sigreturn, todo);
+LIN_SDT_PROBE_DEFINE0(sysvec, linux_rt_sendsig, todo);
+LIN_SDT_PROBE_DEFINE0(sysvec, linux_vsyscall, todo);
+LIN_SDT_PROBE_DEFINE0(sysvec, linux_vdso_install, todo);
+LIN_SDT_PROBE_DEFINE0(sysvec, linux_vdso_deinstall, todo);
+
+/* LINUXTODO: do we have traps to translate? */
+static int
+linux_translate_traps(int signal, int trap_code)
+{
+
+   LIN_SDT_PROBE2(sysvec, linux_translate_traps, todo, signal, trap_code);
+   return (signal);
+}
+
+LINUX_VDSO_SYM_CHAR(linux_platform);
+
+static int
+linux_fetch_syscall_args(struct thread *td)
+{
+   struct proc *p;
+   struct syscall_args *sa;
+   register_t *ap;
+
+   p = td->td_proc;
+   ap = td->td_frame->tf_x;
+   sa = >td_sa;
+
+   sa->code = td->td_frame->tf_x[8];
+   /* LINUXTODO: generic syscall? */
+   if (p->p_sysent->sv_mask)
+   sa->code &= p->p_sysent->sv_mask;
+ 

Re: svn commit: r335171 - head/sys/vm

2018-06-25 Thread Konstantin Belousov
On Mon, Jun 25, 2018 at 06:30:20AM -0400, Mark Johnston wrote:
> On Fri, Jun 15, 2018 at 02:03:03PM +0300, Konstantin Belousov wrote:
> > On Fri, Jun 15, 2018 at 11:03:06AM +0100, Steven Hartland wrote:
> > > On 15/06/2018 00:07, Alan Cox wrote:
> > > >
> > > >> On Jun 14, 2018, at 5:54 PM, Steven Hartland 
> > > >>  > > >> > wrote:
> > > >>
> > > >> Out of interest, how would this exhibit itself?
> > > >>
> > > >
> > > > A panic in vm_page_insert_after().
> > > >
> > > So just to confirm this couldn't cause random memory corruption of the 
> > > parent process?
> > 
> > No, or to put it more sincere, I highly doubt it.
> > 
> > Also, I do not think that this Go issue will be solved serendipitously
> > by some FreeBSD bug fix.  So far it is indicative that either the
> > situation is too unique for the Go runtime so it is not exposed by other
> > programs (which is quite doubtful), or this is a bug in Go runtime.
> > 
> > The only way forward is to understand what exactly is broken for the
> > situation.  This requires at least deep knowledge the Go garbage collector
> > internal working, which itself supposes understanding of the Go runtime
> > and Go environment.  I do not mean explanation of the assert, but the
> > root cause that eventually triggers the assert.  They are somewhat
> > disjoint in time, I believe.
> 
> Is this problem summarized anywhere?  In particular, is there a
> reasonably minimal test case that reproduces the problem?
Go bug report has the reproducer.  I do not remember if this is the
same snippet that I used.
https://github.com/golang/go/issues/15658

When I looked at it, it took tens of minutes to trigger on sandy bridge
machine.  Note that recent reporters indicate that they need to run the
test for a whole day.  It might be that there are more then one issues,
and some of them are fixed.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335637 - head/usr.bin/rup

2018-06-25 Thread Eitan Adler
Author: eadler
Date: Mon Jun 25 11:44:53 2018
New Revision: 335637
URL: https://svnweb.freebsd.org/changeset/base/335637

Log:
  rup: compile with WARNS=6

Modified:
  head/usr.bin/rup/Makefile
  head/usr.bin/rup/rup.c

Modified: head/usr.bin/rup/Makefile
==
--- head/usr.bin/rup/Makefile   Mon Jun 25 11:44:41 2018(r335636)
+++ head/usr.bin/rup/Makefile   Mon Jun 25 11:44:53 2018(r335637)
@@ -2,7 +2,8 @@
 
 PROG=  rup
 
-WARNS?=3
 LIBADD=rpcsvc
+
+NO_WCAST_ALIGN=# Size is explicitly handled
 
 .include 

Modified: head/usr.bin/rup/rup.c
==
--- head/usr.bin/rup/rup.c  Mon Jun 25 11:44:41 2018(r335636)
+++ head/usr.bin/rup/rup.c  Mon Jun 25 11:44:53 2018(r335637)
@@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$");
 
 #define HOST_WIDTH 15
 
-struct host_list {
+static struct host_list {
struct host_list *next;
struct in_addr addr;
 } *hosts;
@@ -93,7 +93,7 @@ remember_host(struct in_addr addr)
 }
 
 static bool_t
-rstat_reply(caddr_t replyp, struct sockaddr_in *raddrp)
+rstat_reply(statstime *host_stat, struct sockaddr_in *raddrp)
 {
struct tm *tmp_time;
struct tm host_time;
@@ -102,7 +102,6 @@ rstat_reply(caddr_t replyp, struct sockaddr_in *raddrp
char hours_buf[16];
struct hostent *hp;
char *host;
-   statstime *host_stat = (statstime *)replyp;
time_t tmp_time_t;
 
if (search_host(raddrp->sin_addr))
@@ -207,7 +206,7 @@ onehost(char *host)
}
 
addr.sin_addr.s_addr = *(int *)hp->h_addr;
-   rstat_reply((caddr_t)_stat, );
+   rstat_reply(_stat, );
clnt_destroy(rstat_clnt);
return (0);
 }
@@ -242,7 +241,6 @@ main(int argc, char *argv[])
switch (ch) {
default:
usage();
-   /*NOTREACHED*/
}
 
setlinebuf(stdout);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335638 - head/usr.bin/rusers

2018-06-25 Thread Eitan Adler
Author: eadler
Date: Mon Jun 25 11:44:56 2018
New Revision: 335638
URL: https://svnweb.freebsd.org/changeset/base/335638

Log:
  rusers: modernize a bit

Modified:
  head/usr.bin/rusers/rusers.c

Modified: head/usr.bin/rusers/rusers.c
==
--- head/usr.bin/rusers/rusers.cMon Jun 25 11:44:53 2018
(r335637)
+++ head/usr.bin/rusers/rusers.cMon Jun 25 11:44:56 2018
(r335638)
@@ -94,9 +94,9 @@ remember_host(struct in_addr addr)
 }
 
 static int
-rusers_reply(caddr_t replyp, struct sockaddr_in *raddrp)
+rusers_reply(void *replyp, struct sockaddr_in *raddrp)
 {
-   u_int x;
+   unsigned int x;
int idle;
char date[32], idle_time[64], remote[64];
struct hostent *hp;
@@ -190,14 +190,14 @@ onehost(char *host)
if (rusers_clnt == NULL)
errx(1, "%s", clnt_spcreateerror(""));
 
-   bzero((char *), sizeof(up));
+   memset(, 0, sizeof(up));
tv.tv_sec = 15; /* XXX ?? */
tv.tv_usec = 0;
if (clnt_call(rusers_clnt, RUSERSPROC_NAMES, (xdrproc_t)xdr_void, NULL,
(xdrproc_t)xdr_utmpidlearr, , tv) != RPC_SUCCESS)
errx(1, "%s", clnt_sperror(rusers_clnt, ""));
memcpy(_addr.s_addr, hp->h_addr, sizeof(addr.sin_addr.s_addr));
-   rusers_reply((caddr_t), );
+   rusers_reply(, );
clnt_destroy(rusers_clnt);
 }
 
@@ -207,7 +207,7 @@ allhosts(void)
utmpidlearr up;
enum clnt_stat clnt_stat;
 
-   bzero((char *), sizeof(up));
+   memset(, 0, sizeof(up));
clnt_stat = clnt_broadcast(RUSERSPROG, RUSERSVERS_IDLE,
RUSERSPROC_NAMES, (xdrproc_t)xdr_void, NULL,
(xdrproc_t)xdr_utmpidlearr, (char *),
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335636 - in head: lib/libcasper/libcasper usr.bin/users

2018-06-25 Thread Eitan Adler
Author: eadler
Date: Mon Jun 25 11:44:41 2018
New Revision: 335636
URL: https://svnweb.freebsd.org/changeset/base/335636

Log:
  users(1): Use capsicum helpers for users
  
  In doing so also fix the libcasper.h header to work in C++.

Modified:
  head/lib/libcasper/libcasper/libcasper.h
  head/usr.bin/users/users.cc

Modified: head/lib/libcasper/libcasper/libcasper.h
==
--- head/lib/libcasper/libcasper/libcasper.hMon Jun 25 11:29:04 2018
(r335635)
+++ head/lib/libcasper/libcasper/libcasper.hMon Jun 25 11:44:41 2018
(r335636)
@@ -105,7 +105,7 @@ cap_init(void)
 {
cap_channel_t *chan;
 
-   chan = malloc(sizeof(*chan));
+   chan = (cap_channel_t *)malloc(sizeof(*chan));
if (chan != NULL) {
chan->cch_fd = -1;
}

Modified: head/usr.bin/users/users.cc
==
--- head/usr.bin/users/users.cc Mon Jun 25 11:29:04 2018(r335635)
+++ head/usr.bin/users/users.cc Mon Jun 25 11:44:41 2018(r335636)
@@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -56,7 +57,7 @@ main(int argc, char **)
 
setutxent();
 
-   if (cap_enter() < 0 && errno != ENOSYS)
+   if (caph_enter())
err(1, "Failed to enter capability mode.");
 
while ((ut = getutxent()) != NULL)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r335632 - in head/sys: dev/vt/hw/vga x86/include x86/isa x86/x86

2018-06-25 Thread Konstantin Belousov
On Mon, Jun 25, 2018 at 02:22:30PM +0300, Andriy Gapon wrote:
> On 25/06/2018 14:01, Konstantin Belousov wrote:
> > Modified: head/sys/x86/x86/cpu_machdep.c
> > ==
> > --- head/sys/x86/x86/cpu_machdep.c  Mon Jun 25 10:52:41 2018
> > (r335631)
> > +++ head/sys/x86/x86/cpu_machdep.c  Mon Jun 25 11:01:12 2018
> > (r335632)
> 
> Maybe acpi_machdep.c or some other file under x86/acpica would be better...
I do not want to create a file for single 10-line function.  I considered
it and decided that this is silly.

If you have plans for the other content, then sys/x86/acpi/acpi_machdep.c
or similar may be a good idea indeed.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335635 - head/sys/amd64/include

2018-06-25 Thread Konstantin Belousov
Author: kib
Date: Mon Jun 25 11:29:04 2018
New Revision: 335635
URL: https://svnweb.freebsd.org/changeset/base/335635

Log:
  Do not leave stray qword on top of stack for interrupts and exceptions
  without error code.  Doing so it mis-aligned the stack.
  
  Since the only consumer of the SSE instructions with the alignment
  requirements is AES-NI module, and since the FPU context cannot be
  accessed in interrupts, the only situation where the alignment matter
  are the compat32 syscalls, as reported in the PR.
  
  PR:   229222
  Reported and tested by:dewa...@heuristicsystems.com.au
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

Modified:
  head/sys/amd64/include/asmacros.h

Modified: head/sys/amd64/include/asmacros.h
==
--- head/sys/amd64/include/asmacros.h   Mon Jun 25 11:24:26 2018
(r335634)
+++ head/sys/amd64/include/asmacros.h   Mon Jun 25 11:29:04 2018
(r335635)
@@ -187,7 +187,7 @@
movqPCPU(KCR3),%rax
movq%rax,%cr3
movqPCPU(RSP0),%rax
-   subq$PTI_SIZE,%rax
+   subq$PTI_SIZE - 8 * (1 - \has_err),%rax
MOVE_STACKS ((PTI_SIZE / 8) - 1 + \has_err)
movq%rax,%rsp
popq%rdx
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335634 - head/sys/x86/x86

2018-06-25 Thread Konstantin Belousov
Author: kib
Date: Mon Jun 25 11:24:26 2018
New Revision: 335634
URL: https://svnweb.freebsd.org/changeset/base/335634

Log:
  Do not access ISA timer if BIOS reports that there is no legacy
  devices present.
  
  On at least one machine where it would matter since the ISA timer is
  power gated when booted in the UEFI mode, BIOS still reports that the
  legacy devices are present.  That is, user still have to manually
  disable TSC calibration on such machines.  Hopefully it will be more
  useful in the future.
  
  Discussed with:   Ben Widawsky 
  Reviewed by:  royger
  Sponsored by: The FreeBSD Foundation
  Differential revision:https://reviews.freebsd.org/D16004
  MFC after:1 week

Modified:
  head/sys/x86/x86/tsc.c

Modified: head/sys/x86/x86/tsc.c
==
--- head/sys/x86/x86/tsc.c  Mon Jun 25 11:12:21 2018(r335633)
+++ head/sys/x86/x86/tsc.c  Mon Jun 25 11:24:26 2018(r335634)
@@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include "cpufreq_if.h"
 
@@ -81,8 +82,9 @@ SYSCTL_INT(_machdep, OID_AUTO, disable_tsc, CTLFLAG_RD
 "Disable x86 Time Stamp Counter");
 
 static int tsc_skip_calibration;
-SYSCTL_INT(_machdep, OID_AUTO, disable_tsc_calibration, CTLFLAG_RDTUN,
-_skip_calibration, 0, "Disable TSC frequency calibration");
+SYSCTL_INT(_machdep, OID_AUTO, disable_tsc_calibration, CTLFLAG_RDTUN |
+CTLFLAG_NOFETCH, _skip_calibration, 0,
+"Disable TSC frequency calibration");
 
 static void tsc_freq_changed(void *arg, const struct cf_level *level,
 int status);
@@ -213,6 +215,7 @@ probe_tsc_freq(void)
 {
u_int regs[4];
uint64_t tsc1, tsc2;
+   uint16_t bootflags;
 
if (cpu_high >= 6) {
do_cpuid(6, regs);
@@ -272,6 +275,25 @@ probe_tsc_freq(void)
break;
}
 
+   if (!TUNABLE_INT_FETCH("machdep.disable_tsc_calibration",
+   _skip_calibration)) {
+   /*
+* User did not give the order about calibration.
+* If he did, we do not try to guess.
+*
+* Otherwise, if ACPI FADT reports that the platform
+* is legacy-free and CPUID provides TSC frequency,
+* use it.  The calibration could fail anyway since
+* ISA timer can be absent or power gated.
+*/
+   if (acpi_get_fadt_bootflags() &&
+   (bootflags & ACPI_FADT_LEGACY_DEVICES) == 0 &&
+   tsc_freq_cpuid()) {
+   printf("Skipping TSC calibration since no legacy "
+   "devices reported by FADT and CPUID works\n");
+   tsc_skip_calibration = 1;
+   }
+   }
if (tsc_skip_calibration) {
if (tsc_freq_cpuid())
;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r335632 - in head/sys: dev/vt/hw/vga x86/include x86/isa x86/x86

2018-06-25 Thread Andriy Gapon
On 25/06/2018 14:01, Konstantin Belousov wrote:
> Modified: head/sys/x86/x86/cpu_machdep.c
> ==
> --- head/sys/x86/x86/cpu_machdep.cMon Jun 25 10:52:41 2018
> (r335631)
> +++ head/sys/x86/x86/cpu_machdep.cMon Jun 25 11:01:12 2018
> (r335632)

Maybe acpi_machdep.c or some other file under x86/acpica would be better...

> @@ -41,6 +41,7 @@
>  #include 
>  __FBSDID("$FreeBSD$");
>  
> +#include "opt_acpi.h"
>  #include "opt_atpic.h"
>  #include "opt_cpu.h"
>  #include "opt_ddb.h"
> @@ -98,6 +99,8 @@ __FBSDID("$FreeBSD$");
>  
>  #include 
>  
> +#include 
> +
>  #define  STATE_RUNNING   0x0
>  #define  STATE_MWAIT 0x1
>  #define  STATE_SLEEPING  0x2


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


svn commit: r335633 - head/sys/dev/vt/hw/vga

2018-06-25 Thread Konstantin Belousov
Author: kib
Date: Mon Jun 25 11:12:21 2018
New Revision: 335633
URL: https://svnweb.freebsd.org/changeset/base/335633

Log:
  Fix compilation.
  
  Pointy hat to:me
  Sponsored by: The FreeBSD Foundation
  MFC after:1 week

Modified:
  head/sys/dev/vt/hw/vga/vt_vga.c

Modified: head/sys/dev/vt/hw/vga/vt_vga.c
==
--- head/sys/dev/vt/hw/vga/vt_vga.c Mon Jun 25 11:01:12 2018
(r335632)
+++ head/sys/dev/vt/hw/vga/vt_vga.c Mon Jun 25 11:12:21 2018
(r335633)
@@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #if defined(__amd64__) || defined(__i386__)
+#include 
 #include 
 #endif
 
@@ -1212,7 +1213,7 @@ vga_initialize(struct vt_device *vd, int textmode)
 static bool
 vga_acpi_disabled(void)
 {
-#if (defined(__amd64__) || defined(__i386__)
+#if defined(__amd64__) || defined(__i386__)
uint16_t flags;
int ignore;
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335632 - in head/sys: dev/vt/hw/vga x86/include x86/isa x86/x86

2018-06-25 Thread Konstantin Belousov
Author: kib
Date: Mon Jun 25 11:01:12 2018
New Revision: 335632
URL: https://svnweb.freebsd.org/changeset/base/335632

Log:
  Provide a helper function acpi_get_fadt_bootflags() to fetch the FADT
  x86 boot flags.
  
  Reviewed by:  royger
  Sponsored by: The FreeBSD Foundation
  Differential revision:https://reviews.freebsd.org/D16004
  MFC after:1 week

Modified:
  head/sys/dev/vt/hw/vga/vt_vga.c
  head/sys/x86/include/x86_var.h
  head/sys/x86/isa/atrtc.c
  head/sys/x86/x86/cpu_machdep.c

Modified: head/sys/dev/vt/hw/vga/vt_vga.c
==
--- head/sys/dev/vt/hw/vga/vt_vga.c Mon Jun 25 10:52:41 2018
(r335631)
+++ head/sys/dev/vt/hw/vga/vt_vga.c Mon Jun 25 11:01:12 2018
(r335632)
@@ -48,9 +48,8 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #include 
-
-#if ((defined(__amd64__) || defined(__i386__)) && defined(DEV_ACPI))
-#include 
+#if defined(__amd64__) || defined(__i386__)
+#include 
 #endif
 
 struct vga_softc {
@@ -1213,36 +1212,18 @@ vga_initialize(struct vt_device *vd, int textmode)
 static bool
 vga_acpi_disabled(void)
 {
-#if ((defined(__amd64__) || defined(__i386__)) && defined(DEV_ACPI))
-   ACPI_TABLE_FADT *fadt;
-   vm_paddr_t physaddr;
+#if (defined(__amd64__) || defined(__i386__)
uint16_t flags;
int ignore;
 
ignore = 0;
TUNABLE_INT_FETCH("hw.vga.acpi_ignore_no_vga", );
-
-   if (ignore)
-   return (false);
-
-   physaddr = acpi_find_table(ACPI_SIG_FADT);
-   if (physaddr == 0)
-   return (false);
-
-   fadt = acpi_map_table(physaddr, ACPI_SIG_FADT);
-   if (fadt == NULL) {
-   printf("vt_vga: unable to map FADT ACPI table\n");
-   return (false);
-   }
-
-   flags = fadt->BootFlags;
-   acpi_unmap_table(fadt);
-
-   if (flags & ACPI_FADT_NO_VGA)
-   return (true);
-#endif
-
+   if (ignore || !acpi_get_fadt_bootflags())
+   return (false);
+   return ((flags & ACPI_FADT_NO_VGA) != 0);
+#else
return (false);
+#endif
 }
 
 static int

Modified: head/sys/x86/include/x86_var.h
==
--- head/sys/x86/include/x86_var.h  Mon Jun 25 10:52:41 2018
(r335631)
+++ head/sys/x86/include/x86_var.h  Mon Jun 25 11:01:12 2018
(r335632)
@@ -116,6 +116,7 @@ cpu_getmaxphyaddr(void)
 #endif
 }
 
+bool   acpi_get_fadt_bootflags(uint16_t *flagsp);
 void   *alloc_fpusave(int flags);
 void   busdma_swi(void);
 bool   cpu_mwait_usable(void);

Modified: head/sys/x86/isa/atrtc.c
==
--- head/sys/x86/isa/atrtc.cMon Jun 25 10:52:41 2018(r335631)
+++ head/sys/x86/isa/atrtc.cMon Jun 25 11:01:12 2018(r335632)
@@ -32,7 +32,6 @@
 #include 
 __FBSDID("$FreeBSD$");
 
-#include "opt_acpi.h"
 #include "opt_isa.h"
 
 #include 
@@ -55,10 +54,8 @@ __FBSDID("$FreeBSD$");
 #endif
 #include 
 #include "clock_if.h"
-
-#ifdef DEV_ACPI
 #include 
-#endif
+#include 
 
 /*
  * atrtc_lock protects low-level access to individual hardware registers.
@@ -261,29 +258,12 @@ static struct isa_pnp_id atrtc_ids[] = {
 static bool
 atrtc_acpi_disabled(void)
 {
-#ifdef DEV_ACPI
-   ACPI_TABLE_FADT *fadt;
-   vm_paddr_t physaddr;
uint16_t flags;
 
-   physaddr = acpi_find_table(ACPI_SIG_FADT);
-   if (physaddr == 0)
+   if (!acpi_get_fadt_bootflags())
return (false);
-
-   fadt = acpi_map_table(physaddr, ACPI_SIG_FADT);
-   if (fadt == NULL) {
-   printf("at_rtc: unable to map FADT ACPI table\n");
-   return (false);
-   }
-
-   flags = fadt->BootFlags;
-   acpi_unmap_table(fadt);
-
-   if (flags & ACPI_FADT_NO_CMOS_RTC)
+   return ((flags & ACPI_FADT_NO_CMOS_RTC) != 0);
return (true);
-#endif
-
-   return (false);
 }
 
 static int

Modified: head/sys/x86/x86/cpu_machdep.c
==
--- head/sys/x86/x86/cpu_machdep.c  Mon Jun 25 10:52:41 2018
(r335631)
+++ head/sys/x86/x86/cpu_machdep.c  Mon Jun 25 11:01:12 2018
(r335632)
@@ -41,6 +41,7 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_acpi.h"
 #include "opt_atpic.h"
 #include "opt_cpu.h"
 #include "opt_ddb.h"
@@ -98,6 +99,8 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
+#include 
+
 #defineSTATE_RUNNING   0x0
 #defineSTATE_MWAIT 0x1
 #defineSTATE_SLEEPING  0x2
@@ -930,3 +933,23 @@ restore_wp(bool old_wp)
load_cr0(rcr0() | CR0_WP);
 }
 
+bool
+acpi_get_fadt_bootflags(uint16_t *flagsp)
+{
+#ifdef DEV_ACPI
+   ACPI_TABLE_FADT *fadt;
+   vm_paddr_t physaddr;
+
+   physaddr = acpi_find_table(ACPI_SIG_FADT);
+   if (physaddr == 0)
+   return (false);
+   fadt = 

svn commit: r335631 - head/sys/dev/vt/hw/vga

2018-06-25 Thread Konstantin Belousov
Author: kib
Date: Mon Jun 25 10:52:41 2018
New Revision: 335631
URL: https://svnweb.freebsd.org/changeset/base/335631

Log:
  Always initialize the ignore local variable.
  
  Reviewed by:  royger
  Sponsored by: The FreeBSD Foundation
  Differential revision:https://reviews.freebsd.org/D16004

Modified:
  head/sys/dev/vt/hw/vga/vt_vga.c

Modified: head/sys/dev/vt/hw/vga/vt_vga.c
==
--- head/sys/dev/vt/hw/vga/vt_vga.c Mon Jun 25 10:37:21 2018
(r335630)
+++ head/sys/dev/vt/hw/vga/vt_vga.c Mon Jun 25 10:52:41 2018
(r335631)
@@ -1219,6 +1219,7 @@ vga_acpi_disabled(void)
uint16_t flags;
int ignore;
 
+   ignore = 0;
TUNABLE_INT_FETCH("hw.vga.acpi_ignore_no_vga", );
 
if (ignore)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335630 - stable/11/contrib/elftoolchain/libdwarf

2018-06-25 Thread Mark Johnston
Author: markj
Date: Mon Jun 25 10:37:21 2018
New Revision: 335630
URL: https://svnweb.freebsd.org/changeset/base/335630

Log:
  MFC r334881:
  Add DW_LANG_* definitions from DWARF 4 and 5.

Modified:
  stable/11/contrib/elftoolchain/libdwarf/dwarf.h
  stable/11/contrib/elftoolchain/libdwarf/dwarf_dump.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/elftoolchain/libdwarf/dwarf.h
==
--- stable/11/contrib/elftoolchain/libdwarf/dwarf.h Mon Jun 25 09:39:16 
2018(r335629)
+++ stable/11/contrib/elftoolchain/libdwarf/dwarf.h Mon Jun 25 10:37:21 
2018(r335630)
@@ -523,6 +523,24 @@
 #define DW_LANG_ObjC_plus_plus 0x0011
 #define DW_LANG_UPC0x0012
 #define DW_LANG_D  0x0013
+#define DW_LANG_Python 0x0014
+#define DW_LANG_OpenCL 0x0015
+#define DW_LANG_Go 0x0016
+#define DW_LANG_Modula30x0017
+#define DW_LANG_Haskell0x0018
+#define DW_LANG_C_plus_plus_03 0x0019
+#define DW_LANG_C_plus_plus_11 0x001a
+#define DW_LANG_OCaml  0x001b
+#define DW_LANG_Rust   0x001c
+#define DW_LANG_C110x001d
+#define DW_LANG_Swift  0x001e
+#define DW_LANG_Julia  0x001f
+#define DW_LANG_Dylan  0x0020
+#define DW_LANG_C_plus_plus_14 0x0021
+#define DW_LANG_Fortran03  0x0022
+#define DW_LANG_Fortran08  0x0023
+#define DW_LANG_RenderScript   0x0024
+#define DW_LANG_BLISS  0x0025
 #define DW_LANG_lo_user0x8000
 #define DW_LANG_Mips_Assembler 0x8001
 #define DW_LANG_hi_user0x

Modified: stable/11/contrib/elftoolchain/libdwarf/dwarf_dump.c
==
--- stable/11/contrib/elftoolchain/libdwarf/dwarf_dump.cMon Jun 25 
09:39:16 2018(r335629)
+++ stable/11/contrib/elftoolchain/libdwarf/dwarf_dump.cMon Jun 25 
10:37:21 2018(r335630)
@@ -788,6 +788,42 @@ dwarf_get_LANG_name(unsigned lang, const char **s)
*s = "DW_LANG_UPC"; break;
case DW_LANG_D:
*s = "DW_LANG_D"; break;
+   case DW_LANG_Python:
+   *s = "DW_LANG_Python"; break;
+   case DW_LANG_OpenCL:
+   *s = "DW_LANG_OpenCL"; break;
+   case DW_LANG_Go:
+   *s = "DW_LANG_Go"; break;
+   case DW_LANG_Modula3:
+   *s = "DW_LANG_Modula3"; break;
+   case DW_LANG_Haskell:
+   *s = "DW_LANG_Haskell"; break;
+   case DW_LANG_C_plus_plus_03:
+   *s = "DW_LANG_C_plus_plus_03"; break;
+   case DW_LANG_C_plus_plus_11:
+   *s = "DW_LANG_C_plus_plus_11"; break;
+   case DW_LANG_OCaml:
+   *s = "DW_LANG_OCaml"; break;
+   case DW_LANG_Rust:
+   *s = "DW_LANG_Rust"; break;
+   case DW_LANG_C11:
+   *s = "DW_LANG_C11"; break;
+   case DW_LANG_Swift:
+   *s = "DW_LANG_Swift"; break;
+   case DW_LANG_Julia:
+   *s = "DW_LANG_Julia"; break;
+   case DW_LANG_Dylan:
+   *s = "DW_LANG_Dylan"; break;
+   case DW_LANG_C_plus_plus_14:
+   *s = "DW_LANG_C_plus_plus_14"; break;
+   case DW_LANG_Fortran03:
+   *s = "DW_LANG_Fortran03"; break;
+   case DW_LANG_Fortran08:
+   *s = "DW_LANG_Fortran08"; break;
+   case DW_LANG_RenderScript:
+   *s = "DW_LANG_RenderScript"; break;
+   case DW_LANG_BLISS:
+   *s = "DW_LANG_BLISS"; break;
case DW_LANG_lo_user:
*s = "DW_LANG_lo_user"; break;
case DW_LANG_Mips_Assembler:
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r335171 - head/sys/vm

2018-06-25 Thread Mark Johnston
On Fri, Jun 15, 2018 at 02:03:03PM +0300, Konstantin Belousov wrote:
> On Fri, Jun 15, 2018 at 11:03:06AM +0100, Steven Hartland wrote:
> > On 15/06/2018 00:07, Alan Cox wrote:
> > >
> > >> On Jun 14, 2018, at 5:54 PM, Steven Hartland 
> > >>  > >> > wrote:
> > >>
> > >> Out of interest, how would this exhibit itself?
> > >>
> > >
> > > A panic in vm_page_insert_after().
> > >
> > So just to confirm this couldn't cause random memory corruption of the 
> > parent process?
> 
> No, or to put it more sincere, I highly doubt it.
> 
> Also, I do not think that this Go issue will be solved serendipitously
> by some FreeBSD bug fix.  So far it is indicative that either the
> situation is too unique for the Go runtime so it is not exposed by other
> programs (which is quite doubtful), or this is a bug in Go runtime.
> 
> The only way forward is to understand what exactly is broken for the
> situation.  This requires at least deep knowledge the Go garbage collector
> internal working, which itself supposes understanding of the Go runtime
> and Go environment.  I do not mean explanation of the assert, but the
> root cause that eventually triggers the assert.  They are somewhat
> disjoint in time, I believe.

Is this problem summarized anywhere?  In particular, is there a
reasonably minimal test case that reproduces the problem?
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335629 - in head: share/man/man4 sys/dev/vt/hw/vga

2018-06-25 Thread Roger Pau Monné
Author: royger
Date: Mon Jun 25 09:39:16 2018
New Revision: 335629
URL: https://svnweb.freebsd.org/changeset/base/335629

Log:
  vt: add option to ignore NO_VGA flag in ACPI
  
  To workaround buggy firmware that sets this flag when there's actually
  a VGA present.
  
  Reported and tested by:   Yasuhiro KIMURA 
  Sponsored by: Citrix Systems R
  Reviewed by:  kib
  Differential revision:https://reviews.freebsd.org/D16003

Modified:
  head/share/man/man4/vt.4
  head/sys/dev/vt/hw/vga/vt_vga.c

Modified: head/share/man/man4/vt.4
==
--- head/share/man/man4/vt.4Mon Jun 25 09:19:50 2018(r335628)
+++ head/share/man/man4/vt.4Mon Jun 25 09:39:16 2018(r335629)
@@ -44,6 +44,7 @@
 In
 .Xr loader.conf 5 :
 .Cd hw.vga.textmode=1
+.Cd hw.vga.acpi_ignore_no_vga=1
 .Cd kern.vty=vt
 .Cd kern.vt.color..rgb=""
 .Cd kern.vt.fb.default_mode="x"
@@ -196,6 +197,10 @@ prompt or in
 Set to 1 to use virtual terminals in text mode instead of graphics mode.
 Features that require graphics mode, like loadable fonts, will be
 disabled.
+.It Va hw.vga.acpi_ignore_no_vga
+Set to 1 to force the usage of the VGA driver regardless of whether
+ACPI IAPC_BOOT_ARCH signals no VGA support.
+Can be used to workaround firmware bugs in the ACPI tables.
 .It Va kern.vty
 Set this value to
 .Ql vt

Modified: head/sys/dev/vt/hw/vga/vt_vga.c
==
--- head/sys/dev/vt/hw/vga/vt_vga.c Mon Jun 25 09:19:50 2018
(r335628)
+++ head/sys/dev/vt/hw/vga/vt_vga.c Mon Jun 25 09:39:16 2018
(r335629)
@@ -1217,6 +1217,12 @@ vga_acpi_disabled(void)
ACPI_TABLE_FADT *fadt;
vm_paddr_t physaddr;
uint16_t flags;
+   int ignore;
+
+   TUNABLE_INT_FETCH("hw.vga.acpi_ignore_no_vga", );
+
+   if (ignore)
+   return (false);
 
physaddr = acpi_find_table(ACPI_SIG_FADT);
if (physaddr == 0)
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335628 - stable/11/sys/x86/x86

2018-06-25 Thread Andriy Gapon
Author: avg
Date: Mon Jun 25 09:19:50 2018
New Revision: 335628
URL: https://svnweb.freebsd.org/changeset/base/335628

Log:
  MFC r333638: calibrate lapic timer in native_lapic_setup

Modified:
  stable/11/sys/x86/x86/local_apic.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/x86/x86/local_apic.c
==
--- stable/11/sys/x86/x86/local_apic.c  Mon Jun 25 08:57:03 2018
(r335627)
+++ stable/11/sys/x86/x86/local_apic.c  Mon Jun 25 09:19:50 2018
(r335628)
@@ -202,6 +202,9 @@ SYSCTL_INT(_hw_apic, OID_AUTO, eoi_suppression, CTLFLA
 SYSCTL_INT(_hw_apic, OID_AUTO, timer_tsc_deadline, CTLFLAG_RD,
 _timer_tsc_deadline, 0, "");
 
+static void lapic_calibrate_initcount(struct lapic *la);
+static void lapic_calibrate_deadline(struct lapic *la);
+
 static uint32_t
 lapic_read32(enum LAPIC_REGISTERS reg)
 {
@@ -783,6 +786,13 @@ native_lapic_setup(int boot)
intrcnt_add(buf, >la_timer_count);
}
 
+   /* Calibrate the timer parameters using BSP. */
+   if (boot && IS_BSP()) {
+   lapic_calibrate_initcount(la);
+   if (lapic_timer_tsc_deadline)
+   lapic_calibrate_deadline(la);
+   }
+
/* Setup the timer if configured. */
if (la->la_timer_mode != LAT_MODE_UNDEF) {
KASSERT(la->la_timer_period != 0, ("lapic%u: zero divisor",
@@ -917,7 +927,7 @@ native_lapic_disable_pmc(void)
 }
 
 static void
-lapic_calibrate_initcount(struct eventtimer *et, struct lapic *la)
+lapic_calibrate_initcount(struct lapic *la)
 {
u_long value;
 
@@ -943,7 +953,7 @@ lapic_calibrate_initcount(struct eventtimer *et, struc
 }
 
 static void
-lapic_calibrate_deadline(struct eventtimer *et, struct lapic *la __unused)
+lapic_calibrate_deadline(struct lapic *la __unused)
 {
 
if (bootverbose) {
@@ -985,11 +995,6 @@ lapic_et_start(struct eventtimer *et, sbintime_t first
struct lapic *la;
 
la = [PCPU_GET(apic_id)];
-   if (et->et_frequency == 0) {
-   lapic_calibrate_initcount(et, la);
-   if (lapic_timer_tsc_deadline)
-   lapic_calibrate_deadline(et, la);
-   }
if (period != 0) {
lapic_change_mode(et, la, LAT_MODE_PERIODIC);
la->la_timer_period = ((uint32_t)et->et_frequency * period) >>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335627 - stable/10/sys/dev/usb/serial

2018-06-25 Thread Andriy Gapon
Author: avg
Date: Mon Jun 25 08:57:03 2018
New Revision: 335627
URL: https://svnweb.freebsd.org/changeset/base/335627

Log:
  MFC r334002: uchcom: extend hardware support to version 0x30

Modified:
  stable/10/sys/dev/usb/serial/uchcom.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/usb/serial/uchcom.c
==
--- stable/10/sys/dev/usb/serial/uchcom.c   Mon Jun 25 08:56:30 2018
(r335626)
+++ stable/10/sys/dev/usb/serial/uchcom.c   Mon Jun 25 08:57:03 2018
(r335627)
@@ -124,6 +124,7 @@ SYSCTL_INT(_hw_usb_uchcom, OID_AUTO, debug, CTLFLAG_RW
 #defineUCHCOM_REG_LCR2 0x25
 
 #defineUCHCOM_VER_20   0x20
+#defineUCHCOM_VER_30   0x30
 
 #defineUCHCOM_BASE_UNKNOWN 0
 #defineUCHCOM_BPS_MOD_BASE 2000
@@ -703,11 +704,26 @@ uchcom_cfg_param(struct ucom_softc *ucom, struct termi
 {
struct uchcom_softc *sc = ucom->sc_parent;
 
-   uchcom_get_version(sc, 0);
+   uchcom_get_version(sc, NULL);
uchcom_ctrl_write(sc, UCHCOM_REQ_RESET, 0, 0);
uchcom_set_baudrate(sc, t->c_ospeed);
-   uchcom_read_reg(sc, 0x18, 0, 0x25, 0);
-   uchcom_write_reg(sc, 0x18, 0x50, 0x25, 0x00);
+   if (sc->sc_version < UCHCOM_VER_30) {
+   uchcom_read_reg(sc, UCHCOM_REG_LCR1, NULL,
+   UCHCOM_REG_LCR2, NULL);
+   uchcom_write_reg(sc, UCHCOM_REG_LCR1, 0x50,
+   UCHCOM_REG_LCR2, 0x00);
+   } else {
+   /*
+* Set up line control:
+* - enable transmit and receive
+* - set 8n1 mode
+* To do: support other sizes, parity, stop bits.
+*/
+   uchcom_write_reg(sc,
+   UCHCOM_REG_LCR1,
+   UCHCOM_LCR1_RX | UCHCOM_LCR1_TX | UCHCOM_LCR1_CS8,
+   UCHCOM_REG_LCR2, 0x00);
+   }
uchcom_update_status(sc);
uchcom_ctrl_write(sc, UCHCOM_REQ_RESET, 0x501f, 0xd90a);
uchcom_set_baudrate(sc, t->c_ospeed);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335626 - stable/11/sys/dev/usb/serial

2018-06-25 Thread Andriy Gapon
Author: avg
Date: Mon Jun 25 08:56:30 2018
New Revision: 335626
URL: https://svnweb.freebsd.org/changeset/base/335626

Log:
  MFC r334002: uchcom: extend hardware support to version 0x30

Modified:
  stable/11/sys/dev/usb/serial/uchcom.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/usb/serial/uchcom.c
==
--- stable/11/sys/dev/usb/serial/uchcom.c   Mon Jun 25 08:55:19 2018
(r335625)
+++ stable/11/sys/dev/usb/serial/uchcom.c   Mon Jun 25 08:56:30 2018
(r335626)
@@ -124,6 +124,7 @@ SYSCTL_INT(_hw_usb_uchcom, OID_AUTO, debug, CTLFLAG_RW
 #defineUCHCOM_REG_LCR2 0x25
 
 #defineUCHCOM_VER_20   0x20
+#defineUCHCOM_VER_30   0x30
 
 #defineUCHCOM_BASE_UNKNOWN 0
 #defineUCHCOM_BPS_MOD_BASE 2000
@@ -704,11 +705,26 @@ uchcom_cfg_param(struct ucom_softc *ucom, struct termi
 {
struct uchcom_softc *sc = ucom->sc_parent;
 
-   uchcom_get_version(sc, 0);
+   uchcom_get_version(sc, NULL);
uchcom_ctrl_write(sc, UCHCOM_REQ_RESET, 0, 0);
uchcom_set_baudrate(sc, t->c_ospeed);
-   uchcom_read_reg(sc, 0x18, 0, 0x25, 0);
-   uchcom_write_reg(sc, 0x18, 0x50, 0x25, 0x00);
+   if (sc->sc_version < UCHCOM_VER_30) {
+   uchcom_read_reg(sc, UCHCOM_REG_LCR1, NULL,
+   UCHCOM_REG_LCR2, NULL);
+   uchcom_write_reg(sc, UCHCOM_REG_LCR1, 0x50,
+   UCHCOM_REG_LCR2, 0x00);
+   } else {
+   /*
+* Set up line control:
+* - enable transmit and receive
+* - set 8n1 mode
+* To do: support other sizes, parity, stop bits.
+*/
+   uchcom_write_reg(sc,
+   UCHCOM_REG_LCR1,
+   UCHCOM_LCR1_RX | UCHCOM_LCR1_TX | UCHCOM_LCR1_CS8,
+   UCHCOM_REG_LCR2, 0x00);
+   }
uchcom_update_status(sc);
uchcom_ctrl_write(sc, UCHCOM_REQ_RESET, 0x501f, 0xd90a);
uchcom_set_baudrate(sc, t->c_ospeed);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335625 - stable/10/sys/dev/usb/serial

2018-06-25 Thread Andriy Gapon
Author: avg
Date: Mon Jun 25 08:55:19 2018
New Revision: 335625
URL: https://svnweb.freebsd.org/changeset/base/335625

Log:
  MFC r334001: uchcom: remove UCHCOM_REG_BREAK2 alias of UCHCOM_REG_LCR1

Modified:
  stable/10/sys/dev/usb/serial/uchcom.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/usb/serial/uchcom.c
==
--- stable/10/sys/dev/usb/serial/uchcom.c   Mon Jun 25 08:54:46 2018
(r335624)
+++ stable/10/sys/dev/usb/serial/uchcom.c   Mon Jun 25 08:55:19 2018
(r335625)
@@ -120,7 +120,6 @@ SYSCTL_INT(_hw_usb_uchcom, OID_AUTO, debug, CTLFLAG_RW
 #defineUCHCOM_REG_BPS_MOD  0x14
 #defineUCHCOM_REG_BPS_PAD  0x0F
 #defineUCHCOM_REG_BREAK1   0x05
-#defineUCHCOM_REG_BREAK2   0x18
 #defineUCHCOM_REG_LCR1 0x18
 #defineUCHCOM_REG_LCR2 0x25
 
@@ -133,12 +132,14 @@ SYSCTL_INT(_hw_usb_uchcom, OID_AUTO, debug, CTLFLAG_RW
 #defineUCHCOM_DTR_MASK 0x20
 #defineUCHCOM_RTS_MASK 0x40
 
-#defineUCHCOM_BRK1_MASK0x01
-#defineUCHCOM_BRK2_MASK0x40
+#defineUCHCOM_BRK_MASK 0x01
 
 #defineUCHCOM_LCR1_MASK0xAF
 #defineUCHCOM_LCR2_MASK0x07
-#defineUCHCOM_LCR1_PARENB  0x80
+#defineUCHCOM_LCR1_RX  0x80
+#defineUCHCOM_LCR1_TX  0x40
+#defineUCHCOM_LCR1_PARENB  0x08
+#defineUCHCOM_LCR1_CS8 0x03
 #defineUCHCOM_LCR2_PAREVEN 0x07
 #defineUCHCOM_LCR2_PARODD  0x06
 #defineUCHCOM_LCR2_PARMARK 0x05
@@ -554,17 +555,17 @@ uchcom_cfg_set_break(struct ucom_softc *ucom, uint8_t 
uint8_t brk1;
uint8_t brk2;
 
-   uchcom_read_reg(sc, UCHCOM_REG_BREAK1, , UCHCOM_REG_BREAK2, );
+   uchcom_read_reg(sc, UCHCOM_REG_BREAK1, , UCHCOM_REG_LCR1, );
if (onoff) {
/* on - clear bits */
-   brk1 &= ~UCHCOM_BRK1_MASK;
-   brk2 &= ~UCHCOM_BRK2_MASK;
+   brk1 &= ~UCHCOM_BRK_MASK;
+   brk2 &= ~UCHCOM_LCR1_TX;
} else {
/* off - set bits */
-   brk1 |= UCHCOM_BRK1_MASK;
-   brk2 |= UCHCOM_BRK2_MASK;
+   brk1 |= UCHCOM_BRK_MASK;
+   brk2 |= UCHCOM_LCR1_TX;
}
-   uchcom_write_reg(sc, UCHCOM_REG_BREAK1, brk1, UCHCOM_REG_BREAK2, brk2);
+   uchcom_write_reg(sc, UCHCOM_REG_BREAK1, brk1, UCHCOM_REG_LCR1, brk2);
 }
 
 static int
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335624 - stable/11/sys/dev/usb/serial

2018-06-25 Thread Andriy Gapon
Author: avg
Date: Mon Jun 25 08:54:46 2018
New Revision: 335624
URL: https://svnweb.freebsd.org/changeset/base/335624

Log:
  MFC r334001: uchcom: remove UCHCOM_REG_BREAK2 alias of UCHCOM_REG_LCR1

Modified:
  stable/11/sys/dev/usb/serial/uchcom.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/usb/serial/uchcom.c
==
--- stable/11/sys/dev/usb/serial/uchcom.c   Mon Jun 25 08:53:30 2018
(r335623)
+++ stable/11/sys/dev/usb/serial/uchcom.c   Mon Jun 25 08:54:46 2018
(r335624)
@@ -120,7 +120,6 @@ SYSCTL_INT(_hw_usb_uchcom, OID_AUTO, debug, CTLFLAG_RW
 #defineUCHCOM_REG_BPS_MOD  0x14
 #defineUCHCOM_REG_BPS_PAD  0x0F
 #defineUCHCOM_REG_BREAK1   0x05
-#defineUCHCOM_REG_BREAK2   0x18
 #defineUCHCOM_REG_LCR1 0x18
 #defineUCHCOM_REG_LCR2 0x25
 
@@ -133,12 +132,14 @@ SYSCTL_INT(_hw_usb_uchcom, OID_AUTO, debug, CTLFLAG_RW
 #defineUCHCOM_DTR_MASK 0x20
 #defineUCHCOM_RTS_MASK 0x40
 
-#defineUCHCOM_BRK1_MASK0x01
-#defineUCHCOM_BRK2_MASK0x40
+#defineUCHCOM_BRK_MASK 0x01
 
 #defineUCHCOM_LCR1_MASK0xAF
 #defineUCHCOM_LCR2_MASK0x07
-#defineUCHCOM_LCR1_PARENB  0x80
+#defineUCHCOM_LCR1_RX  0x80
+#defineUCHCOM_LCR1_TX  0x40
+#defineUCHCOM_LCR1_PARENB  0x08
+#defineUCHCOM_LCR1_CS8 0x03
 #defineUCHCOM_LCR2_PAREVEN 0x07
 #defineUCHCOM_LCR2_PARODD  0x06
 #defineUCHCOM_LCR2_PARMARK 0x05
@@ -554,17 +555,17 @@ uchcom_cfg_set_break(struct ucom_softc *ucom, uint8_t 
uint8_t brk1;
uint8_t brk2;
 
-   uchcom_read_reg(sc, UCHCOM_REG_BREAK1, , UCHCOM_REG_BREAK2, );
+   uchcom_read_reg(sc, UCHCOM_REG_BREAK1, , UCHCOM_REG_LCR1, );
if (onoff) {
/* on - clear bits */
-   brk1 &= ~UCHCOM_BRK1_MASK;
-   brk2 &= ~UCHCOM_BRK2_MASK;
+   brk1 &= ~UCHCOM_BRK_MASK;
+   brk2 &= ~UCHCOM_LCR1_TX;
} else {
/* off - set bits */
-   brk1 |= UCHCOM_BRK1_MASK;
-   brk2 |= UCHCOM_BRK2_MASK;
+   brk1 |= UCHCOM_BRK_MASK;
+   brk2 |= UCHCOM_LCR1_TX;
}
-   uchcom_write_reg(sc, UCHCOM_REG_BREAK1, brk1, UCHCOM_REG_BREAK2, brk2);
+   uchcom_write_reg(sc, UCHCOM_REG_BREAK1, brk1, UCHCOM_REG_LCR1, brk2);
 }
 
 static int
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335623 - stable/10/sys/dev/usb/serial

2018-06-25 Thread Andriy Gapon
Author: avg
Date: Mon Jun 25 08:53:30 2018
New Revision: 335623
URL: https://svnweb.freebsd.org/changeset/base/335623

Log:
  MFC r334000: uchcom: reject parity and double stop bits as unsupported

Modified:
  stable/10/sys/dev/usb/serial/uchcom.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/usb/serial/uchcom.c
==
--- stable/10/sys/dev/usb/serial/uchcom.c   Mon Jun 25 08:52:48 2018
(r335622)
+++ stable/10/sys/dev/usb/serial/uchcom.c   Mon Jun 25 08:53:30 2018
(r335623)
@@ -686,6 +686,10 @@ uchcom_pre_param(struct ucom_softc *ucom, struct termi
default:
return (EIO);
}
+   if ((t->c_cflag & CSTOPB) != 0)
+   return (EIO);
+   if ((t->c_cflag & PARENB) != 0)
+   return (EIO);
 
if (uchcom_calc_divider_settings(, t->c_ospeed)) {
return (EIO);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335622 - stable/11/sys/dev/usb/serial

2018-06-25 Thread Andriy Gapon
Author: avg
Date: Mon Jun 25 08:52:48 2018
New Revision: 335622
URL: https://svnweb.freebsd.org/changeset/base/335622

Log:
  MFC r334000: uchcom: reject parity and double stop bits as unsupported

Modified:
  stable/11/sys/dev/usb/serial/uchcom.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/usb/serial/uchcom.c
==
--- stable/11/sys/dev/usb/serial/uchcom.c   Mon Jun 25 08:50:46 2018
(r335621)
+++ stable/11/sys/dev/usb/serial/uchcom.c   Mon Jun 25 08:52:48 2018
(r335622)
@@ -687,6 +687,10 @@ uchcom_pre_param(struct ucom_softc *ucom, struct termi
default:
return (EIO);
}
+   if ((t->c_cflag & CSTOPB) != 0)
+   return (EIO);
+   if ((t->c_cflag & PARENB) != 0)
+   return (EIO);
 
if (uchcom_calc_divider_settings(, t->c_ospeed)) {
return (EIO);
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335621 - stable/10/sys/dev/usb/serial

2018-06-25 Thread Andriy Gapon
Author: avg
Date: Mon Jun 25 08:50:46 2018
New Revision: 335621
URL: https://svnweb.freebsd.org/changeset/base/335621

Log:
  MFC r333999: uchcom: add a hardware configuration tweak seen in Linux code

Modified:
  stable/10/sys/dev/usb/serial/uchcom.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/usb/serial/uchcom.c
==
--- stable/10/sys/dev/usb/serial/uchcom.c   Mon Jun 25 08:50:06 2018
(r335620)
+++ stable/10/sys/dev/usb/serial/uchcom.c   Mon Jun 25 08:50:46 2018
(r335621)
@@ -616,8 +616,12 @@ uchcom_set_baudrate(struct uchcom_softc *sc, uint32_t 
if (uchcom_calc_divider_settings(, rate))
return;
 
+   /*
+* According to linux code we need to set bit 7 of UCHCOM_REG_BPS_PRE,
+* otherwise the chip will buffer data.
+*/
uchcom_write_reg(sc,
-   UCHCOM_REG_BPS_PRE, dv.dv_prescaler,
+   UCHCOM_REG_BPS_PRE, dv.dv_prescaler | 0x80,
UCHCOM_REG_BPS_DIV, dv.dv_div);
uchcom_write_reg(sc,
UCHCOM_REG_BPS_MOD, dv.dv_mod,
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335620 - stable/11/sys/dev/usb/serial

2018-06-25 Thread Andriy Gapon
Author: avg
Date: Mon Jun 25 08:50:06 2018
New Revision: 335620
URL: https://svnweb.freebsd.org/changeset/base/335620

Log:
  MFC r333999: uchcom: add a hardware configuration tweak seen in Linux code

Modified:
  stable/11/sys/dev/usb/serial/uchcom.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/usb/serial/uchcom.c
==
--- stable/11/sys/dev/usb/serial/uchcom.c   Mon Jun 25 08:49:13 2018
(r335619)
+++ stable/11/sys/dev/usb/serial/uchcom.c   Mon Jun 25 08:50:06 2018
(r335620)
@@ -616,8 +616,12 @@ uchcom_set_baudrate(struct uchcom_softc *sc, uint32_t 
if (uchcom_calc_divider_settings(, rate))
return;
 
+   /*
+* According to linux code we need to set bit 7 of UCHCOM_REG_BPS_PRE,
+* otherwise the chip will buffer data.
+*/
uchcom_write_reg(sc,
-   UCHCOM_REG_BPS_PRE, dv.dv_prescaler,
+   UCHCOM_REG_BPS_PRE, dv.dv_prescaler | 0x80,
UCHCOM_REG_BPS_DIV, dv.dv_div);
uchcom_write_reg(sc,
UCHCOM_REG_BPS_MOD, dv.dv_mod,
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335619 - stable/10/sys/dev/usb/serial

2018-06-25 Thread Andriy Gapon
Author: avg
Date: Mon Jun 25 08:49:13 2018
New Revision: 335619
URL: https://svnweb.freebsd.org/changeset/base/335619

Log:
  MFC r333998: uchcom: add DPRINTF-s to aid debugging of the driver

Modified:
  stable/10/sys/dev/usb/serial/uchcom.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/usb/serial/uchcom.c
==
--- stable/10/sys/dev/usb/serial/uchcom.c   Mon Jun 25 08:48:39 2018
(r335618)
+++ stable/10/sys/dev/usb/serial/uchcom.c   Mon Jun 25 08:49:13 2018
(r335619)
@@ -414,6 +414,8 @@ uchcom_ctrl_write(struct uchcom_softc *sc, uint8_t req
USETW(req.wIndex, index);
USETW(req.wLength, 0);
 
+   DPRINTF("WR REQ 0x%02X VAL 0x%04X IDX 0x%04X\n",
+   reqno, value, index);
ucom_cfg_do_request(sc->sc_udev,
>sc_ucom, , NULL, 0, 1000);
 }
@@ -430,6 +432,8 @@ uchcom_ctrl_read(struct uchcom_softc *sc, uint8_t reqn
USETW(req.wIndex, index);
USETW(req.wLength, buflen);
 
+   DPRINTF("RD REQ 0x%02X VAL 0x%04X IDX 0x%04X LEN %d\n",
+   reqno, value, index, buflen);
ucom_cfg_do_request(sc->sc_udev,
>sc_ucom, , buf, USB_SHORT_XFER_OK, 1000);
 }
@@ -504,6 +508,7 @@ static void
 uchcom_update_version(struct uchcom_softc *sc)
 {
uchcom_get_version(sc, >sc_version);
+   DPRINTF("Chip version: 0x%02x\n", sc->sc_version);
 }
 
 static void
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335618 - stable/11/sys/dev/usb/serial

2018-06-25 Thread Andriy Gapon
Author: avg
Date: Mon Jun 25 08:48:39 2018
New Revision: 335618
URL: https://svnweb.freebsd.org/changeset/base/335618

Log:
  MFC r333998: uchcom: add DPRINTF-s to aid debugging of the driver

Modified:
  stable/11/sys/dev/usb/serial/uchcom.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/usb/serial/uchcom.c
==
--- stable/11/sys/dev/usb/serial/uchcom.c   Mon Jun 25 08:47:54 2018
(r335617)
+++ stable/11/sys/dev/usb/serial/uchcom.c   Mon Jun 25 08:48:39 2018
(r335618)
@@ -414,6 +414,8 @@ uchcom_ctrl_write(struct uchcom_softc *sc, uint8_t req
USETW(req.wIndex, index);
USETW(req.wLength, 0);
 
+   DPRINTF("WR REQ 0x%02X VAL 0x%04X IDX 0x%04X\n",
+   reqno, value, index);
ucom_cfg_do_request(sc->sc_udev,
>sc_ucom, , NULL, 0, 1000);
 }
@@ -430,6 +432,8 @@ uchcom_ctrl_read(struct uchcom_softc *sc, uint8_t reqn
USETW(req.wIndex, index);
USETW(req.wLength, buflen);
 
+   DPRINTF("RD REQ 0x%02X VAL 0x%04X IDX 0x%04X LEN %d\n",
+   reqno, value, index, buflen);
ucom_cfg_do_request(sc->sc_udev,
>sc_ucom, , buf, USB_SHORT_XFER_OK, 1000);
 }
@@ -504,6 +508,7 @@ static void
 uchcom_update_version(struct uchcom_softc *sc)
 {
uchcom_get_version(sc, >sc_version);
+   DPRINTF("Chip version: 0x%02x\n", sc->sc_version);
 }
 
 static void
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335617 - stable/10/sys/dev/usb/serial

2018-06-25 Thread Andriy Gapon
Author: avg
Date: Mon Jun 25 08:47:54 2018
New Revision: 335617
URL: https://svnweb.freebsd.org/changeset/base/335617

Log:
  MFC r333997: uchcom: report detected product based on USB product ID

Modified:
  stable/10/sys/dev/usb/serial/uchcom.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/dev/usb/serial/uchcom.c
==
--- stable/10/sys/dev/usb/serial/uchcom.c   Mon Jun 25 08:47:07 2018
(r335616)
+++ stable/10/sys/dev/usb/serial/uchcom.c   Mon Jun 25 08:47:54 2018
(r335617)
@@ -320,12 +320,16 @@ uchcom_attach(device_t dev)
 
sc->sc_udev = uaa->device;
 
-   switch (uaa->info.bcdDevice) {
-   case UCHCOM_REV_CH340:
+   switch (uaa->info.idProduct) {
+   case USB_PRODUCT_WCH2_CH341SER:
device_printf(dev, "CH340 detected\n");
break;
-   default:
+   case USB_PRODUCT_WCH2_CH341SER_2:
device_printf(dev, "CH341 detected\n");
+   break;
+   default:
+   device_printf(dev, "New CH340/CH341 product 0x%04x detected\n",
+   uaa->info.idProduct);
break;
}
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335616 - stable/11/sys/dev/usb/serial

2018-06-25 Thread Andriy Gapon
Author: avg
Date: Mon Jun 25 08:47:07 2018
New Revision: 335616
URL: https://svnweb.freebsd.org/changeset/base/335616

Log:
  MFC r333997: uchcom: report detected product based on USB product ID

Modified:
  stable/11/sys/dev/usb/serial/uchcom.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/usb/serial/uchcom.c
==
--- stable/11/sys/dev/usb/serial/uchcom.c   Mon Jun 25 08:29:43 2018
(r335615)
+++ stable/11/sys/dev/usb/serial/uchcom.c   Mon Jun 25 08:47:07 2018
(r335616)
@@ -320,12 +320,16 @@ uchcom_attach(device_t dev)
 
sc->sc_udev = uaa->device;
 
-   switch (uaa->info.bcdDevice) {
-   case UCHCOM_REV_CH340:
+   switch (uaa->info.idProduct) {
+   case USB_PRODUCT_WCH2_CH341SER:
device_printf(dev, "CH340 detected\n");
break;
-   default:
+   case USB_PRODUCT_WCH2_CH341SER_2:
device_printf(dev, "CH341 detected\n");
+   break;
+   default:
+   device_printf(dev, "New CH340/CH341 product 0x%04x detected\n",
+   uaa->info.idProduct);
break;
}
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r333590 - head/share/man/man9

2018-06-25 Thread Andriy Gapon
On 25/06/2018 10:25, Ed Schouten wrote:
> Hi Andriy, Matthew,
> 
> 2018-06-24 23:36 GMT+02:00 Andriy Gapon :
>> Perhaps a little application of google can help.
>> [keywords: epoch based reclamation]
> 
> Based on the man page, it wasn't clear that this refers to a generally
> accepted construct or something that is specific to FreeBSD. Any
> objections if I were to extend the man page as follows?

Certainly not from me.
Also, given that epoch(9) is a wrapper around (or based on) the implementation
provided by Concurrency Kit, maybe we should have some kind of a gateway manual
page for the latter.  That page would provide an introduction to Concurrency Kit
and links to its resources.  Then epoch.9 could reference it.

> Index: epoch.9
> ===
> --- epoch.9 (revision 335613)
> +++ epoch.9 (working copy)
> @@ -39,7 +39,7 @@
>  .Nm epoch_wait ,
>  .Nm epoch_call ,
>  .Nm in_epoch ,
> -.Nd kernel epoch based reclamation
> +.Nd kernel Epoch Based Reclamation (EBR)
>  .Sh SYNOPSIS
>  .In sys/param.h
>  .In sys/proc.h
> @@ -191,3 +191,10 @@
>  .Xr sleep 9 ,
>  .Xr sx 9 ,
>  .Xr timeout 9
> +.Rs
> +.%A K. Fraser
> +.%T Practical lock-freedom
> +.%D February 2004
> +.%P 79-81
> +.%U https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-579.pdf
> +.Re
> 


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


Re: svn commit: r333590 - head/share/man/man9

2018-06-25 Thread Ed Schouten
Hi Andriy, Matthew,

2018-06-24 23:36 GMT+02:00 Andriy Gapon :
> Perhaps a little application of google can help.
> [keywords: epoch based reclamation]

Based on the man page, it wasn't clear that this refers to a generally
accepted construct or something that is specific to FreeBSD. Any
objections if I were to extend the man page as follows?

Index: epoch.9
===
--- epoch.9 (revision 335613)
+++ epoch.9 (working copy)
@@ -39,7 +39,7 @@
 .Nm epoch_wait ,
 .Nm epoch_call ,
 .Nm in_epoch ,
-.Nd kernel epoch based reclamation
+.Nd kernel Epoch Based Reclamation (EBR)
 .Sh SYNOPSIS
 .In sys/param.h
 .In sys/proc.h
@@ -191,3 +191,10 @@
 .Xr sleep 9 ,
 .Xr sx 9 ,
 .Xr timeout 9
+.Rs
+.%A K. Fraser
+.%T Practical lock-freedom
+.%D February 2004
+.%P 79-81
+.%U https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-579.pdf
+.Re

-- 
Ed Schouten 
Nuxi, 's-Hertogenbosch, the Netherlands
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335614 - stable/11/contrib/ofed/librdmacm/examples

2018-06-25 Thread Slava Shwartsman
Author: slavash
Date: Mon Jun 25 07:25:41 2018
New Revision: 335614
URL: https://svnweb.freebsd.org/changeset/base/335614

Log:
  MFC r335282:
  Fix false positive on failure
  
  When running mckey, errors may happen in the init/connect stage.
  When leaving multicast groups, we override this value.
  
  Fix that by saving the return value from rdma_leave_multicast to different
  parameter, and only in case of failure in rdma_leave_multicast override it.
  
  Approved by:hselasky (mentor), kib (mentor)
  Sponsored by:   Mellanox Technologies

Modified:
  stable/11/contrib/ofed/librdmacm/examples/mckey.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/contrib/ofed/librdmacm/examples/mckey.c
==
--- stable/11/contrib/ofed/librdmacm/examples/mckey.c   Mon Jun 25 06:57:10 
2018(r335613)
+++ stable/11/contrib/ofed/librdmacm/examples/mckey.c   Mon Jun 25 07:25:41 
2018(r335614)
@@ -475,7 +475,7 @@ static int get_dst_addr(char *dst, struct sockaddr *ad
 
 static int run(void)
 {
-   int i, ret;
+   int i, ret, err;
 
printf("mckey: starting %s\n", is_sender ? "client" : "server");
if (src_addr) {
@@ -543,10 +543,12 @@ static int run(void)
}
 out:
for (i = 0; i < connections; i++) {
-   ret = rdma_leave_multicast(test.nodes[i].cma_id,
+   err = rdma_leave_multicast(test.nodes[i].cma_id,
   test.dst_addr);
-   if (ret)
+   if (err) {
perror("mckey: failure leaving");
+   ret = err;
+   }
}
return ret;
 }
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r335613 - head/share/man/man9

2018-06-25 Thread Ed Schouten
Author: ed
Date: Mon Jun 25 06:57:10 2018
New Revision: 335613
URL: https://svnweb.freebsd.org/changeset/base/335613

Log:
  Fix spelling of "reclamation".

Modified:
  head/share/man/man9/epoch.9

Modified: head/share/man/man9/epoch.9
==
--- head/share/man/man9/epoch.9 Mon Jun 25 01:29:54 2018(r335612)
+++ head/share/man/man9/epoch.9 Mon Jun 25 06:57:10 2018(r335613)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 21, 2018
+.Dd June 25, 2018
 .Dt EPOCH 9
 .Os
 .Sh NAME
@@ -39,7 +39,7 @@
 .Nm epoch_wait ,
 .Nm epoch_call ,
 .Nm in_epoch ,
-.Nd kernel epoch based reclaimation
+.Nd kernel epoch based reclamation
 .Sh SYNOPSIS
 .In sys/param.h
 .In sys/proc.h
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"