Commit Graph

305973 Commits

Author SHA1 Message Date
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
nia b61903b372 recent changes 2024-05-04 09:37:39 +00:00
skrll 8bcee0b70a Whitespace 2024-05-04 07:04:24 +00:00
rillig 1772ff8ac7 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.
2024-05-04 06:52:16 +00:00
rillig b108f9c1fe mktemp.3: mkdtemp is no longer nonstandard
Reported by Aleksey Cheusov on tech-userlevel.
2024-05-04 05:50:49 +00:00
mlelstv 6d4f51a741 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.
2024-05-04 05:49:39 +00:00
dyoung 7c4812b990 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.
2024-05-04 02:21:48 +00:00
dyoung 5fb492e854 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.
2024-05-04 02:04:54 +00:00
gutteridge 7db2523dea 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).
2024-05-04 00:41:06 +00:00
riastradh af8e7fd7d9 tests/lib/libm/t_fe_round.c: Expand nearbyint/rint tests.
PR lib/58054
2024-05-03 21:40:51 +00:00
andvar deeff75000 s/inerttupts/interrupts/ in comments. 2024-05-03 21:38:15 +00:00
nakayama f13fcfc711 Allow DHCPv6 so that dhcpcd(8) does not complain at boot when using
ia_pd option.
2024-05-03 20:48:58 +00:00
rillig cbe2532061 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.
2024-05-03 19:16:13 +00:00
christos 9c1705ca7b add an environment variable to override the number ot threads. 2024-05-03 15:50:42 +00:00
christos 8b4f8baa5f Fix build as a tool (Jan-Benedict Glaw) 2024-05-03 15:39:50 +00:00
rillig 0b487d0915 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.
2024-05-03 15:32:37 +00:00
nia 4e8c872233 update ports roadmap 2024-05-03 09:00:59 +00:00
skrll 1b3eb2cf34 Small simplification. NFCI. 2024-05-03 07:24:31 +00:00
skrll 451e18ef56 Use the _X_FOO register macros instead of magic numbers. 2024-05-03 07:11:14 +00:00
skrll 0697ad2e67 KNF 2024-05-03 07:09:20 +00:00
skrll 97e917b2d3 More debug. 2024-05-03 07:06:18 +00:00
skrll d3780b8625 Remove references to RISC-V. 2024-05-03 07:00:14 +00:00
rillig 3e0eea9ed1 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.
2024-05-03 04:04:17 +00:00
rillig 2e8fec16de tests/lint: demonstrate wrong struct size calculation 2024-05-02 20:03:33 +00:00
rillig 29027db22b parsedate.3: resolve contradictory values for 'next' 2024-05-02 18:34:01 +00:00
skrll d3587104ce 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.
2024-05-02 18:18:17 +00:00
riastradh 9fbbf75c78 tests/lib/libm/t_fe_round: Fix a missed cast.
Need long long or intmax_t, not long, on LP32.

PR lib/58054
2024-05-02 16:52:08 +00:00
riastradh 2bd651d959 tests/lib/libm/t_fe_round: Tidy up nearbyintl, sync nearbyint test.
PR lib/58054
2024-05-02 16:51:55 +00:00
christos 35564cfd71 comment out strict boolean lint check because isspace() returns int and lint
complains.
2024-05-02 15:45:36 +00:00
christos 81769fc7f9 revert previous. 2024-05-02 14:19:56 +00:00
riastradh 38aebf98e7 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
2024-05-02 11:55:49 +00:00
kre 483439ec0a 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.
2024-05-02 03:30:07 +00:00
riastradh 247fbbb163 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
2024-05-02 00:01:48 +00:00