CVS commit: src/sys/dev/pci/ixgbe

2023-12-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Dec 30 06:16:44 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c ixgbe.h

Log Message:
ixgbe: Use #ifdef RSC

 This feature (hardware receive side coalescing) has been disabled all along,
so enclose the code with #ifdef RSC.


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.97 -r1.98 src/sys/dev/pci/ixgbe/ixgbe.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/ixgbe/ix_txrx.c
diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.115 src/sys/dev/pci/ixgbe/ix_txrx.c:1.116
--- src/sys/dev/pci/ixgbe/ix_txrx.c:1.115	Fri Dec 29 07:36:47 2023
+++ src/sys/dev/pci/ixgbe/ix_txrx.c	Sat Dec 30 06:16:44 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ix_txrx.c,v 1.115 2023/12/29 07:36:47 msaitoh Exp $ */
+/* $NetBSD: ix_txrx.c,v 1.116 2023/12/30 06:16:44 msaitoh Exp $ */
 
 /**
 
@@ -64,13 +64,14 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.115 2023/12/29 07:36:47 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.116 2023/12/30 06:16:44 msaitoh Exp $");
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
 
 #include "ixgbe.h"
 
+#ifdef RSC
 /*
  * HW RSC control:
  *  this feature only works with
@@ -84,6 +85,7 @@ __KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 
  *  to enable.
  */
 static bool ixgbe_rsc_enable = FALSE;
+#endif
 
 #ifdef IXGBE_FDIR
 /*
@@ -124,8 +126,9 @@ static __inline void ixgbe_rx_input(stru
 static int   ixgbe_dma_malloc(struct ixgbe_softc *, bus_size_t,
   struct ixgbe_dma_alloc *, int);
 static void  ixgbe_dma_free(struct ixgbe_softc *, struct ixgbe_dma_alloc *);
-
+#ifdef RSC
 static void	 ixgbe_setup_hw_rsc(struct rx_ring *);
+#endif
 
 /
  * ixgbe_legacy_start_locked - Transmit entry point
@@ -1258,6 +1261,7 @@ ixgbe_txeof(struct tx_ring *txr)
 	return ((limit > 0) ? false : true);
 } /* ixgbe_txeof */
 
+#ifdef RSC
 /
  * ixgbe_rsc_count
  *
@@ -1334,6 +1338,7 @@ ixgbe_setup_hw_rsc(struct rx_ring *rxr)
 
 	rxr->hw_rsc = TRUE;
 } /* ixgbe_setup_hw_rsc */
+#endif
 
 /
  * ixgbe_refresh_mbufs
@@ -1596,10 +1601,15 @@ ixgbe_setup_receive_ring(struct rx_ring 
 	/*
 	 * Now set up the LRO interface
 	 */
+#ifdef RSC
 	if (ixgbe_rsc_enable)
 		ixgbe_setup_hw_rsc(rxr);
+#endif
 #ifdef LRO
-	else if (ifp->if_capenable & IFCAP_LRO) {
+#ifdef RSC
+	else
+#endif
+	if (ifp->if_capenable & IFCAP_LRO) {
 		device_t dev = sc->dev;
 		int err = tcp_lro_init(lro);
 		if (err) {
@@ -1867,7 +1877,10 @@ ixgbe_rxeof(struct ix_queue *que)
 
 		struct mbuf *sendmp, *mp;
 		struct mbuf *newmp;
-		u32 rsc, ptype;
+#ifdef RSC
+		u32 rsc;
+#endif
+		u32 ptype;
 		u16 len;
 		u16 vtag = 0;
 		booleop;
@@ -1902,7 +1915,9 @@ ixgbe_rxeof(struct ix_queue *que)
 		loopcount++;
 		sendmp = newmp = NULL;
 		nbuf = NULL;
+#ifdef RSC
 		rsc = 0;
+#endif
 		cur->wb.upper.status_error = 0;
 		rbuf = >rx_buffers[i];
 		mp = rbuf->buf;
@@ -1988,6 +2003,7 @@ ixgbe_rxeof(struct ix_queue *que)
 			 * Figure out the next descriptor
 			 * of this frame.
 			 */
+#ifdef RSC
 			if (rxr->hw_rsc == TRUE) {
 rsc = ixgbe_rsc_count(cur);
 rxr->rsc_num += (rsc - 1);
@@ -1995,7 +2011,9 @@ ixgbe_rxeof(struct ix_queue *que)
 			if (rsc) { /* Get hardware index */
 nextp = ((staterr & IXGBE_RXDADV_NEXTP_MASK) >>
 IXGBE_RXDADV_NEXTP_SHIFT);
-			} else { /* Just sequential */
+			} else
+#endif
+			{ /* Just sequential */
 nextp = i + 1;
 if (nextp == sc->num_rx_desc)
 	nextp = 0;

Index: src/sys/dev/pci/ixgbe/ixgbe.h
diff -u src/sys/dev/pci/ixgbe/ixgbe.h:1.97 src/sys/dev/pci/ixgbe/ixgbe.h:1.98
--- src/sys/dev/pci/ixgbe/ixgbe.h:1.97	Sat Dec 30 06:16:03 2023
+++ src/sys/dev/pci/ixgbe/ixgbe.h	Sat Dec 30 06:16:44 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.h,v 1.97 2023/12/30 06:16:03 msaitoh Exp $ */
+/* $NetBSD: ixgbe.h,v 1.98 2023/12/30 06:16:44 msaitoh Exp $ */
 
 /**
   SPDX-License-Identifier: BSD-3-Clause
@@ -415,7 +415,9 @@ struct rx_ring {
 	struct lro_ctrl		lro;
 	bool			lro_enabled;
 #endif /* LRO */
+#ifdef RSC
 	bool			hw_rsc;
+#endif
 	bool			vtag_strip;
 	bool			discard_multidesc;
 	u16			next_to_refresh;
@@ -437,7 +439,9 @@ struct rx_ring {
 	struct evcnt		rx_bytes;
 	struct evcnt		rx_discarded;
 	struct evcnt		no_mbuf;
+#ifdef RSC
 	u64			rsc_num;
+#endif
 };
 
 struct ixgbe_vf {



CVS commit: src/sys/dev/pci/ixgbe

2023-12-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Dec 30 06:16:44 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c ixgbe.h

Log Message:
ixgbe: Use #ifdef RSC

 This feature (hardware receive side coalescing) has been disabled all along,
so enclose the code with #ifdef RSC.


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.97 -r1.98 src/sys/dev/pci/ixgbe/ixgbe.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/pci/ixgbe

2023-12-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Dec 30 06:16:03 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.h

Log Message:
ixgbe: Change "me" from 32bit to 8bit because the max is 128.

 This commit doesn't change the real size of ix_queue, tx_ring and rx_ring
because of the alignment.


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/sys/dev/pci/ixgbe/ixgbe.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/ixgbe/ixgbe.h
diff -u src/sys/dev/pci/ixgbe/ixgbe.h:1.96 src/sys/dev/pci/ixgbe/ixgbe.h:1.97
--- src/sys/dev/pci/ixgbe/ixgbe.h:1.96	Fri Dec 29 07:36:47 2023
+++ src/sys/dev/pci/ixgbe/ixgbe.h	Sat Dec 30 06:16:03 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.h,v 1.96 2023/12/29 07:36:47 msaitoh Exp $ */
+/* $NetBSD: ixgbe.h,v 1.97 2023/12/30 06:16:03 msaitoh Exp $ */
 
 /**
   SPDX-License-Identifier: BSD-3-Clause
@@ -325,7 +325,7 @@ struct ix_queue {
 	struct ixgbe_softc *sc;
 	u32  msix;   /* This queue's MSI-X vector */
 	u32  eitr_setting;
-	u32  me;
+	u8   me;
 	struct resource  *res;
 	int  busy;
 	struct tx_ring   *txr;
@@ -357,7 +357,7 @@ struct ix_queue {
 struct tx_ring {
 	struct ixgbe_softc	*sc;
 	kmutex_t		tx_mtx;
-	u32			me;
+	u8			me;
 	u32			tail;
 	int			busy;
 	union ixgbe_adv_tx_desc	*tx_base;
@@ -407,7 +407,7 @@ struct tx_ring {
 struct rx_ring {
 	struct ixgbe_softc	*sc;
 	kmutex_t		rx_mtx;
-	u32			me;
+	u8			me;
 	u32			tail;
 	union ixgbe_adv_rx_desc	*rx_base;
 	struct ixgbe_dma_alloc	rxdma;



CVS commit: src/sys/dev/pci/ixgbe

2023-12-29 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Dec 30 06:16:03 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.h

Log Message:
ixgbe: Change "me" from 32bit to 8bit because the max is 128.

 This commit doesn't change the real size of ix_queue, tx_ring and rx_ring
because of the alignment.


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/sys/dev/pci/ixgbe/ixgbe.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys

2023-12-29 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Dec 29 23:31:45 UTC 2023

Modified Files:
src/sys/conf: files
src/sys/dev/fdt: files.fdt gfrtc_fdt.c
Added Files:
src/sys/dev/goldfish: files.goldfish gfrtc.c gfrtcvar.h

Log Message:
Re-factor the Goldfish RTC driver into attach-front-end and generic
back-end; Goldfish virtual devices can be found on virtual platforms
that don't use FDT.


To generate a diff of this commit:
cvs rdiff -u -r1.1309 -r1.1310 src/sys/conf/files
cvs rdiff -u -r1.70 -r1.71 src/sys/dev/fdt/files.fdt
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/fdt/gfrtc_fdt.c
cvs rdiff -u -r0 -r1.1 src/sys/dev/goldfish/files.goldfish \
src/sys/dev/goldfish/gfrtc.c src/sys/dev/goldfish/gfrtcvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/conf/files
diff -u src/sys/conf/files:1.1309 src/sys/conf/files:1.1310
--- src/sys/conf/files:1.1309	Sun Sep 10 14:04:28 2023
+++ src/sys/conf/files	Fri Dec 29 23:31:45 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: files,v 1.1309 2023/09/10 14:04:28 abs Exp $
+#	$NetBSD: files,v 1.1310 2023/12/29 23:31:45 thorpej Exp $
 #	@(#)files.newconf	7.5 (Berkeley) 5/10/93
 
 version 	20171118
@@ -1660,6 +1660,11 @@ include "dev/ic/files.athn"
 include "dev/clk/files.clk"
 
 #
+# Goldfish virtual devices
+#
+include "dev/goldfish/files.goldfish"
+
+#
 # Flattened Device Tree (FDT) support
 #
 include "dev/ofw/files.ofw"

Index: src/sys/dev/fdt/files.fdt
diff -u src/sys/dev/fdt/files.fdt:1.70 src/sys/dev/fdt/files.fdt:1.71
--- src/sys/dev/fdt/files.fdt:1.70	Mon May  8 10:18:03 2023
+++ src/sys/dev/fdt/files.fdt	Fri Dec 29 23:31:44 2023
@@ -1,4 +1,4 @@
-# $NetBSD: files.fdt,v 1.70 2023/05/08 10:18:03 skrll Exp $
+# $NetBSD: files.fdt,v 1.71 2023/12/29 23:31:44 thorpej Exp $
 
 include	"external/bsd/libfdt/conf/files.libfdt"
 
@@ -217,6 +217,5 @@ attach	vmt at fdt with vmt_fdt
 file	dev/fdt/vmt_fdt.c			vmt_fdt
 
 # Google Goldfish RTC
-device	gfrtc
 attach	gfrtc at fdt with gfrtc_fdt
 file	dev/fdt/gfrtc_fdt.c			gfrtc_fdt

Index: src/sys/dev/fdt/gfrtc_fdt.c
diff -u src/sys/dev/fdt/gfrtc_fdt.c:1.1 src/sys/dev/fdt/gfrtc_fdt.c:1.2
--- src/sys/dev/fdt/gfrtc_fdt.c:1.1	Mon May  8 07:51:44 2023
+++ src/sys/dev/fdt/gfrtc_fdt.c	Fri Dec 29 23:31:44 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: gfrtc_fdt.c,v 1.1 2023/05/08 07:51:44 skrll Exp $	*/
+/*	$NetBSD: gfrtc_fdt.c,v 1.2 2023/12/29 23:31:44 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2023 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gfrtc_fdt.c,v 1.1 2023/05/08 07:51:44 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gfrtc_fdt.c,v 1.2 2023/12/29 23:31:44 thorpej Exp $");
 
 #include 
 
@@ -38,6 +38,7 @@ __KERNEL_RCSID(0, "$NetBSD: gfrtc_fdt.c,
 #include 
 
 #include 
+#include 
 
 /*
  * https://android.googlesource.com/platform/external/qemu/+/master/docs/GOLDFISH-VIRTUAL-HARDWARE.TXT
@@ -48,54 +49,6 @@ static const struct device_compatible_en
 	DEVICE_COMPAT_EOL
 };
 
-struct gfrtc_fdt_softc {
-	device_t sc_dev;
-	bus_space_tag_t sc_bst;
-	bus_space_handle_t sc_bsh;
-
-	struct todr_chip_handle	sc_todr;
-};
-
-#define	GOLDFISH_RTC_READ(sc, reg) \
-	bus_space_read_4((sc)->sc_bst, (sc)->sc_bsh, (reg))
-#define	GOLDFISH_RTC_WRITE(sc, reg, val) \
-	bus_space_write_4((sc)->sc_bst, (sc)->sc_bsh, (reg), (val))
-
-
-#define	GOLDFISH_RTC_TIME_LOW	0x00
-#define	GOLDFISH_RTC_TIME_HIGH	0x04
-
-
-static int
-gfrtc_gettime(struct todr_chip_handle *ch, struct timeval *tv)
-{
-	struct gfrtc_fdt_softc *sc = ch->cookie;
-	const uint64_t lo = GOLDFISH_RTC_READ(sc, GOLDFISH_RTC_TIME_LOW);
-	const uint64_t hi = GOLDFISH_RTC_READ(sc, GOLDFISH_RTC_TIME_HIGH);
-
-	uint64_t nsec = (hi << 32) | lo;
-
-	tv->tv_sec = nsec / 10;
-	tv->tv_usec = (nsec - tv->tv_sec) / 1000;	// Always 0?
-
-	return 0;
-}
-
-static int
-gfrtc_settime(struct todr_chip_handle *ch, struct timeval *tv)
-{
-	struct gfrtc_fdt_softc *sc = ch->cookie;
-
-	uint64_t nsec = (tv->tv_sec * 100 + tv->tv_usec) * 1000;
-	uint32_t hi = nsec >> 32;
-	uint32_t lo = nsec;
-
-	GOLDFISH_RTC_WRITE(sc, GOLDFISH_RTC_TIME_HIGH, hi);
-	GOLDFISH_RTC_WRITE(sc, GOLDFISH_RTC_TIME_HIGH, lo);
-
-	return 0;
-}
-
 
 static int
 gfrtc_fdt_match(device_t parent, cfdata_t cf, void *aux)
@@ -108,7 +61,7 @@ gfrtc_fdt_match(device_t parent, cfdata_
 static void
 gfrtc_fdt_attach(device_t parent, device_t self, void *aux)
 {
-	struct gfrtc_fdt_softc * const sc = device_private(self);
+	struct gfrtc_softc * const sc = device_private(self);
 	struct fdt_attach_args * const faa = aux;
 	const int phandle = faa->faa_phandle;
 	bus_addr_t addr;
@@ -129,13 +82,8 @@ gfrtc_fdt_attach(device_t parent, device
 	aprint_naive("\n");
 	aprint_normal(": Google Goldfish RTC\n");
 
-	sc->sc_todr.cookie = sc;
-	sc->sc_todr.todr_gettime = gfrtc_gettime;
-	sc->sc_todr.todr_settime = gfrtc_settime;
-	sc->sc_todr.todr_setwen = NULL;
-
-	todr_attach(>sc_todr);
+	gfrtc_attach(sc);
 

CVS commit: src/sys

2023-12-29 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Dec 29 23:31:45 UTC 2023

Modified Files:
src/sys/conf: files
src/sys/dev/fdt: files.fdt gfrtc_fdt.c
Added Files:
src/sys/dev/goldfish: files.goldfish gfrtc.c gfrtcvar.h

Log Message:
Re-factor the Goldfish RTC driver into attach-front-end and generic
back-end; Goldfish virtual devices can be found on virtual platforms
that don't use FDT.


To generate a diff of this commit:
cvs rdiff -u -r1.1309 -r1.1310 src/sys/conf/files
cvs rdiff -u -r1.70 -r1.71 src/sys/dev/fdt/files.fdt
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/fdt/gfrtc_fdt.c
cvs rdiff -u -r0 -r1.1 src/sys/dev/goldfish/files.goldfish \
src/sys/dev/goldfish/gfrtc.c src/sys/dev/goldfish/gfrtcvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/net

2023-12-29 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Fri Dec 29 23:01:02 UTC 2023

Modified Files:
src/sys/net: if_tun.c

Log Message:
tun: add missing kpreempt_enable() if pktq_enqueue() fails


To generate a diff of this commit:
cvs rdiff -u -r1.173 -r1.174 src/sys/net/if_tun.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/net

2023-12-29 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Fri Dec 29 23:01:02 UTC 2023

Modified Files:
src/sys/net: if_tun.c

Log Message:
tun: add missing kpreempt_enable() if pktq_enqueue() fails


To generate a diff of this commit:
cvs rdiff -u -r1.173 -r1.174 src/sys/net/if_tun.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/if_tun.c
diff -u src/sys/net/if_tun.c:1.173 src/sys/net/if_tun.c:1.174
--- src/sys/net/if_tun.c:1.173	Mon Mar 28 12:33:22 2022
+++ src/sys/net/if_tun.c	Fri Dec 29 23:01:02 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_tun.c,v 1.173 2022/03/28 12:33:22 riastradh Exp $	*/
+/*	$NetBSD: if_tun.c,v 1.174 2023/12/29 23:01:02 chs Exp $	*/
 
 /*
  * Copyright (c) 1988, Julian Onions 
@@ -19,7 +19,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.173 2022/03/28 12:33:22 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.174 2023/12/29 23:01:02 chs Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -982,6 +982,7 @@ tunwrite(dev_t dev, struct uio *uio, int
 	}
 	kpreempt_disable();
 	if (__predict_false(!pktq_enqueue(pktq, top, 0))) {
+		kpreempt_enable();
 		if_statinc(ifp, if_collisions);
 		mutex_exit(>tun_lock);
 		error = ENOBUFS;



CVS commit: src/sys/external/bsd/drm2/include/linux

2023-12-29 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Fri Dec 29 22:58:24 UTC 2023

Modified Files:
src/sys/external/bsd/drm2/include/linux: smp.h

Log Message:
drm: put_cpu() should enable preemption, not disable it again


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm2/include/linux/smp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/external/bsd/drm2/include/linux

2023-12-29 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Fri Dec 29 22:58:24 UTC 2023

Modified Files:
src/sys/external/bsd/drm2/include/linux: smp.h

Log Message:
drm: put_cpu() should enable preemption, not disable it again


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm2/include/linux/smp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/drm2/include/linux/smp.h
diff -u src/sys/external/bsd/drm2/include/linux/smp.h:1.4 src/sys/external/bsd/drm2/include/linux/smp.h:1.5
--- src/sys/external/bsd/drm2/include/linux/smp.h:1.4	Sun Dec 19 11:49:12 2021
+++ src/sys/external/bsd/drm2/include/linux/smp.h	Fri Dec 29 22:58:23 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: smp.h,v 1.4 2021/12/19 11:49:12 riastradh Exp $	*/
+/*	$NetBSD: smp.h,v 1.5 2023/12/29 22:58:23 chs Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -50,7 +50,7 @@ static inline void
 put_cpu(void)
 {
 
-	kpreempt_disable();
+	kpreempt_enable();
 }
 
 static inline void



CVS import: src/external/mit/isl/dist

2023-12-29 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Dec 29 22:07:49 UTC 2023

Update of /cvsroot/src/external/mit/isl/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv22919

Log Message:
initial import of isl 0.26.

this enables additional optimisations in GCC.  from the README:

isl is a thread-safe C library for manipulating sets and relations
of integer points bounded by affine constraints.  The descriptions of
the sets and relations may involve both parameters and existentially
quantified variables.  All computations are performed in exact integer
arithmetic using GMP.

isl is released under the MIT license, but depends on the LGPL GMP
library.

Status:

Vendor Tag: isl
Release Tags:   isl-0-26

N src/external/mit/isl/dist/isl_ast_private.h
N src/external/mit/isl/dist/flow_cmp.c
N src/external/mit/isl/dist/isl_test_plain_equal_templ.c
N src/external/mit/isl/dist/isl_schedule_node.c
N src/external/mit/isl/dist/isl_ctx.c
N src/external/mit/isl/dist/isl_val.c
N src/external/mit/isl/dist/isl_map_lexopt_templ.c
N src/external/mit/isl/dist/isl_lp_private.h
N src/external/mit/isl/dist/isl_pw_add_constant_multi_val_templ.c
N src/external/mit/isl/dist/isl_multi_floor.c
N src/external/mit/isl/dist/isl_convex_hull.c
N src/external/mit/isl/dist/isl_union_multi.c
N src/external/mit/isl/dist/isl_domain_factor_templ.c
N src/external/mit/isl/dist/isl_pw_insert_dims_templ.c
N src/external/mit/isl/dist/isl_ast_build.c
N src/external/mit/isl/dist/isl_box.c
N src/external/mit/isl/dist/isl_tab.c
N src/external/mit/isl/dist/isl_multi_gist.c
N src/external/mit/isl/dist/isl_val_sioimath.c
N src/external/mit/isl/dist/isl_multi_hash.c
N src/external/mit/isl/dist/isl_input.c
N src/external/mit/isl/dist/isl_map_list.c
N src/external/mit/isl/dist/isl_pw_un_op_templ.c
N src/external/mit/isl/dist/isl_multi_bind_templ.c
N src/external/mit/isl/dist/isl_ast_node_set_field_templ.c
N src/external/mit/isl/dist/isl_ilp.c
N src/external/mit/isl/dist/isl_hash_private.h
N src/external/mit/isl/dist/isl_int_sioimath.h
N src/external/mit/isl/dist/isl_bind_domain_templ.c
N src/external/mit/isl/dist/configure
N src/external/mit/isl/dist/isl_farkas.c
N src/external/mit/isl/dist/isl_type_has_space_templ.c
N src/external/mit/isl/dist/isl_multi_locals_templ.c
N src/external/mit/isl/dist/isl_multi_param_templ.c
N src/external/mit/isl/dist/check_reparse_templ.c
N src/external/mit/isl/dist/isl_map_bound_templ.c
N src/external/mit/isl/dist/isl_multi_apply_set_no_explicit_domain_templ.c
N src/external/mit/isl/dist/isl_ilp_opt_val_templ.c
N src/external/mit/isl/dist/isl_arg.c
N src/external/mit/isl/dist/isl_list_read_yaml_templ.c
N src/external/mit/isl/dist/isl_local_space_private.h
N src/external/mit/isl/dist/isl_obj.c
N src/external/mit/isl/dist/isl_test_cpp17-checked.cc
N src/external/mit/isl/dist/isl_schedule.c
N src/external/mit/isl/dist/isl_ilp_opt_multi_val_templ.c
N src/external/mit/isl/dist/isl_multi_read_no_explicit_domain_templ.c
N src/external/mit/isl/dist/isl_pw_sub_templ.c
N src/external/mit/isl/dist/isl_schedule_constraints.c
N src/external/mit/isl/dist/isl_sample.c
N src/external/mit/isl/dist/isl_test_imath.c
N src/external/mit/isl/dist/Makefile.in
N src/external/mit/isl/dist/isl_type_check_match_range_multi_val.c
N src/external/mit/isl/dist/bound_test.sh.in
N src/external/mit/isl/dist/isl_union_locals_templ.c
N src/external/mit/isl/dist/isl_local_space.c
N src/external/mit/isl/dist/isl_bernstein.h
N src/external/mit/isl/dist/isl_pw_morph_templ.c
N src/external/mit/isl/dist/isl_pw_eval.c
N src/external/mit/isl/dist/polytope_scan.c
N src/external/mit/isl/dist/isl_bound.c
N src/external/mit/isl/dist/isl_aff_private.h
N src/external/mit/isl/dist/isl_options_private.h
N src/external/mit/isl/dist/isl_union_sub_templ.c
N src/external/mit/isl/dist/isl_map.c
N src/external/mit/isl/dist/isl_multi_pw_aff_pullback_templ.c
N src/external/mit/isl/dist/isl_reordering.c
N src/external/mit/isl/dist/isl_multi_dims.c
N src/external/mit/isl/dist/py-compile
N src/external/mit/isl/dist/bound.c
N src/external/mit/isl/dist/isl_ctx_private.h
N src/external/mit/isl/dist/closure.c
N src/external/mit/isl/dist/isl_flow.c
N src/external/mit/isl/dist/isl_multi_macro.h
N src/external/mit/isl/dist/isl_schedule_private.h
N src/external/mit/isl/dist/isl_multi_add_constant_templ.c
N src/external/mit/isl/dist/isl_vec_private.h
N src/external/mit/isl/dist/isl_set_to_ast_graft_list.c
N src/external/mit/isl/dist/isl_union_map.c
N src/external/mit/isl/dist/isl_multi_unbind_params_templ.c
N src/external/mit/isl/dist/isl_multi_align_union_set.c
N src/external/mit/isl/dist/bset_to_bmap.c
N src/external/mit/isl/dist/isl_ast.c
N src/external/mit/isl/dist/depcomp
N src/external/mit/isl/dist/missing
N src/external/mit/isl/dist/isl_test_cpp-checked-conversion.cc
N src/external/mit/isl/dist/isl_multi_product_templ.c
N src/external/mit/isl/dist/isl_map_simplify.c
N src/external/mit/isl/dist/isl_scheduler.h
N 

CVS import: src/external/mit/isl/dist

2023-12-29 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Fri Dec 29 22:07:49 UTC 2023

Update of /cvsroot/src/external/mit/isl/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv22919

Log Message:
initial import of isl 0.26.

this enables additional optimisations in GCC.  from the README:

isl is a thread-safe C library for manipulating sets and relations
of integer points bounded by affine constraints.  The descriptions of
the sets and relations may involve both parameters and existentially
quantified variables.  All computations are performed in exact integer
arithmetic using GMP.

isl is released under the MIT license, but depends on the LGPL GMP
library.

Status:

Vendor Tag: isl
Release Tags:   isl-0-26

N src/external/mit/isl/dist/isl_ast_private.h
N src/external/mit/isl/dist/flow_cmp.c
N src/external/mit/isl/dist/isl_test_plain_equal_templ.c
N src/external/mit/isl/dist/isl_schedule_node.c
N src/external/mit/isl/dist/isl_ctx.c
N src/external/mit/isl/dist/isl_val.c
N src/external/mit/isl/dist/isl_map_lexopt_templ.c
N src/external/mit/isl/dist/isl_lp_private.h
N src/external/mit/isl/dist/isl_pw_add_constant_multi_val_templ.c
N src/external/mit/isl/dist/isl_multi_floor.c
N src/external/mit/isl/dist/isl_convex_hull.c
N src/external/mit/isl/dist/isl_union_multi.c
N src/external/mit/isl/dist/isl_domain_factor_templ.c
N src/external/mit/isl/dist/isl_pw_insert_dims_templ.c
N src/external/mit/isl/dist/isl_ast_build.c
N src/external/mit/isl/dist/isl_box.c
N src/external/mit/isl/dist/isl_tab.c
N src/external/mit/isl/dist/isl_multi_gist.c
N src/external/mit/isl/dist/isl_val_sioimath.c
N src/external/mit/isl/dist/isl_multi_hash.c
N src/external/mit/isl/dist/isl_input.c
N src/external/mit/isl/dist/isl_map_list.c
N src/external/mit/isl/dist/isl_pw_un_op_templ.c
N src/external/mit/isl/dist/isl_multi_bind_templ.c
N src/external/mit/isl/dist/isl_ast_node_set_field_templ.c
N src/external/mit/isl/dist/isl_ilp.c
N src/external/mit/isl/dist/isl_hash_private.h
N src/external/mit/isl/dist/isl_int_sioimath.h
N src/external/mit/isl/dist/isl_bind_domain_templ.c
N src/external/mit/isl/dist/configure
N src/external/mit/isl/dist/isl_farkas.c
N src/external/mit/isl/dist/isl_type_has_space_templ.c
N src/external/mit/isl/dist/isl_multi_locals_templ.c
N src/external/mit/isl/dist/isl_multi_param_templ.c
N src/external/mit/isl/dist/check_reparse_templ.c
N src/external/mit/isl/dist/isl_map_bound_templ.c
N src/external/mit/isl/dist/isl_multi_apply_set_no_explicit_domain_templ.c
N src/external/mit/isl/dist/isl_ilp_opt_val_templ.c
N src/external/mit/isl/dist/isl_arg.c
N src/external/mit/isl/dist/isl_list_read_yaml_templ.c
N src/external/mit/isl/dist/isl_local_space_private.h
N src/external/mit/isl/dist/isl_obj.c
N src/external/mit/isl/dist/isl_test_cpp17-checked.cc
N src/external/mit/isl/dist/isl_schedule.c
N src/external/mit/isl/dist/isl_ilp_opt_multi_val_templ.c
N src/external/mit/isl/dist/isl_multi_read_no_explicit_domain_templ.c
N src/external/mit/isl/dist/isl_pw_sub_templ.c
N src/external/mit/isl/dist/isl_schedule_constraints.c
N src/external/mit/isl/dist/isl_sample.c
N src/external/mit/isl/dist/isl_test_imath.c
N src/external/mit/isl/dist/Makefile.in
N src/external/mit/isl/dist/isl_type_check_match_range_multi_val.c
N src/external/mit/isl/dist/bound_test.sh.in
N src/external/mit/isl/dist/isl_union_locals_templ.c
N src/external/mit/isl/dist/isl_local_space.c
N src/external/mit/isl/dist/isl_bernstein.h
N src/external/mit/isl/dist/isl_pw_morph_templ.c
N src/external/mit/isl/dist/isl_pw_eval.c
N src/external/mit/isl/dist/polytope_scan.c
N src/external/mit/isl/dist/isl_bound.c
N src/external/mit/isl/dist/isl_aff_private.h
N src/external/mit/isl/dist/isl_options_private.h
N src/external/mit/isl/dist/isl_union_sub_templ.c
N src/external/mit/isl/dist/isl_map.c
N src/external/mit/isl/dist/isl_multi_pw_aff_pullback_templ.c
N src/external/mit/isl/dist/isl_reordering.c
N src/external/mit/isl/dist/isl_multi_dims.c
N src/external/mit/isl/dist/py-compile
N src/external/mit/isl/dist/bound.c
N src/external/mit/isl/dist/isl_ctx_private.h
N src/external/mit/isl/dist/closure.c
N src/external/mit/isl/dist/isl_flow.c
N src/external/mit/isl/dist/isl_multi_macro.h
N src/external/mit/isl/dist/isl_schedule_private.h
N src/external/mit/isl/dist/isl_multi_add_constant_templ.c
N src/external/mit/isl/dist/isl_vec_private.h
N src/external/mit/isl/dist/isl_set_to_ast_graft_list.c
N src/external/mit/isl/dist/isl_union_map.c
N src/external/mit/isl/dist/isl_multi_unbind_params_templ.c
N src/external/mit/isl/dist/isl_multi_align_union_set.c
N src/external/mit/isl/dist/bset_to_bmap.c
N src/external/mit/isl/dist/isl_ast.c
N src/external/mit/isl/dist/depcomp
N src/external/mit/isl/dist/missing
N src/external/mit/isl/dist/isl_test_cpp-checked-conversion.cc
N src/external/mit/isl/dist/isl_multi_product_templ.c
N src/external/mit/isl/dist/isl_map_simplify.c
N src/external/mit/isl/dist/isl_scheduler.h
N 

CVS commit: src/usr.bin/make

2023-12-29 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec 29 20:43:58 UTC 2023

Modified Files:
src/usr.bin/make: lst.c lst.h parse.c

Log Message:
make: unexport list memory management functions

They are only used in a single source file.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/usr.bin/make/lst.c
cvs rdiff -u -r1.103 -r1.104 src/usr.bin/make/lst.h
cvs rdiff -u -r1.712 -r1.713 src/usr.bin/make/parse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/lst.c
diff -u src/usr.bin/make/lst.c:1.106 src/usr.bin/make/lst.c:1.107
--- src/usr.bin/make/lst.c:1.106	Sat Feb 26 11:57:21 2022
+++ src/usr.bin/make/lst.c	Fri Dec 29 20:43:58 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: lst.c,v 1.106 2022/02/26 11:57:21 rillig Exp $ */
+/* $NetBSD: lst.c,v 1.107 2023/12/29 20:43:58 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -34,7 +34,7 @@
 
 #include "make.h"
 
-MAKE_RCSID("$NetBSD: lst.c,v 1.106 2022/02/26 11:57:21 rillig Exp $");
+MAKE_RCSID("$NetBSD: lst.c,v 1.107 2023/12/29 20:43:58 rillig Exp $");
 
 static ListNode *
 LstNodeNew(ListNode *prev, ListNode *next, void *datum)
@@ -48,15 +48,6 @@ LstNodeNew(ListNode *prev, ListNode *nex
 	return ln;
 }
 
-/* Create and initialize a new, empty list. */
-List *
-Lst_New(void)
-{
-	List *list = bmake_malloc(sizeof *list);
-	Lst_Init(list);
-	return list;
-}
-
 void
 Lst_Done(List *list)
 {
@@ -80,15 +71,6 @@ Lst_DoneCall(List *list, LstFreeProc fre
 	}
 }
 
-/* Free a list and all its nodes. The node data are not freed though. */
-void
-Lst_Free(List *list)
-{
-
-	Lst_Done(list);
-	free(list);
-}
-
 /* Insert a new node with the datum before the given node. */
 void
 Lst_InsertBefore(List *list, ListNode *ln, void *datum)

Index: src/usr.bin/make/lst.h
diff -u src/usr.bin/make/lst.h:1.103 src/usr.bin/make/lst.h:1.104
--- src/usr.bin/make/lst.h:1.103	Thu Mar  3 19:55:27 2022
+++ src/usr.bin/make/lst.h	Fri Dec 29 20:43:58 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: lst.h,v 1.103 2022/03/03 19:55:27 rillig Exp $	*/
+/*	$NetBSD: lst.h,v 1.104 2023/12/29 20:43:58 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -101,16 +101,10 @@ struct List {
 /* Free the datum of a node, called before freeing the node itself. */
 typedef void LstFreeProc(void *);
 
-/* Create or destroy a list */
-
-/* Create a new list. */
-List *Lst_New(void) MAKE_ATTR_USE;
 /* Free the list nodes, but not the list itself. */
 void Lst_Done(List *);
 /* Free the list nodes, freeing the node data using the given function. */
 void Lst_DoneCall(List *, LstFreeProc);
-/* Free the list, leaving the node data unmodified. */
-void Lst_Free(List *);
 
 #define LST_INIT { NULL, NULL }
 

Index: src/usr.bin/make/parse.c
diff -u src/usr.bin/make/parse.c:1.712 src/usr.bin/make/parse.c:1.713
--- src/usr.bin/make/parse.c:1.712	Tue Dec 19 19:33:39 2023
+++ src/usr.bin/make/parse.c	Fri Dec 29 20:43:58 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.712 2023/12/19 19:33:39 rillig Exp $	*/
+/*	$NetBSD: parse.c,v 1.713 2023/12/29 20:43:58 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -105,7 +105,7 @@
 #include "pathnames.h"
 
 /*	"@(#)parse.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: parse.c,v 1.712 2023/12/19 19:33:39 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.713 2023/12/29 20:43:58 rillig Exp $");
 
 /* Detects a multiple-inclusion guard in a makefile. */
 typedef enum {
@@ -312,6 +312,23 @@ enum PosixState posix_state = PS_NOT_YET
 
 static HashTable /* full file name -> Guard */ guards;
 
+
+static List *
+Lst_New(void)
+{
+	List *list = bmake_malloc(sizeof *list);
+	Lst_Init(list);
+	return list;
+}
+
+static void
+Lst_Free(List *list)
+{
+
+	Lst_Done(list);
+	free(list);
+}
+
 static IncludedFile *
 GetInclude(size_t i)
 {



CVS commit: src/usr.bin/make

2023-12-29 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec 29 20:43:58 UTC 2023

Modified Files:
src/usr.bin/make: lst.c lst.h parse.c

Log Message:
make: unexport list memory management functions

They are only used in a single source file.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/usr.bin/make/lst.c
cvs rdiff -u -r1.103 -r1.104 src/usr.bin/make/lst.h
cvs rdiff -u -r1.712 -r1.713 src/usr.bin/make/parse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-10] src/doc

2023-12-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Dec 29 20:43:17 UTC 2023

Modified Files:
src/doc [netbsd-10]: CHANGES-10.0

Log Message:
Amed tickets #420 and #510, ticket #520


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.179 -r1.1.2.180 src/doc/CHANGES-10.0

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES-10.0
diff -u src/doc/CHANGES-10.0:1.1.2.179 src/doc/CHANGES-10.0:1.1.2.180
--- src/doc/CHANGES-10.0:1.1.2.179	Wed Dec 27 16:19:59 2023
+++ src/doc/CHANGES-10.0	Fri Dec 29 20:43:17 2023
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-10.0,v 1.1.2.179 2023/12/27 16:19:59 martin Exp $
+# $NetBSD: CHANGES-10.0,v 1.1.2.180 2023/12/29 20:43:17 martin Exp $
 
 A complete list of changes from the initial NetBSD 10.0 branch on 2022-12-16
 until the 10.0 release:
@@ -12289,9 +12289,18 @@ external/gpl3/gcc.old/usr.bin/gcc/arch/v
 	gcc: vax: mknative for PR port-vax/57646.
 	[rin, ticket #399]
 
-sys/arch/powerpc/oea/pmap.c			1.115
+sys/arch/powerpc/include/oea/pmap.h		1.39
+sys/arch/powerpc/include/pmap.h			1.43
+sys/arch/powerpc/include/vmparam.h		1.27
+sys/arch/powerpc/oea/pmap.c			1.115,1.117-1.121
+sys/arch/powerpc/oea/pmap_kernel.c		1.14
+sys/arch/powerpc/powerpc/bus_dma.c		1.56
+sys/arch/powerpc/powerpc/trap.c			1.165
+sys/arch/powerpc/powerpc/vm_machdep.c		1.106
 
 	powerpc/oea: pmap: Use pool_allocator_nointr() for pmap_pool.
+	Various fixes and cleanups especially for bridge mode (G5/64bit
+	machines). PR 57621.
 	[rin, ticket #400]
 
 lib/libc/Makefile.inc(apply patch)
@@ -14418,7 +14427,7 @@ sys/arch/vax/include/cpu.h			1.108
 
 sys/arch/netwinder/conf/GENERIC			1.146,1.147
 sys/arch/netwinder/conf/Makefile.netwinder.inc	1.12
-sys/arch/netwinder/conf/kern.ldscript		1.11
+sys/arch/netwinder/conf/kern.ldscript		1.11,1.12
 sys/arch/netwinder/conf/std.netwinder		1.17
 
 	netwinder: make GENERIC kernel bootable again.
@@ -14970,3 +14979,29 @@ external/bsd/blocklist/bin/blocklistd.c	
 	blocklistd(8): PR 57767: fix firewall ids on restart of the daemon.
 	[kim, ticket #519]
 
+external/public-domain/tz/dist/checknow.awk up to 1.1.1.1
+external/public-domain/tz/dist/zonenow.tab  up to 1.1.1.1
+external/public-domain/tz/dist/Makefile up to 1.1.1.37
+external/public-domain/tz/dist/NEWS up to 1.1.1.44
+external/public-domain/tz/dist/README   up to 1.1.1.11
+external/public-domain/tz/dist/TZDATA_VERSION   up to 1.36
+external/public-domain/tz/dist/africa   up to 1.1.1.32
+external/public-domain/tz/dist/antarctica   up to 1.1.1.18
+external/public-domain/tz/dist/asia up to 1.11
+external/public-domain/tz/dist/australasia  up to 1.8
+external/public-domain/tz/dist/backzone up to 1.1.1.27
+external/public-domain/tz/dist/checktab.awk up to 1.1.1.13
+external/public-domain/tz/dist/europe   up to 1.1.1.38
+external/public-domain/tz/dist/iso3166.tab  up to 1.1.1.9
+external/public-domain/tz/dist/leap-seconds.list up to 1.6
+external/public-domain/tz/dist/leapseconds  up to 1.6
+external/public-domain/tz/dist/northamerica up to 1.1.1.34
+external/public-domain/tz/dist/southamerica up to 1.1.1.24
+external/public-domain/tz/dist/version  up to 1.11
+external/public-domain/tz/dist/zone.tab up to 1.1.1.26
+external/public-domain/tz/dist/zone1970.tab up to 1.1.1.27
+doc/3RDPARTY	1.1972 (patch)
+
+	Update tzdata to 2023d.
+	[kre, ticket #520]
+



CVS commit: [netbsd-10] src/doc

2023-12-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Dec 29 20:43:17 UTC 2023

Modified Files:
src/doc [netbsd-10]: CHANGES-10.0

Log Message:
Amed tickets #420 and #510, ticket #520


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.179 -r1.1.2.180 src/doc/CHANGES-10.0

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-10] src

2023-12-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Dec 29 20:41:12 UTC 2023

Modified Files:
src/doc [netbsd-10]: 3RDPARTY
src/external/public-domain/tz/dist [netbsd-10]: Makefile NEWS README
TZDATA_VERSION africa antarctica asia australasia backzone
checktab.awk europe iso3166.tab leap-seconds.list leapseconds
northamerica southamerica version zone.tab zone1970.tab
Added Files:
src/external/public-domain/tz/dist [netbsd-10]: checknow.awk
zonenow.tab

Log Message:
Pull up the following, requested by kre in ticket #520:

external/public-domain/tz/dist/checknow.awk up to 1.1.1.1
external/public-domain/tz/dist/zonenow.tab  up to 1.1.1.1
external/public-domain/tz/dist/Makefile up to 1.1.1.37
external/public-domain/tz/dist/NEWS up to 1.1.1.44
external/public-domain/tz/dist/README   up to 1.1.1.11
external/public-domain/tz/dist/TZDATA_VERSION   up to 1.36
external/public-domain/tz/dist/africa   up to 1.1.1.32
external/public-domain/tz/dist/antarctica   up to 1.1.1.18
external/public-domain/tz/dist/asia up to 1.11
external/public-domain/tz/dist/australasia  up to 1.8
external/public-domain/tz/dist/backzone up to 1.1.1.27
external/public-domain/tz/dist/checktab.awk up to 1.1.1.13
external/public-domain/tz/dist/europe   up to 1.1.1.38
external/public-domain/tz/dist/iso3166.tab  up to 1.1.1.9
external/public-domain/tz/dist/leap-seconds.list up to 1.6
external/public-domain/tz/dist/leapseconds  up to 1.6
external/public-domain/tz/dist/northamerica up to 1.1.1.34
external/public-domain/tz/dist/southamerica up to 1.1.1.24
external/public-domain/tz/dist/version  up to 1.11
external/public-domain/tz/dist/zone.tab up to 1.1.1.26
external/public-domain/tz/dist/zone1970.tab up to 1.1.1.27
doc/3RDPARTY1.1972 (patch)

Import tzdata 2023d.


To generate a diff of this commit:
cvs rdiff -u -r1.1905.2.9 -r1.1905.2.10 src/doc/3RDPARTY
cvs rdiff -u -r1.1.1.35.2.1 -r1.1.1.35.2.2 \
src/external/public-domain/tz/dist/Makefile
cvs rdiff -u -r1.1.1.40.2.1 -r1.1.1.40.2.2 \
src/external/public-domain/tz/dist/NEWS
cvs rdiff -u -r1.1.1.10 -r1.1.1.10.2.1 \
src/external/public-domain/tz/dist/README
cvs rdiff -u -r1.32.2.1 -r1.32.2.2 \
src/external/public-domain/tz/dist/TZDATA_VERSION
cvs rdiff -u -r1.1.1.30.2.1 -r1.1.1.30.2.2 \
src/external/public-domain/tz/dist/africa
cvs rdiff -u -r1.1.1.16.2.1 -r1.1.1.16.2.2 \
src/external/public-domain/tz/dist/antarctica
cvs rdiff -u -r1.7.2.1 -r1.7.2.2 src/external/public-domain/tz/dist/asia \
src/external/public-domain/tz/dist/version
cvs rdiff -u -r1.6.2.1 -r1.6.2.2 \
src/external/public-domain/tz/dist/australasia
cvs rdiff -u -r1.1.1.25.2.1 -r1.1.1.25.2.2 \
src/external/public-domain/tz/dist/backzone \
src/external/public-domain/tz/dist/zone1970.tab
cvs rdiff -u -r0 -r1.1.1.1.2.2 \
src/external/public-domain/tz/dist/checknow.awk \
src/external/public-domain/tz/dist/zonenow.tab
cvs rdiff -u -r1.1.1.11.2.1 -r1.1.1.11.2.2 \
src/external/public-domain/tz/dist/checktab.awk
cvs rdiff -u -r1.1.1.36.2.1 -r1.1.1.36.2.2 \
src/external/public-domain/tz/dist/europe
cvs rdiff -u -r1.1.1.7.2.1 -r1.1.1.7.2.2 \
src/external/public-domain/tz/dist/iso3166.tab
cvs rdiff -u -r1.4.2.1 -r1.4.2.2 \
src/external/public-domain/tz/dist/leap-seconds.list \
src/external/public-domain/tz/dist/leapseconds
cvs rdiff -u -r1.1.1.32.2.1 -r1.1.1.32.2.2 \
src/external/public-domain/tz/dist/northamerica
cvs rdiff -u -r1.1.1.22.2.1 -r1.1.1.22.2.2 \
src/external/public-domain/tz/dist/southamerica
cvs rdiff -u -r1.1.1.24.2.1 -r1.1.1.24.2.2 \
src/external/public-domain/tz/dist/zone.tab

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1905.2.9 src/doc/3RDPARTY:1.1905.2.10
--- src/doc/3RDPARTY:1.1905.2.9	Mon Dec 25 12:43:20 2023
+++ src/doc/3RDPARTY	Fri Dec 29 20:41:11 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1905.2.9 2023/12/25 12:43:20 martin Exp $
+#	$NetBSD: 3RDPARTY,v 1.1905.2.10 2023/12/29 20:41:11 martin Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1424,8 +1424,8 @@ Location:	external/bsd/tradcpp
 Notes:
 
 Package:	tz
-Version:	tzcode2022g / tzdata2023cgtz
-Current Vers:	tzcode2023c / tzdata2023c
+Version:	tzcode2022g / tzdata2023dgtz
+Current Vers:	tzcode2023d / tzdata2023d
 Maintainer:	Paul Eggert 
 Archive Site:	ftp://ftp.iana.org/tz/releases/
 Archive Site:	ftp://munnari.oz.au/pub/oldtz/

Index: 

CVS commit: [netbsd-10] src

2023-12-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Dec 29 20:41:12 UTC 2023

Modified Files:
src/doc [netbsd-10]: 3RDPARTY
src/external/public-domain/tz/dist [netbsd-10]: Makefile NEWS README
TZDATA_VERSION africa antarctica asia australasia backzone
checktab.awk europe iso3166.tab leap-seconds.list leapseconds
northamerica southamerica version zone.tab zone1970.tab
Added Files:
src/external/public-domain/tz/dist [netbsd-10]: checknow.awk
zonenow.tab

Log Message:
Pull up the following, requested by kre in ticket #520:

external/public-domain/tz/dist/checknow.awk up to 1.1.1.1
external/public-domain/tz/dist/zonenow.tab  up to 1.1.1.1
external/public-domain/tz/dist/Makefile up to 1.1.1.37
external/public-domain/tz/dist/NEWS up to 1.1.1.44
external/public-domain/tz/dist/README   up to 1.1.1.11
external/public-domain/tz/dist/TZDATA_VERSION   up to 1.36
external/public-domain/tz/dist/africa   up to 1.1.1.32
external/public-domain/tz/dist/antarctica   up to 1.1.1.18
external/public-domain/tz/dist/asia up to 1.11
external/public-domain/tz/dist/australasia  up to 1.8
external/public-domain/tz/dist/backzone up to 1.1.1.27
external/public-domain/tz/dist/checktab.awk up to 1.1.1.13
external/public-domain/tz/dist/europe   up to 1.1.1.38
external/public-domain/tz/dist/iso3166.tab  up to 1.1.1.9
external/public-domain/tz/dist/leap-seconds.list up to 1.6
external/public-domain/tz/dist/leapseconds  up to 1.6
external/public-domain/tz/dist/northamerica up to 1.1.1.34
external/public-domain/tz/dist/southamerica up to 1.1.1.24
external/public-domain/tz/dist/version  up to 1.11
external/public-domain/tz/dist/zone.tab up to 1.1.1.26
external/public-domain/tz/dist/zone1970.tab up to 1.1.1.27
doc/3RDPARTY1.1972 (patch)

Import tzdata 2023d.


To generate a diff of this commit:
cvs rdiff -u -r1.1905.2.9 -r1.1905.2.10 src/doc/3RDPARTY
cvs rdiff -u -r1.1.1.35.2.1 -r1.1.1.35.2.2 \
src/external/public-domain/tz/dist/Makefile
cvs rdiff -u -r1.1.1.40.2.1 -r1.1.1.40.2.2 \
src/external/public-domain/tz/dist/NEWS
cvs rdiff -u -r1.1.1.10 -r1.1.1.10.2.1 \
src/external/public-domain/tz/dist/README
cvs rdiff -u -r1.32.2.1 -r1.32.2.2 \
src/external/public-domain/tz/dist/TZDATA_VERSION
cvs rdiff -u -r1.1.1.30.2.1 -r1.1.1.30.2.2 \
src/external/public-domain/tz/dist/africa
cvs rdiff -u -r1.1.1.16.2.1 -r1.1.1.16.2.2 \
src/external/public-domain/tz/dist/antarctica
cvs rdiff -u -r1.7.2.1 -r1.7.2.2 src/external/public-domain/tz/dist/asia \
src/external/public-domain/tz/dist/version
cvs rdiff -u -r1.6.2.1 -r1.6.2.2 \
src/external/public-domain/tz/dist/australasia
cvs rdiff -u -r1.1.1.25.2.1 -r1.1.1.25.2.2 \
src/external/public-domain/tz/dist/backzone \
src/external/public-domain/tz/dist/zone1970.tab
cvs rdiff -u -r0 -r1.1.1.1.2.2 \
src/external/public-domain/tz/dist/checknow.awk \
src/external/public-domain/tz/dist/zonenow.tab
cvs rdiff -u -r1.1.1.11.2.1 -r1.1.1.11.2.2 \
src/external/public-domain/tz/dist/checktab.awk
cvs rdiff -u -r1.1.1.36.2.1 -r1.1.1.36.2.2 \
src/external/public-domain/tz/dist/europe
cvs rdiff -u -r1.1.1.7.2.1 -r1.1.1.7.2.2 \
src/external/public-domain/tz/dist/iso3166.tab
cvs rdiff -u -r1.4.2.1 -r1.4.2.2 \
src/external/public-domain/tz/dist/leap-seconds.list \
src/external/public-domain/tz/dist/leapseconds
cvs rdiff -u -r1.1.1.32.2.1 -r1.1.1.32.2.2 \
src/external/public-domain/tz/dist/northamerica
cvs rdiff -u -r1.1.1.22.2.1 -r1.1.1.22.2.2 \
src/external/public-domain/tz/dist/southamerica
cvs rdiff -u -r1.1.1.24.2.1 -r1.1.1.24.2.2 \
src/external/public-domain/tz/dist/zone.tab

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-10] src/sys/arch/netwinder/conf

2023-12-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Dec 29 20:27:31 UTC 2023

Modified Files:
src/sys/arch/netwinder/conf [netbsd-10]: kern.ldscript

Log Message:
Additionally pull up following revision(s) (requested by uwe in ticket #510):

sys/arch/netwinder/conf/kern.ldscript: revision 1.12

netwinder: kern.ldscript - preserve the .text section alignment

This change from evbarm was omitted in previous, but older binutils in
netbsd-10 seem to need it.


To generate a diff of this commit:
cvs rdiff -u -r1.10.48.1 -r1.10.48.2 \
src/sys/arch/netwinder/conf/kern.ldscript

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/netwinder/conf/kern.ldscript
diff -u src/sys/arch/netwinder/conf/kern.ldscript:1.10.48.1 src/sys/arch/netwinder/conf/kern.ldscript:1.10.48.2
--- src/sys/arch/netwinder/conf/kern.ldscript:1.10.48.1	Tue Dec 19 12:49:40 2023
+++ src/sys/arch/netwinder/conf/kern.ldscript	Fri Dec 29 20:27:31 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern.ldscript,v 1.10.48.1 2023/12/19 12:49:40 martin Exp $	*/
+/*	$NetBSD: kern.ldscript,v 1.10.48.2 2023/12/29 20:27:31 martin Exp $	*/
 
 SECTIONS
 {
@@ -12,8 +12,8 @@ SECTIONS
   }
 
   /* Read-only sections, merged into text segment: */
-  .text (KERNEL_BASE_virt + SIZEOF(.start)) :
-  AT (LOADADDR(.start) + SIZEOF(.start))
+  .text (KERNEL_BASE_virt + ALIGN(SIZEOF(.start), ALIGNOF(.text))) :
+  AT (LOADADDR(.start) + ALIGN(SIZEOF(.start), ALIGNOF(.text)))
   {
 *(.text)
 *(.text.*)



CVS commit: [netbsd-10] src/sys/arch/netwinder/conf

2023-12-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Dec 29 20:27:31 UTC 2023

Modified Files:
src/sys/arch/netwinder/conf [netbsd-10]: kern.ldscript

Log Message:
Additionally pull up following revision(s) (requested by uwe in ticket #510):

sys/arch/netwinder/conf/kern.ldscript: revision 1.12

netwinder: kern.ldscript - preserve the .text section alignment

This change from evbarm was omitted in previous, but older binutils in
netbsd-10 seem to need it.


To generate a diff of this commit:
cvs rdiff -u -r1.10.48.1 -r1.10.48.2 \
src/sys/arch/netwinder/conf/kern.ldscript

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-10] src/sys/arch/powerpc

2023-12-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Dec 29 20:21:40 UTC 2023

Modified Files:
src/sys/arch/powerpc/include [netbsd-10]: pmap.h vmparam.h
src/sys/arch/powerpc/include/oea [netbsd-10]: pmap.h
src/sys/arch/powerpc/oea [netbsd-10]: pmap.c pmap_kernel.c
src/sys/arch/powerpc/powerpc [netbsd-10]: bus_dma.c trap.c vm_machdep.c

Log Message:
Additionally pull up following revision(s) (requested by rin in ticket #400):

sys/arch/powerpc/include/oea/pmap.h: revision 1.39
sys/arch/powerpc/include/pmap.h: revision 1.43
sys/arch/powerpc/oea/pmap_kernel.c: revision 1.14
sys/arch/powerpc/oea/pmap.c: revision 1.117
sys/arch/powerpc/oea/pmap.c: revision 1.118
sys/arch/powerpc/oea/pmap.c: revision 1.119
sys/arch/powerpc/include/vmparam.h: revision 1.27
sys/arch/powerpc/powerpc/trap.c: revision 1.165
sys/arch/powerpc/oea/pmap.c: revision 1.120
sys/arch/powerpc/oea/pmap.c: revision 1.121
sys/arch/powerpc/powerpc/vm_machdep.c: revision 1.106
sys/arch/powerpc/powerpc/bus_dma.c: revision 1.56

powerpc/oea: trap: pmap_{pte,ste}_spill() even in the interrupt context

Page table for oea is something like L2 TLB on memory; kernel and
processes share its entries, and process entries can be spilled out.

As done for MMU based on software-managed TLB, we need to restore
such entries even in the interrupt context.

Note that pmap_pte_spill() require no resouce to restore entries.
Still-not-implemented pmap_ste_spill() for OEA64 should also.
Part of PR kern/57621

powerpc/oea: pmap: Drop unused argument for pmap_pvo_reclaim(), NFC
Part of PR kern/57621

powerpc/oea: pmap: Rework pmap_pte_spill()

It was broken in many ways... Now, it gets working stable both for
OEA and OEA64_BRIDGE, as far as I can see.
Part of PR kern/57621

powerpc/oea: pmap: Fix mostly-pointless overhead of pmap_pvo_pool
(1) Drop __aligned(32) from struct pvo_entry; otherwise,
sizeof(struct pvo_entry) is round-up'ed to a multiple of 32.
(2) Do not set sizeof(struct pvo_entry) to `align` argument for
pool_init(9); it must be power of 2.
(3) Align pvo_entry to 32-byte boundary only if reasonably possible,
i.e., OEA without DIAGNOSTIC (--> POOL_REDZONE) for now.
Part of PR kern/57621

powerpc/oea: pmap_create: Use PR_ZERO and drop memset(9), NFC
Part of PR kern/57621

powerpc: oea: For OEA64_BRIDGE, 1:1 map up to 3GiB memory
As done for OEA. Note that kva over 3GiB is reserved.

Provide PMAP_MAP_POOLPAGE for OEA64_BRIDGE at the same time, by
which direct-mapped memory is utilized in order to work around
starvation of 512MiB kernel virtual space.
PR kern/57621

powerpc: Make sure direct-mapped buffer fits within correct range

For OEA and OEA64_BRIDGE, only first 3GiB memory is direct-mapped.
Part of PR kern/57621


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.42.4.1 src/sys/arch/powerpc/include/pmap.h
cvs rdiff -u -r1.26 -r1.26.4.1 src/sys/arch/powerpc/include/vmparam.h
cvs rdiff -u -r1.37 -r1.37.4.1 src/sys/arch/powerpc/include/oea/pmap.h
cvs rdiff -u -r1.114.4.1 -r1.114.4.2 src/sys/arch/powerpc/oea/pmap.c
cvs rdiff -u -r1.13 -r1.13.4.1 src/sys/arch/powerpc/oea/pmap_kernel.c
cvs rdiff -u -r1.55 -r1.55.4.1 src/sys/arch/powerpc/powerpc/bus_dma.c
cvs rdiff -u -r1.163 -r1.163.20.1 src/sys/arch/powerpc/powerpc/trap.c
cvs rdiff -u -r1.105 -r1.105.2.1 src/sys/arch/powerpc/powerpc/vm_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/powerpc/include/pmap.h
diff -u src/sys/arch/powerpc/include/pmap.h:1.42 src/sys/arch/powerpc/include/pmap.h:1.42.4.1
--- src/sys/arch/powerpc/include/pmap.h:1.42	Sat May  7 07:10:46 2022
+++ src/sys/arch/powerpc/include/pmap.h	Fri Dec 29 20:21:39 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.42 2022/05/07 07:10:46 rin Exp $	*/
+/*	$NetBSD: pmap.h,v 1.42.4.1 2023/12/29 20:21:39 martin Exp $	*/
 
 #ifndef _POWERPC_PMAP_H_
 #define _POWERPC_PMAP_H_
@@ -20,6 +20,10 @@
 #error unknown PPC variant
 #endif
 
+#ifndef PMAP_DIRECT_MAPPED_LEN
+#define	PMAP_DIRECT_MAPPED_LEN	(~0UL)
+#endif
+
 #endif /* !_MODULE */
 
 #if !defined(_LOCORE) && (defined(MODULAR) || defined(_MODULE))

Index: src/sys/arch/powerpc/include/vmparam.h
diff -u src/sys/arch/powerpc/include/vmparam.h:1.26 src/sys/arch/powerpc/include/vmparam.h:1.26.4.1
--- src/sys/arch/powerpc/include/vmparam.h:1.26	Wed May 11 13:58:43 2022
+++ src/sys/arch/powerpc/include/vmparam.h	Fri Dec 29 20:21:39 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.26 2022/05/11 13:58:43 andvar Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.26.4.1 2023/12/29 20:21:39 martin Exp $	*/
 
 #ifndef _POWERPC_VMPARAM_H_
 #define _POWERPC_VMPARAM_H_
@@ -12,7 +12,7 @@
  * These are common for BOOKE, IBM4XX, and OEA
  */
 #define	VM_FREELIST_DEFAULT	0
-#define	VM_FREELIST_FIRST256	1
+#define	VM_FREELIST_DIRECT_MAPPED	1
 #define	VM_FREELIST_FIRST16	2
 

CVS commit: [netbsd-10] src/sys/arch/powerpc

2023-12-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Dec 29 20:21:40 UTC 2023

Modified Files:
src/sys/arch/powerpc/include [netbsd-10]: pmap.h vmparam.h
src/sys/arch/powerpc/include/oea [netbsd-10]: pmap.h
src/sys/arch/powerpc/oea [netbsd-10]: pmap.c pmap_kernel.c
src/sys/arch/powerpc/powerpc [netbsd-10]: bus_dma.c trap.c vm_machdep.c

Log Message:
Additionally pull up following revision(s) (requested by rin in ticket #400):

sys/arch/powerpc/include/oea/pmap.h: revision 1.39
sys/arch/powerpc/include/pmap.h: revision 1.43
sys/arch/powerpc/oea/pmap_kernel.c: revision 1.14
sys/arch/powerpc/oea/pmap.c: revision 1.117
sys/arch/powerpc/oea/pmap.c: revision 1.118
sys/arch/powerpc/oea/pmap.c: revision 1.119
sys/arch/powerpc/include/vmparam.h: revision 1.27
sys/arch/powerpc/powerpc/trap.c: revision 1.165
sys/arch/powerpc/oea/pmap.c: revision 1.120
sys/arch/powerpc/oea/pmap.c: revision 1.121
sys/arch/powerpc/powerpc/vm_machdep.c: revision 1.106
sys/arch/powerpc/powerpc/bus_dma.c: revision 1.56

powerpc/oea: trap: pmap_{pte,ste}_spill() even in the interrupt context

Page table for oea is something like L2 TLB on memory; kernel and
processes share its entries, and process entries can be spilled out.

As done for MMU based on software-managed TLB, we need to restore
such entries even in the interrupt context.

Note that pmap_pte_spill() require no resouce to restore entries.
Still-not-implemented pmap_ste_spill() for OEA64 should also.
Part of PR kern/57621

powerpc/oea: pmap: Drop unused argument for pmap_pvo_reclaim(), NFC
Part of PR kern/57621

powerpc/oea: pmap: Rework pmap_pte_spill()

It was broken in many ways... Now, it gets working stable both for
OEA and OEA64_BRIDGE, as far as I can see.
Part of PR kern/57621

powerpc/oea: pmap: Fix mostly-pointless overhead of pmap_pvo_pool
(1) Drop __aligned(32) from struct pvo_entry; otherwise,
sizeof(struct pvo_entry) is round-up'ed to a multiple of 32.
(2) Do not set sizeof(struct pvo_entry) to `align` argument for
pool_init(9); it must be power of 2.
(3) Align pvo_entry to 32-byte boundary only if reasonably possible,
i.e., OEA without DIAGNOSTIC (--> POOL_REDZONE) for now.
Part of PR kern/57621

powerpc/oea: pmap_create: Use PR_ZERO and drop memset(9), NFC
Part of PR kern/57621

powerpc: oea: For OEA64_BRIDGE, 1:1 map up to 3GiB memory
As done for OEA. Note that kva over 3GiB is reserved.

Provide PMAP_MAP_POOLPAGE for OEA64_BRIDGE at the same time, by
which direct-mapped memory is utilized in order to work around
starvation of 512MiB kernel virtual space.
PR kern/57621

powerpc: Make sure direct-mapped buffer fits within correct range

For OEA and OEA64_BRIDGE, only first 3GiB memory is direct-mapped.
Part of PR kern/57621


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.42.4.1 src/sys/arch/powerpc/include/pmap.h
cvs rdiff -u -r1.26 -r1.26.4.1 src/sys/arch/powerpc/include/vmparam.h
cvs rdiff -u -r1.37 -r1.37.4.1 src/sys/arch/powerpc/include/oea/pmap.h
cvs rdiff -u -r1.114.4.1 -r1.114.4.2 src/sys/arch/powerpc/oea/pmap.c
cvs rdiff -u -r1.13 -r1.13.4.1 src/sys/arch/powerpc/oea/pmap_kernel.c
cvs rdiff -u -r1.55 -r1.55.4.1 src/sys/arch/powerpc/powerpc/bus_dma.c
cvs rdiff -u -r1.163 -r1.163.20.1 src/sys/arch/powerpc/powerpc/trap.c
cvs rdiff -u -r1.105 -r1.105.2.1 src/sys/arch/powerpc/powerpc/vm_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make

2023-12-29 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec 29 18:53:24 UTC 2023

Modified Files:
src/usr.bin/make: dir.c make.c suff.c

Log Message:
make: fix declared types of list nodes

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.285 -r1.286 src/usr.bin/make/dir.c
cvs rdiff -u -r1.260 -r1.261 src/usr.bin/make/make.c
cvs rdiff -u -r1.373 -r1.374 src/usr.bin/make/suff.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/dir.c
diff -u src/usr.bin/make/dir.c:1.285 src/usr.bin/make/dir.c:1.286
--- src/usr.bin/make/dir.c:1.285	Tue Dec 19 19:33:39 2023
+++ src/usr.bin/make/dir.c	Fri Dec 29 18:53:24 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: dir.c,v 1.285 2023/12/19 19:33:39 rillig Exp $	*/
+/*	$NetBSD: dir.c,v 1.286 2023/12/29 18:53:24 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -132,7 +132,7 @@
 #include "job.h"
 
 /*	"@(#)dir.c	8.2 (Berkeley) 1/2/94"	*/
-MAKE_RCSID("$NetBSD: dir.c,v 1.285 2023/12/19 19:33:39 rillig Exp $");
+MAKE_RCSID("$NetBSD: dir.c,v 1.286 2023/12/29 18:53:24 rillig Exp $");
 
 /*
  * A search path is a list of CachedDir structures. A CachedDir has in it the
@@ -227,8 +227,6 @@ struct CachedDir {
 typedef List CachedDirList;
 typedef ListNode CachedDirListNode;
 
-typedef ListNode SearchPathNode;
-
 /* A list of cached directories, with fast lookup by directory name. */
 typedef struct OpenDirs {
 	CachedDirList list;
@@ -803,7 +801,7 @@ DirExpandCurly(const char *word, const c
 static void
 DirExpandPath(const char *pattern, SearchPath *path, StringList *expansions)
 {
-	SearchPathNode *ln;
+	CachedDirListNode *ln;
 	for (ln = path->dirs.first; ln != NULL; ln = ln->next) {
 		CachedDir *dir = ln->datum;
 		DirMatchFiles(pattern, dir, expansions);
@@ -1044,7 +1042,7 @@ static bool
 FindFileRelative(SearchPath *path, bool seenDotLast,
 		 const char *name, char **out_file)
 {
-	SearchPathNode *ln;
+	CachedDirListNode *ln;
 	bool checkedDot = false;
 	char *file;
 
@@ -1107,7 +1105,7 @@ FindFileAbsolute(SearchPath *path, bool 
 		 const char *name, const char *base, char **out_file)
 {
 	char *file;
-	SearchPathNode *ln;
+	CachedDirListNode *ln;
 
 	DEBUG0(DIR, "   Trying exact path matches...\n");
 
@@ -1180,7 +1178,7 @@ Dir_FindFile(const char *name, SearchPat
 	 * of each of the directories on the search path.
 	 */
 	if (base == name || (base - name == 2 && *name == '.')) {
-		SearchPathNode *ln;
+		CachedDirListNode *ln;
 
 		/*
 		 * Look through all the directories on the path seeking one
@@ -1463,7 +1461,7 @@ SearchPath_Add(SearchPath *path, const c
 {
 
 	if (path != NULL && strcmp(name, ".DOTLAST") == 0) {
-		SearchPathNode *ln;
+		CachedDirListNode *ln;
 
 		/* XXX: Linear search gets slow with thousands of entries. */
 		for (ln = path->dirs.first; ln != NULL; ln = ln->next) {
@@ -1496,7 +1494,7 @@ SearchPath *
 Dir_CopyDirSearchPath(void)
 {
 	SearchPath *path = SearchPath_New();
-	SearchPathNode *ln;
+	CachedDirListNode *ln;
 	for (ln = dirSearchPath.dirs.first; ln != NULL; ln = ln->next) {
 		CachedDir *dir = ln->datum;
 		Lst_Append(>dirs, CachedDir_Ref(dir));
@@ -1514,7 +1512,7 @@ char *
 SearchPath_ToFlags(SearchPath *path, const char *flag)
 {
 	Buffer buf;
-	SearchPathNode *ln;
+	CachedDirListNode *ln;
 
 	Buf_Init();
 
@@ -1534,7 +1532,7 @@ SearchPath_ToFlags(SearchPath *path, con
 void
 SearchPath_Free(SearchPath *path)
 {
-	SearchPathNode *ln;
+	CachedDirListNode *ln;
 
 	for (ln = path->dirs.first; ln != NULL; ln = ln->next) {
 		CachedDir *dir = ln->datum;
@@ -1565,7 +1563,7 @@ SearchPath_Clear(SearchPath *path)
 void
 SearchPath_AddAll(SearchPath *dst, SearchPath *src)
 {
-	SearchPathNode *ln;
+	CachedDirListNode *ln;
 
 	for (ln = src->dirs.first; ln != NULL; ln = ln->next) {
 		CachedDir *dir = ln->datum;
@@ -1602,7 +1600,7 @@ Dir_PrintDirectories(void)
 void
 SearchPath_Print(const SearchPath *path)
 {
-	SearchPathNode *ln;
+	CachedDirListNode *ln;
 
 	for (ln = path->dirs.first; ln != NULL; ln = ln->next) {
 		const CachedDir *dir = ln->datum;

Index: src/usr.bin/make/make.c
diff -u src/usr.bin/make/make.c:1.260 src/usr.bin/make/make.c:1.261
--- src/usr.bin/make/make.c:1.260	Fri Dec 29 12:20:55 2023
+++ src/usr.bin/make/make.c	Fri Dec 29 18:53:24 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: make.c,v 1.260 2023/12/29 12:20:55 rillig Exp $	*/
+/*	$NetBSD: make.c,v 1.261 2023/12/29 18:53:24 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -104,7 +104,7 @@
 #include "job.h"
 
 /*	"@(#)make.c	8.1 (Berkeley) 6/6/93"	*/
-MAKE_RCSID("$NetBSD: make.c,v 1.260 2023/12/29 12:20:55 rillig Exp $");
+MAKE_RCSID("$NetBSD: make.c,v 1.261 2023/12/29 18:53:24 rillig Exp $");
 
 /* Sequence # to detect recursion. */
 static unsigned int checked_seqno = 1;
@@ -1224,7 +1224,7 @@ MakePrintStatusList(GNodeList *gnodes, i
 static void
 ExamineLater(GNodeList *examine, GNodeList 

CVS commit: src/usr.bin/make

2023-12-29 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec 29 18:53:24 UTC 2023

Modified Files:
src/usr.bin/make: dir.c make.c suff.c

Log Message:
make: fix declared types of list nodes

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.285 -r1.286 src/usr.bin/make/dir.c
cvs rdiff -u -r1.260 -r1.261 src/usr.bin/make/make.c
cvs rdiff -u -r1.373 -r1.374 src/usr.bin/make/suff.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/bin/sh

2023-12-29 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Fri Dec 29 15:49:24 UTC 2023

Modified Files:
src/bin/sh: expand.c

Log Message:
PR bin/57773

Fix another bug reported by Jarle Fredrik Greipsland and added
to PR bin/57773, which relates to calculating the length of a
positional parameter which contains CTL chars -- yes, this one
really is that specific, though it would also affect the special
param $0 if it were to contain CTL chars, and its length was
requested - that is fixed with the same change.  And note: $0
is not affected because it looks like a positional param (it
isn't, ${00} would be, but is always unset, ${0} isn't) all
special parame would be affected the same way, but the only one
that can ever contain a CTL char is $0 I believe.  ($@ and $*
were affected, but just because they're expanding the positional
params ... ${#@} and ${#*} are both technically unspecified
expansions - and different shells produce different results.

See the PR for the details of this one (and the previous).

Thanks for the PR.

XXX pullup to everything.


To generate a diff of this commit:
cvs rdiff -u -r1.143 -r1.144 src/bin/sh/expand.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/sh/expand.c
diff -u src/bin/sh/expand.c:1.143 src/bin/sh/expand.c:1.144
--- src/bin/sh/expand.c:1.143	Mon Dec 25 02:28:47 2023
+++ src/bin/sh/expand.c	Fri Dec 29 15:49:23 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: expand.c,v 1.143 2023/12/25 02:28:47 kre Exp $	*/
+/*	$NetBSD: expand.c,v 1.144 2023/12/29 15:49:23 kre Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)expand.c	8.5 (Berkeley) 5/15/95";
 #else
-__RCSID("$NetBSD: expand.c,v 1.143 2023/12/25 02:28:47 kre Exp $");
+__RCSID("$NetBSD: expand.c,v 1.144 2023/12/29 15:49:23 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -1206,7 +1206,7 @@ varvalue(const char *name, int quoted, i
 	quoted ? ", quoted" : "", subtype, flag));
 
 	if (subtype == VSLENGTH)	/* no magic required ... */
-		flag &= ~EXP_FULL;
+		flag &= ~(EXP_FULL | EXP_QNEEDED);
 
 #define STRTODEST(p) \
 	do {\
@@ -1218,7 +1218,7 @@ varvalue(const char *name, int quoted, i
 			} \
 		} else \
 			while (*p) { \
-if (ISCTL(*p)) \
+if ((flag & EXP_QNEEDED) && ISCTL(*p)) \
 	STPUTC(CTLESC, expdest); \
 STPUTC(*p++, expdest); \
 			} \



CVS commit: src/bin/sh

2023-12-29 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Fri Dec 29 15:49:24 UTC 2023

Modified Files:
src/bin/sh: expand.c

Log Message:
PR bin/57773

Fix another bug reported by Jarle Fredrik Greipsland and added
to PR bin/57773, which relates to calculating the length of a
positional parameter which contains CTL chars -- yes, this one
really is that specific, though it would also affect the special
param $0 if it were to contain CTL chars, and its length was
requested - that is fixed with the same change.  And note: $0
is not affected because it looks like a positional param (it
isn't, ${00} would be, but is always unset, ${0} isn't) all
special parame would be affected the same way, but the only one
that can ever contain a CTL char is $0 I believe.  ($@ and $*
were affected, but just because they're expanding the positional
params ... ${#@} and ${#*} are both technically unspecified
expansions - and different shells produce different results.

See the PR for the details of this one (and the previous).

Thanks for the PR.

XXX pullup to everything.


To generate a diff of this commit:
cvs rdiff -u -r1.143 -r1.144 src/bin/sh/expand.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make/unit-tests

2023-12-29 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec 29 15:47:03 UTC 2023

Modified Files:
src/usr.bin/make/unit-tests: varmod-assign.exp varmod-assign.mk

Log Message:
tests/make: test the '::=' assignment modifier


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/make/unit-tests/varmod-assign.exp
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/make/unit-tests/varmod-assign.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/unit-tests/varmod-assign.exp
diff -u src/usr.bin/make/unit-tests/varmod-assign.exp:1.17 src/usr.bin/make/unit-tests/varmod-assign.exp:1.18
--- src/usr.bin/make/unit-tests/varmod-assign.exp:1.17	Tue Nov 30 20:48:01 2021
+++ src/usr.bin/make/unit-tests/varmod-assign.exp	Fri Dec 29 15:47:03 2023
@@ -12,6 +12,31 @@ Var_Parse: ${${VARNAME}} != "assigned-va
 Var_Parse: ${VARNAME}} != "assigned-value" (eval-defined)
 Global: .MAKEFLAGS =  -r -k -d v -d
 Global: .MAKEFLAGS =  -r -k -d v -d 0
+Var_Parse: ${CMD_CMD_VAR::=new-value}  || ${CMD_GLOBAL_VAR::=new-value}  || ${CMD_ENV_VAR::=new-value}  || "${CMD_NEW_VAR::=new-value}" (eval-defined)
+Evaluating modifier ${CMD_CMD_VAR::...} on value "cmd-value"
+Modifier part: "new-value"
+Command: CMD_CMD_VAR = new-value
+Global: .MAKEOVERRIDES =  FIRST LAST LAST LAST APPENDED RAN RAN RAN IT1 THEN1 IE2 ELSE2 CMD_CMD_VAR CMD_CMD_VAR
+Result of ${CMD_CMD_VAR::=new-value} is ""
+Var_Parse: ${CMD_GLOBAL_VAR::=new-value}  || ${CMD_ENV_VAR::=new-value}  || "${CMD_NEW_VAR::=new-value}" (eval-defined)
+Evaluating modifier ${CMD_GLOBAL_VAR::...} on value "global-value"
+Modifier part: "new-value"
+Global: CMD_GLOBAL_VAR = new-value
+Result of ${CMD_GLOBAL_VAR::=new-value} is ""
+Var_Parse: ${CMD_ENV_VAR::=new-value}  || "${CMD_NEW_VAR::=new-value}" (eval-defined)
+Evaluating modifier ${CMD_ENV_VAR::...} on value "env-value"
+Modifier part: "new-value"
+Global: CMD_ENV_VAR = new-value
+Result of ${CMD_ENV_VAR::=new-value} is ""
+Var_Parse: ${CMD_NEW_VAR::=new-value}" (eval)
+Evaluating modifier ${CMD_NEW_VAR::...} on value "" (eval, undefined)
+Modifier part: "new-value"
+Global: ignoring delete 'CMD_NEW_VAR' as it is not found
+Command: CMD_NEW_VAR = new-value
+Global: .MAKEOVERRIDES =  FIRST LAST LAST LAST APPENDED RAN RAN RAN IT1 THEN1 IE2 ELSE2 CMD_CMD_VAR CMD_CMD_VAR CMD_NEW_VAR
+Result of ${CMD_NEW_VAR::=new-value} is "" (eval, undefined)
+Global: .MAKEFLAGS =  -r -k -d v -d 0 -d v -d
+Global: .MAKEFLAGS =  -r -k -d v -d 0 -d v -d 0
 make: Bad modifier ":" for variable ""
 mod-assign-empty: value}
 make: Bad modifier ":" for variable ""

Index: src/usr.bin/make/unit-tests/varmod-assign.mk
diff -u src/usr.bin/make/unit-tests/varmod-assign.mk:1.16 src/usr.bin/make/unit-tests/varmod-assign.mk:1.17
--- src/usr.bin/make/unit-tests/varmod-assign.mk:1.16	Sun Nov 19 21:47:52 2023
+++ src/usr.bin/make/unit-tests/varmod-assign.mk	Fri Dec 29 15:47:03 2023
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-assign.mk,v 1.16 2023/11/19 21:47:52 rillig Exp $
+# $NetBSD: varmod-assign.mk,v 1.17 2023/12/29 15:47:03 rillig Exp $
 #
 # Tests for the obscure ::= variable modifiers, which perform variable
 # assignments during evaluation, just like the = operator in C.
@@ -7,34 +7,38 @@ all:	mod-assign-empty
 all:	mod-assign-parse
 all:	mod-assign-shell-error
 
-# The modifier '::?=' applies the assignment operator '?=' 3 times. The
+# In the following loop expression,
+# the '::?=' modifier applies the assignment operator '?=' 3 times. The
 # operator '?=' only has an effect for the first time, therefore the variable
 # FIRST ends up with the value 1.
 .if "${1 2 3:L:@i@${FIRST::?=$i}@} first=${FIRST}" != " first=1"
 .  error
 .endif
 
-# The modifier '::=' applies the assignment operator '=' 3 times. The
+# In the following loop expression,
+# the modifier '::=' applies the assignment operator '=' 3 times. The
 # operator '=' overwrites the previous value, therefore the variable LAST ends
 # up with the value 3.
 .if "${1 2 3:L:@i@${LAST::=$i}@} last=${LAST}" != " last=3"
 .  error
 .endif
 
-# The modifier '::+=' applies the assignment operator '+=' 3 times. The
+# In the following loop expression,
+# the modifier '::+=' applies the assignment operator '+=' 3 times. The
 # operator '+=' appends 3 times to the variable, therefore the variable
 # APPENDED ends up with the value "1 2 3".
 .if "${1 2 3:L:@i@${APPENDED::+=$i}@} appended=${APPENDED}" != " appended=1 2 3"
 .  error
 .endif
 
-# The modifier '::!=' applies the assignment operator '!=' 3 times. Just as
+# In the following loop expression,
+# the modifier '::!=' applies the assignment operator '!=' 3 times. Just as
 # with the modifier '::=', the last value is stored in the RAN variable.
 .if "${1 2 3:L:@i@${RAN::!=${i:%=echo '<%>';}}@} ran=${RAN}" != " ran=<3>"
 .  error
 .endif
 
-# The assignments were performed as part of .if conditions and thus happened
+# When a '::=' modifier is 

CVS commit: src/usr.bin/make/unit-tests

2023-12-29 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec 29 15:47:03 UTC 2023

Modified Files:
src/usr.bin/make/unit-tests: varmod-assign.exp varmod-assign.mk

Log Message:
tests/make: test the '::=' assignment modifier


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/usr.bin/make/unit-tests/varmod-assign.exp
cvs rdiff -u -r1.16 -r1.17 src/usr.bin/make/unit-tests/varmod-assign.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make

2023-12-29 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec 29 14:57:00 UTC 2023

Modified Files:
src/usr.bin/make: var.c
src/usr.bin/make/unit-tests: varmod-defined.exp
varname-dot-suffixes.exp

Log Message:
make: simplify debug message for the ':@var@...@' modifier

The previous variant was hard to understand.


To generate a diff of this commit:
cvs rdiff -u -r1.1089 -r1.1090 src/usr.bin/make/var.c
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/make/unit-tests/varmod-defined.exp
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/varname-dot-suffixes.exp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make

2023-12-29 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec 29 14:57:00 UTC 2023

Modified Files:
src/usr.bin/make: var.c
src/usr.bin/make/unit-tests: varmod-defined.exp
varname-dot-suffixes.exp

Log Message:
make: simplify debug message for the ':@var@...@' modifier

The previous variant was hard to understand.


To generate a diff of this commit:
cvs rdiff -u -r1.1089 -r1.1090 src/usr.bin/make/var.c
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/make/unit-tests/varmod-defined.exp
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/varname-dot-suffixes.exp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.1089 src/usr.bin/make/var.c:1.1090
--- src/usr.bin/make/var.c:1.1089	Fri Dec 29 13:25:15 2023
+++ src/usr.bin/make/var.c	Fri Dec 29 14:57:00 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.1089 2023/12/29 13:25:15 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.1090 2023/12/29 14:57:00 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -139,7 +139,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.1089 2023/12/29 13:25:15 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.1090 2023/12/29 14:57:00 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -1597,9 +1597,8 @@ ModifyWord_Loop(Substring word, SepBuf *
 	/* TODO: handle errors */
 
 	assert(word.end[0] == '\0');	/* assume null-terminated word */
-	DEBUG4(VAR, "ModifyWord_Loop: "
-		"in \"%s\", replace \"%s\" with \"%s\" to \"%s\"\n",
-	word.start, args->var, args->body, s);
+	DEBUG2(VAR, "ModifyWord_Loop: expand \"%s\" to \"%s\"\n",
+	args->body, s);
 
 	if (s[0] == '\n' || Buf_EndsWith(>buf, '\n'))
 		buf->needSep = false;

Index: src/usr.bin/make/unit-tests/varmod-defined.exp
diff -u src/usr.bin/make/unit-tests/varmod-defined.exp:1.13 src/usr.bin/make/unit-tests/varmod-defined.exp:1.14
--- src/usr.bin/make/unit-tests/varmod-defined.exp:1.13	Tue Aug 23 19:22:01 2022
+++ src/usr.bin/make/unit-tests/varmod-defined.exp	Fri Dec 29 14:57:00 2023
@@ -14,7 +14,7 @@ Modifier part: "${8_DOLLARS}"
 ModifyWords: split "" into 1 word
 Global: var = 
 Var_Parse: ${8_DOLLARS} (eval-keep-undefined)
-ModifyWord_Loop: in "", replace "var" with "${8_DOLLARS}" to ""
+ModifyWord_Loop: expand "${8_DOLLARS}" to ""
 Global: delete var
 Result of ${VAR:@var@${8_DOLLARS}@} is "" (eval-keep-dollar-and-undefined, regular)
 Global: VAR = 

Index: src/usr.bin/make/unit-tests/varname-dot-suffixes.exp
diff -u src/usr.bin/make/unit-tests/varname-dot-suffixes.exp:1.7 src/usr.bin/make/unit-tests/varname-dot-suffixes.exp:1.8
--- src/usr.bin/make/unit-tests/varname-dot-suffixes.exp:1.7	Wed Dec 20 09:03:09 2023
+++ src/usr.bin/make/unit-tests/varname-dot-suffixes.exp	Fri Dec 29 14:57:00 2023
@@ -28,10 +28,10 @@ Modifier part: "${.SUFFIXES}"
 ModifyWords: split "1 2" into 2 words
 Command: ignoring '.SUFFIXES = 1' as it is read-only
 Var_Parse: ${.SUFFIXES} (eval-defined)
-ModifyWord_Loop: in "1", replace ".SUFFIXES" with "${.SUFFIXES}" to ".c .o .1 .err .tar.gz"
+ModifyWord_Loop: expand "${.SUFFIXES}" to ".c .o .1 .err .tar.gz"
 Command: ignoring '.SUFFIXES = 2' as it is read-only
 Var_Parse: ${.SUFFIXES} (eval-defined)
-ModifyWord_Loop: in "2", replace ".SUFFIXES" with "${.SUFFIXES}" to ".c .o .1 .err .tar.gz"
+ModifyWord_Loop: expand "${.SUFFIXES}" to ".c .o .1 .err .tar.gz"
 Command: ignoring delete '.SUFFIXES' as it is not found
 Result of ${1 2:@.SUFFIXES@${.SUFFIXES}@} is ".c .o .1 .err .tar.gz .c .o .1 .err .tar.gz" (eval-defined, defined)
 Global: .MAKEFLAGS =  -r -k -d v -d 0 -d v -d 0 -d v -d



CVS commit: src/usr.bin/make

2023-12-29 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec 29 13:25:15 UTC 2023

Modified Files:
src/usr.bin/make: var.c

Log Message:
make: clean up variable handling

All variables from the command line scope have the fromCmd flag set, so
there is no need to check for it.

Inline redundant local variables.

Variables from a scope cannot be short-lived, so there is no need to
call VarFreeShortLived.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.1088 -r1.1089 src/usr.bin/make/var.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make

2023-12-29 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec 29 13:25:15 UTC 2023

Modified Files:
src/usr.bin/make: var.c

Log Message:
make: clean up variable handling

All variables from the command line scope have the fromCmd flag set, so
there is no need to check for it.

Inline redundant local variables.

Variables from a scope cannot be short-lived, so there is no need to
call VarFreeShortLived.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.1088 -r1.1089 src/usr.bin/make/var.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.1088 src/usr.bin/make/var.c:1.1089
--- src/usr.bin/make/var.c:1.1088	Fri Dec 29 12:59:43 2023
+++ src/usr.bin/make/var.c	Fri Dec 29 13:25:15 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.1088 2023/12/29 12:59:43 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.1089 2023/12/29 13:25:15 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -139,7 +139,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.1088 2023/12/29 12:59:43 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.1089 2023/12/29 13:25:15 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -897,20 +897,6 @@ Var_UnExport(bool isEnv, const char *arg
 	FStr_Done();
 }
 
-/*
- * When there is a variable of the same name in the command line scope, the
- * global variable would not be visible anywhere.  Therefore, there is no
- * point in setting it at all.
- *
- * See 'scope == SCOPE_CMDLINE' in Var_SetWithFlags.
- */
-static bool
-ExistsInCmdline(const char *name)
-{
-	Var *v = VarFind(name, SCOPE_CMDLINE, false);
-	return v != NULL && v->fromCmd;
-}
-
 /* Set the variable to the value; the name is not expanded. */
 void
 Var_SetWithFlags(GNode *scope, const char *name, const char *val,
@@ -926,7 +912,12 @@ Var_SetWithFlags(GNode *scope, const cha
 		return;
 	}
 
-	if (scope == SCOPE_GLOBAL && ExistsInCmdline(name)) {
+	if (scope == SCOPE_GLOBAL
+	&& VarFind(name, SCOPE_CMDLINE, false) != NULL) {
+		/*
+		 * The global variable would not be visible anywhere.
+		 * Therefore, there is no point in setting it at all.
+		 */
 		DEBUG3(VAR,
 		"%s: ignoring '%s = %s' "
 		"due to a command line variable of the same name\n",
@@ -1023,7 +1014,6 @@ Var_Set(GNode *scope, const char *name, 
 void
 Var_SetExpand(GNode *scope, const char *name, const char *val)
 {
-	const char *unexpanded_name = name;
 	FStr varname = FStr_InitRefer(name);
 
 	assert(val != NULL);
@@ -1034,7 +1024,7 @@ Var_SetExpand(GNode *scope, const char *
 		DEBUG4(VAR,
 		"%s: ignoring '%s = %s' "
 		"as the variable name '%s' expands to empty\n",
-		scope->name, varname.str, val, unexpanded_name);
+		scope->name, varname.str, val, name);
 	} else
 		Var_SetWithFlags(scope, varname.str, val, VAR_SET_NONE);
 
@@ -1421,10 +1411,9 @@ ModifyWord_Subst(Substring word, SepBuf 
 {
 	struct ModifyWord_SubstArgs *args = data;
 	size_t wordLen, lhsLen;
-	const char *wordEnd, *match;
+	const char *match;
 
 	wordLen = Substring_Length(word);
-	wordEnd = word.end;
 	if (args->pflags.subOnce && args->matched)
 		goto nosub;
 
@@ -1439,7 +1428,7 @@ ModifyWord_Subst(Substring word, SepBuf 
 
 		/* :S,^prefix,replacement, or :S,^whole$,replacement, */
 		SepBuf_AddSubstring(buf, args->rhs);
-		SepBuf_AddRange(buf, word.start + lhsLen, wordEnd);
+		SepBuf_AddRange(buf, word.start + lhsLen, word.end);
 		args->matched = true;
 		return;
 	}
@@ -1447,11 +1436,11 @@ ModifyWord_Subst(Substring word, SepBuf 
 	if (args->pflags.anchorEnd) {
 		if (wordLen < lhsLen)
 			goto nosub;
-		if (memcmp(wordEnd - lhsLen, args->lhs.start, lhsLen) != 0)
+		if (memcmp(word.end - lhsLen, args->lhs.start, lhsLen) != 0)
 			goto nosub;
 
 		/* :S,suffix$,replacement, */
-		SepBuf_AddRange(buf, word.start, wordEnd - lhsLen);
+		SepBuf_AddRange(buf, word.start, word.end - lhsLen);
 		SepBuf_AddSubstring(buf, args->rhs);
 		args->matched = true;
 		return;
@@ -2066,7 +2055,6 @@ static void
 ParseModifierPartBalanced(const char **pp, LazyBuf *part)
 {
 	const char *p = *pp;
-	const char *start = *pp;
 
 	if (p[1] == '(' || p[1] == '{') {
 		char startc = p[1];
@@ -2081,10 +2069,10 @@ ParseModifierPartBalanced(const char **p
 	depth--;
 			}
 		}
-		LazyBuf_AddSubstring(part, Substring_Init(start, p));
+		LazyBuf_AddSubstring(part, Substring_Init(*pp, p));
 		*pp = p;
 	} else {
-		LazyBuf_Add(part, *start);
+		LazyBuf_Add(part, *p);
 		*pp = p + 1;
 	}
 }
@@ -3480,7 +3468,7 @@ found_op:
 		return AMR_BAD;
 	}
 
-	*pp = mod + (op[0] == '+' || op[0] == '?' || op[0] == '!' ? 3 : 2);
+	*pp = mod + (op[0] != '=' ? 3 : 2);
 
 	if (!ParseModifierPart(pp, ch->endc, expr->emode, ch, ))
 		return AMR_CLEANUP;
@@ -3492,13 +3480,9 @@ found_op:
 		goto done;
 
 	scope = expr->scope;	/* scope where v 

CVS commit: src/usr.bin/make

2023-12-29 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec 29 12:59:43 UTC 2023

Modified Files:
src/usr.bin/make: cond.c job.c var.c

Log Message:
make: clean up comments

No binary change, except for line numbers in assertions.


To generate a diff of this commit:
cvs rdiff -u -r1.358 -r1.359 src/usr.bin/make/cond.c
cvs rdiff -u -r1.461 -r1.462 src/usr.bin/make/job.c
cvs rdiff -u -r1.1087 -r1.1088 src/usr.bin/make/var.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/cond.c
diff -u src/usr.bin/make/cond.c:1.358 src/usr.bin/make/cond.c:1.359
--- src/usr.bin/make/cond.c:1.358	Fri Dec 29 12:20:55 2023
+++ src/usr.bin/make/cond.c	Fri Dec 29 12:59:43 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: cond.c,v 1.358 2023/12/29 12:20:55 rillig Exp $	*/
+/*	$NetBSD: cond.c,v 1.359 2023/12/29 12:59:43 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -91,7 +91,7 @@
 #include "dir.h"
 
 /*	"@(#)cond.c	8.2 (Berkeley) 1/2/94"	*/
-MAKE_RCSID("$NetBSD: cond.c,v 1.358 2023/12/29 12:20:55 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.359 2023/12/29 12:59:43 rillig Exp $");
 
 /*
  * Conditional expressions conform to this grammar:
@@ -165,9 +165,7 @@ typedef struct CondParser {
 
 	/*
 	 * Whether an error message has already been printed for this
-	 * condition. The first available error message is usually the most
-	 * specific one, therefore it makes sense to suppress the standard
-	 * "Malformed conditional" message.
+	 * condition.
 	 */
 	bool printedError;
 } CondParser;
@@ -257,7 +255,7 @@ ParseFuncArg(CondParser *par, const char
 	const char *p = *pp;
 	char *res;
 
-	p++;			/* Skip opening '(' - verified by caller */
+	p++;			/* skip the '(' */
 	cpp_skip_hspace();
 	res = ParseWord(, doEval);
 	cpp_skip_hspace();
@@ -486,10 +484,6 @@ CondParser_Leaf(CondParser *par, bool do
 		default:
 			if (!unquotedOK && !quoted && *start != '$' &&
 			!ch_isdigit(*start)) {
-/*
- * The left-hand side must be quoted,
- * an expression or a number.
- */
 str = FStr_InitRefer(NULL);
 goto return_str;
 			}
@@ -743,13 +737,12 @@ CondParser_ComparisonOrLeaf(CondParser *
 	char *arg;
 	const char *p;
 
-	/* Push anything numeric through the compare expression */
 	p = par->p;
 	if (ch_isdigit(p[0]) || p[0] == '-' || p[0] == '+')
 		return CondParser_Comparison(par, doEval);
 
 	/*
-	 * Most likely we have a naked token to apply the default function to.
+	 * Most likely we have a bare word to apply the default function to.
 	 * However, ".if a == b" gets here when the "a" is unquoted and
 	 * doesn't start with a '$'. This surprises people.
 	 * If what follows the function argument is a '=' or '!' then the

Index: src/usr.bin/make/job.c
diff -u src/usr.bin/make/job.c:1.461 src/usr.bin/make/job.c:1.462
--- src/usr.bin/make/job.c:1.461	Tue Dec 19 19:33:39 2023
+++ src/usr.bin/make/job.c	Fri Dec 29 12:59:43 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: job.c,v 1.461 2023/12/19 19:33:39 rillig Exp $	*/
+/*	$NetBSD: job.c,v 1.462 2023/12/29 12:59:43 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -141,7 +141,7 @@
 #include "trace.h"
 
 /*	"@(#)job.c	8.2 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: job.c,v 1.461 2023/12/19 19:33:39 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.462 2023/12/29 12:59:43 rillig Exp $");
 
 /*
  * A shell defines how the commands are run.  All commands for a target are
@@ -857,13 +857,9 @@ static void
 JobWriteSpecials(Job *job, ShellWriter *wr, const char *escCmd, bool run,
 		 CommandFlags *inout_cmdFlags, const char **inout_cmdTemplate)
 {
-	if (!run) {
-		/*
-		 * If there is no command to run, there is no need to switch
-		 * error checking off and on again for nothing.
-		 */
+	if (!run)
 		inout_cmdFlags->ignerr = false;
-	} else if (shell->hasErrCtl)
+	else if (shell->hasErrCtl)
 		ShellWriter_ErrOff(wr, job->echo && inout_cmdFlags->echo);
 	else if (shell->runIgnTmpl != NULL && shell->runIgnTmpl[0] != '\0') {
 		JobWriteSpecialsEchoCtl(job, wr, inout_cmdFlags, escCmd,

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.1087 src/usr.bin/make/var.c:1.1088
--- src/usr.bin/make/var.c:1.1087	Fri Dec 29 12:20:55 2023
+++ src/usr.bin/make/var.c	Fri Dec 29 12:59:43 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.1087 2023/12/29 12:20:55 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.1088 2023/12/29 12:59:43 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -139,7 +139,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.1087 2023/12/29 12:20:55 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.1088 2023/12/29 12:59:43 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -261,10 +261,7 @@ typedef struct SepBuf {
 } SepBuf;
 
 
-/*
- * This lets us tell if we 

CVS commit: src/usr.bin/make

2023-12-29 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec 29 12:59:43 UTC 2023

Modified Files:
src/usr.bin/make: cond.c job.c var.c

Log Message:
make: clean up comments

No binary change, except for line numbers in assertions.


To generate a diff of this commit:
cvs rdiff -u -r1.358 -r1.359 src/usr.bin/make/cond.c
cvs rdiff -u -r1.461 -r1.462 src/usr.bin/make/job.c
cvs rdiff -u -r1.1087 -r1.1088 src/usr.bin/make/var.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/usr.bin/make

2023-12-29 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec 29 12:20:55 UTC 2023

Modified Files:
src/usr.bin/make: cond.c make.c suff.c var.c

Log Message:
make: simplify memory allocation for string buffers

In edge cases and short-lived buffers, the initial buffer size is
irrelevant, so use the default.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.357 -r1.358 src/usr.bin/make/cond.c
cvs rdiff -u -r1.259 -r1.260 src/usr.bin/make/make.c
cvs rdiff -u -r1.372 -r1.373 src/usr.bin/make/suff.c
cvs rdiff -u -r1.1086 -r1.1087 src/usr.bin/make/var.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/cond.c
diff -u src/usr.bin/make/cond.c:1.357 src/usr.bin/make/cond.c:1.358
--- src/usr.bin/make/cond.c:1.357	Tue Dec 19 19:33:39 2023
+++ src/usr.bin/make/cond.c	Fri Dec 29 12:20:55 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: cond.c,v 1.357 2023/12/19 19:33:39 rillig Exp $	*/
+/*	$NetBSD: cond.c,v 1.358 2023/12/29 12:20:55 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -91,7 +91,7 @@
 #include "dir.h"
 
 /*	"@(#)cond.c	8.2 (Berkeley) 1/2/94"	*/
-MAKE_RCSID("$NetBSD: cond.c,v 1.357 2023/12/19 19:33:39 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.358 2023/12/29 12:20:55 rillig Exp $");
 
 /*
  * Conditional expressions conform to this grammar:
@@ -213,7 +213,7 @@ ParseWord(const char **pp, bool doEval)
 	Buffer word;
 	int depth;
 
-	Buf_InitSize(, 16);
+	Buf_Init();
 
 	depth = 0;
 	for (;;) {

Index: src/usr.bin/make/make.c
diff -u src/usr.bin/make/make.c:1.259 src/usr.bin/make/make.c:1.260
--- src/usr.bin/make/make.c:1.259	Tue Feb 14 21:38:31 2023
+++ src/usr.bin/make/make.c	Fri Dec 29 12:20:55 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: make.c,v 1.259 2023/02/14 21:38:31 rillig Exp $	*/
+/*	$NetBSD: make.c,v 1.260 2023/12/29 12:20:55 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -104,7 +104,7 @@
 #include "job.h"
 
 /*	"@(#)make.c	8.1 (Berkeley) 6/6/93"	*/
-MAKE_RCSID("$NetBSD: make.c,v 1.259 2023/02/14 21:38:31 rillig Exp $");
+MAKE_RCSID("$NetBSD: make.c,v 1.260 2023/12/29 12:20:55 rillig Exp $");
 
 /* Sequence # to detect recursion. */
 static unsigned int checked_seqno = 1;
@@ -132,7 +132,7 @@ GNodeType_ToString(GNodeType type, void 
 {
 	Buffer buf;
 
-	Buf_InitSize(, 32);
+	Buf_Init();
 #define ADD(flag) Buf_AddFlag(, (type & (flag)) != OP_NONE, #flag)
 	ADD(OP_DEPENDS);
 	ADD(OP_FORCE);
@@ -174,7 +174,7 @@ GNodeFlags_ToString(GNodeFlags flags, vo
 {
 	Buffer buf;
 
-	Buf_InitSize(, 32);
+	Buf_Init();
 	Buf_AddFlag(, flags.remake, "REMAKE");
 	Buf_AddFlag(, flags.childMade, "CHILDMADE");
 	Buf_AddFlag(, flags.force, "FORCE");

Index: src/usr.bin/make/suff.c
diff -u src/usr.bin/make/suff.c:1.372 src/usr.bin/make/suff.c:1.373
--- src/usr.bin/make/suff.c:1.372	Tue Dec 19 19:33:39 2023
+++ src/usr.bin/make/suff.c	Fri Dec 29 12:20:55 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: suff.c,v 1.372 2023/12/19 19:33:39 rillig Exp $	*/
+/*	$NetBSD: suff.c,v 1.373 2023/12/29 12:20:55 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -115,7 +115,7 @@
 #include "dir.h"
 
 /*	"@(#)suff.c	8.4 (Berkeley) 3/21/94"	*/
-MAKE_RCSID("$NetBSD: suff.c,v 1.372 2023/12/19 19:33:39 rillig Exp $");
+MAKE_RCSID("$NetBSD: suff.c,v 1.373 2023/12/29 12:20:55 rillig Exp $");
 
 typedef List SuffixList;
 typedef ListNode SuffixListNode;
@@ -2113,7 +2113,7 @@ Suffix_Print(const Suffix *suff)
 {
 	Buffer buf;
 
-	Buf_InitSize(, 16);
+	Buf_Init();
 	Buf_AddFlag(, suff->include, "SUFF_INCLUDE");
 	Buf_AddFlag(, suff->library, "SUFF_LIBRARY");
 	Buf_AddFlag(, suff->isNull, "SUFF_NULL");
@@ -2169,7 +2169,7 @@ Suff_NamesStr(void)
 	SuffixListNode *ln;
 	Suffix *suff;
 
-	Buf_InitSize(, 16);
+	Buf_Init();
 	for (ln = sufflist.first; ln != NULL; ln = ln->next) {
 		suff = ln->datum;
 		if (ln != sufflist.first)

Index: src/usr.bin/make/var.c
diff -u src/usr.bin/make/var.c:1.1086 src/usr.bin/make/var.c:1.1087
--- src/usr.bin/make/var.c:1.1086	Wed Dec 20 09:03:08 2023
+++ src/usr.bin/make/var.c	Fri Dec 29 12:20:55 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: var.c,v 1.1086 2023/12/20 09:03:08 rillig Exp $	*/
+/*	$NetBSD: var.c,v 1.1087 2023/12/29 12:20:55 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -139,7 +139,7 @@
 #include "metachar.h"
 
 /*	"@(#)var.c	8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: var.c,v 1.1086 2023/12/20 09:03:08 rillig Exp $");
+MAKE_RCSID("$NetBSD: var.c,v 1.1087 2023/12/29 12:20:55 rillig Exp $");
 
 /*
  * Variables are defined using one of the VAR=value assignments.  Their
@@ -3252,7 +3252,7 @@ ApplyModifier_Words(const char **pp, Mod
 			size_t ac = words.len;
 			SubstringWords_Free(words);
 
-			Buf_InitSize(, 4);
+			Buf_Init();
 			Buf_AddInt(, (int)ac);
 			Expr_SetValueOwn(expr, Buf_DoneData());
 		}



CVS commit: src/usr.bin/make

2023-12-29 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Dec 29 12:20:55 UTC 2023

Modified Files:
src/usr.bin/make: cond.c make.c suff.c var.c

Log Message:
make: simplify memory allocation for string buffers

In edge cases and short-lived buffers, the initial buffer size is
irrelevant, so use the default.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.357 -r1.358 src/usr.bin/make/cond.c
cvs rdiff -u -r1.259 -r1.260 src/usr.bin/make/make.c
cvs rdiff -u -r1.372 -r1.373 src/usr.bin/make/suff.c
cvs rdiff -u -r1.1086 -r1.1087 src/usr.bin/make/var.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/tests/bin/sh

2023-12-29 Thread Andrius V
On Thu, Dec 28, 2023 at 11:08 PM Robert Elz  wrote:
>
> [I could claim that the typo was deliberate, as part of
> the test  but that would be kind of absurd, sh does
> no spell checking to test.]
>
> kre
>

Thanks for clarification. I definitely had few instances when I needed
to revert spelling fixes, which were left on purpose for one reason or
another, fortunately it is not the case here :).


CVS commit: src/share/mk

2023-12-29 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Dec 29 09:17:37 UTC 2023

Modified Files:
src/share/mk: sys.mk

Log Message:
Update ARFLAGS for new binutils.

In binutils 2.34, 'l' was a no-op.
In binutils 2.39, it is used to specify library dependencies.

Remove 'l' from ARFLAGS.

>From Takahiro Kambe in PR 57565.


To generate a diff of this commit:
cvs rdiff -u -r1.148 -r1.149 src/share/mk/sys.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/sys.mk
diff -u src/share/mk/sys.mk:1.148 src/share/mk/sys.mk:1.149
--- src/share/mk/sys.mk:1.148	Tue Dec 14 16:22:07 2021
+++ src/share/mk/sys.mk	Fri Dec 29 09:17:37 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: sys.mk,v 1.148 2021/12/14 16:22:07 christos Exp $
+#	$NetBSD: sys.mk,v 1.149 2023/12/29 09:17:37 wiz Exp $
 #	@(#)sys.mk	8.2 (Berkeley) 3/21/94
 #
 # This file contains the basic rules for make(1) and is read first
@@ -12,7 +12,7 @@ unix?=		We run NetBSD.
 .LIBS:		.a
 
 AR?=		ar
-ARFLAGS?=	rl
+ARFLAGS?=	r
 RANLIB?=	ranlib
 MV?=		mv -f
 



CVS commit: src/share/mk

2023-12-29 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Dec 29 09:17:37 UTC 2023

Modified Files:
src/share/mk: sys.mk

Log Message:
Update ARFLAGS for new binutils.

In binutils 2.34, 'l' was a no-op.
In binutils 2.39, it is used to specify library dependencies.

Remove 'l' from ARFLAGS.

>From Takahiro Kambe in PR 57565.


To generate a diff of this commit:
cvs rdiff -u -r1.148 -r1.149 src/share/mk/sys.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/dev/fdt

2023-12-29 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Dec 29 08:02:47 UTC 2023

Modified Files:
src/sys/dev/fdt: dwcmmc_fdt.c

Log Message:
dwcmmc_fdt_bus_clock: fix an aprint_debug_dev frequency units botch.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/fdt/dwcmmc_fdt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/fdt/dwcmmc_fdt.c
diff -u src/sys/dev/fdt/dwcmmc_fdt.c:1.19 src/sys/dev/fdt/dwcmmc_fdt.c:1.20
--- src/sys/dev/fdt/dwcmmc_fdt.c:1.19	Sun Feb  6 15:47:06 2022
+++ src/sys/dev/fdt/dwcmmc_fdt.c	Fri Dec 29 08:02:47 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: dwcmmc_fdt.c,v 1.19 2022/02/06 15:47:06 jmcneill Exp $ */
+/* $NetBSD: dwcmmc_fdt.c,v 1.20 2023/12/29 08:02:47 skrll Exp $ */
 
 /*-
  * Copyright (c) 2015-2018 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dwcmmc_fdt.c,v 1.19 2022/02/06 15:47:06 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwcmmc_fdt.c,v 1.20 2023/12/29 08:02:47 skrll Exp $");
 
 #include 
 #include 
@@ -249,7 +249,7 @@ dwcmmc_fdt_bus_clock(struct dwc_mmc_soft
 	sc->sc_clock_freq = clk_get_rate(esc->sc_clk_ciu);
 
 	aprint_debug_dev(sc->sc_dev, "set clock rate to %u kHz (target %u kHz)\n",
-	sc->sc_clock_freq, rate);
+	sc->sc_clock_freq / 1000, rate);
 
 	return 0;
 }



CVS commit: src/sys/dev/fdt

2023-12-29 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Fri Dec 29 08:02:47 UTC 2023

Modified Files:
src/sys/dev/fdt: dwcmmc_fdt.c

Log Message:
dwcmmc_fdt_bus_clock: fix an aprint_debug_dev frequency units botch.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/fdt/dwcmmc_fdt.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.