svn commit: r355605 - head/sys/vm

2019-12-10 Thread Ryan Libby
Author: rlibby
Date: Wed Dec 11 06:50:55 2019
New Revision: 355605
URL: https://svnweb.freebsd.org/changeset/base/355605

Log:
  uma: pretty print zone flags sysctl
  
  Requested by: jeff
  Reviewed by:  jeff, markj
  Sponsored by: Dell EMC Isilon
  Differential Revision:https://reviews.freebsd.org/D22748

Modified:
  head/sys/vm/uma_core.c
  head/sys/vm/uma_int.h

Modified: head/sys/vm/uma_core.c
==
--- head/sys/vm/uma_core.c  Wed Dec 11 06:34:48 2019(r355604)
+++ head/sys/vm/uma_core.c  Wed Dec 11 06:50:55 2019(r355605)
@@ -289,6 +289,7 @@ static int sysctl_vm_zone_count(SYSCTL_HANDLER_ARGS);
 static int sysctl_vm_zone_stats(SYSCTL_HANDLER_ARGS);
 static int sysctl_handle_uma_zone_allocs(SYSCTL_HANDLER_ARGS);
 static int sysctl_handle_uma_zone_frees(SYSCTL_HANDLER_ARGS);
+static int sysctl_handle_uma_zone_flags(SYSCTL_HANDLER_ARGS);
 
 #ifdef INVARIANTS
 static bool uma_dbg_kskip(uma_keg_t keg, void *mem);
@@ -1896,8 +1897,9 @@ zone_alloc_sysctl(uma_zone_t zone, void *unused)
oid = zone->uz_oid;
SYSCTL_ADD_U32(NULL, SYSCTL_CHILDREN(oid), OID_AUTO,
"size", CTLFLAG_RD, >uz_size, 0, "Allocation size");
-   SYSCTL_ADD_U32(NULL, SYSCTL_CHILDREN(oid), OID_AUTO,
-   "flags", CTLFLAG_RD, >uz_flags, 0,
+   SYSCTL_ADD_PROC(NULL, SYSCTL_CHILDREN(oid), OID_AUTO,
+   "flags", CTLFLAG_RD | CTLTYPE_STRING | CTLFLAG_MPSAFE,
+   zone, 0, sysctl_handle_uma_zone_flags, "A",
"Allocator configuration flags");
SYSCTL_ADD_U16(NULL, SYSCTL_CHILDREN(oid), OID_AUTO,
"bucket_size", CTLFLAG_RD, >uz_bucket_size, 0,
@@ -4406,6 +4408,24 @@ sysctl_handle_uma_zone_frees(SYSCTL_HANDLER_ARGS)
 
cur = uma_zone_get_frees(zone);
return (sysctl_handle_64(oidp, , 0, req));
+}
+
+static int
+sysctl_handle_uma_zone_flags(SYSCTL_HANDLER_ARGS)
+{
+   struct sbuf sbuf;
+   uma_zone_t zone = arg1;
+   int error;
+
+   sbuf_new_for_sysctl(, NULL, 0, req);
+   if (zone->uz_flags != 0)
+   sbuf_printf(, "0x%b", zone->uz_flags, PRINT_UMA_ZFLAGS);
+   else
+   sbuf_printf(, "0");
+   error = sbuf_finish();
+   sbuf_delete();
+
+   return (error);
 }
 
 #ifdef INVARIANTS

Modified: head/sys/vm/uma_int.h
==
--- head/sys/vm/uma_int.h   Wed Dec 11 06:34:48 2019(r355604)
+++ head/sys/vm/uma_int.h   Wed Dec 11 06:50:55 2019(r355605)
@@ -420,6 +420,32 @@ struct uma_zone {
 #defineUMA_ZFLAG_INHERIT   
\
 (UMA_ZFLAG_INTERNAL | UMA_ZFLAG_CACHEONLY | UMA_ZFLAG_BUCKET)
 
+#definePRINT_UMA_ZFLAGS"\20"   \
+"\40CACHEONLY" \
+"\37TRASH" \
+"\36INTERNAL"  \
+"\35BUCKET"\
+"\34RECLAIMING"\
+"\33CACHE" \
+"\22MINBUCKET" \
+"\21NUMA"  \
+"\20PCPU"  \
+"\17NODUMP"\
+"\16VTOSLAB"   \
+"\15CACHESPREAD"   \
+"\14MAXBUCKET" \
+"\13NOBUCKET"  \
+"\12SECONDARY" \
+"\11HASH"  \
+"\10VM"\
+"\7MTXCLASS"   \
+"\6NOFREE" \
+"\5MALLOC" \
+"\4OFFPAGE"\
+"\3STATIC" \
+"\2ZINIT"  \
+"\1PAGEABLE"
+
 #undef UMA_ALIGN
 
 #ifdef _KERNEL
___
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: r355600 - in head: share/man/man9 sys/kern sys/sys

2019-12-10 Thread Poul-Henning Kamp

In message , John Baldwin 
writes:
>On 12/10/19 2:09 PM, Hans Petter Selasky wrote:
>> On 2019-12-10 22:58, John Baldwin wrote:
>>>   While here, add  to the manpage.
>> 
>> FYI:
>> 
>> Linux guys eliminated the "void *c_arg" in their timer implementation by 
>> using container_of() to get callback argument. We could possibly do the 
>> same!
>
>You mean passing the pointer to the callout itself and using that to get to the
>relevant pointer?

Before we start using macro-magic of that caliber, we should
consider how/if it will impact the strength of static analysis.

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

2019-12-10 Thread John Baldwin
On 12/10/19 2:09 PM, Hans Petter Selasky wrote:
> On 2019-12-10 22:58, John Baldwin wrote:
>>   While here, add  to the manpage.
> 
> FYI:
> 
> Linux guys eliminated the "void *c_arg" in their timer implementation by 
> using container_of() to get callback argument. We could possibly do the 
> same!

You mean passing the pointer to the callout itself and using that to get to the
relevant pointer?  That seems less obvious from a code readability standpoint.
We also don't actually guarantee that the 'struct callout' is still alive when
the function is called currently (hence the need for the local variables that
store a copy of the fields).

-- 
John Baldwin
___
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: r355600 - in head: share/man/man9 sys/kern sys/sys

2019-12-10 Thread Hans Petter Selasky

On 2019-12-10 22:58, John Baldwin wrote:

  While here, add  to the manpage.


FYI:

Linux guys eliminated the "void *c_arg" in their timer implementation by 
using container_of() to get callback argument. We could possibly do the 
same!


--HPS
___
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: r355602 - head/lib/clang/libllvm

2019-12-10 Thread Dimitry Andric
Author: dim
Date: Tue Dec 10 22:10:25 2019
New Revision: 355602
URL: https://svnweb.freebsd.org/changeset/base/355602

Log:
  Add a few missed source files to libllvm, for the MK_LLVM_TARGET_BPF=yes
  case.  Otherwise, linking of clang and other llvm based executables
  would complain about missing symbols.
  
  Reported by:  rstone
  MFC after:1 month
  X-MFC-With:   r353358

Modified:
  head/lib/clang/libllvm/Makefile

Modified: head/lib/clang/libllvm/Makefile
==
--- head/lib/clang/libllvm/Makefile Tue Dec 10 22:06:53 2019
(r355601)
+++ head/lib/clang/libllvm/Makefile Tue Dec 10 22:10:25 2019
(r355602)
@@ -1046,6 +1046,7 @@ SRCS_MIN+=Target/ARM/Utils/ARMBaseInfo.cpp
 .endif # MK_LLVM_TARGET_ARM
 .if ${MK_LLVM_TARGET_BPF} != "no"
 SRCS_MIN+= Target/BPF/AsmParser/BPFAsmParser.cpp
+SRCS_MIN+= Target/BPF/BPFAbstractMemberAccess.cpp
 SRCS_MIN+= Target/BPF/BPFAsmPrinter.cpp
 SRCS_MIN+= Target/BPF/BPFFrameLowering.cpp
 SRCS_MIN+= Target/BPF/BPFISelDAGToDAG.cpp
@@ -1054,6 +1055,7 @@ SRCS_MIN+=Target/BPF/BPFInstrInfo.cpp
 SRCS_MIN+= Target/BPF/BPFMCInstLower.cpp
 SRCS_MIN+= Target/BPF/BPFMIChecking.cpp
 SRCS_MIN+= Target/BPF/BPFMIPeephole.cpp
+SRCS_MIN+= Target/BPF/BPFMISimplifyPatchable.cpp
 SRCS_MIN+= Target/BPF/BPFRegisterInfo.cpp
 SRCS_MIN+= Target/BPF/BPFSelectionDAGInfo.cpp
 SRCS_MIN+= Target/BPF/BPFSubtarget.cpp
___
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: r355601 - in head/sys: cam cam/ata cam/scsi dev/aic7xxx dev/isp dev/kbdmux dev/mpt dev/ocs_fc dev/ppbus dev/sbni dev/smc dev/syscons dev/uart netgraph/netflow netinet

2019-12-10 Thread John Baldwin
Author: jhb
Date: Tue Dec 10 22:06:53 2019
New Revision: 355601
URL: https://svnweb.freebsd.org/changeset/base/355601

Log:
  Use callout_func_t instead of the deprecated timeout_t.
  
  Reviewed by:  kib, imp
  Differential Revision:https://reviews.freebsd.org/D22752

Modified:
  head/sys/cam/ata/ata_da.c
  head/sys/cam/cam_xpt.c
  head/sys/cam/scsi/scsi_cd.c
  head/sys/cam/scsi/scsi_da.c
  head/sys/dev/aic7xxx/aic_osm_lib.h
  head/sys/dev/isp/isp_freebsd.c
  head/sys/dev/kbdmux/kbdmux.c
  head/sys/dev/mpt/mpt_cam.c
  head/sys/dev/mpt/mpt_raid.c
  head/sys/dev/ocs_fc/ocs_os.c
  head/sys/dev/ppbus/lpt.c
  head/sys/dev/sbni/if_sbni.c
  head/sys/dev/smc/if_smc.c
  head/sys/dev/syscons/syscons.c
  head/sys/dev/uart/uart_core.c
  head/sys/netgraph/netflow/ng_netflow.h
  head/sys/netinet/tcp_timer.c

Modified: head/sys/cam/ata/ata_da.c
==
--- head/sys/cam/ata/ata_da.c   Tue Dec 10 21:58:30 2019(r355600)
+++ head/sys/cam/ata/ata_da.c   Tue Dec 10 22:06:53 2019(r355601)
@@ -825,7 +825,7 @@ static  voidadadone(struct cam_periph 
*periph,
   union ccb *done_ccb);
 static  intadaerror(union ccb *ccb, u_int32_t cam_flags,
u_int32_t sense_flags);
-static timeout_t   adasendorderedtag;
+static callout_func_t  adasendorderedtag;
 static voidadashutdown(void *arg, int howto);
 static voidadasuspend(void *arg);
 static voidadaresume(void *arg);

Modified: head/sys/cam/cam_xpt.c
==
--- head/sys/cam/cam_xpt.c  Tue Dec 10 21:58:30 2019(r355600)
+++ head/sys/cam/cam_xpt.c  Tue Dec 10 22:06:53 2019(r355601)
@@ -247,7 +247,7 @@ static union ccb *xpt_get_ccb_nowait(struct cam_periph
 static void xpt_run_allocq(struct cam_periph *periph, int sleep);
 static void xpt_run_allocq_task(void *context, int pending);
 static void xpt_run_devq(struct cam_devq *devq);
-static timeout_t xpt_release_devq_timeout;
+static callout_func_t xpt_release_devq_timeout;
 static void xpt_release_simq_timeout(void *arg) __unused;
 static void xpt_acquire_bus(struct cam_eb *bus);
 static void xpt_release_bus(struct cam_eb *bus);

Modified: head/sys/cam/scsi/scsi_cd.c
==
--- head/sys/cam/scsi/scsi_cd.c Tue Dec 10 21:58:30 2019(r355600)
+++ head/sys/cam/scsi/scsi_cd.c Tue Dec 10 22:06:53 2019(r355601)
@@ -302,7 +302,7 @@ static  int cdsendkey(struct cam_periph 
*periph,
  struct dvd_authinfo *authinfo);
 static int cdreaddvdstructure(struct cam_periph *periph,
   struct dvd_struct *dvdstruct);
-static timeout_t   cdmediapoll;
+static callout_func_t  cdmediapoll;
 
 static struct periph_driver cddriver =
 {

Modified: head/sys/cam/scsi/scsi_da.c
==
--- head/sys/cam/scsi/scsi_da.c Tue Dec 10 21:58:30 2019(r355600)
+++ head/sys/cam/scsi/scsi_da.c Tue Dec 10 22:06:53 2019(r355601)
@@ -1492,9 +1492,9 @@ static void   dasetgeom(struct cam_periph 
*periph, uint
  uint64_t maxsector,
  struct scsi_read_capacity_data_long *rcaplong,
  size_t rcap_size);
-static timeout_t   dasendorderedtag;
+static callout_func_t  dasendorderedtag;
 static voiddashutdown(void *arg, int howto);
-static timeout_t   damediapoll;
+static callout_func_t  damediapoll;
 
 #ifndefDA_DEFAULT_POLL_PERIOD
 #defineDA_DEFAULT_POLL_PERIOD  3

Modified: head/sys/dev/aic7xxx/aic_osm_lib.h
==
--- head/sys/dev/aic7xxx/aic_osm_lib.h  Tue Dec 10 21:58:30 2019
(r355600)
+++ head/sys/dev/aic7xxx/aic_osm_lib.h  Tue Dec 10 22:06:53 2019
(r355601)
@@ -112,7 +112,7 @@ typedef struct callout aic_timer_t;
 
 /** Error Recovery 
/
 void   aic_set_recoveryscb(struct aic_softc *aic, struct scb *scb);
-timeout_t  aic_platform_timeout;
+callout_func_t aic_platform_timeout;
 intaic_spawn_recovery_thread(struct aic_softc *aic);
 void   aic_terminate_recovery_thread(struct aic_softc *aic);
 

Modified: head/sys/dev/isp/isp_freebsd.c
==
--- head/sys/dev/isp/isp_freebsd.c  Tue Dec 10 21:58:30 2019
(r355600)
+++ head/sys/dev/isp/isp_freebsd.c  Tue Dec 10 22:06:53 2019
(r355601)
@@ -57,8 +57,8 @@ static void isp_loop_changed(ispsoftc_t *isp, int chan
 static d_ioctl_t 

svn commit: r355600 - in head: share/man/man9 sys/kern sys/sys

2019-12-10 Thread John Baldwin
Author: jhb
Date: Tue Dec 10 21:58:30 2019
New Revision: 355600
URL: https://svnweb.freebsd.org/changeset/base/355600

Log:
  Add a callout_func_t typedef for functions used with callout_*().
  
  This typedef is the same as timeout_t except that it is in the callout
  namespace and header.
  
  Use this typedef in various places of the callout implementation that
  were either using the raw type or timeout_t.
  
  While here, add  to the manpage.
  
  Reviewed by:  kib, imp
  MFC after:1 month
  Differential Revision:https://reviews.freebsd.org/D22751

Modified:
  head/share/man/man9/timeout.9
  head/sys/kern/kern_timeout.c
  head/sys/sys/_callout.h

Modified: head/share/man/man9/timeout.9
==
--- head/share/man/man9/timeout.9   Tue Dec 10 21:56:44 2019
(r355599)
+++ head/share/man/man9/timeout.9   Tue Dec 10 21:58:30 2019
(r355600)
@@ -29,7 +29,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 27, 2016
+.Dd December 10, 2019
 .Dt TIMEOUT 9
 .Os
 .Sh NAME
@@ -62,8 +62,10 @@
 .Nd execute a function after a specified length of time
 .Sh SYNOPSIS
 .In sys/types.h
+.In sys/callout.h
 .In sys/systm.h
 .Bd -literal
+typedef void callout_func_t (void *);
 typedef void timeout_t (void *);
 .Ed
 .Ft int
@@ -71,7 +73,7 @@ typedef void timeout_t (void *);
 .Ft void
 .Fn callout_deactivate "struct callout *c"
 .Ft int
-.Fn callout_async_drain "struct callout *c" "timeout_t *drain"
+.Fn callout_async_drain "struct callout *c" "callout_func_t *drain"
 .Ft int
 .Fn callout_drain "struct callout *c"
 .Ft void
@@ -90,19 +92,24 @@ struct callout_handle handle = CALLOUT_HANDLE_INITIALI
 .Ft int
 .Fn callout_pending "struct callout *c"
 .Ft int
-.Fn callout_reset "struct callout *c" "int ticks" "timeout_t *func" "void *arg"
+.Fo callout_reset
+.Fa "struct callout *c"
+.Fa "int ticks"
+.Fa "callout_func_t *func"
+.Fa "void *arg"
+.Fc
 .Ft int
 .Fo callout_reset_curcpu
 .Fa "struct callout *c"
 .Fa "int ticks"
-.Fa "timeout_t *func"
+.Fa "callout_func_t *func"
 .Fa "void *arg"
 .Fc
 .Ft int
 .Fo callout_reset_on
 .Fa "struct callout *c"
 .Fa "int ticks"
-.Fa "timeout_t *func"
+.Fa "callout_func_t *func"
 .Fa "void *arg"
 .Fa "int cpu"
 .Fc
@@ -111,7 +118,7 @@ struct callout_handle handle = CALLOUT_HANDLE_INITIALI
 .Fa "struct callout *c"
 .Fa "sbintime_t sbt"
 .Fa "sbintime_t pr"
-.Fa "timeout_t *func"
+.Fa "callout_func_t *func"
 .Fa "void *arg"
 .Fa "int flags"
 .Fc
@@ -120,7 +127,7 @@ struct callout_handle handle = CALLOUT_HANDLE_INITIALI
 .Fa "struct callout *c"
 .Fa "sbintime_t sbt"
 .Fa "sbintime_t pr"
-.Fa "timeout_t *func"
+.Fa "callout_func_t *func"
 .Fa "void *arg"
 .Fa "int flags"
 .Fc
@@ -129,7 +136,7 @@ struct callout_handle handle = CALLOUT_HANDLE_INITIALI
 .Fa "struct callout *c"
 .Fa "sbintime_t sbt"
 .Fa "sbintime_t pr"
-.Fa "timeout_t *func"
+.Fa "callout_func_t *func"
 .Fa "void *arg"
 .Fa "int cpu"
 .Fa "int flags"

Modified: head/sys/kern/kern_timeout.c
==
--- head/sys/kern/kern_timeout.cTue Dec 10 21:56:44 2019
(r355599)
+++ head/sys/kern/kern_timeout.cTue Dec 10 21:58:30 2019
(r355600)
@@ -145,11 +145,11 @@ static u_int __read_mostly callwheelmask;
  */
 struct cc_exec {
struct callout  *cc_curr;
-   void(*cc_drain)(void *);
+   callout_func_t  *cc_drain;
void*cc_last_func;
void*cc_last_arg;
 #ifdef SMP
-   void(*ce_migration_func)(void *);
+   callout_func_t  *ce_migration_func;
void*ce_migration_arg;
sbintime_t  ce_migration_time;
sbintime_t  ce_migration_prec;
@@ -656,7 +656,7 @@ softclock_call_cc(struct callout *c, struct callout_cp
 int direct)
 {
struct rm_priotracker tracker;
-   void (*c_func)(void *);
+   callout_func_t *c_func, *drain;
void *c_arg;
struct lock_class *class;
struct lock_object *c_lock;
@@ -664,7 +664,7 @@ softclock_call_cc(struct callout *c, struct callout_cp
int c_iflags;
 #ifdef SMP
struct callout_cpu *new_cc;
-   void (*new_func)(void *);
+   callout_func_t *new_func;
void *new_arg;
int flags, new_cpu;
sbintime_t new_prec, new_time;
@@ -673,7 +673,7 @@ softclock_call_cc(struct callout *c, struct callout_cp
sbintime_t sbt1, sbt2;
struct timespec ts2;
static sbintime_t maxdt = 2 * SBT_1MS;  /* 2 msec */
-   static timeout_t *lastfunc;
+   static callout_func_t *lastfunc;
 #endif
 
KASSERT((c->c_iflags & CALLOUT_PENDING) == CALLOUT_PENDING,
@@ -768,8 +768,6 @@ skip:
KASSERT(cc_exec_curr(cc, direct) == c, ("mishandled cc_curr"));
cc_exec_curr(cc, direct) = NULL;
if (cc_exec_drain(cc, direct)) {
-   

svn commit: r355599 - head/libexec/rtld-elf/riscv

2019-12-10 Thread John Baldwin
Author: jhb
Date: Tue Dec 10 21:56:44 2019
New Revision: 355599
URL: https://svnweb.freebsd.org/changeset/base/355599

Log:
  Correct the offset of static TLS variables for Initial-Exec on RISC-V.
  
  TP points to the start of the TLS block after the tcb, but
  Obj_Entry.tlsoffset includes the tcb, so subtract the size of the tcb
  to compute the offset relative to TP.
  
  This is identical to the same fixes for powerpc in r339072 and r342671.
  
  Reviewed by:  James Clarke
  Sponsored by: DARPA
  Differential Revision:https://reviews.freebsd.org/D22661

Modified:
  head/libexec/rtld-elf/riscv/reloc.c

Modified: head/libexec/rtld-elf/riscv/reloc.c
==
--- head/libexec/rtld-elf/riscv/reloc.c Tue Dec 10 21:48:21 2019
(r355598)
+++ head/libexec/rtld-elf/riscv/reloc.c Tue Dec 10 21:56:44 2019
(r355599)
@@ -354,7 +354,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld, int
}
 
*where = (def->st_value + rela->r_addend +
-   defobj->tlsoffset - TLS_TP_OFFSET);
+   defobj->tlsoffset - TLS_TP_OFFSET - TLS_TCB_SIZE);
break;
case R_RISCV_RELATIVE:
*where = (Elf_Addr)(obj->relocbase + rela->r_addend);
___
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: r355598 - head/sys/dev/ow

2019-12-10 Thread Ian Lepore
Author: ian
Date: Tue Dec 10 21:48:21 2019
New Revision: 355598
URL: https://svnweb.freebsd.org/changeset/base/355598

Log:
  Do not attach children of owc_gpiobus until interrupts are working.
  
  The children of the bus need to do IO on the bus to probe for hardware
  presence.  Doing IO means timing the bus states using sbinuptime(), and
  that requires working timecounters, which are not initialized until after
  device attachment has completed.
  
  PR:   242526

Modified:
  head/sys/dev/ow/owc_gpiobus.c

Modified: head/sys/dev/ow/owc_gpiobus.c
==
--- head/sys/dev/ow/owc_gpiobus.c   Tue Dec 10 20:51:28 2019
(r355597)
+++ head/sys/dev/ow/owc_gpiobus.c   Tue Dec 10 21:48:21 2019
(r355598)
@@ -131,7 +131,7 @@ owc_gpiobus_attach(device_t dev)
free(kids, M_TEMP);
if (nkid == 0)
device_add_child(dev, "ow", -1);
-   bus_generic_attach(dev);
+   config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev);
 
return (0);
 }
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r355597 - head/share/man/man4

2019-12-10 Thread Navdeep Parhar
Author: np
Date: Tue Dec 10 20:51:28 2019
New Revision: 355597
URL: https://svnweb.freebsd.org/changeset/base/355597

Log:
  cxgbe(4): Man page updates to go with r355107.
  
  MFC after:1 week
  Sponsored by: Chelsio Communications

Modified:
  head/share/man/man4/cxgbe.4

Modified: head/share/man/man4/cxgbe.4
==
--- head/share/man/man4/cxgbe.4 Tue Dec 10 20:23:05 2019(r355596)
+++ head/share/man/man4/cxgbe.4 Tue Dec 10 20:51:28 2019(r355597)
@@ -31,7 +31,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd Oct 25, 2019
+.Dd Dec 10, 2019
 .Dt CXGBE 4
 .Os
 .Sh NAME
@@ -291,10 +291,14 @@ This tunable establishes the default PAUSE settings fo
 Settings can be displayed and controlled on a per-port basis via the
 dev..X.pause_settings sysctl.
 .It Va hw.cxgbe.fec
-FEC (Forward Error Correction) settings.
+Forward Error Correction settings.
+-1 (default) means driver should automatically pick a value.
 0 disables FEC.
-Bit 0 enables RS FEC, bit 1 enables BASE-R FEC (aka Firecode FEC).
-The default is -1 which lets the driver pick a value.
+Finer grained control can be achieved by setting individual bits.
+Bit 0 enables RS FEC, bit 1 enables BASE-R FEC (aka Firecode FEC), bit
+2 enables NO FEC, and bit 6 enables the FEC that is recommended by the
+transceiver/cable that is plugged in.
+These bits can be set together in any combination.
 This tunable establishes the default FEC settings for all ports.
 Settings can be displayed and controlled on a per-port basis via the
 dev..X.fec sysctl.
___
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: r355596 - head/sys/dev/ichiic

2019-12-10 Thread Vladimir Kondratyev
Author: wulf
Date: Tue Dec 10 20:23:05 2019
New Revision: 355596
URL: https://svnweb.freebsd.org/changeset/base/355596

Log:
  [ig4] Remove unused methods from bus interface
  
  bus_get/set_resource methods are implemented in child device (iicbus).
  As their implementation with bus_generic_rl_get/set calls do not
  recurse up the tree, the versions in ig4 are never called.
  
  Suggested by: jhb

Modified:
  head/sys/dev/ichiic/ig4_acpi.c
  head/sys/dev/ichiic/ig4_pci.c

Modified: head/sys/dev/ichiic/ig4_acpi.c
==
--- head/sys/dev/ichiic/ig4_acpi.c  Tue Dec 10 20:12:21 2019
(r355595)
+++ head/sys/dev/ichiic/ig4_acpi.c  Tue Dec 10 20:23:05 2019
(r355596)
@@ -177,8 +177,6 @@ static device_method_t ig4iic_acpi_methods[] = {
DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource),
-   DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource),
-   DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource),
 
/* iicbus interface */
DEVMETHOD(iicbus_transfer, ig4iic_transfer),

Modified: head/sys/dev/ichiic/ig4_pci.c
==
--- head/sys/dev/ichiic/ig4_pci.c   Tue Dec 10 20:12:21 2019
(r355595)
+++ head/sys/dev/ichiic/ig4_pci.c   Tue Dec 10 20:23:05 2019
(r355596)
@@ -258,8 +258,6 @@ static device_method_t ig4iic_pci_methods[] = {
DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource),
-   DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource),
-   DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource),
 
/* iicbus interface */
DEVMETHOD(iicbus_transfer, ig4iic_transfer),
___
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: r355594 - head/share/vt/keymaps

2019-12-10 Thread Ed Maste
Author: emaste
Date: Tue Dec 10 20:11:39 2019
New Revision: 355594
URL: https://svnweb.freebsd.org/changeset/base/355594

Log:
  remove again nonexistent from-* entries from vt INDEX.keymaps
  
  A number of entries of the form "de.kbd.from-cp850" existed in vt's
  INDEX.keymaps, added in r270114, but these files do not exist.
  
  I removed them in r355585 but accidentally re-added them in r355592.
  Remove them yet again.
  
  PR:   235564, 235853
  MFC after:1 week

Modified:
  head/share/vt/keymaps/INDEX.keymaps

Modified: head/share/vt/keymaps/INDEX.keymaps
==
--- head/share/vt/keymaps/INDEX.keymaps Tue Dec 10 20:04:08 2019
(r355593)
+++ head/share/vt/keymaps/INDEX.keymaps Tue Dec 10 20:11:39 2019
(r355594)
@@ -111,18 +111,6 @@ cz.kbd:de:Tschechisch (QWERTZ, mit Akzenten)
 cz.kbd:fr:Tchèque (QWERTZ, avec accents)
 cz.kbd:es:Checo (QWERTZ, con acentos)
 
-cz.kbd.from-ce:en:Czech
-cz.kbd.from-ce:da:Tjekkisk
-cz.kbd.from-ce:de:Tschechisch
-cz.kbd.from-ce:fr:Tchèque
-cz.kbd.from-ce:es:Checo
-
-cz.qwerty.kbd.from-ce:en:Czech (QWERTY)
-cz.qwerty.kbd.from-ce:da:Tjekkisk (QWERTY)
-cz.qwerty.kbd.from-ce:de:Tschechisch (QWERTY)
-cz.qwerty.kbd.from-ce:fr:Tchèquey (QWERTY)
-cz.qwerty.kbd.from-ce:es:Checo (QWERTY)
-
 dk.kbd:en:Danish
 dk.kbd:da:Dansk
 dk.kbd:de:Dänisch
@@ -137,13 +125,6 @@ dk.acc.kbd:fr:Danois (avec accents)
 dk.acc.kbd:pt:Dinamarquês (com acentos)
 dk.acc.kbd:es:Danés (con acentos)
 
-dk.kbd.from-cp865:en:Danish
-dk.kbd.from-cp865:da:Dansk
-dk.kbd.from-cp865:de:Dänisch
-dk.kbd.from-cp865:fr:Danois
-dk.kbd.from-cp865:pt:Dinamarquês
-dk.kbd.from-cp865:es:Danés
-
 dk.macbook.kbd:en:Danish (MacBook)
 dk.macbook.kbd:da:Dansk (MacBook)
 dk.macbook.kbd:de:Dänisch (MacBook)
@@ -159,36 +140,18 @@ nordic.asus-eee.kbd:en:Nordic layout on Asus eeePC
 nordic.asus-eee.kbd:da:Nordisk layout på Asus eeePC
 nordic.asus-eee.kbd:fr:Norvégien phonétique sur Asus eeePC
 
-ee.kbd.from-iso1:en:Estonian
-ee.kbd.from-iso1:da:Estisk
-ee.kbd.from-iso1:de:Estnisch
-ee.kbd.from-iso1:fr:Estonien
-ee.kbd.from-iso1:es:Estonio
-
 ee.kbd:en:Estonian
 ee.kbd:da:Estisk
 ee.kbd:de:Estnisch
 ee.kbd:fr:Estonien
 ee.kbd:es:Estonio
 
-ee.kbd.from-cp850:en:Estonian
-ee.kbd.from-cp850:da:Estisk
-ee.kbd.from-cp850:de:Estnisch
-ee.kbd.from-cp850:fr:Estonien
-ee.kbd.from-cp850:es:Estonio
-
 fi.kbd:en:Finnish
 fi.kbd:da:Finsk
 fi.kbd:de:Finnisch
 fi.kbd:fr:Finlandais
 fi.kbd:es:Finlandés
 
-fi.kbd.from-cp850:en:Finnish
-fi.kbd.from-cp850:da:Finsk
-fi.kbd.from-cp850:de:Finnisch
-fi.kbd.from-cp850:fr:Finlandais
-fi.kbd.from-cp850:es:Finlandés
-
 fr.kbd:en:French
 fr.kbd:da:Fransk
 fr.kbd:de:Französisch
@@ -263,14 +226,6 @@ de.noacc.kbd:pt:Alemão (no accent keys)
 de.noacc.kbd:es:Alemán (no accent keys)
 de.noacc.kbd:uk:Німецька (no accent keys)
 
-de.kbd.from-cp850:en:German
-de.kbd.from-cp850:da:Tysk
-de.kbd.from-cp850:de:Deutsch
-de.kbd.from-cp850:fr:Allemand
-de.kbd.from-cp850:pt:Alemão
-de.kbd.from-cp850:es:Alemán
-de.kbd.from-cp850:uk:Німецька
-
 gr.kbd:en:Greek (104 keys)
 gr.kbd:da:Græsk (104 taster)
 gr.kbd:fr:Grec (104 touches)
@@ -423,24 +378,6 @@ pt.acc.kbd:fr:Portugais (avec accents)
 pt.acc.kbd:pt:Português (com acentos)
 pt.acc.kbd:es:Portugués (con acentos)
 
-ru.kbd.from-cp866:en:Russian (alternative)
-ru.kbd.from-cp866:da:Russisk (alternativ)
-ru.kbd.from-cp866:de:Russisch (alternativ)
-ru.kbd.from-cp866:ru:Русский (alternative)
-ru.kbd.from-cp866:fr:Russe (alternative)
-ru.kbd.from-cp866:pt:Russo (alternativo)
-ru.kbd.from-cp866:es:Ruso (alternativo)
-ru.kbd.from-cp866:uk:Російська (альтернативна)
-
-ru.kbd.from-iso5:en:Russian
-ru.kbd.from-iso5:da:Russisk
-ru.kbd.from-iso5:de:Russisch
-ru.kbd.from-iso5:fr:Russe
-ru.kbd.from-iso5:ru:Русский
-ru.kbd.from-iso5:pt:Russo
-ru.kbd.from-iso5:es:Ruso
-ru.kbd.from-iso5:uk:Російський
-
 ru.kbd:en:Russian
 ru.kbd:da:Russisk
 ru.kbd:de:Russisch
@@ -475,13 +412,6 @@ es.dvorak.kbd:fr:Espagnol Dvorak
 es.dvorak.kbd:pt:Espanhol Dvorak
 es.dvorak.kbd:es:Español Dvorak
 
-es.kbd.from-iso1:en:Spanish
-es.kbd.from-iso1:da:Spansk
-es.kbd.from-iso1:de:Spanisch
-es.kbd.from-iso1:fr:Espagnol
-es.kbd.from-iso1:pt:Espanhol
-es.kbd.from-iso1:es:Español
-
 es.acc.kbd:en:Spanish (accent keys)
 es.acc.kbd:da:Spansk (accenttaster)
 es.acc.kbd:de:Spanisch (accent keys)
@@ -515,12 +445,6 @@ se.kbd:de:Schwedisch
 se.kbd:fr:Suédois
 se.kbd:pt,es:Sueco
 
-se.kbd.from-cp850:en:Swedish
-se.kbd.from-cp850:da:Svensk
-se.kbd.from-cp850:de:Schwedisch
-se.kbd.from-cp850:fr:Suédois
-se.kbd.from-cp850:pt,es:Sueco
-
 ch-fr.kbd:en:Swiss-French
 ch-fr.kbd:da:Schweizerfransk
 ch-fr.kbd:de:Schweiz-Französisch
@@ -533,12 +457,6 @@ ch-fr.acc.kbd:de:Schweiz-Französisch (mit Akzenten)
 ch-fr.acc.kbd:fr:Suisse-Français (avec accents)
 ch-fr.acc.kbd:es:Francosuizo (con acentos)
 
-ch-fr.kbd.from-cp850:en:Swiss-French
-ch-fr.kbd.from-cp850:da:Schweizerfransk
-ch-fr.kbd.from-cp850:de:Schweiz-Französisch

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

2019-12-10 Thread Navdeep Parhar
Author: np
Date: Tue Dec 10 20:12:21 2019
New Revision: 355595
URL: https://svnweb.freebsd.org/changeset/base/355595

Log:
  cxgbe(4): Simplify the firmware version checks a bit.
  
  No functional change.
  
  MFC after:1 week

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

Modified: head/sys/dev/cxgbe/t4_main.c
==
--- head/sys/dev/cxgbe/t4_main.cTue Dec 10 20:11:39 2019
(r355594)
+++ head/sys/dev/cxgbe/t4_main.cTue Dec 10 20:12:21 2019
(r355595)
@@ -4251,9 +4251,8 @@ set_params__pre_init(struct adapter *sc)
val = 1;
rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, , );
/* firmwares < 1.20.1.0 do not have this param. */
-   if (rc == FW_EINVAL && sc->params.fw_vers <
-   (V_FW_HDR_FW_VER_MAJOR(1) | V_FW_HDR_FW_VER_MINOR(20) |
-   V_FW_HDR_FW_VER_MICRO(1) | V_FW_HDR_FW_VER_BUILD(0))) {
+   if (rc == FW_EINVAL &&
+   sc->params.fw_vers < FW_VERSION32(1, 20, 1, 0)) {
rc = 0;
}
if (rc != 0) {
@@ -4418,9 +4417,7 @@ get_params__post_init(struct adapter *sc)
return (rc);
}
sc->tids.ntids = val[0];
-   if (sc->params.fw_vers <
-   (V_FW_HDR_FW_VER_MAJOR(1) | V_FW_HDR_FW_VER_MINOR(20) |
-   V_FW_HDR_FW_VER_MICRO(5) | V_FW_HDR_FW_VER_BUILD(0))) {
+   if (sc->params.fw_vers < FW_VERSION32(1, 20, 5, 0)) {
MPASS(sc->tids.ntids >= sc->tids.nhpftids);
sc->tids.ntids -= sc->tids.nhpftids;
}
@@ -4460,9 +4457,7 @@ get_params__post_init(struct adapter *sc)
return (rc);
}
sc->tids.ntids = val[0];
-   if (sc->params.fw_vers <
-   (V_FW_HDR_FW_VER_MAJOR(1) | V_FW_HDR_FW_VER_MINOR(20) |
-   V_FW_HDR_FW_VER_MICRO(5) | V_FW_HDR_FW_VER_BUILD(0))) {
+   if (sc->params.fw_vers < FW_VERSION32(1, 20, 5, 0)) {
MPASS(sc->tids.ntids >= sc->tids.nhpftids);
sc->tids.ntids -= sc->tids.nhpftids;
}
___
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: r355593 - head/sbin/fsck_ffs

2019-12-10 Thread Eric van Gyzen
Author: vangyzen
Date: Tue Dec 10 20:04:08 2019
New Revision: 355593
URL: https://svnweb.freebsd.org/changeset/base/355593

Log:
  fsck_ffs: fix some memory leaks found by Coverity.
  
  Reported by:  Coverity
  CID:  1380549 1380550 1380551
  MFC after:1 week
  Sponsored by: Dell EMC Isilon

Modified:
  head/sbin/fsck_ffs/setup.c

Modified: head/sbin/fsck_ffs/setup.c
==
--- head/sbin/fsck_ffs/setup.c  Tue Dec 10 20:02:57 2019(r355592)
+++ head/sbin/fsck_ffs/setup.c  Tue Dec 10 20:04:08 2019(r355593)
@@ -474,11 +474,15 @@ calcsb(char *dev, int devfd, struct fs *fs)
if (fsrbuf == NULL)
errx(EEXIT, "calcsb: cannot allocate recovery buffer");
if (blread(devfd, fsrbuf,
-   (SBLOCK_UFS2 - secsize) / dev_bsize, secsize) != 0)
+   (SBLOCK_UFS2 - secsize) / dev_bsize, secsize) != 0) {
+   free(fsrbuf);
return (0);
+   }
fsr = (struct fsrecovery *)[secsize - sizeof *fsr];
-   if (fsr->fsr_magic != FS_UFS2_MAGIC)
+   if (fsr->fsr_magic != FS_UFS2_MAGIC) {
+   free(fsrbuf);
return (0);
+   }
memset(fs, 0, sizeof(struct fs));
fs->fs_fpg = fsr->fsr_fpg;
fs->fs_fsbtodb = fsr->fsr_fsbtodb;
@@ -505,11 +509,14 @@ chkrecovery(int devfd)
 * Could not determine if backup material exists, so do not
 * offer to create it.
 */
+   fsrbuf = NULL;
if (ioctl(devfd, DIOCGSECTORSIZE, ) == -1 ||
(fsrbuf = Malloc(secsize)) == NULL ||
blread(devfd, fsrbuf, (SBLOCK_UFS2 - secsize) / dev_bsize,
- secsize) != 0)
+ secsize) != 0) {
+   free(fsrbuf);
return (1);
+   }
/*
 * Recovery material has already been created, so do not
 * need to create it again.
@@ -538,12 +545,14 @@ saverecovery(int readfd, int writefd)
char *fsrbuf;
u_int secsize;
 
+   fsrbuf = NULL;
if (sblock.fs_magic != FS_UFS2_MAGIC ||
ioctl(readfd, DIOCGSECTORSIZE, ) == -1 ||
(fsrbuf = Malloc(secsize)) == NULL ||
blread(readfd, fsrbuf, (SBLOCK_UFS2 - secsize) / dev_bsize,
  secsize) != 0) {
printf("RECOVERY DATA COULD NOT BE CREATED\n");
+   free(fsrbuf);
return;
}
fsr = (struct fsrecovery *)[secsize - sizeof *fsr];
___
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: r355592 - in head/share/vt: fonts keymaps

2019-12-10 Thread Ed Maste
Author: emaste
Date: Tue Dec 10 20:02:57 2019
New Revision: 355592
URL: https://svnweb.freebsd.org/changeset/base/355592

Log:
  Add Danish translation for vt font and keymap INDEX files
  
  Also sort some entries into the correct location, correct MacBook
  capitalization, etc.
  
  PR:   235853
  MFC after:1 week
  Submitted by: scootergrisen gmail com

Modified:
  head/share/vt/fonts/INDEX.fonts
  head/share/vt/keymaps/INDEX.keymaps

Modified: head/share/vt/fonts/INDEX.fonts
==
--- head/share/vt/fonts/INDEX.fonts Tue Dec 10 19:52:29 2019
(r355591)
+++ head/share/vt/fonts/INDEX.fonts Tue Dec 10 20:02:57 2019
(r355592)
@@ -22,6 +22,7 @@
 # Language support: MENU, FONT
 #
 MENU:en:Choose your terminal font
+MENU:da:Vælg skrifttypen til din terminal
 MENU:de:Wählen Sie Ihre Schrift
 MENU:fr:Choisissez votre fonte écran
 
@@ -34,12 +35,15 @@ FONT:en:vgarom-8x14.fnt
 #
 
 gallant.fnt:en:Gallant Character set, 8x16
+gallant.fnt:da:Gallant-tegnsæt, 8x16
 gallant.fnt:de:Gallant Zeichensatz, 8x16
 
 terminus-b32.fnt:en:Terminus BSD Console, size 32
+terminus-b32.fnt:da:Terminus BSD-konsol, størrelse 32
 terminus-b32.fnt:de:Terminus BSD Console, Größe 32
 
 tom-thumb.fnt:en:tom-thumb Character set, 4x6
+tom-thumb.fnt:da:tom-thumb-tegnsæt, 4x6
 tom-thumb.fnt:de:tom-thumb Zeichensatz, 4x6
 
 vgarom-16x32.fnt:en:VGAROM, 16x32
@@ -51,10 +55,12 @@ vgarom-8x16.fnt:en:VGAROM, 8x16
 vgarom-8x8.fnt:en:VGAROM, 8x8
 
 vgarom-thin-8x16.fnt:en:VGAROM, 8x16 (thin)
+vgarom-thin-8x16.fnt:da:VGAROM, 8x16 (smal)
 vgarom-thin-8x16.fnt:de:VGAROM, 8x16 (dünn)
 vgarom-thin-8x16.fnt:fr:VGAROM, 8x16 (fin)
 
 vgarom-thin-8x8.fnt:en:VGAROM, 8x8 (thin)
+vgarom-thin-8x8.fnt:da:VGAROM, 8x8 (smal)
 vgarom-thin-8x8.fnt:de:VGAROM, 8x8 (dünn)
 vgarom-thin-8x8.fnt:fr:VGAROM, 8x8 (fin)
 

Modified: head/share/vt/keymaps/INDEX.keymaps
==
--- head/share/vt/keymaps/INDEX.keymaps Tue Dec 10 19:52:29 2019
(r355591)
+++ head/share/vt/keymaps/INDEX.keymaps Tue Dec 10 20:02:57 2019
(r355592)
@@ -21,9 +21,10 @@
 # Language support: MENU, FONT
 #
 MENU:en:Choose your keyboard layout
-MENU:da,no,sv:Vælg dit keyboard layout
+MENU:da:Vælg dit tastaturlayout
 MENU:de:Wählen Sie Ihre Tastaturbelegung
 MENU:fr:Choisissez la disposition de votre clavier
+MENU:no,sv:Vælg dit keyboard layout
 MENU:pl:Wybierz układ klawiatury
 MENU:pt:Escolha o layout do teclado
 MENU:es:Seleccione la disposición de su teclado
@@ -41,57 +42,87 @@ MENU:tr:Klavye düzeninizi seçiniz
 FONT:en:vgarom-8x16.hex
 
 #
+am.kbd:en:Armenian phonetic layout
+am.kbd:da:Armensk fonetisk layout
+am.kbd:de:Armenische phonetische Tastenbelegung
+am.kbd:fr:Arménien phonétique
+am.kbd:hy:Հայերեն հնչյունային (Phonetic) դասավորություն
+am.kbd:ru:Армянская фонетическая раскладка
+
 be.kbd:en:Belgian
+be.kbd:da:Belgisk
 be.kbd:de:Belgisch
 be.kbd:fr:Belge
 be.kbd:pt,es:Belga
 
 be.acc.kbd:en:Belgian (accent keys)
+be.acc.kbd:da:Belgisk (accenttaster)
 be.acc.kbd:de:Belgisch (mit Akzenten)
 be.acc.kbd:fr:Belge (avec accents)
 be.acc.kbd:pt:Belga (com acentos)
 be.acc.kbd:es:Belga (con acentos)
 
 bg.bds.kbd:en:Bulgarian (BDS)
+bg.bds.kbd:da:Bulgarsk (BDS)
 bg.bds.kbd:de:Bulgarisch (BDS)
 
 bg.phonetic.kbd:en:Bulgarian (Phonetic)
+bg.phonetic.kbd:da:Bulgarsk (fonetisk)
 bg.phonetic.kbd:de:Bulgarisch (phonetisch)
 
 br.kbd:en:Brazilian (accent keys)
+br.kbd:da:Brasiliansk (accenttaster)
 br.kbd:de:Brasilianisch (mit Akzenten)
 br.kbd:fr:Brésilien (avec accents)
 br.kbd:pt:Brasileiro (com acentos)
 br.kbd:es:Brasileño (con acentos)
 
 br.noacc.kbd:en:Brazilian (without accent keys)
+br.noacc.kbd:da:Brasiliansk (ingen accenttaster)
 br.noacc.kbd:de:Brasilianisch (ohne Akzente)
 br.noacc.kbd:fr:Brésilien (sans accents)
 br.noacc.kbd:pt:Brasileiro (without accent keys)
 br.noacc.kbd:es:Brasileño (without accent keys)
 
 by.kbd:en:Belarusian
+by.kbd:da:Hviderussisk
 by.kbd:de:Weißrussisch
 by.kbd:fr:Biélorusse
 
 centraleuropean.kbd:en:Central European
+centraleuropean.kbd:da:Centraleuropæisk
 centraleuropean.kbd:de:Zentral Europäisch
 centraleuropean.kbd:fr:Centre européen
 centraleuropean.kbd:es:Centroeuropeo
 
 centraleuropean.qwerty.kbd:en:Central European (QWERTY)
+centraleuropean.qwerty.kbd:da:Centraleuropæisk (QWERTY)
 centraleuropean.qwerty.kbd:de:Zentral Europäisch (QWERTY)
 centraleuropean.qwerty.kbd:fr:Centre européen (QWERTY)
 centraleuropean.qwerty.kbd:es:Centroeuropeo (QWERTY)
 
 colemak-dh.acc.kbd:en:Colemak Mod-DH ergonomic alternative
 colemak.acc.kbd:en:Colemak ergonomic alternative
+colemak.acc.kbd:da:Colemak ergonomisk alternativ
 
 cz.kbd:en:Czech (QWERTZ, accent keys)
+cz.kbd:da:Tjekkisk (QWERTZ, accenttaster)
 cz.kbd:de:Tschechisch (QWERTZ, mit Akzenten)
 cz.kbd:fr:Tchèque (QWERTZ, avec accents)
 cz.kbd:es:Checo (QWERTZ, con acentos)
 
+cz.kbd.from-ce:en:Czech
+cz.kbd.from-ce:da:Tjekkisk

Re: svn commit: r355585 - head/share/vt/keymaps

2019-12-10 Thread Stefan Eßer


Am 10.12.19 um 13:59 schrieb Ed Maste:
> On Tue, 10 Dec 2019 at 10:22, Stefan Eßer  wrote:
>>
>> Nobody seems to have noticed this problem for more than 5 years,
>> though.
> 
> Probably because there's no user-facing impact - nonexistent keymap
> files are just omitted from the list. I'm glad someone eventually
> looked and submitted a PR :)

Yes, I assumed so, they had been noticed before, else ...

> There are a couple of other keymap/font issue PRs that I'll try to look into.

I have just committed two small fixes that had been on my system for
quite long and I had forgotten about them (0x15 and 01xf used instead
of "nak" and "us" as in all other files).

At the time when I converted the syscons keymaps for vt, I had started
to write a converter from Linux keymaps to our style. But since we had
all major locales covered, I did not consider this conversion a
priority, I got side-tracked and did not complete that script.

I might restart that effort, if there is interest (important keymaps
missing in FreeBSD, but available for Linux).

Regards, STefan
___
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: r355591 - head/share/vt/keymaps

2019-12-10 Thread Stefan Esser
Author: se
Date: Tue Dec 10 19:52:29 2019
New Revision: 355591
URL: https://svnweb.freebsd.org/changeset/base/355591

Log:
  Replace two remaining hex values for control codes with their names.
  
  These were the only values in the range from 0 to 0x1f that were defined
  as hex values, all other occurances have been converted before.
  
  MFC after:1 week

Modified:
  head/share/vt/keymaps/hu.102.kbd
  head/share/vt/keymaps/us.kbd

Modified: head/share/vt/keymaps/hu.102.kbd
==
--- head/share/vt/keymaps/hu.102.kbdTue Dec 10 19:16:00 2019
(r355590)
+++ head/share/vt/keymaps/hu.102.kbdTue Dec 10 19:52:29 2019
(r355591)
@@ -48,7 +48,7 @@
   038   'l''L'ff ff 0x0141 nopff ff  C
   039   0xe9   0xc9   nopnop'$'nopnopnop C
   040   0xe1   0xc1   nopnop0xdf   nopnopnop C
-  041   '0'0x15   nopnopnopnopnopnop O
+  041   '0'naknopnopnopnopnopnop O
   042   lshift lshift lshift lshift lshift lshift lshift lshift  O
   043   0x0171 0x0170 fs fs 0xa4   nopfs fs  C
   044   'y''Y'em em '>''<'em em  C

Modified: head/share/vt/keymaps/us.kbd
==
--- head/share/vt/keymaps/us.kbdTue Dec 10 19:16:00 2019
(r355590)
+++ head/share/vt/keymaps/us.kbdTue Dec 10 19:52:29 2019
(r355591)
@@ -56,7 +56,7 @@
   050   'm''M'cr cr 'm''M'cr cr  C
   051   ',''<'nopnop',''<'nopnop O
   052   '.''>'nopnop'.''>'nopnop O
-  053   '/''?'0x1f   nop'/''?'nopnop O
+  053   '/''?'us nop'/''?'nopnop O
   054   rshift rshift rshift rshift rshift rshift rshift rshift  O
   055   '*''*''*''*''*''*''*''*' O
   056   lalt   lalt   lalt   lalt   lalt   lalt   lalt   laltO
___
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: r355590 - in head/usr.bin/sed: . tests tests/regress.multitest.out

2019-12-10 Thread Kyle Evans
On Tue, Dec 10, 2019 at 1:16 PM Kyle Evans  wrote:
>
> Author: kevans
> Date: Tue Dec 10 19:16:00 2019
> New Revision: 355590
> URL: https://svnweb.freebsd.org/changeset/base/355590
>
> Log:
>   sed: process \r, \n, and \t
>
>   This is both reasonable and a common GNUism that a lot of ported software
>   expects.
>
>   Universally process \r, \n, and \t into carriage return, newline, and tab
>   respectively. Newline still doesn't function in contexts where it can't
>   (e.g. BRE), but we process it anyways rather than passing
>   UB \n (escaped ordinary) through to the underlying regex engine.
>

This part of the message is wrong -- it would pass just an ordinary
'n', rather than an escaped ordinary, and lead to potential
false-positives if you think you're matching on an embedded newline
but instead match on 'n'. Further, my reading of POSIX's statement on
this leads me to believe that we have to treat it as a newline rather
than embedding it as 'n' or escaped-'n' which regex(3) will certainly
not interpret as a newline.

>   Adding a --posix flag to disable these was considered, but sed.1 already
>   declares this version of sed a super-set of POSIX specification and this
>   behavior is the most likely expected when one attempts to use one of these
>   escape sequences in pattern space.
>
>   This differs from pre-r197362 behavior in that we now honor the three
>   arguably most common escape sequences used with sed(1) and we do so outside
>   of character classes, too.
>
>   Other escape sequences, like \s and \S, will come later when GNU extensions
>   are added to libregex; sed will likely link against libregex by default,
>   since the GNU extensions tend to be fairly un-intrusive.
>
>   PR:   229925
>   Reviewed by:  bapt, emaste, pfg
>   Differential Revision:https://reviews.freebsd.org/D22750
>
___
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: r355590 - in head/usr.bin/sed: . tests tests/regress.multitest.out

2019-12-10 Thread Kyle Evans
Author: kevans
Date: Tue Dec 10 19:16:00 2019
New Revision: 355590
URL: https://svnweb.freebsd.org/changeset/base/355590

Log:
  sed: process \r, \n, and \t
  
  This is both reasonable and a common GNUism that a lot of ported software
  expects.
  
  Universally process \r, \n, and \t into carriage return, newline, and tab
  respectively. Newline still doesn't function in contexts where it can't
  (e.g. BRE), but we process it anyways rather than passing
  UB \n (escaped ordinary) through to the underlying regex engine.
  
  Adding a --posix flag to disable these was considered, but sed.1 already
  declares this version of sed a super-set of POSIX specification and this
  behavior is the most likely expected when one attempts to use one of these
  escape sequences in pattern space.
  
  This differs from pre-r197362 behavior in that we now honor the three
  arguably most common escape sequences used with sed(1) and we do so outside
  of character classes, too.
  
  Other escape sequences, like \s and \S, will come later when GNU extensions
  are added to libregex; sed will likely link against libregex by default,
  since the GNU extensions tend to be fairly un-intrusive.
  
  PR:   229925
  Reviewed by:  bapt, emaste, pfg
  Differential Revision:https://reviews.freebsd.org/D22750

Modified:
  head/usr.bin/sed/compile.c
  head/usr.bin/sed/tests/regress.multitest.out/8.22
  head/usr.bin/sed/tests/sed2_test.sh

Modified: head/usr.bin/sed/compile.c
==
--- head/usr.bin/sed/compile.c  Tue Dec 10 18:57:39 2019(r355589)
+++ head/usr.bin/sed/compile.c  Tue Dec 10 19:16:00 2019(r355590)
@@ -395,10 +395,21 @@ compile_delimited(char *p, char *d, int is_tr)
continue;
} else if (*p == '\\' && p[1] == '[') {
*d++ = *p++;
-   } else if (*p == '\\' && p[1] == c)
+   } else if (*p == '\\' && p[1] == c) {
p++;
-   else if (*p == '\\' && p[1] == 'n') {
-   *d++ = '\n';
+   } else if (*p == '\\' &&
+   (p[1] == 'n' || p[1] == 'r' || p[1] == 't')) {
+   switch (p[1]) {
+   case 'n':
+   *d++ = '\n';
+   break;
+   case 'r':
+   *d++ = '\r';
+   break;
+   case 't':
+   *d++ = '\t';
+   break;
+   }
p += 2;
continue;
} else if (*p == '\\' && p[1] == '\\') {
@@ -428,13 +439,29 @@ compile_ccl(char **sp, char *t)
*t++ = *s++;
if (*s == ']')
*t++ = *s++;
-   for (; *s && (*t = *s) != ']'; s++, t++)
+   for (; *s && (*t = *s) != ']'; s++, t++) {
if (*s == '[' && ((d = *(s+1)) == '.' || d == ':' || d == '=')) 
{
*++t = *++s, t++, s++;
for (c = *s; (*t = *s) != ']' || c != d; s++, t++)
if ((c = *s) == '\0')
return NULL;
+   } else if (*s == '\\') {
+   switch (s[1]) {
+   case 'n':
+   *t = '\n';
+   s++;
+   break;
+   case 'r':
+   *t = '\r';
+   s++;
+   break;
+   case 't':
+   *t = '\t';
+   s++;
+   break;
+   }
}
+   }
return (*s == ']') ? *sp = ++s, ++t : NULL;
 }
 
@@ -521,8 +548,23 @@ compile_subst(char *p, struct s_subst *s)
linenum, fname, 
*p);
if (s->maxbref < ref)
s->maxbref = ref;
-   } else if (*p == '&' || *p == '\\')
-   *sp++ = '\\';
+   } else {
+   switch (*p) {
+   case '&':
+   case '\\':
+   *sp++ = '\\';
+   break;
+   case 'n':
+   *p = '\n';
+   break;
+   case 'r':
+   *p = '\r';
+ 

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

2019-12-10 Thread Scott Long
Author: scottl
Date: Tue Dec 10 18:57:39 2019
New Revision: 355589
URL: https://svnweb.freebsd.org/changeset/base/355589

Log:
  Fix the TAA state machine to do the right thing when the TAA
  migitation is available in microcode and the operator has set
  the sysctl to automatic mode.
  
  Reported by:  Coverity
  CID: 1408334
  
  MFC after:3 days
  Sponsored by: Intel

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

Modified: head/sys/x86/x86/cpu_machdep.c
==
--- head/sys/x86/x86/cpu_machdep.c  Tue Dec 10 18:50:50 2019
(r355588)
+++ head/sys/x86/x86/cpu_machdep.c  Tue Dec 10 18:57:39 2019
(r355589)
@@ -1254,8 +1254,7 @@ x86_taa_recalculate(void)
/* Check to see what mitigation options the CPU gives us */
if (cpu_ia32_arch_caps & IA32_ARCH_CAP_TAA_NO) {
/* CPU is not suseptible to TAA */
-   taa_need = TAA_NONE;
-   taa_state = TAA_TAA_UC;
+   taa_need = TAA_TAA_UC;
} else if (cpu_ia32_arch_caps & IA32_ARCH_CAP_TSX_CTRL) {
/*
 * CPU can turn off TSX.  This is the next best option
___
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: r355588 - head/share/mk

2019-12-10 Thread Bryan Drewery
Author: bdrewery
Date: Tue Dec 10 18:50:50 2019
New Revision: 355588
URL: https://svnweb.freebsd.org/changeset/base/355588

Log:
  Fix WITHOUT_CLANG build.
  
  This decouples MK_LLVM_TARGET_ALL from MK_CLANG. It is fine if
  LLVM_TARGET_* are set even if MK_CLANG is disabled. It never
  made sense to depend MK_LLVM_TARGET_* to MK_CLANG (which I did
  in r335706).
  
  PR:   240507
  Reported by:  kevans, swills
  MFC after:2 weeks

Modified:
  head/share/mk/src.opts.mk

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Tue Dec 10 18:15:20 2019(r355587)
+++ head/share/mk/src.opts.mk   Tue Dec 10 18:50:50 2019(r355588)
@@ -128,6 +128,7 @@ __DEFAULT_YES_OPTIONS = \
 LIBPTHREAD \
 LIBTHR \
 LLVM_COV \
+LLVM_TARGET_ALL \
 LOADER_GELI \
 LOADER_LUA \
 LOADER_OFW \
@@ -219,7 +220,6 @@ __DEFAULT_NO_OPTIONS = \
 # RIGHT option is disabled.
 __DEFAULT_DEPENDENT_OPTIONS= \
CLANG_FULL/CLANG \
-   LLVM_TARGET_ALL/CLANG \
LOADER_VERIEXEC/BEARSSL \
LOADER_EFI_SECUREBOOT/LOADER_VERIEXEC \
VERIEXEC/BEARSSL \
@@ -281,9 +281,9 @@ __LLVM_TARGETS= \
x86
 __LLVM_TARGET_FILT=
C/(amd64|i386)/x86/:S/sparc64/sparc/:S/arm64/aarch64/:S/powerpc64/powerpc/
 .for __llt in ${__LLVM_TARGETS}
-# Default the given TARGET's LLVM_TARGET support to the value of MK_CLANG.
+# Default enable the given TARGET's LLVM_TARGET support
 .if ${__TT:${__LLVM_TARGET_FILT}} == ${__llt}
-__DEFAULT_DEPENDENT_OPTIONS+=  
LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/CLANG
+__DEFAULT_YES_OPTIONS+=LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}
 # Disable other targets for arm, to work around "relocation truncated
 # to fit" errors with BFD ld, since libllvm.a will get too large to link.
 .elif ${__T} == "arm"
@@ -291,8 +291,7 @@ __DEFAULT_NO_OPTIONS+=LLVM_TARGET_${__llt:tu}
 # aarch64 needs arm for -m32 support.
 .elif ${__TT} == "arm64" && ${__llt} == "arm"
 __DEFAULT_DEPENDENT_OPTIONS+=  LLVM_TARGET_ARM/LLVM_TARGET_AARCH64
-# Default the rest of the LLVM_TARGETs to the value of MK_LLVM_TARGET_ALL
-# which is based on MK_CLANG.
+# Default the rest of the LLVM_TARGETs to the value of MK_LLVM_TARGET_ALL.
 .else
 __DEFAULT_DEPENDENT_OPTIONS+=  
LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/LLVM_TARGET_ALL
 .endif
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r355587 - head/sys/vm

2019-12-10 Thread Mark Johnston
Author: markj
Date: Tue Dec 10 18:15:20 2019
New Revision: 355587
URL: https://svnweb.freebsd.org/changeset/base/355587

Log:
  Add a helper function to the swapout daemon's deactivation code.
  
  vm_swapout_object_deactivate_pages() is renamed to
  vm_swapout_object_deactivate(), and the loop body is moved into the new
  vm_swapout_object_deactivate_page().  This makes the code a bit easier
  to follow and is in preparation for some functional changes.
  
  Reviewed by:  jeff, kib
  Sponsored by: Netflix, Intel
  Differential Revision:https://reviews.freebsd.org/D22651

Modified:
  head/sys/vm/vm_swapout.c

Modified: head/sys/vm/vm_swapout.c
==
--- head/sys/vm/vm_swapout.cTue Dec 10 18:14:50 2019(r355586)
+++ head/sys/vm/vm_swapout.cTue Dec 10 18:15:20 2019(r355587)
@@ -165,13 +165,64 @@ static int last_swapin;
 static void swapclear(struct proc *);
 static int swapout(struct proc *);
 static void vm_swapout_map_deactivate_pages(vm_map_t, long);
-static void vm_swapout_object_deactivate_pages(pmap_t, vm_object_t, long);
+static void vm_swapout_object_deactivate(pmap_t, vm_object_t, long);
 static void swapout_procs(int action);
 static void vm_req_vmdaemon(int req);
 static void vm_thread_swapout(struct thread *td);
 
+static void
+vm_swapout_object_deactivate_page(pmap_t pmap, vm_page_t m, bool unmap)
+{
+   int act_delta;
+
+   if (vm_page_tryxbusy(m) == 0)
+   return;
+   VM_CNT_INC(v_pdpages);
+
+   /*
+* The page may acquire a wiring after this check.
+* The page daemon handles wired pages, so there is
+* no harm done if a wiring appears while we are
+* attempting to deactivate the page.
+*/
+   if (vm_page_wired(m) || !pmap_page_exists_quick(pmap, m)) {
+   vm_page_xunbusy(m);
+   return;
+   }
+   act_delta = pmap_ts_referenced(m);
+   vm_page_lock(m);
+   if ((m->a.flags & PGA_REFERENCED) != 0) {
+   if (act_delta == 0)
+   act_delta = 1;
+   vm_page_aflag_clear(m, PGA_REFERENCED);
+   }
+   if (!vm_page_active(m) && act_delta != 0) {
+   vm_page_activate(m);
+   m->a.act_count += act_delta;
+   } else if (vm_page_active(m)) {
+   /*
+* The page daemon does not requeue pages
+* after modifying their activation count.
+*/
+   if (act_delta == 0) {
+   m->a.act_count -= min(m->a.act_count, ACT_DECLINE);
+   if (unmap && m->a.act_count == 0) {
+   (void)vm_page_try_remove_all(m);
+   vm_page_deactivate(m);
+   }
+   } else {
+   vm_page_activate(m);
+   if (m->a.act_count < ACT_MAX - ACT_ADVANCE)
+   m->a.act_count += ACT_ADVANCE;
+   }
+   } else if (vm_page_inactive(m))
+   (void)vm_page_try_remove_all(m);
+   vm_page_unlock(m);
+   vm_page_xunbusy(m);
+}
+
 /*
- * vm_swapout_object_deactivate_pages
+ * vm_swapout_object_deactivate
  *
  * Deactivate enough pages to satisfy the inactive target
  * requirements.
@@ -179,12 +230,12 @@ static void vm_thread_swapout(struct thread *td);
  * The object and map must be locked.
  */
 static void
-vm_swapout_object_deactivate_pages(pmap_t pmap, vm_object_t first_object,
+vm_swapout_object_deactivate(pmap_t pmap, vm_object_t first_object,
 long desired)
 {
vm_object_t backing_object, object;
-   vm_page_t p;
-   int act_delta, remove_mode;
+   vm_page_t m;
+   bool unmap;
 
VM_OBJECT_ASSERT_LOCKED(first_object);
if ((first_object->flags & OBJ_FICTITIOUS) != 0)
@@ -197,63 +248,19 @@ vm_swapout_object_deactivate_pages(pmap_t pmap, vm_obj
REFCOUNT_COUNT(object->paging_in_progress) > 0)
goto unlock_return;
 
-   remove_mode = 0;
+   unmap = true;
if (object->shadow_count > 1)
-   remove_mode = 1;
+   unmap = false;
+
/*
 * Scan the object's entire memory queue.
 */
-   TAILQ_FOREACH(p, >memq, listq) {
+   TAILQ_FOREACH(m, >memq, listq) {
if (pmap_resident_count(pmap) <= desired)
goto unlock_return;
if (should_yield())
goto unlock_return;
-   if (vm_page_tryxbusy(p) == 0)
-   continue;
-   VM_CNT_INC(v_pdpages);
-
-   /*
-* The page may acquire a wiring after this check.
-   

svn commit: r355586 - in head/sys: amd64/amd64 amd64/include arm/include arm64/arm64 arm64/include dev/virtio/balloon i386/i386 i386/include mips/include mips/mips powerpc/aim powerpc/include riscv...

2019-12-10 Thread Mark Johnston
Author: markj
Date: Tue Dec 10 18:14:50 2019
New Revision: 355586
URL: https://svnweb.freebsd.org/changeset/base/355586

Log:
  Introduce vm_page_astate.
  
  This is a 32-bit structure embedded in each vm_page, consisting mostly
  of page queue state.  The use of a structure makes it easy to store a
  snapshot of a page's queue state in a stack variable and use cmpset
  loops to update that state without requiring the page lock.
  
  This change merely adds the structure and updates references to atomic
  state fields.  No functional change intended.
  
  Reviewed by:  alc, jeff, kib
  Sponsored by: Netflix, Intel
  Differential Revision:https://reviews.freebsd.org/D22650

Modified:
  head/sys/amd64/amd64/pmap.c
  head/sys/amd64/include/pmap.h
  head/sys/arm/include/pmap.h
  head/sys/arm64/arm64/pmap.c
  head/sys/arm64/include/pmap.h
  head/sys/dev/virtio/balloon/virtio_balloon.c
  head/sys/i386/i386/pmap.c
  head/sys/i386/include/pmap.h
  head/sys/mips/include/pmap.h
  head/sys/mips/mips/pmap.c
  head/sys/powerpc/aim/mmu_oea.c
  head/sys/powerpc/aim/mmu_oea64.c
  head/sys/powerpc/include/pmap.h
  head/sys/riscv/include/pmap.h
  head/sys/riscv/riscv/pmap.c
  head/sys/sparc64/include/pmap.h
  head/sys/vm/memguard.c
  head/sys/vm/swap_pager.c
  head/sys/vm/vm_mmap.c
  head/sys/vm/vm_object.c
  head/sys/vm/vm_page.c
  head/sys/vm/vm_page.h
  head/sys/vm/vm_pageout.c
  head/sys/vm/vm_swapout.c

Modified: head/sys/amd64/amd64/pmap.c
==
--- head/sys/amd64/amd64/pmap.c Tue Dec 10 14:35:38 2019(r355585)
+++ head/sys/amd64/amd64/pmap.c Tue Dec 10 18:14:50 2019(r355586)
@@ -6104,7 +6104,7 @@ retry:
("pmap_enter: no PV entry for %#lx", va));
if ((newpte & PG_MANAGED) == 0)
free_pv_entry(pmap, pv);
-   if ((om->aflags & PGA_WRITEABLE) != 0 &&
+   if ((om->a.flags & PGA_WRITEABLE) != 0 &&
TAILQ_EMPTY(>md.pv_list) &&
((om->flags & PG_FICTITIOUS) != 0 ||
TAILQ_EMPTY(_to_pvh(opa)->pv_list)))
@@ -7297,7 +7297,7 @@ pmap_remove_pages(pmap_t pmap)
pvh->pv_gen++;
if (TAILQ_EMPTY(>pv_list)) {
for (mt = m; mt < [NBPDR / 
PAGE_SIZE]; mt++)
-   if ((mt->aflags & 
PGA_WRITEABLE) != 0 &&
+   if ((mt->a.flags & 
PGA_WRITEABLE) != 0 &&

TAILQ_EMPTY(>md.pv_list))

vm_page_aflag_clear(mt, PGA_WRITEABLE);
}
@@ -7315,7 +7315,7 @@ pmap_remove_pages(pmap_t pmap)
pmap_resident_count_dec(pmap, 1);
TAILQ_REMOVE(>md.pv_list, pv, 
pv_next);
m->md.pv_gen++;
-   if ((m->aflags & PGA_WRITEABLE) != 0 &&
+   if ((m->a.flags & PGA_WRITEABLE) != 0 &&
TAILQ_EMPTY(>md.pv_list) &&
(m->flags & PG_FICTITIOUS) == 0) {
pvh = 
pa_to_pvh(VM_PAGE_TO_PHYS(m));

Modified: head/sys/amd64/include/pmap.h
==
--- head/sys/amd64/include/pmap.h   Tue Dec 10 14:35:38 2019
(r355585)
+++ head/sys/amd64/include/pmap.h   Tue Dec 10 18:14:50 2019
(r355586)
@@ -415,8 +415,8 @@ extern int pmap_pcid_enabled;
 extern int invpcid_works;
 
 #definepmap_page_get_memattr(m)((vm_memattr_t)(m)->md.pat_mode)
-#definepmap_page_is_write_mapped(m)(((m)->aflags & PGA_WRITEABLE) 
!= 0)
-#definepmap_unmapbios(va, sz)  pmap_unmapdev((va), (sz))
+#definepmap_page_is_write_mapped(m)(((m)->a.flags & PGA_WRITEABLE) 
!= 0)
+#definepmap_unmapbios(va, sz)  pmap_unmapdev((va), (sz))
 
 struct thread;
 

Modified: head/sys/arm/include/pmap.h
==
--- head/sys/arm/include/pmap.h Tue Dec 10 14:35:38 2019(r355585)
+++ head/sys/arm/include/pmap.h Tue Dec 10 18:14:50 2019(r355586)
@@ -47,7 +47,7 @@ extern vm_offset_t virtual_avail;
 extern vm_offset_t virtual_end;
 
 void *pmap_kenter_temporary(vm_paddr_t, int);
-#definepmap_page_is_write_mapped(m)(((m)->aflags & PGA_WRITEABLE) 
!= 0)
+#definepmap_page_is_write_mapped(m)(((m)->a.flags & PGA_WRITEABLE) 
!= 0)
 void pmap_page_set_memattr(vm_page_t, vm_memattr_t);
 
 void 

Re: svn commit: r355585 - head/share/vt/keymaps

2019-12-10 Thread Ed Maste
On Tue, 10 Dec 2019 at 10:22, Stefan Eßer  wrote:
>
> Nobody seems to have noticed this problem for more than 5 years,
> though.

Probably because there's no user-facing impact - nonexistent keymap
files are just omitted from the list. I'm glad someone eventually
looked and submitted a PR :)

There are a couple of other keymap/font issue PRs that I'll try to look into.
___
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: r355585 - head/share/vt/keymaps

2019-12-10 Thread Stefan Eßer
Am 10.12.19 um 15:35 schrieb Ed Maste:
> Author: emaste
> Date: Tue Dec 10 14:35:38 2019
> New Revision: 355585
> URL: https://svnweb.freebsd.org/changeset/base/355585
> 
> Log:
>   remove nonexistent from-* entries from vt INDEX.keymaps
>   
>   A number of entries of the form "de.kbd.from-cp850" existed in vt's
>   INDEX.keymaps, added in r270114, but these files do not exist.

Sorry, these were left-overs from my conversion process from
8 bit syscons charsets to UTF-8 for vt.

The names were meant to simplify QA by encoding the orginal
charset name in the file name.

Seems that I remembered to clean up the file names before the
final commit, but forgot to edit the INDEX.keymaps that contained
both the final and these intermediate names for my pre-commit
tests ...

Nobody seems to have noticed this problem for more than 5 years,
though.

Regards, STefan
___
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: r355585 - head/share/vt/keymaps

2019-12-10 Thread Ed Maste
Author: emaste
Date: Tue Dec 10 14:35:38 2019
New Revision: 355585
URL: https://svnweb.freebsd.org/changeset/base/355585

Log:
  remove nonexistent from-* entries from vt INDEX.keymaps
  
  A number of entries of the form "de.kbd.from-cp850" existed in vt's
  INDEX.keymaps, added in r270114, but these files do not exist.
  
  PR:   235564
  Submitted by: scootergrisen gmail com
  MFC after:1 week

Modified:
  head/share/vt/keymaps/INDEX.keymaps

Modified: head/share/vt/keymaps/INDEX.keymaps
==
--- head/share/vt/keymaps/INDEX.keymaps Tue Dec 10 14:07:05 2019
(r355584)
+++ head/share/vt/keymaps/INDEX.keymaps Tue Dec 10 14:35:38 2019
(r355585)
@@ -92,16 +92,6 @@ cz.kbd:de:Tschechisch (QWERTZ, mit Akzenten)
 cz.kbd:fr:Tchèque (QWERTZ, avec accents)
 cz.kbd:es:Checo (QWERTZ, con acentos)
 
-cz.kbd.from-ce:en:Czech
-cz.kbd.from-ce:de:Tschechisch
-cz.kbd.from-ce:fr:Tchèque
-cz.kbd.from-ce:es:Checo
-
-cz.qwerty.kbd.from-ce:en:Czech (QWERTY)
-cz.qwerty.kbd.from-ce:de:Tschechisch (QWERTY)
-cz.qwerty.kbd.from-ce:fr:Tchèquey (QWERTY)
-cz.qwerty.kbd.from-ce:es:Checo (QWERTY)
-
 dk.kbd:en:Danish
 dk.kbd:da:Dansk
 dk.kbd:de:Dänisch
@@ -116,13 +106,6 @@ dk.acc.kbd:fr:Danois (avec accents)
 dk.acc.kbd:pt:Dinamarquês (com acentos)
 dk.acc.kbd:es:Danés (con acentos)
 
-dk.kbd.from-cp865:en:Danish
-dk.kbd.from-cp865:da:Dansk
-dk.kbd.from-cp865:de:Dänisch
-dk.kbd.from-cp865:fr:Danois
-dk.kbd.from-cp865:pt:Dinamarquês
-dk.kbd.from-cp865:es:Danés
-
 dk.macbook.kbd:en:Danish (macbook)
 dk.macbook.kbd:da:Dansk (macbook)
 dk.macbook.kbd:de:Dänisch (Macbook)
@@ -140,31 +123,16 @@ gr.kbd:en:Greek (104 keys)
 gr.kbd:fr:Grec (104 touches)
 gr.kbd:el:Ελληνικό (104 πλήκτρων)
 
-ee.kbd.from-iso1:en:Estonian
-ee.kbd.from-iso1:de:Estnisch
-ee.kbd.from-iso1:fr:Estonien
-ee.kbd.from-iso1:es:Estonio
-
 ee.kbd:en:Estonian
 ee.kbd:de:Estnisch
 ee.kbd:fr:Estonien
 ee.kbd:es:Estonio
 
-ee.kbd.from-cp850:en:Estonian
-ee.kbd.from-cp850:de:Estnisch
-ee.kbd.from-cp850:fr:Estonien
-ee.kbd.from-cp850:es:Estonio
-
 fi.kbd:en:Finnish
 fi.kbd:de:Finnisch
 fi.kbd:fr:Finlandais
 fi.kbd:es:Finlandés
 
-fi.kbd.from-cp850:en:Finnish
-fi.kbd.from-cp850:de:Finnisch
-fi.kbd.from-cp850:fr:Finlandais
-fi.kbd.from-cp850:es:Finlandés
-
 fr.kbd:en:French
 fr.kbd:de:Französisch
 fr.kbd:fr:Français
@@ -229,13 +197,6 @@ de.noacc.kbd:pt:Alemão (no accent keys)
 de.noacc.kbd:es:Alemán (no accent keys)
 de.noacc.kbd:uk:Німецька (no accent keys)
 
-de.kbd.from-cp850:en:German
-de.kbd.from-cp850:de:Deutsch
-de.kbd.from-cp850:fr:Allemand
-de.kbd.from-cp850:pt:Alemão
-de.kbd.from-cp850:es:Alemán
-de.kbd.from-cp850:uk:Німецька
-
 gr.elot.acc.kbd:en:Greek ELOT
 gr.elot.acc.kbd:de:Grieschisch ELOT
 gr.elot.acc.kbd:fr:Grec ELOT
@@ -367,22 +328,6 @@ pt.acc.kbd:fr:Portugais (avec accents)
 pt.acc.kbd:pt:Português (com acentos)
 pt.acc.kbd:es:Portugués (con acentos)
 
-ru.kbd.from-cp866:en:Russian (alternative)
-ru.kbd.from-cp866:de:Russisch (alternativ)
-ru.kbd.from-cp866:ru:Русский (alternative)
-ru.kbd.from-cp866:fr:Russe (alternative)
-ru.kbd.from-cp866:pt:Russo (alternativo)
-ru.kbd.from-cp866:es:Ruso (alternativo)
-ru.kbd.from-cp866:uk:Російська (альтернативна)
-
-ru.kbd.from-iso5:en:Russian
-ru.kbd.from-iso5:de:Russisch
-ru.kbd.from-iso5:fr:Russe
-ru.kbd.from-iso5:ru:Русский
-ru.kbd.from-iso5:pt:Russo
-ru.kbd.from-iso5:es:Ruso
-ru.kbd.from-iso5:uk:Російський
-
 ru.kbd:en:Russian
 ru.kbd:de:Russisch
 ru.kbd:ru:Русский
@@ -413,12 +358,6 @@ es.dvorak.kbd:fr:Espagnol Dvorak
 es.dvorak.kbd:pt:Espanhol Dvorak
 es.dvorak.kbd:es:Español Dvorak
 
-es.kbd.from-iso1:en:Spanish
-es.kbd.from-iso1:de:Spanisch
-es.kbd.from-iso1:fr:Espagnol
-es.kbd.from-iso1:pt:Espanhol
-es.kbd.from-iso1:es:Español
-
 es.acc.kbd:en:Spanish (accent keys)
 es.acc.kbd:de:Spanisch (accent keys)
 es.acc.kbd:fr:Espagnol (avec accents)
@@ -447,11 +386,6 @@ se.kbd:de:Schwedisch
 se.kbd:fr:Suédois
 se.kbd:pt,es:Sueco
 
-se.kbd.from-cp850:en:Swedish
-se.kbd.from-cp850:de:Schwedisch
-se.kbd.from-cp850:fr:Suédois
-se.kbd.from-cp850:pt,es:Sueco
-
 ch-fr.kbd:en:Swiss-French
 ch-fr.kbd:de:Schweiz-Französisch
 ch-fr.kbd:fr:Suisse-Français
@@ -462,11 +396,6 @@ ch-fr.acc.kbd:de:Schweiz-Französisch (mit Akzenten)
 ch-fr.acc.kbd:fr:Suisse-Français (avec accents)
 ch-fr.acc.kbd:es:Francosuizo (con acentos)
 
-ch-fr.kbd.from-cp850:en:Swiss-French
-ch-fr.kbd.from-cp850:de:Schweiz-Französisch
-ch-fr.kbd.from-cp850:fr:Suisse-Français
-ch-fr.kbd.from-cp850:es:Francosuizo
-
 ch.kbd:en:Swiss-German
 ch.kbd:de:Schweiz-Deutsch
 ch.kbd:fr:Suisse-Allemand
@@ -479,12 +408,6 @@ ch.acc.kbd:fr:Suisse-Allemand (avec accents)
 ch.acc.kbd:pt:Suiço-Alemão (com acentos)
 ch.acc.kbd:es:Germanosuizo (con acentos)
 
-ch.kbd.from-cp850:en:Swiss-German
-ch.kbd.from-cp850:de:Schweiz-Deutsch
-ch.kbd.from-cp850:fr:Suisse-Allemand
-ch.kbd.from-cp850:pt:Suiço-Alemão
-ch.kbd.from-cp850:es:Germanosuizo
-
 ch.macbook.acc.kbd:en:Swiss-German Macbook/Macbook Pro 

svn commit: r355584 - head/sys/ufs/ufs

2019-12-10 Thread Konstantin Belousov
Author: kib
Date: Tue Dec 10 14:07:05 2019
New Revision: 355584
URL: https://svnweb.freebsd.org/changeset/base/355584

Log:
  UFS: implement VOP_INACTIVE()
  
  The checks literally repeat conditions that make ufs_inactive() to
  take some actions.
  
  Reviewed by:  jeff
  Tested by:pho
  Sponsored by: The FreeBSD Foundation
  Differential revision:https://reviews.freebsd.org/D22616

Modified:
  head/sys/ufs/ufs/ufs_extern.h
  head/sys/ufs/ufs/ufs_inode.c
  head/sys/ufs/ufs/ufs_vnops.c

Modified: head/sys/ufs/ufs/ufs_extern.h
==
--- head/sys/ufs/ufs/ufs_extern.h   Tue Dec 10 13:52:08 2019
(r355583)
+++ head/sys/ufs/ufs/ufs_extern.h   Tue Dec 10 14:07:05 2019
(r355584)
@@ -79,6 +79,7 @@ intufs_inactive(struct vop_inactive_args *);
 int ufs_init(struct vfsconf *);
 voidufs_itimes(struct vnode *vp);
 int ufs_lookup(struct vop_cachedlookup_args *);
+int ufs_need_inactive(struct vop_need_inactive_args *);
 int ufs_readdir(struct vop_readdir_args *);
 int ufs_reclaim(struct vop_reclaim_args *);
 voidffs_snapgone(struct inode *);

Modified: head/sys/ufs/ufs/ufs_inode.c
==
--- head/sys/ufs/ufs/ufs_inode.cTue Dec 10 13:52:08 2019
(r355583)
+++ head/sys/ufs/ufs/ufs_inode.cTue Dec 10 14:07:05 2019
(r355584)
@@ -63,6 +63,40 @@ __FBSDID("$FreeBSD$");
 #include 
 #endif
 
+int
+ufs_need_inactive(ap)
+   struct vop_need_inactive_args *ap;
+{
+   struct vnode *vp;
+   struct inode *ip;
+#ifdef QUOTA
+   int i;
+#endif
+
+   vp = ap->a_vp;
+   ip = VTOI(vp);
+   if (UFS_RDONLY(ip))
+   return (0);
+   if (ip->i_mode == 0 ||  ip->i_nlink <= 0 ||
+   (ip->i_effnlink == 0 && DOINGSOFTDEP(vp)) ||
+   (ip->i_flag & (IN_ACCESS | IN_CHANGE | IN_MODIFIED |
+   IN_UPDATE)) != 0 ||
+   (ip->i_effnlink <= 0 && (ip->i_size != 0 || (I_IS_UFS2(ip) &&
+   ip->i_din2->di_extsize != 0
+   return (1);
+#ifdef QUOTA
+   for (i = 0; i < MAXQUOTAS; i++) {
+   if (ip->i_dquot[i] != NULL)
+   return (1);
+   }
+#endif
+   /*
+* No need to check ufs_gjournal_close() condition since we
+* return 1 if only i_nlink <= 0.
+*/
+   return (0);
+}
+
 /*
  * Last reference to an inode.  If necessary, write or delete it.
  */

Modified: head/sys/ufs/ufs/ufs_vnops.c
==
--- head/sys/ufs/ufs/ufs_vnops.cTue Dec 10 13:52:08 2019
(r355583)
+++ head/sys/ufs/ufs/ufs_vnops.cTue Dec 10 14:07:05 2019
(r355584)
@@ -2742,6 +2742,7 @@ struct vop_vector ufs_vnodeops = {
.vop_markatime =ufs_markatime,
.vop_mkdir =ufs_mkdir,
.vop_mknod =ufs_mknod,
+   .vop_need_inactive =ufs_need_inactive,
.vop_open = ufs_open,
.vop_pathconf = ufs_pathconf,
.vop_poll = vop_stdpoll,
___
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: r355583 - in head/share: syscons/fonts syscons/keymaps vt/keymaps

2019-12-10 Thread Ed Maste
Author: emaste
Date: Tue Dec 10 13:52:08 2019
New Revision: 355583
URL: https://svnweb.freebsd.org/changeset/base/355583

Log:
  strip trailing whitespace from font and keymap INDEX files
  
  PR:   235853
  Submitted by: scootergrisen gmail com
  MFC after:1 week

Modified:
  head/share/syscons/fonts/INDEX.fonts
  head/share/syscons/keymaps/INDEX.keymaps
  head/share/vt/keymaps/INDEX.keymaps

Modified: head/share/syscons/fonts/INDEX.fonts
==
--- head/share/syscons/fonts/INDEX.fontsTue Dec 10 12:12:48 2019
(r355582)
+++ head/share/syscons/fonts/INDEX.fontsTue Dec 10 13:52:08 2019
(r355583)
@@ -1,7 +1,7 @@
 #
 # $FreeBSD$
 #
-# database for vidfont(8) 
+# database for vidfont(8)
 #
 # Format ::
 #
@@ -25,21 +25,21 @@
 # ISO 8859-1 supports the following languages:
 # Afrikaans, Catalan, Danish, Dutch, English, Faroese, Finnish, French,
 # German, Galician, Irish, Icelandic, Italian, Norwegian, Portuguese,
-# Spanish and Swedish. 
-# 
+# Spanish and Swedish.
+#
 # (It has been called to my attention that Albanian can be written with
 # ISO 8859-1 also.  However, from a standards point of view, ISO 8859-2
 # is the appropriate character set for Balkan countries.)
-# 
+#
 # ISO 8859-1 is just one part of the ISO-8859 standard, which specifies
 # several character sets, e.g.:
 # 8859-1  Europe, Latin America
 # 8859-2  Eastern Europe
-# 8859-3  SE Europe/miscellaneous (Esperanto, Maltese, etc.) 
+# 8859-3  SE Europe/miscellaneous (Esperanto, Maltese, etc.)
 # 8859-4  Scandinavia/Baltic (mostly covered by 8859-1 also)
 # 8859-5  Cyrillic
 # 8859-6  Arabic
-# 8859-7  Greek 
+# 8859-7  Greek
 # 8859-8  Hebrew
 # 8859-9  Latin5, same as 8859-1 except for Turkish instead of Icelandic
 # 8859-10 Latin6, for Eskimo/Scandinavian languages
@@ -70,17 +70,17 @@ FONT:hy:armscii8-8x16.fnt
 #
 armscii8-8x16.fnt:hy:ARMSCII-8 �ṳ���ٳ� �۳�, 8x16
 armscii8-8x16.fnt:ru:� ARMSCII-8, 8x16
-armscii8-8x16.fnt:en:ARMSCII-8 Character set, 8x16 
-armscii8-8x16.fnt:de:ARMSCII-8 Zeichensatz, 8x16 
+armscii8-8x16.fnt:en:ARMSCII-8 Character set, 8x16
+armscii8-8x16.fnt:de:ARMSCII-8 Zeichensatz, 8x16
 
 armscii8-8x14.fnt:hy:ARMSCII-8 �ṳ���ٳ� �۳�, 8x14
 armscii8-8x14.fnt:ru:� ARMSCII-8, 8x14
-armscii8-8x14.fnt:en:ARMSCII-8 Character set, 8x14 
+armscii8-8x14.fnt:en:ARMSCII-8 Character set, 8x14
 armscii8-8x14.fnt:de:ARMSCII-8 Zeichensatz, 8x14
 
 armscii8-8x8.fnt:hy:ARMSCII-8 �ṳ���ٳ� �۳�, 8x8
 armscii8-8x8.fnt:ru:� ARMSCII-8, 8x8
-armscii8-8x8.fnt:en:ARMSCII-8 Character set, 8x8 
+armscii8-8x8.fnt:en:ARMSCII-8 Character set, 8x8
 armscii8-8x8.fnt:de:ARMSCII-8 Zeichensatz, 8x8
 
 cp437-8x14.fnt:en:Codepage 437 English, 8x14

Modified: head/share/syscons/keymaps/INDEX.keymaps
==
--- head/share/syscons/keymaps/INDEX.keymapsTue Dec 10 12:12:48 2019
(r355582)
+++ head/share/syscons/keymaps/INDEX.keymapsTue Dec 10 13:52:08 2019
(r355583)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 #
-# database for kbdmap(8) 
+# database for kbdmap(8)
 #
 # Format ::
 #
@@ -9,7 +9,7 @@
 # lang: lang,lang
 #
 # If lang empty use 'en' (us-english) as default.
-# 
+#
 # Example:
 #  german.iso.kbd:de:deutsch ISO-8859-1
 #  german.iso.kbd:en:german ISO-8859-1
@@ -40,7 +40,7 @@ FONT:he:iso08-8x16.fnt
 FONT:uk:koi8-u-8x16.fnt
 FONT:el:iso07-8x16.fnt
 FONT:hy:haik8-8x16.fnt
-# 
+#
 be.iso.kbd:en:Belgian ISO-8859-1
 be.iso.kbd:de:Belgisch ISO-8859-1
 be.iso.kbd:fr:Belge ISO-8859-1
@@ -547,7 +547,7 @@ us.dvorakr.kbd:pt:Estados Unidos da Am�rica dvorakr
 us.dvorakr.kbd:es:Estadounidense dvorak diestro
 
 us.dvorakl.kbd:en:United States of America lefthand dvorak
-us.dvorakl.kbd:de:US-amerikanisch dvorak linke Hand 
+us.dvorakl.kbd:de:US-amerikanisch dvorak linke Hand
 us.dvorakl.kbd:fr:�tats Unis d'Am�rique dvorakl
 us.dvorakl.kbd:pt:Estados Unidos da Am�rica dvorakl
 us.dvorakl.kbd:es:Estadounidense dvorak zurdo

Modified: head/share/vt/keymaps/INDEX.keymaps
==
--- head/share/vt/keymaps/INDEX.keymaps Tue Dec 10 12:12:48 2019
(r355582)
+++ head/share/vt/keymaps/INDEX.keymaps Tue Dec 10 13:52:08 2019
(r355583)
@@ -1,6 +1,6 @@
 # $FreeBSD$
 #
-# database for kbdmap(8) 
+# database for kbdmap(8)
 #
 # Format ::
 #
@@ -9,7 +9,7 @@
 # lang: lang,lang
 #
 # If lang empty use 'en' (us-english) as default.
-# 
+#
 # Example:
 #  german.iso.kbd:de:deutsch
 #  german.iso.kbd:en:german
@@ -552,7 +552,7 @@ us.dvorakr.kbd:pt:Estados Unidos da América dvorakr
 us.dvorakr.kbd:es:Estadounidense dvorak diestro
 
 us.dvorakl.kbd:en:United States of America lefthand dvorak
-us.dvorakl.kbd:de:US-amerikanisch dvorak linke Hand 
+us.dvorakl.kbd:de:US-amerikanisch dvorak linke Hand
 us.dvorakl.kbd:fr:États Unis d'Amérique dvorakl
 

svn commit: r355582 - head/share/mk

2019-12-10 Thread Alex Richardson
Author: arichardson
Date: Tue Dec 10 12:12:48 2019
New Revision: 355582
URL: https://svnweb.freebsd.org/changeset/base/355582

Log:
  Use ${.ALLSRC:Ninstalldirs-*} instead of assuming order of .ALLSRC
  
  This is a follow-up to https://reviews.freebsd.org/D22382
  
  Suggested By: sjg

Modified:
  head/share/mk/bsd.files.mk

Modified: head/share/mk/bsd.files.mk
==
--- head/share/mk/bsd.files.mk  Tue Dec 10 10:35:32 2019(r355581)
+++ head/share/mk/bsd.files.mk  Tue Dec 10 12:12:48 2019(r355582)
@@ -116,7 +116,7 @@ installfiles-${group}: _${group}INS_${file}
 _${group}INS_${file}: ${file} installdirs-${_${group}DIR_${file}}
${INSTALL} ${${group}TAG_ARGS} -o ${${group}OWN_${file}} \
-g ${${group}GRP_${file}} -m ${${group}MODE_${file}} \
-   ${.ALLSRC:[1]} ${${group}PREFIX_${file}}/${${group}NAME_${file}}
+   ${.ALLSRC:Ninstalldirs-*} 
${${group}PREFIX_${file}}/${${group}NAME_${file}}
 .endfor # file in ${${group}}
 
 .endif # defined(${group}) && !empty(${group})
___
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: r355581 - head/sys/netpfil/ipfw

2019-12-10 Thread Andrey V. Elsukov
Author: ae
Date: Tue Dec 10 10:35:32 2019
New Revision: 355581
URL: https://svnweb.freebsd.org/changeset/base/355581

Log:
  Avoid access to stale ip pointer and call UPDATE_POINTERS() after
  PULLUP_LEN_LOCKED().
  
  PULLUP_LEN_LOCKED() could update mbuf and thus we need to update related
  pointers that can be used in next opcodes.
  
  Reported by:  Maxime Villard 
  MFC after:1 week

Modified:
  head/sys/netpfil/ipfw/ip_fw2.c

Modified: head/sys/netpfil/ipfw/ip_fw2.c
==
--- head/sys/netpfil/ipfw/ip_fw2.c  Tue Dec 10 08:16:19 2019
(r355580)
+++ head/sys/netpfil/ipfw/ip_fw2.c  Tue Dec 10 10:35:32 2019
(r355581)
@@ -1465,7 +1465,8 @@ do {  
\
 
 #definePULLUP_LEN(_len, p, T)  _PULLUP_LOCKED(_len, p, T, )
 #definePULLUP_LEN_LOCKED(_len, p, T)   \
-_PULLUP_LOCKED(_len, p, T, IPFW_PF_RUNLOCK(chain))
+_PULLUP_LOCKED(_len, p, T, IPFW_PF_RUNLOCK(chain));\
+UPDATE_POINTERS()
 /*
  * In case pointers got stale after pullups, update them.
  */
___
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: r355487 - in head/sys: arm64/arm64 arm64/include conf

2019-12-10 Thread Peter Jeremy
On 2019-Dec-09 08:38:01 -0600, Kyle Evans  wrote:
...
>> +static vm_offset_t
>> +freebsd_parse_boot_param(struct arm64_bootparams *abp)
>> +{
>> +   vm_offset_t lastaddr = 0;
>> +   void *kmdp;
>> +#ifdef DDB
>> +   vm_offset_t ksym_start;
>> +   vm_offset_t ksym_end;
>> +#endif
>> +
>> +   if (abp->modulep == 0)
>> +   return (0);
>> +
>> +   preload_metadata = (caddr_t)(uintptr_t)(abp->modulep);
>> +   kmdp = preload_search_by_type("elf kernel");
>> +   if (kmdp == NULL)
>> +   return (0);
>> +
>> +   boothowto = MD_FETCH(kmdp, MODINFOMD_HOWTO, int);
>> +   loader_envp = MD_FETCH(kmdp, MODINFOMD_ENVP, char *);
>> +   init_static_kenv(static_kenv, 0);
>
>This should read "loader_envp" instead of "static_kenv" -- as written,
>it stomps over the kenv provided by loader.

Which breaks diskless booting and NFS root.  Changing static_kenv to
loader_envp unbreaks the kernel.

-- 
Peter Jeremy


signature.asc
Description: PGP signature


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

2019-12-10 Thread Navdeep Parhar
Author: np
Date: Tue Dec 10 08:16:19 2019
New Revision: 355580
URL: https://svnweb.freebsd.org/changeset/base/355580

Log:
  cxgbe(4): Use TX_PKTS2 work requests in netmap Tx if it's available.
  
  TX_PKTS2 is more efficient within the firmware and this improves netmap
  Tx by a few Mpps in some common scenarios.
  
  MFC after:1 week
  Sponsored by: Chelsio Communications

Modified:
  head/sys/dev/cxgbe/adapter.h
  head/sys/dev/cxgbe/t4_netmap.c
  head/sys/dev/cxgbe/t4_sge.c

Modified: head/sys/dev/cxgbe/adapter.h
==
--- head/sys/dev/cxgbe/adapter.hTue Dec 10 07:45:10 2019
(r355579)
+++ head/sys/dev/cxgbe/adapter.hTue Dec 10 08:16:19 2019
(r355580)
@@ -743,6 +743,7 @@ struct sge_nm_txq {
u_int udb_qid;
u_int cntxt_id;
__be32 cpl_ctrl0;   /* for convenience */
+   __be32 op_pkd;  /* ditto */
u_int nid;  /* netmap ring # for this queue */
 
/* infrequently used items after this */

Modified: head/sys/dev/cxgbe/t4_netmap.c
==
--- head/sys/dev/cxgbe/t4_netmap.c  Tue Dec 10 07:45:10 2019
(r355579)
+++ head/sys/dev/cxgbe/t4_netmap.c  Tue Dec 10 08:16:19 2019
(r355580)
@@ -573,7 +573,10 @@ ndesc_to_npkt(const int n)
 }
 #define MAX_NPKT_IN_TYPE1_WR   (ndesc_to_npkt(SGE_MAX_WR_NDESC))
 
-/* Space (in descriptors) needed for a type1 WR that carries n packets */
+/*
+ * Space (in descriptors) needed for a type1 WR (TX_PKTS or TX_PKTS2) that
+ * carries n packets
+ */
 static inline int
 npkt_to_ndesc(const int n)
 {
@@ -583,7 +586,10 @@ npkt_to_ndesc(const int n)
return ((n + 2) / 2);
 }
 
-/* Space (in 16B units) needed for a type1 WR that carries n packets */
+/*
+ * Space (in 16B units) needed for a type1 WR (TX_PKTS or TX_PKTS2) that
+ * carries n packets
+ */
 static inline int
 npkt_to_len16(const int n)
 {
@@ -670,7 +676,7 @@ cxgbe_nm_tx(struct adapter *sc, struct sge_nm_txq *nm_
len = 0;
 
wr = (void *)_txq->desc[nm_txq->pidx];
-   wr->op_pkd = htobe32(V_FW_WR_OP(FW_ETH_TX_PKTS_WR));
+   wr->op_pkd = nm_txq->op_pkd;
wr->equiq_to_len16 = htobe32(V_FW_WR_LEN16(npkt_to_len16(n)));
wr->npkt = n;
wr->r3 = 0;
@@ -778,7 +784,8 @@ reclaim_nm_tx_desc(struct sge_nm_txq *nm_txq)
while (nm_txq->cidx != hw_cidx) {
wr = (void *)_txq->desc[nm_txq->cidx];
 
-   MPASS(wr->op_pkd == htobe32(V_FW_WR_OP(FW_ETH_TX_PKTS_WR)));
+   MPASS(wr->op_pkd == htobe32(V_FW_WR_OP(FW_ETH_TX_PKTS_WR)) ||
+   wr->op_pkd == htobe32(V_FW_WR_OP(FW_ETH_TX_PKTS2_WR)));
MPASS(wr->type == 1);
MPASS(wr->npkt > 0 && wr->npkt <= MAX_NPKT_IN_TYPE1_WR);
 

Modified: head/sys/dev/cxgbe/t4_sge.c
==
--- head/sys/dev/cxgbe/t4_sge.c Tue Dec 10 07:45:10 2019(r355579)
+++ head/sys/dev/cxgbe/t4_sge.c Tue Dec 10 08:16:19 2019(r355580)
@@ -3754,6 +3754,10 @@ alloc_nm_txq(struct vi_info *vi, struct sge_nm_txq *nm
nm_txq->cpl_ctrl0 = htobe32(V_TXPKT_OPCODE(CPL_TX_PKT) |
V_TXPKT_INTF(pi->tx_chan) | V_TXPKT_PF(sc->pf) |
V_TXPKT_VF(vi->vin) | V_TXPKT_VF_VLD(vi->vfvld));
+   if (sc->params.fw_vers >= FW_VERSION32(1, 24, 11, 0))
+   nm_txq->op_pkd = htobe32(V_FW_WR_OP(FW_ETH_TX_PKTS2_WR));
+   else
+   nm_txq->op_pkd = htobe32(V_FW_WR_OP(FW_ETH_TX_PKTS_WR));
nm_txq->cntxt_id = INVALID_NM_TXQ_CNTXT_ID;
 
snprintf(name, sizeof(name), "%d", idx);
___
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"