svn commit: r336733 - head/stand/efi/loader

2018-07-25 Thread Warner Losh
Author: imp
Date: Thu Jul 26 05:08:58 2018
New Revision: 336733
URL: https://svnweb.freebsd.org/changeset/base/336733

Log:
  Ignore Device Paths in the Boot Info that don't have Media path
  nodes. These show up in default entries on SuperMicro motherboards and
  elsewhere. Before, we couldn't find a block device associated with the
  device path and return BAD_CHOICE which was an instant
  failure. However, a VendHw node isn't specifc, so when we don't find a
  media path, return NOT_SPECIFIC so that the rest of the algorithms
  work.
  
  Sponsored by: Netflix.

Modified:
  head/stand/efi/loader/main.c

Modified: head/stand/efi/loader/main.c
==
--- head/stand/efi/loader/main.cThu Jul 26 04:12:31 2018
(r336732)
+++ head/stand/efi/loader/main.cThu Jul 26 05:08:58 2018
(r336733)
@@ -355,9 +355,14 @@ match_boot_info(EFI_LOADED_IMAGE *img __unused, char *
 
/*
 * If there's only one item in the list, then nothing was
-* specified.
+* specified. Or if the last path doesn't have a media
+* path in it. Those show up as various VenHw() nodes
+* which are basically opaque to us. Don't count those
+* as something specifc.
 */
if (last_dp == first_dp)
+   return NOT_SPECIFIC;
+   if (efi_devpath_to_media_path(last_dp) == NULL)
return NOT_SPECIFIC;
 
/*
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r336526 - head

2018-07-25 Thread Ravi Pokala
-Original Message-
From: Ravi Pokala 
Date: 2018-07-20, Friday at 10:53
To: Ian Lepore , , 
, , Will Andrews 

Subject: Re: svn commit: r336526 - head

> -Original Message-
> From:  on behalf of Ian Lepore 
> 
> Date: 2018-07-20, Friday at 10:38
> To: Ravi Pokala , , 
> , 
> Subject: Re: svn commit: r336526 - head
> 
>> On Fri, 2018-07-20 at 09:56 -0700, Ravi Pokala wrote:
>>> Hi Ian,
>>> 
>>> -Original Message-
>>> From:  on behalf of Ian Lepore 
>>> Date: 2018-07-19, Thursday at 17:44
>>> To: , , 
>>> Subject: svn commit: r336526 - head
>>> 
 
 Author: ian
 Date: Fri Jul 20 00:44:04 2018
 New Revision: 336526
 URL: https://svnweb.freebsd.org/changeset/base/336526
 
 Log:
   Add ntpd to the list of users/groups to check before installing.
 
 Modified:
   head/Makefile.inc1
>>> When trying to installworld:
>>> 
>>> ERROR: Required ntpd user is missing, see /usr/src/UPDATING.
>>> 
>>> But there is no UPDATING entry about this. (Also, shouldn't it be 
>>> ${SRCTOP}/UPDATING?)
>>> 
>>> Thanks,
>>> 
>>> Ravi (rpokala@)
>> 
>> I wondered about that too, when I accidentally stumbled across the
>> CHECK_UIDS thing and realized I should add ntpd to it. I searched in
>> UPDATING for some of the other things in the CHECK_UIDS list to see
>> what had been said about such changes in the past, even searching
>> through old-old svn history, and found nothing.
>> 
>> I finally settled on the thought that the reference to UPDATING was to
>> the stuff at the bottom that never changes. In particular to the
>> section around line 1595 that documents the instalkernel, reboot,
>> mergemaster, installworld sequence. The mergemaster part should take
>> care of the new userid, I guess.
>> 
>> -- Ian
> 
> Interesting. I was attempting the install via the `beinstall.sh' script. 
> CCing will@, since he wrote it.
> 
> Thanks,
> 
> Ravi (rpokala@)

After some discussion on IRC, I created this patch to fix `beinstall.sh'.

https://people.freebsd.org/~rpokala/beinstall.patch

However, I'm a bit afraid of testing it, until someone who actually knows 
`etcupdate' and `mergemaster' can confirm that it won't blow up my box. :-)

Can anyone take a look and assuage my fears?

Thanks,

Ravi (rpokala@)


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


svn commit: r336726 - in stable/11/release: . arm tools

2018-07-25 Thread Emmanuel Vadot
Author: manu
Date: Wed Jul 25 21:52:49 2018
New Revision: 336726
URL: https://svnweb.freebsd.org/changeset/base/336726

Log:
  MFC r336598-r336600, r336721
  
  r336598:
  release: Uniform release arm image size
  
  Create a 50m fat16 for all boards.
  
  Reviewed by:  gjb
  Differential Revision:https://reviews.freebsd.org/D16238
  
  r336599:
  release: Add arm_install_boot to install the commit boot bits
  
  This reduce the per-board arm_install_uboot to just install u-boot.
  While here remove the installation of rpi.dtb and rpi2.dtb as we load
  them from the UFS partition via ubldr.
  
  Reviewed by:  gjb, imp (older version)
  Differential Revision:https://reviews.freebsd.org/D16239
  
  r336600:
  release: Add rpi firmware dtb and mmc overlays for RPI-B and RPI2
  
  This is needed with new u-boot that uses the rpi-firmware dtbs.
  
  Reviewed by:  gjb
  Differential Revision:https://reviews.freebsd.org/D16240
  
  r336721:
  release: Add OL_DIR forgot in r336600
  
  Reviewed by:  gjb
  Differential Revision:https://reviews.freebsd.org/D16439
  
  Approved by:  gjb (for insta-mfc of r336721)

Modified:
  stable/11/release/arm/BANANAPI.conf
  stable/11/release/arm/BEAGLEBONE.conf
  stable/11/release/arm/CUBIEBOARD.conf
  stable/11/release/arm/CUBIEBOARD2.conf
  stable/11/release/arm/GUMSTIX.conf
  stable/11/release/arm/PANDABOARD.conf
  stable/11/release/arm/RPI-B.conf
  stable/11/release/arm/RPI2.conf
  stable/11/release/arm/WANDBOARD.conf
  stable/11/release/release.sh
  stable/11/release/tools/arm.subr
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/release/arm/BANANAPI.conf
==
--- stable/11/release/arm/BANANAPI.conf Wed Jul 25 19:31:32 2018
(r336725)
+++ stable/11/release/arm/BANANAPI.conf Wed Jul 25 21:52:49 2018
(r336726)
@@ -7,7 +7,7 @@ EMBEDDED_TARGET_ARCH="armv6"
 EMBEDDED_TARGET="arm"
 EMBEDDEDBUILD=1
 EMBEDDEDPORTS="sysutils/u-boot-bananapi"
-FAT_SIZE="32m -b 1m"
+FAT_SIZE="50m -b 1m"
 FAT_TYPE="16"
 IMAGE_SIZE="1G"
 KERNEL="ALLWINNER"
@@ -20,8 +20,6 @@ export BOARDNAME="BANANAPI"
 arm_install_uboot() {
UBOOT_DIR="/usr/local/share/u-boot/u-boot-bananapi"
UBOOT_FILES="u-boot-sunxi-with-spl.bin"
-   FATMOUNT="${DESTDIR%${KERNEL}}/fat"
-   UFSMOUNT="${DESTDIR%${KERNEL}}/ufs"
chroot ${CHROOTDIR} dd if=${UBOOT_DIR}/${UBOOT_FILES} \
of=/dev/${mddev} bs=1k seek=8 conv=sync
chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}"
@@ -30,8 +28,6 @@ arm_install_uboot() {
chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT}
chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \
${FATMOUNT}/ubldr.bin
-   chroot ${CHROOTDIR} ln ${UFSMOUNT}/boot/dtb/bananapi.dtb \
-   ${UFSMOUNT}/boot/dtb/sun7i-a20-bananapi.dtb
chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot
sync
umount_loop ${CHROOTDIR}/${FATMOUNT}

Modified: stable/11/release/arm/BEAGLEBONE.conf
==
--- stable/11/release/arm/BEAGLEBONE.conf   Wed Jul 25 19:31:32 2018
(r336725)
+++ stable/11/release/arm/BEAGLEBONE.conf   Wed Jul 25 21:52:49 2018
(r336726)
@@ -7,7 +7,7 @@ EMBEDDED_TARGET_ARCH="armv6"
 EMBEDDED_TARGET="arm"
 EMBEDDEDBUILD=1
 EMBEDDEDPORTS="sysutils/u-boot-beaglebone"
-FAT_SIZE="41m"
+FAT_SIZE="50m"
 FAT_TYPE="16"
 IMAGE_SIZE="1G"
 KERNEL="BEAGLEBONE"
@@ -19,25 +19,17 @@ WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x8800"
 arm_install_uboot() {
UBOOT_DIR="/usr/local/share/u-boot/u-boot-beaglebone"
FATMOUNT="${DESTDIR%${KERNEL}}/fat"
-   UFSMOUNT="${DESTDIR%${KERNEL}}/ufs"
-   chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}"
+   chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}"
chroot ${CHROOTDIR} mount_msdosfs /dev/${mddev}s1 ${FATMOUNT}
-   chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${UFSMOUNT}
chroot ${CHROOTDIR} cp -p ${UBOOT_DIR}/MLO ${FATMOUNT}/MLO
chroot ${CHROOTDIR} cp -p ${UBOOT_DIR}/u-boot.img ${FATMOUNT}/u-boot.img
chroot ${CHROOTDIR} cp ${UBOOT_DIR}/boot.scr ${FATMOUNT}/boot.scr
chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \
${FATMOUNT}/ubldr.bin
-   chroot ${CHROOTDIR} ln ${UFSMOUNT}/boot/dtb/beaglebone.dtb \
-   ${UFSMOUNT}/boot/dtb/am335x-bone.dtb
-   chroot ${CHROOTDIR} ln ${UFSMOUNT}/boot/dtb/beaglebone-black.dtb \
-   ${UFSMOUNT}/boot/dtb/am335x-boneblack.dtb
chroot ${CHROOTDIR} touch ${UFSMOUNT}/firstboot
sync
umount_loop ${CHROOTDIR}/${FATMOUNT}
-   umount_loop ${CHROOTDIR}/${UFSMOUNT}
chroot ${CHROOTDIR} rmdir ${FATMOUNT}
-   chroot ${CHROOTDIR} rmdir ${UFSMOUNT}

return 0
 }

Modified: stable/11/release/arm/CUBIEBOARD.conf

svn commit: r336727 - in head/sys/net: . altq

2018-07-25 Thread Patrick Kelsey
Author: pkelsey
Date: Wed Jul 25 22:46:36 2018
New Revision: 336727
URL: https://svnweb.freebsd.org/changeset/base/336727

Log:
  ALTQ support for iflib.
  
  Reviewed by:  jmallett, mmacy
  Differential Revision:https://reviews.freebsd.org/D16433

Modified:
  head/sys/net/altq/if_altq.h
  head/sys/net/iflib.c

Modified: head/sys/net/altq/if_altq.h
==
--- head/sys/net/altq/if_altq.h Wed Jul 25 21:52:49 2018(r336726)
+++ head/sys/net/altq/if_altq.h Wed Jul 25 22:46:36 2018(r336727)
@@ -143,7 +143,11 @@ struct tb_regulator {
 #defineALTRQ_PURGE 1   /* purge all packets */
 
 #defineALTQ_IS_READY(ifq)  ((ifq)->altq_flags & 
ALTQF_READY)
+#ifdef ALTQ
 #defineALTQ_IS_ENABLED(ifq)((ifq)->altq_flags & 
ALTQF_ENABLED)
+#else
+#defineALTQ_IS_ENABLED(ifq)0
+#endif
 #defineALTQ_NEEDS_CLASSIFY(ifq)((ifq)->altq_flags & 
ALTQF_CLASSIFY)
 #defineALTQ_IS_CNDTNING(ifq)   ((ifq)->altq_flags & 
ALTQF_CNDTNING)
 

Modified: head/sys/net/iflib.c
==
--- head/sys/net/iflib.cWed Jul 25 21:52:49 2018(r336726)
+++ head/sys/net/iflib.cWed Jul 25 22:46:36 2018(r336727)
@@ -739,6 +739,10 @@ static int iflib_msix_init(if_ctx_t ctx);
 static int iflib_legacy_setup(if_ctx_t ctx, driver_filter_t filter, void 
*filterarg, int *rid, const char *str);
 static void iflib_txq_check_drain(iflib_txq_t txq, int budget);
 static uint32_t iflib_txq_can_drain(struct ifmp_ring *);
+#ifdef ALTQ
+static void iflib_altq_if_start(if_t ifp);
+static int iflib_altq_if_transmit(if_t ifp, struct mbuf *m);
+#endif
 static int iflib_register(if_ctx_t);
 static void iflib_init_locked(if_ctx_t ctx);
 static void iflib_add_device_sysctl_pre(if_ctx_t ctx);
@@ -3775,6 +3779,10 @@ _task_fn_tx(void *context)
IFDI_TX_QUEUE_INTR_ENABLE(ctx, txq->ift_id);
return;
}
+#ifdef ALTQ
+   if (ALTQ_IS_ENABLED(>if_snd))
+   iflib_altq_if_start(ifp);
+#endif
if (txq->ift_db_pending)
ifmp_ring_enqueue(txq->ift_br, (void **), 1, TX_BATCH_SIZE, 
abdicate);
else if (!abdicate)
@@ -3963,8 +3971,9 @@ iflib_if_transmit(if_t ifp, struct mbuf *m)
}
 
MPASS(m->m_nextpkt == NULL);
+   /* ALTQ-enabled interfaces always use queue 0. */
qidx = 0;
-   if ((NTXQSETS(ctx) > 1) && M_HASHTYPE_GET(m))
+   if ((NTXQSETS(ctx) > 1) && M_HASHTYPE_GET(m) && 
!ALTQ_IS_ENABLED(>if_snd))
qidx = QIDX(ctx, m);
/*
 * XXX calculate buf_ring based on flowid (divvy up bits?)
@@ -4024,7 +4033,60 @@ iflib_if_transmit(if_t ifp, struct mbuf *m)
return (err);
 }
 
+#ifdef ALTQ
+/*
+ * The overall approach to integrating iflib with ALTQ is to continue to use
+ * the iflib mp_ring machinery between the ALTQ queue(s) and the hardware
+ * ring.  Technically, when using ALTQ, queueing to an intermediate mp_ring
+ * is redundant/unnecessary, but doing so minimizes the amount of
+ * ALTQ-specific code required in iflib.  It is assumed that the overhead of
+ * redundantly queueing to an intermediate mp_ring is swamped by the
+ * performance limitations inherent in using ALTQ.
+ *
+ * When ALTQ support is compiled in, all iflib drivers will use a transmit
+ * routine, iflib_altq_if_transmit(), that checks if ALTQ is enabled for the
+ * given interface.  If ALTQ is enabled for an interface, then all
+ * transmitted packets for that interface will be submitted to the ALTQ
+ * subsystem via IFQ_ENQUEUE().  We don't use the legacy if_transmit()
+ * implementation because it uses IFQ_HANDOFF(), which will duplicatively
+ * update stats that the iflib machinery handles, and which is sensitve to
+ * the disused IFF_DRV_OACTIVE flag.  Additionally, iflib_altq_if_start()
+ * will be installed as the start routine for use by ALTQ facilities that
+ * need to trigger queue drains on a scheduled basis.
+ *
+ */
 static void
+iflib_altq_if_start(if_t ifp)
+{
+   struct ifaltq *ifq = >if_snd;
+   struct mbuf *m;
+   
+   IFQ_LOCK(ifq);
+   IFQ_DEQUEUE_NOLOCK(ifq, m);
+   while (m != NULL) {
+   iflib_if_transmit(ifp, m);
+   IFQ_DEQUEUE_NOLOCK(ifq, m);
+   }
+   IFQ_UNLOCK(ifq);
+}
+
+static int
+iflib_altq_if_transmit(if_t ifp, struct mbuf *m)
+{
+   int err;
+
+   if (ALTQ_IS_ENABLED(>if_snd)) {
+   IFQ_ENQUEUE(>if_snd, m, err);
+   if (err == 0)
+   iflib_altq_if_start(ifp);
+   } else
+   err = iflib_if_transmit(ifp, m);
+
+   return (err);
+}
+#endif /* ALTQ */
+
+static void
 iflib_if_qflush(if_t ifp)
 {
if_ctx_t ctx = if_getsoftc(ifp);
@@ -4041,6 +4103,10 @@ iflib_if_qflush(if_t ifp)
ctx->ifc_flags &= ~IFC_QFLUSH;

svn commit: r336728 - in head: etc/mtree tests/sys tests/sys/auditpipe

2018-07-25 Thread Alan Somers
Author: asomers
Date: Thu Jul 26 00:16:41 2018
New Revision: 336728
URL: https://svnweb.freebsd.org/changeset/base/336728

Log:
  Introduce test program for auditpipe(4)
  
  Submitted by: aniketp
  MFC after:2 weeks
  Sponsored by: Google, Inc. (GSoC 2018)
  Differential Revision:https://reviews.freebsd.org/D16395

Added:
  head/tests/sys/auditpipe/
  head/tests/sys/auditpipe/Makefile   (contents, props changed)
  head/tests/sys/auditpipe/auditpipe_test.c   (contents, props changed)
Modified:
  head/etc/mtree/BSD.tests.dist
  head/tests/sys/Makefile

Modified: head/etc/mtree/BSD.tests.dist
==
--- head/etc/mtree/BSD.tests.dist   Wed Jul 25 22:46:36 2018
(r336727)
+++ head/etc/mtree/BSD.tests.dist   Thu Jul 26 00:16:41 2018
(r336728)
@@ -432,6 +432,8 @@
 ..
 audit
 ..
+auditpipe
+..
 capsicum
 ..
 cddl

Modified: head/tests/sys/Makefile
==
--- head/tests/sys/Makefile Wed Jul 25 22:46:36 2018(r336727)
+++ head/tests/sys/Makefile Thu Jul 26 00:16:41 2018(r336728)
@@ -7,6 +7,7 @@ TESTSDIR=   ${TESTSBASE}/sys
 TESTS_SUBDIRS+=acl
 TESTS_SUBDIRS+=aio
 TESTS_SUBDIRS+=audit
+TESTS_SUBDIRS+=auditpipe
 TESTS_SUBDIRS+=capsicum
 TESTS_SUBDIRS+=${_cddl}
 TESTS_SUBDIRS+=fifo

Added: head/tests/sys/auditpipe/Makefile
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tests/sys/auditpipe/Makefile   Thu Jul 26 00:16:41 2018
(r336728)
@@ -0,0 +1,10 @@
+# $FreeBSD$
+
+TESTSDIR=  ${TESTSBASE}/sys/auditpipe
+
+ATF_TESTS_C=   auditpipe_test
+
+TEST_METADATA+= required_user="root"
+WARNS?=6
+
+.include 

Added: head/tests/sys/auditpipe/auditpipe_test.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tests/sys/auditpipe/auditpipe_test.c   Thu Jul 26 00:16:41 2018
(r336728)
@@ -0,0 +1,185 @@
+/*-
+ * Copyright (c) 2018 Aniket Pandey
+ *
+ * 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
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * 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
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+static int filedesc;
+static FILE *fileptr;
+
+ATF_TC(auditpipe_get_qlen);
+ATF_TC_HEAD(auditpipe_get_qlen, tc)
+{
+   atf_tc_set_md_var(tc, "descr", "Verifies whether the auditpipe ioctl, "
+   "AUDITPIPE_GET_QLEN works properly");
+}
+
+ATF_TC_BODY(auditpipe_get_qlen, tc)
+{
+   int qlen = -1;
+   ATF_REQUIRE((filedesc = open("/dev/auditpipe", O_RDONLY)) != -1);
+   ATF_REQUIRE_EQ(0, ioctl(filedesc, AUDITPIPE_GET_QLEN, ));
+   ATF_REQUIRE(qlen != -1);
+   close(filedesc);
+}
+
+
+ATF_TC(auditpipe_get_qlimit);
+ATF_TC_HEAD(auditpipe_get_qlimit, tc)
+{
+   atf_tc_set_md_var(tc, "descr", "Verifies whether the auditpipe ioctl, "
+   "AUDITPIPE_GET_QLIMIT works properly");
+}
+
+ATF_TC_BODY(auditpipe_get_qlimit, tc)
+{
+   int qlimit = -1;
+   ATF_REQUIRE((filedesc = open("/dev/auditpipe", O_RDONLY)) != -1);
+   ATF_REQUIRE_EQ(0, ioctl(filedesc, AUDITPIPE_GET_QLIMIT, ));
+   ATF_REQUIRE(qlimit != -1);
+   close(filedesc);
+}
+
+
+ATF_TC_WITH_CLEANUP(auditpipe_set_qlimit);
+ATF_TC_HEAD(auditpipe_set_qlimit, tc)
+{
+   atf_tc_set_md_var(tc, "descr", "Verifies 

svn commit: r336706 - in head/usr.sbin/makefs: . msdos

2018-07-25 Thread Ed Maste
Author: emaste
Date: Wed Jul 25 13:27:20 2018
New Revision: 336706
URL: https://svnweb.freebsd.org/changeset/base/336706

Log:
  makefs: whitespace cleanup in msdos files
  
  Sponsored by: The FreeBSD Foundation

Modified:
  head/usr.sbin/makefs/msdos.c
  head/usr.sbin/makefs/msdos/msdosfs_vfsops.c
  head/usr.sbin/makefs/msdos/msdosfs_vnops.c

Modified: head/usr.sbin/makefs/msdos.c
==
--- head/usr.sbin/makefs/msdos.cWed Jul 25 09:40:11 2018
(r336705)
+++ head/usr.sbin/makefs/msdos.cWed Jul 25 13:27:20 2018
(r336706)
@@ -75,7 +75,7 @@ msdos_prep_opts(fsinfo_t *fsopts)
 {
struct msdos_options_ex *msdos_opt = ecalloc(1, sizeof(*msdos_opt));
const option_t msdos_options[] = {
-#define AOPT(_opt, _type, _name, _min, _desc) {\
+#define AOPT(_opt, _type, _name, _min, _desc) {
\
.letter = _opt, \
.name = # _name,\
.type = _min == -1 ? OPT_STRPTR :   \
@@ -91,7 +91,7 @@ msdos_prep_opts(fsinfo_t *fsopts)
.desc = _desc,  \
 },
 ALLOPTS
-#undef AOPT
+#undef AOPT
{ 'U', "utf8", _opt->utf8, OPT_BOOL,
  0, 1, "Use UTF8 names" },
{ .name = NULL }
@@ -169,7 +169,7 @@ msdos_makefs(const char *image, const char *dir, fsnod
fsopts->sectorsize = msdos_opt->options.bytes_per_sector;
} else if (fsopts->sectorsize != msdos_opt->options.bytes_per_sector) {
err(1, "inconsistent sectorsize -S %u"
-   "!= -o bytes_per_sector %u", 
+   "!= -o bytes_per_sector %u",
fsopts->sectorsize, msdos_opt->options.bytes_per_sector);
}
 
@@ -223,8 +223,8 @@ msdos_populate_dir(const char *path, struct denode *di
 
assert(dir != NULL);
assert(root != NULL);
-   assert(fsopts != NULL); 
-   
+   assert(fsopts != NULL);
+
for (cur = root->next; cur != NULL; cur = cur->next) {
if ((size_t)snprintf(pbuf, sizeof(pbuf), "%s/%s", path,
cur->name) >= sizeof(pbuf)) {

Modified: head/usr.sbin/makefs/msdos/msdosfs_vfsops.c
==
--- head/usr.sbin/makefs/msdos/msdosfs_vfsops.c Wed Jul 25 09:40:11 2018
(r336705)
+++ head/usr.sbin/makefs/msdos/msdosfs_vfsops.c Wed Jul 25 13:27:20 2018
(r336706)
@@ -108,7 +108,7 @@ msdosfs_mount(struct vnode *devvp, int flags)
if (!(flags & MSDOSFSMNT_GEMDOSFS)) {
if (bsp->bs50.bsBootSectSig0 != BOOTSIG0
|| bsp->bs50.bsBootSectSig1 != BOOTSIG1) {
-   DPRINTF(("bootsig0 %d bootsig1 %d\n", 
+   DPRINTF(("bootsig0 %d bootsig1 %d\n",
bsp->bs50.bsBootSectSig0,
bsp->bs50.bsBootSectSig1));
error = EINVAL;
@@ -142,10 +142,10 @@ msdosfs_mount(struct vnode *devvp, int flags)
pmp->pm_SecPerTrack, pmp->pm_Heads, pmp->pm_Media));
if (!(flags & MSDOSFSMNT_GEMDOSFS)) {
/* XXX - We should probably check more values here */
-   if (!pmp->pm_BytesPerSec || !SecPerClust
-   || pmp->pm_SecPerTrack > 63) {
+   if (!pmp->pm_BytesPerSec || !SecPerClust
+   || pmp->pm_SecPerTrack > 63) {
DPRINTF(("bytespersec %d secperclust %d "
-   "secpertrack %d\n", 
+   "secpertrack %d\n",
pmp->pm_BytesPerSec, SecPerClust,
pmp->pm_SecPerTrack));
error = EINVAL;
@@ -317,7 +317,7 @@ msdosfs_mount(struct vnode *devvp, int flags)
 * must be a power of 2
 */
if (pmp->pm_bpcluster ^ (1 << pmp->pm_cnshift)) {
-   DPRINTF(("bpcluster %lu cnshift %lu\n", 
+   DPRINTF(("bpcluster %lu cnshift %lu\n",
pmp->pm_bpcluster, pmp->pm_cnshift));
error = EINVAL;
goto error_exit;

Modified: head/usr.sbin/makefs/msdos/msdosfs_vnops.c
==
--- head/usr.sbin/makefs/msdos/msdosfs_vnops.c  Wed Jul 25 09:40:11 2018
(r336705)
+++ head/usr.sbin/makefs/msdos/msdosfs_vnops.c  Wed Jul 25 13:27:20 2018
(r336706)
@@ -101,7 +101,7 @@ msdosfs_times(struct msdosfsmount *pmp, struct denode 
struct timespec at;
struct timespec mt;
 
-   if (stampst.st_ino) 
+   if (stampst.st_ino)
st = 
 
 #ifndef HAVE_NBTOOL_CONFIG_H
@@ -133,7 +133,7 @@ msdosfs_times(struct msdosfsmount *pmp, struct denode 
  * 

svn commit: r336707 - head/usr.bin/top

2018-07-25 Thread Eitan Adler
Author: eadler
Date: Wed Jul 25 14:05:17 2018
New Revision: 336707
URL: https://svnweb.freebsd.org/changeset/base/336707

Log:
  top(1): increase number of columns for memory
  
  The original intention was 4 columns but with a usable a result. In
  practice this was not the case. Increase the number of columns to 5
  until humanize_number learns alternative ways of presenting the number.
  
  Requested by: many
  Ref D15801

Modified:
  head/usr.bin/top/machine.c
  head/usr.bin/top/utils.c

Modified: head/usr.bin/top/machine.c
==
--- head/usr.bin/top/machine.c  Wed Jul 25 13:27:20 2018(r336706)
+++ head/usr.bin/top/machine.c  Wed Jul 25 14:05:17 2018(r336707)
@@ -388,7 +388,7 @@ format_header(const char *uname_field)
sbuf_printf(header, "%*s", ps.jail ? TOP_JID_LEN : 0,
ps.jail 
? " JID" : "");
sbuf_printf(header, " %-*.*s  ", namelength, namelength, 
uname_field);
-   sbuf_cat(header, "THR PRI NICE  SIZE   RES ");
+   sbuf_cat(header, "THR PRI NICE   SIZERES ");
if (ps.swap) {
sbuf_printf(header, "%*s ", TOP_SWAP_LEN - 1, "SWAP");
}
@@ -1064,8 +1064,8 @@ format_next_process(struct handle * xhandle, char *(*g
 
sbuf_printf(procbuf, "%3d ", pp->ki_pri.pri_level - PZERO);
sbuf_printf(procbuf, "%4s", format_nice(pp));
-   sbuf_printf(procbuf, "%6s ", format_k(PROCSIZE(pp)));
-   sbuf_printf(procbuf, "%5s ", format_k(pagetok(pp->ki_rssize)));
+   sbuf_printf(procbuf, "%7s ", format_k(PROCSIZE(pp)));
+   sbuf_printf(procbuf, "%6s ", format_k(pagetok(pp->ki_rssize)));
if (ps.swap) {
sbuf_printf(procbuf, "%*s ",
TOP_SWAP_LEN - 1,

Modified: head/usr.bin/top/utils.c
==
--- head/usr.bin/top/utils.cWed Jul 25 13:27:20 2018(r336706)
+++ head/usr.bin/top/utils.cWed Jul 25 14:05:17 2018(r336707)
@@ -297,7 +297,7 @@ format_k(int64_t amt)
 
 ret = retarray[index];
index = (index + 1) % NUM_STRINGS;
-   humanize_number(ret, 5, amt * 1024, "", HN_AUTOSCALE, HN_NOSPACE);
+   humanize_number(ret, 6, amt * 1024, "", HN_AUTOSCALE, HN_NOSPACE);
return (ret);
 }
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r336711 - in stable/11/sys/arm64: arm64 include

2018-07-25 Thread Mark Johnston
Author: markj
Date: Wed Jul 25 15:40:27 2018
New Revision: 336711
URL: https://svnweb.freebsd.org/changeset/base/336711

Log:
  MFC r336460:
  Port r324665 and r325285 to arm64.

Modified:
  stable/11/sys/arm64/arm64/pmap.c
  stable/11/sys/arm64/include/pmap.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/arm64/arm64/pmap.c
==
--- stable/11/sys/arm64/arm64/pmap.cWed Jul 25 15:14:35 2018
(r336710)
+++ stable/11/sys/arm64/arm64/pmap.cWed Jul 25 15:40:27 2018
(r336711)
@@ -1851,11 +1851,11 @@ SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_spare, CTLFLAG
 static vm_page_t
 reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **lockp)
 {
-   struct pch new_tail;
-   struct pv_chunk *pc;
+   struct pv_chunk *pc, *pc_marker, *pc_marker_end;
+   struct pv_chunk_header pc_marker_b, pc_marker_end_b;
struct md_page *pvh;
pd_entry_t *pde;
-   pmap_t pmap;
+   pmap_t next_pmap, pmap;
pt_entry_t *pte, tpte;
pv_entry_t pv;
vm_offset_t va;
@@ -1863,31 +1863,65 @@ reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **l
struct spglist free;
uint64_t inuse;
int bit, field, freed, lvl;
+   static int active_reclaims = 0;
 
PMAP_LOCK_ASSERT(locked_pmap, MA_OWNED);
KASSERT(lockp != NULL, ("reclaim_pv_chunk: lockp is NULL"));
+
pmap = NULL;
m_pc = NULL;
SLIST_INIT();
-   TAILQ_INIT(_tail);
+   bzero(_marker_b, sizeof(pc_marker_b));
+   bzero(_marker_end_b, sizeof(pc_marker_end_b));
+   pc_marker = (struct pv_chunk *)_marker_b;
+   pc_marker_end = (struct pv_chunk *)_marker_end_b;
+
mtx_lock(_chunks_mutex);
-   while ((pc = TAILQ_FIRST(_chunks)) != NULL && SLIST_EMPTY()) {
-   TAILQ_REMOVE(_chunks, pc, pc_lru);
+   active_reclaims++;
+   TAILQ_INSERT_HEAD(_chunks, pc_marker, pc_lru);
+   TAILQ_INSERT_TAIL(_chunks, pc_marker_end, pc_lru);
+   while ((pc = TAILQ_NEXT(pc_marker, pc_lru)) != pc_marker_end &&
+   SLIST_EMPTY()) {
+   next_pmap = pc->pc_pmap;
+   if (next_pmap == NULL) {
+   /*
+* The next chunk is a marker.  However, it is
+* not our marker, so active_reclaims must be
+* > 1.  Consequently, the next_chunk code
+* will not rotate the pv_chunks list.
+*/
+   goto next_chunk;
+   }
mtx_unlock(_chunks_mutex);
-   if (pmap != pc->pc_pmap) {
+
+   /*
+* A pv_chunk can only be removed from the pc_lru list
+* when both pv_chunks_mutex is owned and the
+* corresponding pmap is locked.
+*/
+   if (pmap != next_pmap) {
if (pmap != NULL && pmap != locked_pmap)
PMAP_UNLOCK(pmap);
-   pmap = pc->pc_pmap;
+   pmap = next_pmap;
/* Avoid deadlock and lock recursion. */
if (pmap > locked_pmap) {
RELEASE_PV_LIST_LOCK(lockp);
PMAP_LOCK(pmap);
-   } else if (pmap != locked_pmap &&
-   !PMAP_TRYLOCK(pmap)) {
-   pmap = NULL;
-   TAILQ_INSERT_TAIL(_tail, pc, pc_lru);
mtx_lock(_chunks_mutex);
continue;
+   } else if (pmap != locked_pmap) {
+   if (PMAP_TRYLOCK(pmap)) {
+   mtx_lock(_chunks_mutex);
+   continue;
+   } else {
+   pmap = NULL; /* pmap is not locked */
+   mtx_lock(_chunks_mutex);
+   pc = TAILQ_NEXT(pc_marker, pc_lru);
+   if (pc == NULL ||
+   pc->pc_pmap != next_pmap)
+   continue;
+   goto next_chunk;
+   }
}
}
 
@@ -1933,9 +1967,8 @@ reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **l
}
}
if (freed == 0) {
-   TAILQ_INSERT_TAIL(_tail, pc, pc_lru);
mtx_lock(_chunks_mutex);
-   continue;
+   goto next_chunk;
}
/* Every freed mapping is for a 4 KB page. */

svn commit: r336712 - head/sys/riscv/riscv

2018-07-25 Thread Ruslan Bukin
Author: br
Date: Wed Jul 25 15:44:49 2018
New Revision: 336712
URL: https://svnweb.freebsd.org/changeset/base/336712

Log:
  Remove unused string.
  
  Reported by:  markj@
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/riscv/riscv/swtch.S

Modified: head/sys/riscv/riscv/swtch.S
==
--- head/sys/riscv/riscv/swtch.SWed Jul 25 15:40:27 2018
(r336711)
+++ head/sys/riscv/riscv/swtch.SWed Jul 25 15:44:49 2018
(r336712)
@@ -208,8 +208,6 @@ ENTRY(cpu_throw)
 #endif
 
ret
-.Lcpu_throw_panic_str:
-   .asciz "cpu_throw: %p\0"
 END(cpu_throw)
 
 /*
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r336714 - head/sys/arm64/arm64

2018-07-25 Thread Mark Johnston
Author: markj
Date: Wed Jul 25 15:58:14 2018
New Revision: 336714
URL: https://svnweb.freebsd.org/changeset/base/336714

Log:
  Simplify the arm64 implementation of pmap_mincore().
  
  No functional change intended.
  
  Reviewed by:  alc
  MFC after:2 weeks
  Sponsored by: The FreeBSD Foundation
  Differential Revision:https://reviews.freebsd.org/D16427

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

Modified: head/sys/arm64/arm64/pmap.c
==
--- head/sys/arm64/arm64/pmap.c Wed Jul 25 15:45:42 2018(r336713)
+++ head/sys/arm64/arm64/pmap.c Wed Jul 25 15:58:14 2018(r336714)
@@ -5074,76 +5074,45 @@ pmap_demote_l2(pmap_t pmap, pt_entry_t *l2, vm_offset_
 int
 pmap_mincore(pmap_t pmap, vm_offset_t addr, vm_paddr_t *locked_pa)
 {
-   pd_entry_t *l1p, l1;
-   pd_entry_t *l2p, l2;
-   pt_entry_t *l3p, l3;
-   vm_paddr_t pa;
+   pt_entry_t *pte, tpte;
+   vm_paddr_t mask, pa;
+   int lvl, val;
bool managed;
-   int val;
 
PMAP_LOCK(pmap);
 retry:
-   pa = 0;
val = 0;
-   managed = false;
+   pte = pmap_pte(pmap, addr, );
+   if (pte != NULL) {
+   tpte = pmap_load(pte);
 
-   l1p = pmap_l1(pmap, addr);
-   if (l1p == NULL) /* No l1 */
-   goto done;
+   switch (lvl) {
+   case 3:
+   mask = L3_OFFSET;
+   break;
+   case 2:
+   mask = L2_OFFSET;
+   break;
+   case 1:
+   mask = L1_OFFSET;
+   break;
+   default:
+   panic("pmap_mincore: invalid level %d", lvl);
+   }
 
-   l1 = pmap_load(l1p);
-   if ((l1 & ATTR_DESCR_MASK) == L1_INVAL)
-   goto done;
-
-   if ((l1 & ATTR_DESCR_MASK) == L1_BLOCK) {
-   pa = (l1 & ~ATTR_MASK) | (addr & L1_OFFSET);
-   managed = (l1 & ATTR_SW_MANAGED) == ATTR_SW_MANAGED;
-   val = MINCORE_SUPER | MINCORE_INCORE;
-   if (pmap_page_dirty(l1))
-   val |= MINCORE_MODIFIED | MINCORE_MODIFIED_OTHER;
-   if ((l1 & ATTR_AF) == ATTR_AF)
-   val |= MINCORE_REFERENCED | MINCORE_REFERENCED_OTHER;
-   goto done;
-   }
-
-   l2p = pmap_l1_to_l2(l1p, addr);
-   if (l2p == NULL) /* No l2 */
-   goto done;
-
-   l2 = pmap_load(l2p);
-   if ((l2 & ATTR_DESCR_MASK) == L2_INVAL)
-   goto done;
-
-   if ((l2 & ATTR_DESCR_MASK) == L2_BLOCK) {
-   pa = (l2 & ~ATTR_MASK) | (addr & L2_OFFSET);
-   managed = (l2 & ATTR_SW_MANAGED) == ATTR_SW_MANAGED;
-   val = MINCORE_SUPER | MINCORE_INCORE;
-   if (pmap_page_dirty(l2))
-   val |= MINCORE_MODIFIED | MINCORE_MODIFIED_OTHER;
-   if ((l2 & ATTR_AF) == ATTR_AF)
-   val |= MINCORE_REFERENCED | MINCORE_REFERENCED_OTHER;
-   goto done;
-   }
-
-   l3p = pmap_l2_to_l3(l2p, addr);
-   if (l3p == NULL) /* No l3 */
-   goto done;
-
-   l3 = pmap_load(l2p);
-   if ((l3 & ATTR_DESCR_MASK) == L3_INVAL)
-   goto done;
-
-   if ((l3 & ATTR_DESCR_MASK) == L3_PAGE) {
-   pa = (l3 & ~ATTR_MASK) | (addr & L3_OFFSET);
-   managed = (l3 & ATTR_SW_MANAGED) == ATTR_SW_MANAGED;
val = MINCORE_INCORE;
-   if (pmap_page_dirty(l3))
+   if (lvl != 3)
+   val |= MINCORE_SUPER;
+   if (pmap_page_dirty(tpte))
val |= MINCORE_MODIFIED | MINCORE_MODIFIED_OTHER;
-   if ((l3 & ATTR_AF) == ATTR_AF)
+   if ((tpte & ATTR_AF) == ATTR_AF)
val |= MINCORE_REFERENCED | MINCORE_REFERENCED_OTHER;
-   }
 
-done:
+   managed = (tpte & ATTR_SW_MANAGED) == ATTR_SW_MANAGED;
+   pa = (tpte & ~ATTR_MASK) | (addr & mask);
+   } else
+   managed = false;
+
if ((val & (MINCORE_MODIFIED_OTHER | MINCORE_REFERENCED_OTHER)) !=
(MINCORE_MODIFIED_OTHER | MINCORE_REFERENCED_OTHER) && managed) {
/* Ensure that "PHYS_TO_VM_PAGE(pa)->object" doesn't change. */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r336716 - in head: share/mk stand sys/conf

2018-07-25 Thread Ruslan Bukin
Author: br
Date: Wed Jul 25 16:07:35 2018
New Revision: 336716
URL: https://svnweb.freebsd.org/changeset/base/336716

Log:
  Disable 'C'-compressed ISA extension.
  
  It works excellent, but KDB disassembler and DTrace FBT provider for
  RISC-V do lack support for it. They currently handle 4-byte instructions
  only, while C-compressed ISA extension introduces 2-byte instructions
  freely mixing them together.
  
  So disable it for now.
  
  Reviewed by:  markj@
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D16436

Modified:
  head/share/mk/bsd.cpu.mk
  head/stand/defs.mk
  head/sys/conf/kern.mk

Modified: head/share/mk/bsd.cpu.mk
==
--- head/share/mk/bsd.cpu.mkWed Jul 25 16:00:48 2018(r336715)
+++ head/share/mk/bsd.cpu.mkWed Jul 25 16:07:35 2018(r336716)
@@ -367,9 +367,9 @@ CFLAGS += -mcpu=8540 -Wa,-me500 -mspe=yes -mabi=spe -m
 
 .if ${MACHINE_CPUARCH} == "riscv"
 .if ${MACHINE_ARCH:Mriscv*sf}
-CFLAGS += -march=rv64imac -mabi=lp64
+CFLAGS += -march=rv64ima -mabi=lp64
 .else
-CFLAGS += -march=rv64imafdc -mabi=lp64d
+CFLAGS += -march=rv64imafd -mabi=lp64d
 .endif
 .endif
 

Modified: head/stand/defs.mk
==
--- head/stand/defs.mk  Wed Jul 25 16:00:48 2018(r336715)
+++ head/stand/defs.mk  Wed Jul 25 16:07:35 2018(r336716)
@@ -103,7 +103,7 @@ CFLAGS+=-ffreestanding ${CFLAGS_NO_SIMD}
 .if ${MACHINE_CPUARCH} == "aarch64"
 CFLAGS+=   -mgeneral-regs-only -fPIC
 .elif ${MACHINE_CPUARCH} == "riscv"
-CFLAGS+=   -march=rv64imac -mabi=lp64
+CFLAGS+=   -march=rv64ima -mabi=lp64
 .else
 CFLAGS+=   -msoft-float
 .endif

Modified: head/sys/conf/kern.mk
==
--- head/sys/conf/kern.mk   Wed Jul 25 16:00:48 2018(r336715)
+++ head/sys/conf/kern.mk   Wed Jul 25 16:07:35 2018(r336716)
@@ -131,7 +131,7 @@ INLINE_LIMIT?=  8000
 .endif
 
 .if ${MACHINE_CPUARCH} == "riscv"
-CFLAGS.gcc+=   -mcmodel=medany -march=rv64imafdc -mabi=lp64
+CFLAGS.gcc+=   -mcmodel=medany -march=rv64imafd -mabi=lp64
 INLINE_LIMIT?= 8000
 .endif
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r336717 - head

2018-07-25 Thread Dimitry Andric
Author: dim
Date: Wed Jul 25 17:14:05 2018
New Revision: 336717
URL: https://svnweb.freebsd.org/changeset/base/336717

Log:
  Add a few forgotten files to ObsoleteFiles.inc:
  * libcasper.so.0, which started in /usr/lib, then moved to /lib, but
was later replaced by libcasper.so.1
  * 32-bit versions of static casper libraries
  * 32-bit versions of static stand libraries
  * 32-bit versions of static ifc(onfig) libraries

Modified:
  head/ObsoleteFiles.inc

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Wed Jul 25 16:07:35 2018(r336716)
+++ head/ObsoleteFiles.inc  Wed Jul 25 17:14:05 2018(r336717)
@@ -38,6 +38,8 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20180725: Cleanup old libcasper.so.0
+OLD_LIBS+=lib/libcasper.so.0
 # 20180722: indent(1) option renamed, test files follow
 OLD_FILES+=usr/bin/indent/tests/nsac.0
 OLD_FILES+=usr/bin/indent/tests/nsac.0.pro
@@ -588,8 +590,6 @@ OLD_FILES+=usr/lib/clang/5.0.0/lib/freebsd/libclang_rt
 # 20171104: libcap_random should be in /lib not in /usr/lib
 OLD_LIBS+=usr/lib/libcap_random.so.0
 # 20171104: Casper can work only as shared library
-OLD_FILES+=usr/lib/libcasper.a
-OLD_FILES+=usr/lib/libcasper_p.a
 OLD_FILES+=usr/lib/libcap_dns.a
 OLD_FILES+=usr/lib/libcap_dns_p.a
 OLD_FILES+=usr/lib/libcap_grp.a
@@ -600,6 +600,20 @@ OLD_FILES+=usr/lib/libcap_random.a
 OLD_FILES+=usr/lib/libcap_random_p.a
 OLD_FILES+=usr/lib/libcap_sysctl.a
 OLD_FILES+=usr/lib/libcap_sysctl_p.a
+OLD_FILES+=usr/lib/libcasper.a
+OLD_FILES+=usr/lib/libcasper_p.a
+OLD_FILES+=usr/lib32/libcap_dns.a
+OLD_FILES+=usr/lib32/libcap_dns_p.a
+OLD_FILES+=usr/lib32/libcap_grp.a
+OLD_FILES+=usr/lib32/libcap_grp_p.a
+OLD_FILES+=usr/lib32/libcap_pwd.a
+OLD_FILES+=usr/lib32/libcap_pwd_p.a
+OLD_FILES+=usr/lib32/libcap_random.a
+OLD_FILES+=usr/lib32/libcap_random_p.a
+OLD_FILES+=usr/lib32/libcap_sysctl.a
+OLD_FILES+=usr/lib32/libcap_sysctl_p.a
+OLD_FILES+=usr/lib32/libcasper.a
+OLD_FILES+=usr/lib32/libcasper_p.a
 # 20171031: Removal of adding_user man page
 OLD_FILES+=usr/share/man/man7/adding_user.7.gz
 # 20171031: Disconnected libpathconv tests
@@ -620,6 +634,8 @@ OLD_FILES+=usr/share/man/man9/mbp_sync.9.gz
 # 20171010: Remove libstand
 OLD_FILES+=usr/lib/libstand.a
 OLD_FILES+=usr/lib/libstand_p.a
+OLD_FILES+=usr/lib32/libstand.a
+OLD_FILES+=usr/lib32/libstand_p.a
 OLD_FILES+=usr/include/stand.h
 OLD_FILES+=usr/share/man/man3/libstand.3.gz
 # 20171003: remove RCMDS
@@ -1372,6 +1388,10 @@ OLD_FILES+=usr/lib/libifc.a
 OLD_FILES+=usr/lib/libifc_p.a
 OLD_FILES+=usr/lib/libifconfig.a
 OLD_FILES+=usr/lib/libifconfig_p.a
+OLD_FILES+=usr/lib32/libifc.a
+OLD_FILES+=usr/lib32/libifc_p.a
+OLD_FILES+=usr/lib32/libifconfig.a
+OLD_FILES+=usr/lib32/libifconfig_p.a
 # 20170529: mount.conf(8) -> mount.conf(5)
 OLD_FILES+=usr/share/man/man8/mount.conf.8.gz
 # 20170525: remove misleading template
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2018-07-25 Thread Navdeep Parhar
Author: np
Date: Wed Jul 25 17:20:06 2018
New Revision: 336718
URL: https://svnweb.freebsd.org/changeset/base/336718

Log:
  cxgbe(4): Validate only those parameters that are relevant to the
  type of rate limiter being programmed.  Skip the ones that are not
  applicable.
  
  MFC after:3 days
  Sponsored by: Chelsio Communications

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

Modified: head/sys/dev/cxgbe/t4_sched.c
==
--- head/sys/dev/cxgbe/t4_sched.c   Wed Jul 25 17:14:05 2018
(r336717)
+++ head/sys/dev/cxgbe/t4_sched.c   Wed Jul 25 17:20:06 2018
(r336718)
@@ -76,6 +76,7 @@ set_sched_class_params(struct adapter *sc, struct t4_s
int rc, top_speed, fw_level, fw_mode, fw_rateunit, fw_ratemode;
struct port_info *pi;
struct tx_cl_rl_params *tc;
+   bool check_pktsize = false;
 
if (p->level == SCHED_CLASS_LEVEL_CL_RL)
fw_level = FW_SCHED_PARAMS_LEVEL_CL_RL;
@@ -86,28 +87,20 @@ set_sched_class_params(struct adapter *sc, struct t4_s
else
return (EINVAL);
 
-   if (p->mode == SCHED_CLASS_MODE_CLASS)
-   fw_mode = FW_SCHED_PARAMS_MODE_CLASS;
-   else if (p->mode == SCHED_CLASS_MODE_FLOW)
-   fw_mode = FW_SCHED_PARAMS_MODE_FLOW;
-   else
-   return (EINVAL);
+   if (p->level == SCHED_CLASS_LEVEL_CL_RL) {
+   if (p->mode == SCHED_CLASS_MODE_CLASS)
+   fw_mode = FW_SCHED_PARAMS_MODE_CLASS;
+   else if (p->mode == SCHED_CLASS_MODE_FLOW) {
+   check_pktsize = true;
+   fw_mode = FW_SCHED_PARAMS_MODE_FLOW;
+   } else
+   return (EINVAL);
+   } else
+   fw_mode = 0;
 
-   if (p->rateunit == SCHED_CLASS_RATEUNIT_BITS)
-   fw_rateunit = FW_SCHED_PARAMS_UNIT_BITRATE;
-   else if (p->rateunit == SCHED_CLASS_RATEUNIT_PKTS)
-   fw_rateunit = FW_SCHED_PARAMS_UNIT_PKTRATE;
-   else
+   /* Valid channel must always be provided. */
+   if (p->channel < 0)
return (EINVAL);
-
-   if (p->ratemode == SCHED_CLASS_RATEMODE_REL)
-   fw_ratemode = FW_SCHED_PARAMS_RATE_REL;
-   else if (p->ratemode == SCHED_CLASS_RATEMODE_ABS)
-   fw_ratemode = FW_SCHED_PARAMS_RATE_ABS;
-   else
-   return (EINVAL);
-
-   /* Vet our parameters ... */
if (!in_range(p->channel, 0, sc->chip_params->nchan - 1))
return (ERANGE);
 
@@ -117,41 +110,81 @@ set_sched_class_params(struct adapter *sc, struct t4_s
MPASS(pi->tx_chan == p->channel);
top_speed = port_top_speed(pi) * 100; /* Gbps -> Kbps */
 
-   if (!in_range(p->cl, 0, sc->chip_params->nsched_cls) ||
-   !in_range(p->minrate, 0, top_speed) ||
-   !in_range(p->maxrate, 0, top_speed) ||
-   !in_range(p->weight, 0, 100))
-   return (ERANGE);
+   if (p->level == SCHED_CLASS_LEVEL_CL_RL ||
+   p->level == SCHED_CLASS_LEVEL_CH_RL) {
+   /*
+* Valid rate (mode, unit and values) must be provided.
+*/
 
-   /*
-* Translate any unset parameters into the firmware's
-* nomenclature and/or fail the call if the parameters
-* are required ...
-*/
-   if (p->rateunit < 0 || p->ratemode < 0 || p->channel < 0 || p->cl < 0)
-   return (EINVAL);
+   if (p->minrate < 0)
+   p->minrate = 0;
+   if (p->maxrate < 0)
+   return (EINVAL);
 
-   if (p->minrate < 0)
-   p->minrate = 0;
-   if (p->maxrate < 0) {
-   if (p->level == SCHED_CLASS_LEVEL_CL_RL ||
-   p->level == SCHED_CLASS_LEVEL_CH_RL)
+   if (p->rateunit == SCHED_CLASS_RATEUNIT_BITS) {
+   fw_rateunit = FW_SCHED_PARAMS_UNIT_BITRATE;
+   /* ratemode could be relative (%) or absolute. */
+   if (p->ratemode == SCHED_CLASS_RATEMODE_REL) {
+   fw_ratemode = FW_SCHED_PARAMS_RATE_REL;
+   /* maxrate is % of port bandwidth. */
+   if (!in_range(p->minrate, 0, 100) ||
+   !in_range(p->maxrate, 0, 100)) {
+   return (ERANGE);
+   }
+   } else if (p->ratemode == SCHED_CLASS_RATEMODE_ABS) {
+   fw_ratemode = FW_SCHED_PARAMS_RATE_ABS;
+   /* maxrate is absolute value in kbps. */
+   if (!in_range(p->minrate, 0, top_speed) ||
+   !in_range(p->maxrate, 0, top_speed)) {
+   return (ERANGE);
+

svn commit: r336719 - head/usr.sbin/cxgbetool

2018-07-25 Thread Navdeep Parhar
Author: np
Date: Wed Jul 25 17:20:54 2018
New Revision: 336719
URL: https://svnweb.freebsd.org/changeset/base/336719

Log:
  cxgbetool(8): Require and validate only those inputs that are applicable
  to the type of rate limiter being configured.  For example, the class
  WRR scheduler doesn't need any kbps limits (it just needs the weights
  for each class), the channel scheduler doesn't need anything except the
  aggregate kbps to limit the channel to, and so on.
  
  MFC after:3 days
  Sponsored by: Chelsio Communications

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

Modified: head/usr.sbin/cxgbetool/cxgbetool.c
==
--- head/usr.sbin/cxgbetool/cxgbetool.c Wed Jul 25 17:20:06 2018
(r336718)
+++ head/usr.sbin/cxgbetool/cxgbetool.c Wed Jul 25 17:20:54 2018
(r336719)
@@ -2862,15 +2862,20 @@ sched_class(int argc, const char *argv[])
warnx("sched params \"level\" parameter missing");
errs++;
}
-   if (op.u.params.mode < 0) {
+   if (op.u.params.mode < 0 &&
+   op.u.params.level == SCHED_CLASS_LEVEL_CL_RL) {
warnx("sched params \"mode\" parameter missing");
errs++;
}
-   if (op.u.params.rateunit < 0) {
+   if (op.u.params.rateunit < 0 &&
+   (op.u.params.level == SCHED_CLASS_LEVEL_CL_RL ||
+   op.u.params.level == SCHED_CLASS_LEVEL_CH_RL)) {
warnx("sched params \"rate-unit\" parameter missing");
errs++;
}
-   if (op.u.params.ratemode < 0) {
+   if (op.u.params.ratemode < 0 &&
+   (op.u.params.level == SCHED_CLASS_LEVEL_CL_RL ||
+   op.u.params.level == SCHED_CLASS_LEVEL_CH_RL)) {
warnx("sched params \"rate-mode\" parameter missing");
errs++;
}
@@ -2878,7 +2883,9 @@ sched_class(int argc, const char *argv[])
warnx("sched params \"channel\" missing");
errs++;
}
-   if (op.u.params.cl < 0) {
+   if (op.u.params.cl < 0 &&
+   (op.u.params.level == SCHED_CLASS_LEVEL_CL_RL ||
+   op.u.params.level == SCHED_CLASS_LEVEL_CL_WRR)) {
warnx("sched params \"class\" missing");
errs++;
}
@@ -2889,15 +2896,14 @@ sched_class(int argc, const char *argv[])
"rate-limit level");
errs++;
}
-   if (op.u.params.weight < 0 &&
-   op.u.params.level == SCHED_CLASS_LEVEL_CL_WRR) {
-   warnx("sched params \"weight\" missing for "
-   "weighted-round-robin level");
+   if (op.u.params.level == SCHED_CLASS_LEVEL_CL_WRR &&
+   (op.u.params.weight < 1 || op.u.params.weight > 99)) {
+   warnx("sched params \"weight\" missing or invalid "
+   "(not 1-99) for weighted-round-robin level");
errs++;
}
if (op.u.params.pktsize < 0 &&
-   (op.u.params.level == SCHED_CLASS_LEVEL_CL_RL ||
-   op.u.params.level == SCHED_CLASS_LEVEL_CH_RL)) {
+   op.u.params.level == SCHED_CLASS_LEVEL_CL_RL) {
warnx("sched params \"pkt-size\" missing for "
"rate-limit level");
errs++;
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


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

2018-07-25 Thread Navdeep Parhar
Author: np
Date: Wed Jul 25 17:45:43 2018
New Revision: 336720
URL: https://svnweb.freebsd.org/changeset/base/336720

Log:
  cxgbe(4): Remove useless code that crept in with r336718.
  
  MFC after:3 days
  X-MFC With:   336718

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

Modified: head/sys/dev/cxgbe/t4_sched.c
==
--- head/sys/dev/cxgbe/t4_sched.c   Wed Jul 25 17:20:54 2018
(r336719)
+++ head/sys/dev/cxgbe/t4_sched.c   Wed Jul 25 17:45:43 2018
(r336720)
@@ -146,14 +146,6 @@ set_sched_class_params(struct adapter *sc, struct t4_s
fw_rateunit = FW_SCHED_PARAMS_UNIT_PKTRATE;
} else
return (EINVAL);
-
-   if (p->level == SCHED_CLASS_LEVEL_CL_RL) {
-   /*
-* Valid pkt-size must be provided.
-*/
-   if (p->pktsize < 0)
-   return (EINVAL);
-   }
} else {
MPASS(p->level == SCHED_CLASS_LEVEL_CL_WRR);
 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r336721 - head/release/arm

2018-07-25 Thread Emmanuel Vadot
Author: manu
Date: Wed Jul 25 17:45:56 2018
New Revision: 336721
URL: https://svnweb.freebsd.org/changeset/base/336721

Log:
  release: Add OL_DIR forgot in r336600
  
  Reviewed by:  gjb
  Differential Revision:https://reviews.freebsd.org/D16439

Modified:
  head/release/arm/RPI-B.conf
  head/release/arm/RPI2.conf

Modified: head/release/arm/RPI-B.conf
==
--- head/release/arm/RPI-B.conf Wed Jul 25 17:45:43 2018(r336720)
+++ head/release/arm/RPI-B.conf Wed Jul 25 17:45:56 2018(r336721)
@@ -13,12 +13,13 @@ IMAGE_SIZE="3072M"
 KERNEL="RPI-B"
 MD_ARGS="-x 63 -y 255"
 NODOC=1
+UBOOT_DIR="/usr/local/share/u-boot/u-boot-rpi"
+RPI_FIRMWARE_DIR="/usr/local/share/rpi-firmware"
+OL_DIR=$"{RPI_FIRMWARE_DIR}/overlays"
 OVERLAYS="mmc.dtbo pi3-disable-bt.dtbo"
 PART_SCHEME="MBR"
 
 arm_install_uboot() {
-   UBOOT_DIR="/usr/local/share/u-boot/u-boot-rpi"
-   RPI_FIRMWARE_DIR="/usr/local/share/rpi-firmware"
UBOOT_FILES="u-boot.bin"
RPI_FIRMWARE_FILES="bootcode.bin config.txt \
fixup.dat fixup_cd.dat fixup_db.dat fixup_x.dat \

Modified: head/release/arm/RPI2.conf
==
--- head/release/arm/RPI2.conf  Wed Jul 25 17:45:43 2018(r336720)
+++ head/release/arm/RPI2.conf  Wed Jul 25 17:45:56 2018(r336721)
@@ -13,13 +13,14 @@ IMAGE_SIZE="3072M"
 KERNEL="GENERIC"
 MD_ARGS="-x 63 -y 255"
 NODOC=1
+UBOOT_DIR="/usr/local/share/u-boot/u-boot-rpi2"
+RPI_FIRMWARE_DIR="/usr/local/share/rpi-firmware"
+OL_DIR=$"{RPI_FIRMWARE_DIR}/overlays"
 OVERLAYS="mmc.dtbo"
 PART_SCHEME="MBR"
 export BOARDNAME="RPI2"
 
 arm_install_uboot() {
-   UBOOT_DIR="/usr/local/share/u-boot/u-boot-rpi2"
-   RPI_FIRMWARE_DIR="/usr/local/share/rpi-firmware"
UBOOT_FILES="u-boot.bin"
RPI_FIRMWARE_FILES="bootcode.bin config.txt \
fixup.dat fixup_cd.dat fixup_db.dat fixup_x.dat \
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r336722 - head/sys/arm/arm

2018-07-25 Thread John Baldwin
Author: jhb
Date: Wed Jul 25 18:11:37 2018
New Revision: 336722
URL: https://svnweb.freebsd.org/changeset/base/336722

Log:
  Raise a proper SIGTRAP / TRAP_TRACE signal for a PT_STEP step on arm.
  
  Previously, a step by PT_STEP resulted in no signal being raised to
  the debugger so that a step was silently completed with the program
  continuing to execute after the step.  Fix by raising a SIGTRAP
  signal with TRAP_TRACE as the signal code.
  
  To simplify the error handling cases (if ptrace_clear_single_step()
  fails, etc.) move the handling of PTRACE_BREAKPOINT into the
  gdb_trapper() function.  If ptrace_clear_single_step() fails,
  gdb_trapper() won't claim the fault, and the default case of
  SIGILL / ILL_OPC will be used.
  
  Differential Revision:https://reviews.freebsd.org/D16100

Modified:
  head/sys/arm/arm/undefined.c

Modified: head/sys/arm/arm/undefined.c
==
--- head/sys/arm/arm/undefined.cWed Jul 25 17:45:56 2018
(r336721)
+++ head/sys/arm/arm/undefined.cWed Jul 25 18:11:37 2018
(r336722)
@@ -144,6 +144,7 @@ gdb_trapper(u_int addr, u_int insn, struct trapframe *
 {
struct thread *td;
ksiginfo_t ksi;
+   int error;
 
td = (curthread == NULL) ?  : curthread;
 
@@ -162,6 +163,27 @@ gdb_trapper(u_int addr, u_int insn, struct trapframe *
 #endif
 #endif
}
+
+   if (code == FAULT_USER) {
+   /* TODO: No support for ptrace from Thumb-2 */
+   if ((frame->tf_spsr & PSR_T) == 0 &&
+   insn == PTRACE_BREAKPOINT) {
+   PROC_LOCK(td->td_proc);
+   _PHOLD(td->td_proc);
+   error = ptrace_clear_single_step(td);
+   _PRELE(td->td_proc);
+   PROC_UNLOCK(td->td_proc);
+   if (error == 0) {
+   ksiginfo_init_trap();
+   ksi.ksi_signo = SIGTRAP;
+   ksi.ksi_code = TRAP_TRACE;
+   ksi.ksi_addr = (u_int32_t *)addr;
+   trapsignal(td, );
+   return (0);
+   }
+   }
+   }
+   
return 1;
 }
 
@@ -191,7 +213,6 @@ undefinedinstruction(struct trapframe *frame)
int fault_code;
int coprocessor;
struct undefined_handler *uh;
-   int error;
 #ifdef VERBOSE_ARM32
int s;
 #endif
@@ -304,26 +325,6 @@ undefinedinstruction(struct trapframe *frame)
if (uh->uh_handler(fault_pc, fault_instruction, frame,
   fault_code) == 0)
break;
-
-   if (fault_code & FAULT_USER) {
-   /* TODO: No support for ptrace from Thumb-2 */
-   if ((frame->tf_spsr & PSR_T) == 0 &&
-   fault_instruction == PTRACE_BREAKPOINT) {
-   PROC_LOCK(td->td_proc);
-   _PHOLD(td->td_proc);
-   error = ptrace_clear_single_step(td);
-   _PRELE(td->td_proc);
-   PROC_UNLOCK(td->td_proc);
-   if (error != 0) {
-   ksiginfo_init_trap();
-   ksi.ksi_signo = SIGILL;
-   ksi.ksi_code = ILL_ILLOPC;
-   ksi.ksi_addr = (u_int32_t *)(intptr_t) fault_pc;
-   trapsignal(td, );
-   }
-   return;
-   }
-   }
 
if (uh == NULL && (fault_code & FAULT_USER)) {
/* Fault has not been handled */
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r336723 - in head/share: man/man5 mk

2018-07-25 Thread John Baldwin
Author: jhb
Date: Wed Jul 25 18:21:14 2018
New Revision: 336723
URL: https://svnweb.freebsd.org/changeset/base/336723

Log:
  Install base gdb in /usr/libexec for 32-bit arm by default.
  
  kgdb in ports now supports 32-bit arm kernels.  sparc64 is now the only
  remaining architecture which ships base gdb in /usr/bin.
  
  Relnotes: yes

Modified:
  head/share/man/man5/src.conf.5
  head/share/mk/src.opts.mk

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Wed Jul 25 18:11:37 2018
(r336722)
+++ head/share/man/man5/src.conf.5  Wed Jul 25 18:21:14 2018
(r336723)
@@ -1,6 +1,6 @@
 .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman.
 .\" $FreeBSD$
-.Dd July 21, 2018
+.Dd July 25, 2018
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -741,7 +741,7 @@ into
 .Pa /usr/bin .
 .Pp
 This is a default setting on
-arm/arm, arm/armv6, arm/armv7 and sparc64/sparc64.
+sparc64/sparc64.
 .It Va WITH_GDB_LIBEXEC
 Set to install
 .Xr gdb 1
@@ -754,7 +754,7 @@ to be used as a fallback for
 if a newer version is not installed.
 .Pp
 This is a default setting on
-amd64/amd64, arm64/aarch64, i386/i386, mips/mipsel, mips/mips, mips/mips64el, 
mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, 
mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, 
riscv/riscv64 and riscv/riscv64sf.
+amd64/amd64, arm/arm, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, 
mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, 
mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, 
powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64 and riscv/riscv64sf.
 .It Va WITHOUT_GNUCXX
 Do not build the GNU C++ stack (g++, libstdc++).
 This is the default on platforms where clang is the system compiler.

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Wed Jul 25 18:11:37 2018(r336722)
+++ head/share/mk/src.opts.mk   Wed Jul 25 18:21:14 2018(r336723)
@@ -321,9 +321,8 @@ __DEFAULT_NO_OPTIONS+=LLDB
 BROKEN_OPTIONS+=LLDB
 .endif
 # GDB in base is generally less functional than GDB in ports.  Ports GDB
-# does not yet contain kernel support for arm, and sparc64 kernel support
-# has not been tested.
-.if ${__T:Marm*} != "" || ${__T} == "sparc64"
+# sparc64 kernel support has not been tested.
+.if ${__T} == "sparc64"
 __DEFAULT_NO_OPTIONS+=GDB_LIBEXEC
 .else
 __DEFAULT_YES_OPTIONS+=GDB_LIBEXEC
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r336724 - in head/sys: conf dev/ipmi modules modules/ipmi powerpc/powernv

2018-07-25 Thread Justin Hibbits
Author: jhibbits
Date: Wed Jul 25 18:58:57 2018
New Revision: 336724
URL: https://svnweb.freebsd.org/changeset/base/336724

Log:
  Support building IPMI as a module on powerpc64
  
  This still only supports IPMI via OPAL on powerpc64, but now it can be tested
  with a GENERIC kernel.

Added:
  head/sys/dev/ipmi/ipmi_opal.c
 - copied, changed from r336723, head/sys/powerpc/powernv/opal_ipmi.c
Deleted:
  head/sys/powerpc/powernv/opal_ipmi.c
Modified:
  head/sys/conf/files.powerpc
  head/sys/modules/Makefile
  head/sys/modules/ipmi/Makefile

Modified: head/sys/conf/files.powerpc
==
--- head/sys/conf/files.powerpc Wed Jul 25 18:21:14 2018(r336723)
+++ head/sys/conf/files.powerpc Wed Jul 25 18:58:57 2018(r336724)
@@ -43,6 +43,7 @@ dev/iicbus/ds1775.c   optionalds1775 powermac
 dev/iicbus/max6690.c   optionalmax6690 powermac
 dev/iicbus/ofw_iicbus.coptionaliicbus aim
 dev/ipmi/ipmi.coptionalipmi
+dev/ipmi/ipmi_opal.c   optionalpowernv ipmi
 dev/nand/nfc_fsl.c optionalnand mpc85xx
 dev/nand/nfc_rb.c  optionalnand mpc85xx
 # Most ofw stuff below is brought in by conf/files for options FDT, but
@@ -192,7 +193,6 @@ powerpc/powernv/opal_console.c  optionalpowernv
 powerpc/powernv/opal_dev.c optionalpowernv
 powerpc/powernv/opal_i2c.c optionaliicbus fdt powernv
 powerpc/powernv/opal_i2cm.coptionaliicbus fdt powernv
-powerpc/powernv/opal_ipmi.coptionalpowernv ipmi
 powerpc/powernv/opal_pci.c optionalpowernv pci
 powerpc/powernv/opal_sensor.c  optionalpowernv
 powerpc/powernv/opalcall.S optionalpowernv

Copied and modified: head/sys/dev/ipmi/ipmi_opal.c (from r336723, 
head/sys/powerpc/powernv/opal_ipmi.c)
==
--- head/sys/powerpc/powernv/opal_ipmi.cWed Jul 25 18:21:14 2018
(r336723, copy source)
+++ head/sys/dev/ipmi/ipmi_opal.c   Wed Jul 25 18:58:57 2018
(r336724)
@@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include "opal.h"
+#include 
 
 struct opal_ipmi_softc {
struct ipmi_softc ipmi;

Modified: head/sys/modules/Makefile
==
--- head/sys/modules/Makefile   Wed Jul 25 18:21:14 2018(r336723)
+++ head/sys/modules/Makefile   Wed Jul 25 18:58:57 2018(r336724)
@@ -794,6 +794,7 @@ _wi=wi
 
 .if ${MACHINE_ARCH} == "powerpc64"
 _drm2= drm2
+_ipmi= ipmi
 .endif
 .if ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "powerpc"
 # Don't build powermac_nvram for powerpcspe, it's never supported.

Modified: head/sys/modules/ipmi/Makefile
==
--- head/sys/modules/ipmi/Makefile  Wed Jul 25 18:21:14 2018
(r336723)
+++ head/sys/modules/ipmi/Makefile  Wed Jul 25 18:58:57 2018
(r336724)
@@ -7,9 +7,15 @@ SUBDIR+= ipmi_linux
 # XXX - ipmi_smbus and ipmi_ssif depend on smbus
 # XXX - ipmi_acpi depends on acpi
 KMOD=  ipmi
-SRCS=  ipmi.c ipmi_kcs.c ipmi_smic.c ipmi_smbios.c ipmi_ssif.c
+SRCS=  ipmi.c
+SRCS+= bus_if.h device_if.h
+.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "i386"
+SRCS+= ipmi_kcs.c ipmi_smic.c ipmi_smbios.c ipmi_ssif.c
 SRCS+= ipmi_acpi.c ipmi_isa.c ipmi_pci.c ipmi_smbus.c
 SRCS+= opt_acpi.h
-SRCS+= acpi_if.h bus_if.h device_if.h isa_if.h pci_if.h smbus_if.h
+SRCS+= acpi_if.h isa_if.h pci_if.h smbus_if.h
+.elif ${MACHINE_ARCH} == "powerpc64"
+SRCS+= ipmi_opal.c
+.endif
 
 .include 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r336725 - head/sys/modules/ipmi

2018-07-25 Thread Justin Hibbits
Author: jhibbits
Date: Wed Jul 25 19:31:32 2018
New Revision: 336725
URL: https://svnweb.freebsd.org/changeset/base/336725

Log:
  Only build ipmi_linux on x86
  
  Somehow this wasn't triggered in my pre-commit build.

Modified:
  head/sys/modules/ipmi/Makefile

Modified: head/sys/modules/ipmi/Makefile
==
--- head/sys/modules/ipmi/Makefile  Wed Jul 25 18:58:57 2018
(r336724)
+++ head/sys/modules/ipmi/Makefile  Wed Jul 25 19:31:32 2018
(r336725)
@@ -1,7 +1,5 @@
 # $FreeBSD$
 
-SUBDIR+= ipmi_linux
-
 .PATH: ${SRCTOP}/sys/dev/ipmi
 
 # XXX - ipmi_smbus and ipmi_ssif depend on smbus
@@ -14,6 +12,9 @@ SRCS+=ipmi_kcs.c ipmi_smic.c ipmi_smbios.c ipmi_ssif.
 SRCS+= ipmi_acpi.c ipmi_isa.c ipmi_pci.c ipmi_smbus.c
 SRCS+= opt_acpi.h
 SRCS+= acpi_if.h isa_if.h pci_if.h smbus_if.h
+
+SUBDIR+= ipmi_linux
+
 .elif ${MACHINE_ARCH} == "powerpc64"
 SRCS+= ipmi_opal.c
 .endif
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"