Commit Graph

74802 Commits

Author SHA1 Message Date
rin e44f222cdc aarch64/GENERIC64: Add ixl(4)
Works just fine for little-endian on LX2K with UEFI firmware.

Not tested for big-endian yet; attach fails on ROCKPro64 due to
host controller problem.

OK yamaguchi@
2023-10-11 07:49:29 +00:00
he 838295f73b INSTALL_CI20: bump ramdisk image size since contents grew a bit recently. 2023-10-10 16:23:56 +00:00
martin b4083223a4 Make more room for ramdisk image (which recently grew a bit) 2023-10-10 10:36:42 +00:00
rin 04530b8d89 powerpc/oea: pmap: Use pool_allocator_nointr() for pmap_pool
As done for (majority of) other pmap implementations.

pmap_pool_allocator() allocates memory below 256MB, but it is not
necessary for struct pmap.

Fix part of PR kern/57621, i.e., stall in pmap_create(9).

There should be another bugs that cause (MP?) kernel hangs
reported in the PR, in pmap or other MD components for powerpc
(PR port-powerpc/56922 should be one of the candidates).

XXX
pmap for powerpc/oea apparently needs some clean ups. But leave it
as is, and pull up this minimum fix to netbsd-10 at the moment.
2023-10-09 13:01:58 +00:00
andvar 6949158423 replace trailing whitespace with tab before struct evcnt for consistency. 2023-10-09 05:56:24 +00:00
andvar 7f42acfa49 Update __BS_TYPENAME(BITS) macro to combine uint type instead of u_int.
Constify bus_space_write_multi one of params.
Remove unused ic_intr property from mipsco_isa_chipset struct.
Add __INTR_PRIVATE definition to mipsco isa_machdep.c.

Fixes RC3230 mipsco kernel config (w/o KGDB option, will be addressed later).
2023-10-08 22:10:49 +00:00
andvar 1277a7b23d Revert my changes regarding removal of FPSP related blocks.
After additional discussion it is preferred to keep code consistency,
to make it easier refactor common code between m68k ports.
2023-10-08 17:42:58 +00:00
tsutsui 0b21633a3d Remove trailing spaces and tab. 2023-10-08 03:57:47 +00:00
rin 7c76c2272e Drop -O[01] hacks for vax; no longer necessary for patched GCC 10
PR port-vax/57646: Import major vax toolchain fix by Kalvis Duckmanton

XXXRO: GCC 12 may require hacks for a while, but it turned out that
GCC 12 should be treated differently from older versions; a lot of new
files need -O[01] flags, while some may no longer require it.

I will take a look later.

Note that these hacks are not required if Kalvis's patches for GCC 12
are applied.

Keep doc/HACKS entries for a while (will be sync with update for GCC 12).

diff --git a/crypto/external/bsd/openssh/lib/Makefile b/crypto/external/bsd/openssh/lib/Makefile
index 96a93f5e396..4e38be1b642 100644
--- a/crypto/external/bsd/openssh/lib/Makefile
+++ b/crypto/external/bsd/openssh/lib/Makefile
@@ -117,12 +117,6 @@ COPTS.${f}.c+=	-Wno-pointer-sign
 # XXX
 COPTS.channels.c+=	-fno-strict-aliasing

-# XXX
-.if ${MACHINE} == "vax"
-COPTS.poly1305.c+=	-O0
-COPTS.umac.c+=		-O0
-.endif
-
 COPTS.hostfile.c+=	${CC_WNO_FORMAT_TRUNCATION}
 COPTS.sshkey.c+=	${CC_WNO_FORMAT_TRUNCATION}
 COPTS.cipher.c+=	-Wno-error=deprecated-declarations
diff --git a/distrib/utils/x_ping/Makefile b/distrib/utils/x_ping/Makefile
index f1c452a0d60..8ee77580a3f 100644
--- a/distrib/utils/x_ping/Makefile
+++ b/distrib/utils/x_ping/Makefile
@@ -12,10 +12,6 @@ CPPFLAGS+=	-I${SRCDIR} -DCRUNCHOPS
 DPADD=		${LIBM}
 LDADD=		-lm

-.if ${MACHINE_ARCH} == "vax"
-COPTS.ping.c=-O0
-.endif
-
 .include <bsd.prog.mk>

 .PATH:		${SRCDIR}
diff --git a/external/apache2/argon2/lib/libargon2/Makefile.inc b/external/apache2/argon2/lib/libargon2/Makefile.inc
index d3f4470c6c7..6a1dd146d7d 100644
--- a/external/apache2/argon2/lib/libargon2/Makefile.inc
+++ b/external/apache2/argon2/lib/libargon2/Makefile.inc
@@ -16,7 +16,3 @@ CFLAGS+=	-pthread
 LDADD+=-lpthread
 DPADD+=${LIBPTHREAD}
 .endif
-
-.if ${MACHINE} == "vax"
-COPTS.blake2b.c+=	-O0
-.endif
diff --git a/external/bsd/jemalloc/lib/Makefile.inc b/external/bsd/jemalloc/lib/Makefile.inc
index 2f524358f46..d5da774f293 100644
--- a/external/bsd/jemalloc/lib/Makefile.inc
+++ b/external/bsd/jemalloc/lib/Makefile.inc
@@ -53,12 +53,6 @@ COPTS.ctl.c+=-Wno-error=stack-protector
 COPTS.stats.c+=-Wno-error=stack-protector
 COPTS.tcache.c+=-Wno-error=stack-protector

-.if ${MACHINE_ARCH} == "vax"
-# in merge_overlapping_regs, at regrename.c
-COPTS.arena.c+=-O0
-COPTS.extent.c+=-O0
-.endif
-
 SRCS+=${JEMALLOC_SRCS}

 jemalloc.d jemalloc.pico jemalloc.o jemalloc.ln jemalloc.po jemalloc.go: \
diff --git a/external/bsd/mdocml/lib/libmandoc/Makefile b/external/bsd/mdocml/lib/libmandoc/Makefile
index 40d7e29ae88..dfd3077a2c7 100644
--- a/external/bsd/mdocml/lib/libmandoc/Makefile
+++ b/external/bsd/mdocml/lib/libmandoc/Makefile
@@ -39,11 +39,6 @@ tbl_opts.c

 MAN=	mandoc.3

-# XXX
-.if ${MACHINE} == "vax"
-COPTS.mdoc_macro.c+=-O0
-.endif
-
 COPTS.man_validate.c+=-Wno-error=array-bounds

 .include <bsd.lib.mk>
diff --git a/external/gpl3/binutils.old/lib/libbfd/Makefile b/external/gpl3/binutils.old/lib/libbfd/Makefile
index 03477232b55..74a354532fa 100644
--- a/external/gpl3/binutils.old/lib/libbfd/Makefile
+++ b/external/gpl3/binutils.old/lib/libbfd/Makefile
@@ -41,10 +41,6 @@ CPPFLAGS+=	-I${.CURDIR}/arch/${BFD_MACHINE_ARCH} -I${DIST}/include -I. \
 		-DDEBUGDIR=\"${DEBUGDIR}\" -DLIBDIR=\"${LIBDIR}\" \
 		-DBINDIR=\"${BINDIR}\"

-.if (${BFD_MACHINE_ARCH} == "vax")
-CPPFLAGS.elf.c +=	-O0
-.endif
-
 COPTS.pei-x86_64.c+=	-Wno-stack-protector
 COPTS.elfxx-mips.c+=	-Wno-stack-protector
 COPTS.elf.c+=		${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-overflow :}
diff --git a/external/gpl3/binutils/lib/libbfd/Makefile b/external/gpl3/binutils/lib/libbfd/Makefile
index 00cb2b20081..a3f0c25fd35 100644
--- a/external/gpl3/binutils/lib/libbfd/Makefile
+++ b/external/gpl3/binutils/lib/libbfd/Makefile
@@ -41,10 +41,6 @@ CPPFLAGS+=	-I${.CURDIR}/arch/${BFD_MACHINE_ARCH} -I${DIST}/include -I. \
 		-DDEBUGDIR=\"${DEBUGDIR}\" -DLIBDIR=\"${LIBDIR}\" \
 		-DBINDIR=\"${BINDIR}\"

-.if (${BFD_MACHINE_ARCH} == "vax")
-CPPFLAGS.elf.c +=	-O0
-.endif
-
 COPTS.pei-x86_64.c+=	-Wno-stack-protector
 COPTS.elfxx-mips.c+=	-Wno-stack-protector
 COPTS.elf.c+=		${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-overflow :}
diff --git a/external/gpl3/gcc.old/lib/Makefile.sanitizer b/external/gpl3/gcc.old/lib/Makefile.sanitizer
index efd36ae4bee..5173a5109a0 100644
--- a/external/gpl3/gcc.old/lib/Makefile.sanitizer
+++ b/external/gpl3/gcc.old/lib/Makefile.sanitizer
@@ -88,22 +88,3 @@ COPTS+=-fno-builtin -fno-exceptions -fno-rtti -funwind-tables

 # Can't profile without it`
 #-fomit-frame-pointer
-
-.if ${MACHINE_ARCH} == "vax"
-COPTS.sanitizer_allocator.cc += -O1
-COPTS.sanitizer_common.cc += -O1
-COPTS.sanitizer_common_libcdep.cc += -O1
-COPTS.sanitizer_coverage_libcdep.cc += -O1
-COPTS.sanitizer_coverage_mapping_libcdep.cc += -O1
-COPTS.sanitizer_deadlock_detector1.cc += -O1
-COPTS.sanitizer_mac.cc += -O1
-COPTS.sanitizer_netbsd.cc += -O1
-COPTS.sanitizer_posix.cc += -O1
-COPTS.sanitizer_printf.cc += -O1
-COPTS.sanitizer_procmaps_common.cc += -O1
-COPTS.sanitizer_stackdepot.cc += -O1
-COPTS.sanitizer_symbolizer_libcdep.cc += -O1
-COPTS.sanitizer_symbolizer_report.cc += -O1
-COPTS.ubsan_diag.cc += -O1
-COPTS.ubsan_init.cc += -O1
-.endif
diff --git a/external/gpl3/gcc.old/lib/libasan/Makefile b/external/gpl3/gcc.old/lib/libasan/Makefile
index 1e6f9608abe..3da7bbf2f58 100644
--- a/external/gpl3/gcc.old/lib/libasan/Makefile
+++ b/external/gpl3/gcc.old/lib/libasan/Makefile
@@ -49,14 +49,6 @@ LIBDPLIBS+= m  ${NETBSDSRCDIR}/lib/libm
 LIBDPLIBS+= pthread ${NETBSDSRCDIR}/lib/libpthread
 CPPFLAGS+=-DCAN_SANITIZE_UB=0

-.if ${MACHINE_ARCH} == "vax"
-COPTS.asan_allocator.cc += -O1
-COPTS.asan_report.cc += -O1
-COPTS.sanitizer_file.cc += -O1
-COPTS.ubsan_diag.cc += -O1
-COPTS.ubsan_init.cc += -O1
-.endif
-
 .if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb"
 COPTS.asan_interceptors.cc += -O1
 .endif
diff --git a/external/gpl3/gcc.old/lib/liblsan/Makefile b/external/gpl3/gcc.old/lib/liblsan/Makefile
index 4578544a9a8..ddb7981077c 100644
--- a/external/gpl3/gcc.old/lib/liblsan/Makefile
+++ b/external/gpl3/gcc.old/lib/liblsan/Makefile
@@ -16,11 +16,6 @@ LSAN_SRCS+= \
 	lsan_linux.cc \
 	lsan_thread.cc

-.if ${MACHINE_ARCH} == "vax"
-COPTS.lsan_allocator.cc += -O1
-COPTS.sanitizer_file.cc += -O1
-.endif
-
 LIB=	lsan
 SRCS+=	${LSAN_SRCS}
 LIBDPLIBS+= m ${NETBSDSRCDIR}/lib/libm
diff --git a/external/gpl3/gcc.old/lib/libubsan/Makefile b/external/gpl3/gcc.old/lib/libubsan/Makefile
index 2e2faca7b1c..9de82550d14 100644
--- a/external/gpl3/gcc.old/lib/libubsan/Makefile
+++ b/external/gpl3/gcc.old/lib/libubsan/Makefile
@@ -26,10 +26,6 @@ UBSAN_SRCS= \
 COPTS.${_s}.cc+=-frtti
 .endfor

-.if ${MACHINE_ARCH} == "vax"
-COPTS.sanitizer_file.cc += -O1
-.endif
-
 LIB=	ubsan
 SRCS+=	${UBSAN_SRCS}
 LIBDPLIBS+= m ${NETBSDSRCDIR}/lib/libm
diff --git a/external/gpl3/gcc.old/usr.bin/cc1/Makefile b/external/gpl3/gcc.old/usr.bin/cc1/Makefile
index c55e292ee8e..ff12a5be524 100644
--- a/external/gpl3/gcc.old/usr.bin/cc1/Makefile
+++ b/external/gpl3/gcc.old/usr.bin/cc1/Makefile
@@ -46,17 +46,6 @@ CPPFLAGS.default-c.c+=	-I${BACKENDOBJ}
 BUILDSYMLINKS+= ${GNUHOSTDIST}/gcc/config/sh/sh-c.cc sh-c.c
 .endif

-.if ${MACHINE_CPU} == "vax"
-COPTS.c-decl.c+=-O0
-COPTS.c-typeck.c+=-O0
-COPTS.c-array-notation.c+=-O0
-COPTS.c-common.c+=-O0
-COPTS.c-ada-spec.c+=-O0
-COPTS.cilk.c+=-O0
-COPTS.c-ubsan.c+=-O0
-COPTS.cc1-checksum.c+=-O0
-.endif
-
 .if ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel"
 COPTS.c-common.c+=-O3
 .endif
diff --git a/external/gpl3/gcc.old/usr.bin/cc1obj/Makefile b/external/gpl3/gcc.old/usr.bin/cc1obj/Makefile
index 3123ee0d60b..aab82ad3448 100644
--- a/external/gpl3/gcc.old/usr.bin/cc1obj/Makefile
+++ b/external/gpl3/gcc.old/usr.bin/cc1obj/Makefile
@@ -44,16 +44,8 @@ COPTS.objc-act.c+=			-Wno-stack-protector
 COPTS.objc-gnu-runtime-abi-01.c+=	-Wno-stack-protector
 COPTS.objc-next-runtime-abi-01.c+=	-Wno-stack-protector

-.if ${MACHINE_ARCH} == "vax"
-COPTS.c-decl.c+=-O0
-COPTS.c-typeck.c+=-O0
-COPTS.c-array-notation.c+=-O0
-COPTS.c-common.c+=-O0
-COPTS.c-ada-spec.c+=-O0
-COPTS.cilk.c+=-O0
-COPTS.c-ubsan.c+=-O0
-COPTS.cc1obj-checksum.c+=-O0
-.endif
+COPTS.c-cppbuiltin.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=format-overflow :}
+COPTS.c-typeck.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8:? -Wno-error=format-overflow :}

 .if ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel"
 COPTS.c-common.c+=-O3
diff --git a/external/gpl3/gcc.old/usr.bin/cc1objplus/Makefile b/external/gpl3/gcc.old/usr.bin/cc1objplus/Makefile
index b9c108251c5..e04e8fc7f53 100644
--- a/external/gpl3/gcc.old/usr.bin/cc1objplus/Makefile
+++ b/external/gpl3/gcc.old/usr.bin/cc1objplus/Makefile
@@ -69,18 +69,6 @@ COPTS.objc-act.c+=			-Wno-stack-protector
 COPTS.objc-gnu-runtime-abi-01.c+=	-Wno-stack-protector
 COPTS.objc-next-runtime-abi-01.c+=	-Wno-stack-protector

-.if ${MACHINE_ARCH} == "vax"
-COPTS.c-decl.c+=-O0
-COPTS.c-typeck.c+=-O0
-COPTS.c-array-notation.c+=-O0
-COPTS.c-common.c+=-O0
-COPTS.c-ada-spec.c+=-O0
-COPTS.cilk.c+=-O0
-COPTS.c-ubsan.c+=-O0
-COPTS.cc1obj-checksum.c+=-O0
-COPTS.decl.c+=-O0
-.endif
-
 .if ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel"
 COPTS.c-common.c+=-O3
 .endif
diff --git a/external/gpl3/gcc.old/usr.bin/cc1plus/Makefile b/external/gpl3/gcc.old/usr.bin/cc1plus/Makefile
index 7936efd3a5e..7c54559e21a 100644
--- a/external/gpl3/gcc.old/usr.bin/cc1plus/Makefile
+++ b/external/gpl3/gcc.old/usr.bin/cc1plus/Makefile
@@ -31,23 +31,6 @@ CHECKSUM_OBJS= ${LIBBACKTRACEOBJ}/libbacktrace.a \

 CFLAGS+=	-Wno-error=stack-protector

-.if ${MACHINE_ARCH} == "vax"
-COPTS.call.c+=-O0
-COPTS.decl.c+=-O0
-COPTS.typeck2.c+=-O0
-COPTS.class.c+=-O0
-COPTS.typeck.c+=-O0
-COPTS.init.c+=-O0
-COPTS.semantics.c+=-O0
-COPTS.mangle.c+=-O0
-COPTS.constexpr.c+=-O0
-COPTS.c-common.c+=-O0
-COPTS.c-ada-spec.c+=-O0
-COPTS.cilk.c+=-O0
-COPTS.c-ubsan.c+=-O0
-COPTS.cc1plus-checksum.c+=-O0
-.endif
-
 .if ${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel"
 COPTS.c-common.c+=-O3
 .endif
diff --git a/external/gpl3/gcc.old/usr.bin/gcc/Makefile b/external/gpl3/gcc.old/usr.bin/gcc/Makefile
index 7a66d77ffc7..a5a4b1c3adf 100644
--- a/external/gpl3/gcc.old/usr.bin/gcc/Makefile
+++ b/external/gpl3/gcc.old/usr.bin/gcc/Makefile
@@ -25,9 +25,6 @@ ${SRCS}: ${GCCARCH}/defs.mk
 .include <bsd.info.mk>

 COPTS.gcc.c=	-Wno-stack-protector
-.if ${MACHINE_ARCH} == "vax"
-COPTS.dse.c=	-O1
-.endif

 .PATH: ${DIST}/gcc ${DIST}/gcc/doc ${DIST}/gcc/c

diff --git a/external/gpl3/gcc.old/usr.bin/libdecnumber/Makefile b/external/gpl3/gcc.old/usr.bin/libdecnumber/Makefile
index 751d1513eec..33aeb1c9898 100644
--- a/external/gpl3/gcc.old/usr.bin/libdecnumber/Makefile
+++ b/external/gpl3/gcc.old/usr.bin/libdecnumber/Makefile
@@ -14,10 +14,6 @@ SRCS=		decNumber.c decContext.c decimal32.c decimal64.c decimal128.c
 CPPFLAGS+=	-I${.CURDIR}/arch/${GCC_MACHINE_ARCH} -I${DIST}/libdecnumber
 CPPFLAGS+=	-I${DIST}/libgcc

-.if ${MACHINE_ARCH} == "vax"
-COPTS.decNumber.c=-O0
-.endif
-
 .include <bsd.lib.mk>

 # Force using C++ for this
diff --git a/external/gpl3/gcc.old/usr.bin/lto-dump/Makefile b/external/gpl3/gcc.old/usr.bin/lto-dump/Makefile
index 90f44a9fcf6..fd251464fb7 100644
--- a/external/gpl3/gcc.old/usr.bin/lto-dump/Makefile
+++ b/external/gpl3/gcc.old/usr.bin/lto-dump/Makefile
@@ -24,11 +24,6 @@ COPTS.lto-common.c+=	-Wno-stack-protector
 .include "../Makefile.backtrace"
 .include "../Makefile.libdecnumber"

-.if ${MACHINE_ARCH} == "vax"
-COPTS.lto-lang.c+=-O0
-COPTS.lto-symtab.c+=-O0
-.endif
-
 LDADD+=	${LIBIBERTY} ${LIBMPC} ${LIBMPFR} ${LIBGMP} -lintl -lz -lm
 DPADD+=	${LIBIBERTY} ${LIBMPC} ${LIBMPFR} ${LIBGMP} ${LIBINTL} ${LIBZ} ${LIBM}

diff --git a/external/gpl3/gcc.old/usr.bin/lto1/Makefile b/external/gpl3/gcc.old/usr.bin/lto1/Makefile
index 4c49161a64c..340d3c6124f 100644
--- a/external/gpl3/gcc.old/usr.bin/lto1/Makefile
+++ b/external/gpl3/gcc.old/usr.bin/lto1/Makefile
@@ -21,11 +21,6 @@ COPTS.lto-common.c+=	-Wno-stack-protector
 .include "../Makefile.libcpp"
 .include "../Makefile.libdecnumber"

-.if ${MACHINE_ARCH} == "vax"
-COPTS.lto-lang.c+=-O0
-COPTS.lto-symtab.c+=-O0
-.endif
-
 LDADD+= ${LIBIBERTYOBJ}/libiberty.a
 DPADD+= ${LIBIBERTYOBJ}/libiberty.a
 LDADD+=	${LIBIBERTY} ${LIBMPC} ${LIBMPFR} ${LIBGMP} -lintl -lz -lm
diff --git a/external/gpl3/gdb.old/lib/libdecnumber/Makefile b/external/gpl3/gdb.old/lib/libdecnumber/Makefile
index bcd4ae5b222..ce28811526b 100644
--- a/external/gpl3/gdb.old/lib/libdecnumber/Makefile
+++ b/external/gpl3/gdb.old/lib/libdecnumber/Makefile
@@ -18,10 +18,6 @@ CPPFLAGS+=	-I${.CURDIR}/arch/${GDB_MACHINE_ARCH} \

 SRCS=		${G_OBJS:.o=.c} ${G_SOURCES}

-.if ${MACHINE_ARCH} == "vax"
-COPTS.decNumber.c=-O0
-.endif
-
 .PATH: ${DIST}/libdecnumber ${DIST}/libdecnumber/dpd

 .include <bsd.lib.mk>
diff --git a/external/gpl3/gdb/lib/libdecnumber/Makefile b/external/gpl3/gdb/lib/libdecnumber/Makefile
index c95d36e3dfa..e3169865304 100644
--- a/external/gpl3/gdb/lib/libdecnumber/Makefile
+++ b/external/gpl3/gdb/lib/libdecnumber/Makefile
@@ -18,10 +18,6 @@ CPPFLAGS+=	-I${.CURDIR}/arch/${GDB_MACHINE_ARCH} \

 SRCS=		${G_OBJS:.o=.c} ${G_SOURCES}

-.if ${MACHINE_ARCH} == "vax"
-COPTS.decNumber.c=-O0
-.endif
-
 .PATH: ${DIST}/libdecnumber ${DIST}/libdecnumber/dpd ${DIST}/libdecnumber/bid

 .include <bsd.lib.mk>
diff --git a/external/gpl3/gdb/lib/libgdb/Makefile b/external/gpl3/gdb/lib/libgdb/Makefile
index b87a515d13a..c118c363975 100644
--- a/external/gpl3/gdb/lib/libgdb/Makefile
+++ b/external/gpl3/gdb/lib/libgdb/Makefile
@@ -66,12 +66,6 @@ CFLAGS:=		${CXXFLAGS} -std=gnu++17 -Wno-error=stack-protector

 ada-exp.c: ada-lex.c

-.if ${MACHINE} == "vax"
-. if ${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 8
-COPTS.read.c+=	-O0
-. endif
-.endif
-
 # These are generated by implicit rules and are not easy to generate
 CLEANDIRFILES+= \
 	ada-exp.c ada-lex.c \
diff --git a/external/mit/xorg/lib/gallium.old/Makefile b/external/mit/xorg/lib/gallium.old/Makefile
index 55b2fe3d1c1..bfa40c8974f 100644
--- a/external/mit/xorg/lib/gallium.old/Makefile
+++ b/external/mit/xorg/lib/gallium.old/Makefile
@@ -1211,10 +1211,6 @@ SYMLINKS+= gallium_dri.so.${SHLIB_MAJOR}.debug ${DRIDEBUGDIR}/${_d}_dri.so.${SHL
 COPTS+=	${${ACTIVE_CC} == "clang":? -Wa,-Av8plus  :}
 .endif

-.if ${MACHINE_ARCH} == "vax"
-COPTS.nir.c += -O1
-.endif
-
 # XXXGCC12
 .if ${MACHINE_ARCH} == "m68k"
 COPTS.st_glsl_to_tgsi.cpp += -O1
diff --git a/external/mit/xorg/lib/gallium/Makefile b/external/mit/xorg/lib/gallium/Makefile
index 6778a8c11c8..9f1422080fe 100644
--- a/external/mit/xorg/lib/gallium/Makefile
+++ b/external/mit/xorg/lib/gallium/Makefile
@@ -1428,10 +1428,6 @@ SYMLINKS+= gallium_dri.so.${SHLIB_MAJOR}.debug ${DRIDEBUGDIR}/${_d}_dri.so.${SHL
 COPTS+=	${${ACTIVE_CC} == "clang":? -Wa,-Av8plus  :}
 .endif

-.if ${MACHINE_ARCH} == "vax"
-COPTS.nir.c += -O1
-.endif
-
 COPTS.u_atomic.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 10:? -Wno-builtin-declaration-mismatch :}

 .include <bsd.lib.mk>
diff --git a/external/mit/xorg/lib/libX11/Makefile.libx11 b/external/mit/xorg/lib/libX11/Makefile.libx11
index e103d9ace12..0e55c2a4732 100644
--- a/external/mit/xorg/lib/libX11/Makefile.libx11
+++ b/external/mit/xorg/lib/libX11/Makefile.libx11
@@ -471,11 +471,6 @@ COPTS.OpenDis.c+=	-Wno-error	# XXX xf86bigfstr.h
 COPTS.XlibInt.c+=	-Wno-error	# XXX xcmiscstr.h
 COPTS.XKBBind.c+=	-Wno-deprecated-declarations	# uses XKeycodeToKeysym

-# XXX
-.if ${MACHINE} == "vax"
-COPTS.lcWrap.c+=	-O0
-.endif
-
 CWARNFLAGS.clang+=	-Wno-string-plus-int

 .include "${NETBSDSRCDIR}/external/mit/xorg/tools/makekeys/Makefile.makekeys"
diff --git a/games/gomoku/Makefile b/games/gomoku/Makefile
index e86a63aaea7..678537066ed 100644
--- a/games/gomoku/Makefile
+++ b/games/gomoku/Makefile
@@ -9,10 +9,6 @@ LDADD=	-lcurses -lterminfo
 HIDEGAME=hidegame
 CPPFLAGS+=	${DEBUG:D-DDEBUG}

-.if ${MACHINE} == "vax"
-COPTS.pickmove.c += -O0
-.endif
-
 #WARNS=		6	# would produce warnings about small integer types
 LINTFLAGS+=	-w	# treat warnings as errors
 LINTFLAGS+=	-T	# strict bool mode
diff --git a/games/phantasia/Makefile b/games/phantasia/Makefile
index e9c53f23ae5..b919dac17c6 100644
--- a/games/phantasia/Makefile
+++ b/games/phantasia/Makefile
@@ -52,7 +52,3 @@ map: map.c
 	./map | plot > /dev/tty

 .include <bsd.prog.mk>
-
-.if defined(HAVE_GCC) && ${MACHINE_ARCH} == "vax"
-COPTS.misc.c+=	-O0
-.endif
diff --git a/lib/i18n_module/UTF7/Makefile b/lib/i18n_module/UTF7/Makefile
index 712c1515d42..7136f7f0cc3 100644
--- a/lib/i18n_module/UTF7/Makefile
+++ b/lib/i18n_module/UTF7/Makefile
@@ -3,6 +3,3 @@
 SRCPRE=citrus_
 .include <bsd.lib.mk>

-.if ${MACHINE_ARCH} == "vax" && defined(HAVE_GCC)
-COPTS.citrus_utf7.c+=	-O0
-.endif
diff --git a/lib/libbz2/Makefile b/lib/libbz2/Makefile
index b2aea1e04b0..e60a2862d48 100644
--- a/lib/libbz2/Makefile
+++ b/lib/libbz2/Makefile
@@ -15,11 +15,6 @@ SRCS=		blocksort.c huffman.c crctable.c randtable.c compress.c \
 INCS=		bzlib.h
 INCSDIR=	/usr/include

-# XXX huffman.c gets mis-compiled with 2.95.3
-.if ${MACHINE_ARCH} == "vax"
-COPTS+=		-O0
-.endif
-
 COPTS+=		${CC_WNO_IMPLICIT_FALLTHROUGH}

 # XXX blocksort.c gets mis-compiled with 4.1
diff --git a/lib/libc/gdtoa/Makefile.inc b/lib/libc/gdtoa/Makefile.inc
index 132686fc33d..609da919803 100644
--- a/lib/libc/gdtoa/Makefile.inc
+++ b/lib/libc/gdtoa/Makefile.inc
@@ -44,10 +44,3 @@ SRCS+=	dmisc.c \
 .if ${MACHINE_ARCH} != "vax"
 SRCS+=	strtord.c
 .endif
-
-# XXX revisit with newer GCC.
-# Ensure numbers like 0xffff319f5fa95963 print correctly
-# ("999999999999999.98", not garbage like "?A>C>@>C:BA;A><.:<")
-.if ${MACHINE_ARCH} == "vax" && defined(HAVE_GCC)
-COPTS.misc.c+=	-O0
-.endif
diff --git a/lib/libcrypt/Makefile b/lib/libcrypt/Makefile
index cb3f89d6d09..e9c8be820da 100644
--- a/lib/libcrypt/Makefile
+++ b/lib/libcrypt/Makefile
@@ -30,9 +30,6 @@ SRCS+=		crypt-argon2.c
 SRCS+=		${src}
 COPTS.${src}+=	-fvisibility=hidden
 .  endfor
-.  if ${MACHINE} == "vax"
-COPTS.blake2b.c+=	-O0
-.  endif
 .endif

 WARNS?=	5
diff --git a/libexec/ld.elf_so/Makefile b/libexec/ld.elf_so/Makefile
index f5baae1e883..24f7e1121e5 100644
--- a/libexec/ld.elf_so/Makefile
+++ b/libexec/ld.elf_so/Makefile
@@ -141,10 +141,6 @@ CPPFLAGS+=	-DRTLD_DEFAULT_LIBRARY_PATH=\"${SHLIBDIR}:${LIBDIR}\"
 COPTS.rtld.c+=	-Wno-stack-protector
 COPTS.symbol.c+=-Wno-stack-protector

-.if ${MACHINE_CPU} == "vax"
-COPTS.rtld.c+=	-O0
-.endif
-
 LDADD+=		-Wl,--version-script=${.CURDIR}/symbols.map
 LDADD+=		-L${CLIBOBJ} -L${DESTDIR}${LIBDIR}
 .if ${MKPICLIB} != "no"
diff --git a/sbin/fsck_ffs/Makefile.common b/sbin/fsck_ffs/Makefile.common
index 765638b2801..824e3bf2628 100644
--- a/sbin/fsck_ffs/Makefile.common
+++ b/sbin/fsck_ffs/Makefile.common
@@ -36,7 +36,3 @@ COPTS.ffs_appleufs.c+=	-Wno-pointer-sign
 .if ${MACHINE_ARCH} == "m68000"
 COPTS.pass1.c+=	-fno-tree-fre -fno-tree-lrs
 .endif
-.if ${MACHINE_ARCH} == "vax"
-COPTS.pass1.c+=	-O0
-COPTS.inode.c+=	-O0
-.endif
diff --git a/sbin/fsdb/Makefile b/sbin/fsdb/Makefile
index c039f73a1eb..3b0331e5880 100644
--- a/sbin/fsdb/Makefile
+++ b/sbin/fsdb/Makefile
@@ -39,12 +39,6 @@ COPTS.${f}.c+=	-Wno-pointer-sign
 COPTS.pass1.c+=	-fno-tree-fre -fno-tree-lrs
 .endif

-.if ${MACHINE_ARCH} == "vax"
-COPTS.pass1.c+=	-O0
-COPTS.inode.c+=	-O0
-COPTS.fsdb.c+=	-O0
-.endif
-
 CWARNFLAGS.gcc+=	${CC_WNO_ADDRESS_OF_PACKED_MEMBER}

 .include <bsd.prog.mk>
diff --git a/sbin/newfs_ext2fs/Makefile b/sbin/newfs_ext2fs/Makefile
index 40a44b9a038..ecfdbff4d3a 100644
--- a/sbin/newfs_ext2fs/Makefile
+++ b/sbin/newfs_ext2fs/Makefile
@@ -20,8 +20,4 @@ DPADD+=${LIBPROP}

 .PATH:	${NETBSDSRCDIR}/sys/ufs/ext2fs ${FSCK}

-.if ${MACHINE_ARCH} == "vax"
-COPTS.mke2fs.c=-O0
-.endif
-
 .include <bsd.prog.mk>
diff --git a/sbin/ping/Makefile b/sbin/ping/Makefile
index 4f33501ea7a..1f7f56e3ea5 100644
--- a/sbin/ping/Makefile
+++ b/sbin/ping/Makefile
@@ -12,8 +12,4 @@ CPPFLAGS+=	-DIPSEC
 LDADD+= -lipsec
 DPADD+= ${LIBIPSEC}

-.if ${MACHINE_ARCH} == "vax"
-COPTS.ping.c=-O0
-.endif
-
 .include <bsd.prog.mk>
diff --git a/sys/arch/vax/conf/Makefile.vax b/sys/arch/vax/conf/Makefile.vax
index cf095d54a86..c483eaa644a 100644
--- a/sys/arch/vax/conf/Makefile.vax
+++ b/sys/arch/vax/conf/Makefile.vax
@@ -34,7 +34,6 @@ GENASSYM_CONF=	${VAX}/vax/genassym.cf
 CPPFLAGS+=	-D_VAX_INLINE_
 AFLAGS+=	-x assembler-with-cpp -fno-pic
 CFLAGS+=	-fno-pic
-COPTS.wsmux.c+=	${${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} >= 9:? -O1 :}


 ##
diff --git a/sys/lib/libsa/Makefile b/sys/lib/libsa/Makefile
index 718c97ce857..4ef3840c753 100644
--- a/sys/lib/libsa/Makefile
+++ b/sys/lib/libsa/Makefile
@@ -96,7 +96,3 @@ SRCS+=	ufs.c
 lib${LIB}.o:: ${OBJS:O} __buildstdlib

 CPPFLAGS+=	-Wno-pointer-sign
-
-.if defined(HAVE_GCC) && ${MACHINE_ARCH} == "vax"
-COPTS.bootp.c+=	-O0
-.endif
diff --git a/sys/lib/libz/Makefile b/sys/lib/libz/Makefile
index 6945c0da6c6..61fb7d4f652 100644
--- a/sys/lib/libz/Makefile
+++ b/sys/lib/libz/Makefile
@@ -25,7 +25,3 @@ CLEANFILES+= lib${LIB}.o
 .include <bsd.lib.mk>

 lib${LIB}.o:: ${OBJS:O} __buildstdlib
-
-.if defined(HAVE_GCC) && ${MACHINE_ARCH} == "vax"
-COPTS.inftrees.c+=	-O0
-.endif
diff --git a/sys/modules/lfs/Makefile b/sys/modules/lfs/Makefile
index 962538821a5..ea8f187e160 100644
--- a/sys/modules/lfs/Makefile
+++ b/sys/modules/lfs/Makefile
@@ -18,9 +18,4 @@ SRCS+=	ulfs_bmap.c ulfs_dirhash.c ulfs_inode.c ulfs_lookup.c \

 WARNS=	3

-.if ${MACHINE} == "vax"
-# GCC 6.5 and 7.4 cannot compile this with -DDIAGNOSTIC and -O2/-O1
-COPTS.lfs_inode.c+=	-O0
-.endif
-
 .include <bsd.kmodule.mk>
diff --git a/sys/rump/fs/lib/liblfs/Makefile b/sys/rump/fs/lib/liblfs/Makefile
index abade3767d9..68b74c62502 100644
--- a/sys/rump/fs/lib/liblfs/Makefile
+++ b/sys/rump/fs/lib/liblfs/Makefile
@@ -17,9 +17,6 @@ SRCS+=	ulfs_bmap.c ulfs_dirhash.c ulfs_extattr.c 			\


 CFLAGS+=        -DLFS_KERNEL_RFW
-.if ${MACHINE_ARCH} == "vax"
-COPTS.lfs_inode.c+=-O0
-.endif

 .include <bsd.lib.mk>
 .include <bsd.klinks.mk>
diff --git a/usr.sbin/mtrace/Makefile b/usr.sbin/mtrace/Makefile
index aef09db6198..9c125c15265 100644
--- a/usr.sbin/mtrace/Makefile
+++ b/usr.sbin/mtrace/Makefile
@@ -12,10 +12,6 @@ PROG=	mtrace
 SRCS=	igmp.c inet.c kern.c mtrace.c
 MAN=	mtrace.8

-.if ${MACHINE_ARCH} == "vax"
-COPTS.mtrace.c=-O0
-.endif
-
 BINMODE=4555
 BINOWN= root

diff --git a/external/gpl3/gcc.old/usr.bin/backend/Makefile b/external/gpl3/gcc.old/usr.bin/backend/Makefile
index d69a26fe619..99e881c783d 100644
--- a/external/gpl3/gcc.old/usr.bin/backend/Makefile
+++ b/external/gpl3/gcc.old/usr.bin/backend/Makefile
@@ -533,68 +533,9 @@ COPTS.insn-recog.c+=-Wno-error

 .if ${GCC_MACHINE_ARCH} == "vax"
 CPPFLAGS+=-I${.CURDIR}/../../lib/libgcc/libgcov/arch/${GCC_MACHINE_ARCH}
-COPTS.builtins.c+=-O0
-COPTS.calls.c+=-O0
-COPTS.convert.c+=-O0
-COPTS.data-streamer-out.c+=-O0
-COPTS.dse.c+=-O0					# XXX port-vax/51967
-COPTS.dwarf2out.c+=-O0
-COPTS.expmed.c+=-O0
-COPTS.expr.c+=-O0 -Wno-error=tautological-compare
-COPTS.fixed-value.c+=-O0
-COPTS.fold-const.c+=-O0
-COPTS.generic-match.c+=-O0
-COPTS.gimple-fold.c+=-O0
-COPTS.gimple-match.c+=-O0
-COPTS.gimple-ssa-strength-reduction.c+=-O0
-COPTS.gimple-ssa-warn-restrict.c+=-O0
-COPTS.gimple.c+=-O0
-COPTS.internal-fn.c+=-O0
-COPTS.lto-streamer-out.c+=-O0
-COPTS.omp-low.c+=-O0
-COPTS.predict.c+=-O0
-COPTS.range-op.cc+=-O0
-COPTS.recog.c+=-O0
-COPTS.sanopt.c+=-O0
-COPTS.stmt.c+=-O0
-COPTS.stor-layout.c+=-O0
-COPTS.targhooks.c+=-O0
-COPTS.tree-affine.c+=-O0
-COPTS.tree-cfg.c+=-O0
-COPTS.tree-data-ref.c+=-O0
-COPTS.tree-eh.c+=-O0
-COPTS.tree-if-conv.c+=-O0
-COPTS.tree-object-size.c+=-O0
-COPTS.tree-parloops.c+=-O0
-COPTS.tree-predcom.c+=-O0
-COPTS.tree-pretty-print.c+=-O0
-COPTS.tree-ssa-alias.c+=-O0
-COPTS.tree-ssa-ccp.c+=-O0
-COPTS.tree-ssa-forwprop.c+=-O0
-COPTS.tree-ssa-loop-ivopts.c+=-O0
-COPTS.tree-ssa-loop-manip.c+=-O0
-COPTS.tree-ssa-loop-niter.c+=-O0
-COPTS.tree-ssa-math-opts.c+=-O0
-COPTS.tree-ssa-phiopt.c+= -O0
-COPTS.tree-ssa-pre.c+=-O0
-COPTS.tree-ssa-reassoc.c+=-O0
-COPTS.tree-ssa-strlen.c+=-O0
-COPTS.tree-ssa-uninit.c+=-O0
-COPTS.tree-ssa.c+=-O0
-COPTS.tree-switch-conversion.c+=-O0
-COPTS.tree-vect-data-refs.c+=-O0
-COPTS.tree-vect-loop-manip.c+=-O0
-COPTS.tree-vect-loop.c+=-O0
-COPTS.tree-vect-patterns.c+=-O0
-COPTS.tree-vect-stmts.c+=-O0
-COPTS.tree-vrp.c+=-O0
-COPTS.tree.c+=-O0
-COPTS.ubsan.c+=-O0
-COPTS.varasm.c+=-O0
-COPTS.vr-values.c+=-O0
-COPTS.web.c+=-O0
-COPTS.wide-int-range.cc+=-O0
-COPTS.wide-int.cc+=-O0
+
+COPTS.expmed.c+=-Wno-error=tautological-compare
+COPTS.expr.c+=-Wno-error=tautological-compare
 .else
 COPTS.tree.c=	${${ACTIVE_CC} == "clang" :? -O0 :}
 .endif
2023-10-07 12:15:49 +00:00
andvar 47d85a15a6 Remove fpsp include and #ifdef FPSP blocks for news68k.
FPSP is necessary for 040/060 only, and news68k doesn't have such hardware.

Noted by Izumi Tsutsui.
2023-10-06 21:10:12 +00:00
skrll d40146f873 Convert the l2->l_md.md_astpending assignments into KASSERTs.
l_md is zeroised by lwp_create with

         memset(&l2->l_startzero, 0, sizeof(*l2) -
                    offsetof(lwp_t, l_startzero));
2023-10-06 11:53:26 +00:00
skrll f9ac86e626 Trailing whitespace 2023-10-06 11:45:37 +00:00
skrll 6ec65fcfd4 Trailing whitespace. 2023-10-06 11:45:16 +00:00
martin c7be6fd2c8 Fix previous and restore setting of "user" flag from trapframe. 2023-10-06 09:53:02 +00:00
skrll 6f5d0134ba Not all RISC-V CPUs have ASIDs 2023-10-06 08:48:49 +00:00
ad 68fa584377 Arrange to update cached LWP credentials in userret() rather than during
syscall/trap entry, eliminating a test+branch on every syscall/trap.

This wasn't possible in the 3.99.x timeframe when l->l_cred came about
because there wasn't a reliable/timely way to force an ONPROC LWP running on
a remote CPU into the kernel (which is just about the only new thing in
this scheme).
2023-10-05 19:41:03 +00:00
riastradh 66e19b5cbf arm/gic: Check l_blcnt, not l_biglocks.
l_biglocks is a now-defunct temporary storage used only when
sleeping; l_blcnt is the number of kernel locks held by the lwp when
not sleeping.

Should fix arm builds.
2023-10-05 12:30:59 +00:00
ad a355028fa4 Eliminate l->l_ncsw and l->l_nivcsw. From memory think they were added
before we had per-LWP struct rusage; the same is now tracked there.
2023-10-04 20:28:05 +00:00
rin fc07489de4 igc(4): Added to kernel config files for tested platforms
I.e., aarch64, amd64, and evbppc/DHT, at the moment.

Please feel free to add to other config files, and report us back
if you find problems :)
2023-10-04 07:48:55 +00:00
macallan c29ca8b2f5 add xhci 2023-10-03 08:23:07 +00:00
riastradh 4caf62b3a6 armpmu(4): Add missing newline to error message. 2023-10-02 08:42:20 +00:00
manu 87b995aca9 Fix build with -DNO_GPT 2023-10-02 00:02:33 +00:00
andvar 494d8bfcc4 remove unncessary leading space in #ifdef FPSP block.
remove one trailing whitespace.
2023-10-01 21:04:10 +00:00
andvar 132b4e51b4 Improve KGDB enabled build for news68k:
* include sys/kgdb.h in news68k/trap.c for missing definitions.
* cast second kgdb_trap argument to (db_regs_t *).
* build m68k/kgdb_machdep.c for kgdb_trap() implementation.

Same as for mvme68k, build complains about undefined reference to zs_check_kgdb
due to missing port specific zs kgdb implementation for MI zs(4) driver though.
2023-10-01 19:28:36 +00:00
andvar 45b9d69bd5 include fpsp Makefile.inc in Makefile.news68k, same as other m68k ports.
needed for FPSP option to build, otherwise FPSP specific vectors are undefined.
2023-10-01 18:50:53 +00:00
andvar 528e3f93f9 Improve kgdb build for mvme68k:
* include sys/kgdb.h in mvme68k/trap.c for missing definitions.
* cast second kgdb_trap argument to (db_regs_t *).
* build m68k/kgdb_machdep.c in kgdb enable build for kgdb_trap() implementation.

KGDB build still fails, apparently due to missing zs_kgdb.c implementation.
2023-09-30 21:00:43 +00:00
andvar c64267c662 s/resonably/reasonably/. 2023-09-30 20:15:54 +00:00
andvar d20aa02666 Remove h->sock from DPRINTF arguments, it is leftover from shpcic_handle, removed
when code was moved to mmeye specific device code in 2002.
Add const for *width_names[] definition.
Redefine ioaddr in mmeyepcmcia_chip_io_alloc() and calculate in advance, since
DPRINTF() expects it as one of the arguments. This code was simplified with mmEye-WL
added support in 2011, but broke debug code.

Fixes MMEYEPCMCIADEBUG enabled build.
2023-09-29 21:23:33 +00:00
andvar 34ec21f8d5 reorder includes alphabetically to match mmeye counterpart, NFCI. 2023-09-29 06:09:20 +00:00
andvar 0821461145 reorder includes alphabetically.
remove sh4 specific includes, since mmeye version doesn't have sh4 code.
missed in previous commit, despite mentioning that in commit message.
2023-09-29 05:25:15 +00:00
andvar 3129999f68 apply few commits from uwe in evbsh3/locore.S to mmeye counterpart:
1) Wrap _ROM_START in #ifdef ROMIMAGE to match its use.
2) Use symbolic constants for SR init values.
3) Don't write SR twice.
reduces diff between two mainly to SH4 specific code and few other lines.
NFCI
(confirmed with uwe by email)

Additionally:
rearrange includes alphabetically and remove sh3/mmu_sh4.h, since SH4 specific
code is missing.
2023-09-28 21:45:43 +00:00
manu 2004a707cf Align the behavior of different boot methods in RAIDframe
We enforce the documented and paritally implemented behavior when
looking for the kernel in RAID 1 sets without a partition name given.
We search for:
- A GPT partition with bootme attribute set
- A FFS or LFS patititon
- The first partition
2023-09-28 15:46:55 +00:00
skrll 15a670f8d8 whitespace nit 2023-09-28 06:34:22 +00:00
skrll cc90eb9318 #define<space> -> #define<tab> for consistency 2023-09-28 06:23:43 +00:00
skrll 4a40b7f389 Trailing whitespace. 2023-09-28 06:19:19 +00:00
tsutsui 5ae0a95549 TAB/space cleanup. 2023-09-26 14:33:55 +00:00
tsutsui 4aa16837d6 Remove trailing spaces and TABs. 2023-09-26 12:46:30 +00:00
riastradh 83b0c2cdc7 sbmips/systemsw.h: sys/stdbool.h for bool.
XXX sys/types.h should bring this in too, but that doesn't happen in
the crash(8) build, perhaps because sys/types.h only includes
sys/stdbool.h under _KERNEL or _STANDALONE but not _KMEMUSER -- maybe
we should fix that but this is a lower-risk change for now to fix a
build problem.

Found by Jan-Benedict Glaw.
2023-09-25 14:56:56 +00:00
andvar 1281dc69e3 Nix trailing whitespace. 2023-09-24 20:17:26 +00:00
andvar 714432082c unify ROMIMAGE specific assembler code between evbsh3 and mmeye.
fixes mmeye ROMIMAGE enabled build and in turn MMTAROMNEW kernel config.
patch checked by martin. PR port-mmeye/57627.
2023-09-24 19:57:10 +00:00
andvar 0e2ce5add6 disable all phy devices in config, since network is disabled in general.
add SH7708R option from MMTA config, one CPU option is required.
enable pseudo-terminal device, also needed for config to build.

changes fix the kernel config itself, but build fails on locore.S asm code,
will file a PR for that.

P.S. would be good to update descriptions of kernel configs, since all copied
from GENERIC and it is difficult to decipher their purpose and relevance.
2023-09-24 13:59:38 +00:00
andvar e1b966bd13 pass NULL to the second dbdma_alloc() expected argement.
it was not adjusted after it acquired one 7 years ago.

fixes ZS_TXDMA enabled build for macppc.
2023-09-24 10:59:24 +00:00
andvar a227f7c36a define i variable in for loop.
valkyriefb_attach() doesn't have one defined in the function scope.

fixes VALKYRIEFB_DEBUG enabled build for macppc.
2023-09-24 10:51:28 +00:00
skrll 8b45e15326 Add a bunch of system registers and their bit / bit field definitions.
Taken from ryo's nvmm branch with updates from me.
2023-09-24 10:13:44 +00:00
andvar dc05387222 define i variable in for loop.
mesh_msgin() doesn't have one defined in the function scope.

fixes MESH_DEBUG enabled build for macppc.
2023-09-24 08:20:06 +00:00
andvar 6d5a047a6e add ifdef NWSDISPLAY > 0 around rascons_* functions usage,
otherwise implementation is not available, which breaks macppc MAMBO config.

potentially better solution to provide empty implementation, comments welcome.
2023-09-23 21:26:16 +00:00
ad 06d6b10d9d Remove unused L_KPRIORITY. 2023-09-23 14:41:15 +00:00
andvar f55632659e pass just l param to exec_aout_prep_oldzmagic instead of l->l_proc.
In a huge "merge ktrace-lwp." commit struct proc was changed by struct lwp.
seemingly all 68k ports just replaced p with l, however mac68k changed to
refer to l->l_proc. I assume it was accidental leftover during refactoring.

fixes COMPAT_NOMID enabled build for mac68k.
2023-09-23 13:45:50 +00:00
andvar 03654d7dd6 some whitespace cleanup for debug printf calls. 2023-09-23 12:48:23 +00:00
andvar 7f8be6ec15 change zsprintf to printf. It was defined as printf in include/z8530var.h
up to rev 1.4, then removed with conversion to MI 8530 SCC driver back in 1997.

Fixes build with ZSMACDEBUG option enabled for mac68k and macppc.
2023-09-23 12:29:24 +00:00
msaitoh 821e159c0a s/ for for / for / in comment. 2023-09-21 09:31:49 +00:00
msaitoh e2868e2025 Fix typo in comment. 2023-09-21 09:24:09 +00:00
andvar ddc0a30623 remove unneeded whitespace in empty line from my previous commit. 2023-09-17 14:22:28 +00:00
andvar f699961808 word was changed to sval at rev 1.39, but DPRINTF values were not updated.
Fixes DEBUG_FPE enabled build for 68k FPE code.
2023-09-17 13:14:08 +00:00
andvar 8eeeef2870 fix KGDB enabled build for luna68k:
* include sys/kgdb.h in luna68k/trap.c for missing definitions.
* cast second kgdb_trap argument to (db_regs_t *).
* build m68k/kgdb_machdep.c in kgdb enable build for kgdb_trap() implementation.
2023-09-17 12:30:00 +00:00
andvar 0155748d5e all sunos_exec_aout_makecmds references were removed from machedep back in 1997,
as the code was standardized and moved to sunos_exec_aout.c.

removing this code from luna68k as well, for whatever reason it was missed.

Fixes build with COMPAT_SUNOS enabled for luna68k.
2023-09-17 10:14:49 +00:00
andvar 156c51b999 add "#if defined(M68030)" around 68030 specific busaddrerr2030 calls.
Makes M68030 build without 040/060 counterparts enabled for x68k.
2023-09-17 07:22:17 +00:00
andvar 4854e56dec remove static from dumpssw() and dumpwb() declarations.
Fixes DEBUG enabled builds for luna68k and x68k.
2023-09-16 20:53:18 +00:00
andvar 495cf42c58 sh3/sci(4): replace undefined scistatus with DPRINTF.
Fixes the build with SCI_DEBUG enabled.
2023-09-16 18:56:39 +00:00
andvar 01f146afb7 sh3/scif(4): redefine DPRINTF again, not all SH ports has machine/debug.h.
Those are defined for hpc only.

unbreaks build for evbsh some kernel configs and SFIC_DEBUG still builds.
2023-09-16 15:42:01 +00:00
christos 5652437218 protect against multiple inclusion 2023-09-16 13:37:10 +00:00
andvar 5fb7a5f9aa sh3/scif(4): replace undefined scifstatus with DPRINTF.
fixes the build with SCIF_DEBUG enabled.
2023-09-15 20:59:56 +00:00
rjs 597e2bb815 Enable crypto engine on Pinebook Pro.
Only used for rng at present.
2023-09-14 12:27:55 +00:00
rin d8f3ef1ddb mips: Add initial support to gprof(1) for n64 userland
Use gp relative call for _mcount().

Stop using macro name MCOUNT as well for clarity. It has nothing to
do with one provided by <machine/profile.h>.

Now, gprof(1) works just fine for C programs. On the other hand, some
C++ profiling tests of ATF fail as partially observed for n32.

More C++ profile tests become broken for GCC12 in comparison to GCC10.
Something needs to be adjusted for us, or GCC, or both.
2023-09-14 03:37:01 +00:00
rin acd53a6eea riscv: ptrace: Add PTRACE_ILLEGAL_ASM for ATF
All related tests successfully pass.
2023-09-14 03:25:31 +00:00
rin 15d7b28cb6 mips/trap: Fix reversed ksi_code for SIGTRAP cases
It should be TRAP_TRACE and TRAP_BRKPT for software single stepping
and ``real'' break insn, respectively.
2023-09-14 03:24:07 +00:00
rin 3029494a69 efiboot/x86: eficons.c: Explicitly include params.h for howmany()
NFC for -current and netbsd-10, but necessary for netbsd-[89] to
pull up raw IO serial port support (PR port-amd64/57523).
2023-09-14 03:05:15 +00:00
andvar 03d845ce59 fix printf format specifier for physmem.
fixes VERBOSE_INIT_ARM enabled build for iyonix.
2023-09-13 19:45:37 +00:00
andvar 5ad64cb80b change hd64461uart_init_regs third argument from NULL to 0x0,
since compiler complains about making integer from pointer without cast.

fully fixes KGDB enabled build for hpcsh.
2023-09-13 17:08:14 +00:00
andvar 401e0ef38d double quotes should be in front of value, not property name.
fix KGDB enabled builds for dreamcast/hpcsh.
2023-09-12 22:07:33 +00:00
andvar 00fc043430 remove ksyms from hpcsh DEBUG kernel config. It is already defined in GENERAL. 2023-09-12 21:50:11 +00:00
andvar 91e15b95d7 rename flash_cd to vrflash_cd, since device was renamed to vrflash.
Fixes hpcmips LCARD config linking issue that flash_cd is undefined.
2023-09-12 19:32:00 +00:00
bouyer b1c8c7f1aa Remove now-unneeded and brocken (probably since dts-5.15 import)
sun8i-h3-orangepi-one.dts, and let the build use the one from sys/external.
Problem reported and fix tested by Dave Tyson as reported on port-arm@
While there remove #include "sun8i-h3.dtsi" from sun8i-h3-orangepi-plus2e.dts,
this file has been removed with the dts-5.15 import.
2023-09-12 12:56:21 +00:00
andvar 96e8b6072d hpcmips/vrflash(4): custom DPRINTF definition requires additional brackets
around the arguments.

Fixes FLUSH_DEBUG build.

However the driver fails to link due to missing reference to flash_cd,
my guess because of obsoleted flash device-major.
2023-09-11 22:09:28 +00:00
andvar 52c53d8038 return %#x specifier for pcihp->ioh and add (unsigned) cast instead,
as it is done everywhere in this code.
2023-09-10 21:13:20 +00:00
andvar ff2597cfa4 rewrite tx39sib debug code to use debug.h DPRINTF definition.
also debug code uses dbg_bitmask_print(), thus build fails without the header.

fixes TX39SIBDEBUG enabled build.
2023-09-10 20:55:30 +00:00
andvar 2f42ad3c6c rewrite old style tx39biu_dump function declaration
and constify char *rowsel[], char *colsel[].

fixes TX39BIU_DEBUG enabled build.
2023-09-10 20:41:57 +00:00
andvar 94a7d25329 tx39ir(4): rewrite code to use DPRINTF definition from debug.h.
custom one had wrong vrpiu_debug variable in if block (likely copy pasta)
debug code also calls dbg_bitmask_print(), thus was failing to build.
remove unneeded #undef TX39IRDEBUG.

Fixes TX39IRDEBUG build (tested with hpcmips TX3912 kernel config).
2023-09-10 20:28:25 +00:00
bouyer 3541826077 If Xen system time went backward, instead of ignoring the event assume
one tick passed and reinitialise the local state.
If we need to call the hardclock timer several time to catch up missed events,
don't do more than one second in a single event; and schedule the next
event faster.

Hopefully fixes occasionnal
panic: cpu1: time has not advanced in 1501 heartbeats
or
panic: cpu0: softints stuck for 16 seconds
seen in daily Xen atf runs.
2023-09-10 15:23:01 +00:00
andvar c1de2a9408 rewrite UCBTPDEBUG to use DPRINTF/DPRINTFN definitions from debug.h.
No functional changes intended.
2023-09-10 15:18:51 +00:00
andvar 406696bdb3 Remove custom DPRINTF/DPRINTFN definitions and reuse one defined in debug.h.
Remove "#undef PLUMVIDEODEBUG", it is not defined by default.

fixes PLUMVIDEODEBUG enabled build.
2023-09-10 15:03:56 +00:00
andvar 5fa772ecde Various fixes to (re)enable PLUMPCMCIA_DEBUG build:
remove brackets around DPRINTF params (that's leftover from custom definition).
pcihp->ioh expects %lx specifier, not %x.
constify char *width_names.
rename cardtype to type in one of DPRINTF argument's condition.
2023-09-10 14:28:57 +00:00
andvar 43db01aec4 nix whitespace before semicolon. 2023-09-10 14:11:33 +00:00
andvar e8b65fd4e7 PLUM2 icu debug code uses dbg_bit_print, defined in hpcmips debug.h header file.
Thus rewrote code to use DPRINTF definition from it and include the header.

Fixes PLUMICUDEBUG enabled build.
2023-09-10 11:30:13 +00:00
oster d46f2d7e74 With the overhaul of the scheduler code the semantics of
ci_want_resched have changed, and for some reason vax
still requires ci_want_resched set to 1 in order to do
preemption.  This commit contains a workaround for the
preemption issued discussed in PR#55415.

XXX pullup-10
2023-09-10 00:15:52 +00:00
andvar 4d29d221e2 s/reagion/region/ in comment. 2023-09-09 21:04:26 +00:00
andvar cd892e46b9 s/reagion/region/ in called bus_space_read_region_stream_x method names.
relevant for hpcmips BUS_SPACE_HAS_REAL_STREAM_METHODS enabled build,
however it still fails due to other issues.
2023-09-09 21:01:57 +00:00
andvar 47e55d105e relocate DPRINTF below to make sure that bpa is initialized.
fixes BUS_SPACE_DEBUG enabled build for hpcmips.
2023-09-09 20:47:29 +00:00
andvar ee55266c7a change #define to #error for MIPS3_4100i 8KB page size build protection. 2023-09-09 18:49:21 +00:00
ad e5d38798d7 tsc_get_timecount(): cover the backwards check by DIAGNOSTIC since it has
proven the point by now.
2023-09-09 18:37:03 +00:00
andvar 3c501d5d30 add "midi* at midibus?" to hpmips VR41XX kernel config.
it is needed for umidi to build and makes this config to build as well.
2023-09-09 09:38:02 +00:00
andvar 369dd977e4 fix DEVMAP_ENTRY list termination symbol.
Makes hpcarm NETBOOKPRO config build again.
2023-09-09 07:07:03 +00:00
andvar 164ef53fb3 hp300/dcm(4): set dsp value after sc is initialized.
fixes DCMSTATS enabled build for hp300.
2023-09-08 22:51:54 +00:00
andvar dd45dace98 fix few typos in the text of Debug.tips and TODO.hp300 docs. 2023-09-08 19:04:28 +00:00
andvar f93e77f4b9 s/Insruction/Instruction/ 2023-09-08 18:51:19 +00:00
skrll 2d3abdba8d Handle CAUSE_LOAD_PAGE_FAULT in trap_pagefault_fixup 2023-09-07 12:48:49 +00:00
macallan 90f989771c yet another tsleep/wakeup -> cv_* 2023-09-06 08:14:42 +00:00
gutteridge a0a93cd257 ti_com.c: set sc_type to COM_TYPE_OMAP
Avoid a kernel hang reported by Brook Milligan in PR port-arm/57598.
Patch suggested by RVP, seems correct to several of us. (If this
introduces a regression with some board, sorry, mea culpa. But in
that case we should still be carrying this, just conditionalized.)
2023-09-05 02:59:07 +00:00
mrg 95613c87be x86: avoid annoying GCC 12 bounds check in curcpu() and curlwp().
these functions read %gs and return an pointer at an offset from this
value (the current cpu, or lwp pointers), and GCC is complaining that
they're accessing a array cpu_info[0] (ie, zero length, no storage.)

several attempts to workaround it have failed, and because of the
asm volatile nature of this, it seems very unlikely a compiler would
take this and do something wrong with it.
2023-09-04 20:58:52 +00:00
andvar b6d58f10ce fix printf format specifiers for ews4800mips BUS_DMA_DEBUG build option. 2023-09-04 12:24:07 +00:00
andvar e2869ef114 remove duplicate "(unsigned *) &atmp" argument passed to dbl_to_sgl_fcnvfxt().
fixes build with TIMEX option enabled for hppa.
2023-09-03 21:43:48 +00:00
andvar 40b3af9740 remove (db_addr_t) cast in hppa PC_REGS(regs) definition.
rename tf_hptm to tf_cr24 in kgdb_hppa.c.
This name was lost from trapframe (frame.h) in v1.8 and restored as tf_cr24 in v1.12.

Fixes KGDB enabled build for hppa.
2023-09-03 20:52:13 +00:00
tnn e187ab084f bcm2835_spi: guard against too large clock divider and clamp if necessary 2023-09-03 11:36:52 +00:00
skrll 6345bad4cf Fix and enable MULTIPROCESSOR 2023-09-03 08:48:19 +00:00
andvar 683be90a05 remove (db_addr_t) cast in sh3 PC_REGS(regs) definition.
Fixes KGDB build option for SH3/4 code.
2023-09-02 21:54:55 +00:00
skrll 71aa81fb0f Be clear about hart vs cpu. NFCI. 2023-09-02 09:58:15 +00:00
skrll f0efbc16f0 Simplify plic_fdt_intr_disestablish by calling plic_intr_disestablish 2023-09-02 09:29:59 +00:00
skrll 0e882f4be8 Fix a comment and enable RISC-V ddb mach commands 2023-09-02 09:27:09 +00:00
andvar 7707091822 newsmips/sn(4): rename SONIC_DEBUG to SNDEBUG for consistency.
nix this option from i386/amd64 ALL configs, it isn't used anywhere anymore.
2023-09-02 07:15:30 +00:00
jdc 19bd2f7501 sparc64: fix interrupt level mapping for disk and and parallel devices
on SBUS-based machines
Change the mapping from PIL_SCSI to PIL_BIO, so that they interrupt above
the highest soft interrupt (softserial)
Remove unused PIL_SCSI, PIL_FDSOFT, PIL_AUSOFT and fix the printf in fdc.c
Add "socal" and "SUNW,bpp" to the interrupt map.
2023-09-02 05:51:57 +00:00
andvar 5f873d3f82 fix typo in the type krandsource_t -> krndsource_t.
fixes RND_COM enabled build for epoc32.
2023-09-01 08:53:52 +00:00
andvar f15d809990 fix format specifiers for emips PHYSMEMDEBUG build option. 2023-09-01 06:16:45 +00:00
gutteridge c57b45e843 Enable rkv1crypto on nanopi-r2s
Follow the example of rock64. Tested by myself.
2023-08-31 01:23:55 +00:00
rjs e6b1f8b6c0 Re-enable the fan. 2023-08-30 21:26:05 +00:00
andvar 33dfc75ecc s/Piccalo/Piccolo/ in device description. 2023-08-30 20:17:06 +00:00
andvar 90d0df6ff6 fix build for amiga MDINSTALL kernel config.
bppcsc0 and cbiiisc0 should attach to p5bus0 and p5bus to zbus0.
2023-08-30 20:15:54 +00:00
andvar 4267fa71b7 atari/ser(4): constify "char *str" serstatus() argument to fix SER_DEBUG build. 2023-08-30 19:07:04 +00:00
christos a9d97cfcc6 Override these two booters with -Oz for clang since it produces smaller code
here.
2023-08-30 18:46:51 +00:00
christos 151e733117 Merge the OPT_SIZE flags. -Oz is not always producing smaller code that -Os,
so default to -Os for both, and we'll override where needed.
2023-08-30 18:45:46 +00:00
christos bab76bf4e5 Explicitly pass COPTS 2023-08-30 18:44:48 +00:00
andvar 879c8bd930 atari/fdc(4): fix printf format specifiers for FLP_DEBUG build. 2023-08-30 18:20:40 +00:00
tsutsui 952c1ac435 Remove ENABLE_INT5_STATCLOCK broken since matt-nb5-mips64 merge.
Noticed by andvar@.
2023-08-30 17:10:17 +00:00
andvar ca37b980c3 fix build for arc PCCONS/RPC44 kernel configs by replacing *pccons_isa_conf
definition with pccons_isavar.h include, which has extern declaration for it.

Discussed fix with phone@ via irc.
2023-08-30 09:17:46 +00:00
macallan bef84f1008 don't abuse the interrupt lock for waits in the event thread 2023-08-30 08:38:51 +00:00
macallan b8cd60909e remove ancient #if 0 block
NFC
2023-08-30 07:42:41 +00:00
andvar 360c734917 arc/fdc(4): fix printf specifiers for FD_DEBUG build. 2023-08-29 21:55:11 +00:00
andvar 7f42480134 fix typo NKSYM -> NKSYMS in one of #if directive conditions.
It may cause build failure, e.g. with DDB option disabled.
2023-08-29 21:34:50 +00:00
jdc 02a0982161 Update the horizontal sync offset based on the Naturetech video timing.
While here, correct the spelling of "Naturetech" in the data.
2023-08-29 20:17:02 +00:00
andvar fcdad19e47 fix SFAS_DEBUG enabled build for acorn32:
declare dump_nexus(), dump_nexii(), dump_sfassoftc() than option is enabled.
fix specifier for nexus->dma[loop].ptr in printf().
2023-08-28 18:04:33 +00:00
andvar 13a5afa916 acorn32/fdc(4): fix modifiers blkno values to %lld and
fix typos in fr_r10-r12 variables (fh->fr).

Fixes acorn32 build with FD_DEBUG enabled option.
2023-08-28 17:53:46 +00:00
skrll 2a2623fc9c Remove duplicate .ci_cpl initialiser. 2023-08-28 11:12:42 +00:00
andvar c2b8d52836 rename DEBUG_UL to UL_DEBUG for naming consistency.
remove stray UL_DEBUG definition in grf_ul.c
2023-08-28 09:22:26 +00:00
andvar 02b264fa7e fix format specifier from %lx to %hx, cmd has a type of u_int16_t.
fixes DEBUG_UL build for amiga (will be renamed to UL_DEBUG in next commit).
2023-08-28 09:14:02 +00:00
andvar 7ac5d376a6 amiga/es(4): start_ptr/end_ptr are initialized with USEPKTBUF option only,
thus add this option check, when they are defined/used under ESDEBUG.
2023-08-27 22:09:55 +00:00
andvar 4f16a5aa24 amiga/grfcl(4): return prx, pry definition/assigment lost with rev 1.49,
however under CL_SHIFTSPRITE code block only, where it is used.

Fixes build with the CL_SHIFTSPRITE enabled option.
2023-08-27 19:48:19 +00:00
andvar 7635878d1c amiga/toccata(4): define ad1848debug to fix AUDIO_DEBUG enabled amiga build.
The code is taken from sys/dev/isa/ad1848_isa.c for consistency.
Unsure, if new debug level variable wouldn't be better or it is needed at all.
2023-08-27 18:36:55 +00:00
andvar b186065a39 remove empty #ifdef DEBUG block. 2023-08-27 08:15:13 +00:00
andvar 167403557c amiga/p5pb(4): move parent_dict definition/assignment to #if NGENFB > 0 block,
where it is only used in P5PB_CONSOLE code.

fixes P5PB_CONSOLE enabled build, no functional changes intended.
2023-08-26 22:12:45 +00:00
andvar f702d96437 amiga/fdc(4): revert bp->b_bcount format specifiers from %ld to %d,
changed in rev 1.62. b_bcount has a type of int.

fixes FDDEBUG build.
2023-08-26 21:20:48 +00:00
andvar 9f10182e25 amiga/es(4): constify es_dump_smcregs char* argument to fix ESDEBUG build. 2023-08-26 20:23:23 +00:00
riastradh 77901f27b5 xen: Provide definitions or ifdefs to make drm build in XEN3_DOM0.
No idea if it works, but it builds now.

PR port-xen/49330
2023-08-25 08:05:18 +00:00
rin ca4bf86fa8 riscv: cpu_setmcontext: Do not unconditionally update tp register
Conserve tp register for _UC_CPU and update later if _UC_TLSBASE is
specified. This is what powerpc does, which also uses a general
purpose register for TLS pointer.

Found by tests/lib/libpthread/t_swapcontext:swapcontext1, which
successfully passes now.
2023-08-24 05:46:55 +00:00
rin 149c01cf1c riscv: Add PTRACE_BREAKPOINT and friends for ATF
Since its size must be determined a priori, explicitly use
c.ebreak for sure.

Now, related tests in ATF successfully pass for riscv64,
as far as I can see.
2023-08-24 05:40:08 +00:00
andvar c27785fcfe remove global sndebug definition. looks like historical leftover replaced
by SNDEBUG definition.
2023-08-22 08:33:50 +00:00
andvar ce23af690a newsmips: fix build with SNDEBUG option enabled.
It was broken since rev 1.21 24 years ago, and got more broken code later on:
remove leftover device_xname(sc->sc_dev) param from aprint_debug_dev in one block.
fix wrong method name devoce_xname to device_xname in second block.
rename et to eh for consistency, and define it (definition was removed in the past).
while here, improve the code with riastradh help to make it safer.

pullup to at least netbsd-10 is needed.
2023-08-22 07:13:33 +00:00
rin ee1dd380bf riscv/trap.c: Dump cause register for unhandled page fault 2023-08-22 07:11:15 +00:00
rin aedae9d693 riscv/trap.c: Handle userland breakpoint exception
Now, gdb 13 works for riscv64 to some extent :)
2023-08-22 07:10:39 +00:00
macallan 433d001a85 tsleep()/wakeup() -> cv_* 2023-08-22 06:43:34 +00:00
andvar 52d90fb889 fix typos in documented error codes. 2023-08-19 17:32:02 +00:00
andvar 83a6cb5606 fix typos in comments. 2023-08-13 22:06:44 +00:00
skrll e5d592f2b3 risc-v: Use 'onproc' for 2nd arg of pmap_md_page_syncicache
Match other definitions of pmap_md_page_syncicache argument naming by
renaming the 2nd arg to 'onproc'
2023-08-12 07:48:11 +00:00
mrg 6ed8189e16 avoid uninitialised variable warnings (likely incorrect ones.)
cry wolved by GCC 12.
2023-08-11 07:05:39 +00:00
andvar 23a4d41e09 fix typos in comments. 2023-08-10 20:02:55 +00:00
andvar e03f1896ab s/VAXststions/VAXstations/ in comment. 2023-08-10 19:13:52 +00:00
andvar f0dcd50e0e fix typos in comments s/iton/tion/ or s/ton/tion/. 2023-08-10 06:44:11 +00:00
andvar 2c4d487849 viadrmums(4): build legacy VIA DRM UMS driver module for amd64.
This driver is not built-in by default, thus loadable module can help (un)lucky
owners of 64-bit capable VIA (Nano/Eden) systems or early AMD/Intel systems
with some VIA chipsets, which include VIA integrated graphics.
I also boldly added product IDs for few later models from VX8xx/VX9xx chipsets
without 3D support (DX9_0) to "expand" the driver support to more systems.
Tested successfully basic functionality on VX800, and partially successfully
on VX900 (on VX900 Xorg failed to initialize due to openchrome related issues,
viadrmums attaches and it is by used the driver).
Didn't test on VX855, I don't have one.

Pull up to netbsd-10 is needed.
2023-08-09 09:36:26 +00:00
riastradh 4a1dffe289 xvif(4): Omit needless membars in xennetback_connect.
xneti is a private data structure to which we have exclusive access
here; ordering the stores doesn't make sense.
2023-08-09 08:38:57 +00:00
riastradh 42592ab857 xvif(4): Omit needless membars in xennetback_rx_copy_process.
- No need for barrier around touching req_cons and rsp_prod_pvt,
  which are private.

- RING_PUSH_RESPONSES_AND_CHECK_NOTIFY updates the shared req_prod and
  then issues xen_mb, which is all that we need between the update of
  shared req_prod and hypervisor_notify_via_evtchn.

  (Between updating the shared req_prod and issuing
  hypervisor_notify_via_evtchn, only xen_wmb is needed.  But after
  writing to the shared req_prod, RING_PUSH_REQUESTS_AND_CHECK_NOTIFY
  must also read from the shared rsp_event, which requires the
  store-before-load ordering that only xen_mb provides.)
2023-08-09 08:38:47 +00:00
riastradh bf2b9dac71 xvif(4): Simplify while loop in xennetback_evthandler.
No functional change intended.
2023-08-09 08:38:37 +00:00
riastradh 79ccf23713 xvif(4): Omit needless membars in xennetback_evthandler.
This should improve throughput without any impact on correctness.
2023-08-09 08:38:27 +00:00
riastradh a361944abb xvif(4): Move expensive xen_mb out of xennetback_evthandler loop.
Use the cheaper RING_HAS_UNCONFIRMED_REQUESTS for most of the loop.

This should improve throughput without any impact on correctness.
2023-08-09 08:38:16 +00:00
riastradh 6b262286ea xvif(4): Omit local variable aliasing xneti->xni_txring.req_cons.
No functional change intended.
2023-08-09 08:38:05 +00:00
riastradh 76b21ca69b xvif(4): Add missing xen_rmb in xennetback_evthandler. 2023-08-09 08:37:55 +00:00
riastradh 7376a1bee9 xvif(4): Comment on memory barriers in xennetback_evthandler.
Note which ones appear unnecessary and which ones appear too strong,
but don't change them.

No functional change intended.
2023-08-09 08:37:44 +00:00
mrg 832d47522a introduce new GCC 12 warning disables and use them in a few places
this introduces 4 new warning disable flags:

   CC_WNO_MISSING_TEMPLATE_KEYWORD
   CC_WNO_REGISTER
   CC_WNO_STRINGOP_OVERREAD
   CC_WNO_ARRAY_BOUNDS

and documents them in README.warnings.  of these, the string op
and array bounds are both problematic (real bugs) and also spurious
(not real bugs), and the other 2 are mostly temporary for older
3rd party code.

add some new uses of CC_WNO_STRINGOP_OVERFLOW.

fix m68k build for gallium and GCC 12.
2023-08-08 06:27:31 +00:00
mrg f0f8c139e4 fix mis-matched function prototype and definitions.
found by GCC 12.
2023-08-07 23:29:22 +00:00
mrg 1417562b0b fix indentation issues.
found by GCC 12.
2023-08-07 23:28:58 +00:00
msaitoh 3001bf9234 Update /proc/cpuinfo.
- Move "ssbd" to an unused Linux mapping.
 - Update unused Linux mappings.
2023-08-07 09:27:14 +00:00
msaitoh 690f64d68b Fix detection of availability of MSI/MSI-X on some systems.
Try to find all functions on bus 0, device 0 to find a PCI host bridge.
Some CPU's host bridge is at 0:0.4. Tested by Intel Snow Ridge.
2023-08-07 06:23:39 +00:00
riastradh 2095a1529c xen/x86: Get the right intrframe pointer in ddb ipi.
This was broken with the transition from evtchn_set_handler to
intr_establish_xname in 2017, remained broken with the transition
from intr_establish_xname to xen_intr_establish_xname in 2018, and
still remained broken when xen_intr_establish_xname was changed back
to evtchn_set_handler in 2020.

The mechanism is grody -- instead of a secret second argument to the
interrupt handler, the intrframe pointer should be replaced by a
struct cpu_info member that is saved and restored by the interrupt
handler calling logic.  But we should make sure the replacement
actually works first -- which is not trivial in part because the
users are hidden behind sketchy function pointer casts.

With any luck, this will make `mach cpu N' work in ddb on Xen.

XXX pullup-10
XXX pullup-9 (by patch)
2023-08-06 16:07:53 +00:00
riastradh 45475f6488 xen/x86: Enable heartbeat checks. 2023-08-05 14:38:43 +00:00
riastradh 52313c0f5e Revert "xennetback(4): Fix xennetback_evthandler loop."
PR kern/57560
2023-08-04 18:41:01 +00:00
riastradh 2fede2d359 Revert "xennetback(4): Fix membars in xennetback_rx_copy_process."
PR kern/57560
2023-08-04 18:40:49 +00:00
riastradh 8685bade3d Revert "xennetback(4): Omit needless membars in xennetback_connect."
PR kern/57560
2023-08-04 18:40:36 +00:00
rin d8d3219353 sun2/sc(4): Fix panic due to wrong ENOMEM for DMA buffer
Use kmem_zalloc(9) for sc->sc_dma_handles[] to zero-initialize flags.

XXX
Will soon apply to sun3.
2023-08-04 11:18:18 +00:00
mrg 62d13ffd0a avoid comparing arrays directly, compare the address of their first element.
found by GCC 12.
2023-08-04 09:06:33 +00:00
rin d633c585b4 amiga/acafh(4): Appease GCC 12.3.0 -Wmisleading-indentation
No binary changes. Alternatively, pmap_update(9) can be placed in
this loop, but it should make nothing other than small overhead.
2023-08-04 08:39:44 +00:00
rin 6cf5ca46b9 x86/multiboot2: Fix short read for 64-bit ELF headers
XXX document this
At the moment, this cannot affect NetBSD/amd64, as we have not
supported multiboot for kernel side.

Found by GCC12.
2023-08-04 07:21:57 +00:00
mrg 983534e974 check a pointer's value not the address of a pointer.
found by GCC 12.
2023-08-03 08:31:06 +00:00
mrg 357b7a3e80 ignore "-Warray-bounds" for various low level platform code that knows
how something is setup but technically is undefined behaviour.  the
most common here is "extern int end;" and then using offsets of "&end"
that are outside the bounds of this 4-byte integer.

these uses are almost certainly all OK in reality.

found by GCC 12.
2023-08-03 08:16:30 +00:00
mrg 86130e6c20 avoid potentially uninitialised variable that likely won't happen.
GCC 12 can't tell that hardware / platform design means it won't happen.
2023-08-03 08:10:40 +00:00
rin abac824e20 alpha: Add support for bootflags [xX] to enable debug messages. 2023-08-03 03:07:35 +00:00
skrll dc806fc7cd No need to define cpu_{,set}_tlb_info here - just use the
sys/uvm/pmap/pmap_tlb.h versions.
2023-08-02 15:57:21 +00:00
skrll b77d356b0d Relax the TLB invalidation from full to by va for writing to kernel text
in db_write_text.
2023-08-02 14:45:04 +00:00
skrll e7f0873ce5 KNF 2023-08-02 14:36:39 +00:00
macallan 8e0d3cbdbc check for empty ranges in pmap_page_physload() itself 2023-08-02 09:18:14 +00:00
macallan 5d041606df avoid calling pmap_page_physload() with an empty range
this avoids a panic in uvm_pmap_physload()
now my C360 boots again
2023-08-02 08:54:42 +00:00
rjs a985ee1373 Include compat config for NetBSD-10. 2023-08-01 22:06:23 +00:00
gutteridge 28b79871c0 INSTALL: add a basic comment and missing RCS ID
(This isn't actually in use at present, but make it look like other
examples.)
2023-08-01 21:30:14 +00:00
andvar 87305e5a45 fix various typos in comments. 2023-08-01 21:26:27 +00:00
riastradh 77d7029a47 xen: Fix previous commit, forgot to amend it before committing. 2023-08-01 20:11:13 +00:00
andvar 1e7139f024 fix RCSIDs. 2023-08-01 20:09:12 +00:00
riastradh 762dda02dd xen: Report when hardclock jump exceeds timecounter(9) limit. 2023-08-01 19:36:57 +00:00
rin 45acd03fa1 arm/xscale: Do not lower IPL by splraise(9)
XXX
I have fixed similar bug for xscale/i80321.
There should be more in codes written at that time...
2023-08-01 10:35:42 +00:00
rin 76cafab312 NSLU2: Remove workaround for now-fixed PR toolchain/57146 2023-08-01 10:25:48 +00:00
mrg b0f7b0b0b7 don't test arrays against NULL.
found by GCC 12.
2023-08-01 07:58:41 +00:00
andvar b179d0ed44 fix typos in comments, mainly s/denomalized/denormalized/. 2023-07-31 20:48:04 +00:00
mrg 91637ac6c6 when cpus are paused (spinning) in DDB, call x86_pause() in the loop,
hopefully this can reduce power usage while doing nothing.

ok chs@

XXX: pullup-*
XXX: apply to i386
2023-07-31 02:38:16 +00:00
skrll 5d0d79bf01 Slight reformatting. NFCI. 2023-07-29 06:59:47 +00:00
riastradh 39c871a06b xen_clock(4): New hardclock dtrace probes.
sdt:xen:hardclock:tick(last, now)
  fires on every hardclock tick

sdt:xen:hardclock:jump(last, now, nticks)
  fires on every hardclock tick when (now - last) >= 2*NS_PER_TICK,
  i.e., this call to the timer interrupt handler requires multiple
  hardclock ticks
2023-07-28 10:39:14 +00:00