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

2017-10-31 Thread Justin Hibbits
Author: jhibbits
Date: Wed Nov  1 03:54:07 2017
New Revision: 325262
URL: https://svnweb.freebsd.org/changeset/base/325262

Log:
  Enable a bunch more options in the QORIQ64 kernel
  
  This brings it closer to par with GENERIC64.  In the future I hope to have a
  GENERIC64-E and GENERIC-E kernels as Book-E analogues to the GENERIC64/GENERIC
  AIM kernels.

Modified:
  head/sys/powerpc/conf/QORIQ64

Modified: head/sys/powerpc/conf/QORIQ64
==
--- head/sys/powerpc/conf/QORIQ64   Wed Nov  1 03:26:53 2017
(r325261)
+++ head/sys/powerpc/conf/QORIQ64   Wed Nov  1 03:54:07 2017
(r325262)
@@ -16,11 +16,8 @@ makeoptions  DEBUG="-Wa,-me500 -g"
 makeoptionsWERROR="-Werror -Wno-format -Wno-redundant-decls"
 makeoptionsNO_MODULES=yes
 
-#options   EARLY_PRINTF
-
 optionsFPU_EMU
 
-optionsBOOTVERBOSE=1
 options_KPOSIX_PRIORITY_SCHEDULING
 optionsALT_BREAK_TO_DEBUGGER
 optionsBREAK_TO_DEBUGGER
@@ -36,15 +33,22 @@ options DEVICE_POLLING
 #options   DIAGNOSTIC
 optionsFDT
 #makeoptions   FDT_DTS_FILE=mpc8555cds.dts
-optionsFFS
+optionsFFS #Berkeley Fast Filesystem
+optionsSOFTUPDATES #Enable FFS soft updates support
+optionsUFS_ACL #Support for access control lists
+optionsUFS_DIRHASH #Improve performance on big directories
+optionsUFS_GJOURNAL#Enable gjournal-based UFS journaling
+optionsQUOTA   #Enable disk quotas for UFS
 optionsGDB
 optionsGEOM_PART_GPT
+optionsGEOM_LABEL  #Provides labelization
 optionsINET
 optionsINET6
 optionsTCP_HHOOK   # hhook(9) framework for TCP
 optionsINVARIANTS
 optionsINVARIANT_SUPPORT
 optionsKDB
+optionsKDB_TRACE   # Print a stack trace for a panic.
 optionsKTRACE
 optionsMD_ROOT
 optionsMPC85XX
@@ -52,18 +56,22 @@ options MSDOSFS
 optionsNFS_ROOT
 optionsNFSCL
 optionsNFSLOCKD
-optionsPRINTF_BUFR_SIZE=128# Prevent printf output being 
interspersed.
+optionsPRINTF_BUFR_SIZE=128# Prevent printf output being 
interspersed.
 optionsPROCFS
 optionsPSEUDOFS
 optionsSCHED_ULE
 optionsCAPABILITIES
 optionsCAPABILITY_MODE
 optionsSMP
+optionsSTACK   #stack(9) support
 optionsSYSVMSG
 optionsSYSVSEM
 optionsSYSVSHM
 optionsWITNESS
 optionsWITNESS_SKIPSPIN
+optionsHWPMC_HOOKS
+optionsKDTRACE_HOOKS   # Kernel DTrace hooks
+optionsDDB_CTF # Kernel ELF linker loads CTF data
 
 device ata
 device bpf
@@ -71,6 +79,7 @@ devicecfi
 device crypto
 device cryptodev
 device da
+device ds1307
 device ds1553
 device em
 device alc
@@ -95,6 +104,8 @@ device   scbus
 device scc
 device sdhci
 device sec
+device spibus
+device spigen
 device tun
 device uart
 optionsUSB_DEBUG   # enable debug msgs
___
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: r325261 - head/sys/amd64/vmm

2017-10-31 Thread Peter Grehan
Author: grehan
Date: Wed Nov  1 03:26:53 2017
New Revision: 325261
URL: https://svnweb.freebsd.org/changeset/base/325261

Log:
  Emulate the "OR reg, r/m" instruction (opcode 0BH).
  
  This is   needed for the HDA emulation with FreeBSD guests.
  
  Reviewed by:  marcelo
  MFC after:2 weeks
  Differential Revision:https://reviews.freebsd.org/D12832

Modified:
  head/sys/amd64/vmm/vmm_instruction_emul.c

Modified: head/sys/amd64/vmm/vmm_instruction_emul.c
==
--- head/sys/amd64/vmm/vmm_instruction_emul.c   Wed Nov  1 03:09:16 2017
(r325260)
+++ head/sys/amd64/vmm/vmm_instruction_emul.c   Wed Nov  1 03:26:53 2017
(r325261)
@@ -109,6 +109,10 @@ static const struct vie_op one_byte_opcodes[256] = {
.op_byte = 0x0F,
.op_type = VIE_OP_TYPE_TWO_BYTE
},
+   [0x0B] = {
+   .op_byte = 0x0B,
+   .op_type = VIE_OP_TYPE_OR,
+   },
[0x2B] = {
.op_byte = 0x2B,
.op_type = VIE_OP_TYPE_SUB,
@@ -992,12 +996,38 @@ emulate_or(void *vm, int vcpuid, uint64_t gpa, struct 
mem_region_read_t memread, mem_region_write_t memwrite, void *arg)
 {
int error, size;
-   uint64_t val1, result, rflags, rflags2;
+   enum vm_reg_name reg;
+   uint64_t result, rflags, rflags2, val1, val2;
 
size = vie->opsize;
error = EINVAL;
 
switch (vie->op.op_byte) {
+   case 0x0B:
+   /*
+* OR reg (ModRM:reg) and mem (ModRM:r/m) and store the
+* result in reg.
+*
+* 0b/r or r16, r/m16
+* 0b/r or r32, r/m32
+* REX.W + 0b/r or r64, r/m64
+*/
+
+   /* get the first operand */
+   reg = gpr_map[vie->reg];
+   error = vie_read_register(vm, vcpuid, reg, );
+   if (error)
+   break;
+   
+   /* get the second operand */
+   error = memread(vm, vcpuid, gpa, , size, arg);
+   if (error)
+   break;
+
+   /* perform the operation and write the result */
+   result = val1 | val2;
+   error = vie_update_register(vm, vcpuid, reg, result, size);
+   break;
case 0x81:
case 0x83:
/*
___
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: r325260 - in head/sys: contrib/ncsw/Peripherals/FM contrib/ncsw/etc powerpc/conf/dpaa

2017-10-31 Thread Justin Hibbits
Author: jhibbits
Date: Wed Nov  1 03:09:16 2017
New Revision: 325260
URL: https://svnweb.freebsd.org/changeset/base/325260

Log:
  Rename a couple files to not conflict with ZFS filenames
  
  Now a kernel can be built with both ZFS and DPAA compiled in.

Added:
  head/sys/contrib/ncsw/Peripherals/FM/fm_ncsw.c
 - copied unchanged from r325259, head/sys/contrib/ncsw/Peripherals/FM/fm.c
  head/sys/contrib/ncsw/etc/ncsw_list.c
 - copied unchanged from r325259, head/sys/contrib/ncsw/etc/list.c
Deleted:
  head/sys/contrib/ncsw/Peripherals/FM/fm.c
  head/sys/contrib/ncsw/etc/list.c
Modified:
  head/sys/powerpc/conf/dpaa/files.dpaa

Copied: head/sys/contrib/ncsw/Peripherals/FM/fm_ncsw.c (from r325259, 
head/sys/contrib/ncsw/Peripherals/FM/fm.c)
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/contrib/ncsw/Peripherals/FM/fm_ncsw.c  Wed Nov  1 03:09:16 
2017(r325260, copy of r325259, 
head/sys/contrib/ncsw/Peripherals/FM/fm.c)
@@ -0,0 +1,5213 @@
+/*
+ * Copyright 2008-2012 Freescale Semiconductor Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * Neither the name of Freescale Semiconductor nor the
+ *   names of its contributors may be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ *
+ * ALTERNATIVELY, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") as published by the Free Software
+ * Foundation, either version 2 of that License or (at your option) any
+ * later version.
+ *
+ * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``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 Freescale Semiconductor 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.
+ */
+
+
+/**
+ @File  fm.c
+
+ @Description   FM driver routines implementation.
+*//***/
+#include "std_ext.h"
+#include "error_ext.h"
+#include "xx_ext.h"
+#include "string_ext.h"
+#include "sprint_ext.h"
+#include "debug_ext.h"
+#include "fm_muram_ext.h"
+#include 
+
+#include "fm_common.h"
+#include "fm_ipc.h"
+#include "fm.h"
+#include "fsl_fman.h"
+
+
+//
+/*   static functions   */
+//
+
+static volatile bool blockingFlag = FALSE;
+static void IpcMsgCompletionCB(t_Handle   h_Fm,
+   uint8_t*p_Msg,
+   uint8_t*p_Reply,
+   uint32_t   replyLength,
+   t_Errorstatus)
+{
+
UNUSED(h_Fm);UNUSED(p_Msg);UNUSED(p_Reply);UNUSED(replyLength);UNUSED(status);
+blockingFlag = FALSE;
+}
+
+static void FreeInitResources(t_Fm *p_Fm)
+{
+if (p_Fm->camBaseAddr)
+   FM_MURAM_FreeMem(p_Fm->h_FmMuram, UINT_TO_PTR(p_Fm->camBaseAddr));
+if (p_Fm->fifoBaseAddr)
+   FM_MURAM_FreeMem(p_Fm->h_FmMuram, UINT_TO_PTR(p_Fm->fifoBaseAddr));
+if (p_Fm->resAddr)
+   FM_MURAM_FreeMem(p_Fm->h_FmMuram, UINT_TO_PTR(p_Fm->resAddr));
+}
+
+static bool IsFmanCtrlCodeLoaded(t_Fm *p_Fm)
+{
+t_FMIramRegs*p_Iram;
+
+ASSERT_COND(p_Fm);
+p_Iram = (t_FMIramRegs *)UINT_TO_PTR(p_Fm->baseAddr + FM_MM_IMEM);
+
+return (bool)!!(GET_UINT32(p_Iram->iready) & IRAM_READY);
+}
+
+static t_Error CheckFmParameters(t_Fm *p_Fm)
+{
+if (IsFmanCtrlCodeLoaded(p_Fm) && !p_Fm->resetOnInit)
+RETURN_ERROR(MAJOR, E_INVALID_VALUE, ("Old FMan CTRL code is loaded; 
FM must be reset!"));
+#if (DPAA_VERSION < 11)
+if (!p_Fm->p_FmDriverParam->dma_axi_dbg_num_of_beats ||
+(p_Fm->p_FmDriverParam->dma_axi_dbg_num_of_beats > 
DMA_MODE_MAX_AXI_DBG_NUM_OF_BEATS))
+

svn commit: r325259 - in head/sys/powerpc: include powerpc

2017-10-31 Thread Justin Hibbits
Author: jhibbits
Date: Wed Nov  1 02:54:48 2017
New Revision: 325259
URL: https://svnweb.freebsd.org/changeset/base/325259

Log:
  Add Guest State (GS) bit to MSR bits
  
  For completeness only.  It will be used by a hypervisor if/when one is 
written.
  While here, sort the MSR bits into the proper categories.

Modified:
  head/sys/powerpc/include/psl.h
  head/sys/powerpc/powerpc/genassym.c

Modified: head/sys/powerpc/include/psl.h
==
--- head/sys/powerpc/include/psl.h  Wed Nov  1 02:40:15 2017
(r325258)
+++ head/sys/powerpc/include/psl.h  Wed Nov  1 02:54:48 2017
(r325259)
@@ -45,15 +45,16 @@
 #definePSL_FP  0x2000UL/* floating point enable */
 #definePSL_ME  0x1000UL/* machine check enable */
 #definePSL_FE0 0x0800UL/* floating point interrupt 
mode 0 */
-#definePSL_BE  0x0200UL/* branch trace enable */
 #definePSL_FE1 0x0100UL/* floating point interrupt 
mode 1 */
 #definePSL_PMM 0x0004UL/* performance monitor mark */
+#definePSL_RI  0x0002UL/* recoverable interrupt */
 
 /* Machine State Register - Book-E cores */
 #ifdef __powerpc64__
 #definePSL_CM  0x8000UL/* Computation Mode (64-bit) */
 #endif
 
+#define PSL_GS 0x1000UL/* Guest state */
 #define PSL_UCLE   0x0400UL/* User mode cache lock enable */
 #define PSL_WE 0x0004UL/* Wait state enable */
 #define PSL_CE 0x0002UL/* Critical interrupt enable */
@@ -72,10 +73,10 @@
 #definePSL_POW 0x0004UL/* power management */
 #definePSL_ILE 0x0001UL/* interrupt endian mode (1 == 
le) */
 #definePSL_SE  0x0400UL/* single-step trace enable */
+#definePSL_BE  0x0200UL/* branch trace enable */
 #definePSL_IP  0x0040UL/* interrupt prefix - 601 only 
*/
 #definePSL_IR  0x0020UL/* instruction address 
relocation */
 #definePSL_DR  0x0010UL/* data address relocation */
-#definePSL_RI  0x0002UL/* recoverable interrupt */
 #definePSL_LE  0x0001UL/* endian mode (1 == le) */
 
 /*

Modified: head/sys/powerpc/powerpc/genassym.c
==
--- head/sys/powerpc/powerpc/genassym.c Wed Nov  1 02:40:15 2017
(r325258)
+++ head/sys/powerpc/powerpc/genassym.c Wed Nov  1 02:54:48 2017
(r325259)
@@ -225,6 +225,7 @@ ASSYM(MAXCOMLEN, MAXCOMLEN);
 #ifdef __powerpc64__
 ASSYM(PSL_CM, PSL_CM);
 #endif
+ASSYM(PSL_GS, PSL_GS);
 ASSYM(PSL_DE, PSL_DE);
 ASSYM(PSL_DS, PSL_DS);
 ASSYM(PSL_IS, PSL_IS);
___
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: r325258 - head/sys/powerpc/booke

2017-10-31 Thread Justin Hibbits
Author: jhibbits
Date: Wed Nov  1 02:40:15 2017
New Revision: 325258
URL: https://svnweb.freebsd.org/changeset/base/325258

Log:
  Fix debug interrupts on 64-bit Book-E
  
  Use a WORD_SIZE macro to define the correct offset to the second word
  needed.  This corrects the offset calculation in 64-bit builds.

Modified:
  head/sys/powerpc/booke/locore.S
  head/sys/powerpc/booke/trap_subr.S

Modified: head/sys/powerpc/booke/locore.S
==
--- head/sys/powerpc/booke/locore.S Wed Nov  1 01:22:33 2017
(r325257)
+++ head/sys/powerpc/booke/locore.S Wed Nov  1 02:40:15 2017
(r325258)
@@ -57,6 +57,7 @@
 #defineTHREAD_REG  %r13
 #defineADDR(x) \
.llong  x
+#defineWORD_SIZE   8
 #else
 #defineGET_TOCBASE(r)
 #defineTOC_RESTORE
@@ -72,6 +73,7 @@
 #defineTHREAD_REG  %r2
 #defineADDR(x) \
.long   x
+#defineWORD_SIZE   4
 #endif
 
.text

Modified: head/sys/powerpc/booke/trap_subr.S
==
--- head/sys/powerpc/booke/trap_subr.S  Wed Nov  1 01:22:33 2017
(r325257)
+++ head/sys/powerpc/booke/trap_subr.S  Wed Nov  1 02:40:15 2017
(r325258)
@@ -970,19 +970,14 @@ int_debug_int:
GET_CPUINFO(%r3)
LOAD%r3, (PC_BOOKE_CRITSAVE+CPUSAVE_SRR0)(%r3)
bl  0f
-#ifdef __powerpc64__
-   .llong  interrupt_vector_base-.
-   .llong  interrupt_vector_top-.
-#else
-   .long   interrupt_vector_base-.
-   .long   interrupt_vector_top-.
-#endif
+   ADDR(interrupt_vector_base-.)
+   ADDR(interrupt_vector_top-.)
 0: mflr%r5
LOAD%r4,0(%r5)  /* interrupt_vector_base in r4 */
add %r4,%r4,%r5
CMPLcr0, %r3, %r4
blt trap_common
-   LOAD%r4,4(%r5)  /* interrupt_vector_top in r4 */
+   LOAD%r4,WORD_SIZE(%r5)  /* interrupt_vector_top in r4 */
add %r4,%r4,%r5
addi%r4,%r4,4
CMPLcr0, %r3, %r4
___
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: r325257 - in head: . share/man/man7 usr.sbin/adduser

2017-10-31 Thread Eitan Adler
Author: eadler
Date: Wed Nov  1 01:22:33 2017
New Revision: 325257
URL: https://svnweb.freebsd.org/changeset/base/325257

Log:
  Remove 'adding_user.7'
  
  Not to be confused with adduser.
  Not to be confused with useful information.
  
  Differential Revision: https://reviews.freebsd.org/D12848

Deleted:
  head/share/man/man7/adding_user.7
Modified:
  head/ObsoleteFiles.inc
  head/share/man/man7/Makefile
  head/usr.sbin/adduser/adduser.8

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Wed Nov  1 01:03:44 2017(r325256)
+++ head/ObsoleteFiles.inc  Wed Nov  1 01:22:33 2017(r325257)
@@ -38,6 +38,8 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20171031: Removal of obsolete man files
+OLD_FILES+=usr/share/man/man7/adding_user.7.gz
 # 20171031: Disconnected libpathconv tests
 OLD_DIRS+=usr/tests/lib/libpathconv
 # 20171017: Removal of mbpool(9)

Modified: head/share/man/man7/Makefile
==
--- head/share/man/man7/MakefileWed Nov  1 01:03:44 2017
(r325256)
+++ head/share/man/man7/MakefileWed Nov  1 01:22:33 2017
(r325257)
@@ -6,8 +6,7 @@
 PACKAGE=runtime-manuals
 
 #MISSING: eqnchar.7 ms.7 term.7
-MAN=   adding_user.7 \
-   arch.7 \
+MAN=   arch.7 \
ascii.7 \
bsd.snmpmod.mk.7 \
build.7 \

Modified: head/usr.sbin/adduser/adduser.8
==
--- head/usr.sbin/adduser/adduser.8 Wed Nov  1 01:03:44 2017
(r325256)
+++ head/usr.sbin/adduser/adduser.8 Wed Nov  1 01:22:33 2017
(r325257)
@@ -436,7 +436,6 @@ logfile for
 .Xr login.conf 5 ,
 .Xr passwd 5 ,
 .Xr shells 5 ,
-.Xr adding_user 8 ,
 .Xr pw 8 ,
 .Xr pwd_mkdb 8 ,
 .Xr rmuser 8 ,
___
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: r325255 - in head: share/man/man4/man4.powerpc sys/dev/dpaa

2017-10-31 Thread Justin Hibbits
Author: jhibbits
Date: Wed Nov  1 00:46:48 2017
New Revision: 325255
URL: https://svnweb.freebsd.org/changeset/base/325255

Log:
  Remove a singleton in the DPAA driver, to allow multiple fman instances
  
  Some devices (P5040, P4080) have multiple frame managers in their DPAA
  subsystems.  This was prevented by use of a softc singleton in the DPAA
  driver.  Since if_dtsec(4) has moved to be a child of fman, it can access
  the fman device data via the parent object.

Modified:
  head/share/man/man4/man4.powerpc/dtsec.4
  head/sys/dev/dpaa/fman.c
  head/sys/dev/dpaa/fman.h
  head/sys/dev/dpaa/fman_mdio.c
  head/sys/dev/dpaa/if_dtsec.c

Modified: head/share/man/man4/man4.powerpc/dtsec.4
==
--- head/share/man/man4/man4.powerpc/dtsec.4Wed Nov  1 00:33:54 2017
(r325254)
+++ head/share/man/man4/man4.powerpc/dtsec.4Wed Nov  1 00:46:48 2017
(r325255)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 16, 2017
+.Dd October 31, 2017
 .Dt DTSEC 4
 .Os
 .Sh NAME
@@ -89,6 +89,14 @@ P2041, P3041
 .It
 P5010, P5020
 .El
+.Pp
+Additionally, the following devices are expected to work, but are untested:
+.Bl -bullet -compact
+.It
+P4080, P4040
+.It
+P5040
+.El
 .Sh SEE ALSO
 .Xr altq 4 ,
 .Xr arp 4 ,
@@ -96,13 +104,6 @@ P5010, P5020
 .Xr netintro 4 ,
 .Xr ng_ether 4 ,
 .Xr ifconfig 8
-.Sh BUGS
-The
-.Nm
-driver assumes that there is only one Frame Manager, and that dtsec0 controls
-the MDIO interface.  Though this is the case for the supported devices, other
-SoCs with the DPAA controller may not work correctly.  Particularly, the P5040
-and P4080 SoCs have two frame managers, which breaks this assumption.
 .Sh HISTORY
 The
 .Nm

Modified: head/sys/dev/dpaa/fman.c
==
--- head/sys/dev/dpaa/fman.cWed Nov  1 00:33:54 2017(r325254)
+++ head/sys/dev/dpaa/fman.cWed Nov  1 00:46:48 2017(r325255)
@@ -87,7 +87,6 @@ struct fman_config {
  */
 const uint32_t fman_firmware[] = FMAN_UC_IMG;
 const uint32_t fman_firmware_size = sizeof(fman_firmware);
-static struct fman_softc *fm_sc = NULL;
 
 int
 fman_activate_resource(device_t bus, device_t child, int type, int rid,
@@ -386,54 +385,36 @@ fman_error_callback(t_Handle app_handle, e_FmPortType 
  */
 
 int
-fman_get_handle(t_Handle *fmh)
+fman_get_handle(device_t dev, t_Handle *fmh)
 {
+   struct fman_softc *sc = device_get_softc(dev);
 
-   if (fm_sc == NULL)
-   return (ENOMEM);
+   *fmh = sc->fm_handle;
 
-   *fmh = fm_sc->fm_handle;
-
return (0);
 }
 
 int
-fman_get_muram_handle(t_Handle *muramh)
+fman_get_muram_handle(device_t dev, t_Handle *muramh)
 {
+   struct fman_softc *sc = device_get_softc(dev);
 
-   if (fm_sc == NULL)
-   return (ENOMEM);
+   *muramh = sc->muram_handle;
 
-   *muramh = fm_sc->muram_handle;
-
return (0);
 }
 
 int
-fman_get_bushandle(vm_offset_t *fm_base)
+fman_get_bushandle(device_t dev, vm_offset_t *fm_base)
 {
+   struct fman_softc *sc = device_get_softc(dev);
 
-   if (fm_sc == NULL)
-   return (ENOMEM);
+   *fm_base = rman_get_bushandle(sc->mem_res);
 
-   *fm_base = rman_get_bushandle(fm_sc->mem_res);
-
return (0);
 }
 
 int
-fman_get_dev(device_t *fm_dev)
-{
-
-   if (fm_sc == NULL)
-   return (ENOMEM);
-
-   *fm_dev = fm_sc->sc_base.dev;
-
-   return (0);
-}
-
-int
 fman_attach(device_t dev)
 {
struct fman_softc *sc;
@@ -443,7 +424,6 @@ fman_attach(device_t dev)
 
sc = device_get_softc(dev);
sc->sc_base.dev = dev;
-   fm_sc = sc;
 
/* Check if MallocSmart allocator is ready */
if (XX_MallocSmartInit() != E_OK) {

Modified: head/sys/dev/dpaa/fman.h
==
--- head/sys/dev/dpaa/fman.hWed Nov  1 00:33:54 2017(r325254)
+++ head/sys/dev/dpaa/fman.hWed Nov  1 00:46:48 2017(r325255)
@@ -72,9 +72,8 @@ int   fman_qman_channel_id(device_t, int);
 /** @} */
 
 uint32_t   fman_get_clock(struct fman_softc *sc);
-intfman_get_handle(t_Handle *fmh);
-intfman_get_muram_handle(t_Handle *muramh);
-intfman_get_bushandle(vm_offset_t *fm_base);
-intfman_get_dev(device_t *fmd);
+intfman_get_handle(device_t dev, t_Handle *fmh);
+intfman_get_muram_handle(device_t dev, t_Handle *muramh);
+intfman_get_bushandle(device_t dev, vm_offset_t *fm_base);
 
 #endif /* FMAN_H_ */

Modified: head/sys/dev/dpaa/fman_mdio.c
==
--- head/sys/dev/dpaa/fman_mdio.c   Wed Nov  1 00:33:54 2017
(r325254)
+++ head/sys/dev/dpaa/fman_mdio.c   Wed Nov  1 00:46:48 2017
(r325255)
@@ -130,7 +130,7 @@ pqmdio_fdt_attach(device_t dev)
 
sc = device_get_softc(dev);
 
-   

svn commit: r325254 - head/release/tools

2017-10-31 Thread Colin Percival
Author: cperciva
Date: Wed Nov  1 00:33:54 2017
New Revision: 325254
URL: https://svnweb.freebsd.org/changeset/base/325254

Log:
  Add the amazon-ssm-agent package to EC2 AMI builds.  This makes it
  immediately available on instances which are running without internet
  access (or which can't rely on firstboot_pkgs to install it for some
  other reason).
  
  Note that this agent is not enabled by default; to enable it, add
  amazon_ssm_agent_enable="YES" to /etc/rc.conf, e.g., by placing the lines
>>/etc/rc.conf
amazon_ssm_agent_enable="YES"
  into the EC2 user-data.  In addition to being enabled, the agent requires
  keys to be provided via IAM Roles; users are encouraged to be very careful
  in using this functionality due to the inherent vulnerability in the idea
  of providing credentials via a service accessible to any process which can
  open an HTTP connection.
  
  Requested by: Amazon
  No objection from:re@
  Relnotes: FreeBSD/EC2 AMIs now include the Amazon EC2 Systems Manager
(SSM) Agent.

Modified:
  head/release/tools/ec2.conf

Modified: head/release/tools/ec2.conf
==
--- head/release/tools/ec2.conf Tue Oct 31 23:48:57 2017(r325253)
+++ head/release/tools/ec2.conf Wed Nov  1 00:33:54 2017(r325254)
@@ -6,7 +6,7 @@
 # Packages to install into the image we're creating.  This is a deliberately
 # minimalist set, providing only the packages necessary to bootstrap further
 # package installation as specified via EC2 user-data.
-export VM_EXTRA_PACKAGES="ec2-scripts firstboot-freebsd-update firstboot-pkgs 
dual-dhclient"
+export VM_EXTRA_PACKAGES="ec2-scripts firstboot-freebsd-update firstboot-pkgs 
dual-dhclient amazon-ssm-agent"
 
 # Set to a list of third-party software to enable in rc.conf(5).
 export VM_RC_LIST="ec2_configinit ec2_fetchkey ec2_ephemeralswap 
ec2_loghostkey firstboot_freebsd_update firstboot_pkgs"
___
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: r325253 - head

2017-10-31 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 31 23:48:57 2017
New Revision: 325253
URL: https://svnweb.freebsd.org/changeset/base/325253

Log:
  xdev: Follow-up r325087: Need to build lib/clang before lld.
  
  LLD needs headers generated by the full libllvm.
  
  X-MFC-With:   r325087
  MFC after:2 weeks
  Sponsored by: Dell EMC Isilon

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Tue Oct 31 23:33:24 2017(r325252)
+++ head/Makefile.inc1  Tue Oct 31 23:48:57 2017(r325253)
@@ -2853,11 +2853,11 @@ _xb-build-tools: .PHONY
${CDBENV} ${MAKE} -f Makefile.inc1 ${NOFUN} build-tools
 
 XDEVDIRS= \
+${_clang_libs} \
 ${_lld} \
 ${_binutils} \
 ${_elftctools} \
 usr.bin/ar \
-${_clang_libs} \
 ${_clang} \
 ${_gcc}
 
___
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: r325252 - head/etc/devd

2017-10-31 Thread Andriy Voskoboinyk
Author: avos
Date: Tue Oct 31 23:33:24 2017
New Revision: 325252
URL: https://svnweb.freebsd.org/changeset/base/325252

Log:
  Regenerate etc/devd/usb.conf
  
  Reminded by:  hselasky

Modified:
  head/etc/devd/usb.conf

Modified: head/etc/devd/usb.conf
==
--- head/etc/devd/usb.conf  Tue Oct 31 23:17:17 2017(r325251)
+++ head/etc/devd/usb.conf  Tue Oct 31 23:33:24 2017(r325252)
@@ -1401,6 +1401,14 @@ nomatch 32 {
match "bus" "uhub[0-9]+";
match "mode" "host";
match "vendor" "0x067b";
+   match "product" "0x27a1";
+   action "kldload -n udbp";
+};
+
+nomatch 32 {
+   match "bus" "uhub[0-9]+";
+   match "mode" "host";
+   match "vendor" "0x067b";
match "product" "(0x331a|0xaaa0|0xaaa2)";
action "kldload -n uplcom";
 };
@@ -5313,7 +5321,7 @@ nomatch 32 {
match "bus" "uhub[0-9]+";
match "mode" "host";
match "vendor" "0x2357";
-   match "product" "(0x0101|0x0108|0x0109)";
+   match "product" "(0x0101|0x0108|0x0109|0x010d|0x010e)";
action "kldload -n if_rtwn_usb";
 };
 
@@ -5913,5 +5921,5 @@ nomatch 32 {
action "kldload -n umass";
 };
 
-# 2757 USB entries processed
+# 2760 USB entries processed
 
___
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: r325251 - head/sys/arm64/arm64

2017-10-31 Thread Andrew Turner
Author: andrew
Date: Tue Oct 31 23:17:17 2017
New Revision: 325251
URL: https://svnweb.freebsd.org/changeset/base/325251

Log:
  Allocate the ITS translation table with a 64k page alignment. This is the
  largest alignment the ITS can require.
  
  This fixes a bug with the ARM Architecture Envelope Model (AEM) where it
  only allows 64k pages so will fail to attach the ITS device when this table
  is not sufficiently aligned.
  
  Sponsored by: DARPA, AFRL

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

Modified: head/sys/arm64/arm64/gicv3_its.c
==
--- head/sys/arm64/arm64/gicv3_its.cTue Oct 31 22:12:14 2017
(r325250)
+++ head/sys/arm64/arm64/gicv3_its.cTue Oct 31 23:17:17 2017
(r325251)
@@ -457,7 +457,7 @@ gicv3_its_table_init(device_t dev, struct gicv3_its_so
/* Allocate the table */
table = (vm_offset_t)contigmalloc(npages * PAGE_SIZE,
M_GICV3_ITS, M_WAITOK | M_ZERO, 0, (1ul << 48) - 1,
-   PAGE_SIZE, 0);
+   PAGE_SIZE_64K, 0);
 
sc->sc_its_ptab[i].ptab_vaddr = table;
sc->sc_its_ptab[i].ptab_size = npages * PAGE_SIZE;
___
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: r325250 - head/sys/arm64/arm64

2017-10-31 Thread Andrew Turner
Author: andrew
Date: Tue Oct 31 22:12:14 2017
New Revision: 325250
URL: https://svnweb.freebsd.org/changeset/base/325250

Log:
  As with r325242 use mp_maxid when iterating over CPUs in the GICv3 driver.
  
  Sponsored by: DARPA, AFRL

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

Modified: head/sys/arm64/arm64/gic_v3.c
==
--- head/sys/arm64/arm64/gic_v3.c   Tue Oct 31 21:51:33 2017
(r325249)
+++ head/sys/arm64/arm64/gic_v3.c   Tue Oct 31 22:12:14 2017
(r325250)
@@ -343,7 +343,7 @@ gic_v3_detach(device_t dev)
for (rid = 0; rid < (sc->gic_redists.nregions + 1); rid++)
bus_release_resource(dev, SYS_RES_MEMORY, rid, 
sc->gic_res[rid]);
 
-   for (i = 0; i < mp_ncpus; i++)
+   for (i = 0; i <= mp_maxid; i++)
free(sc->gic_redists.pcpu[i], M_GIC_V3);
 
free(sc->gic_res, M_GIC_V3);
@@ -895,7 +895,7 @@ gic_v3_ipi_send(device_t dev, struct intr_irqsrc *isrc
val = 0;
 
/* Iterate through all CPUs in set */
-   for (i = 0; i < mp_ncpus; i++) {
+   for (i = 0; i <= mp_maxid; i++) {
/* Move to the next affinity group */
if (aff != GIC_AFFINITY(i)) {
/* Send the IPI */
@@ -1103,7 +1103,7 @@ gic_v3_redist_alloc(struct gic_v3_softc *sc)
u_int cpuid;
 
/* Allocate struct resource for all CPU's Re-Distributor registers */
-   for (cpuid = 0; cpuid < mp_ncpus; cpuid++)
+   for (cpuid = 0; cpuid <= mp_maxid; cpuid++)
if (CPU_ISSET(cpuid, _cpus) != 0)
sc->gic_redists.pcpu[cpuid] =
malloc(sizeof(*sc->gic_redists.pcpu[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: r325249 - head

2017-10-31 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 31 21:51:33 2017
New Revision: 325249
URL: https://svnweb.freebsd.org/changeset/base/325249

Log:
  kernel-toolchain: Fix improper build order after r325244.
  
  Due to removing some targets that the previous .ORDER: ${WMAKE_TGTS}
  set, it was no longer being respected; _build_tools was coming
  immediately.
  
  Pointyhat to: bdrewery
  X-MFC-with:   r325244
  MFC after:2 weeks
  Sponsored by: Dell EMC Isilon

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Tue Oct 31 20:29:31 2017(r325248)
+++ head/Makefile.inc1  Tue Oct 31 21:51:33 2017(r325249)
@@ -996,7 +996,11 @@ buildenv: .PHONY
 
 TOOLCHAIN_TGTS=${WMAKE_TGTS:Neverything:Nbuild${libcompat}}
 toolchain: ${TOOLCHAIN_TGTS} .PHONY
-kernel-toolchain: ${TOOLCHAIN_TGTS:N_obj:N_cleanobj:N_includes:N_libraries} 
.PHONY
+KERNEL_TOOLCHAIN_TGTS= 
${TOOLCHAIN_TGTS:N_obj:N_cleanobj:N_includes:N_libraries}
+.if make(kernel-toolchain)
+.ORDER: ${KERNEL_TOOLCHAIN_TGTS}
+.endif
+kernel-toolchain: ${KERNEL_TOOLCHAIN_TGTS} .PHONY
 
 #
 # installcheck
___
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: r325248 - head/sys/boot/common

2017-10-31 Thread Toomas Soome
Author: tsoome
Date: Tue Oct 31 20:29:31 2017
New Revision: 325248
URL: https://svnweb.freebsd.org/changeset/base/325248

Log:
  loader ptblread() is broken with >512B sectors
  
  The loader strategy() function is assuming 512B blocks, so we need to adjust
  ptblread() for other sector sizes.
  
  Reviewed by:  imp
  Differential Revision:https://reviews.freebsd.org/D12847

Modified:
  head/sys/boot/common/disk.c

Modified: head/sys/boot/common/disk.c
==
--- head/sys/boot/common/disk.c Tue Oct 31 19:52:30 2017(r325247)
+++ head/sys/boot/common/disk.c Tue Oct 31 20:29:31 2017(r325248)
@@ -89,6 +89,12 @@ ptblread(void *d, void *buf, size_t blocks, uint64_t o
od = (struct open_disk *)dev->d_opendata;
 
/*
+* The strategy function assumes the offset is in units of 512 byte
+* sectors. For larger sector sizes, we need to adjust the offset to
+* match the actual sector size.
+*/
+   offset *= (od->sectorsize / 512);
+   /*
 * As the GPT backup partition is located at the end of the disk,
 * to avoid reading past disk end, flag bcache not to use RA.
 */
___
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: r325247 - in head: . etc/mtree lib/libpathconv targets/pseudo/tests

2017-10-31 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 31 19:52:30 2017
New Revision: 325247
URL: https://svnweb.freebsd.org/changeset/base/325247

Log:
  Disconnect libpathconv tests since they require external perl and do not work 
with kyua.
  
  This reverts r325192 and is due to libpathconv being connected in r325186.
  
  Reported by:  ngie
  Sponsored by: Dell EMC Isilon

Modified:
  head/ObsoleteFiles.inc
  head/etc/mtree/BSD.tests.dist
  head/lib/libpathconv/Makefile
  head/targets/pseudo/tests/Makefile.depend

Modified: head/ObsoleteFiles.inc
==
--- head/ObsoleteFiles.inc  Tue Oct 31 19:26:07 2017(r325246)
+++ head/ObsoleteFiles.inc  Tue Oct 31 19:52:30 2017(r325247)
@@ -38,6 +38,8 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20171031: Disconnected libpathconv tests
+OLD_DIRS+=usr/tests/lib/libpathconv
 # 20171017: Removal of mbpool(9)
 OLD_FILES+=usr/include/sys/mbpool.h
 OLD_FILES+=usr/share/man/man9/mbpool.9.gz

Modified: head/etc/mtree/BSD.tests.dist
==
--- head/etc/mtree/BSD.tests.dist   Tue Oct 31 19:26:07 2017
(r325246)
+++ head/etc/mtree/BSD.tests.dist   Tue Oct 31 19:52:30 2017
(r325247)
@@ -358,8 +358,6 @@
 dlopen
 ..
 ..
-libpathconv
-..
 libutil
 ..
 libxo

Modified: head/lib/libpathconv/Makefile
==
--- head/lib/libpathconv/Makefile   Tue Oct 31 19:26:07 2017
(r325246)
+++ head/lib/libpathconv/Makefile   Tue Oct 31 19:52:30 2017
(r325247)
@@ -14,6 +14,6 @@ SRCS= abs2rel.c rel2abs.c
 #SYMBOL_MAPS=  ${.CURDIR}/Symbol.map
 
 HAS_TESTS=
-SUBDIR.${MK_TESTS}+= tests
+#SUBDIR.${MK_TESTS}+= tests
 
 .include 

Modified: head/targets/pseudo/tests/Makefile.depend
==
--- head/targets/pseudo/tests/Makefile.depend   Tue Oct 31 19:26:07 2017
(r325246)
+++ head/targets/pseudo/tests/Makefile.depend   Tue Oct 31 19:52:30 2017
(r325247)
@@ -170,7 +170,6 @@ DIRDEPS= \
   lib/libkvm/tests \
   lib/libmp/tests \
   lib/libnv/tests \
-  lib/libpathconv/tests \
   lib/libproc/tests \
   lib/librt/tests \
   lib/libsbuf/tests \
___
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: r325192 - head/etc/mtree

2017-10-31 Thread Bryan Drewery
On 10/31/2017 10:15 AM, Bryan Drewery wrote:
> On 10/31/2017 7:56 AM, Ngie Cooper wrote:
>>
>>> On Oct 30, 2017, at 18:43, Bryan Drewery  wrote:
>>>
>>> Author: bdrewery
>>> Date: Tue Oct 31 01:43:36 2017
>>> New Revision: 325192
>>> URL: https://svnweb.freebsd.org/changeset/base/325192
>>>
>>> Log:
>>>  Fix installworld/distrib-dirs for pathconv after r325186.
>>
>> *sigh*
>>
>> Julian never completed the tests. They’re breaking Jenkins since they’re now 
>> integrated into the build..
>>
>> Please test test commits next time (make obj depend all; sudo make check 
>> install).
>>
>> I’ll go fix them ;/..
>>
> 
> Hm I thought I had tested the runtime. I must have only tested another I
> reconnected or only half of it.
> 
> libc/tests/time is another disconnected one FYI.
> 

Yeah I failed to test this one.  The tests requires perl too, so I am
just going to disconnect them.

>>>  Sponsored by:Dell EMC Isilon
>>>
>>> Modified:
>>>  head/etc/mtree/BSD.tests.dist
>>>
>>> Modified: head/etc/mtree/BSD.tests.dist
>>> ==
>>> --- head/etc/mtree/BSD.tests.distTue Oct 31 00:26:42 2017(r325191)
>>> +++ head/etc/mtree/BSD.tests.distTue Oct 31 01:43:36 2017(r325192)
>>> @@ -358,6 +358,8 @@
>>> dlopen
>>> ..
>>> ..
>>> +libpathconv
>>> +..
>>> libutil
>>> ..
>>> libxo
>>>
> 
> 


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


svn commit: r325246 - head/tools/tools/build_option_survey

2017-10-31 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 31 19:26:07 2017
New Revision: 325246
URL: https://svnweb.freebsd.org/changeset/base/325246

Log:
  Use -j hw.ncpu for build/install.
  
  MFC after:2 weeks
  Sponsored by: Dell EMC Isilon

Modified:
  head/tools/tools/build_option_survey/option_survey.sh

Modified: head/tools/tools/build_option_survey/option_survey.sh
==
--- head/tools/tools/build_option_survey/option_survey.sh   Tue Oct 31 
19:03:35 2017(r325245)
+++ head/tools/tools/build_option_survey/option_survey.sh   Tue Oct 31 
19:26:07 2017(r325246)
@@ -13,6 +13,7 @@ ODIR=/usr/obj/`pwd`
 FDIR=${ODIR}/files
 MNT=${ODIR}/_.mnt
 RDIR=${ODIR}/_.result
+: ${MAKE_JOBS:="-j$(sysctl -n hw.ncpu)"}
 
 export ODIR MNT RDIR FDIR
 
@@ -26,7 +27,7 @@ bw ( ) (
if [ $a -ne 0 ] ; then
exit 1
fi
-   make -j 4 buildworld \
+   make ${MAKE_JOBS} buildworld \
SRCCONF=${ODIR}/src.conf __MAKE_CONF=/dev/null \
> ${FDIR}/_.bw 2>&1
a=$?
@@ -34,7 +35,7 @@ bw ( ) (
if [ $a -ne 0 ] ; then
exit 1
fi
-   make -j 4 buildkernel \
+   make ${MAKE_JOBS} buildkernel \
KERNCONF=GENERIC \
SRCCONF=${ODIR}/src.conf __MAKE_CONF=/dev/null \
> ${FDIR}/_.bk 2>&1
@@ -53,7 +54,7 @@ iw ( ) (
mount /dev/md${MDUNIT} ${MNT}
 
cd ../../..
-   make installworld \
+   make ${MAKE_JOBS} installworld \
SRCCONF=${ODIR}/src.conf __MAKE_CONF=/dev/null \
DESTDIR=${MNT} \
> ${FDIR}/_.iw 2>&1
@@ -73,7 +74,7 @@ iw ( ) (
exit 1
fi
cd ..
-   make installkernel \
+   make ${MAKE_JOBS} installkernel \
KERNCONF=GENERIC \
DESTDIR=${MNT} \
SRCCONF=${ODIR}/src.conf __MAKE_CONF=/dev/null \
___
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: r325245 - head/sys/net

2017-10-31 Thread Stephen Hurd
Author: shurd
Date: Tue Oct 31 19:03:35 2017
New Revision: 325245
URL: https://svnweb.freebsd.org/changeset/base/325245

Log:
  Preserve TSO checksum flags
  
  r323941 incorrectly disabled TSO flags based on MTU.
  
  Reported by:  Yuri Pankov 
  Reviewed by:  sbruno
  Approved by:  sbruno (mentor)
  Sponsored by: Limelight Networks
  Differential Revision:https://reviews.freebsd.org/D12880

Modified:
  head/sys/net/iflib.c

Modified: head/sys/net/iflib.c
==
--- head/sys/net/iflib.cTue Oct 31 19:02:14 2017(r325244)
+++ head/sys/net/iflib.cTue Oct 31 19:03:35 2017(r325245)
@@ -2718,10 +2718,6 @@ iflib_parse_header(iflib_txq_t txq, if_pkt_info_t pi, 
pi->ipi_ehdrlen = ETHER_HDR_LEN;
}
 
-   if (if_getmtu(txq->ift_ctx->ifc_ifp) >= pi->ipi_len) {
-   pi->ipi_csum_flags &= ~(CSUM_IP_TSO|CSUM_IP6_TSO);
-   }
-
switch (pi->ipi_etype) {
 #ifdef INET
case ETHERTYPE_IP:
___
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: r325244 - head

2017-10-31 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 31 19:02:14 2017
New Revision: 325244
URL: https://svnweb.freebsd.org/changeset/base/325244

Log:
  kernel-toolchain: Skip world _obj and _cleanobj phases.
  
  There's no good reason to treewalk the entire tree removing old OBJDIRS
  and creating new ones when 'includes', 'libraries', and 'everything' are
  all skipped.  The only shared directory in the existing toolchain target
  and world is build-tools.  So handle cleaning in it directly if needed
  only for the directories it wants to build.
  
  The extra _obj/_cleanobj walks came in the initial kernel-toolchain
  addition in r128189.
  
  MFC after:2 weeks
  Sponsored by: Dell EMC Isilon

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Tue Oct 31 19:02:05 2017(r325243)
+++ head/Makefile.inc1  Tue Oct 31 19:02:14 2017(r325244)
@@ -996,7 +996,7 @@ buildenv: .PHONY
 
 TOOLCHAIN_TGTS=${WMAKE_TGTS:Neverything:Nbuild${libcompat}}
 toolchain: ${TOOLCHAIN_TGTS} .PHONY
-kernel-toolchain: ${TOOLCHAIN_TGTS:N_includes:N_libraries} .PHONY
+kernel-toolchain: ${TOOLCHAIN_TGTS:N_obj:N_cleanobj:N_includes:N_libraries} 
.PHONY
 
 #
 # installcheck
@@ -1974,6 +1974,12 @@ _rescue=rescue/rescue
 _tcsh=bin/csh
 .endif
 
+# kernel-toolchain skips _cleanobj, so handle cleaning up previous
+# build-tools directories if needed.
+.if !defined(NO_CLEAN) && make(kernel-toolchain)
+_bt_clean= ${CLEANDIR}
+.endif
+
 .for _tool in \
 ${_tcsh} \
 bin/sh \
@@ -1989,8 +1995,9 @@ _tcsh=bin/csh
 usr.bin/vi/catalog \
 ${_gcc_tools}
 build-tools_${_tool}: .PHONY
-   ${_+_}@${ECHODIR} "===> ${_tool} (obj,build-tools)"; \
+   ${_+_}@${ECHODIR} "===> ${_tool} 
(${_bt_clean:D${_bt_clean},}obj,build-tools)"; \
cd ${.CURDIR}/${_tool}; \
+   if [ -n "${_bt_clean}" ]; then ${MAKE} DIRPRFX=${_tool}/ 
${_bt_clean}; fi; \
if [ -z "${NO_OBJ}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \
${MAKE} DIRPRFX=${_tool}/ build-tools
 build-tools: build-tools_${_tool}
___
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: r325243 - in head: . gnu/usr.bin/cc/cc_tools

2017-10-31 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 31 19:02:05 2017
New Revision: 325243
URL: https://svnweb.freebsd.org/changeset/base/325243

Log:
  build-tools: De-special-case the gcc tools build.
  
  It merely wanted to use 'all' rather than 'build-tools' so just
  add a build-tools target to the Makefile.
  
  MFC after:2 weeks
  Sponsored by: Dell EMC Isilon

Modified:
  head/Makefile.inc1
  head/gnu/usr.bin/cc/cc_tools/Makefile

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Tue Oct 31 18:22:21 2017(r325242)
+++ head/Makefile.inc1  Tue Oct 31 19:02:05 2017(r325243)
@@ -1986,21 +1986,13 @@ _tcsh=bin/csh
 lib/libmagic \
 usr.bin/mkesdb_static \
 usr.bin/mkcsmapper_static \
-usr.bin/vi/catalog
+usr.bin/vi/catalog \
+${_gcc_tools}
 build-tools_${_tool}: .PHONY
${_+_}@${ECHODIR} "===> ${_tool} (obj,build-tools)"; \
cd ${.CURDIR}/${_tool}; \
if [ -z "${NO_OBJ}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \
${MAKE} DIRPRFX=${_tool}/ build-tools
-build-tools: build-tools_${_tool}
-.endfor
-.for _tool in \
-${_gcc_tools}
-build-tools_${_tool}: .PHONY
-   ${_+_}@${ECHODIR} "===> ${_tool} (obj,all)"; \
-   cd ${.CURDIR}/${_tool}; \
-   if [ -z "${NO_OBJ}" ]; then ${MAKE} DIRPRFX=${_tool}/ obj; fi; \
-   ${MAKE} DIRPRFX=${_tool}/ all
 build-tools: build-tools_${_tool}
 .endfor
 

Modified: head/gnu/usr.bin/cc/cc_tools/Makefile
==
--- head/gnu/usr.bin/cc/cc_tools/Makefile   Tue Oct 31 18:22:21 2017
(r325242)
+++ head/gnu/usr.bin/cc/cc_tools/Makefile   Tue Oct 31 19:02:05 2017
(r325243)
@@ -391,6 +391,7 @@ GNTOOLS+=   genattr genattrtab genautomata gencodes genc
 
 ${GNTOOLS:C,$,.o,} ${GNTOOLS}: ${BUILD_TOOLS_META}
 all: ${GNTOOLS} ${GENSRCS} ${GENONLY}
+build-tools: all
 beforedepend: ${GENONLY}
 
 #
___
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: r325242 - head/sys/arm64/arm64

2017-10-31 Thread Andrew Turner
Author: andrew
Date: Tue Oct 31 18:22:21 2017
New Revision: 325242
URL: https://svnweb.freebsd.org/changeset/base/325242

Log:
  Use mp_maxid when iterating over CPUs as we may have sparse id allocations.
  
  Sponsored by: DARPA, AFRL

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

Modified: head/sys/arm64/arm64/gicv3_its.c
==
--- head/sys/arm64/arm64/gicv3_its.cTue Oct 31 17:50:42 2017
(r325241)
+++ head/sys/arm64/arm64/gicv3_its.cTue Oct 31 18:22:21 2017
(r325242)
@@ -557,7 +557,7 @@ gicv3_its_pendtables_init(struct gicv3_its_softc *sc)
 {
int i;
 
-   for (i = 0; i < mp_ncpus; i++) {
+   for (i = 0; i <= mp_maxid; i++) {
if (CPU_ISSET(i, >sc_cpus) == 0)
continue;
 
@@ -736,7 +736,7 @@ gicv3_its_attach(device_t dev)
gicv3_its_cmdq_init(sc);
 
/* Allocate the per-CPU collections */
-   for (int cpu = 0; cpu < mp_ncpus; cpu++)
+   for (int cpu = 0; cpu <= mp_maxid; cpu++)
if (CPU_ISSET(cpu, >sc_cpus) != 0)
sc->sc_its_cols[cpu] = malloc(
sizeof(*sc->sc_its_cols[0]), M_GICV3_ITS,
___
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: r325241 - head/sys/net

2017-10-31 Thread Stephen Hurd
Author: shurd
Date: Tue Oct 31 17:50:42 2017
New Revision: 325241
URL: https://svnweb.freebsd.org/changeset/base/325241

Log:
  Fix PR221990 - Assertion at iflib.c:1947
  
  ifl_pidx and ifl_credits are going out of sync in _iflib_fl_refill() as they
  use different update log.  Use the same update logic for both, and add a
  final call to isc_rxd_refill() to handle early exits from the loop.
  
  PR:   221990
  Reported by:  pho
  Reviewed by:  sbruno
  Approved by:  sbruno (mentor)
  Sponsored by: Limelight Networks
  Differential Revision:https://reviews.freebsd.org/D12798

Modified:
  head/sys/net/iflib.c

Modified: head/sys/net/iflib.c
==
--- head/sys/net/iflib.cTue Oct 31 17:16:46 2017(r325240)
+++ head/sys/net/iflib.cTue Oct 31 17:50:42 2017(r325241)
@@ -1818,20 +1818,22 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun
int n, i = 0;
uint64_t bus_addr;
int err;
+   qidx_t credits;
 
sd_m = fl->ifl_sds.ifsd_m;
sd_map = fl->ifl_sds.ifsd_map;
sd_cl = fl->ifl_sds.ifsd_cl;
sd_flags = fl->ifl_sds.ifsd_flags;
idx = pidx;
+   credits = fl->ifl_credits;
 
n  = count;
MPASS(n > 0);
-   MPASS(fl->ifl_credits + n <= fl->ifl_size);
+   MPASS(credits + n <= fl->ifl_size);
 
if (pidx < fl->ifl_cidx)
MPASS(pidx + n <= fl->ifl_cidx);
-   if (pidx == fl->ifl_cidx && (fl->ifl_credits < fl->ifl_size))
+   if (pidx == fl->ifl_cidx && (credits < fl->ifl_size))
MPASS(fl->ifl_gen == 0);
if (pidx > fl->ifl_cidx)
MPASS(n <= fl->ifl_size - pidx + fl->ifl_cidx);
@@ -1904,9 +1906,9 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun
fl->ifl_rxd_idxs[i] = frag_idx;
fl->ifl_bus_addrs[i] = bus_addr;
fl->ifl_vm_addrs[i] = cl;
-   fl->ifl_credits++;
+   credits++;
i++;
-   MPASS(fl->ifl_credits <= fl->ifl_size);
+   MPASS(credits <= fl->ifl_size);
if (++idx == fl->ifl_size) {
fl->ifl_gen = 1;
idx = 0;
@@ -1918,10 +1920,18 @@ _iflib_fl_refill(if_ctx_t ctx, iflib_fl_t fl, int coun
i = 0;
pidx = idx;
fl->ifl_pidx = idx;
+   fl->ifl_credits = credits;
}
 
}
 done:
+   if (i) {
+   iru.iru_pidx = pidx;
+   iru.iru_count = i;
+   ctx->isc_rxd_refill(ctx->ifc_softc, );
+   fl->ifl_pidx = idx;
+   fl->ifl_credits = credits;
+   }
DBG_COUNTER_INC(rxd_flush);
if (fl->ifl_pidx == 0)
pidx = fl->ifl_size - 1;
___
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: r325240 - head

2017-10-31 Thread Bryan Drewery
Author: bdrewery
Date: Tue Oct 31 17:16:46 2017
New Revision: 325240
URL: https://svnweb.freebsd.org/changeset/base/325240

Log:
  Follow-up r297998: Remove redundant TOOLS_PREFIX in XMAKE.
  
  Sponsored by: Dell EMC Isilon

Modified:
  head/Makefile.inc1

Modified: head/Makefile.inc1
==
--- head/Makefile.inc1  Tue Oct 31 16:31:23 2017(r325239)
+++ head/Makefile.inc1  Tue Oct 31 17:16:46 2017(r325240)
@@ -556,7 +556,8 @@ TMAKE=  MAKEOBJDIRPREFIX=${OBJTREE} \
MK_LLDB=no MK_TESTS=no
 
 # cross-tools stage
-XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \
+# TOOLS_PREFIX set in BMAKE
+XMAKE= ${BMAKE} \
TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
MK_GDB=no MK_LLD_IS_LD=${MK_LLD_BOOTSTRAP} MK_TESTS=no
 
___
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: r325192 - head/etc/mtree

2017-10-31 Thread Bryan Drewery
On 10/31/2017 7:56 AM, Ngie Cooper wrote:
> 
>> On Oct 30, 2017, at 18:43, Bryan Drewery  wrote:
>>
>> Author: bdrewery
>> Date: Tue Oct 31 01:43:36 2017
>> New Revision: 325192
>> URL: https://svnweb.freebsd.org/changeset/base/325192
>>
>> Log:
>>  Fix installworld/distrib-dirs for pathconv after r325186.
> 
> *sigh*
> 
> Julian never completed the tests. They’re breaking Jenkins since they’re now 
> integrated into the build..
> 
> Please test test commits next time (make obj depend all; sudo make check 
> install).
> 
> I’ll go fix them ;/..
> 

Hm I thought I had tested the runtime. I must have only tested another I
reconnected or only half of it.

libc/tests/time is another disconnected one FYI.

>>  Sponsored by:Dell EMC Isilon
>>
>> Modified:
>>  head/etc/mtree/BSD.tests.dist
>>
>> Modified: head/etc/mtree/BSD.tests.dist
>> ==
>> --- head/etc/mtree/BSD.tests.distTue Oct 31 00:26:42 2017(r325191)
>> +++ head/etc/mtree/BSD.tests.distTue Oct 31 01:43:36 2017(r325192)
>> @@ -358,6 +358,8 @@
>> dlopen
>> ..
>> ..
>> +libpathconv
>> +..
>> libutil
>> ..
>> libxo
>>


-- 
Regards,
Bryan Drewery



signature.asc
Description: OpenPGP digital signature


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

2017-10-31 Thread Ed Maste
On 27 October 2017 at 12:39, Michal Meloun  wrote:
>
> On 27.10.2017 18:23, Ed Maste wrote:
>> Author: emaste
>> Date: Fri Oct 27 16:23:45 2017
>> New Revision: 325042
>> URL: https://svnweb.freebsd.org/changeset/base/325042
>>
>> Log:
>>   libdtrace: replace "DOODAD" with more descriptive string
>>
> Imho, assert would be much more appropriate.

Perhaps, or I suspect we should just return an error. I'll take a look
at it later on.
___
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: r325092 - head/usr.bin/fortune/datfiles

2017-10-31 Thread Alexey Dokuchaev
On Tue, Oct 31, 2017 at 09:56:47AM -0500, Dan Mack wrote:
> Alexey Dokuchaev  writes:
> > ...
> > I find this separation useless and actually mitigating the good.  When
> > I want to scroll the history without any search I'd simply won't type
> > anything.  Binding prefix-search to ESC-p/ESC-n, not up-arrow/down-arrow
> > is beyond me.  Empty command line gives you plain iteratation, typing
> > anything limit iteratation over commands starting with typed prefix.
> 
> Maybe this disconnect is related to the fact that I never use the
> arrow keys. I used ctrl-n/p to cycle shell history down/up and put an
> esc in front if I am searching using history-search-backward/forward.

Okay, that explains it.  I've just tried your setup, it makes sense (not
that I would use it, but now I understand the reason behind ESC-p/ESC-n
better).  Thanks,

./danfe
___
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: r325092 - head/usr.bin/fortune/datfiles

2017-10-31 Thread Dan Mack
Alexey Dokuchaev  writes:

> On Mon, Oct 30, 2017 at 04:35:04PM -0500, Dan Mack wrote:
>> Definately different. Better? Maybe for some.  I most always search
>> command history by prefix and then just using multiple ESC-p invocations
>> to find the one command to edit/re-execute.  Less frequently I want to
>> search the whole text of history for the whole command line sequence
>> like bash Ctrl-R accomplishes.
>
> Agreed, search-by-prefix needed a lot more often than ^R one (search
> anywhere).  That's why it makes sense to bind it to the arrows.
>
>> >>> "\ep": history-search-backward
>> >>> "\en": history-search-forward
>> 
>> > Interesting that you mapped these to cursor-up/cursor-down.
>> >
>> > That may cause unexpected results.
>> 
>> > For example, typing something and then pressing up-arrow will cause
>> > the shell to give you the previous command that started with that
>> > rather than the previous command in-general.
>
> That's exactly what I want, to type vi and instantly get to the
> editing command (skipping all cd's and ls's I might've done in between).
>
>> It's ESC-p/ESC-n, not just plain up-arrow/down-arrow.  Up arrow still
>> does up without any search.  At least with my config using \ep as shown.
>> My up arrows work for me as expected - they just iterate forward and
>> backward through shell history.
>
> I find this separation useless and actually mitigating the good.  When
> I want to scroll the history without any search I'd simply won't type
> anything.  Binding prefix-search to ESC-p/ESC-n, not up-arrow/down-arrow
> is beyond me.  Empty command line gives you plain iteratation, typing
> anything limit iteratation over commands starting with typed prefix.

Maybe this disconnect is related to the fact that I never use the
arrow keys. I used ctrl-n/p to cycle shell history down/up and put an
esc in front if I am searching using history-search-backward/forward.

Dan

___
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: r325192 - head/etc/mtree

2017-10-31 Thread Ngie Cooper

> On Oct 30, 2017, at 18:43, Bryan Drewery  wrote:
> 
> Author: bdrewery
> Date: Tue Oct 31 01:43:36 2017
> New Revision: 325192
> URL: https://svnweb.freebsd.org/changeset/base/325192
> 
> Log:
>  Fix installworld/distrib-dirs for pathconv after r325186.

*sigh*

Julian never completed the tests. They’re breaking Jenkins since they’re now 
integrated into the build..

Please test test commits next time (make obj depend all; sudo make check 
install).

I’ll go fix them ;/..

>  Sponsored by:Dell EMC Isilon
> 
> Modified:
>  head/etc/mtree/BSD.tests.dist
> 
> Modified: head/etc/mtree/BSD.tests.dist
> ==
> --- head/etc/mtree/BSD.tests.distTue Oct 31 00:26:42 2017(r325191)
> +++ head/etc/mtree/BSD.tests.distTue Oct 31 01:43:36 2017(r325192)
> @@ -358,6 +358,8 @@
> dlopen
> ..
> ..
> +libpathconv
> +..
> libutil
> ..
> libxo
> 
___
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: r325092 - head/usr.bin/fortune/datfiles

2017-10-31 Thread Dan Mack
Devin Teske  writes:

>> On Oct 30, 2017, at 2:35 PM, Dan Mack  wrote:
>> 
>> Devin Teske  writes:
>> 
>>> Better in bash which allows you to filter not only on "begins with"
>>> but also "contains" (which is arguably more valuable than "begins
>>> with").
>> 
>> Definately different. Better?
>
> Typical session of editing exim acls on the mail server:
>
> 1. Log in via ssh to bash
> 2. Esc-P vi ENTER
> (pulls up "sudo vi /usr/local/etc/exim/acls/relay_domains")
> 3. ENTER
> 4. Make changes in vi, save, exit
> 5. Esc-P restart ENTER
> (pulls up "sudo service exim restart")
> 6. ENTER
>
> Ok, so if I was using tcsh, I cannot call this "better":
>
> 1. Log in via ssh to tcsh
> 2. sudo vi Esc-P
> (pulls up "sudo vi /usr/local/etc/exim/acls/relay_domains")
> 3. ENTER
> 4. Make changes in vi, save, exit
> 5. sudo service exim r Esc-P
> (pulls up "sudo service exim restart")
> 6. ENTER
>
> As you can see, being able to match on contents rather than begins-with saves 
> me valuable keystrokes and allows me to find history elements faster with 
> less effort.
>
> Take the example of using "service". Imagine:
>
> 1. Esc-P restart
> 2. Esc-P stop
> 3. Esc-P reloas
>
> Etc.
>
> Using the tcsh implementation you simply cannot navigate the history 
> sequentially like that.
>
> However... there is the fallback of history substitution to pluck elements in 
> tcsh which also works in bash:
>
> !?text?:p
>
> This will copy the most recent history element containing "text" onto the top 
> of the history.
>
> In bash you can turn on histverify (using shopt) which will allow you
> to use simply "!?text" (without quotes) to pull up the previous
> command containing "text". In tcsh and zsh -- which lack the
> histverify shell option -- the syntax "!?text" will still work but
> without the "?:p" modifier will execute the match right away.
>
> However, this cross-shell history substitution feature does not allow 
> matching on "begins-with", only "contains," and as-such is not as flexible as 
> bash's Esc-[PN] feature.
>
> Though, I admittedly use history expansion a lot too.

^^ i use '!$' constantly to pull up the last
argument to the previous command

Definately appreciate your perspective.  My lack of doing this the bash
way is really just a side effect of being an early tcsh user, bash not
being everywhere I needed it, habbit, and prefix thinking with respect
to searching command history.

Dan








___
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: r325236 - in head/sys: contrib/ena-com contrib/ena-com/ena_defs dev/ena

2017-10-31 Thread Marcin Wojtas
Author: mw
Date: Tue Oct 31 12:41:07 2017
New Revision: 325236
URL: https://svnweb.freebsd.org/changeset/base/325236

Log:
  Update ena-com HAL to v1.1.4.3 and update driver accordingly
  
  The newest ena-com HAL supports LLQv2 and introduces
  API changes. In order not to break the driver compilation
  it was updated/fixed in a following way:
  
  * Change version of the driver to 0.8.0
  * Provide reset cause when triggering reset of the device
  * Reset device after attach fails
  * In the reset task free management irq after calling ena_down. Admin
queue can still be used before ena_down is called, or when it is
being handled
  * Do not reset device if ena_reset_task fails
  * Move call of the ena_com_dev_reset to the ena_down() routine - it
should be called only if interface was up
  * Use different function for checking empty space on the sq ring
(ena-com API change)
  * Fix typo on ENA_TX_CLEANUP_THRESHOLD
  * Change checking for EPERM with EOPNOTSUPP - change in the ena-com API
  * Minor style fixes
  
  Submitted by: Michal Krawczyk 
  Obtained from: Amazon.com, Inc.
 Semihalf
  Sponsored by: Amazon.com, Inc.
  Differential Revision: https://reviews.freebsd.org/D12143

Added:
  head/sys/contrib/ena-com/ena_defs/
 - copied from r325234, vendor-sys/ena-com/dist/ena_defs/
Modified:
  head/sys/contrib/ena-com/ena_com.c
  head/sys/contrib/ena-com/ena_com.h
  head/sys/contrib/ena-com/ena_eth_com.c
  head/sys/contrib/ena-com/ena_eth_com.h
  head/sys/contrib/ena-com/ena_plat.h
  head/sys/dev/ena/ena.c
  head/sys/dev/ena/ena.h
  head/sys/dev/ena/ena_sysctl.c
Directory Properties:
  head/sys/contrib/ena-com/   (props changed)

Modified: head/sys/contrib/ena-com/ena_com.c
==
--- head/sys/contrib/ena-com/ena_com.c  Tue Oct 31 12:23:02 2017
(r325235)
+++ head/sys/contrib/ena-com/ena_com.c  Tue Oct 31 12:41:07 2017
(r325236)
@@ -45,6 +45,13 @@
 #define ENA_ASYNC_QUEUE_DEPTH 16
 #define ENA_ADMIN_QUEUE_DEPTH 32
 
+#ifdef ENA_EXTENDED_STATS
+
+#define ENA_HISTOGRAM_ACTIVE_MASK_OFFSET 0xF08
+#define ENA_EXTENDED_STAT_GET_FUNCT(_funct_queue) (_funct_queue & 0x)
+#define ENA_EXTENDED_STAT_GET_QUEUE(_funct_queue) (_funct_queue >> 16)
+
+#endif /* ENA_EXTENDED_STATS */
 #define MIN_ENA_VER (((ENA_COMMON_SPEC_VERSION_MAJOR) << \
ENA_REGS_VERSION_MAJOR_VERSION_SHIFT) \
| (ENA_COMMON_SPEC_VERSION_MINOR))
@@ -65,6 +72,10 @@
 
 #define ENA_MMIO_READ_TIMEOUT 0x
 
+#define ENA_COM_BOUNCE_BUFFER_CNTRL_CNT4
+
+#define ENA_REGS_ADMIN_INTR_MASK 1
+
 /*/
 /*/
 /*/
@@ -102,7 +113,7 @@ static inline int ena_com_mem_addr_set(struct ena_com_
}
 
ena_addr->mem_addr_low = (u32)addr;
-   ena_addr->mem_addr_high = (u64)addr >> 32;
+   ena_addr->mem_addr_high = (u16)((u64)addr >> 32);
 
return 0;
 }
@@ -238,12 +249,9 @@ static struct ena_comp_ctx *__ena_com_submit_admin_cmd
tail_masked = admin_queue->sq.tail & queue_size_mask;
 
/* In case of queue FULL */
-   cnt = admin_queue->sq.tail - admin_queue->sq.head;
+   cnt = ATOMIC32_READ(_queue->outstanding_cmds);
if (cnt >= admin_queue->q_depth) {
-   ena_trc_dbg("admin queue is FULL (tail %d head %d depth: %d)\n",
-   admin_queue->sq.tail,
-   admin_queue->sq.head,
-   admin_queue->q_depth);
+   ena_trc_dbg("admin queue is full.\n");
admin_queue->stats.out_of_space++;
return ERR_PTR(ENA_COM_NO_SPACE);
}
@@ -278,6 +286,7 @@ static struct ena_comp_ctx *__ena_com_submit_admin_cmd
if (unlikely((admin_queue->sq.tail & queue_size_mask) == 0))
admin_queue->sq.phase = !admin_queue->sq.phase;
 
+   ENA_DB_SYNC(_queue->sq.mem_handle);
ENA_REG_WRITE32(admin_queue->bus, admin_queue->sq.tail,
admin_queue->sq.db_addr);
 
@@ -362,21 +371,43 @@ static int ena_com_init_io_sq(struct ena_com_dev *ena_
   io_sq->desc_addr.phys_addr,
   io_sq->desc_addr.mem_handle);
}
-   } else {
+
+   if (!io_sq->desc_addr.virt_addr) {
+   ena_trc_err("memory allocation failed");
+   return ENA_COM_NO_MEM;
+   }
+   }
+
+   if (io_sq->mem_queue_type == ENA_ADMIN_PLACEMENT_POLICY_DEV) {
+   /* Allocate bounce buffers */
+   io_sq->bounce_buf_ctrl.buffer_size = 
ena_dev->llq_info.desc_list_entry_size;
+   io_sq->bounce_buf_ctrl.buffers_num 

svn commit: r325233 - in head/sys: conf dev/iicbus

2017-10-31 Thread Michael Zhilin
Author: mizhka
Date: Tue Oct 31 12:15:00 2017
New Revision: 325233
URL: https://svnweb.freebsd.org/changeset/base/325233

Log:
  [i2c/clock] add support for EPSON RTC-8583
  
  RTC-8583 is time-of-day clock used in some SOHO routers. This clock has
  only 2 bits for year values, but thanks to user SRAM it's possible to save
  year value and keep it up to date via driver code.
  
  Tested on Planex_MZK-W300NAG (SoC is RT2880)
  
  Submitted by: Hiroki Mori 
  Differential Revision:https://reviews.freebsd.org/D12833

Added:
  head/sys/dev/iicbus/rtc8583.c   (contents, props changed)
Modified:
  head/sys/conf/files

Modified: head/sys/conf/files
==
--- head/sys/conf/files Tue Oct 31 11:51:34 2017(r325232)
+++ head/sys/conf/files Tue Oct 31 12:15:00 2017(r325233)
@@ -1789,6 +1789,7 @@ dev/iicbus/ds1307.c   optional ds1307
 dev/iicbus/ds13rtc.c   optional ds13rtc | ds133x | ds1374
 dev/iicbus/ds1672.coptional ds1672
 dev/iicbus/ds3231.coptional ds3231
+dev/iicbus/rtc8583.c   optional rtc8583
 dev/iicbus/icee.c  optional icee
 dev/iicbus/if_ic.c optional ic
 dev/iicbus/iic.c   optional iic

Added: head/sys/dev/iicbus/rtc8583.c
==
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/sys/dev/iicbus/rtc8583.c   Tue Oct 31 12:15:00 2017
(r325233)
@@ -0,0 +1,295 @@
+/*-
+ * Copyright (c) 2017 Hiroki Mori.  All rights reserved.
+ * Copyright (c) 2017 Ian Lepore.  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.
+ *
+ * This code base on isl12xx.c
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+/*
+ * Driver for realtime clock EPSON RTC-8583
+ */
+
+#include "opt_platform.h"
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#ifdef FDT
+#include 
+#include 
+#endif
+
+#include 
+#include 
+
+#include "clock_if.h"
+#include "iicbus_if.h"
+
+#defineRTC8583_SC_REG  0x01/* RTC Seconds */
+#define RTC8583_USERSRAM_REG   0x10/* User SRAM register (first) */
+#defineMAX_TRANSFER16
+
+/*
+ * A struct laid out in the same order as the time registers in the chip.
+ */
+struct time_regs {
+   uint8_t msec, sec, min, hour, day, month;
+};
+
+struct rtc8583_softc {
+   device_tdev;
+   device_tbusdev;
+   struct intr_config_hook 
+   init_hook;
+};
+
+#ifdef FDT
+static struct ofw_compat_data compat_data[] = {
+   {"epson,rtc8583", 1},
+   {NULL,   0},
+};
+#endif
+
+static voidrtc8583_init(void *arg);
+static int rtc8583_probe(device_t dev);
+static int rtc8583_attach(device_t dev);
+static int rtc8583_detach(device_t dev);
+
+static int rtc8583_gettime(device_t dev, struct timespec *ts);
+static int rtc8583_settime(device_t dev, struct timespec *ts);
+
+static int rtc8583_writeto(device_t slavedev, uint8_t regaddr, 
+   void *buffer, uint16_t buflen, int waithow);
+
+/* Implementation */
+
+static int 
+rtc8583_writeto(device_t slavedev, uint8_t regaddr, void *buffer,
+uint16_t buflen, int waithow)
+{
+   struct iic_msg  msgs;
+   uint8_t slaveaddr;
+   uint8_t newbuf[MAX_TRANSFER];
+
+   slaveaddr = iicbus_get_addr(slavedev);
+
+   newbuf[0] = regaddr;
+   memcpy(newbuf + 1, buffer, buflen);
+   msgs.slave = slaveaddr;
+   msgs.flags = IIC_M_WR;
+   msgs.len   = 1 + buflen;
+   msgs.buf   = newbuf;
+
+   return 

svn commit: r325232 - in head/sys: amd64/amd64 i386/i386

2017-10-31 Thread Tijl Coosemans
Author: tijl
Date: Tue Oct 31 11:51:34 2017
New Revision: 325232
URL: https://svnweb.freebsd.org/changeset/base/325232

Log:
  Set the return address for stack entry points to zero.
  
  Stack unwinders treat zero as a stop condition.  The value on the stack can
  be non-zero because thread stacks may be arbitrary memory provided via
  pthread_attr_setstack(3) or may be recycled from previous threads.
  
  Reference:
  https://lists.freebsd.org/pipermail/freebsd-current/2017-August/066855.html
  https://lists.freebsd.org/pipermail/freebsd-current/2017-October/067254.html
  
  Discussed with:   kib
  MFC after:1 week

Modified:
  head/sys/amd64/amd64/vm_machdep.c
  head/sys/i386/i386/vm_machdep.c

Modified: head/sys/amd64/amd64/vm_machdep.c
==
--- head/sys/amd64/amd64/vm_machdep.c   Tue Oct 31 11:29:16 2017
(r325231)
+++ head/sys/amd64/amd64/vm_machdep.c   Tue Oct 31 11:51:34 2017
(r325232)
@@ -508,6 +508,9 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *
   (((uintptr_t)stack->ss_sp + stack->ss_size - 4) & ~0x0f) - 4;
td->td_frame->tf_rip = (uintptr_t)entry;
 
+   /* Return address sentinel value to stop stack unwinding. */
+   suword32((void *)td->td_frame->tf_rsp, 0);
+
/* Pass the argument to the entry point. */
suword32((void *)(td->td_frame->tf_rsp + sizeof(int32_t)),
(uint32_t)(uintptr_t)arg);
@@ -530,6 +533,9 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *
td->td_frame->tf_fs = _ufssel;
td->td_frame->tf_gs = _ugssel;
td->td_frame->tf_flags = TF_HASSEGS;
+
+   /* Return address sentinel value to stop stack unwinding. */
+   suword((void *)td->td_frame->tf_rsp, 0);
 
/* Pass the argument to the entry point. */
td->td_frame->tf_rdi = (register_t)arg;

Modified: head/sys/i386/i386/vm_machdep.c
==
--- head/sys/i386/i386/vm_machdep.c Tue Oct 31 11:29:16 2017
(r325231)
+++ head/sys/i386/i386/vm_machdep.c Tue Oct 31 11:51:34 2017
(r325232)
@@ -524,6 +524,9 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *
(((int)stack->ss_sp + stack->ss_size - 4) & ~0x0f) - 4;
td->td_frame->tf_eip = (int)entry;
 
+   /* Return address sentinel value to stop stack unwinding. */
+   suword((void *)td->td_frame->tf_esp, 0);
+
/* Pass the argument to the entry point. */
suword((void *)(td->td_frame->tf_esp + sizeof(void *)),
(int)arg);
___
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: r325231 - head/sys/mips/mediatek

2017-10-31 Thread Michael Zhilin
Author: mizhka
Date: Tue Oct 31 11:29:16 2017
New Revision: 325231
URL: https://svnweb.freebsd.org/changeset/base/325231

Log:
  [mips] Pin control configuration for MediaTek RT2880
  
  RT2880 is MIPS4Kc SoC used in many SOHO routers. This commits adds GPIO pin
  control configuration of RT2880.
  
  Submitted by: Hiroki Mori 
  Reviewed by:  mizhka, sgalabov
  Differential Revision:https://reviews.freebsd.org/D12648

Modified:
  head/sys/mips/mediatek/mtk_pinctrl.c
  head/sys/mips/mediatek/mtk_pinctrl.h

Modified: head/sys/mips/mediatek/mtk_pinctrl.c
==
--- head/sys/mips/mediatek/mtk_pinctrl.cTue Oct 31 11:09:39 2017
(r325230)
+++ head/sys/mips/mediatek/mtk_pinctrl.cTue Oct 31 11:29:16 2017
(r325231)
@@ -169,6 +169,9 @@ mtk_pinctrl_configure(device_t dev, phandle_t cfgxref)
socid = mtk_soc_get_socid();
 
switch (socid) {
+   case MTK_SOC_RT2880:
+   pintable = rt2880_pintable;
+   break;
case MTK_SOC_RT3050: /* fallthrough */
case MTK_SOC_RT3052:
case MTK_SOC_RT3350:

Modified: head/sys/mips/mediatek/mtk_pinctrl.h
==
--- head/sys/mips/mediatek/mtk_pinctrl.hTue Oct 31 11:09:39 2017
(r325230)
+++ head/sys/mips/mediatek/mtk_pinctrl.hTue Oct 31 11:29:16 2017
(r325231)
@@ -118,6 +118,14 @@ DECL_FUNC(gex_func) = {
FUNC("ge1", 0), FUNC("ge2", 0), FUNC("gpio", 1)
 };
 
+DECL_FUNC(rt2880_uartf_func) = {
+   FUNC("uartf", 0), FUNC("gpio", 1)
+};
+
+DECL_FUNC(rt2880_pci_func) = {
+   FUNC("pci", 0), FUNC("gpio", 1)
+};
+
 DECL_FUNC(rt3883_pci_func) = {
FUNC("pci-dev", 0), FUNC("pci-host2", 1), FUNC("pci-host1", 2),
FUNC("pci-fnc", 3), FUNC("gpio", 7)
@@ -295,6 +303,18 @@ DECL_TABLE(mt7620_pintable) = {
GROUP("nd_sd", SYSCTL_GPIOMODE, 18, 3, nd_sd_func),
GROUP("pa", SYSCTL_GPIOMODE, 20, 1, pa_func),
GROUP("wdt", SYSCTL_GPIOMODE, 21, 3, wdt_func),
+   GROUP_END
+};
+
+DECL_TABLE(rt2880_pintable) = {
+   GROUP("i2c", SYSCTL_GPIOMODE, 0, 1, i2c_func),
+   GROUP("uartf", SYSCTL_GPIOMODE, 1, 1, rt2880_uartf_func),
+   GROUP("spi", SYSCTL_GPIOMODE, 2, 1, spi_func),
+   GROUP("uartlite", SYSCTL_GPIOMODE, 3, 1, uartlite_func),
+   GROUP("jtag", SYSCTL_GPIOMODE, 4, 1, jtag_func),
+   GROUP("mdio", SYSCTL_GPIOMODE, 5, 1, mdio_func),
+   GROUP("sdram", SYSCTL_GPIOMODE, 6, 1, sdram_func),
+   GROUP("pci", SYSCTL_GPIOMODE, 7, 1, rt2880_pci_func),
GROUP_END
 };
 
___
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: r325092 - head/usr.bin/fortune/datfiles

2017-10-31 Thread Konstantin Belousov
On Tue, Oct 31, 2017 at 09:56:15AM +0100, Baptiste Daroussin wrote:
> On Mon, Oct 30, 2017 at 10:33:20AM -0700, Eitan Adler wrote:
> > On 30 October 2017 at 08:15, Baptiste Daroussin  wrote:
> > >>
> > >>   - Prefer UTF-8 over ISO-8859-1
> > >>   - Remove some references to printing man pages
> > >
> > > Why? it was still valid.
> > 
> > (a) Virtually no one needs this anymore
> 
> Subjective but let's say maybe
> 
> > (b) it uses non-CUPS utilities, which while they still work are non-modern.
> 
> cups do provide lpr as well, so it works both with cups and lpr from base and 
> as
> for the non modern part I would have said different as cups is different from
> lpr, but lpr is still working fine and wildly used (I do use both).
> 
> Never the less, the tips is still very valid, and useful in a sense that it
> allows people to learn about tools lot of people have forgotten about. col(1)
> for instance which is still very useful. when I see how lots of people are
> reinventing col(1) all the time in sed,awk,python,etc... I think having tips
> that tell them col(1) and other utilities do exist is a good idea.

I think that some advise how to print man pages would be useful, but
definitely not the advise which was removed.  Printing tty rendering
of the troff source would give very poor quality of the hard copy.

The recipe should print the postscript rendering, which gives the proper
exposure of the markup and makes the printing document much more satisfying
appearance.
___
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: r325228 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2017-10-31 Thread Andriy Gapon
Author: avg
Date: Tue Oct 31 10:15:03 2017
New Revision: 325228
URL: https://svnweb.freebsd.org/changeset/base/325228

Log:
  vdev_geom_close: close errored consumer even if vdev_reopening is set
  
  If vdev_geom_close doesn't close the consumer, then the subsequent call
  to vdev_geom_open() would be just a NOP and would always return success.
  Thus, at present vdev_reopen() would always succeed for vdev_geom devices
  even if the underlying provider is in error state.
  The problem was introduced as a result of an optimization in rS308055.
  
  The most significant manifistation of the problem is that
  zio_vdev_io_done() --> vdev_probe() --> SPA_ASYNC_PROBE -->
  spa_async_probe() --> vdev_reopen()
  chain of calls and events becomes a NOP as well.
  This chain is invoked when zio_vdev_io_done() detects an "unexpected"
  error from the lower level I/O.
  Additionally, that call path may race with SPA_ASYNC_REMOVE path because
  of the asynchronous nature of them both.  So, the SPA_ASYNC_PROBE may
  erroneously mark a vdev as being healthy after SPA_ASYNC_REMOVE marked
  it as removed.
  
  Reviewed by:  asomers, mav
  MFC after:2 weeks
  Differential Revision: https://reviews.freebsd.org/D12731

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

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
==
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Tue Oct 
31 10:10:13 2017(r325227)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Tue Oct 
31 10:15:03 2017(r325228)
@@ -934,13 +934,18 @@ skip_open:
 static void
 vdev_geom_close(vdev_t *vd)
 {
+   struct g_consumer *cp;
 
-   if (vd->vdev_reopening)
-   return;
+   cp = vd->vdev_tsd;
 
DROP_GIANT();
g_topology_lock();
-   vdev_geom_close_locked(vd);
+
+   if (!vd->vdev_reopening ||
+   (cp != NULL && ((cp->flags & G_CF_ORPHAN) != 0 ||
+   (cp->provider != NULL && cp->provider->error != 0
+   vdev_geom_close_locked(vd);
+
g_topology_unlock();
PICKUP_GIANT();
 }
___
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: r325227 - head/sys/geom

2017-10-31 Thread Andriy Gapon
Author: avg
Date: Tue Oct 31 10:10:13 2017
New Revision: 325227
URL: https://svnweb.freebsd.org/changeset/base/325227

Log:
  geom_slice: do not destroy softc until providers are gone
  
  At present, g_slice_orphan and g_slice_spoiled destroy the softc
  (struct g_slicer) even before calling g_wither_geom, so there can
  be active and incoming io requests at that time and g_slice_start
  can access the softc.
  
  This commit changes the code to destroy the softc only after all
  providers are closed.
  
  While there, a couple of small cleanups.
  
  Reported by:  Ben RUBSON 
  Tested by:Ben RUBSON 
  Reviewed by:  mav, smh (earlier version)
  MFC after:2 weeks
  Sponsored by: Panzura
  Differential Revision: https://reviews.freebsd.org/D12809

Modified:
  head/sys/geom/geom_slice.c

Modified: head/sys/geom/geom_slice.c
==
--- head/sys/geom/geom_slice.c  Tue Oct 31 09:58:51 2017(r325226)
+++ head/sys/geom/geom_slice.c  Tue Oct 31 10:10:13 2017(r325227)
@@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -127,6 +126,15 @@ g_slice_access(struct g_provider *pp, int dr, int dw, 
if ((cp->acr + dr) == 0 && (cp->acw + dw) == 0 && (cp->ace + de) == 1)
de--;
error = g_access(cp, dr, dw, de);
+
+   /*
+* Free the softc if all providers have been closed and this geom
+* is being removed.
+*/
+   if (error == 0 && (gp->flags & G_GEOM_WITHER) != 0 &&
+   (cp->acr + cp->acw + cp->ace) == 0)
+   g_slice_free(gsp);
+
return (error);
 }
 
@@ -470,21 +478,32 @@ g_slice_conf_hot(struct g_geom *gp, u_int idx, off_t o
 }
 
 void
-g_slice_spoiled(struct g_consumer *cp)
+g_slice_orphan(struct g_consumer *cp)
 {
struct g_geom *gp;
-   struct g_slicer *gsp;
 
g_topology_assert();
gp = cp->geom;
-   g_trace(G_T_TOPOLOGY, "g_slice_spoiled(%p/%s)", cp, gp->name);
-   cp->flags |= G_CF_ORPHAN;
-   gsp = gp->softc;
-   gp->softc = NULL;
-   g_slice_free(gsp);
+   g_trace(G_T_TOPOLOGY, "%s(%p/%s)", __func__, cp, gp->name);
g_wither_geom(gp, ENXIO);
+
+   /*
+* We can safely free the softc now if there are no accesses,
+* otherwise g_slice_access() will do that after the last close.
+*/
+   if ((cp->acr + cp->acw + cp->ace) == 0)
+   g_slice_free(gp->softc);
 }
 
+void
+g_slice_spoiled(struct g_consumer *cp)
+{
+
+   g_trace(G_T_TOPOLOGY, "%s(%p/%s)", __func__, cp, cp->geom->name);
+   cp->flags |= G_CF_ORPHAN;
+   g_slice_orphan(cp);
+}
+
 int
 g_slice_destroy_geom(struct gctl_req *req, struct g_class *mp, struct g_geom 
*gp)
 {
@@ -507,10 +526,10 @@ g_slice_new(struct g_class *mp, u_int slices, struct g
gp = g_new_geomf(mp, "%s", pp->name);
gsp = g_slice_alloc(slices, extra);
gsp->start = start;
-   gp->access = g_slice_access;
-   gp->orphan = g_slice_orphan;
gp->softc = gsp;
gp->start = g_slice_start;
+   gp->access = g_slice_access;
+   gp->orphan = g_slice_orphan;
gp->spoiled = g_slice_spoiled;
if (gp->dumpconf == NULL)
gp->dumpconf = g_slice_dumpconf;
@@ -529,19 +548,4 @@ g_slice_new(struct g_class *mp, u_int slices, struct g
*vp = gsp->softc;
*cpp = cp;
return (gp);
-}
-
-void
-g_slice_orphan(struct g_consumer *cp)
-{
-   struct g_slicer *gsp;
-
-   g_trace(G_T_TOPOLOGY, "g_slice_orphan(%p/%s)", cp, cp->provider->name);
-   g_topology_assert();
-
-   /* XXX: Not good enough we leak the softc and its suballocations */
-   gsp = cp->geom->softc;
-   cp->geom->softc = NULL;
-   g_slice_free(gsp);
-   g_wither_geom(cp->geom, ENXIO);
 }
___
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: r325208 - head/lib/libcasper/services/cap_grp

2017-10-31 Thread Mariusz Zaborski
Thanks for fixing that!

On 31 October 2017 at 05:02, Ngie Cooper  wrote:
> Author: ngie
> Date: Tue Oct 31 04:02:50 2017
> New Revision: 325208
> URL: https://svnweb.freebsd.org/changeset/base/325208
>
> Log:
>   Add `static` to `cap_setgrent` prototype in !WITH_CASPER case
>
>   This unbreaks the default powerpc/sparc64 build configuration after r325062.
>
> Modified:
>   head/lib/libcasper/services/cap_grp/cap_grp.h
>
> Modified: head/lib/libcasper/services/cap_grp/cap_grp.h
> ==
> --- head/lib/libcasper/services/cap_grp/cap_grp.h   Tue Oct 31 03:47:22 
> 2017(r325207)
> +++ head/lib/libcasper/services/cap_grp/cap_grp.h   Tue Oct 31 04:02:50 
> 2017(r325208)
> @@ -65,7 +65,7 @@ int cap_grp_limit_groups(cap_channel_t *chan, const ch
>
>  #definecap_setgroupent(chan, stayopen) etgroupent(stayopen)
>  #define endgrent(chan) endgrent()
> -inline int
> +static inline int
>  cap_setgrent(cap_channel_t *chan __unused)
>  {
>
> ___
> 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-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: r325092 - head/usr.bin/fortune/datfiles

2017-10-31 Thread Baptiste Daroussin
On Mon, Oct 30, 2017 at 10:33:20AM -0700, Eitan Adler wrote:
> On 30 October 2017 at 08:15, Baptiste Daroussin  wrote:
> >>
> >>   - Prefer UTF-8 over ISO-8859-1
> >>   - Remove some references to printing man pages
> >
> > Why? it was still valid.
> 
> (a) Virtually no one needs this anymore

Subjective but let's say maybe

> (b) it uses non-CUPS utilities, which while they still work are non-modern.

cups do provide lpr as well, so it works both with cups and lpr from base and as
for the non modern part I would have said different as cups is different from
lpr, but lpr is still working fine and wildly used (I do use both).

Never the less, the tips is still very valid, and useful in a sense that it
allows people to learn about tools lot of people have forgotten about. col(1)
for instance which is still very useful. when I see how lots of people are
reinventing col(1) all the time in sed,awk,python,etc... I think having tips
that tell them col(1) and other utilities do exist is a good idea.

Bapt


signature.asc
Description: PGP signature


svn commit: r325220 - head/share/misc

2017-10-31 Thread Yuri Victorovich
Author: yuri (ports committer)
Date: Tue Oct 31 07:47:57 2017
New Revision: 325220
URL: https://svnweb.freebsd.org/changeset/base/325220

Log:
  Add myself as a new committer
  
  Reviewed by:  tcberner
  Approved by:  tcberner (mentor)
  Differential Revision:https://reviews.freebsd.org/D12845

Modified:
  head/share/misc/committers-ports.dot

Modified: head/share/misc/committers-ports.dot
==
--- head/share/misc/committers-ports.dotTue Oct 31 07:16:18 2017
(r325219)
+++ head/share/misc/committers-ports.dotTue Oct 31 07:47:57 2017
(r325220)
@@ -254,6 +254,7 @@ woodsb02 [label="Ben Woods\nwoods...@freebsd.org\n2016
 wxs [label="Wesley Shields\n...@freebsd.org\n2008/01/03"]
 xmj [label="Johannes Jost Meixner\n...@freebsd.org\n2014/04/07"]
 xride [label="Soeren Straarup\nxr...@freebsd.org\n2006/09/27"]
+yuri [label="Yuri Victorovich\ny...@freebsd.org\n2017/10/30"]
 yzlin [label="Yi-Jheng Lin\nyz...@freebsd.org\n2009/07/19"]
 zeising [label="Niclas Zeising\nzeis...@freebsd.org\n2012/07/03"]
 zi [label="Ryan Steinmetz\n...@freebsd.org\n2011/07/14"]
@@ -652,6 +653,7 @@ tabthorpe -> zi
 tabthorpe -> gblach
 
 tcberner -> adridg
+tcberner -> yuri
 
 thierry -> jadawin
 thierry -> riggs
___
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: r325217 - head/share/man/man7

2017-10-31 Thread Eitan Adler
Author: eadler
Date: Tue Oct 31 06:43:37 2017
New Revision: 325217
URL: https://svnweb.freebsd.org/changeset/base/325217

Log:
  Fix '\' in binary ascii table

Modified:
  head/share/man/man7/ascii.7

Modified: head/share/man/man7/ascii.7
==
--- head/share/man/man7/ascii.7 Tue Oct 31 06:36:33 2017(r325216)
+++ head/share/man/man7/ascii.7 Tue Oct 31 06:43:37 2017(r325217)
@@ -28,7 +28,7 @@
 .\"@(#)ascii.7 8.1 (Berkeley) 6/5/93
 .\" $FreeBSD$
 .\"
-.Dd March 10, 2017
+.Dd October 30, 2017
 .Dt ASCII 7
 .Os
 .Sh NAME
@@ -137,7 +137,7 @@ CAN  8  X  x 11000
  EM  9  Y  y 11001
 SUB  :  Z  z 11010
 ESC  ;  [  { 11011
- FS  <  \  | 11100
+ FS  <  \e\  | 11100
  GS  =  ]  } 11101
  RS  >  ^  - 0
  US  ?  _DEL 1
___
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: r325216 - head/share/man/man7

2017-10-31 Thread Eitan Adler
Author: eadler
Date: Tue Oct 31 06:36:33 2017
New Revision: 325216
URL: https://svnweb.freebsd.org/changeset/base/325216

Log:
  Also bump Dd

Modified:
  head/share/man/man7/tuning.7

Modified: head/share/man/man7/tuning.7
==
--- head/share/man/man7/tuning.7Tue Oct 31 06:35:17 2017
(r325215)
+++ head/share/man/man7/tuning.7Tue Oct 31 06:36:33 2017
(r325216)
@@ -23,7 +23,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd March 22, 2017
+.Dd October 30, 2017
 .Dt TUNING 7
 .Os
 .Sh NAME
___
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: r325215 - head/share/man/man7

2017-10-31 Thread Eitan Adler
Author: eadler
Date: Tue Oct 31 06:35:17 2017
New Revision: 325215
URL: https://svnweb.freebsd.org/changeset/base/325215

Log:
  Update tuning(7) some more
  
  At this point its unclear how much help tuning(7) is whatsoever
  but leave it around in case someone decides to spend some time on
  it.

Modified:
  head/share/man/man7/tuning.7

Modified: head/share/man/man7/tuning.7
==
--- head/share/man/man7/tuning.7Tue Oct 31 06:16:40 2017
(r325214)
+++ head/share/man/man7/tuning.7Tue Oct 31 06:35:17 2017
(r325215)
@@ -41,8 +41,7 @@ Configuring too little swap can lead
 to inefficiencies in the VM page scanning code as well as create issues
 later on if you add more memory to your machine.
 On larger systems
-with multiple SCSI disks (or multiple IDE disks operating on different
-controllers), configure swap on each drive.
+with multiple disks, configure swap on each drive.
 The swap partitions on the drives should be approximately the same size.
 The kernel can handle arbitrary sizes but
 internal data structures scale to 4 times the largest swap partition.
@@ -176,11 +175,6 @@ This
 means you want to use a large off-center stripe size such as 1152 sectors
 so sequential I/O does not seek both disks and so meta-data is distributed
 across both disks rather than concentrated on a single disk.
-If
-you really need to get sophisticated, we recommend using a real hardware
-RAID controller from the list of
-.Fx
-supported controllers.
 .Sh SYSCTL TUNING
 .Xr sysctl 8
 variables permit system behavior to be monitored and controlled at
@@ -347,9 +341,6 @@ is adhered to.
 .Pp
 There are various other buffer-cache and VM page cache related sysctls.
 We do not recommend modifying these values.
-As of
-.Fx 4.3 ,
-the VM system does an extremely good job tuning itself.
 .Pp
 The
 .Va net.inet.tcp.sendspace
@@ -547,30 +538,12 @@ and reboot the system.
 .Va kern.maxusers
 controls the scaling of a number of static system tables, including defaults
 for the maximum number of open files, sizing of network memory resources, etc.
-As of
-.Fx 4.5 ,
 .Va kern.maxusers
 is automatically sized at boot based on the amount of memory available in
 the system, and may be determined at run-time by inspecting the value of the
 read-only
 .Va kern.maxusers
 sysctl.
-Some sites will require larger or smaller values of
-.Va kern.maxusers
-and may set it as a loader tunable; values of 64, 128, and 256 are not
-uncommon.
-We do not recommend going above 256 unless you need a huge number
-of file descriptors; many of the tunable values set to their defaults by
-.Va kern.maxusers
-may be individually overridden at boot-time or run-time as described
-elsewhere in this document.
-Systems older than
-.Fx 4.4
-must set this value via the kernel
-.Xr config 8
-option
-.Cd maxusers
-instead.
 .Pp
 The
 .Va kern.dfldsiz
@@ -619,14 +592,6 @@ The
 option to
 .Xr netstat 1
 may be used to observe network cluster use.
-Older versions of
-.Fx
-do not have this tunable and require that the
-kernel
-.Xr config 8
-option
-.Dv NMBCLUSTERS
-be set instead.
 .Pp
 More and more programs are using the
 .Xr sendfile 2
@@ -705,11 +670,6 @@ can be used to monitor this.
 There are many solutions to saturated disks:
 increasing memory for caching, mirroring disks, distributing operations across
 several machines, and so forth.
-If disk performance is an issue and you
-are using IDE drives, switching to SCSI can help a great deal.
-While modern
-IDE drives compare with SCSI in raw sequential bandwidth, the moment you
-start seeking around the disk SCSI drives usually win.
 .Pp
 Finally, you might run out of network suds.
 Optimize the network path
@@ -718,10 +678,7 @@ For example, in
 .Xr firewall 7
 we describe a firewall protecting internal hosts with a topology where
 the externally visible hosts are not routed through it.
-Use 1000BaseT rather
-than 100BaseT, depending on your needs.
-Most bottlenecks occur at the WAN link (e.g.,\&
-modem, T1, DSL, whatever).
+Most bottlenecks occur at the WAN link.
 If expanding the link is not an option it may be possible to use the
 .Xr dummynet 4
 feature to implement peak shaving or other forms of traffic shaping to
___
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: r325092 - head/usr.bin/fortune/datfiles

2017-10-31 Thread Alexey Dokuchaev
On Mon, Oct 30, 2017 at 04:35:04PM -0500, Dan Mack wrote:
> Definately different. Better? Maybe for some.  I most always search
> command history by prefix and then just using multiple ESC-p invocations
> to find the one command to edit/re-execute.  Less frequently I want to
> search the whole text of history for the whole command line sequence
> like bash Ctrl-R accomplishes.

Agreed, search-by-prefix needed a lot more often than ^R one (search
anywhere).  That's why it makes sense to bind it to the arrows.

> >>> "\ep": history-search-backward
> >>> "\en": history-search-forward
> 
> > Interesting that you mapped these to cursor-up/cursor-down.
> >
> > That may cause unexpected results.
> 
> > For example, typing something and then pressing up-arrow will cause
> > the shell to give you the previous command that started with that
> > rather than the previous command in-general.

That's exactly what I want, to type vi and instantly get to the
editing command (skipping all cd's and ls's I might've done in between).

> It's ESC-p/ESC-n, not just plain up-arrow/down-arrow.  Up arrow still
> does up without any search.  At least with my config using \ep as shown.
> My up arrows work for me as expected - they just iterate forward and
> backward through shell history.

I find this separation useless and actually mitigating the good.  When
I want to scroll the history without any search I'd simply won't type
anything.  Binding prefix-search to ESC-p/ESC-n, not up-arrow/down-arrow
is beyond me.  Empty command line gives you plain iteratation, typing
anything limit iteratation over commands starting with typed prefix.

./danfe
___
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"