Link [ NetBSD | NetBSD OpenGrok source search | PR fulltext-search | Summary of daily snapshot builds | history of daily build result | pkgsrc commit viewer ]


   
        usage: [branch:branch] [user:user] [path@revision] keyword [... [-excludekeyword [...]]] (e.g. branch:MAIN sys/arch/arm, if_wm.c@1.234 )




switch to index mode

recent branches: MAIN (1h)  netbsd-8 (5d)  netbsd-10 (5d)  netbsd-9 (11d)  thorpej-ifq (175d)  thorpej-altq-separation (177d) 

2024-05-09 23:49:54 UTC Now

2024-05-09 22:38:29 UTC MAIN commitmail json YAML

tests/lib/libc/stdio/t_printf: Fix another rounding error.

Noted by kre.

This doesn't break a passing test or fix a failed test, at least on
x86 -- our printf produces `0x1.533p+3' for the double case and
`0xa.99ap+0' for the long double case.  But of the hexadecimal number
literals that that start with 0x5 having three hexadigits to the
right of the fractional point, 0x5.4cdp+1 closest to the IEEE 754
binary64, VAX D, x86 extended precision, and IEEE 754 binary128
floating-point numbers closest to 10.6.

The reason is that the number 10.6 (or the nearest floating-point
number in any format with enough precision) is:

101.0100 1100 1100|1100... * 2^1 = 0x5.4cc|c...p+1

If we round at the vertical bar to the _nearest_ output with three
hexadigits of precision, the result is:

101.0100 1100 1101 * 2^1 = 0x5.4cdp+1

(riastradh)

2024-05-09 21:28:00 UTC MAIN commitmail json YAML

Document that freeaddrinfo(NULL) dumps core.

A source code comment already said this, but it's easier to
find in a man page.

(wiz)

2024-05-09 20:56:41 UTC MAIN commitmail json YAML

lint: in C23 mode, allow storage classes in compound literals

(rillig)

2024-05-09 20:53:13 UTC MAIN commitmail json YAML

2024-05-09 20:22:20 UTC MAIN commitmail json YAML

lint: sync grammar rule names with C11 and C23

(rillig)

2024-05-09 20:15:05 UTC MAIN commitmail json YAML

lint: sort grammar rules according to the order they appear in C23

(rillig)

2024-05-09 19:54:38 UTC MAIN commitmail json YAML

libm: No divtc3.c or multc3.c in sparc64's compat sparc library.

compat/sparc64/sparc/bsd.sparc.mk doesn't define LIBC_MACHINE_CPU,
only LIBC_MACHINE_ARCH, so when the compat build gets to this
conditional, LIBC_MACHINE_CPU is just MACHINE_CPU, i.e., sparc64.

Since there's no `sparc64el' or `sparc64hf-el' that we need to
canonicalize by MACHINE_ARCH -> MACHINE_CPU, just use
LIBC_MACHINE_ARCH here.

(riastradh)

2024-05-09 16:09:03 UTC MAIN commitmail json YAML

Remove the -xx, now we have the list of 20 platforms that have incomplete
fspecs. Instead of augmenting the platform spec with an autogenerated one,
we should understand why we have missing entries in the first place.

(christos)

2024-05-09 15:54:58 UTC MAIN commitmail json YAML

2024-05-09 15:11:11 UTC MAIN commitmail json YAML

2024-05-09 14:44:40 UTC MAIN commitmail json YAML

tests/lib/libc/gen/t_fpclassify: Test fpclassify on non-IEEE754 too.

Just exclude the subnormal parts on non-IEEE754 architectures
according to __FLT/DBL/LDBL_HAS_DENORM__.

(riastradh)

2024-05-09 14:42:10 UTC MAIN commitmail json YAML

libm: Add frexpf and frexpl on VAX.

These are trivial subroutines, not symbol aliases, for separate
reasons:

- frexpf has a different ABI from frexp (float vs double argument)

- frexp is defined in libc, not libm, so although long double is the
  same as double, frexpl can't be an alias in libm of a symbol
  defined in libc

(riastradh)

2024-05-09 14:13:09 UTC MAIN commitmail json YAML

tests/lib/libc/gen/t_fpclassify: Spruce this up a bit.

Provide more useful diagnostics when tests fail.

(riastradh)

2024-05-09 14:00:59 UTC MAIN commitmail json YAML

tests/lib/libm/t_infinity: Remove broken long double conditional.

LDBL_MAX is always defined, so this branch is dead.  (If LDBL_MAX is
not defined, that's a bug in the architecture's float.h, not a reason
to skip a test.)

(riastradh)

2024-05-09 12:41:08 UTC MAIN commitmail json YAML

2024-05-09 12:24:24 UTC MAIN commitmail json YAML

Revert various broken changes to printf %La (hldtoa).

This reverts:

hdtoa.c 1.12 (PR/56247: Greg A. Woods: printf("%La", LDBL_MIN) dumps core)
hdtoa.c 1.11 (fix tyop)
hdtoa.c 1.10 (Via enh at google dot com in tech-userlevel. Fix handling of
    EXT_FRAC{H,L}BITS (although we don't need to since we don't have them).)

The underlying motivation for this change was that when ld128 is
decomposed into 4x32 words, this hldtoa logic is broken.

But we don't decompose ld128 into 4x32 words; we decompose it into
6x64 words.

And the change, which was supposed to be a noop in our case of 2x64
words (or similar for x87 80-bit floating-point), broke it to the
point of causing buffer overruns (PR 56247) which when worked around
led to just incorrect output output (PR 56937).

If we want to make the #ifdefs for 4x32 words work, that's fine, but
we absolutely must have automatic test cases to detect this kind of
regression because %La formatting is extremely important for
diagnosing details of floating-point data since it doesn't involve
rounding in binary formats.  For now I've added some trivial tests;
there is a more extensive test suite inside gdtoa that we need to
wire up before anyone tries any other shenanigans in this code.

PR lib/56937: printf(3) long double %a formatting is broken

(riastradh)

2024-05-09 12:23:21 UTC MAIN commitmail json YAML

tests/lib/libm/t_ilogb: Expand and tidy.

1. Instead of calling out VAX by name, use #ifdef NAN and
  isinf(INFINITY).  (VAX defines INFINITY even though it's not an
  infinity, not sure if there's a better compile-time test.)

2. Verify ilogbl works on long double on all architectures, not just
  those with __HAVE_LONG_DOUBLE which means long double is _larger_
  than double.

(riastradh)

2024-05-09 12:18:48 UTC MAIN commitmail json YAML

libm: Define ilogbl as alias for ilogb on vax.

PR 57881

(riastradh)

2024-05-09 12:18:28 UTC MAIN commitmail json YAML

tests/lib/libm/t_fe_round.c: Tidy.

nextafter/nexttoward tests didn't make much sense, and are now
supplanted by t_next.

PR misc/58054

(riastradh)

2024-05-09 12:10:00 UTC MAIN commitmail json YAML

port-arm/58194: Resurrect vmt(4) from bitrot

On this architecture vmt(4) used to search for a node "/hypervisor" in the
FDT and probed the VMware hypervisor call only when the node was
found. However, things appear to have changed and VMware no longer provides
the FDT node.

Since vmt(4) doesn't actually need to read anything from FDT, and the
hypervisor call logically resides in virtual CPUs themselves, it would be
better to attach it directly to cpu, just like how it's probed on x86.

(pho)

2024-05-09 11:08:07 UTC MAIN commitmail json YAML

2024-05-09 06:38:28 UTC MAIN commitmail json YAML

unhook libXxf86misc from the build and mark obsolete

library has no users in src or pkgsrc, it's primarily useful for
managing input devices on mid-2000s xfree86 servers

(nia)

2024-05-09 06:34:51 UTC MAIN commitmail json YAML

stop using and linking against libXxf86misc

support for this extension was removed from xorg in 2008,
our xorg-server and our xorg-server.old can't use it.

(nia)

2024-05-09 06:29:32 UTC MAIN commitmail json YAML

undef HAVE_X11_EXTENSIONS_XF86MISC_H

none of our X servers support this extension since 2008 or so.

(nia)

2024-05-09 03:41:05 UTC MAIN commitmail json YAML

No point testing if the spec file is empty before running makespec,
the previous commands guarantee that cannot be the case, so makespec
was never being run.  Just run it unconditionally.

Seems to fix the build for me.

(kre)

2024-05-09 02:14:21 UTC MAIN commitmail json YAML

2024-05-09 01:33:13 UTC MAIN commitmail json YAML

If the ACPI flag "non-removable" is present and true for an SD/MMC
slot, then set a new flag on that slot to indicate that the media
is non-removable.  Make sdhc_card_detect always return true for a
slot if its non-removable media flag is set.

This change lets the kernel automatically configure the
permanently-installed MMC slot on the NXP LX2160-based HoneyComb
LX2 board.

(dyoung)

2024-05-09 00:04:23 UTC MAIN commitmail json YAML

libm: Split expected symbols in mips further by 32-bit vs 64-bit.

32-bit has binary64 long double, same as double; 64-bit has binary128
long double, which is implemented with a few more symbols in libm
(which should maybe be hidden internal symbols, but let's get this
diagnostic measure in the build working before we think about
possibly deleting private symbols).

(riastradh)

2024-05-08 23:28:31 UTC MAIN commitmail json YAML

libm: Record expected symbols for sh3.

(riastradh)

2024-05-08 23:28:07 UTC MAIN commitmail json YAML

2024-05-08 22:59:07 UTC MAIN commitmail json YAML

tests/lib/libm/t_fe_round: xfail for modfl uses.

PR lib/58237: modfl returns wrong answers on ld128 architectures

(riastradh)

2024-05-08 22:57:38 UTC MAIN commitmail json YAML

tests/lib/libm/t_modf: Mark modfl xfail on ld128.

PR lib/58237: modfl returns wrong answers on ld128 architectures

(riastradh)

2024-05-08 20:38:55 UTC MAIN commitmail json YAML

bsd.lib.mk: Use LIBC_MACHINE_ARCH/CPU if set for expected symbols.

Otherwise, we get the wrong list of symbols for compat library
builds, where MACHINE_ARCH/CPU is different from
LIBC_MACHINE_ARCH/CPU, e.g. building compat 32-bit sparc libm on
sparc64.

XXX This is kinda kludgey -- `libc' seems wrong here.

(riastradh)

2024-05-08 20:23:15 UTC MAIN commitmail json YAML

tests/lib/libc/stdio/t_printf: Add another %La test.

This one was adapted from the screw case shown in

https://mail-index.netbsd.org/tech-userlevel/2020/04/11/msg012329.html

which wasn't broken in our libc, but which nevertheless prompted us
to commit a wrong and apparently untested patch that has rendered
printf %La broken for the last four years, which is a little
embarrassing.  (The part of that patch that led to a buffer overrun
has been worked around, so now the output is just incorrect.)

PR lib/56937: printf(3) long double %a formatting is broken

(riastradh)

2024-05-08 20:19:37 UTC MAIN commitmail json YAML

tests/lib/libc/stdio/t_printf: Fix %a test the same way.

(riastradh)

2024-05-08 20:04:33 UTC MAIN commitmail json YAML

tests/lib/libc/stdio/t_printf: Fix %La test.

0xa.99ap+0 is closer to (long double)10.6 in x86 ld80 and in
binary128 (and possibly more formats, haven't verified).

(riastradh)

2024-05-08 18:19:57 UTC MAIN commitmail json YAML

tests/lib/libc/stdio/t_printf: Add a couple simple %La tests.

PR lib/56937: printf(3) long double %a formatting is broken

(riastradh)

2024-05-08 17:27:04 UTC MAIN commitmail json YAML

tests/lib/libm/t_next: Expand substantially.

This covers many more potential problem areas -- and includes a new
xfail test for PR lib/58236: nexttoward(3) is broken on subnormals.

(riastradh)

2024-05-08 16:54:51 UTC MAIN commitmail json YAML

2024-05-08 16:53:35 UTC MAIN commitmail json YAML

2024-05-08 16:08:08 UTC MAIN commitmail json YAML

Fail on incomplete mtree specs

(christos)

2024-05-08 15:57:56 UTC MAIN commitmail json YAML

Add an option to warn and error out for mtree missing entries.

(christos)

2024-05-08 09:52:07 UTC MAIN commitmail json YAML

gcc 14.1 out

(wiz)

2024-05-08 02:08:11 UTC MAIN commitmail json YAML

libm: Add rintl, rintf to non-IEEE754 architectures.

While here, delete #ifdef to handle ns32k -- I don't think that's
gonna be relevant any time soon; in case you hadn't noticed, the
world has moved on from ns32k to vax by now.

PR 57881

(riastradh)

2024-05-08 01:58:52 UTC MAIN commitmail json YAML

libm: ldbl_dummy.c is no longer needed -- nix it.

(riastradh)

2024-05-08 01:42:23 UTC MAIN commitmail json YAML

libm: Don't export symbol `pio4' from s_cosl.c.

This appears to have been added unintentionally in the recent FreeBSD
long double update, and never went out in a release.

(riastradh)

2024-05-08 01:40:27 UTC MAIN commitmail json YAML

2024-05-08 01:05:25 UTC MAIN commitmail json YAML

libm/arch/m68k: Do the weak alias dance for finite.

This is used internally.

(riastradh)

2024-05-08 01:04:41 UTC MAIN commitmail json YAML

libm/arch/mc68881: Do the weak alias dance for sin, cos, tan.

These are used internally.

(riastradh)

2024-05-08 01:04:24 UTC MAIN commitmail json YAML

libm/arch/vax: Do the weak alias dance for finite, finitef.

These are used internally.

(riastradh)

2024-05-08 01:04:03 UTC MAIN commitmail json YAML

libm/arch/i387: Do the weak alias dance for finite and finitef.

These are used internally by some things.

(riastradh)

2024-05-07 23:13:33 UTC MAIN commitmail json YAML

libm: Add expected symbols for m68k.

Not sure if this'll work for all ports -- we might need to split it
up finer-grained by different m68k flavours -- but let's give it a
try and see what breaks.

(riastradh)

2024-05-07 22:51:20 UTC MAIN commitmail json YAML

2024-05-07 22:30:17 UTC MAIN commitmail json YAML

lib/libm/m68060/makeas.sh: Delimit symbols with END.

This way we get symbol sizes in the ELF output.

(riastradh)

2024-05-07 22:29:53 UTC MAIN commitmail json YAML

lib/libm/arch/m68060/makeas.sh: Create public weak aliases.

Use _foo for internal names, and weak alias foo when it's public like
sin/cos/tan.

(riastradh)

2024-05-07 22:19:42 UTC MAIN commitmail json YAML

lib/libm/m68060/makeas.sh: Use `set -eu' to detect script mistakes.

No functional change intended.

(riastradh)

2024-05-07 22:18:19 UTC MAIN commitmail json YAML

lib/libm/m68060/makeas.sh: Pass arguments to dummy more idiomatically.

No functional change intended.

(riastradh)

2024-05-07 22:17:24 UTC MAIN commitmail json YAML

lib/libm/m68060/makeas.sh: Use local for shell functions.

No functional change intended.

(riastradh)

2024-05-07 22:17:08 UTC MAIN commitmail json YAML

lib/libm/arch/m68060/makeas.sh: Indent sh blocks.

No functional change intended.

(riastradh)

2024-05-07 21:18:47 UTC MAIN commitmail json YAML

2024-05-07 21:14:12 UTC MAIN commitmail json YAML

lib/libm/arch/m68060/makeas.sh: Strip the $ when emitting RCS id.

(riastradh)

2024-05-07 21:13:27 UTC MAIN commitmail json YAML

2024-05-07 21:11:24 UTC MAIN commitmail json YAML

libm/arch/m68060/Makefile: bsd.sys.mk -> bsd.host.mk

Somewhat belatedly, after bsd.sys.mk was forbidden to use directly
from Makefiles back in 2014.

(riastradh)

2024-05-07 21:05:47 UTC MAIN commitmail json YAML

libm/arch/m68060/makeas.sh: Tag output with makeas.sh RCS id.

No functional change intended to the output -- only changes are to
comments.

(riastradh)

2024-05-07 21:00:00 UTC MAIN commitmail json YAML

tests/lib/libc/gen/t_fpclassify: Enable long double tests.

The necessary long double symbols should all be available now.  If
there are any architectures where they're not, we can fix those
architectures.

(riastradh)

2024-05-07 20:58:34 UTC MAIN commitmail json YAML

libm: Memorialize expected symbols on various architectures.

This will reduce the risk of accidentally adding or deleting the
wrong symbols while fixing the aliases.

(This is all the architectures I have a build tree for handy; can add
other architectures like m68k later.)

(riastradh)

2024-05-07 20:56:25 UTC MAIN commitmail json YAML

bsd.lib.mk: Allow MACHINE_CPU for default expsym file.

(riastradh)

2024-05-07 20:33:20 UTC MAIN commitmail json YAML

PR/58196: Jan-Benedict Glaw: If there was no spec file specified, generate
one on the fly. Should fix reproducible builds where the mode and the
ownership/group is not fixed and picked up from the filesystem.

(christos)

2024-05-07 20:30:33 UTC MAIN commitmail json YAML

Simple script to create an mtree spec file from a directory tree with
fixed default owner/group/perms.

(christos)

2024-05-07 19:55:14 UTC MAIN commitmail json YAML

Use proper signedness for the LIF file system data structures.

Ancient 4.3BSD used short and int for location, file size, file type,
and addresses etc. but all of them should be unsigned.
Also rename several variables and add comments for readability.

The LIF file system info can be found in "The HPDir Project" page:
https://www.hp9845.net/9845/projects/hpdir/

The same uboot.lif binaries are generated.

(tsutsui)

2024-05-07 19:32:35 UTC MAIN commitmail json YAML

tests/lint: show that in C23 mode, bool is not yet defined

The tests in C11 and C23 mode look the same right now but will change
soon.

The warnings in the C11 test disappeared because after the first error,
warnings about unused variables are suppressed by check_variable_usage,
as they are often wrong.

(rillig)

2024-05-07 19:24:33 UTC MAIN commitmail json YAML

2024-05-07 18:26:22 UTC MAIN commitmail json YAML

2024-05-07 15:49:33 UTC MAIN commitmail json YAML

libm/arch/vax: Expose atan2l.

PR port-vax/57881: vax libm is missing various symbols

(riastradh)

2024-05-07 15:40:15 UTC MAIN commitmail json YAML

also mention kpause(9) here.

(christos)

2024-05-07 15:17:35 UTC MAIN commitmail json YAML

math.h: Move declarations under appropriate namespace tests.

Not sure about _REENTRANT, but if gamma_r and lgamma_r go under that
(even if _NETBSD_SOURCE isn't defined), then lgammal_r probably
should too.

(riastradh)

2024-05-07 15:15:31 UTC MAIN commitmail json YAML

libm/arch/vax: Use STRONG_ALIAS, not ALTENTRY.

STRONG_ALIAS copies the symbol size and type, so it avoids warnings
like this:

/home/riastradh/netbsd/10/obj.vax/tooldir/bin/../lib/gcc/vax--netbsdelf/10.5.0/../../../../vax--netbsdelf/bin/ld: warning: type and size of dynamic symbol `ldexpl' are not defined

(riastradh)

2024-05-07 15:15:10 UTC MAIN commitmail json YAML

2024-05-07 14:53:59 UTC MAIN commitmail json YAML

2024-05-06 18:41:23 UTC MAIN commitmail json YAML

tests/lib/libm/t_bit: Expand and tidy.

1. Instead of calling out VAX by name, use #ifdef NAN.

2. Verify signbit works on long double on all architectures, not just
  those with __HAVE_LONG_DOUBLE which means long double is _larger_
  than double.

3. Minor formatting tidying.

(riastradh)

2024-05-06 18:39:36 UTC MAIN commitmail json YAML

tests/lib/libc/stdlib/t_strtod: Spruce up and nix needless #ifdefs.

(riastradh)

2024-05-06 18:35:59 UTC MAIN commitmail json YAML

tests/lib/libm/t_modf: Use isinf(INFINITY) to detect inf support.

Apparently VAX defines the INFINITY macro even though it's not
actually an infinity and isinf returns zero for it.

(riastradh)

2024-05-06 18:08:49 UTC MAIN commitmail json YAML

Misc cosmetic changes for mostly readability.

- KNF and add some newlines per blocks
- define and use proper bintobcd() macro
- make local functions and variables static

The same uboot.lif binaries are generated.

(tsutsui)

2024-05-06 17:53:43 UTC MAIN commitmail json YAML

tests/lib/libc/gen/t_floatunditf: Nix __HAVE_LONG_DOUBLE conditional.

Conversion from uint64_t to long double should work on all ports,
including those where long double is the same as double, i.e., where
__HAVE_LONG_DOUBLE is undefined.

Instead, conditionalize the test cases on how many bits of precision
long double has in the significand, according to LDBL_MANT_DIG.  The
conditionals here should handle binary128, powerpc double-dekker
(~106-bit precision), x86 extended precision (80-bit), m68k extended
precision (80-bit), and VAX D (56-bit).

(riastradh)

2024-05-06 15:59:53 UTC MAIN commitmail json YAML

2024-05-06 15:53:46 UTC MAIN commitmail json YAML

tests/lib/libm/t_sincos: Nix __HAVE_LONG_DOUBLE conditionals.

sincosl is supposed to be there even if long double is double, as is
the case when __HAVE_LONG_DOUBLE is undefined.

(riastradh)

2024-05-06 15:52:53 UTC MAIN commitmail json YAML

2024-05-06 15:49:31 UTC MAIN commitmail json YAML

tests/lib/libm/t_scalbn: Nix __HAVE_LONG_DOUBLE conditionals.

If long double is the same as double, i.e., __HAVE_LONG_DOUBLE is
undefined, these tests should still pass, since they don't rely on
extra precision beyond double.

(riastradh)

2024-05-06 15:46:31 UTC MAIN commitmail json YAML

tests/lib/libm/t_precision: Nix __HAVE_LONG_DOUBLE conditionals.

long double and LDBL_EPSILON work even on architectures where long
double is the same as double, i.e., where the confusingly named
__HAVE_LONG_DOUBLE is not defined.

(riastradh)

2024-05-06 15:45:20 UTC MAIN commitmail json YAML

tests/lib/libm/t_cos: Fix comment about necessity of volatile.

(riastradh)

2024-05-06 15:44:08 UTC MAIN commitmail json YAML

tests/lib/libm/t_cos: Nix __HAVE_LONG_DOUBLE.

cosl should always be defined even on architectures where long double
is the same as double so the confusingly named __HAVE_LONG_DOUBLE is
not defined.

(riastradh)

2024-05-06 15:40:55 UTC MAIN commitmail json YAML

tests/lib/libm/t_cabsl: Nix __HAVE_LONG_DOUBLE conditionals.

__HAVE_LONG_DOUBLE just means long double is different from double.
This test should always pass on all ports, even if long double is the
same as double; it doesn't test any additional precision.

(riastradh)

2024-05-06 15:33:04 UTC MAIN commitmail json YAML

libm: Expose sinl, cosl, tanl on vax.

While here, make sin, cos, and tan be weak aliases for internal
symbols _sin, _cos, and _tan; likewise sinf, cosf, tanf.

PR 57881

(riastradh)

2024-05-06 14:38:29 UTC MAIN commitmail json YAML

tests/usr.bin/mtree/t_sets.sh: atf_fail, not atf_tc_fail

(riastradh)

2024-05-06 13:27:50 UTC MAIN commitmail json YAML

Fix "stray level 1 interrupt" panic by pressing keys during autoconf(9).

Also explicitly initialize sc->sc_status = HIL_STATUS_BUSY in hil_attach().

Previously hil_intr(9) returned immediately during 'cold', but
all interrupts are enabled at the end of configure() (actually
in MD cpu_configure()) and cold is cleared in confiugre2()
after configure(), so there is a small window when hil interrupts
can be triggered during cold.

It looks there is no problem to process hil_intr() before
hil_attach_deferre() is called via configure2() because
we already check 'sc->sc_status != HIL_STATUS_BUSY' on
processing a kthread.

Note this seems also to appease the similar panic on mame's hp9k370
emulation (though mame's emulation around DMAC looks still incomplete).

Should be pulled up to netbsd-10 and netbsd-9.

(tsutsui)

2024-05-06 12:11:03 UTC MAIN commitmail json YAML

tests/lib/libc/setjmp/t_sigstack: Add missing comment for 1.10.

PR lib/57946

(riastradh)

2024-05-06 08:43:37 UTC MAIN commitmail json YAML

use objcopy's --compress-debug-sections when creating debug files.

this reduces the size of the installed files by over half in most cases,
though the debug set size doesn't really change much (which looks like
close to 1GB of space on amd64 with xdebug installed, similar on arm64,
and about 600MB without xdebug.)

tested by running GDB on a few things, seems just as functional, on amd64,
arm64, and slightly on riscv64.

(first attempt for this feature used "gcc -gz=zlib", but that ends up
making CTF unhappy, but fortunately this works in binutils to create
the .debug files separate to any ctf usage of the main file.)

(mrg)

2024-05-06 08:38:51 UTC MAIN commitmail json YAML

2024-05-06 07:29:30 UTC MAIN commitmail json YAML

Improve the comment.

(skrll)

2024-05-06 07:18:19 UTC MAIN commitmail json YAML

Fix 32bit UVMHIST builds

(skrll)

2024-05-06 06:58:00 UTC MAIN commitmail json YAML

2024-05-06 06:57:32 UTC MAIN commitmail json YAML

arm longjmp: Restore stack first, then signal mask.

Otherwise, a pending signal may be delivered on the wrong stack when
we restore the signal mask.

While here:

- Move the botched sp and lr tests earlier.

PR lib/57946

(skrll)

2024-05-06 06:06:41 UTC MAIN commitmail json YAML

sprinkle rump, gcc=12 etc.
Now sparc64 with HAVE_GCC=12 and MKRUMP=no builds again

(macallan)

2024-05-06 05:27:46 UTC MAIN commitmail json YAML

mark libpam* as being part of pam.

(mrg)

2024-05-06 02:21:39 UTC MAIN commitmail json YAML

tests/lib/libm/t_modf: Check sign of modf on infinities too.

Normally I don't like CHECK(A && B) and favour CHECK(A); CHECK(B)
instead, so you can see which one failed, but in this case the inputs
are displayed anyway so we don't lose anything unless the
floating-point printer is broken.

(riastradh)

2024-05-06 00:54:02 UTC MAIN commitmail json YAML

tests/lib/libm/t_modf.c: Expand modf/modff/modfl tests.

1. Exercise more edge cases around the largest exponent that can
  represent non-integers.

2. - Verify modf can handle all cases modff can.
  - Veriy modf can handle some cases modff can't.
  - Verify modfl can handle all cases modf or modff can.
  - If long double isn't just double, verify modfl can handle some
    cases modf and modff can't.

3. Check infinities and NaN.

4. Verify oddness, i.e., modf(-x) = -modf(x).

5. Display more useful diagnostics in case any of this goes wrong.

(riastradh)

2024-05-05 23:08:53 UTC MAIN commitmail json YAML

tests/lib/libm/t_fe_round.c: Work around likely ia64 bug in gcc.

(riastradh)

2024-05-05 22:52:19 UTC MAIN commitmail json YAML

libm: long double is just double on hppa, so don't use s_rintl.c.

PR misc/58054

(riastradh)

2024-05-05 22:10:06 UTC MAIN commitmail json YAML

libm: If long double is double, nexttowardl is nextafter.

long double nexttowardl(long double, long double);
double nextafter(double, double);

(riastradh)

2024-05-05 15:26:20 UTC MAIN commitmail json YAML

makeinfo: Avoid ambiguous bracelessness.

/home/source/ab/HEAD-llvm/src/external/gpl2/texinfo/dist/makeinfo/index.c:526:5: error: add explicit braces to avoid dangling else [-Werror,-Wdangling-else]
    else if ((*elt1)->defining_line > (*elt2)->defining_line)
    ^
/home/source/ab/HEAD-llvm/src/external/gpl2/texinfo/dist/makeinfo/index.c:531:5: error: add explicit braces to avoid dangling else [-Werror,-Wdangling-else]
    else if ((*elt1)->entry_number > (*elt2)->entry_number)
    ^

(riastradh)

2024-05-05 15:25:31 UTC MAIN commitmail json YAML

mesa: Build with -Wno-error=typedef-redefinition.

While here, use CWARNFLAGS.clang instead of an explicit conditional.

In file included from 110_blorp_exec.c:33:
In file included from /home/source/ab/HEAD-llvm/xsrc/external/mit/MesaLib/dist/src/intel/blorp/blorp_genX_exec.h:27:
In file included from /home/source/ab/HEAD-llvm/xsrc/external/mit/MesaLib/dist/src/intel/blorp/blorp_priv.h:30:
/home/source/ab/HEAD-llvm/xsrc/external/mit/MesaLib/dist/src/compiler/nir/nir.h:3840:3: error: redefinition of typedef 'nir_shader' is a C11 feature [-Werror,-Wtypedef-redefinition]
} nir_shader;
  ^
/home/source/ab/HEAD-llvm/xsrc/external/mit/MesaLib/dist/src/intel/compiler/brw_compiler.h:41:27: note: previous definition is here
typedef struct nir_shader nir_shader;
                          ^

(riastradh)

2024-05-05 15:18:10 UTC MAIN commitmail json YAML

aarch64/sljit_machdep.h: Make this work in compat32 context.

Should fix clang build of compat32 eabi libsljit:

dependall ===> compat/arm/eabi/../../../lib/../external/bsd/sljit/lib
In file included from /home/source/ab/HEAD-llvm/src/sys/external/bsd/sljit/dist/sljit_src/sljitLir.c:1678:
/home/source/ab/HEAD-llvm/src/sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_64.c:142:54: error: shift count >= width of type [-Werror,-Wshift-count-overflow]
        FAIL_IF(push_inst(compiler, MOVK | RD(dst) | (((imm >> 32) & 0xffff) << 5) | (2 << 21)));
                                                            ^  ~~

(riastradh)

2024-05-05 14:53:22 UTC MAIN commitmail json YAML

libm: No s_rintl.c on mips32.

This is only for machines where long double is not double.

Not 100% sure this is the right criterion, but there's a good chance
it is.

(riastradh)

2024-05-05 14:34:58 UTC MAIN commitmail json YAML

tests/lib/libm/t_next: Fix stub on VAX.

Tested building the wrong tree, oops.

(riastradh)

2024-05-05 14:29:38 UTC MAIN commitmail json YAML

tests/lib/libm/t_next: Disable this test on VAX.

But leave a replacement xfail test that fails unconditionally, to
leave a reminder in the tests of PR 57881: vax libm is missing
various symbols.

(riastradh)

2024-05-05 14:06:47 UTC MAIN commitmail json YAML

libm/s_nexttowardf.c: Handle __HAVE_LONG_DOUBLE, LDBL_IMPLICIT_NBIT.

We should arrange to just have LDBL_NBIT unconditionally defined in the
appropriate MD header file, and make LDBL_IMPLICIT_NBIT an alias for
LDBL_NBIT==0.  But for now this will do.

(riastradh)

2024-05-05 11:38:03 UTC MAIN commitmail json YAML

libm: Make s_nexttowardf.c work when long double is double.

Seems likely that there are other parts of libm which would benefit
from being defined unconditionally in terms of ieee_ext_u, with
ieee_ext_u as an alias for ieee_double_u, in this scenario.  But I
haven't gone looking yet.

(riastradh)

2024-05-05 11:07:49 UTC MAIN commitmail json YAML

libm: long double is just double on arm, so don't use s_rintl.c.

PR misc/58054

(riastradh)

2024-05-05 07:36:38 UTC MAIN commitmail json YAML

Fix integer overflow of strtol(3) for "loadpoint" address on ILP32 hosts.

This strtol(3) was introduced in rev 1.12 for PR/57909 after netbsd-10,
but it returns LONG_MAX (0x7FFFFFFF) for 0xFFF00000 on ILP32 hosts and
the wrong loadpoint causes "NOT ENOUGH MEMORY" error by the BOOTROMs
on loading uboot.lif on (at least) my 9000/360 and 9000/425t.

(tsutsui)

2024-05-05 02:53:02 UTC MAIN commitmail json YAML

tests/lib/libm: Test nextafter/nexttoward and variants.

The tests are fairly trivial but should work without any conditionals
about floating-point formats.

(riastradh)

2024-05-05 02:50:11 UTC MAIN commitmail json YAML

2024-05-04 20:24:37 UTC MAIN commitmail json YAML

tests/usr.bin/mtree: Fail gracefully with unknown sets.

Rather than `bogus test program', make a test fail.

PR misc/57877

(riastradh)

2024-05-04 19:21:51 UTC MAIN commitmail json YAML

s_rintl.c: Reduce FreeBSD diff and fix on ld128 platforms.

EXT_FRACBITS, the number of bits in the _binary encoding_ that stores
the trailing significand field, is never 113.  In IEEE 754 binary128,
it is 112, even though there are 113 bits of precision in the set of
floating-point numbers -- the leading 1 bit is implicit in binary128.
So ld128 platforms like aarch64 and sparc64 were skipping the real
definition and just defining rintl as an alias for rint, which is
wrong.

In contrast, LDBL_MANT_DIG, the number of bits of precision in the set
of floating-point numbers (p, in IEEE 754 parlance), is 113 in IEEE 754
binary128.  This is also the constant used in FreeBSD libm anyway.  So
let's just use that instead of trying to translate it to our private
EXT_FRACBITS (not defined in FreeBSD) with a fencepos terror.  And
delete the buggy rintl=rint alias.

PR lib/58054

(riastradh)

2024-05-04 19:16:23 UTC MAIN commitmail json YAML

add the catman pages to the set for mkcsmapper and mkesdb

(reed)

2024-05-04 19:10:05 UTC MAIN commitmail json YAML

2024-05-04 18:22:59 UTC MAIN commitmail json YAML

ctfmerge: obey CTFMERGE_TERMINATE_NO_UNLINK as a tool too

(uwe)

2024-05-04 18:20:44 UTC MAIN commitmail json YAML

2024-05-04 17:58:24 UTC MAIN commitmail json YAML

radixtree: allocate memory with KM_NOSLEEP to prevent pagedaemon hangs

Revert the part of rev 1.32 (reapplying "Do away with separate pool_cache
for some kernel objects") that changed the memory allocation for radixtree
nodes from PR_NOWAIT to KM_SLEEP as part of changing from a pool to kmem.
uvm_pageinsert_tree() calls into the radixtree code while holding
the object's vmobjlock, but that same lock is taken by the pagedaemon
in the process of reclaiming pages, and if the pagedaemon happens to
choose the same object to reclaim from that uvm_pageinsert_tree()
is being called on, then these two threads will deadlock.
The previous code already handled memory allocation failures
in uvm_pageinsert_tree() so we can simply change it back to nosleep.

Fixes a hang reported by simonb@, and the fix was also tested by him.

(chs)

2024-05-04 16:57:15 UTC MAIN commitmail json YAML

Note about recent hp300 topcat(4) framebuffer improvements.

(tsutsui)

2024-05-04 16:06:57 UTC MAIN commitmail json YAML

Add comments about quirks of 98542/98543 framebuffers with 1024x400 pixels.

(tsutsui)

2024-05-04 14:48:28 UTC MAIN commitmail json YAML

Remove magic numbers. NFCI.

(skrll)

2024-05-04 13:45:10 UTC MAIN commitmail json YAML

Don't panic on NULL pointer dereference when done by copyin, ...

(mlelstv)

2024-05-04 13:33:18 UTC MAIN commitmail json YAML

Account for trailing NUL bytes when calculating userland buffer size.

(mlelstv)

2024-05-04 13:29:41 UTC MAIN commitmail json YAML

Bail if increment is too small for the precision to avoid an infinite loop.

(mlelstv)

2024-05-04 13:18:06 UTC MAIN commitmail json YAML

PR/58233: RVP: Fix lzip dictionary size calculation

(christos)

2024-05-04 13:17:03 UTC MAIN commitmail json YAML

PR/58223: RVP: Don't write to stdout when testing.

(christos)

2024-05-04 13:11:41 UTC MAIN commitmail json YAML

Document environment variable use.

(christos)

2024-05-04 12:49:16 UTC MAIN commitmail json YAML

Use device_printf instead of autoconf messages for errors.

(mlelstv)

2024-05-04 12:45:14 UTC MAIN commitmail json YAML

Make usb address and hub topology available to drvctl.

(mlelstv)

2024-05-04 12:43:36 UTC MAIN commitmail json YAML

makecontext: correct the type to setup register based arguments.

Use __greg_t rather than int for register based arguments. This fixes
various atf tests.

(skrll)

2024-05-04 12:42:09 UTC MAIN commitmail json YAML

Fix the __greg_t typedef for riscv32

(skrll)

2024-05-04 12:41:03 UTC MAIN commitmail json YAML

Use device_printf instead of autoconf messages for errors.

(mlelstv)

2024-05-04 09:37:39 UTC MAIN commitmail json YAML

recent changes

(nia)

2024-05-04 07:04:24 UTC MAIN commitmail json YAML

2024-05-04 06:52:17 UTC MAIN commitmail json YAML

lint: increase debug logging for declarations

All changes to the global variable 'dcs' are tracked now, to help
identify the cause of the failing tests in expr_sizeof and
gcc_attribute_aligned.

While here, test more invalid type combinations in typedefs.

(rillig)

2024-05-04 05:50:49 UTC MAIN commitmail json YAML

mktemp.3: mkdtemp is no longer nonstandard

Reported by Aleksey Cheusov on tech-userlevel.

(rillig)

2024-05-04 05:49:39 UTC MAIN commitmail json YAML

From genfs_rename.c:

        * XXX Want a better equality test.  `tcnp->cn_cred == cred'
        * hoses p2k because puffs transmits the creds separately and
        * allocates distinct but equivalent structures for them.

Fixes rename crash in rump_msdos.

(mlelstv)

2024-05-04 02:21:49 UTC MAIN commitmail json YAML

Add a device tree for the Red Pitaya SDRlab 122-16.

To boot NetBSD on the 122-16, copy the .dtb built from
zynq-red-pitays-122-16.dts, the first-stage bootloader (called
boot.bin) and U-Boot that came with the 122-16 and a kernel image,
netbsd.ub, built for earmv7hf to an MS-DOS partition on an
MBR-partitioned SD card.  At the U-Boot prompt, "Zynq> ", type these
commands:

i2c dev 0
eeprom read 0 0x50 0 0x1804 0x400
env import -b 0 0x400 hw_rev serial ethaddr
setenv bootargs "root=ld0a"
fatload mmc 0 0x01f00000 device~1.dtb
fatload mmc 0 0x02000000 netbsd.ub
fdt addr 0x01f00000
fdt set /axi/ethernet@e000b000 local-mac-address $ethaddr
bootm 0x02000000 - 0x01f00000

Note that the ethernet PHY will not attach unless you have applied
the patches from Lloyd Parkes in kern/58083.

(dyoung)

2024-05-04 02:04:55 UTC MAIN commitmail json YAML

Initialize `struct consdev` members cn_dev and cn_pri like other
UART drivers do.  If cn_dev is 0 instead of NODEV, then the kernel
may redirect console writes to major 0, minor 0, which is /dev/mem.
On my Zynq board the kernel overwrote the page free list with a
console message in this way.

(dyoung)

2024-05-04 00:41:06 UTC MAIN commitmail json YAML

Add dhcpcd to riscv ramdisk, etc.

Be consistent with configs for pretty much every other (modern) arch
and provide dhcpcd, lest someone end up using this image and then be
surprised (as happened relatively recently with evbmips images). This
means of course we also need bpf.

While here, add a few wedge devices, too. This aligns us with the
device definitions evbmips uses (that appears to be where the riscv
Makefile was copied from back in 2015).

(gutteridge)

2024-05-03 21:40:52 UTC MAIN commitmail json YAML

tests/lib/libm/t_fe_round.c: Expand nearbyint/rint tests.

PR lib/58054

(riastradh)

2024-05-03 21:38:15 UTC MAIN commitmail json YAML

2024-05-03 20:48:59 UTC MAIN commitmail json YAML

Allow DHCPv6 so that dhcpcd(8) does not complain at boot when using
ia_pd option.

(nakayama)

2024-05-03 19:16:13 UTC MAIN commitmail json YAML

tests/lint: fix supposedly platform-independent type definitions

No idea where I got the previous type definitions from.  The typedef
names looked just too convincing to actually check the underlying types.

(rillig)

2024-05-03 15:50:42 UTC MAIN commitmail json YAML

add an environment variable to override the number ot threads.

(christos)

2024-05-03 15:39:50 UTC MAIN commitmail json YAML

Fix build as a tool (Jan-Benedict Glaw)

(christos)

2024-05-03 15:32:37 UTC MAIN commitmail json YAML

tests/lint: skip test for sizeof struct on 32-bit platforms

Even though the test only uses fixed-size types, lint's computed size of
the resulting struct differs between i386 (80) and x86_64 (112).  Both
are wrong, probably due to the unrelated struct declaration above, as
already mentioned in the comments.

(rillig)

2024-05-03 09:00:59 UTC MAIN commitmail json YAML

update ports roadmap

(nia)

2024-05-03 07:24:31 UTC MAIN commitmail json YAML

Small simplification. NFCI.

(skrll)

2024-05-03 07:11:14 UTC MAIN commitmail json YAML

Use the _X_FOO register macros instead of magic numbers.

(skrll)

2024-05-03 07:09:20 UTC MAIN commitmail json YAML

2024-05-03 07:06:18 UTC MAIN commitmail json YAML

2024-05-03 07:00:14 UTC MAIN commitmail json YAML

Remove references to RISC-V.

(skrll)

2024-05-03 04:04:18 UTC MAIN commitmail json YAML

lint: measure the alignment in bytes, not bits

While measuring the alignment in bits makes sense when building a struct
type with bit-fields, in all other places it is more confusing than
helpful.

The only visible change is that in debug mode, the format of type sizes
and alignment changed.  Since the size of all complete types is a
multiple of a byte (as defined in the C standard), sizes and alignments
are reported in bytes as well.  Only while a struct is being built, the
type size may include an additional '+x' for the bits of a bit-field.

(rillig)

2024-05-02 20:03:33 UTC MAIN commitmail json YAML

tests/lint: demonstrate wrong struct size calculation

(rillig)

2024-05-02 18:34:01 UTC MAIN commitmail json YAML

parsedate.3: resolve contradictory values for 'next'

(rillig)

2024-05-02 18:18:17 UTC MAIN commitmail json YAML

risc-v: fix the error code when uvm_fault fails with cpu_set_onfault

Return the error from uvm_fault instead of EFAULT unconditionally when
faulting with cpu_set_onfault to fix several atf tests.

(skrll)

2024-05-02 16:52:08 UTC MAIN commitmail json YAML

tests/lib/libm/t_fe_round: Fix a missed cast.

Need long long or intmax_t, not long, on LP32.

PR lib/58054

(riastradh)

2024-05-02 16:51:55 UTC MAIN commitmail json YAML

tests/lib/libm/t_fe_round: Tidy up nearbyintl, sync nearbyint test.

PR lib/58054

(riastradh)

2024-05-02 15:45:36 UTC MAIN commitmail json YAML

comment out strict boolean lint check because isspace() returns int and lint
complains.

(christos)

2024-05-02 14:19:56 UTC MAIN commitmail json YAML

2024-05-02 11:55:49 UTC MAIN commitmail json YAML

tests/lib/libm/t_fe_round.c: Simplify previous.

There is never any need to write casts to type T in integer constant
initializers for type T.

PR lib/58054

(riastradh)

2024-05-02 03:30:07 UTC MAIN commitmail json YAML

Use intmax_t instead of long int when trying to represent very large
integers (10^50 or so), so we don't exceed the capacity of systems where
long int is only 32 bits.

Hopefully will unbreak the i386 build, perhaps others.

(kre)

2024-05-02 00:01:48 UTC MAIN commitmail json YAML

tests/lib/libm/t_fe_round: Test nearbyintl.

This uses inputs that can't be distinguished with only 53 bits of
precision, so it should work in essentially all long double formats
to detect when nearbyintl is incorrectly implemented in terms of
nearbyint.

PR lib/58054

(riastradh)

2024-05-02 00:00:47 UTC MAIN commitmail json YAML

tests/lib/libm/t_fe_round: Tidy up nearbyint test.

Prompted by PR lib/58054.

(riastradh)

2024-05-01 21:34:48 UTC MAIN commitmail json YAML

2024-05-01 19:59:08 UTC MAIN commitmail json YAML

next should increement by 1 not 2.

(christos)

2024-05-01 19:40:56 UTC MAIN commitmail json YAML

Add 98542 and 98543 framebuffers to supported "Graphics Devices" section.

I hope someone will sync a list of supported devices in port wiki pages
with one in this installation notes.

(tsutsui)

2024-05-01 19:34:19 UTC MAIN commitmail json YAML

Note that 98542 and 98543 variants are also supported by topcat(4).

(tsutsui)

2024-05-01 19:28:33 UTC MAIN commitmail json YAML

Fix topcat(4) problems on some models that cause garbages on screen.

- Make sure that windowmove (hardware BITBLT) ops complete by checking
  tc_busywait() before calling putchar functions by MI rasops(9).
  It looks CPU accesses against VRAM during windowmove (copy, erase,
  and cursor) ops causes unexpected garbages at least on 98543 on HP360,
  98547 on HP370, and also on 98543 on 040 HP380 (but not on 98549).

- Handle 'sparse VRAM' on 98543 (and probably 98542) properly:
- Prepare and use own topcat_putchar1_4() function for sparse VRAM.
- Pass proper 'VRAM width' rather than actuall font width to all
  windowmove (copycols, erasecols, copyrows, eraserows, and do_cursor)
  operation functions.

Now all topcat(4) consoles on 98543 on HP360/HP380 and 98547 on HP370
work fine, and no visible regression on 98549 on HP380 and 98544 on HP360.

Worth to pullup netbsd-10.

(tsutsui)

2024-05-01 19:11:46 UTC MAIN commitmail json YAML

s/Diffrential/Differential/ in comment.

(andvar)

2024-05-01 18:38:15 UTC MAIN commitmail json YAML

2024-05-01 17:42:58 UTC MAIN commitmail json YAML

lint: make 'offsetof(t, array-member)' a constant expression

The macro 'offsetof(t, m)' already expanded to a constant expression for
scalar members but not for arrays.  This was because the macro expanded
to '(size_t)(((t *)0)->m)', which lint internally represents as
'addr(indir(ptr(0) + offset(m)))', and build_address simplifies
'addr(indir(x))' to 'x' if the types match.  The types only match for
scalar types though, but not for arrays.

When build_address happens, the type information is incomplete,
therefore 'offsetof(t, array)' has to be simplified at a later point.

(rillig)

2024-05-01 16:28:33 UTC MAIN commitmail json YAML

Make eisa_machdep build without NIOAPIC > 0 by extracting irq definition.

(andvar)

2024-05-01 14:52:01 UTC MAIN commitmail json YAML

2024-05-01 12:36:56 UTC MAIN commitmail json YAML

tests/lint: test large enum constants and offsetof with array members

(rillig)

2024-05-01 11:40:25 UTC MAIN commitmail json YAML

Increase the estimate of disk space required for the test, as the old
estimate recently proved too optimistic on the amd64 testbed on b4.

(gson)

2024-05-01 11:32:29 UTC MAIN commitmail json YAML

Enable compat sigreturn system call.

(mlelstv)

2024-05-01 11:22:06 UTC MAIN commitmail json YAML

Fix typos (nerwork->network, exepense->expense).

(andvar)

2024-05-01 10:30:56 UTC MAIN commitmail json YAML

lint: fix size of struct with large alignment

Lint now successfully passes all compile-time assertions in the amd64
kernel that deal with struct sizes.

(rillig)

2024-05-01 08:58:34 UTC MAIN commitmail json YAML

Add DELAY(9) to make palette register settings stable on 98543 in HP360.

Note 98547 (6 bpp variant) on HP370 (68030 33MHz) doesn't need these
DELAYs so maybe only some old variants (98543 and 98545?) on 020/030
have such restriction (actually only one nop seems enough.)

(tsutsui)

2024-05-01 07:43:42 UTC MAIN commitmail json YAML

sys/cdefs.h: pass __aligned to lint

Lint could parse _Alignas and __attribute__((__aligned__(4))) previously
but simply ignored them. Since today, they affect the layout of struct
and union.

(rillig)

2024-05-01 07:40:11 UTC MAIN commitmail json YAML

2024-05-01 07:22:43 UTC MAIN commitmail json YAML

Revert previous, the syscall needs to be enabled at runtime.

The compat_16 module just enables it for the "netbsd" emulation, but
nothing enables it yet for "netbsd32".

(mlelstv)

2024-05-01 05:49:33 UTC MAIN commitmail json YAML

lint: fix warning about out-of-bounds bit-field value

(rillig)

2024-05-01 05:38:11 UTC MAIN commitmail json YAML

lint: demonstrate wrong warning about out-of-range bit-field

(rillig)

2024-05-01 02:16:15 UTC MAIN commitmail json YAML

etc.evbppc/MAKEDEV.conf: drop unused block and fix comment

(gutteridge)

2024-04-30 19:35:29 UTC MAIN commitmail json YAML

viac7temp(4): rewrite temperature sensor to read value from MSR instead of using
documented cpuid instruction and eax register.

This approach is adapted from linux via-cputemp.c, no official documentation is
currently available. However, msr value seems to work on all tested CPUs while
documented cpuid instruction typically reports 0, even for my C7-D CPU.
msr value seems to have temperature in Celsius in lower 24-bits without fraction
(thus "msr & 0xffffff;" is used).

Tested on my personal systems based on CPUs below (i386 and amd64):
C7-D 1.6GHz (i386 only), Nano X2 L4350E, Nano X2 U4300, U2300 Nano, KX-U6580.
Also got one response via email which was based on Nano X2 L4050 (VE-900).
Nano reports independent values for each core.
KX-U6580 seems to show the same value for all cores but more testing is needed.

Since it works on amd64 capable CPUs, adding driver to GENERIC kernel config.
Also moving viac7temp man page to x86 instead of i386 (with updates).
In theory the change should add support for all VIA Nano CPUs and Zhaoxin CPUs
at least up to KX-6000(G) series.

In the future I may need to introduce amd64 kernel module as well.

Plan to pullup to at least netbsd-10.

Patch mainly reviewed by riastradh.

(andvar)

2024-04-30 18:34:19 UTC MAIN commitmail json YAML

2024-04-30 17:10:22 UTC MAIN commitmail json YAML

Enable compat sigreturn system call.

The previous bug in netbsd32___sigaction_sigtramp hid the problem,
as it failed all but the first installation of a signal handler.

(mlelstv)