Skip to content

[pull] trunk from NetBSD:trunk#1

Open
pull[bot] wants to merge 10000 commits intoSpencerx:trunkfrom
NetBSD:trunk
Open

[pull] trunk from NetBSD:trunk#1
pull[bot] wants to merge 10000 commits intoSpencerx:trunkfrom
NetBSD:trunk

Conversation

@pull
Copy link

@pull pull bot commented May 22, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added merge-conflict Resolve conflicts manually ⤵️ pull labels May 23, 2025
@netbsd-srcmastr netbsd-srcmastr force-pushed the trunk branch 2 times, most recently from bd68c70 to d8e8e07 Compare January 19, 2026 00:15
rillig and others added 25 commits March 11, 2026 00:46
s/priorisation/prioritisation/
s/Neighor/Neighbor/
  "%lu: %s: " and pass fname, lineno to each; do it in one place.
- Use emalloc and friends instead of homegrown xmalloc and friends.
This makes it possible for macros to be set so as to work correctly
whether .MAKE.SAVE_DOLLARS is "yes" (NetBSD) or "no" (bmake).
In 2024, snprintb_m did that in a few scenarios.
In direct calls to h_snprintb_m_len, several arguments are integers, so
provide a way to distinguish them visually by forcing the value to be
given in hexadecimal. The buffer sizes are typically given in decimal.

Prevent excess or forgotten digits by requiring the number of digits in
the value to be a power of two.
This restores the behavior from NetBSD 10.

While in most cases, 'f' is used with '=' and 'F' is used with ':',
there are useful cases for the other combinations as well, so allow
them.

Planned for pull-up to NetBSD 11.
thorpej and others added 30 commits March 24, 2026 03:39
revision 1.26
date: 2025-12-05 05:27:03 -0800;  author: thorpej;  state: Exp;  lines: +21 -4;
 commitid: jviu62VSzYhPRdlG;
Define the fields in the 68060 Processor Configuration Register.

...into a new file, pcr.h, and adjust things that need the stuff.
- make interrupt numbers in OF, dmesg and systat/vmstat match
- include interrupt controller's name when reporting
because genfs_putpages calls GOP_MARKUPDATE with v_interlock held,
it isn't safe to wait for txg or other i/o. this is a regression
caused by a recent change.
("zfs_netbsd_gop_markupdate: actually update file timestamp")

this commit fixes it by simply dropping GOP_MARKUPDATE for zfs.
as mentioned in the commit message of the change in question,
it's redundant for putpages as we update the timestamps in
GOP_WRITE as well.

for spec/fifo, call the timestamp update logic directly,
not via GOP_MARKUPDATE.

the problem was pointed out by J. Hannken-Illjes.
he also tested this patch.
it turned out that we have too many drivers which would trigger
these assertions. although my impression is that they are actually
not mpsafe, let's revert the assertions for now.

PR/60123
https://gnats.netbsd.org/60123
"higher level operations", along with some helper macros that compute
the latter in terms of the former.

NFCI, but sets the stage for some future cleanup in this area.
issue is dealt with.

Rather than completely re-defining the high-level cache operation macros
to exclude the *_BE bits (which actually penalized systems without an EC
because the *_BE bits set in the CACR initiallly would be lost on the first
cache operation), instead we provide a "platform has dynamic CACR values"
hook.

For NEWS, the values default to the with-*_BE variant, but if an external
cache is discovered, the values are patched up with the non-*_BE variants.
Only one shared assembly language routine needs to be adjusted for this,
the rest of the scenarios where these values are used are handled by the
compiler via constraints.

For all other platforms that don't define __HAVE_M68K_DYNAMIC_CACR,
the values remain compile-time constants, as before.
PGSHIFT might not be available in userland. eg. sparc
use sysconf(_SC_PAGESIZE) to query the kernel instead.
…will be kept

for, before being garbage collected, in seconds. (Timo Buhrmester)
example sentence: "netbsd 11 may come out rfsn"
also fix the man page build to have the same list (from Petre Rodan).

should fix PR#58407, and partially fix PR#59782.

XXX: pullup-11, maybe others
While here, fix another, identical land mine, that
has been buried in the absolute wilderness for years.
Someone would have stepped on it one day.

Also fix a field splitting bug handling : or = in
IFS when generated from ${var-string1:string2} type
expansions.   This one is even older.

Clean up some dead code that didn't get removed with
the initial 60099 fixes, but probably should have been.

DEBUG mode improvements (the last couple of days have
really needed the DEBUG code).
Author: Ryota Ozaki <ozaki-r@iij.ad.jp>
Date:   Thu Mar 12 12:42:03 2026 +0900

    nd: reset ln_asked on state reset

    Even if a userland program such as ping continuously sends packets
    to a (temporarily) unreachable host, the ND resolver only sends
    request packets up to nd_mmaxtries times. This change allows ND
    request packets to continue being sent while the userland process
    is still sending packets.

    Additionally, introduce LLE_UNRESOLVED to fix another issue.
    nd_resolve may incorrectly return an error immediately after sending
    the last ND request packet. For example, if nd_mmaxtries = 1 and two
    packets arrive simultaneously, nd_resolve returns an error for the
    second packet. This occurs because ln_asked is used to determine
    whether the ND resolution is still in progress.

    Instead, use the new LLE_UNRESOLVED state. It is set when the state
    transitions to WAITDELETE, i.e., one second after the last request
    is sent without successful address resolution.

    PR kern/60071

diff --git a/sys/net/if_llatbl.h b/sys/net/if_llatbl.h
index a83f31c..31a3ebef30b 100644
--- a/sys/net/if_llatbl.h
+++ b/sys/net/if_llatbl.h
@@ -249,6 +249,7 @@ MALLOC_DECLARE(M_LLTABLE);
 #define	LLE_VALID	0x0008	/* ll_addr is valid */
 #define	LLE_PUB		0x0020	/* publish entry ??? */
 #define	LLE_LINKED	0x0040	/* linked to lookup structure */
+#define	LLE_UNRESOLVED	0x0080	/* address unresolved */
 /* LLE request flags */
 #define	LLE_EXCLUSIVE	0x2000	/* return lle xlocked  */

diff --git a/sys/net/nd.c b/sys/net/nd.c
index 8ebc5fe..8d12c1d7b58 100644
--- a/sys/net/nd.c
+++ b/sys/net/nd.c
@@ -113,6 +113,7 @@ nd_timer(void *arg)

 		missed = ND_LLINFO_INCOMPLETE;
 		ln->ln_state = ND_LLINFO_WAITDELETE;
+		ln->la_flags |= LLE_UNRESOLVED;
 		break;

 	case ND_LLINFO_REACHABLE:
@@ -360,8 +361,10 @@ nd_resolve(struct llentry *ln, const struct rtentry *rt, struct mbuf *m,
 	 * the oldest packet in the queue will be removed.
 	 */
 	if (ln->ln_state == ND_LLINFO_NOSTATE ||
-	    ln->ln_state == ND_LLINFO_WAITDELETE)
+	    ln->ln_state == ND_LLINFO_WAITDELETE) {
+		ln->ln_asked = 0;
 		ln->ln_state = ND_LLINFO_INCOMPLETE;
+	}

 #ifdef MBUFTRACE
 	m_claimm(m, ln->lle_tbl->llt_mowner);
@@ -398,7 +401,7 @@ nd_resolve(struct llentry *ln, const struct rtentry *rt, struct mbuf *m,
 	    ln->la_numheld, nd->nd_maxqueuelen);
 	ln->la_numheld++;

-	if (ln->ln_asked >= nd->nd_mmaxtries)
+	if ((ln->la_flags & LLE_UNRESOLVED) != 0)
 		error = (rt != NULL && rt->rt_flags & RTF_GATEWAY) ?
 		    EHOSTUNREACH : EHOSTDOWN;
 	else
diff --git a/sys/netinet/if_arp.c b/sys/netinet/if_arp.c
index 2934534..fc4d0252a74 100644
--- a/sys/netinet/if_arp.c
+++ b/sys/netinet/if_arp.c
@@ -1056,6 +1056,7 @@ again:
 	KASSERT(sizeof(la->ll_addr) >= ifp->if_addrlen);
 	memcpy(&la->ll_addr, ar_sha(ah), ifp->if_addrlen);
 	la->la_flags |= LLE_VALID;
+	la->la_flags &= ~LLE_UNRESOLVED;
 	la->ln_asked = 0;
 	if (new_state != 0) {
 		la->ln_state = new_state;
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index aeaef60..1920759ecbc 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -1400,6 +1400,7 @@ nd6_cache_lladdr(
 		 */
 		memcpy(&ln->ll_addr, lladdr, ifp->if_addrlen);
 		ln->la_flags |= LLE_VALID;
+		ln->la_flags &= ~LLE_UNRESOLVED;
 	}

 	if (!is_newentry) {
It tests whether ARP sends requests more than net.inet.arp.nd_bmaxtries
times while ping is sending packets.
gcc on arm has defaulted to arm/bpabi.h over arm/netbsd-elf.h since

external/gpl3/gcc/dist/gcc/config.gcc:1.70
date: 2021-06-15 09:22:23 +0100

which has meant that profiling expects __gnu_mcount_nc

This commit provides __gnu_mcount_nc and ditches non-EABI support (and
arm26 support)
we currently push atime updates in VOP_RECLAIM and VFS_SYNC.
VFS_SYNC iterates all cached vnodes for that:

>   /*
>    * On NetBSD, we need to push out atime updates.  Solaris does
>    * this during VOP_INACTIVE, but that does not work well with the
>    * BSD VFS, so we do it in batch here.
>    */

it isn't ideal for systems with large vnode cache.
i'm not sure why it "does not work well with the BSD VFS" either.
maybe historical reasons which don't hold anymore?

this commit put the atime pushing logic to VOP_INACTIVE, where
it's done in solaris and freebsd. it seems working well as far as
i tested.

note: deferring it further to VOP_RECLAIM as we do for ffs has
its advantages. however, i prefer to keep the divergance from the
upstream smaller for now. i also have vague concerns on the
interactions with zfs features like snapshots. may revisit later.

discussed on tech-kern.
https://mail-index.netbsd.org/tech-kern/2026/03/17/msg030895.html
- Enable the on-chip caches for 68020 and 68030 in the MMU-enablement
  code fragment, as is already done for 68040 and 68060.  Eliminates
  a bunch of duplicated code in each locore.s.
- The ATC (and the HP MMU TLB, if applicable) has already been flushed /
  invalidated as part of enabling the MMU, so there's no need to either
  call _TIBA() or perform an inline pflusha again after the MMU has been
  turned on.
in my testing this reduces the size of the emitted "gimple-match.cc"
by about 35%, reduces the code section sise about 15%, and reduces
the compile time about 30%.  (this file is the largest single compile
for all of GCC.)

this makes it capable of compiling on vax and sparc again, it seems,
where both were already capable for GCC 14 (which in addition to this
set, splits the emitted file into 10 sub parts for compiling both
separately and in parallel.)

(this is part 1, part 2 will be about mergig the split of the output
into multiple files, but may be abandoned as this portion helps
enough.)

tested on amd64, vax, sparc as only target, powerpc, with some arm64,
arm, and m68k to come -- may be also very useful for m68k target.

bump the netbsd gcc version.

XXX: pullup-11, but maybe afer netbsd 11.0 ships (my testing has been
largely against netbsd-11, so this option is well tested.)


commit 75cda3be0232f745cda4e177d514f6900390af0b
Author: Richard Biener <rguenther@suse.de>
Date:   Tue Mar 28 12:42:14 2023 +0200

    bootstrap/84402 - improve (match ...) code generation

commit 580cda3c2799b1f8323af770e52f1eb0fa204718
Author: Tamar Christina <tamar.christina@arm.com>
Date:   Fri May 5 13:35:17 2023 +0100

    match.pd: don't emit label if not needed

commit e487fcc0f7466ea663a0fea52076337bebd42b8b
Author: Tamar Christina <tamar.christina@arm.com>
Date:   Fri May 5 13:36:01 2023 +0100

    match.pd: Remove commented out line pragmas unless -vv is used.

commit c0ce29bc1ce329001b6c02bb3d34bcbb086e1b72
Author: Tamar Christina <tamar.christina@arm.com>
Date:   Fri May 5 13:36:43 2023 +0100

    match.pd: CSE the dump output check.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⤵️ pull merge-conflict Resolve conflicts manually

Projects

None yet

Development

Successfully merging this pull request may close these issues.