svn commit: r328507 - head/sys/tools

2018-01-28 Thread Warner Losh
Author: imp
Date: Sun Jan 28 05:13:08 2018
New Revision: 328507
URL: https://svnweb.freebsd.org/changeset/base/328507

Log:
  Avoid using \$. It's an unknown escape sequence. Some awks warn about
  that. Instead, simply remove the sequence entirely because we never
  commit the generated files.

Modified:
  head/sys/tools/usbdevs2h.awk

Modified: head/sys/tools/usbdevs2h.awk
==
--- head/sys/tools/usbdevs2h.awkSun Jan 28 03:16:54 2018
(r328506)
+++ head/sys/tools/usbdevs2h.awkSun Jan 28 05:13:08 2018
(r328507)
@@ -42,14 +42,6 @@ function usage()
 
 function header(file)
 {
-   if (os == "NetBSD")
-   printf("/*\t\$NetBSD\$\t*/\n\n") > file
-   else if (os == "FreeBSD")
-   printf("/* \$FreeBSD\$ */\n\n") > file
-   else if (os == "OpenBSD")
-   printf("/*\t\$OpenBSD\$\t*/\n\n") > file
-   else
-   printf("/* ??? */\n\n") > file
printf("/*\n") > file
printf(" * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.\n") \
> file
___
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: r328508 - head/sys/kern

2018-01-28 Thread Warner Losh
Author: imp
Date: Sun Jan 28 05:13:17 2018
New Revision: 328508
URL: https://svnweb.freebsd.org/changeset/base/328508

Log:
  Add the DF_SUSPENDED flag to flags that are printed.

Modified:
  head/sys/kern/subr_bus.c

Modified: head/sys/kern/subr_bus.c
==
--- head/sys/kern/subr_bus.cSun Jan 28 05:13:08 2018(r328507)
+++ head/sys/kern/subr_bus.cSun Jan 28 05:13:17 2018(r328508)
@@ -5060,6 +5060,7 @@ print_device_short(device_t dev, int indent)
(dev->flags&DF_WILDCARD? "wildcard,":""),
(dev->flags&DF_DESCMALLOCED? "descmalloced,":""),
(dev->flags&DF_REBID? "rebiddable,":""),
+   (dev->flags&DF_SUSPENDED? "suspended,":""),
(dev->ivars? "":"no "),
(dev->softc? "":"no "),
dev->busy));
___
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: r328505 - head/stand/fdt

2018-01-28 Thread Kyle Evans
Author: kevans
Date: Sun Jan 28 03:07:22 2018
New Revision: 328505
URL: https://svnweb.freebsd.org/changeset/base/328505

Log:
  stand/fdt: Check /compatible property on overlay if it exists
  
  Example overlays seen in other places use a compatible property on root node
  of an overlay to specify SOC compatibility. These don't get merged into base
  FDT as they're not part of a fragment, but it's expected that consumers of
  the overlay may want to check it.
  
  If /compatible on the overlay is missing, just apply it. This is the "I know
  what I'm doing" mode for those wanting to whip up a quick overlay and apply
  it. An overlay intended for distribution should include /compatible so as
  not to break a user's system.
  
  If /compatible on the overlay exists, honor it and cross-check it with
  /compatible on the base FDT. If /compatible on the base FDT is missing in
  this case, don't apply the overlay rather than risk breaking the system.
  
  Move the COPYOUT of overlay material to before we allocate space for
  next_fdtp so that we can avoid the allocation and copy into next_fdtp if we
  already know that the overlay can't apply.
  
  This gives way to the possibility of autoloading overlays found in
  /boot/overlays, since this provides a means of filtering out overlays not
  applicable to the current board.
  
  Reviewed by:  gonzo
  MFC after:1 week
  Differential Revision:https://reviews.freebsd.org/D13969

Modified:
  head/stand/fdt/fdt_loader_cmd.c

Modified: head/stand/fdt/fdt_loader_cmd.c
==
--- head/stand/fdt/fdt_loader_cmd.c Sun Jan 28 01:22:15 2018
(r328504)
+++ head/stand/fdt/fdt_loader_cmd.c Sun Jan 28 03:07:22 2018
(r328505)
@@ -74,6 +74,7 @@ static vm_offset_t fdtp_va = 0;
 
 static int fdt_load_dtb(vm_offset_t va);
 static void fdt_print_overlay_load_error(int err, const char *filename);
+static int fdt_check_overlay_compatible(void *base_fdt, void *overlay_fdt);
 
 static int fdt_cmd_nyi(int argc, char *argv[]);
 static int fdt_load_dtb_overlays_string(const char * filenames);
@@ -374,6 +375,62 @@ fdt_load_dtb_overlays_string(const char * filenames)
return (0);
 }
 
+/*
+ * fdt_check_overlay_compatible - check that the overlay_fdt is compatible with
+ * base_fdt before we attempt to apply it. It will need to re-calculate offsets
+ * in the base every time, rather than trying to cache them earlier in the
+ * process, because the overlay application process can/will invalidate a lot 
of
+ * offsets.
+ */
+static int
+fdt_check_overlay_compatible(void *base_fdt, void *overlay_fdt)
+{
+   const char *compat;
+   int compat_len, ocompat_len;
+   int oroot_offset, root_offset;
+   int slidx, sllen;
+
+   oroot_offset = fdt_path_offset(overlay_fdt, "/");
+   if (oroot_offset < 0)
+   return (oroot_offset);
+   /*
+* If /compatible in the overlay does not exist or if it is empty, then
+* we're automatically compatible. We do this for the sake of rapid
+* overlay development for overlays that aren't intended to be deployed.
+* The user assumes the risk of using an overlay without /compatible.
+*/
+   if (fdt_get_property(overlay_fdt, oroot_offset, "compatible",
+   &ocompat_len) == NULL || ocompat_len == 0)
+   return (0);
+   root_offset = fdt_path_offset(base_fdt, "/");
+   if (root_offset < 0)
+   return (root_offset);
+   /*
+* However, an empty or missing /compatible on the base is an error,
+* because allowing this offers no advantages.
+*/
+   if (fdt_get_property(base_fdt, root_offset, "compatible",
+   &compat_len) == NULL)
+   return (compat_len);
+   else if(compat_len == 0)
+   return (1);
+
+   slidx = 0;
+   compat = fdt_stringlist_get(overlay_fdt, oroot_offset, "compatible",
+   slidx, &sllen);
+   while (compat != NULL) {
+   if (fdt_stringlist_search(base_fdt, root_offset, "compatible",
+   compat) >= 0)
+   return (0);
+   ++slidx;
+   compat = fdt_stringlist_get(overlay_fdt, oroot_offset,
+   "compatible", slidx, &sllen);
+   };
+
+   /* We've exhausted the overlay's /compatible property... no match */
+   return (1);
+}
+
 void
 fdt_apply_overlays()
 {
@@ -408,6 +465,13 @@ fdt_apply_overlays()
current_fdtp = fdtp;
current_fdtp_size = fdtp_size;
for (fp = file_findfile(NULL, "dtbo"); fp != NULL; fp = fp->f_next) {
+   COPYOUT(fp->f_addr, overlay, fp->f_size);
+   /* Check compatible first to avoid unnecessary allocation */
+   rv = fdt_check_overlay_compatible(current_fdtp, overlay);
+   if (rv != 0) {
+   printf("DTB overlay '%s' not compatible\n", fp->f_n

Re: svn commit: r328257 - in head/sys: arm/broadcom/bcm2835 dts/arm modules

2018-01-28 Thread Ian Lepore
On Sat, 2018-01-27 at 13:32 -0800, Rodney W. Grimes wrote:
> > 
> > On Sat, 27 Jan 2018 12:13:57 -0800
> > Adrian Chadd  wrote:
> > 
> > > 
> > > Hi,
> > > 
> > > Find the middle ground. Don't dissuade the developer too much.
> >  This is what happened two years ago when I started hacking on the
> > allwinner SoCs :
> > 
> >  - I asked what should be done for bringing a new board
> >  - andrew@ told me that we first need to switch to upstream dts and
> > update drivers.
> >  - Guess what, I did that.
> Great, thats good co-operatation and communications, sometimes though
> it is not so smooth.  The better we become at dealing with the not
> so smooth the faster forward progress can be made.
> 
> > 
> > > 
> > > Here's an example:
> > > 
> > > Make the driver follow DTS, allow a tunable/kenv check for it to
> > > override whether it needs to be in the DTS or not (the "keep phk happy
> > > for now" compromise) and have it default to obeying the device tree.
> > > 
> > > That way phk is kept happy and the defaults are the same as normal-ish
> > > ARM /and/ you have a springboard to experiment with extending FDT
> > > overlays at runtime for people who wish to do so.
> >  I don't care about keeping phk@ (or any other developer) happy, we
> > have a standard, let's stick to it.
> *sigh*  Let me ask you if you do not care about keeping any other
> developers happy, why should any of them be concerned about keeping
> you happy?  We need to always try to find middle ground and
> co-operate in positive ways.
> 
> On the "we have a standard" front, well when standards get in the way
> of forward progress they are often side stepped.  Maybe this standard
> is not such a good standard and warts are going to form around it. I
> have seen some discusssion at least on ways to improve the current
> situation, hopefully someone takes them and runs with them.
> 
> Others have pointed out they do not like the current model in that
> it gets in the way of developement progress.   I can see this point.
> I can see phk's points, and I can see your points.
> 
> IMHO if we shove the standard down our own throats we are in
> effect cutting our hands off in the process, not somethig we
> really want to do is it?
> 
> > 
> > > 
> > > (I personally hate having to edit the dts/recompile/reboot for every
> > > test hardware change; it makes breadboarding things up kinda
> > > hilariously annoying.)
> >  Use overlays then. And if you don't want to reboot provide patch for
> > loading overlays at runtime.
> Are those the only solutions?

Lots of nice platitudes, but the bottom line is that the commit
violates the existing conventions in ways that make it the only such
violator.  The reason isn't "because it's the only way to make
progress", the reason is "because I'm philosophically opposed to
needing a reboot after making a one-time configuration change to how
the hardware will be used."

Hacks to move forward in the face of broken or missing functionality
are something we have to live with, given how understaffed we are for
correcting the deficiencies.

Hacks to assuage someone's personal preferences or philosophy, IMO,
should not be something we have to live with.

-- Ian
___
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: r328506 - head/contrib/opie/libopie

2018-01-28 Thread Pedro F. Giffuni
Author: pfg
Date: Sun Jan 28 03:16:54 2018
New Revision: 328506
URL: https://svnweb.freebsd.org/changeset/base/328506

Log:
  Revert r328492:
  "Fix gcc80 -Wsizeof-pointer-memaccess warning."
  
  The warning is bogus: GCC8 only looks at the size of the destination.
  We shouldn't be fixing imaginary problems, so perhaps its better to deal
  with this later on by disabling such warnings.
  
  Pointed out by:   ed, bde

Modified:
  head/contrib/opie/libopie/insecure.c

Modified: head/contrib/opie/libopie/insecure.c
==
--- head/contrib/opie/libopie/insecure.cSun Jan 28 03:07:22 2018
(r328505)
+++ head/contrib/opie/libopie/insecure.cSun Jan 28 03:16:54 2018
(r328506)
@@ -135,7 +135,8 @@ int opieinsecure FUNCTION_NOARGS
char host[sizeof(utmp.ut_host) + 1];
insecure = 1;
 
-   strncpy(host, utmp.ut_host, sizeof(host));
+   strncpy(host, utmp.ut_host, sizeof(utmp.ut_host));
+   host[sizeof(utmp.ut_host)] = 0;
 
if (s = strchr(host, ':')) {
  int n = s - host;
___
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: r328509 - head/tools/tools

2018-01-28 Thread Eitan Adler
Author: eadler
Date: Sun Jan 28 05:45:20 2018
New Revision: 328509
URL: https://svnweb.freebsd.org/changeset/base/328509

Log:
  tools: remove note about diffburst.
  
  Said tool was removed in 1999 in r51579

Modified:
  head/tools/tools/README

Modified: head/tools/tools/README
==
--- head/tools/tools/README Sun Jan 28 05:13:17 2018(r328508)
+++ head/tools/tools/README Sun Jan 28 05:45:20 2018(r328509)
@@ -16,8 +16,6 @@ commitsdb A tool for reconstructing commit history usi
 crypto Test and exercise tools related to the crypto framework
 cxgbetool  A tool for the cxgbe(4) driver.
 cxgbtool   A tool for the cxgb(4) driver.
-diffburst  OBSOLETE: equivalent functionality is available via split -p.
-   For example: "split -p ^diff < patchfile". See split(1).
 drmTools specific to the DRM/KMS device drivers.
 editingEditor modes and the like to help editing FreeBSD code.
 epfe   Extract printing filter examples from printing.sgml.
___
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: r328257 - in head/sys: arm/broadcom/bcm2835 dts/arm modules

2018-01-28 Thread Emmanuel Vadot
On Sat, 27 Jan 2018 13:32:22 -0800 (PST)
"Rodney W. Grimes"  wrote:

> > On Sat, 27 Jan 2018 12:13:57 -0800
> > Adrian Chadd  wrote:
> > 
> > > Hi,
> > > 
> > > Find the middle ground. Don't dissuade the developer too much.
> > 
> >  This is what happened two years ago when I started hacking on the
> > allwinner SoCs :
> > 
> >  - I asked what should be done for bringing a new board
> >  - andrew@ told me that we first need to switch to upstream dts and
> > update drivers.
> >  - Guess what, I did that.
> 
> Great, thats good co-operatation and communications, sometimes though
> it is not so smooth.  The better we become at dealing with the not
> so smooth the faster forward progress can be made.
> 
> > > Here's an example:
> > > 
> > > Make the driver follow DTS, allow a tunable/kenv check for it to
> > > override whether it needs to be in the DTS or not (the "keep phk happy
> > > for now" compromise) and have it default to obeying the device tree.
> > > 
> > > That way phk is kept happy and the defaults are the same as normal-ish
> > > ARM /and/ you have a springboard to experiment with extending FDT
> > > overlays at runtime for people who wish to do so.
> > 
> >  I don't care about keeping phk@ (or any other developer) happy, we
> > have a standard, let's stick to it.
> 
> *sigh*  Let me ask you if you do not care about keeping any other
> developers happy, why should any of them be concerned about keeping
> you happy?  We need to always try to find middle ground and
> co-operate in positive ways.

 If my goal was making me happy, the Allwinner support would be very
messy. The goal isn't to make me happy, the goal is to make driver
standard (so developer are happy).

> On the "we have a standard" front, well when standards get in the way
> of forward progress they are often side stepped.  Maybe this standard
> is not such a good standard and warts are going to form around it. I
> have seen some discusssion at least on ways to improve the current
> situation, hopefully someone takes them and runs with them.

 Until a new standard is born we need to stick to the current one.

> Others have pointed out they do not like the current model in that
> it gets in the way of developement progress.   I can see this point.
> I can see phk's points, and I can see your points.

 Who are the "Others" ?

> IMHO if we shove the standard down our own throats we are in
> effect cutting our hands off in the process, not somethig we
> really want to do is it?

 No.

> > > (I personally hate having to edit the dts/recompile/reboot for every
> > > test hardware change; it makes breadboarding things up kinda
> > > hilariously annoying.)
> > 
> >  Use overlays then. And if you don't want to reboot provide patch for
> > loading overlays at runtime.
> 
> Are those the only solutions?
> 
> > > -adrian
> > Emmanuel Vadot  
> 
> -- 
> Rod Grimes rgri...@freebsd.org


-- 
Emmanuel Vadot  
___
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: r328166 - in head/sys: amd64/amd64 x86/include x86/x86

2018-01-28 Thread Dexuan-BSD Cui
On Sat, Jan 27, 2018 at 3:33 AM, Konstantin Belousov
 wrote:
>
> On Sat, Jan 27, 2018 at 12:56:47AM -0800, Dexuan-BSD Cui wrote:
> > Hi,
> > Today I found the KPTI patch broke FreeBSD VM running on Hyper-V: the VM
> > can't boot due to:
> >
> > vmbus0: cannot find free IDT vector
> >
>
> Try r328468.
Hi kib,
It fixes the issue. Thanks for the quick help!

-- Dexuan
___
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: r328512 - head/sys/arm64/arm64

2018-01-28 Thread Michal Meloun
Author: mmel
Date: Sun Jan 28 15:33:32 2018
New Revision: 328512
URL: https://svnweb.freebsd.org/changeset/base/328512

Log:
  Remove #endif forgotten in r328510.
  
  Pointy hat: mmel

Modified:
  head/sys/arm64/arm64/pmap.c

Modified: head/sys/arm64/arm64/pmap.c
==
--- head/sys/arm64/arm64/pmap.c Sun Jan 28 15:20:45 2018(r328511)
+++ head/sys/arm64/arm64/pmap.c Sun Jan 28 15:33:32 2018(r328512)
@@ -3070,7 +3070,6 @@ validate:
"pmap %p va 0x%#lx pte 0x%lx",
__func__, pmap, va, new_l3);
}
-#endif
} else {
/* New mappig */
pmap_load_store(l3, new_l3);
___
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: r328511 - head/sys/dev/extres/clk

2018-01-28 Thread Michal Meloun
Author: mmel
Date: Sun Jan 28 15:20:45 2018
New Revision: 328511
URL: https://svnweb.freebsd.org/changeset/base/328511

Log:
  diff --git a/sys/dev/extres/clk/clk.c b/sys/dev/extres/clk/clk.c
  index c6a1f466ceb..c3708a0ce27 100644
  --- a/sys/dev/extres/clk/clk.c
  +++ b/sys/dev/extres/clk/clk.c
  @@ -642,10 +642,11 @@ clknode_adjust_parent(struct clknode *clknode, int idx)
if (clknode->parent_cnt == 0)
return;
if ((idx == CLKNODE_IDX_NONE) || (idx >= clknode->parent_cnt))
  - panic("Invalid clock parent index\n");
  + panic("%s: Invalid parent index %d for clock %s",
  + __func__, idx, clknode->name);
  
if (clknode->parents[idx] == NULL)
  - panic("%s: Attempt to set invalid parent %d for clock %s",
  + panic("%s: Invalid parent index %d for clock %s",
__func__, idx, clknode->name);
  
/* Remove me from old children list. */
  @@ -674,8 +675,8 @@ clknode_init_parent_idx(struct clknode *clknode, int idx)
if ((idx == CLKNODE_IDX_NONE) ||
(idx >= clknode->parent_cnt) ||
(clknode->parent_names[idx] == NULL))
  - panic("%s: Invalid clock parent index: %d\n", __func__, idx);
  -
  + panic("%s: Invalid parent index %d for clock %s",
  + __func__, idx, clknode->name);
clknode->parent_idx = idx;
   }

Modified:
  head/sys/dev/extres/clk/clk.c

Modified: head/sys/dev/extres/clk/clk.c
==
--- head/sys/dev/extres/clk/clk.c   Sun Jan 28 15:02:49 2018
(r328510)
+++ head/sys/dev/extres/clk/clk.c   Sun Jan 28 15:20:45 2018
(r328511)
@@ -642,10 +642,11 @@ clknode_adjust_parent(struct clknode *clknode, int idx
if (clknode->parent_cnt == 0)
return;
if ((idx == CLKNODE_IDX_NONE) || (idx >= clknode->parent_cnt))
-   panic("Invalid clock parent index\n");
+   panic("%s: Invalid parent index %d for clock %s",
+   __func__, idx, clknode->name);
 
if (clknode->parents[idx] == NULL)
-   panic("%s: Attempt to set invalid parent %d for clock %s",
+   panic("%s: Invalid parent index %d for clock %s",
__func__, idx, clknode->name);
 
/* Remove me from old children list. */
@@ -674,8 +675,8 @@ clknode_init_parent_idx(struct clknode *clknode, int i
if ((idx == CLKNODE_IDX_NONE) ||
(idx >= clknode->parent_cnt) ||
(clknode->parent_names[idx] == NULL))
-   panic("%s: Invalid clock parent index: %d\n", __func__, idx);
-
+   panic("%s: Invalid parent index %d for clock %s",
+   __func__, idx, clknode->name);
clknode->parent_idx = idx;
 }
 
___
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: r328510 - head/sys/arm64/arm64

2018-01-28 Thread Michal Meloun
Author: mmel
Date: Sun Jan 28 15:02:49 2018
New Revision: 328510
URL: https://svnweb.freebsd.org/changeset/base/328510

Log:
  Fix handling of I-cache sync operations
  
  - pmap_enter_object() can be used for mapping of executable pages, so it's
necessary to handle I-cache synchronization within it.
  
  - Fix race in I-cache synchronization in pmap_enter(). The current code 
firstly
maps given page to target VA and then do I-cache sync on it. This causes
race, because this mapping become visible to other threads, before I-cache
is synced.
Do sync I-cache firstly (by using DMAP VA) and then map it to target VA.
  
  - ARM64 ARM permits implementation of aliased (AIVIVT, VIPT) I-cache, but we
can use different that final VA for flushing it. So we should use full
I-cache flush on affected platforms. For now, and as temporary solution,
use full flush always.

Modified:
  head/sys/arm64/arm64/cpufunc_asm.S
  head/sys/arm64/arm64/pmap.c

Modified: head/sys/arm64/arm64/cpufunc_asm.S
==
--- head/sys/arm64/arm64/cpufunc_asm.S  Sun Jan 28 05:45:20 2018
(r328509)
+++ head/sys/arm64/arm64/cpufunc_asm.S  Sun Jan 28 15:02:49 2018
(r328510)
@@ -138,5 +138,12 @@ END(arm64_idcache_wbinv_range)
  * void arm64_icache_sync_range(vm_offset_t, vm_size_t)
  */
 ENTRY(arm64_icache_sync_range)
-   cache_handle_range  dcop = cvau, ic = 1, icop = ivau
+   /*
+* XXX Temporary solution - I-cache flush should be range based for
+* PIPT cache or IALLUIS for VIVT or VIPT caches
+*/
+/* cache_handle_range  dcop = cvau, ic = 1, icop = ivau */
+   cache_handle_range  dcop = cvau
+   ic  ialluis
+   dsb ish
 END(arm64_icache_sync_range)

Modified: head/sys/arm64/arm64/pmap.c
==
--- head/sys/arm64/arm64/pmap.c Sun Jan 28 05:45:20 2018(r328509)
+++ head/sys/arm64/arm64/pmap.c Sun Jan 28 15:02:49 2018(r328510)
@@ -2878,8 +2878,6 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, v
("pmap_enter: Invalid page entry, va: 0x%lx", va));
KASSERT(lvl == 2,
("pmap_enter: Invalid level %d", lvl));
-
-   l3 = pmap_l2_to_l3(pde, va);
} else {
/*
 * If we get a level 2 pde it must point to a level 3 entry
@@ -2923,6 +2921,7 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, v
case 1:
/* Get the l2 pde to update */
pde = pmap_l1_to_l2(pde, va);
+   KASSERT(pde != NULL, ("..."));
 
l3_m = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL |
VM_ALLOC_NOOBJ | VM_ALLOC_WIRED |
@@ -2937,9 +2936,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, v
break;
}
}
-   l3 = pmap_l2_to_l3(pde, va);
-   pmap_invalidate_page(pmap, va);
}
+   l3 = pmap_l2_to_l3(pde, va);
 havel3:
 
om = NULL;
@@ -3011,15 +3009,29 @@ havel3:
vm_page_aflag_set(m, PGA_WRITEABLE);
}
 
-   /*
-* Update the L3 entry.
-*/
-   if (orig_l3 != 0) {
 validate:
-   orig_l3 = pmap_load(l3);
-   opa = orig_l3 & ~ATTR_MASK;
+   /*
+* Sync icache if exec permission and attribute VM_MEMATTR_WRITE_BACK
+* is set. Do it now, before the mapping is stored and made
+* valid for hardware table walk. If done later, then other can
+* access this page before caches are properly synced.
+* Don't do it for kernel memory which is mapped with exec
+* permission even if the memory isn't going to hold executable
+* code. The only time when icache sync is needed is after
+* kernel module is loaded and the relocation info is processed.
+* And it's done in elf_cpu_load_file().
+   */
+   if ((prot & VM_PROT_EXECUTE) &&  pmap != kernel_pmap &&
+   m->md.pv_memattr == VM_MEMATTR_WRITE_BACK &&
+   (opa != pa || (orig_l3 & ATTR_XN)))
+   cpu_icache_sync_range(PHYS_TO_DMAP(pa), PAGE_SIZE);
 
+   /*
+* Update the L3 entry
+*/
+   if (pmap_l3_valid(orig_l3)) {
if (opa != pa) {
+   /* different PA  */
pmap_update_entry(pmap, l3, new_l3, va, PAGE_SIZE);
if ((orig_l3 & ATTR_SW_MANAGED) != 0) {
om = PHYS_TO_VM_PAGE(opa);
@@ -3035,24 +3047,35 @@ validate:
TAILQ_EMPTY(&pa_to_pvh(opa)->pv_list)))
vm_page_aflag_clear(om, PGA_WRITEABLE);
 

svn commit: r328513 - head/contrib/llvm/tools/clang/lib/Basic/Targets

2018-01-28 Thread Dimitry Andric
Author: dim
Date: Sun Jan 28 16:10:40 2018
New Revision: 328513
URL: https://svnweb.freebsd.org/changeset/base/328513

Log:
  Pull in r322245 from upstream clang trunk (by Craig Topper):
  
[X86] Make -mavx512f imply -mfma and -mf16c in the frontend like it
does in the backend.
  
Similarly, make -mno-fma and -mno-f16c imply -mno-avx512f.
  
Withou this  "-mno-sse -mavx512f" ends up with avx512f being enabled
in the frontend but disabled in the backend.
  
  Reported by:  pawel
  PR:   225488

Modified:
  head/contrib/llvm/tools/clang/lib/Basic/Targets/X86.cpp

Modified: head/contrib/llvm/tools/clang/lib/Basic/Targets/X86.cpp
==
--- head/contrib/llvm/tools/clang/lib/Basic/Targets/X86.cpp Sun Jan 28 
15:33:32 2018(r328512)
+++ head/contrib/llvm/tools/clang/lib/Basic/Targets/X86.cpp Sun Jan 28 
16:10:40 2018(r328513)
@@ -409,7 +409,7 @@ void X86TargetInfo::setSSELevel(llvm::StringMap 
   if (Enabled) {
 switch (Level) {
 case AVX512F:
-  Features["avx512f"] = true;
+  Features["avx512f"] = Features["fma"] = Features["f16c"] = true;
   LLVM_FALLTHROUGH;
 case AVX2:
   Features["avx2"] = true;
@@ -623,6 +623,8 @@ void X86TargetInfo::setFeatureEnabledImpl(llvm::String
   } else if (Name == "fma") {
 if (Enabled)
   setSSELevel(Features, AVX, Enabled);
+else
+  setSSELevel(Features, AVX512F, Enabled);
   } else if (Name == "fma4") {
 setXOPLevel(Features, FMA4, Enabled);
   } else if (Name == "xop") {
@@ -632,6 +634,8 @@ void X86TargetInfo::setFeatureEnabledImpl(llvm::String
   } else if (Name == "f16c") {
 if (Enabled)
   setSSELevel(Features, AVX, Enabled);
+else
+  setSSELevel(Features, AVX512F, Enabled);
   } else if (Name == "sha") {
 if (Enabled)
   setSSELevel(Features, SSE2, Enabled);
___
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"


ps output line length (was: svn commit: r314685 - head/bin/ps)

2018-01-28 Thread Mike Karels
Recently, I was investigating an issue with top on -current while doing
a "make buildworld", and ran "ps axu|more" for comparison.  To my surprise,
I got only a few very long lines of output, containing full command lines
for compiler runs.  This quickly led me to the following commit, which
I unfortunately missed at the time, along with the following discussion:

> Author: cem
> Date: Sat Mar  4 22:38:10 2017
> New Revision: 314685
> URL: https://svnweb.freebsd.org/changeset/base/314685

> Log:
>   ps(1): Only detect terminal width if stdout is a tty
>   
>   If stdout isn't a tty, use unlimited width output rather than truncating to
>   79 characters.  This is helpful for shell scripts or e.g., 'ps | grep foo'.
>   
>   This hardcoded width has some history: In The Beginning of History[0], the
>   width of ps was hardcoded as 80 bytes.  In 1985, Bloom@ added detection
>   using TIOCGWINSZ on stdin.[1]  In 1986, Kirk merged a change to check
>   stdout's window size instead.  In 1990, the fallback checks to stderr and
>   stdin's TIOCGWINSZ were added by Marc@, with the commit message "new
>   version."[2]
>   
>   OS X Darwin has a very similar modification to ps(1), which simply sets
>   UNLIMITED for all non-tty outputs.[3]  I've chosen to respect COLUMNS
>   instead of behaving identically to Darwin here, but I don't feel strongly
>   about that.  We could match OS X for parity if that is desired.
>   
>   [0]: https://svnweb.freebsd.org/csrg/bin/ps/ps.c?annotate=1065
>   [1]: https://svnweb.freebsd.org/csrg/bin/ps/ps.c?r1=18105&r2=18106
>   [2]:
>   https://svnweb.freebsd.org/csrg/bin/ps/ps.c?r1=40675&r2=40674&pathrev=40675
>   [3]:
>   https://opensource.apple.com/source/adv_cmds/adv_cmds-168/ps/ps.c.auto.html
>   
>   PR: 217159
>   Reported by:Deepak Nagaraj 

> Modified:
>   head/bin/ps/ps.c

> Modified: head/bin/ps/ps.c
> ==
> --- head/bin/ps/ps.c  Sat Mar  4 22:23:59 2017(r314684)
> +++ head/bin/ps/ps.c  Sat Mar  4 22:38:10 2017(r314685)
> @@ -194,6 +194,8 @@ main(int argc, char *argv[])
>  
>   if ((cols = getenv("COLUMNS")) != NULL && *cols != '\0')
>   termwidth = atoi(cols);
> + else if (!isatty(STDOUT_FILENO))
> + termwidth = UNLIMITED;
>   else if ((ioctl(STDOUT_FILENO, TIOCGWINSZ, (char *)&ws) == -1 &&
>ioctl(STDERR_FILENO, TIOCGWINSZ, (char *)&ws) == -1 &&
>ioctl(STDIN_FILENO,  TIOCGWINSZ, (char *)&ws) == -1) ||

There were several following messages discussing this change, most notably
one by Bruce Evans
(https://docs.freebsd.org/cgi/getmsg.cgi?fetch=55022+0+archive/2017/svn-src-head/20170312.svn-src-head).
I agree with his rational, and disagree with the change.  It seems to me
that the consensus was that the change was incorrect, although that might
just be my opinion.  However, I really think that the change needs to be
reverted.

The rationale for the original code was that, for interactive uses, the
output line length should be the same for "ps ...", "ps ...|more", and
"ps ... |grep".  The -w option exists to make the line longer; there is
no option to use the terminal size even if the output is redirected.
Hence, the tests for stderr or stdin being a tty.  This behavior has
been in place since 1990, as noted, and no substantial rationale has
been given for changing it other than "it doesn't matter if you use
less with side-to-side scrolling."  fwiw, I'm sure I discussed that
code with Marc at the time.

As was stated, scripts that want to use the full line should use -ww.
Interactive users have long been used to using -w when they need longer
output lines, e.g. to match patterns that don't occur within a screen's
width.

I propose reverting this change.  

Mike
___
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: ps output line length (was: svn commit: r314685 - head/bin/ps)

2018-01-28 Thread Warner Losh
On Jan 28, 2018 9:51 AM, "Mike Karels"  wrote:

Recently, I was investigating an issue with top on -current while doing
a "make buildworld", and ran "ps axu|more" for comparison.  To my surprise,
I got only a few very long lines of output, containing full command lines
for compiler runs.  This quickly led me to the following commit, which
I unfortunately missed at the time, along with the following discussion:

> Author: cem
> Date: Sat Mar  4 22:38:10 2017
> New Revision: 314685
> URL: https://svnweb.freebsd.org/changeset/base/314685

> Log:
>   ps(1): Only detect terminal width if stdout is a tty
>
>   If stdout isn't a tty, use unlimited width output rather than
truncating to
>   79 characters.  This is helpful for shell scripts or e.g., 'ps | grep
foo'.
>
>   This hardcoded width has some history: In The Beginning of History[0],
the
>   width of ps was hardcoded as 80 bytes.  In 1985, Bloom@ added detection
>   using TIOCGWINSZ on stdin.[1]  In 1986, Kirk merged a change to check
>   stdout's window size instead.  In 1990, the fallback checks to stderr
and
>   stdin's TIOCGWINSZ were added by Marc@, with the commit message "new
>   version."[2]
>
>   OS X Darwin has a very similar modification to ps(1), which simply sets
>   UNLIMITED for all non-tty outputs.[3]  I've chosen to respect COLUMNS
>   instead of behaving identically to Darwin here, but I don't feel
strongly
>   about that.  We could match OS X for parity if that is desired.
>
>   [0]: https://svnweb.freebsd.org/csrg/bin/ps/ps.c?annotate=1065
>   [1]: https://svnweb.freebsd.org/csrg/bin/ps/ps.c?r1=18105&r2=18106
>   [2]:
>   https://svnweb.freebsd.org/csrg/bin/ps/ps.c?r1=40675&r2=
40674&pathrev=40675
>   [3]:
>   https://opensource.apple.com/source/adv_cmds/adv_cmds-168/
ps/ps.c.auto.html
>
>   PR: 217159
>   Reported by:Deepak Nagaraj 

> Modified:
>   head/bin/ps/ps.c

> Modified: head/bin/ps/ps.c
> 
==
> --- head/bin/ps/ps.c  Sat Mar  4 22:23:59 2017(r314684)
> +++ head/bin/ps/ps.c  Sat Mar  4 22:38:10 2017(r314685)
> @@ -194,6 +194,8 @@ main(int argc, char *argv[])
>
>   if ((cols = getenv("COLUMNS")) != NULL && *cols != '\0')
>   termwidth = atoi(cols);
> + else if (!isatty(STDOUT_FILENO))
> + termwidth = UNLIMITED;
>   else if ((ioctl(STDOUT_FILENO, TIOCGWINSZ, (char *)&ws) == -1 &&
>ioctl(STDERR_FILENO, TIOCGWINSZ, (char *)&ws) == -1 &&
>ioctl(STDIN_FILENO,  TIOCGWINSZ, (char *)&ws) == -1) ||

There were several following messages discussing this change, most notably
one by Bruce Evans
(https://docs.freebsd.org/cgi/getmsg.cgi?fetch=55022+0+
archive/2017/svn-src-head/20170312.svn-src-head).
I agree with his rational, and disagree with the change.  It seems to me
that the consensus was that the change was incorrect, although that might
just be my opinion.  However, I really think that the change needs to be
reverted.

The rationale for the original code was that, for interactive uses, the
output line length should be the same for "ps ...", "ps ...|more", and
"ps ... |grep".  The -w option exists to make the line longer; there is
no option to use the terminal size even if the output is redirected.
Hence, the tests for stderr or stdin being a tty.  This behavior has
been in place since 1990, as noted, and no substantial rationale has
been given for changing it other than "it doesn't matter if you use
less with side-to-side scrolling."  fwiw, I'm sure I discussed that
code with Marc at the time.

As was stated, scripts that want to use the full line should use -ww.
Interactive users have long been used to using -w when they need longer
output lines, e.g. to match patterns that don't occur within a screen's
width.

I propose reverting this change.


I tend to agree, but auxww is hard coded into my fingers.

Warner
___
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: r328514 - head/sys/x86/x86

2018-01-28 Thread Alexander Motin
Author: mav
Date: Sun Jan 28 18:18:03 2018
New Revision: 328514
URL: https://svnweb.freebsd.org/changeset/base/328514

Log:
  Assume Always Running APIC Timer for AMD CPU families >= 0x12.
  
  Fallback to HPET may cause locks congestions on many-core systems.
  This change replicates Linux behavior.
  
  MFC after:1 month

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

Modified: head/sys/x86/x86/local_apic.c
==
--- head/sys/x86/x86/local_apic.c   Sun Jan 28 16:10:40 2018
(r328513)
+++ head/sys/x86/x86/local_apic.c   Sun Jan 28 18:18:03 2018
(r328514)
@@ -526,6 +526,9 @@ native_lapic_init(vm_paddr_t addr)
do_cpuid(0x06, regs);
if ((regs[0] & CPUTPM1_ARAT) != 0)
arat = 1;
+   } else if (cpu_vendor_id == CPU_VENDOR_AMD &&
+   CPUID_TO_FAMILY(cpu_id) >= 0x12) {
+   arat = 1;
}
bzero(&lapic_et, sizeof(lapic_et));
lapic_et.et_name = "LAPIC";
___
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: r328257 - in head/sys: arm/broadcom/bcm2835 dts/arm modules

2018-01-28 Thread Emmanuel Vadot

On 2018-01-28 00:14, Poul-Henning Kamp wrote:


In message <20180127210801.37b8001125dd0a2c92372...@bidouilliste.com>,
Emmanuel Vadot writes:


- We have a commiter that commited something for his own need: he
wanted to use the pwm on his rpi, coded a driver (this part is good)
but feel that the standard we were using was crap and commited his 
work
without talking with arm developper on what the proper way to do it 
was.


First, as a general rule, I think you should leave it to me to
express what I think and feel, because you truly suck at it.


 Noted.


FDT may or may not be the right technology to use, I take no position
on that, because I am not the one doing all the work to implement
it, and I certainly don't propose to do the work to come up with
an alternative.


- Now we have a crappy driver in the tree.


1. Hardly our first


 Not a good reason


2. "Crappy driver" is not pass/fail, we grade that on a curve.

3. You confuse "I don't like" with "crappy"


 On that case no.

- We still have this driver that doesn't follow the standard we said 
we

want to adhere to.


And part of that decision, clearly explained for all who participated
in making it, was that we should time-warp back to FreeBSD 1.X where
hardware changes always required a reboot ?

Right, I didn't think so...


 Sometimes it makes sense to reboot.


Maybe we *also* need to make some decisions about *how* we want
this FDT stuff to work for us in practice?

My summary of the situation:

Everybody I have communicated with over the last couple of months
have given me clear indication that nothing significant will happen
on the RPi platform, which people see as inferior and not worth
the/any effort.


 Mostly true yes.


I don't entirely agree about that, I think RPi is a platform we
as project ignore at our peril, so I have started to do a little
bit of an effort, as I find time and information for it.


 And we all thank you for that.


You keep yelling at me for not adhering to an entirely undocumented
design vision, which we don't even have a single compliant reference
platform for yet.


 Reference platform doesn't make much sense in the embedded world.
 Even if you take the JUNO hardware (ARMv8 reference design, which I 
think we support to some extent), we don't support the GPIO/Pinmuxing I 
think and even if we do it's different than the controller on RPI (Or 
any other SoC). Well more like same-same but different stuff.
 If you want a reference platform take the Allwinner code or IMX (I 
sometime look at the IMX code to check stuff because I know ian@ knows 
his stuff).



The stuff (clock manager, pin manager, runtime overlays) you are
upset about me not using, does not exist on the RPi platform in
FreeBSD at this point in time, which is why I don't use them.


 I'm not upset at you for not using, I'm "upset" at you for not wanting 
to make the effort to implement them. Some are hard, some are easy.



There is no documentation anywhere to be found, how to implement
these hypothetical pieces of code, which is why I don't implement
them.


 Yes and as I already say we all know that arm documentation sucks but 
it didn't prevent any of the other developer to implement stuff on other 
SoCs.



I am quite tempted to quote Gen. Patton on you and say "Lead me,
Follow me, or get out of my way", but that would be a bit too rude.

Instead I will repeat what I have already said to you several times:

The moment the correct infrastructure appears on the RPi platform,
if it ever does, I will change my driver to use that infrastructure.


 This is where I (and probably) other don't agree, this is backward.
 We must implement first proper pinctrl driver and clock management 
instead of introduce hacks.



Until then, you are wasting everybodys time pointing accusingly
into your book of unwritten rules.

Poul-Henning


 What's funny though is that even with a pinctrl and clock management, 
we still don't have what is necessary to implement what you want 
(kldloading a driver and directly use pwm). For that we need overlays at 
runtime, pinmuxing at runtime and probably other things too.


 I think we are both adults (not sure for me or if I want to be one but 
let's pretend that I am), so let me ask you one more time to backout 
your commit and let's work together to extend arm support toward what 
you want to do.


 Thanks,

--
Emmanuel Vadot  
___
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: r328515 - in stable/11/sys: conf contrib/ck contrib/ck/include contrib/ck/include/gcc contrib/ck/include/gcc/aarch64 contrib/ck/include/gcc/arm contrib/ck/include/gcc/ppc64 contrib/ck/i...

2018-01-28 Thread Olivier Houchard
Author: cognet
Date: Sun Jan 28 18:38:17 2018
New Revision: 328515
URL: https://svnweb.freebsd.org/changeset/base/328515

Log:
  MFC revisions r309268, r309260, r309264, r309266, r309267, r309270, r310846,
  r314435, r314564, r316665, r316691, r316702.
  Those import ConcurrencyKit in the FreeBSD kernel.
  A few people have showed interest in this being MFC'd, so here we go.

Added:
  stable/11/sys/contrib/ck/
 - copied from r309266, head/sys/contrib/ck/
  stable/11/sys/contrib/ck/FREEBSD-Xlist
 - copied, changed from r309270, head/sys/contrib/ck/FREEBSD-Xlist
  stable/11/sys/contrib/ck/include/ck_md.h
 - copied, changed from r309267, head/sys/contrib/ck/include/ck_md.h
  stable/11/sys/contrib/ck/include/gcc/aarch64/ck_pr_llsc.h
 - copied unchanged from r310846, 
head/sys/contrib/ck/include/gcc/aarch64/ck_pr_llsc.h
  stable/11/sys/contrib/ck/include/gcc/aarch64/ck_pr_lse.h
 - copied unchanged from r310846, 
head/sys/contrib/ck/include/gcc/aarch64/ck_pr_lse.h
  stable/11/sys/contrib/ck/include/gcc/arm/ck_pr_armv4.h
 - copied unchanged from r309267, 
head/sys/contrib/ck/include/gcc/arm/ck_pr_armv4.h
Deleted:
  stable/11/sys/contrib/ck/src/Makefile.in
Modified:
  stable/11/sys/conf/files
  stable/11/sys/contrib/ck/include/ck_epoch.h
  stable/11/sys/contrib/ck/include/ck_pr.h
  stable/11/sys/contrib/ck/include/gcc/aarch64/ck_pr.h
  stable/11/sys/contrib/ck/include/gcc/arm/ck_pr.h
  stable/11/sys/contrib/ck/include/gcc/ck_pr.h
  stable/11/sys/contrib/ck/include/gcc/ppc64/ck_pr.h
  stable/11/sys/contrib/ck/include/gcc/x86_64/ck_pr.h
  stable/11/sys/contrib/ck/src/ck_epoch.c
  stable/11/sys/mips/mips/stdatomic.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/conf/files
==
--- stable/11/sys/conf/filesSun Jan 28 18:18:03 2018(r328514)
+++ stable/11/sys/conf/filesSun Jan 28 18:38:17 2018(r328515)
@@ -338,6 +338,17 @@ compat/freebsd32/freebsd32_ioctl.c optional compat_fre
 compat/freebsd32/freebsd32_misc.c  optional compat_freebsd32
 compat/freebsd32/freebsd32_syscalls.c  optional compat_freebsd32
 compat/freebsd32/freebsd32_sysent.coptional compat_freebsd32
+contrib/ck/src/ck_array.c  standard compile-with 
"${NORMAL_C} -I$S/contrib/ck/include"
+contrib/ck/src/ck_barrier_centralized.cstandard 
compile-with "${NORMAL_C} -I$S/contrib/ck/include"
+contrib/ck/src/ck_barrier_combining.c  standard compile-with 
"${NORMAL_C} -I$S/contrib/ck/include"
+contrib/ck/src/ck_barrier_dissemination.c  standard compile-with 
"${NORMAL_C} -I$S/contrib/ck/include"
+contrib/ck/src/ck_barrier_mcs.cstandard 
compile-with "${NORMAL_C} -I$S/contrib/ck/include"
+contrib/ck/src/ck_barrier_tournament.c standard compile-with 
"${NORMAL_C} -I$S/contrib/ck/include"
+contrib/ck/src/ck_epoch.c  standard compile-with 
"${NORMAL_C} -I$S/contrib/ck/include"
+contrib/ck/src/ck_hp.c standard compile-with 
"${NORMAL_C} -I$S/contrib/ck/include"
+contrib/ck/src/ck_hs.c standard compile-with 
"${NORMAL_C} -I$S/contrib/ck/include"
+contrib/ck/src/ck_ht.c standard compile-with 
"${NORMAL_C} -I$S/contrib/ck/include"
+contrib/ck/src/ck_rhs.cstandard 
compile-with "${NORMAL_C} -I$S/contrib/ck/include"
 contrib/dev/acpica/common/ahids.c  optional acpi acpi_debug
 contrib/dev/acpica/common/ahuuids.coptional acpi acpi_debug
 contrib/dev/acpica/components/debugger/dbcmds.coptional acpi 
acpi_debug

Copied and modified: stable/11/sys/contrib/ck/FREEBSD-Xlist (from r309270, 
head/sys/contrib/ck/FREEBSD-Xlist)
==
--- head/sys/contrib/ck/FREEBSD-Xlist   Mon Nov 28 21:16:03 2016
(r309270, copy source)
+++ stable/11/sys/contrib/ck/FREEBSD-Xlist  Sun Jan 28 18:38:17 2018
(r328515)
@@ -8,3 +8,4 @@
 */regressions
 */tools
 */include/ck_md.h.in
+*/src/Makefile.in

Modified: stable/11/sys/contrib/ck/include/ck_epoch.h
==
--- head/sys/contrib/ck/include/ck_epoch.h  Mon Nov 28 20:27:58 2016
(r309266)
+++ stable/11/sys/contrib/ck/include/ck_epoch.h Sun Jan 28 18:38:17 2018
(r328515)
@@ -83,6 +83,7 @@ struct ck_epoch_ref {
 };
 
 struct ck_epoch_record {
+   ck_stack_entry_t record_next;
struct ck_epoch *global;
unsigned int state;
unsigned int epoch;
@@ -92,17 +93,16 @@ struct ck_epoch_record {
} local CK_CC_CACHELINE;
unsigned int n_pending;
unsigned int n_peak;
-   unsigned long n_dispatch;
+   unsigned int n_dispatch;
+   v

svn commit: r328516 - head/sys/powerpc/powerpc

2018-01-28 Thread Justin Hibbits
Author: jhibbits
Date: Sun Jan 28 19:18:40 2018
New Revision: 328516
URL: https://svnweb.freebsd.org/changeset/base/328516

Log:
  Consolidate trap instruction checks to a single function
  
  Summary:
  Rather than duplicating the checks for programmatic traps all over the code, 
put
  it all in one function.  This helps to remove some of the #ifdefs between AIM
  and Book-E.
  
  Reviewed By: nwhitehorn
  Differential Revision: https://reviews.freebsd.org/D14082

Modified:
  head/sys/powerpc/powerpc/trap.c

Modified: head/sys/powerpc/powerpc/trap.c
==
--- head/sys/powerpc/powerpc/trap.c Sun Jan 28 18:38:17 2018
(r328515)
+++ head/sys/powerpc/powerpc/trap.c Sun Jan 28 19:18:40 2018
(r328516)
@@ -183,6 +183,16 @@ trapname(u_int vector)
return ("unknown");
 }
 
+static inline bool
+frame_is_trap_inst(struct trapframe *frame)
+{
+#ifdef AIM
+   return (frame->exc == EXC_PGM && frame->srr1 & EXC_PGM_TRAP);
+#else
+   return (frame->exc == EXC_DEBUG || frame->cpu.booke.esr & ESR_PTR);
+#endif
+}
+
 void
 trap(struct trapframe *frame)
 {
@@ -323,11 +333,7 @@ trap(struct trapframe *frame)
 
case EXC_PGM:
/* Identify the trap reason */
-#ifdef AIM
-   if (frame->srr1 & EXC_PGM_TRAP) {
-#else
-   if (frame->cpu.booke.esr & ESR_PTR) {
-#endif
+   if (frame_is_trap_inst(frame)) {
 #ifdef KDTRACE_HOOKS
inst = fuword32((const void *)frame->srr0);
if (inst == 0x0FFF &&
@@ -371,11 +377,7 @@ trap(struct trapframe *frame)
switch (type) {
case EXC_PGM:
 #ifdef KDTRACE_HOOKS
-#ifdef AIM
-   if (frame->srr1 & EXC_PGM_TRAP) {
-#else
-   if (frame->cpu.booke.esr & ESR_PTR) {
-#endif
+   if (frame_is_trap_inst(frame)) {
if (*(uint32_t *)frame->srr0 == EXC_DTRACE) {
if (dtrace_invop_jump_addr != NULL) {
dtrace_invop_jump_addr(frame);
@@ -886,13 +888,7 @@ db_trap_glue(struct trapframe *frame)
 
if (!(frame->srr1 & PSL_PR)
&& (frame->exc == EXC_TRC || frame->exc == EXC_RUNMODETRC
-#ifdef AIM
-   || (frame->exc == EXC_PGM
-   && (frame->srr1 & EXC_PGM_TRAP))
-#else
-   || (frame->exc == EXC_DEBUG)
-   || (frame->cpu.booke.esr & ESR_PTR)
-#endif
+   || frame_is_trap_inst(frame)
|| frame->exc == EXC_BPT
|| frame->exc == EXC_DSI)) {
int type = frame->exc;
@@ -900,12 +896,7 @@ db_trap_glue(struct trapframe *frame)
/* Ignore DTrace traps. */
if (*(uint32_t *)frame->srr0 == EXC_DTRACE)
return (0);
-#ifdef AIM
-   if (type == EXC_PGM && (frame->srr1 & EXC_PGM_TRAP)) {
-#else
-   if (type == EXC_DEBUG ||
-   (frame->cpu.booke.esr & ESR_PTR)) {
-#endif
+   if (frame_is_trap_inst(frame)) {
type = T_BREAKPOINT;
}
return (kdb_trap(type, 0, frame));
___
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: r328517 - head/include

2018-01-28 Thread Pedro F. Giffuni
Author: pfg
Date: Sun Jan 28 19:37:30 2018
New Revision: 328517
URL: https://svnweb.freebsd.org/changeset/base/328517

Log:
  Avoid implicit gcc nonnull attribute in vwarnx().
  
  We removed the nonnull attributes from our headers long ago, but still
  __printflike() includes it implicitly. This will cause the NULL check to
  be optimized away in higher -O levels and it will also trigger a
  -Wnonnull-compare warning.
  
  Avoid warning with it in vwarnx().
  
  Obtained from:DragonfLyBSD (git 
6329e2f68af73662a1960240675e796ab586bcb1)

Modified:
  head/include/err.h

Modified: head/include/err.h
==
--- head/include/err.h  Sun Jan 28 19:18:40 2018(r328516)
+++ head/include/err.h  Sun Jan 28 19:37:30 2018(r328517)
@@ -60,7 +60,7 @@ void  vwarn(const char *, __va_list) __printf0like(1, 0
 void   warnc(int, const char *, ...) __printf0like(2, 3);
 void   vwarnc(int, const char *, __va_list) __printf0like(2, 0);
 void   warnx(const char *, ...) __printflike(1, 2);
-void   vwarnx(const char *, __va_list) __printflike(1, 0);
+void   vwarnx(const char *, __va_list) __printf0like(1, 0);
 void   err_set_file(void *);
 void   err_set_exit(void (* _Nullable)(int));
 __END_DECLS
___
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: r328426 - in head: lib/libufs sbin/clri sbin/dump sbin/fsck_ffs sbin/fsirand sbin/growfs sbin/newfs sbin/quotacheck stand/libsa sys/geom sys/geom/journal sys/geom/label sys/ufs/ffs usr

2018-01-28 Thread Xin Li
Hi, Kirk,

On 1/25/18 16:58, Kirk McKusick wrote:
> Author: mckusick
> Date: Fri Jan 26 00:58:32 2018
> New Revision: 328426
> URL: https://svnweb.freebsd.org/changeset/base/328426
> 
> Log:
>   Refactoring of reading and writing of the UFS/FFS superblock.
>   Specifically reading is done if ffs_sbget() and writing is done
>   in ffs_sbput(). These functions are exported to libufs via the
>   sbget() and sbput() functions which then used in the various
>   filesystem utilities. This work is in preparation for adding
>   subperblock check hashes.
>   
>   No functional change intended.
>   
>   Reviewed by: kib
> 
> Modified:
>   head/sys/geom/label/g_label_ufs.c

With this change, geom_label now depends on UFS.  Could you please take
a look at https://reviews.freebsd.org/D14092 ?

Cheers,



signature.asc
Description: OpenPGP digital signature


svn commit: r328518 - head/sys/powerpc/conf

2018-01-28 Thread Justin Hibbits
Author: jhibbits
Date: Sun Jan 28 20:35:48 2018
New Revision: 328518
URL: https://svnweb.freebsd.org/changeset/base/328518

Log:
  Start building modules for QORIQ64
  
  There's no reason not to build modules for 64-bit QorIQ devices.  This
  config has evolved to be analogous to the AIM GENERIC64 kernel, so will grow
  to match it in more ways as well.

Modified:
  head/sys/powerpc/conf/QORIQ64

Modified: head/sys/powerpc/conf/QORIQ64
==
--- head/sys/powerpc/conf/QORIQ64   Sun Jan 28 19:37:30 2018
(r328517)
+++ head/sys/powerpc/conf/QORIQ64   Sun Jan 28 20:35:48 2018
(r328518)
@@ -15,7 +15,6 @@ include   "dpaa/config.dpaa"
 makeoptionsDEBUG=-g#Build kernel with gdb(1) debug symbols
 makeoptionsWITH_CTF=1
 makeoptionsWERROR="-Werror -Wno-format -Wno-redundant-decls"
-makeoptionsNO_MODULES=yes
 
 optionsFPU_EMU
 
___
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: r328257 - in head/sys: arm/broadcom/bcm2835 dts/arm modules

2018-01-28 Thread Adrian Chadd
[snip]

And this is the root bit that's missing - dynamic pinmux/pinctrl stuff
at runtime.

Warner's already said he's WIP'ing it and phk seems like a good test
case for kicking those tyres, so it sounds like those tyres are about
to be kicked.

In the meantime, hacks allow people to make some progress, and as long
as they're not on by default, it's okay. The challenge is finding the
middle ground between "right" and "working". Some people are happy to
do the legwork to do things right first; others are happy to do the
end bits and then backfill the supporting infrastructure.

Fun times, fun times! I'm just happy to see more RPI support. That
platform still isn't dying.

-adrian
___
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: r328257 - in head/sys: arm/broadcom/bcm2835 dts/arm modules

2018-01-28 Thread Warner Losh
On Sun, Jan 28, 2018 at 2:01 PM, Adrian Chadd 
wrote:

> [snip]
>
> And this is the root bit that's missing - dynamic pinmux/pinctrl stuff
> at runtime.
>

Well, you gotta walk before you can run. We don't even have static pinmx on
rpi. Though someone else is working on that.


> Warner's already said he's WIP'ing it and phk seems like a good test
> case for kicking those tyres, so it sounds like those tyres are about
> to be kicked.
>
> In the meantime, hacks allow people to make some progress, and as long
> as they're not on by default, it's okay. The challenge is finding the
> middle ground between "right" and "working". Some people are happy to
> do the legwork to do things right first; others are happy to do the
> end bits and then backfill the supporting infrastructure.
>

No. Such hacks are actively getting in the way. My WIP already breaks PHK's
hacks (unintentionally, but discovered in hindsight) because they are
outside the mainstream. I have 0 interest in preserving short-term hacks
through the longer-term fixes, and while I'd rather not step on toes, I
don't really feel bad in cases like this... However, my WiP is more about
fixing some issues in NEWBUS / devctl and trying to have some order in the
"Let's change 'disabled' it at runtime" with enough hooks so that we do
more than just turn on the device driver for the device, but also integrate
the new state into the dependencies, like pinmux/pinctl. We'll need that
regardless of whether we need a quick hack to turn them on/off or we allow
loading DTB overlays at runtime. Unlike x86 where you might have not
attached fxp0 and just need to call fxp_attach() (basically) to make it
work, in the embedded space, you'll have lots of unhappy campers if you
don't also deal with the dependent power, clock and pin resources.


> Fun times, fun times! I'm just happy to see more RPI support. That
> platform still isn't dying.
>

Yea, otherwise we could kill armv6 completely.

Warner
___
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: r328257 - in head/sys: arm/broadcom/bcm2835 dts/arm modules

2018-01-28 Thread Warner Losh
On Sun, Jan 28, 2018 at 10:34 AM, Emmanuel Vadot 
wrote:

> On 2018-01-28 00:14, Poul-Henning Kamp wrote:
>
>> 
>> In message <20180127210801.37b8001125dd0a2c92372...@bidouilliste.com>,
>> Emmanuel Vadot writes:
>>
>> - We have a commiter that commited something for his own need: he
>>> wanted to use the pwm on his rpi, coded a driver (this part is good)
>>> but feel that the standard we were using was crap and commited his work
>>> without talking with arm developper on what the proper way to do it was.
>>>
>>  I don't entirely agree about that, I think RPi is a platform we
>>
> as project ignore at our peril, so I have started to do a little
>> bit of an effort, as I find time and information for it.
>>
>
>  And we all thank you for that.


The problems with RPi aren't going to be solved with simple quick hacks.
The port pre-dates our evolved views on using DTB, the upstream linux DTB
and the need to have more complete pinmux / clock / power support. Each
driver does it in an ad-hoc way now, meaning there's a lot of code in the
drivers that needs to be burned down before we can stand up a
replacement... Hopefully, these discussions will bear fruit in the near
term.

You keep yelling at me for not adhering to an entirely undocumented
>> design vision, which we don't even have a single compliant reference
>> platform for yet.
>>
>
>  Reference platform doesn't make much sense in the embedded world.
>  Even if you take the JUNO hardware (ARMv8 reference design, which I think
> we support to some extent), we don't support the GPIO/Pinmuxing I think and
> even if we do it's different than the controller on RPI (Or any other SoC).
> Well more like same-same but different stuff.
>  If you want a reference platform take the Allwinner code or IMX (I
> sometime look at the IMX code to check stuff because I know ian@ knows
> his stuff).


The embedded space is a high-context, fast moving space relative to x86. As
such, there will always be a certain amount of undocumentedness. It
requires closely working with the community of embedded developers in a way
that we've not had to do in x86 world since the patch-kit / 1.x days. A
long time ago, though, FreeBSD evolved a whole new VM w/o it having much of
a published design. Newbus went to market w/o good docs published, yet
everybody was expected to adopt it. The problems of documentation have
largely been corrected after things were built. The evolution of the
embedded space and how we can best support it with the minimal resources
the project has is similar. While there's no over-arching design document,
the broad outlines are there, and the interfaces we want to implement have
published specs, even if they aren't all implemented yet. In an ideal world
this would all be documented, published and anybody that shows up would
know the next steps to take. I'd love for that to be the case here, but we
don't have that today.

Warner
___
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: r328519 - head/sys/powerpc/include

2018-01-28 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Sun Jan 28 21:30:57 2018
New Revision: 328519
URL: https://svnweb.freebsd.org/changeset/base/328519

Log:
  Remove some unused AIM register declarations that existed to support some
  CPUs we have never run on. As a side-effect, removes some #ifdef AIM/#else.

Modified:
  head/sys/powerpc/include/spr.h

Modified: head/sys/powerpc/include/spr.h
==
--- head/sys/powerpc/include/spr.h  Sun Jan 28 20:35:48 2018
(r328518)
+++ head/sys/powerpc/include/spr.h  Sun Jan 28 21:30:57 2018
(r328519)
@@ -667,19 +667,7 @@
 #definePMC970N_CYCLES  0xf /* Processor cycles */
 #definePMC970N_ICOMP   0x9 /* Instructions completed */
 
-#if defined(AIM)
-
-#defineSPR_ESR 0x3d4   /* 4.. Exception Syndrome 
Register */
-#define  ESR_MCI 0x8000 /* Machine check - 
instruction */
-#define  ESR_PIL 0x0800 /* Program interrupt - 
illegal */
-#define  ESR_PPR 0x0400 /* Program interrupt - 
privileged */
-#define  ESR_PTR 0x0200 /* Program interrupt - 
trap */
-#define  ESR_ST  0x0100 /* Store operation */
-#define  ESR_DST 0x0080 /* Data storage interrupt 
- store fault */
-#define  ESR_DIZ 0x0080 /* Data/instruction 
storage interrupt - zone fault */
-#define  ESR_U0F 0x8000 /* Data storage interrupt 
- U0 fault */
-
-#elif defined(BOOKE)
+#if defined(BOOKE)
 
 #defineSPR_MCARU   0x239   /* ..8 Machine Check Address 
register upper bits */
 #defineSPR_MCSR0x23c   /* ..8 Machine Check Syndrome 
register */
___
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: r328257 - in head/sys: arm/broadcom/bcm2835 dts/arm modules

2018-01-28 Thread Poul-Henning Kamp

In message <8d8ae9d10058fd72ce3ec467181c9...@megadrive.org>, Emmanuel Vadot 
writes:

>  Sometimes it makes sense to reboot.

Yes, *sometimes* it does.

But *always* demanding reboot makes no sense ever.

>  Reference platform doesn't make much sense in the embedded world.

A reference platform which peple can look at to find out what the
software architecture is supposed to be, in the near total absense of
documentation for said software architecture makes a lot of sense.

>  I'm not upset at you for not using, I'm "upset" at you for not wanting 
>to make the effort to implement them. Some are hard, some are easy.

FreeBSD is a hobby for me these days, that implied a certain amount
of enjoyment and limited time.

Trying to guess what software architecture you want to be written,
based on the non-existent documentation and with no reference-platform
to look at, and then implementing it on a SOC where the hardware
documentation spans the gamut from from missing over mangled to
misleading, does not qualify as "enjoyment" for me and it certainly
is not something I have time for.

>  What's funny though is that even with a pinctrl and clock management, 
>we still don't have what is necessary to implement what you want 
>(kldloading a driver and directly use pwm). For that we need overlays at 
>runtime, pinmuxing at runtime and probably other things too.

I'm amazed if those things are not already part of our ambition ?

>  This is where I (and probably) other don't agree, this is backward.
>  We must implement first proper pinctrl driver and clock management 
>  instead of introduce hacks.

Who exactly are "We" ?

You indicated that you are not going to do it.

I can't because I don't know what it is that I am supposed to write.

Nobody else seems to be inclined to do it either.

So RPi as a platform is just in limbo forever ?

And where does this "Spanish Inquisition" road end?

Why are gpio and spi allowed to exist on the RPi platform?  Or is
your next demand going to be that they also be removed pending a
hypothetical pinctrl driver ?

>  I think we are both adults (not sure for me or if I want to be one but 
>let's pretend that I am), so let me ask you one more time to backout 
>your commit and let's work together to extend arm support toward what 
>you want to do.

Empathetically NO!

(But feel free to ask me again, if my driver ever in any way prevents
you from committing your changes to the RPi platform.)

Poul-Henning

-- 
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
p...@freebsd.org | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
___
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: r328257 - in head/sys: arm/broadcom/bcm2835 dts/arm modules

2018-01-28 Thread Poul-Henning Kamp

In message 
, Warner 
Losh writes:
>--001a1144c1d25e374c0563dc9147

>No. Such hacks are actively getting in the way. My WIP already breaks PHK's
>hacks (unintentionally, but discovered in hindsight) because they are
>outside the mainstream. I have 0 interest in preserving short-term hacks
>through the longer-term fixes, 

No worries, you do your stuff, and I'll unbreak my driver to follow
the evolving infrastructure.

No big deal.

>> Fun times, fun times! I'm just happy to see more RPI support. That
>> platform still isn't dying.
>
>Yea, otherwise we could kill armv6 completely.

But it is only the original RPi is armv6, right ?

I think we would be OK as long as we support RPi2 and RPi3.


-- 
Poul-Henning Kamp   | UNIX since Zilog Zeus 3.20
p...@freebsd.org | TCP/IP since RFC 956
FreeBSD committer   | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
___
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: r328520 - head/sys/dev/ofw

2018-01-28 Thread Warner Losh
Author: imp
Date: Sun Jan 28 23:58:22 2018
New Revision: 328520
URL: https://svnweb.freebsd.org/changeset/base/328520

Log:
  Out of an abundance of caution, NUL out the first byte in the PNP
  info.

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

Modified: head/sys/dev/ofw/ofw_bus_subr.c
==
--- head/sys/dev/ofw/ofw_bus_subr.c Sun Jan 28 21:30:57 2018
(r328519)
+++ head/sys/dev/ofw/ofw_bus_subr.c Sun Jan 28 23:58:22 2018
(r328520)
@@ -90,6 +90,7 @@ ofw_bus_gen_child_pnpinfo_str(device_t cbdev, device_t
 size_t buflen)
 {
 
+   *buf = '\0';
if (ofw_bus_get_name(child) != NULL) {
strlcat(buf, "name=", buflen);
strlcat(buf, ofw_bus_get_name(child), buflen);
___
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: r328521 - head/sys/dev/nvme

2018-01-28 Thread Warner Losh
Author: imp
Date: Mon Jan 29 00:00:52 2018
New Revision: 328521
URL: https://svnweb.freebsd.org/changeset/base/328521

Log:
  Use atomic load and stores to ensure that the compiler doesn't
  optimize away these loops. Change boolean to int to match what atomic
  API supplies. Remove wmb() since the atomic_store_rel() on status.done
  ensure the prior writes to status. It also fixes the fact that there
  wasn't a rmb() before reading done. This should also be more efficient
  since wmb() is fairly heavy weight.
  
  Sponsored by: Netflix
  Reviewed by: kib@, jim harris
  Differential Revision: https://reviews.freebsd.org/D14053

Modified:
  head/sys/dev/nvme/nvme.c
  head/sys/dev/nvme/nvme_ctrlr.c
  head/sys/dev/nvme/nvme_private.h

Modified: head/sys/dev/nvme/nvme.c
==
--- head/sys/dev/nvme/nvme.cSun Jan 28 23:58:22 2018(r328520)
+++ head/sys/dev/nvme/nvme.cMon Jan 29 00:00:52 2018(r328521)
@@ -469,6 +469,5 @@ nvme_completion_poll_cb(void *arg, const struct nvme_c
 *  the request passed or failed.
 */
memcpy(&status->cpl, cpl, sizeof(*cpl));
-   wmb();
-   status->done = TRUE;
+   atomic_store_rel_int(&status->done, 1);
 }

Modified: head/sys/dev/nvme/nvme_ctrlr.c
==
--- head/sys/dev/nvme/nvme_ctrlr.c  Sun Jan 28 23:58:22 2018
(r328520)
+++ head/sys/dev/nvme/nvme_ctrlr.c  Mon Jan 29 00:00:52 2018
(r328521)
@@ -404,10 +404,10 @@ nvme_ctrlr_identify(struct nvme_controller *ctrlr)
 {
struct nvme_completion_poll_status  status;
 
-   status.done = FALSE;
+   status.done = 0;
nvme_ctrlr_cmd_identify_controller(ctrlr, &ctrlr->cdata,
nvme_completion_poll_cb, &status);
-   while (status.done == FALSE)
+   while (!atomic_load_acq_int(&status.done))
pause("nvme", 1);
if (nvme_completion_is_error(&status.cpl)) {
nvme_printf(ctrlr, "nvme_identify_controller failed!\n");
@@ -431,10 +431,10 @@ nvme_ctrlr_set_num_qpairs(struct nvme_controller *ctrl
struct nvme_completion_poll_status  status;
int cq_allocated, sq_allocated;
 
-   status.done = FALSE;
+   status.done = 0;
nvme_ctrlr_cmd_set_num_queues(ctrlr, ctrlr->num_io_queues,
nvme_completion_poll_cb, &status);
-   while (status.done == FALSE)
+   while (!atomic_load_acq_int(&status.done))
pause("nvme", 1);
if (nvme_completion_is_error(&status.cpl)) {
nvme_printf(ctrlr, "nvme_ctrlr_set_num_qpairs failed!\n");
@@ -470,20 +470,20 @@ nvme_ctrlr_create_qpairs(struct nvme_controller *ctrlr
for (i = 0; i < ctrlr->num_io_queues; i++) {
qpair = &ctrlr->ioq[i];
 
-   status.done = FALSE;
+   status.done = 0;
nvme_ctrlr_cmd_create_io_cq(ctrlr, qpair, qpair->vector,
nvme_completion_poll_cb, &status);
-   while (status.done == FALSE)
+   while (!atomic_load_acq_int(&status.done))
pause("nvme", 1);
if (nvme_completion_is_error(&status.cpl)) {
nvme_printf(ctrlr, "nvme_create_io_cq failed!\n");
return (ENXIO);
}
 
-   status.done = FALSE;
+   status.done = 0;
nvme_ctrlr_cmd_create_io_sq(qpair->ctrlr, qpair,
nvme_completion_poll_cb, &status);
-   while (status.done == FALSE)
+   while (!atomic_load_acq_int(&status.done))
pause("nvme", 1);
if (nvme_completion_is_error(&status.cpl)) {
nvme_printf(ctrlr, "nvme_create_io_sq failed!\n");
@@ -693,10 +693,10 @@ nvme_ctrlr_configure_aer(struct nvme_controller *ctrlr
ctrlr->async_event_config.raw = 0xFF;
ctrlr->async_event_config.bits.reserved = 0;
 
-   status.done = FALSE;
+   status.done = 0;
nvme_ctrlr_cmd_get_feature(ctrlr, NVME_FEAT_TEMPERATURE_THRESHOLD,
0, NULL, 0, nvme_completion_poll_cb, &status);
-   while (status.done == FALSE)
+   while (!atomic_load_acq_int(&status.done))
pause("nvme", 1);
if (nvme_completion_is_error(&status.cpl) ||
(status.cpl.cdw0 & 0x) == 0x ||

Modified: head/sys/dev/nvme/nvme_private.h
==
--- head/sys/dev/nvme/nvme_private.hSun Jan 28 23:58:22 2018
(r328520)
+++ head/sys/dev/nvme/nvme_private.hMon Jan 29 00:00:52 2018
(r328521)
@@ -128,7 +128,7 @@ extern int32_t  nvme_retry_count;
 struct nvme_completion_poll_status {
 
struct nvme_completion  cpl;
-   boolean_t   done;
+   in

svn commit: r328522 - in head/sys: conf kern sys

2018-01-28 Thread Warner Losh
Author: imp
Date: Mon Jan 29 00:14:39 2018
New Revision: 328522
URL: https://svnweb.freebsd.org/changeset/base/328522

Log:
  Create deprecation management functions.
  
  gone_in(majar, msg);  If we're running in FreeBSD major, tell
the user this code may be deleted soon.
If we're running in FreeBSD major - 1,
the the user is deprecated and will
be gone in major.
Otherwise say nothing.
  
  gone_in_dev(dev, major, msg) Just like gone_in, except use device_printf.
  
  New tunable / sysctl debug.oboslete_panic: 0 - don't panic,
1 - panic in major or newer , 2 - panic in major - 1 or newer
default: 0
  
  if NO_OBSOLETE_CODE is defined, then both of these turn into compile
  time errors when building for major. Add options NO_OBSOLETE_CODE to
  kernel build system.
  
  This lets us tag code that's going away so users know it will be gone,
  as well as automatically manage things.
  
  Differential Review: https://reviews.freebsd.org/D13818

Modified:
  head/sys/conf/options
  head/sys/kern/subr_bus.c
  head/sys/sys/systm.h

Modified: head/sys/conf/options
==
--- head/sys/conf/options   Mon Jan 29 00:00:52 2018(r328521)
+++ head/sys/conf/options   Mon Jan 29 00:14:39 2018(r328522)
@@ -177,6 +177,7 @@ NO_ADAPTIVE_MUTEXES opt_adaptive_mutexes.h
 NO_ADAPTIVE_RWLOCKS
 NO_ADAPTIVE_SX
 NO_EVENTTIMERS opt_timer.h
+NO_OBSOLETE_CODE   opt_global.h
 NO_SYSCTL_DESCRopt_global.h
 NSWBUF_MIN opt_swap.h
 MBUF_PACKET_ZONE_DISABLE   opt_global.h

Modified: head/sys/kern/subr_bus.c
==
--- head/sys/kern/subr_bus.cMon Jan 29 00:00:52 2018(r328521)
+++ head/sys/kern/subr_bus.cMon Jan 29 00:14:39 2018(r328522)
@@ -5605,6 +5605,56 @@ devctl2_init(void)
UID_ROOT, GID_WHEEL, 0600, "devctl2");
 }
 
+/*
+ * APIs to manage deprecation and obsolescence.
+ */
+static int obsolete_panic = 0;
+SYSCTL_INT(_debug, OID_AUTO, obsolete_panic, CTLFLAG_RWTUN, &obsolete_panic, 0,
+"Bus debug level");
+/* 0 - don't panic, 1 - panic if already obsolete, 2 - panic if deprecated */
+static void
+gone_panic(int major, int running, const char *msg)
+{
+
+   switch (obsolete_panic)
+   {
+   case 0:
+   return;
+   case 1:
+   if (running < major)
+   return;
+   /* FALLTHROUGH */
+   default:
+   panic("%s", msg);
+   }
+}
+
+void
+_gone_in(int major, const char *msg)
+{
+
+   gone_panic(major, P_OSREL_MAJOR(__FreeBSD_version), msg);
+   if (P_OSREL_MAJOR(__FreeBSD_version) >= major)
+   printf("Obsolete code will removed soon: %s\n", msg);
+   else if (P_OSREL_MAJOR(__FreeBSD_version) + 1 == major)
+   printf("Deprecated code (to be removed in FreeBSD %d): %s\n",
+   major, msg);
+}
+
+void
+_gone_in_dev(device_t dev, int major, const char *msg)
+{
+
+   gone_panic(major, P_OSREL_MAJOR(__FreeBSD_version), msg);
+   if (P_OSREL_MAJOR(__FreeBSD_version) >= major)
+   device_printf(dev,
+   "Obsolete code will removed soon: %s\n", msg);
+   else if (P_OSREL_MAJOR(__FreeBSD_version) + 1 == major)
+   device_printf(dev,
+   "Deprecated code (to be removed in FreeBSD %d): %s\n",
+   major, msg);
+}
+
 #ifdef DDB
 DB_SHOW_COMMAND(device, db_show_device)
 {

Modified: head/sys/sys/systm.h
==
--- head/sys/sys/systm.hMon Jan 29 00:00:52 2018(r328521)
+++ head/sys/sys/systm.hMon Jan 29 00:14:39 2018(r328522)
@@ -464,6 +464,22 @@ void   intr_prof_stack_use(struct thread *td, struct 
tra
 
 void counted_warning(unsigned *counter, const char *msg);
 
+/*
+ * APIs to manage deprecation and obsolescence.
+ */
+struct device;
+void _gone_in(int major, const char *msg);
+void _gone_in_dev(struct device *dev, int major, const char *msg);
+#ifdef NO_OBSOLETE_CODE
+#define __gone_ok(m, msg)   \
+   _Static_assert(m < P_OSREL_MAJOR(__FreeBSD_version)),\
+   "Obsolete code" msg);
+#else
+#define__gone_ok(m, msg)
+#endif
+#define gone_in(major, msg)__gone_ok(major, msg) _gone_in(major, 
msg)
+#define gone_in_dev(dev, major, msg)   __gone_ok(major, msg) _gone_in_dev(dev, 
major, msg)
+
 __NULLABILITY_PRAGMA_POP
 
 #endif /* !_SYS_SYSTM_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: r328523 - in head/sys/dev: advansys aha aic buslogic dpt joy mse ncv nsp stg

2018-01-28 Thread Warner Losh
Author: imp
Date: Mon Jan 29 00:14:46 2018
New Revision: 328523
URL: https://svnweb.freebsd.org/changeset/base/328523

Log:
  Tag the current round of deprecated drivers.
  
  Differential Revision: https://reviews.freebsd.org/D13818

Modified:
  head/sys/dev/advansys/advansys.c
  head/sys/dev/advansys/adwcam.c
  head/sys/dev/aha/aha.c
  head/sys/dev/aic/aic.c
  head/sys/dev/buslogic/bt.c
  head/sys/dev/dpt/dpt_pci.c
  head/sys/dev/joy/joy.c
  head/sys/dev/mse/mse.c
  head/sys/dev/ncv/ncr53c500_pccard.c
  head/sys/dev/nsp/nsp_pccard.c
  head/sys/dev/stg/tmc18c30.c

Modified: head/sys/dev/advansys/advansys.c
==
--- head/sys/dev/advansys/advansys.cMon Jan 29 00:14:39 2018
(r328522)
+++ head/sys/dev/advansys/advansys.cMon Jan 29 00:14:46 2018
(r328523)
@@ -1399,6 +1399,8 @@ adv_attach(adv)
csa.callback_arg = adv;
xpt_action((union ccb *)&csa);
mtx_unlock(&adv->lock);
+   gone_in_dev(adv->adv, 12, "adv(4) driver");
+
return (0);
 }
 MODULE_DEPEND(adv, cam, 1, 1, 1);

Modified: head/sys/dev/advansys/adwcam.c
==
--- head/sys/dev/advansys/adwcam.c  Mon Jan 29 00:14:39 2018
(r328522)
+++ head/sys/dev/advansys/adwcam.c  Mon Jan 29 00:14:46 2018
(r328523)
@@ -1173,6 +1173,7 @@ adw_attach(struct adw_softc *adw)
xpt_action((union ccb *)&csa);
}
 
+   gone_in_dev(adv->adv, 12, "adw(4) driver");
 fail:
mtx_unlock(&adw->lock);
return (error);

Modified: head/sys/dev/aha/aha.c
==
--- head/sys/dev/aha/aha.c  Mon Jan 29 00:14:39 2018(r328522)
+++ head/sys/dev/aha/aha.c  Mon Jan 29 00:14:46 2018(r328523)
@@ -620,6 +620,7 @@ aha_attach(struct aha_softc *aha)
return (ENXIO);
}
mtx_unlock(&aha->lock);
+   gone_in_dev(aha->dev, 12, "aha(4) driver");
 
return (0);
 }

Modified: head/sys/dev/aic/aic.c
==
--- head/sys/dev/aic/aic.c  Mon Jan 29 00:14:39 2018(r328522)
+++ head/sys/dev/aic/aic.c  Mon Jan 29 00:14:46 2018(r328523)
@@ -1577,6 +1577,7 @@ aic_attach(struct aic_softc *aic)
printf(", fast SCSI");
printf("\n");
mtx_unlock(&aic->lock);
+   gone_in_dev(aic->dev, 12, "aic(4) driver");
return (0);
 }
 

Modified: head/sys/dev/buslogic/bt.c
==
--- head/sys/dev/buslogic/bt.c  Mon Jan 29 00:14:39 2018(r328522)
+++ head/sys/dev/buslogic/bt.c  Mon Jan 29 00:14:46 2018(r328523)
@@ -905,6 +905,7 @@ bt_attach(device_t dev)
device_printf(dev, "bus_setup_intr() failed: %d\n", error);
return (error);
}
+   gone_in_dev(dev, 12, "bt(4) driver");
 
return (0);
 }

Modified: head/sys/dev/dpt/dpt_pci.c
==
--- head/sys/dev/dpt/dpt_pci.c  Mon Jan 29 00:14:39 2018(r328522)
+++ head/sys/dev/dpt/dpt_pci.c  Mon Jan 29 00:14:46 2018(r328523)
@@ -157,6 +157,7 @@ dpt_pci_attach (device_t dev)
error = ENXIO;
goto bad;
}
+   gone_in_dev(dev, 12, "dpt(4) driver");
 
return (error);
 

Modified: head/sys/dev/joy/joy.c
==
--- head/sys/dev/joy/joy.c  Mon Jan 29 00:14:39 2018(r328522)
+++ head/sys/dev/joy/joy.c  Mon Jan 29 00:14:46 2018(r328523)
@@ -110,6 +110,8 @@ joy_attach(device_t dev)
joy->timeout[0] = joy->timeout[1] = 0;
joy->d = make_dev(&joy_cdevsw, unit, 0, 0, 0600, "joy%d", unit);
joy->d->si_drv1 = joy;
+   gone_in_dev(dev, 12, "joy(4) driver");
+
return (0);
 }
 

Modified: head/sys/dev/mse/mse.c
==
--- head/sys/dev/mse/mse.c  Mon Jan 29 00:14:39 2018(r328522)
+++ head/sys/dev/mse/mse.c  Mon Jan 29 00:14:46 2018(r328523)
@@ -153,6 +153,8 @@ mse_common_attach(device_t dev)
sc->sc_ndev = make_dev(&mse_cdevsw, 1, UID_ROOT, GID_WHEEL, 0600,
"nmse%d", unit);
sc->sc_ndev->si_drv1 = sc;
+   gone_in_dev(dev, 12, "mse(4) driver");
+
return 0;
 }
 

Modified: head/sys/dev/ncv/ncr53c500_pccard.c
==
--- head/sys/dev/ncv/ncr53c500_pccard.c Mon Jan 29 00:14:39 2018
(r328522)
+++ head/sys/dev/ncv/ncr53c500_pccard.c Mon Jan 29 00:14:46 2018
(r328523)
@@ -263,6 +263,7 @@ ncv_pccard_attach(device_t dev)
ncv_release_resource(dev);
retu

svn commit: r328524 - in head/sys: amd64/amd64 dev/ata dev/atkbdc dev/sbni dev/sound/isa i386/i386 isa powerpc/mpc85xx sparc64/sparc64 x86/isa x86/pci x86/x86

2018-01-28 Thread Warner Losh
Author: imp
Date: Mon Jan 29 00:22:30 2018
New Revision: 328524
URL: https://svnweb.freebsd.org/changeset/base/328524

Log:
  Add ISA PNP tables to ISA drivers. Fix a few incidental comments.
  ACPI ISA PBP tables not tagged, there's bigger issues with them.

Modified:
  head/sys/amd64/amd64/fpu.c
  head/sys/dev/ata/ata-isa.c
  head/sys/dev/atkbdc/psm.c
  head/sys/dev/sbni/if_sbni_isa.c
  head/sys/dev/sound/isa/ess.c
  head/sys/dev/sound/isa/gusc.c
  head/sys/dev/sound/isa/mss.c
  head/sys/dev/sound/isa/sbc.c
  head/sys/i386/i386/npx.c
  head/sys/isa/vga_isa.c
  head/sys/powerpc/mpc85xx/atpic.c
  head/sys/sparc64/sparc64/rtc.c
  head/sys/x86/isa/atpic.c
  head/sys/x86/isa/atrtc.c
  head/sys/x86/isa/clock.c
  head/sys/x86/isa/isa_dma.c
  head/sys/x86/isa/orm.c
  head/sys/x86/pci/pci_bus.c
  head/sys/x86/x86/nexus.c

Modified: head/sys/amd64/amd64/fpu.c
==
--- head/sys/amd64/amd64/fpu.c  Mon Jan 29 00:14:46 2018(r328523)
+++ head/sys/amd64/amd64/fpu.c  Mon Jan 29 00:22:30 2018(r328524)
@@ -917,6 +917,7 @@ static driver_t fpupnp_driver = {
 static devclass_t fpupnp_devclass;
 
 DRIVER_MODULE(fpupnp, acpi, fpupnp_driver, fpupnp_devclass, 0, 0);
+ISA_PNP_INFO(fpupnp_ids);
 #endif /* DEV_ISA */
 
 static MALLOC_DEFINE(M_FPUKERN_CTX, "fpukern_ctx",

Modified: head/sys/dev/ata/ata-isa.c
==
--- head/sys/dev/ata/ata-isa.c  Mon Jan 29 00:14:46 2018(r328523)
+++ head/sys/dev/ata/ata-isa.c  Mon Jan 29 00:22:30 2018(r328524)
@@ -207,3 +207,4 @@ static driver_t ata_isa_driver = {
 
 DRIVER_MODULE(ata, isa, ata_isa_driver, ata_devclass, NULL, NULL);
 MODULE_DEPEND(ata, ata, 1, 1, 1);
+ISA_PNP_INFO(ata_ids);

Modified: head/sys/dev/atkbdc/psm.c
==
--- head/sys/dev/atkbdc/psm.c   Mon Jan 29 00:14:46 2018(r328523)
+++ head/sys/dev/atkbdc/psm.c   Mon Jan 29 00:22:30 2018(r328524)
@@ -7186,5 +7186,5 @@ psmcpnp_attach(device_t dev)
 
 DRIVER_MODULE(psmcpnp, isa, psmcpnp_driver, psmcpnp_devclass, 0, 0);
 DRIVER_MODULE(psmcpnp, acpi, psmcpnp_driver, psmcpnp_devclass, 0, 0);
-
+ISA_PNP_INFO(psmcpnp_ids);
 #endif /* DEV_ISA */

Modified: head/sys/dev/sbni/if_sbni_isa.c
==
--- head/sys/dev/sbni/if_sbni_isa.c Mon Jan 29 00:14:46 2018
(r328523)
+++ head/sys/dev/sbni/if_sbni_isa.c Mon Jan 29 00:22:30 2018
(r328524)
@@ -166,3 +166,4 @@ sbni_attach_isa(device_t dev)
 
 DRIVER_MODULE(sbni, isa, sbni_isa_driver, sbni_isa_devclass, 0, 0);
 MODULE_DEPEND(sbni, isa, 1, 1, 1);
+ISA_PNP_INFO(sbni_ids);

Modified: head/sys/dev/sound/isa/ess.c
==
--- head/sys/dev/sound/isa/ess.cMon Jan 29 00:14:46 2018
(r328523)
+++ head/sys/dev/sound/isa/ess.cMon Jan 29 00:22:30 2018
(r328524)
@@ -1016,3 +1016,4 @@ static driver_t esscontrol_driver = {
 
 DRIVER_MODULE(esscontrol, isa, esscontrol_driver, esscontrol_devclass, 0, 0);
 DRIVER_MODULE(esscontrol, acpi, esscontrol_driver, esscontrol_devclass, 0, 0);
+ISA_PNP_INFO(essc_ids);

Modified: head/sys/dev/sound/isa/gusc.c
==
--- head/sys/dev/sound/isa/gusc.c   Mon Jan 29 00:14:46 2018
(r328523)
+++ head/sys/dev/sound/isa/gusc.c   Mon Jan 29 00:22:30 2018
(r328524)
@@ -673,5 +673,4 @@ DRIVER_MODULE(snd_gusc, isa, gusc_driver, gusc_devclas
 DRIVER_MODULE(snd_gusc, acpi, gusc_driver, gusc_devclass, 0, 0);
 MODULE_DEPEND(snd_gusc, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER);
 MODULE_VERSION(snd_gusc, 1);
-
-
+ISA_PNP_INFO(gusc_ids);

Modified: head/sys/dev/sound/isa/mss.c
==
--- head/sys/dev/sound/isa/mss.cMon Jan 29 00:14:46 2018
(r328523)
+++ head/sys/dev/sound/isa/mss.cMon Jan 29 00:22:30 2018
(r328524)
@@ -2293,5 +2293,4 @@ static driver_t guspcm_driver = {
 DRIVER_MODULE(snd_guspcm, gusc, guspcm_driver, pcm_devclass, 0, 0);
 MODULE_DEPEND(snd_guspcm, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER);
 MODULE_VERSION(snd_guspcm, 1);
-
-
+ISA_PNP_INFO(pnpmss_ids);

Modified: head/sys/dev/sound/isa/sbc.c
==
--- head/sys/dev/sound/isa/sbc.cMon Jan 29 00:14:46 2018
(r328523)
+++ head/sys/dev/sound/isa/sbc.cMon Jan 29 00:22:30 2018
(r328524)
@@ -750,3 +750,4 @@ DRIVER_MODULE(snd_sbc, isa, sbc_driver, sbc_devclass, 
 DRIVER_MODULE(snd_sbc, acpi, sbc_driver, sbc_devclass, 0, 0);
 MODULE_DEPEND(snd_sbc, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER);
 MODULE_VERSION(snd_sbc, 1);
+ISA_PNP_INFO(sbc_ids);

Modified: head/sys/i

svn commit: r328525 - head/contrib/tnftp/src

2018-01-28 Thread Pedro F. Giffuni
Author: pfg
Date: Mon Jan 29 01:05:57 2018
New Revision: 328525
URL: https://svnweb.freebsd.org/changeset/base/328525

Log:
  ftp(1): Use closefrom() instead of individual close()s.
  
  Use closefrom(3) instead of manually closing all file descriptors
  between 3 and 19.
  
  Obtained from:OpenBSD (CVS 1.80)

Modified:
  head/contrib/tnftp/src/cmds.c

Modified: head/contrib/tnftp/src/cmds.c
==
--- head/contrib/tnftp/src/cmds.c   Mon Jan 29 00:22:30 2018
(r328524)
+++ head/contrib/tnftp/src/cmds.c   Mon Jan 29 01:05:57 2018
(r328525)
@@ -1438,8 +1438,7 @@ shell(int argc, char *argv[])
}
oldintr = xsignal(SIGINT, SIG_IGN);
if ((pid = fork()) == 0) {
-   for (pid = 3; pid < 20; pid++)
-   (void)close(pid);
+   (void)closefrom(3);
(void)xsignal(SIGINT, SIG_DFL);
shellp = getenv("SHELL");
if (shellp == 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"


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

2018-01-28 Thread Ed Maste
Author: emaste
Date: Mon Jan 29 01:59:04 2018
New Revision: 328526
URL: https://svnweb.freebsd.org/changeset/base/328526

Log:
  Correct MD patch in linux64 module Makefile
  
  Reviewed by:  imp
  Sponsored by: Turing Robotic Industries Inc.
  Differential Revision:https://reviews.freebsd.org/D14061

Modified:
  head/sys/modules/linux64/Makefile

Modified: head/sys/modules/linux64/Makefile
==
--- head/sys/modules/linux64/Makefile   Mon Jan 29 01:05:57 2018
(r328525)
+++ head/sys/modules/linux64/Makefile   Mon Jan 29 01:59:04 2018
(r328526)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 
-.PATH: ${SRCTOP}/sys/compat/linux ${SRCTOP}/sys/${MACHINE_ARCH}/linux
+.PATH: ${SRCTOP}/sys/compat/linux ${SRCTOP}/sys/${MACHINE}/linux
 
 VDSO=  linux_vdso
 
@@ -31,7 +31,7 @@ linux_assym.h: linux_genassym.o
 linux_locore.o: linux_locore.s linux_assym.h
${CC} -x assembler-with-cpp -DLOCORE -shared -mcmodel=small \
-pipe -I. -I${SYSDIR} -Werror -Wall -fno-common -fPIC -nostdinc \
-   -Wl,-T${SRCTOP}/sys/${MACHINE_CPUARCH}/linux/${VDSO}.lds.s  \
+   -Wl,-T${SRCTOP}/sys/${MACHINE}/linux/${VDSO}.lds.s  \
-Wl,-soname=${VDSO}.so.1,-warn-common -nostdlib \
${.IMPSRC} -o ${.TARGET}
 
___
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: r328527 - head/sys/kern

2018-01-28 Thread Li-Wen Hsu
Author: lwhsu (ports committer)
Date: Mon Jan 29 02:29:08 2018
New Revision: 328527
URL: https://svnweb.freebsd.org/changeset/base/328527

Log:
  Fix LINT build after r328508, add forgotten part in format string
  
  Reviewed by:  delphij
  Differential Revision:https://reviews.freebsd.org/D14089

Modified:
  head/sys/kern/subr_bus.c

Modified: head/sys/kern/subr_bus.c
==
--- head/sys/kern/subr_bus.cMon Jan 29 01:59:04 2018(r328526)
+++ head/sys/kern/subr_bus.cMon Jan 29 02:29:08 2018(r328527)
@@ -5051,7 +5051,7 @@ print_device_short(device_t dev, int indent)
if (!dev)
return;
 
-   indentprintf(("device %d: <%s> 
%sparent,%schildren,%s%s%s%s%s,%sivars,%ssoftc,busy=%d\n",
+   indentprintf(("device %d: <%s> 
%sparent,%schildren,%s%s%s%s%s%s,%sivars,%ssoftc,busy=%d\n",
dev->unit, dev->desc,
(dev->parent? "":"no "),
(TAILQ_EMPTY(&dev->children)? "no ":""),
___
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: r328528 - in head/sys/dev/usb: . quirk

2018-01-28 Thread Ian Lepore
Author: ian
Date: Mon Jan 29 03:24:02 2018
New Revision: 328528
URL: https://svnweb.freebsd.org/changeset/base/328528

Log:
  Add a NO_GETMAXLUN quirk for the JMicron JMS567 USB to SATA bridge, to
  prevent lengthy timeout pauses while probing/attaching drives.

Modified:
  head/sys/dev/usb/quirk/usb_quirk.c
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/quirk/usb_quirk.c
==
--- head/sys/dev/usb/quirk/usb_quirk.c  Mon Jan 29 02:29:08 2018
(r328527)
+++ head/sys/dev/usb/quirk/usb_quirk.c  Mon Jan 29 03:24:02 2018
(r328528)
@@ -244,6 +244,7 @@ static struct usb_quirk_entry usb_quirks[USB_DEV_QUIRK
USB_QUIRK(IOMEGA, ZIP100, 0x, 0x, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI,
UQ_MSC_NO_TEST_UNIT_READY), /* XXX ZIP drives can also use ATAPI */
+   USB_QUIRK(JMICRON, JMS567, 0x, 0x, UQ_MSC_NO_GETMAXLUN),
USB_QUIRK(JMICRON, JM20337, 0x, 0x, UQ_MSC_FORCE_WIRE_BBB,
UQ_MSC_FORCE_PROTO_SCSI,
UQ_MSC_NO_SYNC_CACHE),

Modified: head/sys/dev/usb/usbdevs
==
--- head/sys/dev/usb/usbdevsMon Jan 29 02:29:08 2018(r328527)
+++ head/sys/dev/usb/usbdevsMon Jan 29 03:24:02 2018(r328528)
@@ -2580,6 +2580,7 @@ product JATON EDA 0x5704  Ethernet
 product JETI SPC1201   0x04b2  FTDI compatible adapter
 
 /* JMicron products */
+product JMICRON JMS567 0x0567  USB to SATA 6.0Gb/s bridge 
 product JMICRON JM203360x2336  USB to SATA Bridge
 product JMICRON JM203370x2338  USB to ATA/ATAPI Bridge
 
___
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: r328529 - head/sys/dev/advansys

2018-01-28 Thread Li-Wen Hsu
Author: lwhsu (ports committer)
Date: Mon Jan 29 04:04:52 2018
New Revision: 328529
URL: https://svnweb.freebsd.org/changeset/base/328529

Log:
  Fix kernel build after r328523, correct variable names
  
  Reviewed by:  delphij
  Differential Revision:https://reviews.freebsd.org/D14105

Modified:
  head/sys/dev/advansys/advansys.c
  head/sys/dev/advansys/adwcam.c

Modified: head/sys/dev/advansys/advansys.c
==
--- head/sys/dev/advansys/advansys.cMon Jan 29 03:24:02 2018
(r328528)
+++ head/sys/dev/advansys/advansys.cMon Jan 29 04:04:52 2018
(r328529)
@@ -1399,7 +1399,7 @@ adv_attach(adv)
csa.callback_arg = adv;
xpt_action((union ccb *)&csa);
mtx_unlock(&adv->lock);
-   gone_in_dev(adv->adv, 12, "adv(4) driver");
+   gone_in_dev(adv->dev, 12, "adv(4) driver");
 
return (0);
 }

Modified: head/sys/dev/advansys/adwcam.c
==
--- head/sys/dev/advansys/adwcam.c  Mon Jan 29 03:24:02 2018
(r328528)
+++ head/sys/dev/advansys/adwcam.c  Mon Jan 29 04:04:52 2018
(r328529)
@@ -1173,7 +1173,7 @@ adw_attach(struct adw_softc *adw)
xpt_action((union ccb *)&csa);
}
 
-   gone_in_dev(adv->adv, 12, "adw(4) driver");
+   gone_in_dev(adw->device, 12, "adw(4) driver");
 fail:
mtx_unlock(&adw->lock);
return (error);
___
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: r328530 - in head/sys/powerpc: aim booke include powerpc

2018-01-28 Thread Nathan Whitehorn
Author: nwhitehorn
Date: Mon Jan 29 04:33:41 2018
New Revision: 328530
URL: https://svnweb.freebsd.org/changeset/base/328530

Log:
  Remove hard-coded trap-handling logic involving the segmented memory model
  used with hashed page tables on AIM and place it into a new, modular pmap
  function called pmap_decode_kernel_ptr(). This function is the inverse
  of pmap_map_user_ptr(). With POWER9 radix tables, which mapping to use
  becomes more complex than just AIM/BOOKE and it is best to have it in
  the same place as pmap_map_user_ptr().
  
  Reviewed by:  jhibbits

Modified:
  head/sys/powerpc/aim/mmu_oea.c
  head/sys/powerpc/aim/mmu_oea64.c
  head/sys/powerpc/booke/pmap.c
  head/sys/powerpc/include/pmap.h
  head/sys/powerpc/powerpc/mmu_if.m
  head/sys/powerpc/powerpc/pmap_dispatch.c
  head/sys/powerpc/powerpc/trap.c

Modified: head/sys/powerpc/aim/mmu_oea.c
==
--- head/sys/powerpc/aim/mmu_oea.c  Mon Jan 29 04:04:52 2018
(r328529)
+++ head/sys/powerpc/aim/mmu_oea.c  Mon Jan 29 04:33:41 2018
(r328530)
@@ -322,6 +322,8 @@ vm_offset_t moea_quick_enter_page(mmu_t mmu, vm_page_t
 void moea_quick_remove_page(mmu_t mmu, vm_offset_t addr);
 static int moea_map_user_ptr(mmu_t mmu, pmap_t pm,
 volatile const void *uaddr, void **kaddr, size_t ulen, size_t *klen);
+static int moea_decode_kernel_ptr(mmu_t mmu, vm_offset_t addr,
+int *is_user, vm_offset_t *decoded_addr);
 
 
 static mmu_method_t moea_methods[] = {
@@ -374,6 +376,7 @@ static mmu_method_t moea_methods[] = {
MMUMETHOD(mmu_scan_init,moea_scan_init),
MMUMETHOD(mmu_dumpsys_map,  moea_dumpsys_map),
MMUMETHOD(mmu_map_user_ptr, moea_map_user_ptr),
+   MMUMETHOD(mmu_decode_kernel_ptr, moea_decode_kernel_ptr),
 
{ 0, 0 }
 };
@@ -1583,6 +1586,31 @@ moea_map_user_ptr(mmu_t mmu, pmap_t pm, volatile const
(uintptr_t)uaddr >> ADDR_SR_SHFT;
curthread->td_pcb->pcb_cpu.aim.usr_vsid = vsid;
__asm __volatile("mtsr %0,%1; isync" :: "n"(USER_SR), "r"(vsid));
+
+   return (0);
+}
+
+/*
+ * Figure out where a given kernel pointer (usually in a fault) points
+ * to from the VM's perspective, potentially remapping into userland's
+ * address space.
+ */
+static int
+moea_decode_kernel_ptr(mmu_t mmu, vm_offset_t addr, int *is_user,
+vm_offset_t *decoded_addr)
+{
+   vm_offset_t user_sr;
+
+   if ((addr >> ADDR_SR_SHFT) == (USER_ADDR >> ADDR_SR_SHFT)) {
+   user_sr = curthread->td_pcb->pcb_cpu.aim.usr_segm;
+   addr &= ADDR_PIDX | ADDR_POFF;
+   addr |= user_sr << ADDR_SR_SHFT;
+   *decoded_addr = addr;
+   *is_user = 1;
+   } else {
+   *decoded_addr = addr;
+   *is_user = 0;
+   }
 
return (0);
 }

Modified: head/sys/powerpc/aim/mmu_oea64.c
==
--- head/sys/powerpc/aim/mmu_oea64.cMon Jan 29 04:04:52 2018
(r328529)
+++ head/sys/powerpc/aim/mmu_oea64.cMon Jan 29 04:33:41 2018
(r328530)
@@ -288,6 +288,8 @@ vm_offset_t moea64_quick_enter_page(mmu_t mmu, vm_page
 void moea64_quick_remove_page(mmu_t mmu, vm_offset_t addr);
 static int moea64_map_user_ptr(mmu_t mmu, pmap_t pm,
 volatile const void *uaddr, void **kaddr, size_t ulen, size_t *klen);
+static int moea64_decode_kernel_ptr(mmu_t mmu, vm_offset_t addr,
+int *is_user, vm_offset_t *decoded_addr);
 
 
 static mmu_method_t moea64_methods[] = {
@@ -339,6 +341,7 @@ static mmu_method_t moea64_methods[] = {
MMUMETHOD(mmu_scan_init,moea64_scan_init),
MMUMETHOD(mmu_dumpsys_map,  moea64_dumpsys_map),
MMUMETHOD(mmu_map_user_ptr, moea64_map_user_ptr),
+   MMUMETHOD(mmu_decode_kernel_ptr, moea64_decode_kernel_ptr),
 
{ 0, 0 }
 };
@@ -1905,6 +1908,31 @@ moea64_map_user_ptr(mmu_t mmu, pmap_t pm, volatile con
 #else
__asm __volatile("mtsr %0,%1; isync" :: "n"(USER_SR), "r"(slbv));
 #endif
+
+   return (0);
+}
+
+/*
+ * Figure out where a given kernel pointer (usually in a fault) points
+ * to from the VM's perspective, potentially remapping into userland's
+ * address space.
+ */
+static int
+moea64_decode_kernel_ptr(mmu_t mmu, vm_offset_t addr, int *is_user,
+vm_offset_t *decoded_addr)
+{
+   vm_offset_t user_sr;
+
+   if ((addr >> ADDR_SR_SHFT) == (USER_ADDR >> ADDR_SR_SHFT)) {
+   user_sr = curthread->td_pcb->pcb_cpu.aim.usr_segm;
+   addr &= ADDR_PIDX | ADDR_POFF;
+   addr |= user_sr << ADDR_SR_SHFT;
+   *decoded_addr = addr;
+   *is_user = 1;
+   } else {
+   *decoded_addr = addr;
+   *is_user = 0;
+   }
 
return (0);
 }

Modified: head/sys/powerpc/booke/pmap.c
==
--- head/sys/powerpc/book

svn commit: r328531 - head/lib/libcasper/services/cap_syslog

2018-01-28 Thread Mariusz Zaborski
Author: oshogbo
Date: Mon Jan 29 04:38:11 2018
New Revision: 328531
URL: https://svnweb.freebsd.org/changeset/base/328531

Log:
  Document the syslog Casper service.
  
  Reviewed by:  bcr@
  Differential Revision:https://reviews.freebsd.org/D14084

Added:
  head/lib/libcasper/services/cap_syslog/cap_syslog.3   (contents, props 
changed)
Modified:
  head/lib/libcasper/services/cap_syslog/Makefile

Modified: head/lib/libcasper/services/cap_syslog/Makefile
==
--- head/lib/libcasper/services/cap_syslog/Makefile Mon Jan 29 04:33:41 
2018(r328530)
+++ head/lib/libcasper/services/cap_syslog/Makefile Mon Jan 29 04:38:11 
2018(r328531)
@@ -21,4 +21,13 @@ LIBADD=  nv
 
 CFLAGS+=-I${.CURDIR}
 
+MAN+=  cap_syslog.3
+
+MLINKS+= cap_syslog.3 libcap_syslog.3
+MLINKS+= cap_syslog.3 cap_syslog.3
+MLINKS+= cap_syslog.3 cap_vsyslog.3
+MLINKS+= cap_syslog.3 cap_openlog.3
+MLINKS+= cap_syslog.3 cap_closelog.3
+MLINKS+= cap_syslog.3 cap_setlogmask.3
+
 .include 

Added: head/lib/libcasper/services/cap_syslog/cap_syslog.3
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/lib/libcasper/services/cap_syslog/cap_syslog.3 Mon Jan 29 04:38:11 
2018(r328531)
@@ -0,0 +1,107 @@
+.\" Copyright (c) 2018 Mariusz Zaborski 
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in the
+.\"documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS 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 AUTHORS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd January 28, 2018
+.Dt CAP_SYSLOG 3
+.Os
+.Sh NAME
+.Nm cap_syslog
+.Nm cap_vsyslog
+.Nm cap_openlog
+.Nm cap_closelog
+.Nm cap_setlogmask
+.Nd "library for syslog in capability mode"
+.Sh LIBRARY
+.Lb libcap_syslog
+.Sh SYNOPSIS
+.In libcasper.h
+.In casper/cap_syslog.h
+.Ft void
+.Fn cap_syslog "cap_channel_t *chan" "int pri" "const char *fmt" "..."
+.Ft void
+.Fn cap_vsyslog "cap_channel_t *chan" "int priority" "const char *fmt" 
"va_list ap"
+.Ft void
+.Fn cap_openlog "cap_channel_t *chan" "const char *ident" "int logopt" "int 
facility"
+.Ft void
+.Fn cap_closelog "cap_channel_t *chan"
+.Ft int
+.Fn cap_setlogmask "cap_channel_t *chan" "int maskpri"
+.Sh DESCRIPTION
+The functions
+.Fn cap_syslog
+.Fn cap_vsyslog
+.Fn cap_openlog
+.Fn cap_closelog
+.Fn cap_setlogmask
+are respectively equivalent to
+.Xr syslog 3 ,
+.Xr vsyslog 3 ,
+.Xr openlog 3 ,
+.Xr closelog 3 ,
+.Xr setlogmask 3
+except that the connection to the
+.Nm system.syslog
+service needs to be provided.
+.Sh EXAMPLES
+The following example first opens a capability to casper and then uses this
+capability to create the
+.Nm system.syslog
+casper service to log messages.
+.Bd -literal
+cap_channel_t *capcas, *capsyslog;
+
+/* Open capability to Casper. */
+capcas = cap_init();
+if (capcas == NULL)
+   err(1, "Unable to contact Casper");
+
+/* Enter capability mode sandbox. */
+if (cap_enter() < 0 && errno != ENOSYS)
+   err(1, "Unable to enter capability mode");
+
+/* Use Casper capability to create capability to the system.syslog service. */
+capsyslog = cap_service_open(capcas, "system.syslog");
+if (capsyslog == NULL)
+   err(1, "Unable to open system.syslog service");
+
+/* Close Casper capability, we don't need it anymore. */
+cap_close(capcas);
+
+/* Let's log something. */
+cap_syslog(capsyslog, LOG_NOTICE, "System logs from capability mode.");
+.Ed
+.Sh SEE ALSO
+.Xr cap_enter 2 ,
+.Xr closelog 3 ,
+.Xr err 3 ,
+.Xr nv 3 ,
+.Xr openlog 3 ,
+.Xr setlogmask 3
+.Xr syslog 3 ,
+.Xr vsyslog 3 ,
+.Xr capsicum 4
+.Sh AUTHORS
+.An Mariusz Zaborski Aq Mt osho...@freebsd.org
___
svn-src-all@freebsd.org mailing list
https:

svn commit: r328532 - head/lib/libcasper/services/cap_syslog

2018-01-28 Thread Mariusz Zaborski
Author: oshogbo
Date: Mon Jan 29 05:29:28 2018
New Revision: 328532
URL: https://svnweb.freebsd.org/changeset/base/328532

Log:
  The name of the library is exactly the same like one of name the name of the
  functions.
  
  We should not create MLINKS for that one, because it's break a build.
  
  Submitted by: lwhsu@

Modified:
  head/lib/libcasper/services/cap_syslog/Makefile

Modified: head/lib/libcasper/services/cap_syslog/Makefile
==
--- head/lib/libcasper/services/cap_syslog/Makefile Mon Jan 29 04:38:11 
2018(r328531)
+++ head/lib/libcasper/services/cap_syslog/Makefile Mon Jan 29 05:29:28 
2018(r328532)
@@ -24,7 +24,6 @@ CFLAGS+=-I${.CURDIR}
 MAN+=  cap_syslog.3
 
 MLINKS+= cap_syslog.3 libcap_syslog.3
-MLINKS+= cap_syslog.3 cap_syslog.3
 MLINKS+= cap_syslog.3 cap_vsyslog.3
 MLINKS+= cap_syslog.3 cap_openlog.3
 MLINKS+= cap_syslog.3 cap_closelog.3
___
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: r328257 - in head/sys: arm/broadcom/bcm2835 dts/arm modules

2018-01-28 Thread Oleksandr Tymoshenko
Poul-Henning Kamp (p...@phk.freebsd.dk) wrote:
> 
> In message <8d8ae9d10058fd72ce3ec467181c9...@megadrive.org>, Emmanuel Vadot 
> writes:
> 
> >  Sometimes it makes sense to reboot.
> 
> Yes, *sometimes* it does.
> 
> But *always* demanding reboot makes no sense ever.
> 
> >  Reference platform doesn't make much sense in the embedded world.
> 
> A reference platform which peple can look at to find out what the
> software architecture is supposed to be, in the near total absense of
> documentation for said software architecture makes a lot of sense.
> 
> >  I'm not upset at you for not using, I'm "upset" at you for not wanting 
> >to make the effort to implement them. Some are hard, some are easy.
> 
> FreeBSD is a hobby for me these days, that implied a certain amount
> of enjoyment and limited time.
> 
> Trying to guess what software architecture you want to be written,
> based on the non-existent documentation and with no reference-platform
> to look at, and then implementing it on a SOC where the hardware
> documentation spans the gamut from from missing over mangled to
> misleading, does not qualify as "enjoyment" for me and it certainly
> is not something I have time for.
> 
> >  What's funny though is that even with a pinctrl and clock management, 
> >we still don't have what is necessary to implement what you want 
> >(kldloading a driver and directly use pwm). For that we need overlays at 
> >runtime, pinmuxing at runtime and probably other things too.
> 
> I'm amazed if those things are not already part of our ambition ?
> 
> >  This is where I (and probably) other don't agree, this is backward.
> >  We must implement first proper pinctrl driver and clock management 
> >  instead of introduce hacks.
> 
> Who exactly are "We" ?
> 
> You indicated that you are not going to do it.
> 
> I can't because I don't know what it is that I am supposed to write.
> 
> Nobody else seems to be inclined to do it either.
> 
> So RPi as a platform is just in limbo forever ?
> 
> And where does this "Spanish Inquisition" road end?
> 
> Why are gpio and spi allowed to exist on the RPi platform?  Or is
> your next demand going to be that they also be removed pending a
> hypothetical pinctrl driver ?

So to stear discussion away from heated emotional exchange
and to the more practical side. As far as I understand there
are three contentious points: pinctl, clock management,
ignoring "status" property 

I2C and SPI drivers predate pinctl and proper FDT support. pin
config part there is ugly as hell and should have been
re-implemented long ago. Here is the patch that fixes these and
PWM drivers: https://reviews.freebsd.org/D14104

I don't know enough about extres/clk framework but I know how to
read code and where to look for references so I can document it.
RPi3 DTS bindings might be not compatible with our implementation of
extres/clk but I can check. Will it help you to fix clkman
driver in foreseeable future?

Ignoring value of ofw_bus_status_okay(dev) in probe method is
wrong for number of reasons and pinctl and clocks were brought up
as an example why "status" property is more than just
attach/dont-attach flag. So there is strictly technical reason
why it should be checked. Once this boilerplate code moves to
simplebus bus probe method as I believe Warner proposed drivers
will not be able to control this aspect any more.

There is blessed way to enable drivers on FDT-based platforms:
overlays. There is a bunch of precompiled blobs for RPi provided
by vendor[1]. To enable PWM on specific pin you need to add following
line to config.txt on boot partition:
dtoverlay=pwm,pin=12,func=4
It's documented here[2]. With proposed pinctl patch your driver
can work on any configurabe pin. We do not include these
overlays in official snapshots and I think this should be fixed.

This approach is not optimal but actual solution for dynamic
device management is complex and requires multiple steps.

There are some drivers in arm/broadcom/bcm2835 that ignore
status value, they should be fixed too. Probably on other
platforms too. I'll look into this to lead the way so to say.

Summary: adding ofw_bus_status_okay check in probe method doesn't
require any additional functionality, ignoring it is inconsistent
with majority of FDT-based drivers' behavior.  There is trivial
way to enable PWM device in platform-conformant way. Will you
please commit fix for this bug? 

All these best practices and guidelines are unwriteen, and
they're not always implemented on older platforms. And it's the
problem from which this situation has risen. They exist as an
"oral tradition" among people who extencively work with FDT-based
platforms and communicate in reviews or mailing list. There is no
entry in MAINTAINERS, no official developer's guide to embedded
systems, documentation exists mostly in a form of source code.
May be it can be improved. Where should they be codified or
documented (except man pages) to be authoritative source?  Where

Re: svn commit: r328257 - in head/sys: arm/broadcom/bcm2835 dts/arm modules

2018-01-28 Thread Warner Losh
On Sun, Jan 28, 2018 at 11:39 PM, Oleksandr Tymoshenko 
wrote:
>
> Ignoring value of ofw_bus_status_okay(dev) in probe method is
> wrong for number of reasons and pinctl and clocks were brought up
> as an example why "status" property is more than just
> attach/dont-attach flag. So there is strictly technical reason
> why it should be checked. Once this boilerplate code moves to
> simplebus bus probe method as I believe Warner proposed drivers
> will not be able to control this aspect any more.
>

I have patches that does exactly this. I have a few more that will allow
drivers some control over the situation planned, but they require hammering
out some things in newbus first, which I'll write up once I have something
workable and it's been blessed by a couple people I've asked to give
feedback. The writeup will just be the first round, not the final
destination, btw. We need to work out several tricky issues that are
interlocking to ensure that we can enable drivers selectively after boot
time. That's tricky for a lot of reasons, but the tl;dr version is that
embedded is different because you don't just enable a device, but all the
dependencies which, unlike x86, are often 'non-linear' and possibly
non-orthogonal to other devices (eg, you may either have A B and C enabled,
or D E and F, but never any other combination, how do you transition from
state to state sanely). It's a tricky ball of wax that we've neglected for
too long.

Warner
___
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"