Commit Graph

306105 Commits

Author SHA1 Message Date
riastradh bfbeee7805 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
2024-05-06 15:33:04 +00:00
riastradh 9263853839 tests/usr.bin/mtree/t_sets.sh: atf_fail, not atf_tc_fail 2024-05-06 14:38:28 +00:00
tsutsui adfd220df8 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.
2024-05-06 13:27:49 +00:00
riastradh e21ed88e62 tests/lib/libc/setjmp/t_sigstack: Add missing comment for 1.10.
PR lib/57946
2024-05-06 12:11:03 +00:00
mrg b1d1e928c0 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.)
2024-05-06 08:43:36 +00:00
mrg 465b033192 mark more libpam* with pam. 2024-05-06 08:38:51 +00:00
skrll 5a0167f5d2 Improve the comment. 2024-05-06 07:29:30 +00:00
skrll fbd0dae415 Fix 32bit UVMHIST builds 2024-05-06 07:18:19 +00:00
skrll d2c36e3e86 arm has been fixed 2024-05-06 06:58:00 +00:00
skrll ababa08f7d 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
2024-05-06 06:57:32 +00:00
macallan dfd1081321 sprinkle rump, gcc=12 etc.
Now sparc64 with HAVE_GCC=12 and MKRUMP=no builds again
2024-05-06 06:06:40 +00:00
mrg 59f75f88a6 mark libpam* as being part of pam. 2024-05-06 05:27:46 +00:00
riastradh 8ae9996403 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.
2024-05-06 02:21:39 +00:00
riastradh a2c1cc7d5e 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.
2024-05-06 00:54:02 +00:00
riastradh 2b70237da2 tests/lib/libm/t_fe_round.c: Work around likely ia64 bug in gcc. 2024-05-05 23:08:53 +00:00
riastradh 3822903a53 libm: long double is just double on hppa, so don't use s_rintl.c.
PR misc/58054
2024-05-05 22:52:19 +00:00
riastradh 47b5b183dd libm: If long double is double, nexttowardl is nextafter.
long double nexttowardl(long double, long double);
double nextafter(double, double);
2024-05-05 22:10:06 +00:00
riastradh 633172aec9 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)
    ^
2024-05-05 15:26:20 +00:00
riastradh 7dfe87249e 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;
                          ^
2024-05-05 15:25:31 +00:00
riastradh f0c134c7b7 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)));
                                                            ^  ~~
2024-05-05 15:18:10 +00:00
riastradh 17f9eb725b 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.
2024-05-05 14:53:22 +00:00
riastradh b544c4974f tests/lib/libm/t_next: Fix stub on VAX.
Tested building the wrong tree, oops.
2024-05-05 14:34:58 +00:00
riastradh df931a7810 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.
2024-05-05 14:29:38 +00:00
riastradh 55bbe7aeb3 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.
2024-05-05 14:06:47 +00:00
riastradh f8bd6e11b1 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.
2024-05-05 11:38:03 +00:00
riastradh 816699395b libm: long double is just double on arm, so don't use s_rintl.c.
PR misc/58054
2024-05-05 11:07:49 +00:00
tsutsui 4588b9bf16 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.
2024-05-05 07:36:37 +00:00
riastradh b129f29edd tests/lib/libm: Test nextafter/nexttoward and variants.
The tests are fairly trivial but should work without any conditionals
about floating-point formats.
2024-05-05 02:53:01 +00:00
riastradh 8f27842e48 libm: New s_rintl.S for x86.
Prompted by PR lib/58054.
2024-05-05 02:50:11 +00:00
riastradh cd71d51811 tests/usr.bin/mtree: Fail gracefully with unknown sets.
Rather than `bogus test program', make a test fail.

PR misc/57877
2024-05-04 20:24:37 +00:00
riastradh ebb5e1cc01 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
2024-05-04 19:21:51 +00:00
reed e5d2f1f842 add the catman pages to the set for mkcsmapper and mkesdb 2024-05-04 19:16:22 +00:00
reed b3ebb17e10 Install the mkcsmapper.1 and mkesdb.1 manpages. 2024-05-04 19:10:04 +00:00
uwe 0e6468a0fd ctfmerge: obey CTFMERGE_TERMINATE_NO_UNLINK as a tool too 2024-05-04 18:22:59 +00:00
uwe 3af74e3469 ctfmerge(1): brush up markup 2024-05-04 18:20:44 +00:00
chs 779666e6a0 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.
2024-05-04 17:58:24 +00:00
tsutsui f8e4b988b6 Note about recent hp300 topcat(4) framebuffer improvements. 2024-05-04 16:57:15 +00:00
tsutsui e812a16636 Add comments about quirks of 98542/98543 framebuffers with 1024x400 pixels. 2024-05-04 16:06:57 +00:00
skrll 221640878d Remove magic numbers. NFCI. 2024-05-04 14:48:28 +00:00
mlelstv f0eb9f868a Don't panic on NULL pointer dereference when done by copyin, ... 2024-05-04 13:45:10 +00:00
mlelstv 9272c79b76 Account for trailing NUL bytes when calculating userland buffer size. 2024-05-04 13:33:18 +00:00
mlelstv c2c241e6a6 Bail if increment is too small for the precision to avoid an infinite loop. 2024-05-04 13:29:41 +00:00
christos 5b4135cd6f PR/58233: RVP: Fix lzip dictionary size calculation 2024-05-04 13:18:06 +00:00
christos f57e938466 PR/58223: RVP: Don't write to stdout when testing. 2024-05-04 13:17:03 +00:00
christos 8a0c0d837a Document environment variable use. 2024-05-04 13:11:41 +00:00
mlelstv 00e4c256d5 Use device_printf instead of autoconf messages for errors. 2024-05-04 12:49:15 +00:00
mlelstv eafb40ae80 Make usb address and hub topology available to drvctl. 2024-05-04 12:45:13 +00:00
skrll be2d38de58 makecontext: correct the type to setup register based arguments.
Use __greg_t rather than int for register based arguments. This fixes
various atf tests.
2024-05-04 12:43:36 +00:00
skrll b06455d348 Fix the __greg_t typedef for riscv32 2024-05-04 12:42:09 +00:00
mlelstv 4ccc274e71 Use device_printf instead of autoconf messages for errors. 2024-05-04 12:41:03 +00:00