Commit Graph

275814 Commits

Author SHA1 Message Date
maxv
d8df46ec95 Drop the todo and qualify the accesses. 2020-04-15 17:28:26 +00:00
maxv
ce985f886b Introduce POOL_NOCACHE, simple option to cancel pool_caches and go directly
to the pool layer. It is taken out of POOL_QUARANTINE.

Advertise POOL_NOCACHE for kMSan rather than POOL_QUARANTINE. With kMSan
we are only interested in the no-caching effect, not the quarantine. This
reduces memory pressure on kMSan kernels.
2020-04-15 17:16:22 +00:00
maxv
29bc5ad925 Use large pages for the kASan shadow, same as kMSan. 2020-04-15 17:00:07 +00:00
nia
87706eec7d ossaudio: If the user's channel count is rejected, use the hardware count 2020-04-15 16:39:06 +00:00
maxv
7354445c97 Use large pages for the kMSan shadows. This greatly improves performance,
and slightly reduces memory consumption.
2020-04-15 16:28:28 +00:00
roy
b6ae27bc57 privsep: Redirect to /dev/null unless test or quiet and not debug
Keeps the rtsol like behaviour the same.

Fixes PR bin/55170
2020-04-15 15:55:24 +00:00
roy
09220fdb89 dhcpcd: Don't open a control socket in test mode
Fixes PR bin/55170
2020-04-15 15:54:18 +00:00
skrll
134268cc06 Convert PMAPDEBUG to UVMHIST 2020-04-15 15:50:15 +00:00
nia
0eb796bf71 ossaudio: Make SNDCTL_DSP_SETFMT conform with OSSv4.
The OSSv4 spec says we shouldn't really error if an invalid format is
chosen by an application. Things are especially likely to be confused
if we return MULAW, since in OSSv4 terms that means that's the native
hardware format. Instead, set and return the current hardware format
if an invalid format is chosen.

For the 24-bit sample formats, note that the NetBSD kernel currently
can't handle them in its default configuration, and will return an error
code if you attempt to use them. So, if an applicaton requests 24-bit PCM,
promote it to 32-bit PCM. According to the spec, this is valid and
applications should be checking the return value anyway.

In the Linux compat layer, we just use S16LE as a fallback. The OSSv3
headers that are still being shipped with Linux don't contain definitions
for fancier formats and we can reasonably expect all applications to
support S16LE.
2020-04-15 15:25:33 +00:00
skrll
318a86979c Spaces to tabs 2020-04-15 15:22:37 +00:00
nia
6476938d92 ossaudio: Make SNDCTL_DSP_SPEED more robust when using invalid rates.
From the perspective of reading the OSSv4 specification, NetBSD's
behaviour when an invalid sample rate is set makes no sense at all:
AUDIO_SETINFO simply returns an error code, and then we immediately
fall through to getting the sample rate, which is still set to the
legacy default of 8000 Hz.

Instead, what OSS applications generally expect is that they will be
able to receive the actual hardware sample rate. This is very, very
unlikely to be 8000 Hz on a modern machine.

No functional change when setting a sample rate between the supported
rates of 1000 and 192000 Hz. When a rate outside this range is requested,
the hardware rate is returned (on modern hardware, generally always 48000
Hz or a multiple of 48000 Hz).
2020-04-15 14:54:34 +00:00
rin
7058cb63d8 When boot up with auto-boot? == true, some systems do not provide stdout
if the normal output is screen.

Open screen explicitly as stdout in this case, both for ofwboot and kernel,
which fixes problems with auto-boot? == true for Mac mini G4:

- messages from ofwboot do not appear
- kernel freeze during early boot stage

Taken from OpenBSD:
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/arch/macppc/macppc/ofw_machdep.c#rev1.3
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/arch/macppc/stand/Locore.c#rev1.3

XXX
pullup to netbsd-9 and -8
2020-04-15 13:33:13 +00:00
jdolecek
1018214947 remove MAXPHYS override, xbd(4) was changed to work with 64k transfers 2020-04-15 10:21:00 +00:00
jdolecek
c2ea501358 make xbd(4) accept 64k (aka regular MAXPHYS) I/O, use two linked requests
for this, so that it does not require MAXPHYS override in kernel config
any more

this is useful even if we get indirect segment support one day,
for compatibility with Dom0's not supporting it, like currently NetBSD
2020-04-15 10:16:47 +00:00
skrll
7736e3604e KNF 2020-04-15 09:41:09 +00:00
skrll
3bac32237e G/C a #include 2020-04-15 08:14:22 +00:00
joerg
f3cc99aec6 Drop most of the logic associated with pthread__started.
The pthread_cond logic is a questionable optimisation at best and the
post-fork logic is plainly broken.
2020-04-14 23:35:07 +00:00
kamil
43e2a7afaf Set p_oppid always, not just when a parent is traced
PR kern/55151 by Martin Husemann
2020-04-14 22:42:18 +00:00
kamil
579da1aebb Add timeout to syscall_signal_on_sce that hangs from time to time 2020-04-14 22:37:24 +00:00
kre
d7771cb4e9 Only include opt_xxx.h headers when _KERNEL_OPT is defined. 2020-04-14 15:36:02 +00:00
jdolecek
8a9cce1eee fix KASSERT() in xbd_map_align() 2020-04-14 15:16:06 +00:00
jdolecek
37cfcaa8fa rearrange slightly to do proper b_resid accounting, to prepare for partial
transfers
2020-04-14 14:06:24 +00:00
christos
b2032fd53a Add dmesg functionality. 2020-04-14 13:58:11 +00:00
macallan
43dafa4757 defflag ONEWIRE_DEBUG 2020-04-14 13:36:51 +00:00
macallan
93fd4b2a99 add 'driver' for DS2430A EEPROMs which simply dumps the chip's contents and
status register
2020-04-14 13:35:24 +00:00
macallan
03c00baeb7 regen 2020-04-14 13:32:56 +00:00
macallan
78edd088bb add family 0x14 for DS2430A EEPROMs 2020-04-14 13:32:26 +00:00
jdolecek
6bd7d4340a use single pre-allocated buffer for unaligned I/O - it's rare and not
performance critical path, it's more important to ensure it will succeed
eventually; also return EAGAIN rather than ENOMEM, so the I/O will be
retried by dk_start() when previous I/O finishes

fix yet another leak on the xengnt_grant_access() fail path in
xbd_diskstart() - this time the unalign buffer
2020-04-14 13:10:43 +00:00
jdolecek
2b093b00ba add forgotten mutex_exit() in detach, which caused panic in uvm_unmap1()
due to held spin lock
2020-04-14 13:02:40 +00:00
reinoud
0376c5faf1 Move comment related to the sysctl_createv() in SYSCTL_SETUP() from the old
place to the new place too.
2020-04-14 12:47:44 +00:00
roy
b19d027e40 We solves the zpool SIGBUS issue by building a threaded libhack. 2020-04-14 12:14:59 +00:00
reinoud
b3745214b9 fix debug print flag 2020-04-14 11:45:42 +00:00
jdolecek
bc8de0c942 provide d_iosize hook to cap the xfer size used for dumps 2020-04-14 09:27:28 +00:00
jdolecek
5b67952b7b if grant fails also revoke the grants for previous segments, fixes
grant leak on grant error
2020-04-14 08:21:59 +00:00
skrll
4ee8f848b4 Provide a "mach cpuinfo" which displays some struct cpuinfo fields for
a/all CPUs.
2020-04-14 08:06:53 +00:00
skrll
4cbc3d23fc Remove unused ARM32_DB_COMMANDS 2020-04-14 08:00:47 +00:00
wiz
db4c40bd04 Fix typo, expand description slightly. 2020-04-14 08:00:22 +00:00
skrll
69fd99cdf8 Sort db_commands. 2020-04-14 07:59:43 +00:00
jdolecek
6c60eb718d DRY - use pages for sizeof() for the frame allocations, so it get's allocated
the correct size without repeating the type
2020-04-14 07:41:05 +00:00
jdolecek
54f444e1be actually fix also the allocated memory size for the getstatus frames on i386 2020-04-14 07:38:12 +00:00
skrll
da2b34cc84 Fix a comment. From ad@ 2020-04-14 07:31:52 +00:00
jdolecek
9098e41f04 note MP-safe work for xennet(4) and xbd(4) 2020-04-14 07:31:39 +00:00
skrll
76cb9a0523 Fix UVMHIST bulid 2020-04-14 05:43:57 +00:00
kre
e9f637c8af Since dhcpcd-hools/02-dump seems to have been removed from the
repository, don't attempt to install it, and don't expect it to
be installed.    If a better fix is to return 02-dump, then this
change can be reverted (by anyone, just go ahead and do it).

dhcpcd(8) should also have mention of 02-dump removed, if removing
it was intentional.
2020-04-14 03:16:26 +00:00
christos
4b502d5f46 catch up with field move 2020-04-14 00:08:07 +00:00
bouyer
a27ce3b183 By default, events are bound to CPU 0 (exept for IPIs and VTIMERs which
are bound to a different CPU at creation time).
Recent MI changes caused the scheduler to choose a different CPU when
probing and attaching xennet devices (I guess it's the xenbus thread which
runs on a different CPU). This cause the callback to be called on a different
CPU than the one expected by the kernel, and the event is ignored.
It is handled when the clock causes the callback to be called on the right
CPU, which is why xennet still run, but slowly.

Change event_set_handler() to do a EVTCHNOP_bind_vcpu if requested to,
and make sure we don't do it for IPIs and VIRQs (for theses, the op fails).
2020-04-13 22:54:11 +00:00
ad
f708c498bf uvm_fault_check(): if MADV_SEQUENTIAL, change lower lock type to RW_WRITER
in case many threads are concurrently doing "sequential" access, to avoid
excessive mixing of read/write lock holds.
2020-04-13 22:22:19 +00:00
wiz
a29005e232 Remove trailing dot in SEE ALSO. 2020-04-13 20:44:39 +00:00
jdolecek
15b9c61269 KASSERT() that requested I/O size is <= XBD_MAX_XFER - this can happen
e.g. with custom DomU kernel which doesn't have the value for MAXPHYS
reduced to 32k like the XEN3_DOMU config
2020-04-13 20:09:13 +00:00
jdolecek
5dec3f0781 when determining I/O block size for VBLK device, only use pi_bsize
returned by DIOCGPARTINFO if it's bigger than DEV_BSIZE and less
than MAXBSIZE (MAXPHYS)

fixes panic "buf mem pool index 8" in buf_mempoolidx() when the
disklabel contains bsize 128KB and something reads the block device -
buffer cache can't allocate bufs bigger than MAXPHYS
2020-04-13 20:02:27 +00:00