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

2018-02-22 Thread Steven Hartland
In our experience this is very device dependent, what lead you to this 
conclusion?


On 22/02/2018 05:43, Warner Losh wrote:

Author: imp
Date: Thu Feb 22 05:43:20 2018
New Revision: 329812
URL: https://svnweb.freebsd.org/changeset/base/329812

Log:
   Don't sort TRIMs.
   
   While the code for ada and da both assume that the trim list is

   ordered when doing the coaleascing the TRIMs, it turns out that
   creating the sorted list uses more resources than are saved by having
   slightly fewer trims sent to the device.
   
   Sponsored by: Netflix


Modified:
   head/sys/cam/cam_iosched.c

Modified: head/sys/cam/cam_iosched.c
==
--- head/sys/cam/cam_iosched.c  Thu Feb 22 04:30:52 2018(r329811)
+++ head/sys/cam/cam_iosched.c  Thu Feb 22 05:43:20 2018(r329812)
@@ -1392,7 +1392,7 @@ cam_iosched_queue_work(struct cam_iosched_softc *isc,
 * the work on the bio queue.
 */
if (bp->bio_cmd == BIO_DELETE) {
-   bioq_disksort(>trim_queue, bp);
+   bioq_insert_tail(>trim_queue, bp);
  #ifdef CAM_IOSCHED_DYNAMIC
isc->trim_stats.in++;
isc->trim_stats.queued++;



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


svn commit: r329817 - in head/etc: . rc.d

2018-02-22 Thread Marcelo Araujo
Author: araujo
Date: Thu Feb 22 08:25:39 2018
New Revision: 329817
URL: https://svnweb.freebsd.org/changeset/base/329817

Log:
  The firewall_type is ignored if not set in rc.conf or rc.conf.local,
  after r190575 there is an option to call rc.firewall with the firewall_type
  passed in as an argument.
  
  Submitted by: David P. Discher 
  MFC after:3 weeks.
  Sponsored by: iXsystems Inc.
  Differential Revision:https://reviews.freebsd.org/D14286

Modified:
  head/etc/rc.d/ipfw
  head/etc/rc.firewall

Modified: head/etc/rc.d/ipfw
==
--- head/etc/rc.d/ipfw  Thu Feb 22 05:44:00 2018(r329816)
+++ head/etc/rc.d/ipfw  Thu Feb 22 08:25:39 2018(r329817)
@@ -40,7 +40,11 @@ ipfw_start()
 {
local   _firewall_type
 
-   _firewall_type=$1
+   if [ -n "${1}" ]; then
+   _firewall_type=$1
+   else
+   _firewall_type=${firewall_type}
+   fi
 
# set the firewall rules script if none was specified
[ -z "${firewall_script}" ] && firewall_script=/etc/rc.firewall

Modified: head/etc/rc.firewall
==
--- head/etc/rc.firewallThu Feb 22 05:44:00 2018(r329816)
+++ head/etc/rc.firewallThu Feb 22 08:25:39 2018(r329817)
@@ -112,12 +112,20 @@ setup_ipv6_mandatory() {
${fwcmd} add pass ipv6-icmp from any to any icmp6types 2,135,136
 }
 
+. /etc/rc.subr
+. /etc/network.subr
+
 if [ -n "${1}" ]; then
firewall_type="${1}"
 fi
+if [ -z "${firewall_rc_config_load}" ]; then
+load_rc_config ipfw
+else
+for i in ${firewall_rc_config_load}; do
+load_rc_config $i
+done
+fi
 
-. /etc/rc.subr
-. /etc/network.subr
 afexists inet6
 ipv6_available=$?
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2018-02-22 Thread Warner Losh
On Thu, Feb 22, 2018 at 12:01 AM, Allan Jude  wrote:

> On 2018-02-22 01:07, O. Hartmann wrote:
> > On Thu, 22 Feb 2018 05:43:50 + (UTC)
> > Warner Losh  wrote:
> >
> >> Author: imp
> >> Date: Thu Feb 22 05:43:50 2018
> >> New Revision: 329814
> >> URL: https://svnweb.freebsd.org/changeset/base/329814
> >>
> >> Log:
> >>   Note when we tick.
> >>
> >>   To help implement a policy of 'queue all trims until next I/O sched
> >>   tick' policy to help coalesce them, note when we tick so we can do
> >>   something special on the first call after the tick to get more work.
> >>
> >>   Sponsored by: Netflix
> >>
> >> Modified:
> >>   head/sys/cam/cam_iosched.c
> >>
> >> Modified: head/sys/cam/cam_iosched.c
> >> 
> ==
> >> --- head/sys/cam/cam_iosched.c   Thu Feb 22 05:43:45 2018
> >> (r329813) +++ head/sys/cam/cam_iosched.c Thu Feb 22 05:43:50
> >> 2018 (r329814) @@ -60,6 +60,19 @@ static MALLOC_DEFINE(M_CAMSCHED,
> >> "CAM I/O Scheduler", "CAM I/O Scheduler buffers");
> >>
> >>  /*
> >> + * Trim or similar currently pending completion. Should only be set for
> >> + * those drivers wishing only one Trim active at a time.
> >> + */
> >> +#define CAM_IOSCHED_FLAG_TRIM_ACTIVE(1ul << 0)
> >> +/* Callout active, and needs to be torn down */
> >> +#define CAM_IOSCHED_FLAG_CALLOUT_ACTIVE (1ul << 1)
> >> +/* Timer has just ticked */
> >> +#define CAM_IOSCHED_FLAG_TICK   (1ul << 2)
> >> +
> >> +/* Periph drivers set these flags to indicate work
> */
> >> +#define CAM_IOSCHED_FLAG_WORK_FLAGS ((0xu) << 16)
> >> +
> >> +/*
> >>   * Default I/O scheduler for FreeBSD. This implementation is just a
> >> thin-vineer
> >>   * over the bioq_* interface, with notions of separate calls for
> normal I/O
> >> and
> >>   * for trims.
> >> @@ -574,6 +587,7 @@ cam_iosched_ticker(void *arg)
> >>  cam_iosched_limiter_tick(>write_stats);
> >>  cam_iosched_limiter_tick(>trim_stats);
> >>
> >> +isc->flags |= CAM_IOSCHED_FLAGS_TICK;
> >>  cam_iosched_schedule(isc, isc->periph);
> >>
> >>  /*
> >> @@ -701,17 +715,6 @@ cam_iosched_cl_maybe_steer(struct control_loop
> *clp)
> >>  }
> >>  #endif
> >>
> >> -/*
> >> - * Trim or similar currently pending completion. Should only be set for
> >> - * those drivers wishing only one Trim active at a time.
> >> - */
> >> -#define CAM_IOSCHED_FLAG_TRIM_ACTIVE(1ul << 0)
> >> -/* Callout active, and needs to be torn down */
> >> -#define CAM_IOSCHED_FLAG_CALLOUT_ACTIVE (1ul << 1)
> >> -
> >> -/* Periph drivers set these flags to indicate work
> */
> >> -#define CAM_IOSCHED_FLAG_WORK_FLAGS ((0xu) << 16)
> >> -
> >>  #ifdef CAM_IOSCHED_DYNAMIC
> >>  static void
> >>  cam_iosched_io_metric_update(struct cam_iosched_softc *isc,
> >> @@ -1322,6 +1325,10 @@ struct bio *
> >>  cam_iosched_next_bio(struct cam_iosched_softc *isc)
> >>  {
> >>  struct bio *bp;
> >> +bool wastick;
> >> +
> >> +wastick = !!(isc->flags & CAM_IOSCHED_FLAGS_TICK);
> >> +isc->flags &= ~CAM_IOSCHED_FLAGS_TICK;
> >>
> >>  /*
> >>   * See if we have a trim that can be scheduled. We can only send
> one
> >> ___
> >> svn-src-head@freebsd.org mailing list
> >> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> >> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
> >
> > A recent buildworld/buildkernel failed with this error just right now:
> >
> > --- cam_iosched.o ---
> > /usr/src/sys/cam/cam_iosched.c:593:16: error: use of undeclared
> identifier
> > 'CAM_IOSCHED_FLAGS_TICK' isc->flags |= CAM_IOSCHED_FLAGS_TICK;
> >
>
> Looks like a typo, FLAGS_TICK vs FLAG_TICK
>

It is. I'm unsure how, but it appears to have snuck in during my final
rebasing to current... I had a mix in the middle of development and thought
I'd fixed them all...

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


svn commit: r329818 - head/sys/cam

2018-02-22 Thread Warner Losh
Author: imp
Date: Thu Feb 22 10:55:23 2018
New Revision: 329818
URL: https://svnweb.freebsd.org/changeset/base/329818

Log:
  Fix typo in last commit after last rebase before commit...

Modified:
  head/sys/cam/cam_iosched.c

Modified: head/sys/cam/cam_iosched.c
==
--- head/sys/cam/cam_iosched.c  Thu Feb 22 08:25:39 2018(r329817)
+++ head/sys/cam/cam_iosched.c  Thu Feb 22 10:55:23 2018(r329818)
@@ -590,7 +590,7 @@ cam_iosched_ticker(void *arg)
cam_iosched_limiter_tick(>write_stats);
cam_iosched_limiter_tick(>trim_stats);
 
-   isc->flags |= CAM_IOSCHED_FLAGS_TICK;
+   isc->flags |= CAM_IOSCHED_FLAG_TICK;
cam_iosched_schedule(isc, isc->periph);
 
/*
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r329819 - in head/sys: cam cam/ata cam/nvme cam/scsi dev/nvme

2018-02-22 Thread Warner Losh
Author: imp
Date: Thu Feb 22 11:18:33 2018
New Revision: 329819
URL: https://svnweb.freebsd.org/changeset/base/329819

Log:
  Backout r329818, r329816 and r329815.
  
  These aren't the commits I thought I was testing prior to
  commit. Revert until I can sort out what happened and fix it.

Modified:
  head/sys/cam/ata/ata_da.c
  head/sys/cam/cam_iosched.c
  head/sys/cam/cam_iosched.h
  head/sys/cam/nvme/nvme_da.c
  head/sys/cam/scsi/scsi_da.c
  head/sys/dev/nvme/nvme.h

Modified: head/sys/cam/ata/ata_da.c
==
--- head/sys/cam/ata/ata_da.c   Thu Feb 22 10:55:23 2018(r329818)
+++ head/sys/cam/ata/ata_da.c   Thu Feb 22 11:18:33 2018(r329819)
@@ -1705,7 +1705,7 @@ adaregister(struct cam_periph *periph, void *arg)
announce_buf = softc->announce_temp;
bzero(announce_buf, ADA_ANNOUNCETMP_SZ);
 
-   if (cam_iosched_init(>cam_iosched, periph, 0) != 0) {
+   if (cam_iosched_init(>cam_iosched, periph) != 0) {
printf("adaregister: Unable to probe new device. "
   "Unable to allocate iosched memory\n");
free(softc, M_DEVBUF);

Modified: head/sys/cam/cam_iosched.c
==
--- head/sys/cam/cam_iosched.c  Thu Feb 22 10:55:23 2018(r329818)
+++ head/sys/cam/cam_iosched.c  Thu Feb 22 11:18:33 2018(r329819)
@@ -68,8 +68,6 @@ static MALLOC_DEFINE(M_CAMSCHED, "CAM I/O Scheduler",
 #define CAM_IOSCHED_FLAG_CALLOUT_ACTIVE (1ul << 1)
/* Timer has just ticked */
 #define CAM_IOSCHED_FLAG_TICK  (1ul << 2)
-   /* When set, defer trims until after next tick */
-#define CAM_IOSCHED_FLAG_TRIM_QONLY(1ul << 4)
 
/* Periph drivers set these flags to indicate work */
 #define CAM_IOSCHED_FLAG_WORK_FLAGS((0xu) << 16)
@@ -292,7 +290,6 @@ struct cam_iosched_softc {
struct bio_queue_head trim_queue;
/* scheduler flags < 16, user flags >= 16 */
uint32_tflags;
-   u_int   caps;
int sort_io_queue;
 #ifdef CAM_IOSCHED_DYNAMIC
int read_bias;  /* Read bias setting */
@@ -590,7 +587,7 @@ cam_iosched_ticker(void *arg)
cam_iosched_limiter_tick(>write_stats);
cam_iosched_limiter_tick(>trim_stats);
 
-   isc->flags |= CAM_IOSCHED_FLAG_TICK;
+   isc->flags |= CAM_IOSCHED_FLAGS_TICK;
cam_iosched_schedule(isc, isc->periph);
 
/*
@@ -1067,16 +1064,12 @@ cam_iosched_cl_sysctl_fini(struct control_loop *clp)
  * sizeof struct cam_iosched_softc.
  */
 int
-cam_iosched_init(struct cam_iosched_softc **iscp, struct cam_periph *periph,
-   u_int caps)
+cam_iosched_init(struct cam_iosched_softc **iscp, struct cam_periph *periph)
 {
 
*iscp = malloc(sizeof(**iscp), M_CAMSCHED, M_NOWAIT | M_ZERO);
if (*iscp == NULL)
return ENOMEM;
-   (*iscp)->caps = caps;
-   if (caps & CAM_IOSCHED_CAP_TRIM_CLOCKED)
-   (*iscp)->flags |= CAM_IOSCHED_FLAG_TRIM_QONLY;
 #ifdef CAM_IOSCHED_DYNAMIC
if (iosched_debug)
printf("CAM IOSCHEDULER Allocating entry at %p\n", *iscp);
@@ -1203,7 +1196,7 @@ cam_iosched_flush(struct cam_iosched_softc *isc, struc
 
 #ifdef CAM_IOSCHED_DYNAMIC
 static struct bio *
-cam_iosched_get_write(struct cam_iosched_softc *isc, bool wastick)
+cam_iosched_get_write(struct cam_iosched_softc *isc)
 {
struct bio *bp;
 
@@ -1312,45 +1305,13 @@ cam_iosched_next_trim(struct cam_iosched_softc *isc)
  *
  * Assumes we're called with the periph lock held.
  */
-static struct bio *
-cam_iosched_get_trim(struct cam_iosched_softc *isc, bool wastick)
+struct bio *
+cam_iosched_get_trim(struct cam_iosched_softc *isc)
 {
 
-   /*
-* If there's no trims, return NULL. If we're clocking out the
-* trims rather than doing thins right away, this is where we
-* set the queue only bit. This causes us to ignore them until
-* the next clock tick. If we can't get a trim, and we're clocking
-* them out, if the queue is empty or if we're rate limited,
-* then set QONLY so we stop processing trims until the next
-* tick.
-*/
-   if (!cam_iosched_has_more_trim(isc)) {
-   if ((isc->caps & CAM_IOSCHED_CAP_TRIM_CLOCKED) &&
-   (bioq_first(>trim_queue) == NULL ||
-#ifdef CAM_IOSCHED_DYNAMIC
-(isc->trim_stats.state_flags & IOP_RATE_LIMITED)
-#else
-false
-#endif
-   ))
-   isc->flags |= CAM_IOSCHED_FLAG_TRIM_QONLY;
+   if (!cam_iosched_has_more_trim(isc))
return NULL;
-   }
 
-   /*
-* If we just ticked, and we have trims, then turn off
-* the queue only flag.
-*/
-   if (wastick)
- 

svn commit: r329823 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys

2018-02-22 Thread Andriy Gapon
Author: avg
Date: Thu Feb 22 13:06:27 2018
New Revision: 329823
URL: https://svnweb.freebsd.org/changeset/base/329823

Log:
  another rework of getzfsvfs / getzfsvfs_impl code
  
  This change is designed to account for yet another difference between
  illumos and FreeBSD VFS.  In FreeBSD a filesystem driver is supposed to
  clean up mnt_data in its VFS_UNMOUNT method because it's the last call
  into the driver before a struct mount object is destroyed.  The VFS
  drains all references to the object before destroying it, but for the
  driver it's already as good as gone.
  In contrast, illumos VFS provides another method, VFS_FREEVFS, that is
  called when all references are drained.  So, the driver can keep its
  data after VFS_UNMOUNT and clean it up in VFS_FREEVFS after all
  references are gone. This is what ZFS does on illumos.
  So there a reference to a filesystem is sufficient to guarantee that the
  ZFS specific data, aka zfsvfs_t, stays around (even if the filesystem
  gets unmounted).  In FreeBSD we need to vfs_busy the filesystem to get
  the same guarantee.  vfs_ref guarantees only that the struct mount is
  kept.
  
  The following rules should be observed in getzfsvfs / getzfsvfs_impl on
  FreeBSD:
  - if we need access to zfsvfs_t then we must use vfs_busy
  - if only we need to access struct mount (aka vfs_t), then vfs_ref is
enough
  - when illumos code actually needs only the vfs_t, they still can pass
the zfsvfs_t and get the vfs_t from it;  that can work in FreeBSD if
the filesystem is busied, but when it's just referenced then we have
to pass the vfs_t explicitly
  - we cannot call vfs_busy while holding a dataset because that creates a
LOR with dp_config_rwlock
  
  As a result:
  - getzfsvfs_impl now only references the filesystem, same as in illumos,
but unlike illumos it has to return the vfs_t
  - the consumers are updated to account for the change
  - getzfsvfs busies the filesystem (and drops the reference from
getzfsvfs_impl)
  
  Also, zfs_unmount_snap() now gets a busied a filesystem, references it
  and then unbusies it essentially reverting actions done in getzfsvfs.
  This is needed because the code may perform some checks that require the
  zfsvfs_t.  So, those are done before the unbusying.
  
  MFC after:2 weeks

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_get.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h Thu Feb 
22 12:31:28 2018(r329822)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h Thu Feb 
22 13:06:27 2018(r329823)
@@ -426,7 +426,11 @@ extern int zfs_secpolicy_destroy_perms(const char *, c
 extern int zfs_busy(void);
 extern void zfs_unmount_snap(const char *);
 extern void zfs_destroy_unmount_origin(const char *);
+#ifdef illumos
 extern int getzfsvfs_impl(struct objset *, struct zfsvfs **);
+#else
+extern int getzfsvfs_impl(struct objset *, vfs_t **);
+#endif
 extern int getzfsvfs(const char *, struct zfsvfs **);
 
 /*

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_get.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_get.c   Thu Feb 
22 12:31:28 2018(r329822)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_get.c   Thu Feb 
22 13:06:27 2018(r329823)
@@ -226,7 +226,9 @@ get_temporary_prop(dsl_dataset_t *ds, zfs_prop_t zfs_p
return (0);
 #else
int error;
+#ifdef illumos
zfsvfs_t *zfvp;
+#endif
vfs_t *vfsp;
objset_t *os;
uint64_t tmp = *val;
@@ -235,12 +237,12 @@ get_temporary_prop(dsl_dataset_t *ds, zfs_prop_t zfs_p
if (error != 0)
return (error);
 
-   error = getzfsvfs_impl(os, );
+   error = getzfsvfs_impl(os, );
if (error != 0)
return (error);
-
+#ifdef illumos
vfsp = zfvp->z_vfs;
-
+#endif
switch (zfs_prop) {
case ZFS_PROP_ATIME:
if (vfs_optionisset(vfsp, MNTOPT_NOATIME, NULL))

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Thu Feb 
22 12:31:28 2018(r329822)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Thu Feb 
22 13:06:27 2018(r329823)
@@ -1448,9 +1448,9 @@ put_nvlist(zfs_cmd_t *zc, nvlist_t *nvl)
 }
 
 int
-getzfsvfs_impl(objset_t *os, zfsvfs_t **zfvp)
+getzfsvfs_impl(objset_t *os, vfs_t **vfsp)
 {
-   vfs_t *vfsp;
+   zfsvfs_t 

svn commit: r329824 - in head: sbin/nvmecontrol sys/cam/nvme sys/conf sys/dev/mpr sys/dev/nvme

2018-02-22 Thread Wojciech Macek
Author: wma
Date: Thu Feb 22 13:32:31 2018
New Revision: 329824
URL: https://svnweb.freebsd.org/changeset/base/329824

Log:
  NVMe: Add big-endian support
  
  Remove bitfields from defined structures as they are not portable.
  Instead use shift and mask macros in the driver and nvmecontrol application.
  
  NVMe is now working on powerpc64 host.
  
  Submitted by:  Michal Stanek 
  Obtained from: Semihalf
  Reviewed by:   imp, wma
  Sponsored by:  IBM, QCM Technologies
  Differential revision: https://reviews.freebsd.org/D13916

Modified:
  head/sbin/nvmecontrol/devlist.c
  head/sbin/nvmecontrol/firmware.c
  head/sbin/nvmecontrol/identify.c
  head/sbin/nvmecontrol/logpage.c
  head/sbin/nvmecontrol/nvmecontrol.c
  head/sbin/nvmecontrol/perftest.c
  head/sbin/nvmecontrol/power.c
  head/sbin/nvmecontrol/wdc.c
  head/sys/cam/nvme/nvme_all.c
  head/sys/cam/nvme/nvme_da.c
  head/sys/conf/files
  head/sys/dev/mpr/mpr_sas.c
  head/sys/dev/nvme/nvme.c
  head/sys/dev/nvme/nvme.h
  head/sys/dev/nvme/nvme_ctrlr.c
  head/sys/dev/nvme/nvme_ctrlr_cmd.c
  head/sys/dev/nvme/nvme_ns.c
  head/sys/dev/nvme/nvme_ns_cmd.c
  head/sys/dev/nvme/nvme_private.h
  head/sys/dev/nvme/nvme_qpair.c

Modified: head/sbin/nvmecontrol/devlist.c
==
--- head/sbin/nvmecontrol/devlist.c Thu Feb 22 13:06:27 2018
(r329823)
+++ head/sbin/nvmecontrol/devlist.c Thu Feb 22 13:32:31 2018
(r329824)
@@ -54,8 +54,14 @@ devlist_usage(void)
 static inline uint32_t
 ns_get_sector_size(struct nvme_namespace_data *nsdata)
 {
+   uint8_t flbas_fmt, lbads;
 
-   return (1 << nsdata->lbaf[nsdata->flbas.format].lbads);
+   flbas_fmt = (nsdata->flbas >> NVME_NS_DATA_FLBAS_FORMAT_SHIFT) &
+   NVME_NS_DATA_FLBAS_FORMAT_MASK;
+   lbads = (nsdata->lbaf[flbas_fmt] >> NVME_NS_DATA_LBAF_LBADS_SHIFT) &
+   NVME_NS_DATA_LBAF_LBADS_MASK;
+
+   return (1 << lbads);
 }
 
 void

Modified: head/sbin/nvmecontrol/firmware.c
==
--- head/sbin/nvmecontrol/firmware.cThu Feb 22 13:06:27 2018
(r329823)
+++ head/sbin/nvmecontrol/firmware.cThu Feb 22 13:32:31 2018
(r329824)
@@ -125,9 +125,9 @@ update_firmware(int fd, uint8_t *payload, int32_t payl
memcpy(chunk, payload + off, size);
 
memset(, 0, sizeof(pt));
-   pt.cmd.opc = NVME_OPC_FIRMWARE_IMAGE_DOWNLOAD;
-   pt.cmd.cdw10 = (size / sizeof(uint32_t)) - 1;
-   pt.cmd.cdw11 = (off / sizeof(uint32_t));
+   pt.cmd.opc_fuse = 
NVME_CMD_SET_OPC(NVME_OPC_FIRMWARE_IMAGE_DOWNLOAD);
+   pt.cmd.cdw10 = htole32((size / sizeof(uint32_t)) - 1);
+   pt.cmd.cdw11 = htole32(off / sizeof(uint32_t));
pt.buf = chunk;
pt.len = size;
pt.is_read = 0;
@@ -147,17 +147,21 @@ static int
 activate_firmware(int fd, int slot, int activate_action)
 {
struct nvme_pt_command  pt;
+   uint16_t sct, sc;
 
memset(, 0, sizeof(pt));
-   pt.cmd.opc = NVME_OPC_FIRMWARE_ACTIVATE;
-   pt.cmd.cdw10 = (activate_action << 3) | slot;
+   pt.cmd.opc_fuse = NVME_CMD_SET_OPC(NVME_OPC_FIRMWARE_ACTIVATE);
+   pt.cmd.cdw10 = htole32((activate_action << 3) | slot);
pt.is_read = 0;
 
if (ioctl(fd, NVME_PASSTHROUGH_CMD, ) < 0)
err(1, "firmware activate request failed");
 
-   if (pt.cpl.status.sct == NVME_SCT_COMMAND_SPECIFIC &&
-   pt.cpl.status.sc == NVME_SC_FIRMWARE_REQUIRES_RESET)
+   sct = NVME_STATUS_GET_SCT(pt.cpl.status);
+   sc = NVME_STATUS_GET_SC(pt.cpl.status);
+
+   if (sct == NVME_SCT_COMMAND_SPECIFIC &&
+   sc == NVME_SC_FIRMWARE_REQUIRES_RESET)
return 1;
 
if (nvme_completion_is_error())
@@ -180,16 +184,19 @@ firmware(int argc, char *argv[])
int fd = -1, slot = 0;
int a_flag, s_flag, f_flag;
int activate_action, reboot_required;
-   charch, *p, *image = NULL;
+   int opt;
+   char*p, *image = NULL;
char*controller = NULL, prompt[64];
void*buf = NULL;
int32_t size = 0;
+   uint16_toacs_fw;
+   uint8_t fw_slot1_ro, fw_num_slots;
struct nvme_controller_data cdata;
 
a_flag = s_flag = f_flag = false;
 
-   while ((ch = getopt(argc, argv, "af:s:")) != -1) {
-   switch (ch) {
+   while ((opt = getopt(argc, argv, "af:s:")) != -1) {
+   switch (opt) {
case 'a':
a_flag = 

svn commit: r329820 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2018-02-22 Thread Andriy Gapon
Author: avg
Date: Thu Feb 22 11:41:00 2018
New Revision: 329820
URL: https://svnweb.freebsd.org/changeset/base/329820

Log:
  followup to r329556, completely remove the covered vnode assert
  
  vrele() acquires the vnode lock only if the hold count drops to zero.
  In other scenarios it needs only the interlock.  So,
  zfsctl_snapdir_lookup() can race with vfs_mount_destroy() -> vrele()
  such that the lookup adds a new reference and then vrele() drops the
  mountpoint's reference and only then we check the reference count.
  It would be just one in this case.
  
  In fact, the assert should have been removed in r323483 when the code
  learned how to deal with the uncovered vnode.
  
  PR:   225795
  MFC after:4 days
  X-MFC with:   r329556

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.cThu Feb 
22 11:18:33 2018(r329819)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.cThu Feb 
22 11:41:00 2018(r329820)
@@ -976,13 +976,6 @@ zfsctl_snapdir_lookup(ap)
break;
 
/*
-* The vnode must be referenced at least by this thread and
-* the mount point or the thread doing the mounting.
-* There can be more references from concurrent lookups.
-*/
-   KASSERT((*vpp)->v_holdcnt > 1, ("found unheld mountpoint"));
-
-   /*
 * Check if a snapshot is already mounted on top of the vnode.
 */
err = zfsctl_mounted_here(vpp, lkflags);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r329737 - head/stand/i386/boot2

2018-02-22 Thread Bruce Evans

On Wed, 21 Feb 2018, Benno Rice wrote:


On Feb 21, 2018, at 10:46 AM, Colin Percival  wrote:

On 02/21/18 10:10, Benno Rice wrote:

 Curiously, changing whitespace seems to cause the md5 of the .o files to differ
 these days hence the following testing strategy:

 Tested by: objdump -d | md5 (both in-tree clang and lang/gcc6)


objdump -d only dissassembles the text section (and does a bad job of that,
with calls to extern functions printed as

e8 fc ff ff ff   call   

on i386 (here 0xe8 is the opcode for the call instruction, and fc ff ff ff is
-4 which is a placeholder for the eventual offset, and  is
the result of adding -4 to the current program counter.  The symbol table
gives the name of linked address, but the garbage offset is used to form
the garbage address instead of printing this name.

So objdump -d would miss the large change of calling a different extern
function.


Is this simply because line numbers are changing?  That isn't new; I remember
a case where a security advisory touched a .h file and suddenly a huge number
of binaries changed because they included header file line numbers.


No, it happened when I changed the indent of the while statement on line ~132 
in memcpy. I do suspect debug info though.


Isn't there a binary compiled without any debug info?

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


svn commit: r329821 - head/sys/cam

2018-02-22 Thread Warner Losh
Author: imp
Date: Thu Feb 22 11:51:50 2018
New Revision: 329821
URL: https://svnweb.freebsd.org/changeset/base/329821

Log:
  Revert r329814 as well. It should have been in r329819.

Modified:
  head/sys/cam/cam_iosched.c

Modified: head/sys/cam/cam_iosched.c
==
--- head/sys/cam/cam_iosched.c  Thu Feb 22 11:41:00 2018(r329820)
+++ head/sys/cam/cam_iosched.c  Thu Feb 22 11:51:50 2018(r329821)
@@ -60,19 +60,6 @@ static MALLOC_DEFINE(M_CAMSCHED, "CAM I/O Scheduler",
 "CAM I/O Scheduler buffers");
 
 /*
- * Trim or similar currently pending completion. Should only be set for
- * those drivers wishing only one Trim active at a time.
- */
-#define CAM_IOSCHED_FLAG_TRIM_ACTIVE   (1ul << 0)
-   /* Callout active, and needs to be torn down */
-#define CAM_IOSCHED_FLAG_CALLOUT_ACTIVE (1ul << 1)
-   /* Timer has just ticked */
-#define CAM_IOSCHED_FLAG_TICK  (1ul << 2)
-
-   /* Periph drivers set these flags to indicate work */
-#define CAM_IOSCHED_FLAG_WORK_FLAGS((0xu) << 16)
-
-/*
  * Default I/O scheduler for FreeBSD. This implementation is just a thin-vineer
  * over the bioq_* interface, with notions of separate calls for normal I/O and
  * for trims.
@@ -587,7 +574,6 @@ cam_iosched_ticker(void *arg)
cam_iosched_limiter_tick(>write_stats);
cam_iosched_limiter_tick(>trim_stats);
 
-   isc->flags |= CAM_IOSCHED_FLAGS_TICK;
cam_iosched_schedule(isc, isc->periph);
 
/*
@@ -715,6 +701,17 @@ cam_iosched_cl_maybe_steer(struct control_loop *clp)
 }
 #endif
 
+/*
+ * Trim or similar currently pending completion. Should only be set for
+ * those drivers wishing only one Trim active at a time.
+ */
+#define CAM_IOSCHED_FLAG_TRIM_ACTIVE   (1ul << 0)
+   /* Callout active, and needs to be torn down */
+#define CAM_IOSCHED_FLAG_CALLOUT_ACTIVE (1ul << 1)
+
+   /* Periph drivers set these flags to indicate work */
+#define CAM_IOSCHED_FLAG_WORK_FLAGS((0xu) << 16)
+
 #ifdef CAM_IOSCHED_DYNAMIC
 static void
 cam_iosched_io_metric_update(struct cam_iosched_softc *isc,
@@ -1325,10 +1322,6 @@ struct bio *
 cam_iosched_next_bio(struct cam_iosched_softc *isc)
 {
struct bio *bp;
-   bool wastick;
-   
-   wastick = !!(isc->flags & CAM_IOSCHED_FLAGS_TICK);
-   isc->flags &= ~CAM_IOSCHED_FLAGS_TICK;
 
/*
 * See if we have a trim that can be scheduled. We can only send one
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


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

2018-02-22 Thread Warner Losh
On Feb 22, 2018 3:57 AM, "Warner Losh"  wrote:



On Thu, Feb 22, 2018 at 12:01 AM, Allan Jude  wrote:

> On 2018-02-22 01:07, O. Hartmann wrote:
> > On Thu, 22 Feb 2018 05:43:50 + (UTC)
> > Warner Losh  wrote:
> >
> >> Author: imp
> >> Date: Thu Feb 22 05:43:50 2018
> >> New Revision: 329814
> >> URL: https://svnweb.freebsd.org/changeset/base/329814
> >>
> >> Log:
> >>   Note when we tick.
> >>
> >>   To help implement a policy of 'queue all trims until next I/O sched
> >>   tick' policy to help coalesce them, note when we tick so we can do
> >>   something special on the first call after the tick to get more work.
> >>
> >>   Sponsored by: Netflix
> >>
> >> Modified:
> >>   head/sys/cam/cam_iosched.c
> >>
> >> Modified: head/sys/cam/cam_iosched.c
> >> 
> ==
> >> --- head/sys/cam/cam_iosched.c   Thu Feb 22 05:43:45 2018
> >> (r329813) +++ head/sys/cam/cam_iosched.c Thu Feb 22 05:43:50
> >> 2018 (r329814) @@ -60,6 +60,19 @@ static MALLOC_DEFINE(M_CAMSCHED,
> >> "CAM I/O Scheduler", "CAM I/O Scheduler buffers");
> >>
> >>  /*
> >> + * Trim or similar currently pending completion. Should only be set for
> >> + * those drivers wishing only one Trim active at a time.
> >> + */
> >> +#define CAM_IOSCHED_FLAG_TRIM_ACTIVE(1ul << 0)
> >> +/* Callout active, and needs to be torn down */
> >> +#define CAM_IOSCHED_FLAG_CALLOUT_ACTIVE (1ul << 1)
> >> +/* Timer has just ticked */
> >> +#define CAM_IOSCHED_FLAG_TICK   (1ul << 2)
> >> +
> >> +/* Periph drivers set these flags to indicate work
> */
> >> +#define CAM_IOSCHED_FLAG_WORK_FLAGS ((0xu) << 16)
> >> +
> >> +/*
> >>   * Default I/O scheduler for FreeBSD. This implementation is just a
> >> thin-vineer
> >>   * over the bioq_* interface, with notions of separate calls for
> normal I/O
> >> and
> >>   * for trims.
> >> @@ -574,6 +587,7 @@ cam_iosched_ticker(void *arg)
> >>  cam_iosched_limiter_tick(>write_stats);
> >>  cam_iosched_limiter_tick(>trim_stats);
> >>
> >> +isc->flags |= CAM_IOSCHED_FLAGS_TICK;
> >>  cam_iosched_schedule(isc, isc->periph);
> >>
> >>  /*
> >> @@ -701,17 +715,6 @@ cam_iosched_cl_maybe_steer(struct control_loop
> *clp)
> >>  }
> >>  #endif
> >>
> >> -/*
> >> - * Trim or similar currently pending completion. Should only be set for
> >> - * those drivers wishing only one Trim active at a time.
> >> - */
> >> -#define CAM_IOSCHED_FLAG_TRIM_ACTIVE(1ul << 0)
> >> -/* Callout active, and needs to be torn down */
> >> -#define CAM_IOSCHED_FLAG_CALLOUT_ACTIVE (1ul << 1)
> >> -
> >> -/* Periph drivers set these flags to indicate work
> */
> >> -#define CAM_IOSCHED_FLAG_WORK_FLAGS ((0xu) << 16)
> >> -
> >>  #ifdef CAM_IOSCHED_DYNAMIC
> >>  static void
> >>  cam_iosched_io_metric_update(struct cam_iosched_softc *isc,
> >> @@ -1322,6 +1325,10 @@ struct bio *
> >>  cam_iosched_next_bio(struct cam_iosched_softc *isc)
> >>  {
> >>  struct bio *bp;
> >> +bool wastick;
> >> +
> >> +wastick = !!(isc->flags & CAM_IOSCHED_FLAGS_TICK);
> >> +isc->flags &= ~CAM_IOSCHED_FLAGS_TICK;
> >>
> >>  /*
> >>   * See if we have a trim that can be scheduled. We can only send
> one
> >> ___
> >> svn-src-head@freebsd.org mailing list
> >> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> >> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
> >
> > A recent buildworld/buildkernel failed with this error just right now:
> >
> > --- cam_iosched.o ---
> > /usr/src/sys/cam/cam_iosched.c:593:16: error: use of undeclared
> identifier
> > 'CAM_IOSCHED_FLAGS_TICK' isc->flags |= CAM_IOSCHED_FLAGS_TICK;
> >
>
> Looks like a typo, FLAGS_TICK vs FLAG_TICK
>

It is. I'm unsure how, but it appears to have snuck in during my final
rebasing to current... I had a mix in the middle of development and thought
I'd fixed them all...


Something is not right with the series. Backing out and will recommit when
its sorted out.

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


svn commit: r329822 - head/sbin

2018-02-22 Thread Wojciech Macek
Author: wma
Date: Thu Feb 22 12:31:28 2018
New Revision: 329822
URL: https://svnweb.freebsd.org/changeset/base/329822

Log:
  Add bsdlabel and fdisk to powerpc64
  
  Submitted by:  Wojciech Macek 
  Obtained from: Semihalf
  Sponsored by:  IBM, QCM Technologies

Added:
  head/sbin/Makefile.powerpc64   (contents, props changed)

Added: head/sbin/Makefile.powerpc64
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sbin/Makefile.powerpc64Thu Feb 22 12:31:28 2018
(r329822)
@@ -0,0 +1,4 @@
+# $FreeBSD$
+
+SUBDIR += bsdlabel
+SUBDIR += fdisk
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r329824 - in head: sbin/nvmecontrol sys/cam/nvme sys/conf sys/dev/mpr sys/dev/nvme

2018-02-22 Thread Alan Somers
On Thu, Feb 22, 2018 at 6:32 AM, Wojciech Macek  wrote:

> Author: wma
> Date: Thu Feb 22 13:32:31 2018
> New Revision: 329824
> URL: https://svnweb.freebsd.org/changeset/base/329824
>
> Log:
>   NVMe: Add big-endian support
>
>   Remove bitfields from defined structures as they are not portable.
>   Instead use shift and mask macros in the driver and nvmecontrol
> application.
>
>   NVMe is now working on powerpc64 host.
>
>   Submitted by:  Michal Stanek 
>   Obtained from: Semihalf
>   Reviewed by:   imp, wma
>   Sponsored by:  IBM, QCM Technologies
>   Differential revision: https://reviews.freebsd.org/D13916
>

It looks like this change broke the build with Clang:

--- ioctl.pico ---
In file included from ioctl.c:32:
In file included from
/usr/home/alans/freebsd/head/sys/cam/scsi/scsi_pass.h:35:
In file included from /usr/home/alans/freebsd/head/sys/cam/cam_ccb.h:46:
In file included from
/usr/home/alans/freebsd/head/sys/cam/nvme/nvme_all.h:34:
/usr/home/alans/freebsd/head/sys/dev/nvme/nvme.h:1187:26: error: unused
parameter 'p' [-Werror,-Wunused-parameter]
voidnvme_le128toh(void *p)

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


Re: svn commit: r329824 - in head: sbin/nvmecontrol sys/cam/nvme sys/conf sys/dev/mpr sys/dev/nvme

2018-02-22 Thread Warner Losh
On Thu, Feb 22, 2018 at 9:20 AM, Kyle Evans  wrote:

> On Thu, Feb 22, 2018 at 10:19 AM, Alan Somers  wrote:
> > On Thu, Feb 22, 2018 at 6:32 AM, Wojciech Macek  wrote:
> >
> >> Author: wma
> >> Date: Thu Feb 22 13:32:31 2018
> >> New Revision: 329824
> >> URL: https://svnweb.freebsd.org/changeset/base/329824
> >>
> >> Log:
> >>   NVMe: Add big-endian support
> >>
> >>   Remove bitfields from defined structures as they are not portable.
> >>   Instead use shift and mask macros in the driver and nvmecontrol
> >> application.
> >>
> >>   NVMe is now working on powerpc64 host.
> >>
> >>   Submitted by:  Michal Stanek 
> >>   Obtained from: Semihalf
> >>   Reviewed by:   imp, wma
> >>   Sponsored by:  IBM, QCM Technologies
> >>   Differential revision: https://reviews.freebsd.org/D13916
> >>
> >
> > It looks like this change broke the build with Clang:
> >
>
> Fixed in r329827... all little endian arch's broken, not so great. =(
>

At least the kernel is passing my tests this morning... I didn't think this
was ready and hasn't yet lifted my objections in the review... Not sure I
want to get grumpy about it yet, but I'm not pleased to see this.

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


svn commit: r329827 - head/sys/dev/nvme

2018-02-22 Thread Kyle Evans
Author: kevans
Date: Thu Feb 22 16:16:49 2018
New Revision: 329827
URL: https://svnweb.freebsd.org/changeset/base/329827

Log:
  nvme: Unbreak LE builds after r329824
  
  The parameter 'p' is unused if _BYTE_ORDER == _LITTLE_ENDIAN. Add in a
  (void)p to fix the build.

Modified:
  head/sys/dev/nvme/nvme.h

Modified: head/sys/dev/nvme/nvme.h
==
--- head/sys/dev/nvme/nvme.hThu Feb 22 15:29:57 2018(r329826)
+++ head/sys/dev/nvme/nvme.hThu Feb 22 16:16:49 2018(r329827)
@@ -1196,6 +1196,8 @@ void  nvme_le128toh(void *p)
tmp[i] = tmp[15-i];
tmp[15-i] = b;
}
+#else
+   (void)p;
 #endif
 }
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r329830 - head/sbin/nvmecontrol

2018-02-22 Thread Alan Somers
Author: asomers
Date: Thu Feb 22 17:47:16 2018
New Revision: 329830
URL: https://svnweb.freebsd.org/changeset/base/329830

Log:
  nvmecontrol: fix build on amd64/clang
  
  Broken by:329824
  Sponsored by: Spectra Logic Corp

Modified:
  head/sbin/nvmecontrol/identify.c

Modified: head/sbin/nvmecontrol/identify.c
==
--- head/sbin/nvmecontrol/identify.cThu Feb 22 17:09:26 2018
(r329829)
+++ head/sbin/nvmecontrol/identify.cThu Feb 22 17:47:16 2018
(r329830)
@@ -112,7 +112,7 @@ print_controller(struct nvme_controller_data *cdata)
if (cdata->mdts == 0)
printf("Unlimited\n");
else
-   printf("%ld\n", PAGE_SIZE * (1 << cdata->mdts));
+   printf("%d\n", PAGE_SIZE * (1 << cdata->mdts));
printf("Controller ID:  0x%02x\n", cdata->ctrlr_id);
printf("\n");
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r329830 - head/sbin/nvmecontrol

2018-02-22 Thread Ian Lepore
On Thu, 2018-02-22 at 17:47 +, Alan Somers wrote:
> Author: asomers
> Date: Thu Feb 22 17:47:16 2018
> New Revision: 329830
> URL: https://svnweb.freebsd.org/changeset/base/329830
> 
> Log:
>   nvmecontrol: fix build on amd64/clang
>   
>   Broken by:  329824
>   Sponsored by:   Spectra Logic Corp
> 
> Modified:
>   head/sbin/nvmecontrol/identify.c
> 
> Modified: head/sbin/nvmecontrol/identify.c
> ==
> --- head/sbin/nvmecontrol/identify.c  Thu Feb 22 17:09:26 2018
> (r329829)
> +++ head/sbin/nvmecontrol/identify.c  Thu Feb 22 17:47:16 2018
> (r329830)
> @@ -112,7 +112,7 @@ print_controller(struct nvme_controller_data *cdata)
>   if (cdata->mdts == 0)
>   printf("Unlimited\n");
>   else
> - printf("%ld\n", PAGE_SIZE * (1 << cdata->mdts));
> + printf("%d\n", PAGE_SIZE * (1 << cdata->mdts));
>   printf("Controller ID:  0x%02x\n", cdata->ctrlr_id);
>   printf("\n");

If cdata->mdts > 19 that'll overflow 32 bits.  I'm not sure if that can
happen in the real world or not.  If so, maybe it'd be better to do

  printf("%ju\n", PAGE_SIZE * ((uintmax_t)1 << cdata->mdts));

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


svn commit: r329831 - head/stand/userboot/userboot

2018-02-22 Thread Kyle Evans
Author: kevans
Date: Thu Feb 22 18:49:53 2018
New Revision: 329831
URL: https://svnweb.freebsd.org/changeset/base/329831

Log:
  Fix userboot w/ ZFS after r329725
  
  r329725 cleaned up ZFS commands duplicated in multiple places, but userboot
  was not setting HAVE_ZFS when MK_ZFS != "no". This resulted in a failure to
  boot (as seen in PR 226118) in bhyve, with the following message:
  
  /boot/userboot.so: Undefined symbol "ldi_get_size"
  
  PR:   226118
  Glanced at by:imp

Modified:
  head/stand/userboot/userboot/Makefile

Modified: head/stand/userboot/userboot/Makefile
==
--- head/stand/userboot/userboot/Makefile   Thu Feb 22 17:47:16 2018
(r329830)
+++ head/stand/userboot/userboot/Makefile   Thu Feb 22 18:49:53 2018
(r329831)
@@ -42,6 +42,7 @@ NEWVERSWHAT=  "User boot" ${MACHINE_CPUARCH}
 .if ${MK_ZFS} != "no"
 CFLAGS+=   -DUSERBOOT_ZFS_SUPPORT
 LIBZFSBOOT=${BOOTOBJ}/zfs/libzfsboot.a
+HAVE_ZFS=yes
 .endif
 
 # Always add MI sources
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r329824 - in head: sbin/nvmecontrol sys/cam/nvme sys/conf sys/dev/mpr sys/dev/nvme

2018-02-22 Thread Wojciech Macek
Thanks and sorry for troubles!
These lines must have got lost somewhere during rebase as we run tinderbox
with this patch yesterday.

Regards,
Wojtek
wma@

2018-02-22 17:22 GMT+01:00 Alan Somers :

> On Thu, Feb 22, 2018 at 9:20 AM, Kyle Evans  wrote:
>
>> On Thu, Feb 22, 2018 at 10:19 AM, Alan Somers 
>> wrote:
>> > On Thu, Feb 22, 2018 at 6:32 AM, Wojciech Macek 
>> wrote:
>> >
>> >> Author: wma
>> >> Date: Thu Feb 22 13:32:31 2018
>> >> New Revision: 329824
>> >> URL: https://svnweb.freebsd.org/changeset/base/329824
>> >>
>> >> Log:
>> >>   NVMe: Add big-endian support
>> >>
>> >>   Remove bitfields from defined structures as they are not portable.
>> >>   Instead use shift and mask macros in the driver and nvmecontrol
>> >> application.
>> >>
>> >>   NVMe is now working on powerpc64 host.
>> >>
>> >>   Submitted by:  Michal Stanek 
>> >>   Obtained from: Semihalf
>> >>   Reviewed by:   imp, wma
>> >>   Sponsored by:  IBM, QCM Technologies
>> >>   Differential revision: https://reviews.freebsd.org/D13916
>> >>
>> >
>> > It looks like this change broke the build with Clang:
>> >
>>
>> Fixed in r329827... all little endian arch's broken, not so great. =(
>>
>
> Fast work, Kyle.  Thanks a bundle.
> -Alan
>
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r329824 - in head: sbin/nvmecontrol sys/cam/nvme sys/conf sys/dev/mpr sys/dev/nvme

2018-02-22 Thread Kyle Evans
On Thu, Feb 22, 2018 at 10:19 AM, Alan Somers  wrote:
> On Thu, Feb 22, 2018 at 6:32 AM, Wojciech Macek  wrote:
>
>> Author: wma
>> Date: Thu Feb 22 13:32:31 2018
>> New Revision: 329824
>> URL: https://svnweb.freebsd.org/changeset/base/329824
>>
>> Log:
>>   NVMe: Add big-endian support
>>
>>   Remove bitfields from defined structures as they are not portable.
>>   Instead use shift and mask macros in the driver and nvmecontrol
>> application.
>>
>>   NVMe is now working on powerpc64 host.
>>
>>   Submitted by:  Michal Stanek 
>>   Obtained from: Semihalf
>>   Reviewed by:   imp, wma
>>   Sponsored by:  IBM, QCM Technologies
>>   Differential revision: https://reviews.freebsd.org/D13916
>>
>
> It looks like this change broke the build with Clang:
>

Fixed in r329827... all little endian arch's broken, not so great. =(
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r329824 - in head: sbin/nvmecontrol sys/cam/nvme sys/conf sys/dev/mpr sys/dev/nvme

2018-02-22 Thread Wojciech Macek
Yes, I'm doing that right now. So far it seems everything is there, but
will confirm to be 100% sure.

Warner, I'm very sorry for not waiting for your comments. The review was
dead for few days and I thought that all was already said, but maybe should
have waited a little longer...
Let me know what to do now. If you see any issues, I'll be more than happy
to fix them. Also, if you insist, we can revert it, but if no drastic
changes are required, I'd prefer to leave it as is and make iterational
fixes to this part.

Regards,
Wojtek
wma@

2018-02-22 17:34 GMT+01:00 Warner Losh :

> I know all about losing things during the rebase
>
> I'd be a lot happier if you could confirm that nothing else was lost. It's
> a large patch, which makes it impossible for others to do it...  It seems
> to build, and seems to be working in the light testing I've done this
> morning...
>
> Warner
>
>
> On Thu, Feb 22, 2018 at 9:31 AM, Wojciech Macek  wrote:
>
>> Thanks and sorry for troubles!
>> These lines must have got lost somewhere during rebase as we run
>> tinderbox with this patch yesterday.
>>
>> Regards,
>> Wojtek
>> wma@
>>
>> 2018-02-22 17:22 GMT+01:00 Alan Somers :
>>
>>> On Thu, Feb 22, 2018 at 9:20 AM, Kyle Evans  wrote:
>>>
 On Thu, Feb 22, 2018 at 10:19 AM, Alan Somers 
 wrote:
 > On Thu, Feb 22, 2018 at 6:32 AM, Wojciech Macek 
 wrote:
 >
 >> Author: wma
 >> Date: Thu Feb 22 13:32:31 2018
 >> New Revision: 329824
 >> URL: https://svnweb.freebsd.org/changeset/base/329824
 >>
 >> Log:
 >>   NVMe: Add big-endian support
 >>
 >>   Remove bitfields from defined structures as they are not portable.
 >>   Instead use shift and mask macros in the driver and nvmecontrol
 >> application.
 >>
 >>   NVMe is now working on powerpc64 host.
 >>
 >>   Submitted by:  Michal Stanek 
 >>   Obtained from: Semihalf
 >>   Reviewed by:   imp, wma
 >>   Sponsored by:  IBM, QCM Technologies
 >>   Differential revision: https://reviews.freebsd.org/D13916
 >>
 >
 > It looks like this change broke the build with Clang:
 >

 Fixed in r329827... all little endian arch's broken, not so great. =(

>>>
>>> Fast work, Kyle.  Thanks a bundle.
>>> -Alan
>>>
>>
>>
>
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r329824 - in head: sbin/nvmecontrol sys/cam/nvme sys/conf sys/dev/mpr sys/dev/nvme

2018-02-22 Thread Warner Losh
On Thu, Feb 22, 2018 at 9:49 AM, Wojciech Macek  wrote:

> Yes, I'm doing that right now. So far it seems everything is there, but
> will confirm to be 100% sure.
>
> Warner, I'm very sorry for not waiting for your comments. The review was
> dead for few days and I thought that all was already said, but maybe
> should have waited a little longer...
> Let me know what to do now. If you see any issues, I'll be more than happy
> to fix them. Also, if you insist, we can revert it, but if no drastic
> changes are required, I'd prefer to leave it as is and make iterational
> fixes to this part.
>

I agree. Unless something surfaces that's utterly broken, that's the best
path forward. So far the actual driver is coping well with the load I'm
giving it and it wasn't too disruptive to other things I had going on I
understand things get pushed in more quickly than reviews would like
sometimes, so I'll look over the changes and see if all of the things I had
issues with in the original patches were addressed. I know most of them
have, but wanted to make sure before a final sign off is all... If there is
stuff, I think it will be minor.

Warner


> Regards,
> Wojtek
> wma@
>
> 2018-02-22 17:34 GMT+01:00 Warner Losh :
>
>> I know all about losing things during the rebase
>>
>> I'd be a lot happier if you could confirm that nothing else was lost.
>> It's a large patch, which makes it impossible for others to do it...  It
>> seems to build, and seems to be working in the light testing I've done this
>> morning...
>>
>> Warner
>>
>>
>> On Thu, Feb 22, 2018 at 9:31 AM, Wojciech Macek  wrote:
>>
>>> Thanks and sorry for troubles!
>>> These lines must have got lost somewhere during rebase as we run
>>> tinderbox with this patch yesterday.
>>>
>>> Regards,
>>> Wojtek
>>> wma@
>>>
>>> 2018-02-22 17:22 GMT+01:00 Alan Somers :
>>>
 On Thu, Feb 22, 2018 at 9:20 AM, Kyle Evans  wrote:

> On Thu, Feb 22, 2018 at 10:19 AM, Alan Somers 
> wrote:
> > On Thu, Feb 22, 2018 at 6:32 AM, Wojciech Macek 
> wrote:
> >
> >> Author: wma
> >> Date: Thu Feb 22 13:32:31 2018
> >> New Revision: 329824
> >> URL: https://svnweb.freebsd.org/changeset/base/329824
> >>
> >> Log:
> >>   NVMe: Add big-endian support
> >>
> >>   Remove bitfields from defined structures as they are not portable.
> >>   Instead use shift and mask macros in the driver and nvmecontrol
> >> application.
> >>
> >>   NVMe is now working on powerpc64 host.
> >>
> >>   Submitted by:  Michal Stanek 
> >>   Obtained from: Semihalf
> >>   Reviewed by:   imp, wma
> >>   Sponsored by:  IBM, QCM Technologies
> >>   Differential revision: https://reviews.freebsd.org/D13916
> >>
> >
> > It looks like this change broke the build with Clang:
> >
>
> Fixed in r329827... all little endian arch's broken, not so great. =(
>

 Fast work, Kyle.  Thanks a bundle.
 -Alan

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


Re: svn commit: r329824 - in head: sbin/nvmecontrol sys/cam/nvme sys/conf sys/dev/mpr sys/dev/nvme

2018-02-22 Thread Alan Somers
On Thu, Feb 22, 2018 at 9:20 AM, Kyle Evans  wrote:

> On Thu, Feb 22, 2018 at 10:19 AM, Alan Somers  wrote:
> > On Thu, Feb 22, 2018 at 6:32 AM, Wojciech Macek  wrote:
> >
> >> Author: wma
> >> Date: Thu Feb 22 13:32:31 2018
> >> New Revision: 329824
> >> URL: https://svnweb.freebsd.org/changeset/base/329824
> >>
> >> Log:
> >>   NVMe: Add big-endian support
> >>
> >>   Remove bitfields from defined structures as they are not portable.
> >>   Instead use shift and mask macros in the driver and nvmecontrol
> >> application.
> >>
> >>   NVMe is now working on powerpc64 host.
> >>
> >>   Submitted by:  Michal Stanek 
> >>   Obtained from: Semihalf
> >>   Reviewed by:   imp, wma
> >>   Sponsored by:  IBM, QCM Technologies
> >>   Differential revision: https://reviews.freebsd.org/D13916
> >>
> >
> > It looks like this change broke the build with Clang:
> >
>
> Fixed in r329827... all little endian arch's broken, not so great. =(
>

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


Re: svn commit: r329824 - in head: sbin/nvmecontrol sys/cam/nvme sys/conf sys/dev/mpr sys/dev/nvme

2018-02-22 Thread Warner Losh
I know all about losing things during the rebase

I'd be a lot happier if you could confirm that nothing else was lost. It's
a large patch, which makes it impossible for others to do it...  It seems
to build, and seems to be working in the light testing I've done this
morning...

Warner

On Thu, Feb 22, 2018 at 9:31 AM, Wojciech Macek  wrote:

> Thanks and sorry for troubles!
> These lines must have got lost somewhere during rebase as we run tinderbox
> with this patch yesterday.
>
> Regards,
> Wojtek
> wma@
>
> 2018-02-22 17:22 GMT+01:00 Alan Somers :
>
>> On Thu, Feb 22, 2018 at 9:20 AM, Kyle Evans  wrote:
>>
>>> On Thu, Feb 22, 2018 at 10:19 AM, Alan Somers 
>>> wrote:
>>> > On Thu, Feb 22, 2018 at 6:32 AM, Wojciech Macek 
>>> wrote:
>>> >
>>> >> Author: wma
>>> >> Date: Thu Feb 22 13:32:31 2018
>>> >> New Revision: 329824
>>> >> URL: https://svnweb.freebsd.org/changeset/base/329824
>>> >>
>>> >> Log:
>>> >>   NVMe: Add big-endian support
>>> >>
>>> >>   Remove bitfields from defined structures as they are not portable.
>>> >>   Instead use shift and mask macros in the driver and nvmecontrol
>>> >> application.
>>> >>
>>> >>   NVMe is now working on powerpc64 host.
>>> >>
>>> >>   Submitted by:  Michal Stanek 
>>> >>   Obtained from: Semihalf
>>> >>   Reviewed by:   imp, wma
>>> >>   Sponsored by:  IBM, QCM Technologies
>>> >>   Differential revision: https://reviews.freebsd.org/D13916
>>> >>
>>> >
>>> > It looks like this change broke the build with Clang:
>>> >
>>>
>>> Fixed in r329827... all little endian arch's broken, not so great. =(
>>>
>>
>> Fast work, Kyle.  Thanks a bundle.
>> -Alan
>>
>
>
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r329829 - head/sys/kern

2018-02-22 Thread Eric van Gyzen
Author: vangyzen
Date: Thu Feb 22 17:09:26 2018
New Revision: 329829
URL: https://svnweb.freebsd.org/changeset/base/329829

Log:
  sched_ule: update a comment to reflect reality
  
  MFC after:3 days
  Sponsored by: Dell EMC

Modified:
  head/sys/kern/sched_ule.c

Modified: head/sys/kern/sched_ule.c
==
--- head/sys/kern/sched_ule.c   Thu Feb 22 16:59:55 2018(r329828)
+++ head/sys/kern/sched_ule.c   Thu Feb 22 17:09:26 2018(r329829)
@@ -1251,7 +1251,7 @@ sched_pickcpu(struct thread *td, int flags)
}
/*
 * If the thread can run on the last cpu and the affinity has not
-* expired or it is idle run it there.
+* expired and it is idle, run it there.
 */
tdq = TDQ_CPU(ts->ts_cpu);
cg = tdq->tdq_cg;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r329832 - in head: share/man/man4 sys/conf sys/dev/gpio sys/modules sys/modules/chvgpio

2018-02-22 Thread Oleksandr Tymoshenko
Author: gonzo
Date: Thu Feb 22 19:12:32 2018
New Revision: 329832
URL: https://svnweb.freebsd.org/changeset/base/329832

Log:
  [chvgpio] add GPIO driver for Intel Z8xxx SoC family
  
  Add chvgpio(4) driver for Intel Z8xxx SoC family. This product
  was formerly known as Cherry Trail but Linux and OpenBSD drivers
  refer to it as Cherry View. This driver is derived from OpenBSD
  one so the name is kept for alignment with another BSD system.
  
  Submitted by: Tom Jones 
  Reviewed by:  gonzo, wblock(man page)
  MFC after:2 weeks
  Differential Revision:https://reviews.freebsd.org/D13086

Added:
  head/share/man/man4/chvgpio.4   (contents, props changed)
  head/sys/dev/gpio/chvgpio.c   (contents, props changed)
  head/sys/dev/gpio/chvgpio_reg.h   (contents, props changed)
  head/sys/modules/chvgpio/
  head/sys/modules/chvgpio/Makefile   (contents, props changed)
Modified:
  head/share/man/man4/Makefile
  head/sys/conf/files.amd64
  head/sys/conf/files.i386
  head/sys/modules/Makefile

Modified: head/share/man/man4/Makefile
==
--- head/share/man/man4/MakefileThu Feb 22 18:49:53 2018
(r329831)
+++ head/share/man/man4/MakefileThu Feb 22 19:12:32 2018
(r329832)
@@ -97,6 +97,7 @@ MAN=  aac.4 \
bwi.4 \
bwn.4 \
${_bytgpio.4} \
+   ${_chvgpio.4} \
capsicum.4 \
cardbus.4 \
carp.4 \
@@ -796,6 +797,7 @@ _amdtemp.4= amdtemp.4
 _asmc.4=   asmc.4
 _bxe.4=bxe.4
 _bytgpio.4=bytgpio.4
+_chvgpio.4=chvgpio.4
 _coretemp.4=   coretemp.4
 _cpuctl.4= cpuctl.4
 _dpms.4=   dpms.4

Added: head/share/man/man4/chvgpio.4
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/man/man4/chvgpio.4   Thu Feb 22 19:12:32 2018
(r329832)
@@ -0,0 +1,65 @@
+.\" Copyright (c) 2017
+.\"Tom Jones   All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in the
+.\"documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd November 17, 2017
+.Dt CHVGPIO 4
+.Os
+.Sh NAME
+.Nm chvgpio
+.Nd Intel Cherry View SoC GPIO controller
+.Sh SYNOPSIS
+.Cd "device gpio"
+.Cd "device chvgpio"
+.Sh DESCRIPTION
+.Nm
+supports the GPIO controller that can be found in Intel's Cherry View SoC
+family.
+.Pp
+The Cherry View SoC has 5 banks of GPIO pins, NORTH, EAST, SOUTHEAST, SOUTHWEST
+and VIRTUAL.
+All but VIRTUAL are exposed to userland as
+.Pa /dev/gpiocN ,
+where N is 0-3.
+Pins in each bank are pre-named to match names in the Intel® Atom™ Z8000
+Processor Series Vol 2
+.Sh SEE ALSO
+.Xr gpio 3 ,
+.Xr gpio 4 ,
+.Xr gpioctl 8
+.Rs
+.%T Intel® Atom™ Z8000 Processor Series Vol 1
+.Re
+.Rs
+.%T Intel® Atom™ Z8000 Processor Series Vol 2
+.Re
+.Sh HISTORY
+The
+.Nm
+manual page first appeared in
+.Fx 12 .
+.Sh AUTHORS
+This driver and man page were written by
+.An Tom Jones Aq Mt t...@enoti.me .

Modified: head/sys/conf/files.amd64
==
--- head/sys/conf/files.amd64   Thu Feb 22 18:49:53 2018(r329831)
+++ head/sys/conf/files.amd64   Thu Feb 22 19:12:32 2018(r329832)
@@ -293,6 +293,7 @@ dev/fdc/fdc_acpi.c  optionalfdc
 dev/fdc/fdc_isa.c  optionalfdc isa
 dev/fdc/fdc_pccard.c   optionalfdc pccard
 dev/gpio/bytgpio.c optionalbytgpio
+dev/gpio/chvgpio.c optionalchvgpio
 dev/hpt27xx/hpt27xx_os_bsd.c   optionalhpt27xx
 dev/hpt27xx/hpt27xx_osm_bsd.c  optionalhpt27xx
 

svn commit: r329837 - head/sys/kern

2018-02-22 Thread Mateusz Guzik
Author: mjg
Date: Thu Feb 22 20:39:25 2018
New Revision: 329837
URL: https://svnweb.freebsd.org/changeset/base/329837

Log:
  Fix up sysctl vfs.buffercache broken in r329612
  
  Sample problem:
  top: sysctl(vfs.bufspace...) expected 8, got 4
  
  Reported by:  O. Hartmann 

Modified:
  head/sys/kern/vfs_bio.c

Modified: head/sys/kern/vfs_bio.c
==
--- head/sys/kern/vfs_bio.c Thu Feb 22 20:10:23 2018(r329836)
+++ head/sys/kern/vfs_bio.c Thu Feb 22 20:39:25 2018(r329837)
@@ -423,7 +423,7 @@ sysctl_bufspace(SYSCTL_HANDLER_ARGS)
lvalue = 0;
for (i = 0; i < clean_domains; i++)
lvalue += bdclean[i].bd_bufspace;
-   return (sysctl_handle_int(oidp, , 0, req));
+   return (sysctl_handle_long(oidp, , 0, req));
 }
 #endif
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r329836 - head/stand/lua

2018-02-22 Thread Kyle Evans
Author: kevans
Date: Thu Feb 22 20:10:23 2018
New Revision: 329836
URL: https://svnweb.freebsd.org/changeset/base/329836

Log:
  lualoader: Attend to some 80-col issues, pointed out by luacheck
  
  Graphics have a tendency to cause 80-col issues, so make an exception to our
  standard indentation guidelines for these graphics. This does not hamper
  readability too badly.
  
  Two 40-column strings of spaces is trivially replaced with
  string.rep(" ", 80)

Modified:
  head/stand/lua/config.lua
  head/stand/lua/drawer.lua
  head/stand/lua/menu.lua

Modified: head/stand/lua/config.lua
==
--- head/stand/lua/config.lua   Thu Feb 22 20:09:21 2018(r329835)
+++ head/stand/lua/config.lua   Thu Feb 22 20:10:23 2018(r329836)
@@ -336,7 +336,8 @@ function config.loadkernel(other_kernel)
 
local try_load = function (names)
for name in names:gmatch("([^;]+)%s*;?") do
-   local r = loader.perform("load " .. flags .. " " .. 
name)
+   local r = loader.perform("load " .. flags ..
+   " " .. name)
if r == 0 then
return name
end

Modified: head/stand/lua/drawer.lua
==
--- head/stand/lua/drawer.lua   Thu Feb 22 20:09:21 2018(r329835)
+++ head/stand/lua/drawer.lua   Thu Feb 22 20:10:23 2018(r329836)
@@ -65,109 +65,109 @@ local shift_brand_text = function(shift)
 end
 
 fbsd_logo = {
-   "  __      _ _  ",
-   " |  | |  _ \\ / |  __ \\ ",
-   " | |___ _ __ ___  ___ | |_) | (___ | |  | |",
-   " |  ___| '__/ _ \\/ _ \\|  _ < \\___ \\| |  | |",
-   " | |   | | |  __/  __/| |_) |) | |__| |",
-   " | |   | | |||| |  |  |",
-   " |_|   |_|  \\___|\\___||/|_/|_/ "
+"  __      _ _  ",
+" |  | |  _ \\ / |  __ \\ ",
+" | |___ _ __ ___  ___ | |_) | (___ | |  | |",
+" |  ___| '__/ _ \\/ _ \\|  _ < \\___ \\| |  | |",
+" | |   | | |  __/  __/| |_) |) | |__| |",
+" | |   | | |||| |  |  |",
+" |_|   |_|  \\___|\\___||/|_/|_/ "
 }
 
 beastie_color = {
-   "   \027[31m,,",
-   "  /()`",
-   "  \\ \\___   / |",
-   "  /- \027[37m_\027[31m  `-/  '",
-   " (\027[37m/\\/ \\\027[31m \\   /\\",
-   " \027[37m/ /   |\027[31m `\\",
-   " \027[34mO O   \027[37m) \027[31m/|",
-   " \027[37m`-^--'\027[31m`< '",
-   "(_.)  _  )   /",
-   " `.___/`/",
-   "   `-' /",
-   "  \027[33m<.\027[31m __ / __   \\",
-   "  \027[33m<|\027[31mO)))\027[33m==\027[31m) \\) 
/\027[33m|",
-   "  \027[33m<'\027[31m`--' `.__,' \\",
-   "   ||",
-   "\\   /   /\\",
-   "   \027[36m__\027[31m( (_  / \\__/",
-   " \027[36m,'  ,-'   |",
-   " `--{__)\027[37m"
+"   \027[31m,,",
+"  /()`",
+"  \\ \\___   / |",
+"  /- \027[37m_\027[31m  `-/  '",
+" (\027[37m/\\/ \\\027[31m \\   /\\",
+" \027[37m/ /   |\027[31m `\\",
+" \027[34mO O   \027[37m) \027[31m/|",
+" \027[37m`-^--'\027[31m`< '",
+"(_.)  _  )   /",
+" `.___/`/",
+"   `-' /",
+"  \027[33m<.\027[31m __ / __   \\",
+"  \027[33m<|\027[31mO)))\027[33m==\027[31m) \\) /\027[33m|",
+"  \027[33m<'\027[31m`--' `.__,' \\",
+"   ||",
+"\\   /   /\\",
+"   \027[36m__\027[31m( (_  / \\__/",
+" \027[36m,'  ,-'   |",
+" `--{__)\027[37m"
 }
 
 beastie = {
-   "   ,,",
-   "  /()`",
-   "  \\ \\___   / |",
-   "  /- _  `-/  '",
-   " (/\\/ \\ \\   /\\",
-   " / /   | `\\",
-   " O O   ) /|",
-   " `-^--'`< '",
-   "(_.)  _  )   /",
-   " `.___/`/",
-   "   `-' /",
-   "  <. __ / __   \\",
-   "  <|O)))==) \\) /|",
-   "  <'`--' `.__,' \\",
-   "   ||",
-   "\\   /   /\\",
-   "   __( (_  / \\__/",
-   " ,'  ,-'   |",
-   " `--{__)"
+"   ,,",
+"  /()`",
+"  \\ \\___   

svn commit: r329841 - head/sys/modules/imx/imx_i2c

2018-02-22 Thread Ian Lepore
Author: ian
Date: Thu Feb 22 22:25:26 2018
New Revision: 329841
URL: https://svnweb.freebsd.org/changeset/base/329841

Log:
  Add a missing line continuation.
  
  How many commits does it take to get a simple module makefile working?
  Apparently at least three.
  
  Pointy hat to:  ian

Modified:
  head/sys/modules/imx/imx_i2c/Makefile

Modified: head/sys/modules/imx/imx_i2c/Makefile
==
--- head/sys/modules/imx/imx_i2c/Makefile   Thu Feb 22 22:24:01 2018
(r329840)
+++ head/sys/modules/imx/imx_i2c/Makefile   Thu Feb 22 22:25:26 2018
(r329841)
@@ -8,7 +8,7 @@ SRCS=   imx_i2c.c
 SRCS+= \
bus_if.h \
device_if.h \
-   fdt_pinctrl_if.h
+   fdt_pinctrl_if.h \
gpio_if.h \
iicbus_if.h \
ofw_bus_if.h \
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r329844 - head/sys/kern

2018-02-22 Thread Don Lewis
Author: truckman
Date: Fri Feb 23 00:12:51 2018
New Revision: 329844
URL: https://svnweb.freebsd.org/changeset/base/329844

Log:
  Decrease latency by not wrapping the idle loop's potentially lengthy
  search for a thread to steal inside a critical section.  Since this
  allows the search to be preempted, restart the search if preemption
  happens since the search results found earlier may no longer be
  valid.
  
  Decrease the latency of starting a thread that may be assigned to
  this CPU during the search by polling for incoming threads during
  the search and switching to that thread instead of continuing the
  search.
  
  Test for stale search results and restart the search before going
  through the expense of calling tdq_lock_pair().  Retry some tests
  after grabbing the locks since things may have changed while waiting
  to get both locks.
  
  Eliminate special case handling for stealing from an SMT peer that
  uses 1 as the steal threshold.  This can only succeed if a thread
  has been assigned but our SMT peer has not yet started executing
  it.  This is quite rare and when it happens the other SMT thread
  is generally waiting for the same tdq lock that we hold.  Basically
  both SMT threads are racing to grab the same spin lock.
  
  Add the kern.sched.always_steal knob from a ULE patch by jeff@.
  
  Incorporate another idea from Jeff's ULE patch.  If the sched_switch()
  detects that the CPU is about to go idle, try to steal a thread
  before switching to the idle thread.  Since the search for a thread
  to steal has to be done inside a critical section in this context,
  limit the impact on latency by adding the knob kern.sched.trysteal_limit
  to limit the topological distance of the search and don't restart
  the search if we detect stale results.  If this search can't find
  an stealable thread, the idle loop can do a more complete search.
  Also poll for threads being assigned to this CPU during the search
  and switch to them instead of continuing the search.  This change
  is responsibile for the majority of the improvement in parallel
  buildworld times.
  
  In sched_balance_group() change the minimum threshold from stealing
  a thread from 1 to 2.  Poaching a newly assigned thread from a CPU
  that is waking up hasn't yet switched to that thread from idle is
  likely very rare and is likely to have the same lock race as is
  seen when stealing threads in the idle loop.  Also use tdq_notify()
  to kick the destintation CPU instead of always sending an IPI.
  Update a stale comment, the number of transferable threads is not
  calculated.
  
  Reviewed by:  kib (earlier version)
  Comments by:  avg, jeff, mav
  MFC after:1 month
  Differential Revision:https://reviews.freebsd.org/D12130

Modified:
  head/sys/kern/sched_ule.c

Modified: head/sys/kern/sched_ule.c
==
--- head/sys/kern/sched_ule.c   Thu Feb 22 23:18:46 2018(r329843)
+++ head/sys/kern/sched_ule.c   Fri Feb 23 00:12:51 2018(r329844)
@@ -240,9 +240,9 @@ struct tdq {
volatile inttdq_load;   /* Aggregate load. */
volatile inttdq_cpu_idle;   /* cpu_idle() is active. */
int tdq_sysload;/* For loadavg, !ITHD load. */
-   int tdq_transferable;   /* Transferable thread count. */
-   short   tdq_switchcnt;  /* Switches this tick. */
-   short   tdq_oldswitchcnt;   /* Switches last tick. */
+   volatile inttdq_transferable;   /* Transferable thread count. */
+   volatile short  tdq_switchcnt;  /* Switches this tick. */
+   volatile short  tdq_oldswitchcnt;   /* Switches last tick. */
u_char  tdq_lowpri; /* Lowest priority thread. */
u_char  tdq_ipipending; /* IPI pending. */
u_char  tdq_idx;/* Current insert index. */
@@ -274,6 +274,8 @@ static int balance_interval = 128;  /* Default set in s
 static int affinity;
 static int steal_idle = 1;
 static int steal_thresh = 2;
+static int always_steal = 0;
+static int trysteal_limit = 2;
 
 /*
  * One thread queue per processor.
@@ -319,7 +321,7 @@ void tdq_print(int cpu);
 static void runq_print(struct runq *rq);
 static void tdq_add(struct tdq *, struct thread *, int);
 #ifdef SMP
-static int tdq_move(struct tdq *, struct tdq *);
+static struct thread *tdq_move(struct tdq *, struct tdq *);
 static int tdq_idled(struct tdq *);
 static void tdq_notify(struct tdq *, struct thread *);
 static struct thread *tdq_steal(struct tdq *, int);
@@ -841,7 +843,7 @@ sched_balance_group(struct cpu_group *cg)
 
CPU_FILL();
for (;;) {
-   high = sched_highest(cg, hmask, 1);
+   high = sched_highest(cg, hmask, 2);
/* Stop if there is no more CPU with transferrable threads. */
if (high 

svn commit: r329845 - head/usr.sbin/mptutil

2018-02-22 Thread Alan Somers
Author: asomers
Date: Fri Feb 23 00:17:50 2018
New Revision: 329845
URL: https://svnweb.freebsd.org/changeset/base/329845

Log:
  Fix numerous Coverity issues in mptutil
  
  Most are memory or file descriptor leaks. Three were unannotated
  fallthroughs in a switch/case statement. One was an integer overflow before
  widen.
  
  Reported by:  Coverity
  CID:  1007463 1007462 1007461 1007460 1007459 1007458 1007457
  CID:  1006855 1006854 1006853 1006852 1006851 1006850 1006849
  CID:  1006848 1006845 1006844 1006843 1006842 1006841 1006840
  CID:  1006839 1006838 1006837 1006836 1006835 1006834 1006833
  CID:  1006832 1006831 1006831 1006830 1006829 1008334 1008170
  CID:  1008169 1008168
  MFC after:3 weeks
  Sponsored by: Spectra Logic Corp
  Differential Revision:https://reviews.freebsd.org/D11013

Modified:
  head/usr.sbin/mptutil/mpt_config.c
  head/usr.sbin/mptutil/mpt_drive.c
  head/usr.sbin/mptutil/mpt_evt.c
  head/usr.sbin/mptutil/mpt_show.c
  head/usr.sbin/mptutil/mpt_volume.c

Modified: head/usr.sbin/mptutil/mpt_config.c
==
--- head/usr.sbin/mptutil/mpt_config.c  Fri Feb 23 00:12:51 2018
(r329844)
+++ head/usr.sbin/mptutil/mpt_config.c  Fri Feb 23 00:17:50 2018
(r329845)
@@ -67,12 +67,16 @@ dehumanize(const char *value)
 switch (vtp[0]) {
 case 't': case 'T':
 iv *= 1024;
+/* FALLTHROUGH */
 case 'g': case 'G':
 iv *= 1024;
+/* FALLTHROUGH */
 case 'm': case 'M':
 iv *= 1024;
+/* FALLTHROUGH */
 case 'k': case 'K':
 iv *= 1024;
+/* FALLTHROUGH */
 case '\0':
 break;
 default:
@@ -244,6 +248,7 @@ clear_config(int ac, char **av)
if (ioc2 == NULL) {
error = errno;
warn("Failed to fetch volume list");
+   close(fd);
return (error);
}
 
@@ -253,6 +258,8 @@ clear_config(int ac, char **av)
if (mpt_lock_volume(vol->VolumeBus, vol->VolumeID) < 0) {
warnx("Volume %s is busy and cannot be deleted",
mpt_volume_name(vol->VolumeBus, vol->VolumeID));
+   free(ioc2);
+   close(fd);
return (EBUSY);
}
}
@@ -263,6 +270,8 @@ clear_config(int ac, char **av)
ch = getchar();
if (ch != 'y' && ch != 'Y') {
printf("\nAborting\n");
+   free(ioc2);
+   close(fd);
return (0);
}
 
@@ -557,16 +566,16 @@ build_volume(int fd, struct volume_info *info, int rai
case RT_RAID0:
vol->VolumeType = MPI_RAID_VOL_TYPE_IS;
vol->StripeSize = stripe_size / 512;
-   MaxLBA = MinLBA * info->drive_count;
+   MaxLBA = (uint64_t)MinLBA * info->drive_count;
break;
case RT_RAID1:
vol->VolumeType = MPI_RAID_VOL_TYPE_IM;
-   MaxLBA = MinLBA * (info->drive_count / 2);
+   MaxLBA = (uint64_t)MinLBA * (info->drive_count / 2);
break;
case RT_RAID1E:
vol->VolumeType = MPI_RAID_VOL_TYPE_IME;
vol->StripeSize = stripe_size / 512;
-   MaxLBA = MinLBA * info->drive_count / 2;
+   MaxLBA = (uint64_t)MinLBA * info->drive_count / 2;
break;
default:
/* Pacify gcc. */
@@ -645,6 +654,7 @@ create_volume(int ac, char **av)
 
if (raid_type == -1) {
warnx("Unknown or unsupported volume type %s", av[1]);
+   close(fd);
return (EINVAL);
}
 
@@ -671,6 +681,7 @@ create_volume(int ac, char **av)
stripe_size = dehumanize(optarg);
if ((stripe_size < 512) || (!powerof2(stripe_size))) {
warnx("Invalid stripe size %s", optarg);
+   close(fd);
return (EINVAL);
}
break;
@@ -679,6 +690,7 @@ create_volume(int ac, char **av)
break;
case '?':
default:
+   close(fd);
return (EINVAL);
}
}
@@ -690,14 +702,18 @@ create_volume(int ac, char **av)
if (state.ioc2 == NULL) {
error = errno;
warn("Failed to read volume list");
+   close(fd);
return (error);
}
state.list = mpt_pd_list(fd);
-   if (state.list == NULL)
+   if (state.list == NULL) {
+   close(fd);
return (errno);
+   }
error = 

svn commit: r329843 - in head: share/man/man4 sys/conf sys/dev/jedec_dimm sys/modules/i2c sys/modules/i2c/jedec_dimm

2018-02-22 Thread Ravi Pokala
Author: rpokala
Date: Thu Feb 22 23:18:46 2018
New Revision: 329843
URL: https://svnweb.freebsd.org/changeset/base/329843

Log:
  jedec_dimm(4): report asset info and temperatures for DDR3 and DDR4 DIMMs
  
  A super-set of the functionality of jedec_ts(4). jedec_dimm(4) reports asset
  information (Part Number, Serial Number) encoded in the "Serial Presence
  Detect" (SPD) data on JEDEC DDR3 and DDR4 DIMMs. It also calculates and
  reports the memory capacity of the DIMM, in megabytes. If the DIMM includes
  a "Thermal Sensor On DIMM" (TSOD), the temperature is also reported.
  
  Reviewed by:  cem
  MFC after:1 week
  Relnotes: yes
  Sponsored by: Panasas
  Differential Revision:https://reviews.freebsd.org/D14392
  Discussed with:   avg, cem
  Tested by:avg, cem (previous version, no semantic changes)

Added:
  head/share/man/man4/jedec_dimm.4   (contents, props changed)
  head/sys/dev/jedec_dimm/
  head/sys/dev/jedec_dimm/jedec_dimm.c   (contents, props changed)
  head/sys/dev/jedec_dimm/jedec_dimm.h   (contents, props changed)
  head/sys/modules/i2c/jedec_dimm/
  head/sys/modules/i2c/jedec_dimm/Makefile   (contents, props changed)
Modified:
  head/share/man/man4/Makefile
  head/sys/conf/NOTES
  head/sys/conf/files
  head/sys/modules/i2c/Makefile

Modified: head/share/man/man4/Makefile
==
--- head/share/man/man4/MakefileThu Feb 22 23:06:39 2018
(r329842)
+++ head/share/man/man4/MakefileThu Feb 22 23:18:46 2018
(r329843)
@@ -248,6 +248,7 @@ MAN=aac.4 \
ixgbe.4 \
ixl.4 \
ixlv.4 \
+   jedec_dimm.4 \
jedec_ts.4 \
jme.4 \
joy.4 \

Added: head/share/man/man4/jedec_dimm.4
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/share/man/man4/jedec_dimm.4Thu Feb 22 23:18:46 2018
(r329843)
@@ -0,0 +1,240 @@
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+.\"
+.\" Copyright (c) 2016 Andriy Gapon 
+.\" Copyright (c) 2018 Ravi Pokala 
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in the
+.\"documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR 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 February 22, 2018
+.Dt JEDEC_DIMM 4
+.Os
+.Sh NAME
+.Nm jedec_dimm
+.Nd report asset information and temperatures for JEDEC DDR3 / DDR4 DIMMs
+.Sh SYNOPSIS
+.Bd -ragged -offset indent
+.Cd "device jedec_dimm"
+.Cd "device smbus"
+.Ed
+.Pp
+Alternatively, to load the driver as a module at boot time, place the following
+line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+jedec_dimm_load="YES"
+.Ed
+.Pp
+Addressing information must be manually specified in
+.Pa /boot/device.hints :
+.Bd -literal -offset indent
+.Cd hint.jedec_dimm.0.at="smbus0"
+.Cd hint.jedec_dimm.0.addr="0xa0"
+.Cd hint.jedec_dimm.0.slotid="Silkscreen"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver reports asset information (Part Number, Serial Number) encoded in the
+.Dq Serial Presence Detect
+(SPD) data on JEDEC DDR3 and DDR4 DIMMs.
+It also calculates and reports the memory capacity of the DIMM, in megabytes.
+If the DIMM includes a
+.Dq Thermal Sensor On DIMM
+(TSOD), the temperature is also reported.
+.Pp
+The
+.Nm
+driver accesses the SPD and TSOD over the
+.Xr smbus 4 .
+.Pp
+The data is reported via a
+.Xr sysctl 8
+interface; all values are read-only:
+.Bl -tag -width "dev.jedec_dimm.X.capacity"
+.It Va dev.jedec_dimm.X.%desc
+a string description of the DIMM, including TSOD and slotid info if present.
+.It Va dev.jedec_dimm.X.capacity
+the DIMM's memory capacity, in megabytes
+.It Va dev.jedec_dimm.X.part
+the manufacturer's part number of 

svn commit: r329846 - head/lib/libc/gen

2018-02-22 Thread Pedro F. Giffuni
Author: pfg
Date: Fri Feb 23 00:28:00 2018
New Revision: 329846
URL: https://svnweb.freebsd.org/changeset/base/329846

Log:
  getpeereid(3): Fix behavior on failure to match documentation.
  
  According to the getpeereid(3) documentation, on failure the value -1 is
  returned and the global variable errno is set to indicate the error. We
  were returning the error instead.
  
  Obtained from:Apple's Libc-1244.30.3
  MFC after:5 days

Modified:
  head/lib/libc/gen/getpeereid.c

Modified: head/lib/libc/gen/getpeereid.c
==
--- head/lib/libc/gen/getpeereid.c  Fri Feb 23 00:17:50 2018
(r329845)
+++ head/lib/libc/gen/getpeereid.c  Fri Feb 23 00:28:00 2018
(r329846)
@@ -50,8 +50,10 @@ getpeereid(int s, uid_t *euid, gid_t *egid)
error = _getsockopt(s, 0, LOCAL_PEERCRED, , );
if (error != 0)
return (error);
-   if (xuc.cr_version != XUCRED_VERSION)
-   return (EINVAL);
+   if (xuc.cr_version != XUCRED_VERSION) {
+   errno = EINVAL;
+   return (-1);
+   }
*euid = xuc.cr_uid;
*egid = xuc.cr_gid;
return (0);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r329858 - head/contrib/lua/src

2018-02-22 Thread Warner Losh
Author: imp
Date: Fri Feb 23 04:04:18 2018
New Revision: 329858
URL: https://svnweb.freebsd.org/changeset/base/329858

Log:
  When the LUA_FLOAT_TYPE != LUA_FLOAT_INT64, we can't reference float
  or double so ifdef that code out when the numbers aren't float at all.
  
  There's still references in the lmathlib.c, but we don't compile that
  for the loader yet.
  
  Differential Revision: https://reviews.freebsd.org/D14472

Modified:
  head/contrib/lua/src/llimits.h
  head/contrib/lua/src/lstrlib.c

Modified: head/contrib/lua/src/llimits.h
==
--- head/contrib/lua/src/llimits.h  Fri Feb 23 04:04:03 2018
(r329857)
+++ head/contrib/lua/src/llimits.h  Fri Feb 23 04:04:18 2018
(r329858)
@@ -66,7 +66,9 @@ typedef LUAI_USER_ALIGNMENT_T L_Umaxalign;
 #else
 typedef union {
   lua_Number n;
+#if LUA_FLOAT_TYPE != LUA_FLOAT_INT64
   double u;
+#endif
   void *s;
   lua_Integer i;
   long l;

Modified: head/contrib/lua/src/lstrlib.c
==
--- head/contrib/lua/src/lstrlib.c  Fri Feb 23 04:04:03 2018
(r329857)
+++ head/contrib/lua/src/lstrlib.c  Fri Feb 23 04:04:18 2018
(r329858)
@@ -1134,7 +1134,11 @@ static const union {
 /* dummy structure to get native alignment requirements */
 struct cD {
   char c;
-  union { double d; void *p; lua_Integer i; lua_Number n; } u;
+  union {
+#if LUA_FLOAT_TYPE != LUA_FLOAT_INT64
+ double d;
+#endif
+ void *p; lua_Integer i; lua_Number n; } u;
 };
 
 #define MAXALIGN   (offsetof(struct cD, u))
@@ -1144,8 +1148,10 @@ struct cD {
 ** Union for serializing floats
 */
 typedef union Ftypes {
+#if LUA_FLOAT_TYPE != LUA_FLOAT_INT64
   float f;
   double d;
+#endif
   lua_Number n;
   char buff[5 * sizeof(lua_Number)];  /* enough for any float type */
 } Ftypes;
@@ -1235,8 +1241,10 @@ static KOption getoption (Header *h, const char **fmt,
 case 'j': *size = sizeof(lua_Integer); return Kint;
 case 'J': *size = sizeof(lua_Integer); return Kuint;
 case 'T': *size = sizeof(size_t); return Kuint;
+#if LUA_FLOAT_TYPE != LUA_FLOAT_INT64
 case 'f': *size = sizeof(float); return Kfloat;
 case 'd': *size = sizeof(double); return Kfloat;
+#endif
 case 'n': *size = sizeof(lua_Number); return Kfloat;
 case 'i': *size = getnumlimit(h, fmt, sizeof(int)); return Kint;
 case 'I': *size = getnumlimit(h, fmt, sizeof(int)); return Kuint;
@@ -1369,9 +1377,13 @@ static int str_pack (lua_State *L) {
 volatile Ftypes u;
 char *buff = luaL_prepbuffsize(, size);
 lua_Number n = luaL_checknumber(L, arg);  /* get argument */
+#if LUA_FLOAT_TYPE != LUA_FLOAT_INT64
 if (size == sizeof(u.f)) u.f = (float)n;  /* copy it into 'u' */
 else if (size == sizeof(u.d)) u.d = (double)n;
 else u.n = n;
+#else
+   u.n = n;
+#endif
 /* move 'u' to final result, correcting endianness if needed */
 copywithendian(buff, u.buff, size, h.islittle);
 luaL_addsize(, size);
@@ -1507,9 +1519,13 @@ static int str_unpack (lua_State *L) {
 volatile Ftypes u;
 lua_Number num;
 copywithendian(u.buff, data + pos, size, h.islittle);
+#if LUA_FLOAT_TYPE != LUA_FLOAT_INT64
 if (size == sizeof(u.f)) num = (lua_Number)u.f;
 else if (size == sizeof(u.d)) num = (lua_Number)u.d;
 else num = u.n;
+#else
+   num = u.n;
+#endif
 lua_pushnumber(L, num);
 break;
   }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r329859 - in head: contrib/compiler-rt/lib/builtins include stand sys/arm/include sys/arm64/include sys/mips/include sys/powerpc/include sys/riscv/include sys/sparc64/include sys/sys sy...

2018-02-22 Thread Warner Losh
Author: imp
Date: Fri Feb 23 04:04:25 2018
New Revision: 329859
URL: https://svnweb.freebsd.org/changeset/base/329859

Log:
  Do not include float interfaces when using libsa.
  
  We don't support float in the boot loaders, so don't include
  interfaces for float or double in systems headers. In addition, take
  the unusual step of spiking double and float to prevent any more
  accidental seepage.

Modified:
  head/contrib/compiler-rt/lib/builtins/int_types.h
  head/include/time.h
  head/stand/defs.mk
  head/stand/lua.mk
  head/sys/arm/include/_types.h
  head/sys/arm64/include/_types.h
  head/sys/mips/include/_types.h
  head/sys/powerpc/include/_types.h
  head/sys/powerpc/include/pcb.h
  head/sys/riscv/include/_types.h
  head/sys/sparc64/include/_types.h
  head/sys/sys/_types.h
  head/sys/x86/include/_types.h

Modified: head/contrib/compiler-rt/lib/builtins/int_types.h
==
--- head/contrib/compiler-rt/lib/builtins/int_types.h   Fri Feb 23 04:04:18 
2018(r329858)
+++ head/contrib/compiler-rt/lib/builtins/int_types.h   Fri Feb 23 04:04:25 
2018(r329859)
@@ -114,6 +114,7 @@ static __inline tu_int make_tu(du_int h, du_int l) {
 
 #endif /* CRT_HAS_128BIT */
 
+#ifndef _STANDALONE
 typedef union
 {
 su_int u;
@@ -125,6 +126,7 @@ typedef union
 udwords u;
 double  f;
 } double_bits;
+#endif
 
 typedef struct
 {
@@ -137,6 +139,7 @@ typedef struct
 #endif /* _YUGA_LITTLE_ENDIAN */
 } uqwords;
 
+#ifndef _STANDALONE
 typedef union
 {
 uqwords u;
@@ -159,6 +162,7 @@ typedef struct { long double real, imaginary; } Lcompl
 
 #define COMPLEX_REAL(x) (x).real
 #define COMPLEX_IMAGINARY(x) (x).imaginary
+#endif
 #endif
 #endif /* INT_TYPES_H */
 

Modified: head/include/time.h
==
--- head/include/time.h Fri Feb 23 04:04:18 2018(r329858)
+++ head/include/time.h Fri Feb 23 04:04:25 2018(r329859)
@@ -146,7 +146,9 @@ __BEGIN_DECLS
 char *asctime(const struct tm *);
 clock_t clock(void);
 char *ctime(const time_t *);
+#ifndef _STANDALONE
 double difftime(time_t, time_t);
+#endif
 /* XXX missing: getdate() */
 struct tm *gmtime(const time_t *);
 struct tm *localtime(const time_t *);

Modified: head/stand/defs.mk
==
--- head/stand/defs.mk  Fri Feb 23 04:04:18 2018(r329858)
+++ head/stand/defs.mk  Fri Feb 23 04:04:25 2018(r329859)
@@ -51,6 +51,9 @@ CFLAGS+=  -I${BOOTOBJ}/libsa
 .endif
 CFLAGS+=   -I${SASRC} -D_STANDALONE
 CFLAGS+=   -I${SYSDIR}
+# Spike the floating point interfaces
+CFLAGS+=   -Ddouble=jagged-little-pill -Dfloat=boaty-mcboatface
+
 
 # GELI Support, with backward compat hooks (mostly)
 .if defined(HAVE_GELI)

Modified: head/stand/lua.mk
==
--- head/stand/lua.mk   Fri Feb 23 04:04:18 2018(r329858)
+++ head/stand/lua.mk   Fri Feb 23 04:04:25 2018(r329859)
@@ -3,5 +3,4 @@
 # Common flags to build lua related files
 
 CFLAGS+=   -I${LUASRC} -I${LDRSRC} -I${LIBLUASRC}
-# CFLAGS+= -Ddouble=jagged-little-pill -Dfloat=poison-shake -D__OMIT_FLOAT
 CFLAGS+=   -DLUA_FLOAT_TYPE=LUA_FLOAT_INT64

Modified: head/sys/arm/include/_types.h
==
--- head/sys/arm/include/_types.h   Fri Feb 23 04:04:18 2018
(r329858)
+++ head/sys/arm/include/_types.h   Fri Feb 23 04:04:25 2018
(r329859)
@@ -70,8 +70,10 @@ typedef  unsigned long long  __uint64_t;
  */
 typedef__uint32_t  __clock_t;  /* clock()... */
 typedef__int32_t   __critical_t;
+#ifndef _STANDALONE
 typedefdouble  __double_t;
 typedeffloat   __float_t;
+#endif
 typedef__int32_t   __intfptr_t;
 typedef__int64_t   __intmax_t;
 typedef__int32_t   __intptr_t;

Modified: head/sys/arm64/include/_types.h
==
--- head/sys/arm64/include/_types.h Fri Feb 23 04:04:18 2018
(r329858)
+++ head/sys/arm64/include/_types.h Fri Feb 23 04:04:25 2018
(r329859)
@@ -56,8 +56,10 @@ typedef  unsigned long   __uint64_t;
  */
 typedef__int32_t   __clock_t;  /* clock()... */
 typedef__int64_t   __critical_t;
+#ifndef _STANDALONE
 typedefdouble  __double_t;
 typedeffloat   __float_t;
+#endif
 typedef__int64_t   __intfptr_t;
 typedef__int64_t   __intmax_t;
 typedef__int64_t   __intptr_t;

Modified: head/sys/mips/include/_types.h
==
--- head/sys/mips/include/_types.h  Fri Feb 23 04:04:18 2018

svn commit: r329860 - head/stand

2018-02-22 Thread Warner Losh
Author: imp
Date: Fri Feb 23 04:06:15 2018
New Revision: 329860
URL: https://svnweb.freebsd.org/changeset/base/329860

Log:
  Floaty McFloatface is funnier...
  
  Submitted by: emaste@

Modified:
  head/stand/defs.mk

Modified: head/stand/defs.mk
==
--- head/stand/defs.mk  Fri Feb 23 04:04:25 2018(r329859)
+++ head/stand/defs.mk  Fri Feb 23 04:06:15 2018(r329860)
@@ -52,7 +52,7 @@ CFLAGS+=  -I${BOOTOBJ}/libsa
 CFLAGS+=   -I${SASRC} -D_STANDALONE
 CFLAGS+=   -I${SYSDIR}
 # Spike the floating point interfaces
-CFLAGS+=   -Ddouble=jagged-little-pill -Dfloat=boaty-mcboatface
+CFLAGS+=   -Ddouble=jagged-little-pill -Dfloat=floaty-mcfloatface
 
 
 # GELI Support, with backward compat hooks (mostly)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r329848 - head/lib/libc/stdio

2018-02-22 Thread Pedro F. Giffuni
Author: pfg
Date: Fri Feb 23 01:11:57 2018
New Revision: 329848
URL: https://svnweb.freebsd.org/changeset/base/329848

Log:
  __printf_render_int(): small type change to match use.
  
  Variable l is consistently used as an int rather than a char.
  Sort names while here.
  
  Obtained from:Apple's Libc-1244.30.3
  MFC after:5 days

Modified:
  head/lib/libc/stdio/xprintf_int.c

Modified: head/lib/libc/stdio/xprintf_int.c
==
--- head/lib/libc/stdio/xprintf_int.c   Fri Feb 23 00:38:42 2018
(r329847)
+++ head/lib/libc/stdio/xprintf_int.c   Fri Feb 23 01:11:57 2018
(r329848)
@@ -260,8 +260,8 @@ __printf_render_int(struct __printf_io *io, const stru
const union arg *argp;
char buf[BUF];
char *p, *pe;
-   char ns, l;
-   int rdx, sign, zext, ngrp;
+   char ns;
+   int l, ngrp, rdx, sign, zext;
const char *nalt, *digit;
char thousands_sep; /* locale specific thousands separator */
const char *grouping;   /* locale specific numeric grouping rules */
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r329852 - head/stand/lua

2018-02-22 Thread Kyle Evans
Author: kevans
Date: Fri Feb 23 02:53:50 2018
New Revision: 329852
URL: https://svnweb.freebsd.org/changeset/base/329852

Log:
  Add copyright notice to core.lua
  
  I've also made some not-insignificant changes/additions to this file, to
  include the added constants, ACPI changes, boot environment listing, and
  some utility functions.

Modified:
  head/stand/lua/core.lua

Modified: head/stand/lua/core.lua
==
--- head/stand/lua/core.lua Fri Feb 23 02:51:35 2018(r329851)
+++ head/stand/lua/core.lua Fri Feb 23 02:53:50 2018(r329852)
@@ -2,6 +2,7 @@
 -- SPDX-License-Identifier: BSD-2-Clause-FreeBSD
 --
 -- Copyright (c) 2015 Pedro Souza 
+-- Copyright (c) 2018 Kyle Evans 
 -- All rights reserved.
 --
 -- Redistribution and use in source and binary forms, with or without
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r329855 - head/sys/dev/qlxgbe

2018-02-22 Thread David C Somayajulu
Author: davidcs
Date: Fri Feb 23 03:36:24 2018
New Revision: 329855
URL: https://svnweb.freebsd.org/changeset/base/329855

Log:
  1. Added support to offline a port if is error recovery on successful.
  2. Sysctls to enable/disable driver_state_dump and error_recovery.
  3. Sysctl to control the delay between hw/fw reinitialization and
 restarting the fastpath.
  4. Stop periodic stats retrieval if interface has IFF_DRV_RUNNING flag off.
  5. Print contents of PEG_HALT_STATUS1 and PEG_HALT_STATUS2 on heartbeat
 failure.
  6. Speed up slowpath shutdown during error recovery.
  7. link_state update using atomic_store.
  8. Added timestamp information on driver state and minidump captures.
  9. Added support for Slowpath event logging
  10.Added additional failure injection types to simulate failures.

Modified:
  head/sys/dev/qlxgbe/ql_dbg.h
  head/sys/dev/qlxgbe/ql_def.h
  head/sys/dev/qlxgbe/ql_glbl.h
  head/sys/dev/qlxgbe/ql_hw.c
  head/sys/dev/qlxgbe/ql_hw.h
  head/sys/dev/qlxgbe/ql_inline.h
  head/sys/dev/qlxgbe/ql_ioctl.c
  head/sys/dev/qlxgbe/ql_ioctl.h
  head/sys/dev/qlxgbe/ql_isr.c
  head/sys/dev/qlxgbe/ql_misc.c
  head/sys/dev/qlxgbe/ql_os.c
  head/sys/dev/qlxgbe/ql_os.h
  head/sys/dev/qlxgbe/ql_ver.h

Modified: head/sys/dev/qlxgbe/ql_dbg.h
==
--- head/sys/dev/qlxgbe/ql_dbg.hFri Feb 23 03:18:24 2018
(r329854)
+++ head/sys/dev/qlxgbe/ql_dbg.hFri Feb 23 03:36:24 2018
(r329855)
@@ -44,17 +44,21 @@ extern void ql_dump_buf16(qla_host_t *ha, const char *
 extern void ql_dump_buf32(qla_host_t *ha, const char *str, void *dbuf,
uint32_t len32);
 
-#define INJCT_RX_RXB_INVAL 0x1
-#define INJCT_RX_MP_NULL   0x2
-#define INJCT_LRO_RXB_INVAL0x3
-#define INJCT_LRO_MP_NULL  0x4
-#define INJCT_NUM_HNDLE_INVALID0x5
-#define INJCT_RDWR_INDREG_FAILURE  0x6
-#define INJCT_RDWR_OFFCHIPMEM_FAILURE  0x7
-#define INJCT_MBX_CMD_FAILURE  0x8
-#define INJCT_HEARTBEAT_FAILURE0x9
-#define INJCT_TEMPERATURE_FAILURE  0xA
-#define INJCT_M_GETCL_M_GETJCL_FAILURE 0xB
+#define INJCT_RX_RXB_INVAL 0x1
+#define INJCT_RX_MP_NULL   0x2
+#define INJCT_LRO_RXB_INVAL0x3
+#define INJCT_LRO_MP_NULL  0x4
+#define INJCT_NUM_HNDLE_INVALID0x5
+#define INJCT_RDWR_INDREG_FAILURE  0x6
+#define INJCT_RDWR_OFFCHIPMEM_FAILURE  0x7
+#define INJCT_MBX_CMD_FAILURE  0x8
+#define INJCT_HEARTBEAT_FAILURE0x9
+#define INJCT_TEMPERATURE_FAILURE  0xA
+#define INJCT_M_GETCL_M_GETJCL_FAILURE 0xB
+#define INJCT_INV_CONT_OPCODE  0xC
+#define INJCT_SGL_RCV_INV_DESC_COUNT   0xD
+#define INJCT_SGL_LRO_INV_DESC_COUNT   0xE
+#define INJCT_PEER_PORT_FAILURE_ERR_RECOVERY   0xF
 
 #ifdef QL_DBG
 

Modified: head/sys/dev/qlxgbe/ql_def.h
==
--- head/sys/dev/qlxgbe/ql_def.hFri Feb 23 03:18:24 2018
(r329854)
+++ head/sys/dev/qlxgbe/ql_def.hFri Feb 23 03:36:24 2018
(r329855)
@@ -146,12 +146,12 @@ struct qla_host {
volatile uint32_t   qla_watchdog_paused;
volatile uint32_t   qla_initiate_recovery;
volatile uint32_t   qla_detach_active;
+   volatile uint32_t   offline;
 
device_tpci_dev;
 
-   uint16_twatchdog_ticks;
+   volatile uint16_t   watchdog_ticks;
uint8_t pci_func;
-   uint8_t resvd;
 
 /* ioctl related */
 struct cdev *ioctl_dev;
@@ -184,6 +184,7 @@ struct qla_host {
 
/* hardware access lock */
 
+   struct mtx  sp_log_lock;
struct mtx  hw_lock;
volatile uint32_t   hw_lock_held;
uint64_thw_lock_failed;
@@ -241,6 +242,9 @@ struct qla_host {
volatile const char *qla_unlock;
uint32_tdbg_level;
uint32_tenable_minidump;
+   uint32_tenable_driverstate_dump;
+   uint32_tenable_error_recovery;
+   uint32_tms_delay_after_init;
 
uint8_t fw_ver_str[32];
 
@@ -274,5 +278,7 @@ typedef struct qla_host qla_host_t;
 #define QL_MAC_CMP(mac1, mac2)\
*(uint32_t *) mac1) == (*(uint32_t *) mac2) && \
(*(uint16_t *)(mac1 + 4)) == (*(uint16_t *)(mac2 + 4 ? 0 : 1)
+
+#define QL_INITIATE_RECOVERY(ha) 

svn commit: r329856 - head/stand/lua

2018-02-22 Thread Kyle Evans
Author: kevans
Date: Fri Feb 23 04:03:07 2018
New Revision: 329856
URL: https://svnweb.freebsd.org/changeset/base/329856

Log:
  lualoader: Use "local function x()" instead of "local x = function()"
  
  The latter is good, but the former is more elegant and clear about what 'x'
  is. Adopt it, preferably only using the latter kind of notation where needed
  as values for tables.

Modified:
  head/stand/lua/cli.lua
  head/stand/lua/config.lua
  head/stand/lua/core.lua
  head/stand/lua/drawer.lua
  head/stand/lua/menu.lua

Modified: head/stand/lua/cli.lua
==
--- head/stand/lua/cli.lua  Fri Feb 23 03:36:24 2018(r329855)
+++ head/stand/lua/cli.lua  Fri Feb 23 04:03:07 2018(r329856)
@@ -38,7 +38,7 @@ local cli = {}
 -- Defaults to nil and "" respectively.
 -- This will also parse arguments to autoboot, but the with_kernel argument
 -- will need to be explicitly overwritten to false
-local parse_boot_args = function(argv, with_kernel)
+local function parse_boot_args(argv, with_kernel)
if with_kernel == nil then
with_kernel = true
end

Modified: head/stand/lua/config.lua
==
--- head/stand/lua/config.lua   Fri Feb 23 03:36:24 2018(r329855)
+++ head/stand/lua/config.lua   Fri Feb 23 04:03:07 2018(r329856)
@@ -336,7 +336,7 @@ function config.loadkernel(other_kernel)
local flags = loader.getenv("kernel_options") or ""
local kernel = other_kernel or loader.getenv("kernel")
 
-   local try_load = function (names)
+   local function try_load(names)
for name in names:gmatch("([^;]+)%s*;?") do
local r = loader.perform("load " .. flags ..
" " .. name)
@@ -347,7 +347,7 @@ function config.loadkernel(other_kernel)
return nil
end
 
-   local load_bootfile = function()
+   local function load_bootfile()
local bootfile = loader.getenv("bootfile")
 
-- append default kernel name

Modified: head/stand/lua/core.lua
==
--- head/stand/lua/core.lua Fri Feb 23 03:36:24 2018(r329855)
+++ head/stand/lua/core.lua Fri Feb 23 04:03:07 2018(r329856)
@@ -33,7 +33,7 @@ local config = require("config")
 
 local core = {}
 
-local compose_loader_cmd = function(cmd_name, argstr)
+local function compose_loader_cmd(cmd_name, argstr)
if argstr ~= nil then
cmd_name = cmd_name .. " " .. argstr
end

Modified: head/stand/lua/drawer.lua
==
--- head/stand/lua/drawer.lua   Fri Feb 23 03:36:24 2018(r329855)
+++ head/stand/lua/drawer.lua   Fri Feb 23 04:03:07 2018(r329856)
@@ -45,7 +45,7 @@ local orb
 local none
 local none_shifted = false
 
-local menu_entry_name = function(drawing_menu, entry)
+local function menu_entry_name(drawing_menu, entry)
local name_handler = drawer.menu_name_handlers[entry.entry_type]
 
if name_handler ~= nil then
@@ -57,7 +57,7 @@ local menu_entry_name = function(drawing_menu, entry)
return entry.name
 end
 
-local shift_brand_text = function(shift)
+local function shift_brand_text(shift)
drawer.brand_position.x = drawer.brand_position.x + shift.x
drawer.brand_position.y = drawer.brand_position.y + shift.y
drawer.menu_position.x = drawer.menu_position.x + shift.x

Modified: head/stand/lua/menu.lua
==
--- head/stand/lua/menu.lua Fri Feb 23 03:36:24 2018(r329855)
+++ head/stand/lua/menu.lua Fri Feb 23 04:03:07 2018(r329856)
@@ -38,7 +38,7 @@ local drawer = require("drawer")
 
 local menu = {}
 
-local OnOff = function(str, b)
+local function OnOff(str, b)
if b then
return str .. color.escapef(color.GREEN) .. "On" ..
color.escapef(color.WHITE)
@@ -48,7 +48,7 @@ local OnOff = function(str, b)
end
 end
 
-local bootenvSet = function(env)
+local function bootenvSet(env)
loader.setenv("vfs.root.mountfrom", env)
loader.setenv("currdev", env .. ":")
config.reload()
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r329857 - in head/stand: . liblua

2018-02-22 Thread Warner Losh
Author: imp
Date: Fri Feb 23 04:04:03 2018
New Revision: 329857
URL: https://svnweb.freebsd.org/changeset/base/329857

Log:
  Centralize lua defines
  
  We need to ensure that we defined Numbers as int64_t everywhere we
  build for lua. Previously, we were compiling part of the code with
  Numbers as int64_t and part as double. Move lua number definition to a
  more-central location

Modified:
  head/stand/liblua/Makefile
  head/stand/lua.mk

Modified: head/stand/liblua/Makefile
==
--- head/stand/liblua/Makefile  Fri Feb 23 04:03:07 2018(r329856)
+++ head/stand/liblua/Makefile  Fri Feb 23 04:04:03 2018(r329857)
@@ -5,6 +5,8 @@
 .PATH: ${LUASRC}
 .PATH: ${LIBLUASRC}
 
+.include   "${BOOTSRC}/lua.mk"
+
 LIB=   lua
 INTERNALLIB=
 
@@ -25,9 +27,8 @@ SRCS+=lerrno.c lfs.c lstd.c lutils.c
 
 WARNS= 3
 
-CFLAGS+= -DLUA_FLOAT_TYPE=LUA_FLOAT_INT64
 CFLAGS+= -DLUA_PATH_DEFAULT=\"/boot/lua/\?.lua\"
-CFLAGS+= -ffreestanding -nostdlib -DBOOT_LUA -DLUA_USE_POSIX
+CFLAGS+= -ffreestanding -nostdlib -DLUA_USE_POSIX
 CFLAGS+= -fno-stack-protector -D__BSD_VISIBLE
 CFLAGS+= -I${BOOTSRC}/include -I${LIBLUASRC} -I${LUASRC} -I${LDRSRC}
 

Modified: head/stand/lua.mk
==
--- head/stand/lua.mk   Fri Feb 23 04:03:07 2018(r329856)
+++ head/stand/lua.mk   Fri Feb 23 04:04:03 2018(r329857)
@@ -2,11 +2,6 @@
 
 # Common flags to build lua related files
 
-.include "defs.mk"
-
-.if ${MACHINE_CPUARCH} == "amd64" && ${DO32:U0} == 0
-CFLAGS+=   -fPIC
-.endif
-
 CFLAGS+=   -I${LUASRC} -I${LDRSRC} -I${LIBLUASRC}
-CFLAGS+=   -DBOOT_LUA
+# CFLAGS+= -Ddouble=jagged-little-pill -Dfloat=poison-shake -D__OMIT_FLOAT
+CFLAGS+=   -DLUA_FLOAT_TYPE=LUA_FLOAT_INT64
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r329861 - head/stand/lua

2018-02-22 Thread Kyle Evans
Author: kevans
Date: Fri Feb 23 04:12:19 2018
New Revision: 329861
URL: https://svnweb.freebsd.org/changeset/base/329861

Log:
  lualoader: Track effective line number, use it for drawing
  
  Takes into account hidden entries, so that we don't draw blank lines in
  place of a hidden item.

Modified:
  head/stand/lua/drawer.lua

Modified: head/stand/lua/drawer.lua
==
--- head/stand/lua/drawer.lua   Fri Feb 23 04:06:15 2018(r329860)
+++ head/stand/lua/drawer.lua   Fri Feb 23 04:12:19 2018(r329861)
@@ -273,6 +273,7 @@ function drawer.drawmenu(m)
local alias_table = {}
local entry_num = 0
local menu_entries = m.entries
+   local effective_line_num = 0
if type(menu_entries) == "function" then
menu_entries = menu_entries()
end
@@ -282,9 +283,10 @@ function drawer.drawmenu(m)
if e.visible ~= nil and not e.visible() then
goto continue
end
+   effective_line_num = effective_line_num + 1
if e.entry_type ~= core.MENU_SEPARATOR then
entry_num = entry_num + 1
-   screen.setcursor(x, y + line_num)
+   screen.setcursor(x, y + effective_line_num)
 
print(entry_num .. ". " .. menu_entry_name(m, e))
 
@@ -296,7 +298,7 @@ function drawer.drawmenu(m)
end
end
else
-   screen.setcursor(x, y + line_num)
+   screen.setcursor(x, y + effective_line_num)
print(menu_entry_name(m, e))
end
::continue::
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r329851 - head/stand/lua

2018-02-22 Thread Kyle Evans
Author: kevans
Date: Fri Feb 23 02:51:35 2018
New Revision: 329851
URL: https://svnweb.freebsd.org/changeset/base/329851

Log:
  Add SPDX tags to lua files

Modified:
  head/stand/lua/cli.lua
  head/stand/lua/color.lua
  head/stand/lua/config.lua
  head/stand/lua/core.lua
  head/stand/lua/drawer.lua
  head/stand/lua/loader.lua
  head/stand/lua/menu.lua
  head/stand/lua/password.lua
  head/stand/lua/screen.lua

Modified: head/stand/lua/cli.lua
==
--- head/stand/lua/cli.lua  Fri Feb 23 02:47:51 2018(r329850)
+++ head/stand/lua/cli.lua  Fri Feb 23 02:51:35 2018(r329851)
@@ -1,4 +1,6 @@
 --
+-- SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+--
 -- Copyright (c) 2018 Kyle Evans 
 -- All rights reserved.
 --

Modified: head/stand/lua/color.lua
==
--- head/stand/lua/color.luaFri Feb 23 02:47:51 2018(r329850)
+++ head/stand/lua/color.luaFri Feb 23 02:51:35 2018(r329851)
@@ -1,4 +1,6 @@
 --
+-- SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+--
 -- Copyright (c) 2015 Pedro Souza 
 -- All rights reserved.
 --

Modified: head/stand/lua/config.lua
==
--- head/stand/lua/config.lua   Fri Feb 23 02:47:51 2018(r329850)
+++ head/stand/lua/config.lua   Fri Feb 23 02:51:35 2018(r329851)
@@ -1,4 +1,6 @@
 --
+-- SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+--
 -- Copyright (c) 2015 Pedro Souza 
 -- Copyright (C) 2018 Kyle Evans 
 -- All rights reserved.

Modified: head/stand/lua/core.lua
==
--- head/stand/lua/core.lua Fri Feb 23 02:47:51 2018(r329850)
+++ head/stand/lua/core.lua Fri Feb 23 02:51:35 2018(r329851)
@@ -1,4 +1,6 @@
 --
+-- SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+--
 -- Copyright (c) 2015 Pedro Souza 
 -- All rights reserved.
 --

Modified: head/stand/lua/drawer.lua
==
--- head/stand/lua/drawer.lua   Fri Feb 23 02:47:51 2018(r329850)
+++ head/stand/lua/drawer.lua   Fri Feb 23 02:51:35 2018(r329851)
@@ -1,4 +1,6 @@
 --
+-- SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+--
 -- Copyright (c) 2015 Pedro Souza 
 -- Copyright (c) 2018 Kyle Evans 
 -- All rights reserved.

Modified: head/stand/lua/loader.lua
==
--- head/stand/lua/loader.lua   Fri Feb 23 02:47:51 2018(r329850)
+++ head/stand/lua/loader.lua   Fri Feb 23 02:51:35 2018(r329851)
@@ -1,4 +1,6 @@
 --
+-- SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+--
 -- Copyright (c) 2015 Pedro Souza 
 -- Copyright (c) 2018 Kyle Evans 
 -- All rights reserved.

Modified: head/stand/lua/menu.lua
==
--- head/stand/lua/menu.lua Fri Feb 23 02:47:51 2018(r329850)
+++ head/stand/lua/menu.lua Fri Feb 23 02:51:35 2018(r329851)
@@ -1,4 +1,6 @@
 --
+-- SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+--
 -- Copyright (c) 2015 Pedro Souza 
 -- Copyright (C) 2018 Kyle Evans 
 -- All rights reserved.

Modified: head/stand/lua/password.lua
==
--- head/stand/lua/password.lua Fri Feb 23 02:47:51 2018(r329850)
+++ head/stand/lua/password.lua Fri Feb 23 02:51:35 2018(r329851)
@@ -1,4 +1,6 @@
 --
+-- SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+--
 -- Copyright (c) 2015 Pedro Souza 
 -- Copyright (C) 2018 Kyle Evans 
 -- All rights reserved.

Modified: head/stand/lua/screen.lua
==
--- head/stand/lua/screen.lua   Fri Feb 23 02:47:51 2018(r329850)
+++ head/stand/lua/screen.lua   Fri Feb 23 02:51:35 2018(r329851)
@@ -1,4 +1,6 @@
 --
+-- SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+--
 -- Copyright (c) 2015 Pedro Souza 
 -- All rights reserved.
 --
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r329853 - in head: lib/libifconfig share/examples/libifconfig usr.sbin/wlandebug

2018-02-22 Thread Alan Somers
Author: asomers
Date: Fri Feb 23 03:11:43 2018
New Revision: 329853
URL: https://svnweb.freebsd.org/changeset/base/329853

Log:
  libifconfig: multiple feature additions
  
  Added the ability to:
  
  * Create virtual interfaces
  * Create vlan interfaces
  * Get interface fib
  * Get interface groups
  * Get interface status
  * Get nd6 info
  * Get media status
  * Get additional ifaddr info in a convenient struct
  * Get vhids
  * Get carp info
  * Get lagg and laggport status
  * Iterate over all interfaces and ifaddrs
  
  And add more examples, too.
  
  Note that this is a backwards-incompatible change. But that's ok, because it's
  a private library.
  
  MFC after:3 weeks
  Sponsored by: Spectra Logic Corp
  Differential Revision:https://reviews.freebsd.org/D14463

Added:
  head/lib/libifconfig/libifconfig_carp.c   (contents, props changed)
  head/lib/libifconfig/libifconfig_inet.c   (contents, props changed)
  head/lib/libifconfig/libifconfig_inet6.c   (contents, props changed)
  head/lib/libifconfig/libifconfig_lagg.c   (contents, props changed)
  head/lib/libifconfig/libifconfig_media.c   (contents, props changed)
  head/share/examples/libifconfig/ifchangevlan.c   (contents, props changed)
  head/share/examples/libifconfig/ifcreatevlan.c   (contents, props changed)
  head/share/examples/libifconfig/status.c   (contents, props changed)
Modified:
  head/lib/libifconfig/Makefile
  head/lib/libifconfig/libifconfig.c
  head/lib/libifconfig/libifconfig.h
  head/lib/libifconfig/libifconfig_internal.c
  head/lib/libifconfig/libifconfig_internal.h
  head/share/examples/libifconfig/Makefile
  head/share/examples/libifconfig/ifcreate.c
  head/share/examples/libifconfig/ifdestroy.c
  head/share/examples/libifconfig/setdescription.c
  head/share/examples/libifconfig/setmtu.c
  head/usr.sbin/wlandebug/wlandebug.c

Modified: head/lib/libifconfig/Makefile
==
--- head/lib/libifconfig/Makefile   Fri Feb 23 02:53:50 2018
(r329852)
+++ head/lib/libifconfig/Makefile   Fri Feb 23 03:11:43 2018
(r329853)
@@ -8,7 +8,9 @@ NO_PIC= 
 
 SHLIBDIR?= /lib
 SHLIB_MAJOR=   1
-SRCS=  libifconfig.c libifconfig_internal.c
+SRCS=  libifconfig.c libifconfig_carp.c libifconfig_inet.c
+SRCS+= libifconfig_inet6.c libifconfig_internal.c libifconfig_lagg.c
+SRCS+= libifconfig_media.c
 
 INCSDIR=   ${INCLUDEDIR}
 INCS=  libifconfig.h
@@ -16,6 +18,6 @@ INCS= libifconfig.h
 #MAN=  libifconfig.3
 
 CFLAGS+= -I${.CURDIR}
-WARNS?=6
+NO_WCAST_ALIGN= yes
 
 .include 

Modified: head/lib/libifconfig/libifconfig.c
==
--- head/lib/libifconfig/libifconfig.c  Fri Feb 23 02:53:50 2018
(r329852)
+++ head/lib/libifconfig/libifconfig.c  Fri Feb 23 03:11:43 2018
(r329853)
@@ -1,38 +1,7 @@
 /*
- * Copyright (c) 2016, Marie Helene Kvello-Aune
- * 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,
- * thislist 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.
- *
- * 3. Neither the name of the copyright holder nor the names of its 
contributors
- * may be used to endorse or promote products derived from this software 
without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT HOLDER 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$
- */
-
-/*
  * Copyright (c) 1983, 1993
  *  The Regents of the University of California.  All rights reserved.
+ * Copyright (c) 2016-2017, Marie Helene Kvello-Aune.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -61,65 +30,63 @@
  * $FreeBSD$
  */
 
- /*
- * Copyright 1996 Massachusetts 

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

2018-02-22 Thread Wojciech Macek
Author: wma
Date: Fri Feb 23 07:43:52 2018
New Revision: 329862
URL: https://svnweb.freebsd.org/changeset/base/329862

Log:
  powerpc64: add NVMe to GENERIC64
  
  NVMe support is ready and should be compiled-in
  to the ppc64 kernel.
  
  Submitted by:  Wojciech Macek 
  Obtained from: Semihalf
  Sponsored by:  IBM, QCM Technologies

Modified:
  head/sys/powerpc/conf/GENERIC64

Modified: head/sys/powerpc/conf/GENERIC64
==
--- head/sys/powerpc/conf/GENERIC64 Fri Feb 23 04:12:19 2018
(r329861)
+++ head/sys/powerpc/conf/GENERIC64 Fri Feb 23 07:43:52 2018
(r329862)
@@ -112,6 +112,10 @@ device ata # Legacy ATA/SATA 
controllers
 device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA
 device siis# SiliconImage SiI3124/SiI3132/SiI3531 SATA
 
+# NVM Express (NVMe) support
+device nvme# base NVMe driver
+device nvd # expose NVMe namespaces as disks, depends on 
nvme
+
 # SCSI Controllers
 device ahc # AHA2940 and onboard AIC7xxx devices
 optionsAHC_ALLOW_MEMIO # Attempt to use memory mapped I/O
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r329859 - in head: contrib/compiler-rt/lib/builtins include stand sys/arm/include sys/arm64/include sys/mips/include sys/powerpc/include sys/riscv/include sys/sparc64/include sys/sys s

2018-02-22 Thread Bruce Evans

On Fri, 23 Feb 2018, Warner Losh wrote:


Log:
 Do not include float interfaces when using libsa.

 We don't support float in the boot loaders, so don't include
 interfaces for float or double in systems headers. In addition, take
 the unusual step of spiking double and float to prevent any more
 accidental seepage.


This unimproves all the _types.h headers, probably for no benefits for lua.


Modified: head/sys/arm/include/_types.h
==
--- head/sys/arm/include/_types.h   Fri Feb 23 04:04:18 2018
(r329858)
+++ head/sys/arm/include/_types.h   Fri Feb 23 04:04:25 2018
(r329859)
@@ -70,8 +70,10 @@ typedef  unsigned long long  __uint64_t;
 */
typedef __uint32_t  __clock_t;  /* clock()... */
typedef __int32_t   __critical_t;
+#ifndef _STANDALONE
typedef double  __double_t;
typedef float   __float_t;
+#endif
typedef __int32_t   __intfptr_t;
typedef __int64_t   __intmax_t;
typedef __int32_t   __intptr_t;


__types.h headers exist to avoid ifdefs like this.  They only define types
in the implementation namespace.  Nothing except  should use
__double_t or __float_t directly.  There is only a problem if some option
like -fno-float turns off floating point completely, so that 'float' is
a syntax error.

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


svn commit: r329850 - head/stand/lua

2018-02-22 Thread Kyle Evans
Author: kevans
Date: Fri Feb 23 02:47:51 2018
New Revision: 329850
URL: https://svnweb.freebsd.org/changeset/base/329850

Log:
  lualoader: Drop unused return values; we'll only use the first

Modified:
  head/stand/lua/loader.lua

Modified: head/stand/lua/loader.lua
==
--- head/stand/lua/loader.lua   Fri Feb 23 01:20:14 2018(r329849)
+++ head/stand/lua/loader.lua   Fri Feb 23 02:47:51 2018(r329850)
@@ -32,7 +32,7 @@ local config = require("config")
 local menu = require("menu")
 local password = require("password")
 
-local result, _, _ = lfs.attributes("/boot/lua/local.lua")
+local result = lfs.attributes("/boot/lua/local.lua")
 -- Effectively discard any errors; we'll just act if it succeeds.
 if result ~= nil then
require("local")
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r329854 - head/stand/lua

2018-02-22 Thread Kyle Evans
Author: kevans
Date: Fri Feb 23 03:18:24 2018
New Revision: 329854
URL: https://svnweb.freebsd.org/changeset/base/329854

Log:
  lualoader: shallowCopyTable => deepCopyTable
  
  I called it a shallow copy, but it wasn't really a shallow copy at all.

Modified:
  head/stand/lua/core.lua
  head/stand/lua/menu.lua

Modified: head/stand/lua/core.lua
==
--- head/stand/lua/core.lua Fri Feb 23 03:11:43 2018(r329853)
+++ head/stand/lua/core.lua Fri Feb 23 03:18:24 2018(r329854)
@@ -286,11 +286,11 @@ function core.isSystem386()
 end
 
 -- This may be a better candidate for a 'utility' module.
-function core.shallowCopyTable(tbl)
+function core.deepCopyTable(tbl)
local new_tbl = {}
for k, v in pairs(tbl) do
if type(v) == "table" then
-   new_tbl[k] = core.shallowCopyTable(v)
+   new_tbl[k] = core.deepCopyTable(v)
else
new_tbl[k] = v
end

Modified: head/stand/lua/menu.lua
==
--- head/stand/lua/menu.lua Fri Feb 23 03:11:43 2018(r329853)
+++ head/stand/lua/menu.lua Fri Feb 23 03:18:24 2018(r329854)
@@ -222,7 +222,7 @@ menu.welcome = {
return menu.welcome.swapped_menu
end
-- Shallow copy the table
-   menu_entries = core.shallowCopyTable(menu_entries)
+   menu_entries = core.deepCopyTable(menu_entries)
 
-- Swap the first two menu entries
menu_entries[1], menu_entries[2] =
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r329825 - in head/sys/compat/linuxkpi/common: include/linux src

2018-02-22 Thread Hans Petter Selasky
Author: hselasky
Date: Thu Feb 22 15:29:19 2018
New Revision: 329825
URL: https://svnweb.freebsd.org/changeset/base/329825

Log:
  Return correct error code to user-space when a system call receives a
  signal in the LinuxKPI.
  
  The read(), write() and mmap() system calls can return either EINTR or
  ERESTART upon receiving a signal. Add code to figure out the correct
  return value by temporarily storing the return code from the relevant
  FreeBSD kernel APIs in the Linux task structure.
  
  MFC after:3 days
  Sponsored by: Mellanox Technologies

Modified:
  head/sys/compat/linuxkpi/common/include/linux/mutex.h
  head/sys/compat/linuxkpi/common/include/linux/rwsem.h
  head/sys/compat/linuxkpi/common/include/linux/sched.h
  head/sys/compat/linuxkpi/common/src/linux_compat.c
  head/sys/compat/linuxkpi/common/src/linux_lock.c
  head/sys/compat/linuxkpi/common/src/linux_schedule.c

Modified: head/sys/compat/linuxkpi/common/include/linux/mutex.h
==
--- head/sys/compat/linuxkpi/common/include/linux/mutex.h   Thu Feb 22 
13:32:31 2018(r329824)
+++ head/sys/compat/linuxkpi/common/include/linux/mutex.h   Thu Feb 22 
15:29:19 2018(r329825)
@@ -63,7 +63,7 @@ typedef struct mutex {
 
 #definemutex_lock_interruptible(_m) ({ \
MUTEX_SKIP() ? 0 :  \
-   (sx_xlock_sig(&(_m)->sx) ? -EINTR : 0); \
+   linux_mutex_lock_interruptible(_m); \
 })
 
 #definemutex_unlock(_m) do {   \
@@ -142,5 +142,7 @@ linux_mutex_destroy(mutex_t *m)
mutex_unlock(m);
sx_destroy(>sx);
 }
+
+extern int linux_mutex_lock_interruptible(mutex_t *m);
 
 #endif /* _LINUX_MUTEX_H_ */

Modified: head/sys/compat/linuxkpi/common/include/linux/rwsem.h
==
--- head/sys/compat/linuxkpi/common/include/linux/rwsem.h   Thu Feb 22 
13:32:31 2018(r329824)
+++ head/sys/compat/linuxkpi/common/include/linux/rwsem.h   Thu Feb 22 
15:29:19 2018(r329825)
@@ -47,7 +47,7 @@ struct rw_semaphore {
 #defineup_read(_rw)sx_sunlock(&(_rw)->sx)
 #definedown_read_trylock(_rw)  !!sx_try_slock(&(_rw)->sx)
 #definedown_write_trylock(_rw) !!sx_try_xlock(&(_rw)->sx)
-#definedown_write_killable(_rw)!!sx_xlock_sig(&(_rw)->sx)
+#definedown_write_killable(_rw)linux_down_write_killable(_rw)
 #definedowngrade_write(_rw)sx_downgrade(&(_rw)->sx)
 #definedown_read_nested(_rw, _sc)  down_read(_rw)
 #defineinit_rwsem(_rw) linux_init_rwsem(_rw, 
rwsem_name("lnxrwsem"))
@@ -78,5 +78,7 @@ linux_init_rwsem(struct rw_semaphore *rw, const char *
memset(rw, 0, sizeof(*rw));
sx_init_flags(>sx, name, SX_NOWITNESS);
 }
+
+extern int linux_down_write_killable(struct rw_semaphore *);
 
 #endif /* _LINUX_RWSEM_H_ */

Modified: head/sys/compat/linuxkpi/common/include/linux/sched.h
==
--- head/sys/compat/linuxkpi/common/include/linux/sched.h   Thu Feb 22 
13:32:31 2018(r329824)
+++ head/sys/compat/linuxkpi/common/include/linux/sched.h   Thu Feb 22 
15:29:19 2018(r329825)
@@ -2,7 +2,7 @@
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.
  * Copyright (c) 2010 Panasas, Inc.
- * Copyright (c) 2013-2017 Mellanox Technologies, Ltd.
+ * Copyright (c) 2013-2018 Mellanox Technologies, Ltd.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -77,6 +77,7 @@ struct task_struct {
struct completion exited;
TAILQ_ENTRY(task_struct) rcu_entry;
int rcu_recurse;
+   int bsd_interrupt_value;
 };
 
 #definecurrent ({ \
@@ -127,11 +128,25 @@ void linux_send_sig(int signo, struct task_struct *tas
 #definesignal_pending_state(state, task)   \
linux_signal_pending_state(state, task)
 #definesend_sig(signo, task, priv) do {\
-   CTASSERT(priv == 0);\
+   CTASSERT((priv) == 0);  \
linux_send_sig(signo, task);\
 } while (0)
 
 int linux_schedule_timeout(int timeout);
+
+static inline void
+linux_schedule_save_interrupt_value(struct task_struct *task, int value)
+{
+   task->bsd_interrupt_value = value;
+}
+
+static inline int
+linux_schedule_get_interrupt_value(struct task_struct *task)
+{
+   int value = task->bsd_interrupt_value;
+   task->bsd_interrupt_value = 0;
+   return (value);
+}
 
 #defineschedule()  \
(void)linux_schedule_timeout(MAX_SCHEDULE_TIMEOUT)

Modified: 

svn commit: r329826 - head/tools/boot

2018-02-22 Thread Kyle Evans
Author: kevans
Date: Thu Feb 22 15:29:57 2018
New Revision: 329826
URL: https://svnweb.freebsd.org/changeset/base/329826

Log:
  lua-lint: Add note about luacheck in ports, silence warning
  
  luacheck was added in ports r462609.
  
  Silence warning about cli_execute -- it's non-standard, but for our setup it
  will be a standard global.

Modified:
  head/tools/boot/lua-lint.sh

Modified: head/tools/boot/lua-lint.sh
==
--- head/tools/boot/lua-lint.sh Thu Feb 22 15:29:19 2018(r329825)
+++ head/tools/boot/lua-lint.sh Thu Feb 22 15:29:57 2018(r329826)
@@ -1,8 +1,8 @@
 #!/bin/sh
 # $FreeBSD$
 
-# Run linter on the lua scripts in stand/lua. luacheck, not currently available
-# in ports, must be installed as a dependency.
+# Run linter on the lua scripts in stand/lua. luacheck, available in ports as
+# devel/lua-luacheck, must be installed as a dependency of this script.
 
 die() {
 echo $*
@@ -16,4 +16,4 @@ LUACHECK=$(which luacheck)
 
 cd $(make -V SRCTOP)/stand
 ${LUACHECK} . --globals loader --globals lfs --globals io.getchar \
-   --globals io.ischar --std lua53
+   --globals io.ischar --globals cli_execute --std lua53
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r329822 - head/sbin

2018-02-22 Thread Andrew Turner
This commit message is missing why these are needed on powerpc, e.g. why aren’t 
you able to use gpart.

Andrew

> On 22 Feb 2018, at 12:31, Wojciech Macek  wrote:
> 
> Author: wma
> Date: Thu Feb 22 12:31:28 2018
> New Revision: 329822
> URL: https://svnweb.freebsd.org/changeset/base/329822
> 
> Log:
>  Add bsdlabel and fdisk to powerpc64
> 
>  Submitted by:  Wojciech Macek 
>  Obtained from: Semihalf
>  Sponsored by:  IBM, QCM Technologies
> 
> Added:
>  head/sbin/Makefile.powerpc64   (contents, props changed)
> 
> Added: head/sbin/Makefile.powerpc64
> ==
> --- /dev/null 00:00:00 1970   (empty, because file is newly added)
> +++ head/sbin/Makefile.powerpc64  Thu Feb 22 12:31:28 2018
> (r329822)
> @@ -0,0 +1,4 @@
> +# $FreeBSD$
> +
> +SUBDIR += bsdlabel
> +SUBDIR += fdisk
> 

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


Re: svn commit: r329817 - in head/etc: . rc.d

2018-02-22 Thread Rodney W. Grimes
> Author: araujo
> Date: Thu Feb 22 08:25:39 2018
> New Revision: 329817
> URL: https://svnweb.freebsd.org/changeset/base/329817
> 
> Log:
>   The firewall_type is ignored if not set in rc.conf or rc.conf.local,
>   after r190575 there is an option to call rc.firewall with the firewall_type
>   passed in as an argument.
>   
>   Submitted by:   David P. Discher 
>   MFC after:  3 weeks.
>   Sponsored by:   iXsystems Inc.
>   Differential Revision:  https://reviews.freebsd.org/D14286
> 
> Modified:
>   head/etc/rc.d/ipfw
>   head/etc/rc.firewall
> 
> Modified: head/etc/rc.d/ipfw
> ==
> --- head/etc/rc.d/ipfwThu Feb 22 05:44:00 2018(r329816)
> +++ head/etc/rc.d/ipfwThu Feb 22 08:25:39 2018(r329817)
> @@ -40,7 +40,11 @@ ipfw_start()
>  {
>   local   _firewall_type
>  
> - _firewall_type=$1
> + if [ -n "${1}" ]; then
> + _firewall_type=$1
> + else
> + _firewall_type=${firewall_type}
> + fi
>  
>   # set the firewall rules script if none was specified
>   [ -z "${firewall_script}" ] && firewall_script=/etc/rc.firewall
> 
> Modified: head/etc/rc.firewall
> ==
> --- head/etc/rc.firewall  Thu Feb 22 05:44:00 2018(r329816)
> +++ head/etc/rc.firewall  Thu Feb 22 08:25:39 2018(r329817)
> @@ -112,12 +112,20 @@ setup_ipv6_mandatory() {
>   ${fwcmd} add pass ipv6-icmp from any to any icmp6types 2,135,136
>  }
>  
> +. /etc/rc.subr
> +. /etc/network.subr
> +
>  if [ -n "${1}" ]; then
>   firewall_type="${1}"
>  fi
> +if [ -z "${firewall_rc_config_load}" ]; then
> +load_rc_config ipfw
> +else
> +for i in ${firewall_rc_config_load}; do
> +load_rc_config $i
> +done
> +fi

There is no documentation of firewall_rc_config_load.

> -. /etc/rc.subr
> -. /etc/network.subr
>  afexists inet6
>  ipv6_available=$?

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