catch up with other drivers:
- support colour map access via ioctl()
- support WSDISPLAYIO_FBINFO, _SET_DEPTH
- add screen blanking support, now that we know how
tests/ipsec/t_ipsec_policy.c -- appease clang
Cast to (void) not (void *) to explicitly ignore a function return
value, even though that value is a pointer.
Might fix the clang builds (should go part way at least).
vfs_bio: retry fresh buffer allocation if recycling fails
getnewbuf() uses buf_lotsfree() to choose whether to
allocate a fresh buffer before trying BQ_AGE and BQ_LRU.
If fresh allocation is skipped and no buffer can actually be
recycled, it sleeps on needbuffer_cv even when the buffer cache
is still below its high water mark.
In that situation, a thread which could release a buffer may
itself need another buffer, resulting in a deadlock.
To avoid this, if recycling finds no usable buffer and bufmem is
still below bufmem_hiwater, make one more PR_NOWAIT fresh allocation
attempt before sleeping. See PR kern/60584 for details.
Worth to pullup to netbsd-11.
atari: Fix 68030 SRP setup across kernel relocation
protorp[1] is currently updated after the kernel has been copied to
TT-RAM in RELOC_KERNEL case. The following PMOVE reads the ST-RAM
copy while the MMU is disabled, so this happens to work when enabling
the MMU. After the MMU is enabled, however, protorp refers to the
relocated copy, where protorp[1] still contains its old value.
Fortunately, this is not currently fatal because later uses of
protorp overwrite protorp[1] with the root table address before
loading the root pointer. However, any writes to global variables
after relocation leave the reloacated kernel state inconsistent.
Set protorp[1] before copying the kernel so that the relocated copy
also contains the root table address. This matches the ordering used
by amiga.
The PMOVE inline asm also specifies only the address of protorp as an
input, even though it reads both words of the SRP prototype from memory.
[2 lines not shown]
pcppi(4): Don't detach at shutdown.
No reason was ever given for detaching this at shutdown; if there's
some important resource to release, it can be done in a pmf hook, but
otherwise it interferes with other functionality.
PR kern/60735: BEEP_ONHALT fails on i386
amd64 memchr(3): Fix case when ptr + len wraps around address space.
While here, give meaningful names to the various internal labels.
PR lib/60744: memchr(3) is busticated
atari: Fix fatal 68030 MMU TC initialization bug
ATARITT kernels from NetBSD 11.0 and -current fail to boot on my
Atari TT030.
The inline asm that loads TC specifies only `"a" (&tc)` as an input,
so the compiler may eliminate the initialization of tc as a dead store.
Then the generated code loads an uninitialized value from the stack
into TC.
Add an `"m" (tc)` input operand to the inline asm so that the compiler
knows that the asm reads tc from memory.
Tested with both NetBSD 11.0 and -current on Atari TT030 and
must be pulled up to netbsd-11.
ipsec: Nix wrong assertion added in key.c rev. 1.288.
On LP32 platforms, the xpl0 pointer may not be 64-bit aligned itself;
we just require all the _internal_ structures inside that buffer to
be 64-bit aligned.
Should fix various ipsec tests mostly on LP32 platforms.
PR kern/60669: netipsec key_sp2msg buffer overrun
i915: Fix null pointer deref in i915_gem_object_get_dma_address.
Matches the Linux code in the #else this way.
PR kern/60755: i915drmkms crashes on Intel Bay Trail GPU making the
machine rebooting
compat_linux inotify(2): Re-check number of entries in loop.
Might have changed between two calls to inotify_readdir.
XXX Should maybe not do two calls to inotify_readdir! Can we hold
the vnode lock or use a fixed temporary buffer size or something?
PR kern/60756: compat_linux inotify(2): TOCTOU and locking shenanigans
compat_ultrix: Fix shmat/shmdt confusion.
Also omit needless initializer while here, which was added to pacify
a gcc12 warning without actually fixing the problem the warning
should have alerted us to.
kern/60753: compat_ultrix shmsys(2): busted shmdt