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-10 (30d)  netbsd-9 (30d)  netbsd-8 (35d) 

2024-06-16 01:32:16 UTC Now

2024-06-14 13:19:35 UTC MAIN commitmail json YAML

2024-06-12 19:12:44 UTC MAIN commitmail json YAML

arch/sparc64/dev/dsk.c: Nix trailing whitespace.

No functional change intended.

(riastradh)

2024-06-12 18:16:48 UTC MAIN commitmail json YAML

base32/ad.mipsn64eb: Nix stray backtick on n32/libarchive.so.5.1 line.

(riastradh)

2024-06-12 16:51:54 UTC MAIN commitmail json YAML

ld@virtio(4): Fix maximum size parameters.

- SEG_MAX is the maximum number of segments.
- SIZE_MAX is the maximum number of bytes in a single segment.

The maximum transfer size is, therefore, SEG_MAX * SIZE_MAX.

=> Don't add two extra segments in the dmamap vr_payload for the
  header and status -- we already have a separate dmamap vr_cmdsts
  for that.

=> Don't recalculate payload dmamap parameters based on division by
  NBPG, just use the ones specified by the host.

=> Allow SIZE_MAX below MAXPHYS as long as SIZE_MAX*SEG_MAX >=
  MAXPHYS.

Even though ldattach clamps ld->sc_maxxfer to MAXPHYS, make sure to
clamp it in ld_virtio_attach before ld_virtio_alloc_reqs since it
determines the dmamap sizes and bounce buffer allocation and there's
no sense in allocating those larger than ld will use anyway.

PR kern/58338

(riastradh)

2024-06-11 17:21:58 UTC MAIN commitmail json YAML

doc/3RDPARTY: Fix licence and remind path change in OpenSSL entry.

(riastradh)

2024-06-10 12:49:30 UTC MAIN commitmail json YAML

libm: Fix arm expected symbol list harder.

LIB is not defined by the time we need it in the m.expsym rule, so
just say m here like in the other lines.

(riastradh)

2024-06-10 12:47:40 UTC MAIN commitmail json YAML

libm: Fix mips and arm expected symbol lists.

Had forgotten that they were overriding LIB_EXPSYM.  Use a new
intermediate variable EXPSYM_SRC_MD for that.

(riastradh)

2024-06-09 23:58:23 UTC MAIN commitmail json YAML

libarchive test_write_disk_secure.c: Restore hunk of local change.

This was part of a change added in revision 1.4 in order to avoid
cluttering /tmp (PR 55612), and lost in the 3.7.4 merge:

https://mail-index.netbsd.org/source-changes/2020/08/28/msg121149.html

(riastradh)

2024-06-09 22:35:47 UTC MAIN commitmail json YAML

arm/asm.h: Respect NETBSD_REVISIONID.

(riastradh)

2024-06-09 22:35:37 UTC MAIN commitmail json YAML

alpha/asm.h: Respect _NETBSD_REVISIONID.

(riastradh)

2024-06-09 22:35:28 UTC MAIN commitmail json YAML

i386/asm.h: Respect _NETBSD_REVISIONID.

(riastradh)

2024-06-09 22:35:17 UTC MAIN commitmail json YAML

amd64/asm.h: Respect _NETBSD_REVISIONID.

(riastradh)

2024-06-09 20:07:33 UTC MAIN commitmail json YAML

x86/cpu_rng: Fix false alarm rate of CPU RNG health test.

Lower it from 1/2^32 (about one in four billion) to 1/2^256
(approximately not gonna happen squared).

PR port-amd64/58122

(riastradh)

2024-06-09 16:53:25 UTC MAIN commitmail json YAML

tests/lib/libm/t_pow: Revamp.

1. Avoid the broken idiom

if (condition) {
atf_tc_expect_fail(...);
atf_tc_fail(...);
}

2. Sprinkle volatile and ATF_CHECK_MSG.

(riastradh)

2024-06-09 16:53:12 UTC MAIN commitmail json YAML

tests/lib/libm: Fix various xfails related to PR lib/45362.

Writing

if (condition) {
atf_tc_expect_fail(...);
atf_tc_fail(...);
}

in order to paper over a bug in qemu renders the test nearly useless
because it will never actually fail in the event that something
unexpected is broken.

atf_tc_expect_fail only makes senes _before_ doing the test.  If we
want to paper over a bug in qemu, we can do:

if (isQEMU)
atf_tc_expect_fail("qemu is broken, PR lib/...");
ATF_CHECK(condition);

That way, we are still doing the test in non-qemu circumstances, and
if the qemu bug is fixed the test will give the feedback of an
unexpected pass.

While here: Use `volatile double x = ...' as input so the compiler
doesn't optimize calls like sin(x) away at build-time, and print the
bad values with ATF_CHECK_MSG on failure in case anything goes wrong.

(riastradh)

2024-06-09 14:10:06 UTC MAIN commitmail json YAML

2024-06-09 14:09:27 UTC MAIN commitmail json YAML

libm: Define lgamma_r, lgammal, lgammal_r on non-IEEE754.

Missing internal aliases _lgamma_r and _lgammal_r -- TBD.

PR 57881

(riastradh)

2024-06-09 13:35:38 UTC MAIN commitmail json YAML

2024-06-09 13:33:36 UTC MAIN commitmail json YAML

2024-06-09 13:33:11 UTC MAIN commitmail json YAML

libm/src/namespace.h: Delete duplicates.

No functional change intended.

(riastradh)

2024-06-09 13:33:03 UTC MAIN commitmail json YAML

libm/src/namespace.h: Sort.

No functional change intended.

Grouping vaguely by functionality makes this painful to update.

(riastradh)

2024-06-07 20:50:27 UTC MAIN commitmail json YAML

lib/libc/compiler_rt/Makefile.inc: Sort LINTFLAGS lines.

No functional change intended.

(riastradh)

2024-06-07 20:50:13 UTC MAIN commitmail json YAML

2024-06-07 13:53:23 UTC MAIN commitmail json YAML

libc/locale: Nix needless size_t casts.

No functional change intended.  No binary change to aarch64 libc.

Prompted by code inspection around PR lib/58319.

(riastradh)

2024-06-07 13:53:12 UTC MAIN commitmail json YAML

libc/locale: Nix needless char casts.

These appear to have been added to pacify a spurious warning by lint,
which no longer warns about it anyway.

No functional change intended.  No binary change to aarch64 libc.

Prompted by code inspection around PR lib/58319.

(riastradh)

2024-06-07 13:53:02 UTC MAIN commitmail json YAML

libc/locale/global_locale.c: Nix confusing NBCHAR_MAX.

NBCHAR_MAX is used only in the usr.bin/mklocale build, but that
doesn't use global_locale.c.  This was added when inserting char
casts, but using the mklocale's hook just to insert a char cast is
unnecessarily confusing -- and the char casts are unnecessary anyway.

No functional change intended.  No binary change to aarch64 libc.

Raised in PR lib/58319.

(riastradh)

2024-06-05 16:37:44 UTC MAIN commitmail json YAML

ramdisk-zfsroot: Only enable if zfs is enabled.

PR port-amd64/58316
PR port-amd64/57948 (followup pullup)

(riastradh)

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

Mesa: Build u_format_unpack_neon.c with -mfpu=neon on clang arm32.

Attempting to address this failure in the clang build, without
breaking anything that's not clang and not arm32:

In file included from /home/source/ab/HEAD-llvm/xsrc/external/mit/MesaLib/dist/src/util/format/u_format_unpack_neon.c:35:
/home/builds/ab/HEAD-llvm/evbarm-earmv6hf/202406041020Z-obj/home/source/ab/HEAD-llvm/src/external/apache2/llvm/include/arm_neon.h:32:2: error: "NEON support not enabled"
#error "NEON support not enabled"
^

(riastradh)

2024-06-05 14:16:31 UTC MAIN commitmail json YAML

Fix some more aarch64 compat set list issues.

- libc_vfp, which implements the arm32 softfloat ABI in terms of CPU
  hardfloat instructions instead of emulation through CPU integer
  instructions, is always built for eabi, never built for eabihf.
  => aarch64 doesn't have a softfloat ABI, so making it conditional
    on softfloat doesn't make sense.
  => eabi is always a softfloat ABI, so this is always built for
    compat eabi.
  => eabihf is always a hardfloat ABI, so this is never built for
    compat eabihf.

- libc++ needs to be there but conditional on libcxx.

- libproc needs to be there but conditional on dtrace.

(riastradh)

2024-06-04 21:43:39 UTC MAIN commitmail json YAML

nouveau_nvkm_subdev_instmem_gk20a.c: Use BUS_DMA_PREFETCHABLE.

Matches Linux's pgprot_writecombine.

Unclear where the appropriate bus_dmamap_sync happens, or is supposed
to happen -- not using it would be wrong, but asking for a
prefetchable mapping may paper over symptoms, at least!

(riastradh)

2024-06-04 21:43:13 UTC MAIN commitmail json YAML

bus_dma(9): Document BUS_DMA_PREFETCHABLE.

Like BUS_DMA_NOCACHE.  Doesn't absolve you of the need for
bus_dmamap_sync, but if you later pass the vaddr to bus_dmamap_load,
the DMA map might notice the mapping is write-combining and use this
to make bus_dmamap_sync cheaper.

PR kern/58309

(riastradh)

2024-06-04 21:42:58 UTC MAIN commitmail json YAML

x86: Teach bus_dmamem_map about BUS_DMA_PREFETCHABLE.

PR port-amd64/58308

(riastradh)

2024-06-04 21:42:40 UTC MAIN commitmail json YAML

i915_gem_mman.c: Apply mmap types via pmap flags.

This way, userland gets buffers mapped write-combining or uncached as
needed.

PR xsrc/58307

(riastradh)

2024-06-04 20:43:58 UTC MAIN commitmail json YAML

mips/bus_dma.c: KNF

No functional change intended.

(riastradh)

2024-06-03 18:47:23 UTC MAIN commitmail json YAML

2024-05-30 23:00:39 UTC MAIN commitmail json YAML

nd_timer: Update la_numheld when we clear la_hold (a.k.a. ln_hold).

Followup for PR kern/58297 fix.  Patch by mlelstv@.

PR kern/58301

(riastradh)

2024-05-29 02:06:46 UTC MAIN commitmail json YAML

New make(1) variable NETBSD_REVISIONID in the NetBSD build.

This is intended to be a tree-wide revision identifier, like a commit
hash or similar.  This way, in builds from non-CVS trees where
per-file $NetBSD$ revision ids aren't incremented, we can still track
some version provenance of files with ident(1).

If defined, bsd.own.mk adds a macro _NETBSD_REVISIONID to CPPFLAGS
with the stringified text of NETBSD_REVISIONID.

In turn, if _NETBSD_REVISIONID is defined in sys/cdefs.h, then
__RCSID will put the concatenation of:
- `$NetBSD: '
- the file name
- ` '
- _NETBSD_REVISIONID
- ` $'
alongside the per-file revision id passed as an argument to __RCSID.

Since this is passed through command-line arguments, it doesn't cause
make to consider any dependencies to change when the revision id
changes -- so incremental builds remain incremental.  And if you
don't set it, nothing changes from the __RCSID we had before.

Currently nothing sets NETBSD_REVISIONID automatically yet -- subject
to experimentation.  Could just be verbatim commit hash, or could be
longer `hg identify' output -- or, in git, with the help of tags,
could be `git describe --dirty' output like

10.99.10-2924-gd01834fb75de

(or `10.99.10-2924-gd01834fb75de-dirty' if the working tree is dirty)
for the commit at
https://mail-index.netbsd.org/source-changes/2024/05/24/msg151526.html
which is 2924 linear commits after the commit bumping sys/param.h to
10.99.10 and (in the current git conversion) had commit hash starting
with d01834fb75de.  This may require some discipline around branching
and tagging but it's worth a shot -- we'll see.

Based on a patch from joerg@ a while ago.

(riastradh)

2024-05-28 22:15:22 UTC MAIN commitmail json YAML

nd_resolve: Maintain la_numheld.

Otherwise lltable_drop_entry_queue never drops anything.

Addresses mbuf leak, PR kern/58297.

(riastradh)

2024-05-25 13:44:48 UTC MAIN commitmail json YAML

ucontext.h: Expose __UCONTEXT_SIZE to userland.

But don't expose __CTASSERT(__UCONTEXT_SIZE == sizeof(ucontext_t)) to
userland.

- __UCONTEXT_SIZE will be needed soon by libc and signal trampolines
  in order to version ucontext so we can safely expand it with
  architecture extensions.

- __CTASSERT is not safe to use in header files in arbitrary
  compilation environments (although in the NetBSD kernel build it is
  safe).  Exposing the __CTASSERT in a header file used by userland
  appears to have the side effect of breaking the Firefox build in
  rustc, though the mechanism isn't entirely clear.

Firefox/rustc discussion here:
https://mail-index.netbsd.org/pkgsrc-users/2024/05/18/msg039578.html

Let's see if this makes a difference -- if it works, great; if not,
maybe it will help us to narrow down what's happening with rustc and
Firefox.

(riastradh)

2024-05-22 15:59:25 UTC MAIN commitmail json YAML

linux_xa: Delete and replace collision in xa_store as intended.

Don't free the colliding node that's still in the tree.

Noted by rjs@.

(riastradh)

2024-05-22 15:59:12 UTC MAIN commitmail json YAML

drm_gem.c: Enable drm_gem_fence_array_add now that we emulate xa.

(riastradh)

2024-05-22 15:47:18 UTC MAIN commitmail json YAML

drm_gem.c: Fix sense of assertion.

This is the opposite of WARN_ON.

Noted by rjs@.

(riastradh)

2024-05-20 19:36:30 UTC MAIN commitmail json YAML

2024-05-20 19:15:49 UTC MAIN commitmail json YAML

Revert "pci: Pass cookie through pci_find_device, pci_enumerate_bus."

Evidently something is wrong with this, to be diagnosed and redone
once the builds and tests are in better shape.

(riastradh)

2024-05-20 13:34:13 UTC MAIN commitmail json YAML

sys/modules: Don't make compat_110.

Eventually we'll need this but it doesn't make sense until 11.0 is
released.

(riastradh)

2024-05-20 11:36:21 UTC MAIN commitmail json YAML

xhci(4): Narrow some more variable scopes in xhci_device_isoc_enter.

No functional change intended.

(riastradh)

2024-05-20 11:35:55 UTC MAIN commitmail json YAML

xhci(4): Narrow scope of variable.

Nix spurious initialization in wider scope.

No functional change intended.

(riastradh)

2024-05-20 11:35:37 UTC MAIN commitmail json YAML

xhci.c: Fix confusing line break.

No functionanl change intended.

(riastradh)

2024-05-20 11:35:11 UTC MAIN commitmail json YAML

drm: Fix missing bounds checks in dma buf mmap.

(riastradh)

2024-05-20 11:34:45 UTC MAIN commitmail json YAML

2024-05-20 11:34:19 UTC MAIN commitmail json YAML

pci: Pass cookie through pci_find_device, pci_enumerate_bus.

New functions pci_find_device1 and pci_enumerate_bus1 have the cookie
argument.  Existing symbols pci_find_device and pci_enumerate_bus are
now wrappers for the cookieless version.

This drops the symbol pci_probe_device, in favour of a new
pci_probe_device1 with the cookie argument.  But I don't think that
requires a revbump because it's only called by MD pci_enumerate_bus1
implementations, which don't live in modules anyway.

(riastradh)

2024-05-20 11:21:46 UTC MAIN commitmail json YAML

t_siginfo: More volatile to prevent optimization.

(riastradh)

2024-05-20 11:20:53 UTC MAIN commitmail json YAML

libstdc++: Don't try to fflush stdin.

It doesn't work.  It's undefined behaviour.  On NetBSD, it will fail
with EBADF, if fd 0 isn't open for write, or if fd 0 is open for
write, it will write heap garbage to fd 0.

  If stream points to an output stream or an update stream in which
  the most recent operation was not input, the fflush function causes
  any unwritten data for that stream to be delivered to the host
  environment to be written to the file; otherwise, the behavior is
  undefined.

  (ISO C11 and ISO C17, Sec. 7.21.5.2 `The fflush function')

PR lib/58206
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114879

(riastradh)

2024-05-19 17:36:08 UTC MAIN commitmail json YAML

linux: Add a few more cases to pci_get_class.

Should fix crash on boot with amdgpu now that the ACPI business is
enabled.

(riastradh)

2024-05-19 13:50:05 UTC MAIN commitmail json YAML

2024-05-19 13:28:28 UTC MAIN commitmail json YAML

ttm: Sync ttm_bo_uvm_fault_idle better with Linux.

PR xsrc/58133

(riastradh)

2024-05-17 02:11:07 UTC MAIN commitmail json YAML

riscv: Make feraiseexcept actually raise the given exceptions.

Doing

fexcept_t ex = 0;
fesetexceptflag(&ex, excepts);

has the effect of _clearing_ all the exceptions in excepts.  Using
fesetexceptflag doesn't make this easier, because we would have to
record which exceptions were already raised.  So just set the fflags
bits in the fcsr register directly.

(riastradh)

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

2024-05-16 00:56:11 UTC MAIN commitmail json YAML

riscv: Nix shifting around FRRM and FSRM in libc too.

These read and write the floating-point rounding mode directly, not
the whole floating-point control and status register.

(riastradh)

2024-05-15 13:12:04 UTC MAIN commitmail json YAML

usleep(3): Note the historical rake that was stepped upon.

PR 58184

(riastradh)

2024-05-15 00:02:57 UTC MAIN commitmail json YAML

modfl(3): Fix conversion from FreeBSD.

LDBL_MANL_SIZE is spelled EXT_FRACLBITS -- and not EXT_FRACHBITS.

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

(riastradh)

2024-05-14 16:10:54 UTC MAIN commitmail json YAML

t_siginfo: Use volatile to prevent optimization.

(riastradh)

2024-05-14 16:10:15 UTC MAIN commitmail json YAML

t_siginfo: No SIGFPE on RISC-V.

(riastradh)

2024-05-14 16:06:20 UTC MAIN commitmail json YAML

t_ptrace_wait: No FPU exception traps on RISC-V.

This macro is not named correctly -- RISC-V does implement
floating-point exceptions, but only via sticky status bits, not via
machine traps.

(riastradh)

2024-05-14 16:04:18 UTC MAIN commitmail json YAML

t_ptrace_wait: Force result by write to volatile, not call to usleep.

This is causing each FPE-related test to time out because it's
actually passinga large number to usleep, which now respects large
numbers.

(riastradh)

2024-05-14 15:54:16 UTC MAIN commitmail json YAML

tests/kernel/h_segv: Disable SIGFPE test on RISC-V.

No floating-point exception traps on RISC-V.

Also don't pass the result of divide-by-zero converted to integer to
usleep.  Although the floating-point result of divide-by-zero is
well-defined by IEEE 754 (+/-infinity), the outcome of C conversion
to integer is not.  And while on some architectures this might return
zero, on RISC-V it looks like it'll return all bits set.  And as of
PR 58184, usleep now honours sleeps longer than 1sec, which means
this will be waiting at least two billion microseconds, or about half
an hour...

So instead, just write the result to a volatile variable.

(riastradh)

2024-05-14 15:31:42 UTC MAIN commitmail json YAML

t_ilogb: Nix spurious line break in ATF_CHECK_MSG.

(riastradh)

2024-05-14 15:17:57 UTC MAIN commitmail json YAML

riscv: No volatile needed on asm to _read_ rounding mode, exceptions.

These instructions can be omitted if the return values are unused.
In contrast, _writes_ to the rounding mode or exceptions must not be
omitted (even if we ignore the return value, which is the old value
of the field).

I think "memory" is the wrong clobber on these asm blocks too; they
can't be reordered around _floating-point_ instructions, while
reordering around loads and stores is fine.  But I don't know how to
spell the right thing in gcclish.

(riastradh)

2024-05-14 15:16:51 UTC MAIN commitmail json YAML

riscv: Fix reading and writing frm and fflags.

The FRRM/FSRM and FRFLAGS/FSFLAGS instructions do all the masking and
shifting needed -- __SHIFTIN/__SHIFTOUT is wrong.

(riastradh)

2024-05-14 14:55:44 UTC MAIN commitmail json YAML

t_fpsetmask, t_fenv: Skip fp exception trap tests on RISC-V.

No architectural support for fp exception traps.

While here, make the macros behave a little better as C statements.

(riastradh)

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

libm: Fix powerpc64 build.

- Include fenv.c and fma(3) symbols (which just use the FMADD
  instruction).
- Note the .FN symbols in libm for the asm functions.  The FN symbols
  point at the function _descriptors_; the .FN symbols point at the
  first instruction of the function.

XXX Unclear why we have the .FN symbols for asm functions but not for
C functions.  I'm not sure we should be exporting them.

(riastradh)

2024-05-14 13:41:15 UTC MAIN commitmail json YAML

tpm(4): device_printf needs \n.

Observed in PR 58255.

(riastradh)

2024-05-12 21:53:26 UTC MAIN commitmail json YAML

tests/lib/libm/t_fenv: Work around PR 58253.

(riastradh)

2024-05-12 20:58:44 UTC MAIN commitmail json YAML

t_hypot: Use an ld80 test case that actually fits in ld80.

Also add comments explaining how I generated these test cases.

(No autoconf back doors hidden in these magic numbers, I promise!  No
pythagoreans were harmed in the production of these tests either.)

(riastradh)

2024-05-12 20:17:57 UTC MAIN commitmail json YAML

tests/lib/libm/t_next: Disable a test if long double is double.

This test, to verify nexttoward(x, x*(1 - LDBL_EPSILON/2)) moves in
the direction of x*(1 - LDBL_EPSILON/2), only makes sense if long
double has more precision than double -- the point of the exercise is
to verify that nexttoward moves even if the direction parameter can't
be rounded to double.  But if long double is just double, this test
makes no sense.

(riastradh)

2024-05-12 20:04:12 UTC MAIN commitmail json YAML

riscv fenv.h: Make sure FE_* exception constants have type int.

This may not be formally required by the standard, but the values
must be representable by int since that's the type that functions
like fetestexcept and feclearexcept traffic in.  And this is less
work than changing all the printf %d users in tree.

(riastradh)

2024-05-11 21:27:53 UTC MAIN commitmail json YAML

tests/lib/libm/t_asin: Cite PR lib/58246.

(riastradh)

2024-05-11 20:51:41 UTC MAIN commitmail json YAML

tests/lib/libm/t_hypot: Check inf/nan cases too.

(riastradh)

2024-05-11 20:09:47 UTC MAIN commitmail json YAML

hypotl(3): Fix includes and macros.

1. Need <math.h> for __HAVE_LONG_DOUBLE.
2. Need <machine/ieee.h> for struct ieee_ext_u &c.
3. EXT_FRACLBITS, not LDBL_MANL_SIZE.

PR lib/58245: hypotl is broken on ld128 ports

(riastradh)

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

tests/lib/libm/t_hypot: More trivial tests.

Check both signs of zero.

(riastradh)

2024-05-11 19:08:30 UTC MAIN commitmail json YAML

tests/lib/libm/t_hypot: Expand substantially.

PR lib/58245: hypotl is broken on ld128 ports

(riastradh)

2024-05-11 14:39:53 UTC MAIN commitmail json YAML

tests/lib/libc/stdio/t_printf: Fix sign error in ld128 case.

Also link back to where the test case came from.

(riastradh)

2024-05-11 14:33:23 UTC MAIN commitmail json YAML

tests/lib/libc/stdio/t_printf: Fix typo in ld128 case.

printf %La does not write the `L' suffix.

(riastradh)

2024-05-11 13:26:54 UTC MAIN commitmail json YAML

sys/cdefs.h: Make various macros work more robustly.

Use predefined __-namespace macros inside __BIT, __type_min,
__type_max, and __type_fit:

- Use __CHAR_BIT__ instead of NBBY so this works without sys/types.h
  and without _NETBSD_SOURCE.

- Use __INTMAX_TYPE__, __UINTMAX_TYPE__ instead of intmax_t, uintmax_t
  so this works without stdint.h.

No functional change intended.

(riastradh)

2024-05-11 02:07:54 UTC MAIN commitmail json YAML

nexttoward(3): Fix high-word test on small positive subnormals.

By this point in the logic, x can't be zero, so it's either positive
or negative.

The high word hx, however, can be zero, when x is a small positive
subnormal.  This means x is a small positive subnormal, so if x > y
we are computing nextDown, and if x < y we are computing nextUp.

hx is a (signed 32-bit) integer, not a double floating-point number,
so it's a little silly to compare hx > 0.0.  But that on its own
isn't enough to trigger the bug because all signed 32-bit integers
can be represented by double on all NetBSD architectures.

PR lib/58236

(riastradh)

2024-05-11 01:44:12 UTC MAIN commitmail json YAML

tests/lib/libm/t_next: nexttoward works if it's just nextafter.

It's broken on platforms where long double and double aren't the same
and nexttoward isn't an alias for nextafter.

(riastradh)

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

arm/fdt/cpu_fdt.c: Use `cpu' iattr to attach cpufreq.

Now that cpu has an explicit interface attribute, cpufeaturebus,
_all_ children of cpu must use an explicit interface attribute to
disambiguate.  For children that weren't previously attached using an
explicit interface attribute, the name of the parent, `cpu', serves
as the iattr.

XXX I think we should either
(a) not use cpufreqbus, since in the aarch64 case it doesn't seem to
    be passing any information through attach args, or
(b) create another iattr like cpufdtbus for use by cpufreq_dt.c,
    which does rely on attach args, if it has to attach differently
    from the rest of fdtbus.
But for now this should get aarch64 on fdt booting again.

(riastradh)

2024-05-10 12:24:08 UTC MAIN commitmail json YAML

xdebug/shl.mi: Delete libXxf86misc.so.2.0.debug.

Loading existing applications that linked against this into a
debugger should continue to work, so it shouldn't be obsoleted, but
the file is no longer installed.

(riastradh)

2024-05-10 12:21:49 UTC MAIN commitmail json YAML

xbase/shl.mi: Delete, rather than obsolete, libXxf86misc.so.M(.N).

Obsolete lines here will lead postinstall to delete the shlib, which
will break any existing applications linked against it.  Deleting the
lines has no effect on postinstall.

(We should maybe have a different way to mark them instead, as
suggested in PR 57581, but we don't, so this is what we do for now.)

However, keep the obsolete line for libXxf86misc.so, since the .so
symlink itself is only used when linking new applications.

(riastradh)

2024-05-10 12:18:16 UTC MAIN commitmail json YAML

xbase/shl.mi: Copy comment about delete vs obsolete from base/shl.mi.

(riastradh)

2024-05-10 03:29:47 UTC MAIN commitmail json YAML

tests/usr.bin/mtree/t_sets: Add base32, base64, debug32, debug64.

(riastradh)

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 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 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: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 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 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: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 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: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-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 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: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 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 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 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-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-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 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 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-04-29 00:28:18 UTC MAIN commitmail json YAML

cgdconfig(8): KNF in cgdconfig.c.

No functional change intended.

(riastradh)

2024-04-28 15:35:39 UTC MAIN commitmail json YAML

linux_sync_file: Fix missing init/fini steps.

Noted by rjs@.

PR kern/58210

(riastradh)

2024-04-28 12:49:08 UTC MAIN commitmail json YAML

tests/lib/Makefile: Hook up libstdc++.

(riastradh)

2024-04-28 01:21:27 UTC MAIN commitmail json YAML

2024-04-21 14:11:12 UTC MAIN commitmail json YAML

apei(4), acpihed(4): Enable in x86 GENERIC.

Let's just see how this works out in practice.  Might need to reduce
the overhead of each GHES on machines with thousands of them, but
we'll see.

PR kern/58046

(riastradh)

2024-04-21 03:02:51 UTC MAIN commitmail json YAML

drm: Allow DRM_IOCTL_GET_UNIQUE on render nodes.

On NetBSD, libdrm uses this to discover what kind of bus the device
is on, without which it refuses to expose the render node at all,
rendering it useless.  With this change, libdrm is able to use render
nodes on NetBSD.

Since this is just reading out information about the bus type and
bus/dev/func numbers, I don't think it's problematic to expose to
render nodes.

This requires tweaking the access path to the master.

PR kern/58180

(riastradh)

2024-04-21 03:02:39 UTC MAIN commitmail json YAML

drm(4): Fix st_rdev in stat.

dminor->index already has the 64*type adjustment, as allocated in
drm_minor_alloc.

PR kern/58180

(riastradh)

2024-04-19 00:55:35 UTC MAIN commitmail json YAML

ip6_output: Initialize plen for ip6_hopopts_input.

This funny little block in ip6_process_hopopts assumes it is
initialized as and behaves differently depending on whether it's zero
or not:

https://nxr.netbsd.org/xref/src/sys/netinet6/ip6_input.c?r=1.227#976

In the other call site, it is initialized to ip6->ip6_plen:

https://nxr.netbsd.org/xref/src/sys/netinet6/ip6_input.c?r=1.227#561

Reported-by: syzbot+587e3b707bdfe533283f@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?extid=587e3b707bdfe533283f

(riastradh)

2024-04-19 00:45:41 UTC MAIN commitmail json YAML

dounmount: Avoid &((struct vnode_impl *)NULL)->vi_vnode.

Member access of a null pointer is undefined, even if the result
should also be null because vi_vnode is at the start of vnode_impl.

Reported-by: syzbot+a4b2d13c0d6d4dac2d07@syzkaller.appspotmail.com
https://syzkaller.appspot.com/bug?extid=a4b2d13c0d6d4dac2d07

(riastradh)

2024-04-18 23:33:15 UTC MAIN commitmail json YAML

radeon_acpi.c: ifdef out unused function on NetBSD.

Should fix syzkaller build.

(riastradh)

2024-04-17 18:52:54 UTC MAIN commitmail json YAML

tap(4): Just use mutex_enter.

PR kern/58167

(riastradh)

2024-04-17 18:52:39 UTC MAIN commitmail json YAML

tap(4): Use DETACH_FORCE with config_detach.

It doesn't make a difference here, because tap_detach never fails,
but let's make it more obvious at the call site that failure is
forbidden here.

No functional change intended.

PR kern/58166

(riastradh)

2024-04-17 18:52:25 UTC MAIN commitmail json YAML

tap(4): Prune dead branches around tap_dev_destroyer.

No functional change intended.

PR kern/58166

(riastradh)

2024-04-17 18:32:13 UTC MAIN commitmail json YAML

tap(4): Prune dead branches around tap_dev_close.

No functional change intended.

PR kern/58166

(riastradh)

2024-04-17 18:10:27 UTC MAIN commitmail json YAML

modules/examples/fopsmapper: KNF, sprinkle comments

Missing: MP-safety; this is a kind of broken example.

(riastradh)

2024-04-17 18:01:29 UTC MAIN commitmail json YAML

sys/conf.h: Need sys/types.h for dev_t, devmajor_t.

(riastradh)

2024-04-16 14:34:03 UTC MAIN commitmail json YAML

src/sys/external/bsd/drm2/amdgpu/files.amdgpu@1.31 / diff / nxr@1.31
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu.h@1.9 / diff / nxr@1.9
src/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_acpi.c@1.6 / diff / nxr@1.6
src/sys/external/bsd/drm2/dist/drm/amd/powerplay/hwmgr/amdgpu_hwmgr.c@1.3 / diff / nxr@1.3
src/sys/external/bsd/drm2/dist/drm/amd/powerplay/hwmgr/amdgpu_smu7_hwmgr.c@1.5 / diff / nxr@1.5
src/sys/external/bsd/drm2/dist/drm/i915/display/intel_acpi.h@1.5 / diff / nxr@1.5
src/sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.h@1.6 / diff / nxr@1.6
src/sys/external/bsd/drm2/dist/drm/i915/i915_drv.h@1.49 / diff / nxr@1.49
src/sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/device.h@1.10 / diff / nxr@1.10
src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_acpi.c@1.5 / diff / nxr@1.5
src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_acpi.h@1.4 / diff / nxr@1.4
src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_display.c@1.6 / diff / nxr@1.6
src/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drv.h@1.5 / diff / nxr@1.5
src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/device/nouveau_nvkm_engine_device_acpi.c@1.4 / diff / nxr@1.4
src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/device/nouveau_nvkm_engine_device_base.c@1.13 / diff / nxr@1.13
src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/device/nouveau_nvkm_engine_device_pci.c@1.12 / diff / nxr@1.12
src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/device/nouveau_nvkm_engine_device_tegra.c@1.4 / diff / nxr@1.4
src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/device/priv.h@1.4 / diff / nxr@1.4
src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/bios/nouveau_nvkm_subdev_bios_shadowacpi.c@1.4 / diff / nxr@1.4
src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mxm/nouveau_nvkm_subdev_mxm_base.c@1.5 / diff / nxr@1.5
      :
(more 12 files)
drm: Set CONFIG_ACPI in linux/acpi.h and make it build.

Leave a little ACPI-related functionality disabled for now, like
getting EDID out of ACPI -- needs a bit more work to make this work,
and I don't have hardware to work on that.

Should help with failures of the forms:

- unable to locate a BIOS ROM
- bios: unable to locate usable image

on various machines.

(riastradh)

2024-04-16 14:29:33 UTC MAIN commitmail json YAML

opensolaris/sys/sys/elf.h: Omit needless __ELF_WORD_SIZE.

(riastradh)

2024-04-16 14:26:53 UTC MAIN commitmail json YAML

nouveau: Rework nouveau2netbsd hack to get ACPI stuff.

(riastradh)

2024-04-11 13:51:36 UTC MAIN commitmail json YAML

sys_futex.c: Fix illustration of futex(2).

In this illustration, we need to _set_ bit 1 to claim ownership, not
_clear_ bit 1 to claim ownership.

No functional change intended -- comment only.

(riastradh)

2024-04-11 02:15:39 UTC MAIN commitmail json YAML

Nix /var/run/named entry from set lists.

Normally we don't do this, but /var/run/named is

(a) used by running daemons, so postinstall should not delete it, and
(b) deleted at boot-time anyway by /etc/rc.d/mountcritlocal, so
there's no sense in having it checked by mtree.

However, this means that update builds need manual intervention to
delete $DESTDIR/var/run/named or else checkflist will fail, so add a
note to UPDATING about this.

Do the same with /var/run/lwresd just in case.

PR misc/57877

(riastradh)

2024-04-11 02:08:17 UTC MAIN commitmail json YAML

doc/3RDPARTY: Tidy up am-utils entry.

Add vendor branch and release branch pattern.

(riastradh)

2024-04-07 22:59:13 UTC MAIN commitmail json YAML

riscv: Schedule next hardclock tick in the future, not the past.

If we have missed hardclock ticks, schedule up to one tick interval
in the future anyway; don't try to play hardclock catchup by
scheduling for when the next hardclock tick _should_ have been, in
the past, leading to ticking as fast as possible until we've caught
up.  as fast as possible until we've caught up.

Playing hardclock catchup triggers heartbeat panics when continuing
from ddb, if you've been in ddb for >15sec.  Other hardclock drivers
like x86 lapic don't play hardclock catchup either.

PR kern/57920

(riastradh)