Commit Graph

285148 Commits

Author SHA1 Message Date
nia
efe89b021b Fix various typos, etc 2021-02-06 13:55:40 +00:00
joerg
7dbb693db8 Do not cast memcpy arguments when the intention is unaligned access.
The standard is pretty explicit that misaligned pointers is UB and LLVM
does exploit the promised alignment on SPARC, resulting in kernel
crashes during early boot.
2021-02-06 13:54:48 +00:00
isaki
2d5b96b7a6 Remove an extra mutex_spin_exit() in error path.
This is a part of rev 1.38.
2021-02-06 13:02:28 +00:00
isaki
9cb2dab029 Remove an extra mutex_spin_exit() in yds_resume().
This one has been moved to before yds_init() in rev 1.59.
2021-02-06 12:59:13 +00:00
isaki
8bc2e20aca Add a missing mutex_spin_exit(). 2021-02-06 12:55:34 +00:00
isaki
0dc5ea2ff6 Fix "locking against myself".
halt_{input,output} will be called with sc_intr_lock held.
2021-02-06 12:53:36 +00:00
isaki
d0b536d538 Remove an unused variable. 2021-02-06 12:50:04 +00:00
rin
4cb98d1efb Mention fdisk(8) and x86/mbr(8) in example for x86, for careless
people like me ;).

Bump date.
2021-02-06 12:18:45 +00:00
nia
2e7e30272b Explain the format of the raw PCM data users can read from a pad(4).
Since it's headerless this is important so the data can be interpreted
properly. Also, ordinary audio ioctls cannot be used on a pad and the
format can't be changed, so applications that attempt to automatically
determine the format of a device like audiorecord don't work.
2021-02-06 12:13:44 +00:00
nia
8f7298006c Slightly adjust wording.
It does seem to work with multiple applications concurrently writing to
the device in a quick test I did.
2021-02-06 12:07:57 +00:00
nia
71b5ec1d14 Add another example of recording the output of an application.
Explain something that confused me.
2021-02-06 12:01:57 +00:00
nia
0d373c9fc6 Use /dev/audioX rather than /dev/soundX in examples.
Avoids accidentally running into confusing behavior.
2021-02-06 11:58:10 +00:00
isaki
75ba478936 Hold sc_intr_lock in open()/close().
vtbl->{lock,unlock} (in fact ac97_{lock,unlock}) don't seem to need
releasing an interrupt lock.
Confirmed on auich.
2021-02-06 09:45:17 +00:00
isaki
07df396b4a Remove sc_active flag. sc_[pr]intr can be used instead of it. 2021-02-06 09:27:35 +00:00
isaki
e5d4bf8933 Remove something like counters.
- Counting {open,close} is done by the MI audio layer.
- trigger_* is not called again between trigger_* and halt_*.
2021-02-06 09:15:11 +00:00
isaki
bc9fc63318 Remove sc_open flag.
Counting {open,close} is done by the MI audio layer.
2021-02-06 09:14:03 +00:00
isaki
7b911d032d Calling halt_{input,output} is done by the MI audio layer if necessary. 2021-02-06 07:16:18 +00:00
simonb
15fc23b5a4 For mips n32/n64 explicitly save the GP reg on the stack, and
restore it _after_ the call to __errno().  Fixes sending the
__errno() call off to nowhereland when this code is included
in another library (eg __posix_cerror() in libposix).  Failure
picked up by the ATF lib/libposix/posix1/t_rename test.
2021-02-06 06:58:59 +00:00
isaki
3ab19efc6f Add a description to close().
> Before call to this, halt_input and halt_output are called if necessary.
2021-02-06 06:15:13 +00:00
thorpej
3e6ba253d0 Fix a comment. Thanks rillig@ for pointing it out! 2021-02-06 05:33:20 +00:00
thorpej
2110d4b72b - Add some additional compat strings from the DT bindings.
- Use device_compatible_entry::value to hold the device type, and generally
  tidy up device type selection.
2021-02-06 05:21:47 +00:00
isaki
ea153a0b0c Remove debug messages which are no longer necessary. 2021-02-06 05:15:03 +00:00
sjg
a66bf246af Use plain kill to test signaled child
Recent update to Darwin18 make the test using kill -14
stop working.

Reviewed by: rillig
2021-02-06 04:55:08 +00:00
jdolecek
8e29352f70 change libc sched_yield() stub to actually still call the syscall
instead of doing nothing when app is not linked with pthread; this matches
other systems

suggested by Mateusz Guzik in:
http://mail-index.netbsd.org/tech-kern/2020/07/19/msg026620.html
2021-02-06 00:08:58 +00:00
jmcneill
848aec5b65 mcx: Add if_transmit callback to enable more than one tx queue 2021-02-05 22:23:30 +00:00
sjg
0132eab955 Job_TempFile: unlink while signals blocked 2021-02-05 22:15:44 +00:00
joerg
716cbf2576 Reenable threadsafe sqlite.
Do it properly and only enable thread-safety, but not the worker thread
support. The latter is what requires the whole libpthread dependency.
A potential compromis would be to use a weak pthread_create and only
enable worker threads if it is provided, but given that it is only
really used for large sorts, don't bother for now.
2021-02-05 21:48:52 +00:00
joerg
4f7d5d1727 Pass strings to %s arguments, not void *. 2021-02-05 21:45:24 +00:00
joerg
86e238e257 Avoid duplicate definition of ddb_regs in crash(8). 2021-02-05 21:44:34 +00:00
joerg
84834d6d1d Allow v9 assembly for AES code for 32bit compat build with clang. 2021-02-05 21:43:20 +00:00
reinoud
5ccc1416cf Add virtio mmio probe function 2021-02-05 21:25:36 +00:00
reinoud
92d2bf8006 Better reading of 4.1.3.1, it seems that using 32 bit reads/writes is
mandatory for non-legacy devices.
2021-02-05 20:45:38 +00:00
sjg
2b67d42e71 Avoid strdup in mkTempFile
Require caller to pass a buffer and size if they
want the tempfile not unlinked.

Add Job_TempFile to handle blocking signals around
call to mkTempFile, so that meta_open_filemon can use it
in jobs mode.
2021-02-05 19:19:17 +00:00
reinoud
53b16f4da5 Second round of cleaning up endian code. No more tailored code to maintain. 2021-02-05 19:18:23 +00:00
thorpej
b3b794318f Assign device handles to devices that attach to the "fdt" interface attribute
in fdtbus_device_register().
2021-02-05 17:20:32 +00:00
thorpej
c3d3e57bf7 OpenFirmware device handle implementation. 2021-02-05 17:17:59 +00:00
thorpej
ae19d58b5b Assign device handles to "at acpi" and "at pci" devices in
acpi_device_register().
2021-02-05 17:13:40 +00:00
thorpej
cae7202ceb ACPI device handle implementation. 2021-02-05 17:12:43 +00:00
thorpej
105da683ab Introduce a generalized "device handle", designed to abstract the handles
used by platform description mechanisms like OpenFirmware, Device Tree,
and ACPI.  In addition to encapsulating the handle's opaque value, the
handle also contains a pointer to an "implementation", which can be used
to invoke methods on a device / device handle.

Device handles are designed to be passed around by-value.  It is expected
that any other memory objects they refer to will be durable.  They are an
aggregate type that consumes 2 pointers worth of storage space.

When device_t's are created, they initially have an invalid device handle.
It is currently the responsibility of platform-specific code to assign
device handles to device_t's.

When necessary, platform-specific code can override a handle's implementation
in a way that resembles sub-classing, such that specific methods can by
intercepted, but others simply passed through.  This also allows platforms
that do not otherwise have a platform description mechanism to provide
handle implementations in specific circumstances to describe the hardware
to platform-independent code.

A general device method calling infrastructure is provided.  Method names
that begin with "device-" are reserved for / defined by the autoconfiguration
subsystem.  Define the "device-enumerate-children" method.  Other subsystems
are free to define their own device method calls and bindings.

Welcome to NetBSD 9.99.80.
2021-02-05 17:03:35 +00:00
christos
f29ccf23ed PR/55975: Riccardo Mottola: Don't try to lock a mutex from an interrupt context. 2021-02-05 16:06:24 +00:00
skrll
2ae3ae6ca5 Fix build 2021-02-05 08:07:14 +00:00
rillig
fef236cf89 make: remove unnecessary assignment in Job_Start, clean up comments 2021-02-05 05:53:40 +00:00
rillig
c72ed2e27e make: add const to SearchPath_Print 2021-02-05 05:48:19 +00:00
rillig
d6f20baa76 make: clean up a few comments in parse.c 2021-02-05 05:46:27 +00:00
rillig
c54db8a883 make: improve documentation about variable scopes
In an experiment, I tried to separate the concepts of a GNode and a
variable scope.  The global variables SCOPE_GLOBAL, SCOPE_INTERNAL and
SCOPE_CMDLINE are implemented as GNode even though they only need the
members 'name' and 'vars'.  All their other members are unused.
Therefore it seemed natural to extract this part of the GNode into a
separate type called Scope.

The resulting code was harder to read though since it had split the
namespace of the functions into several parts that were not obviously
related: The Var_ functions, the Scope_ functions, and the short-cut
Global_ functions.  Because of this, I threw away the experiment.

All that is left are a few updated comments.
2021-02-05 05:42:39 +00:00
rillig
1cdb419bd3 make: rename remaining ctx to scope
One less small inconsistency.  Everywhere else, that variable had been
named ctxt, not ctx.
2021-02-05 05:19:57 +00:00
rillig
835b4db442 make: in the Var_ functions, move the scope to the front
This change provides for a more natural reading order in the code.
Placing the scope first makes it immediately clear in which context the
remaining parameters are interpreted.

No functional change.
2021-02-05 05:15:12 +00:00
rillig
715bef6038 make: add shortcut Global_Delete for deleting a global variable 2021-02-05 04:41:17 +00:00
taca
54ddcb24e6 Latest acpica version is 20210105. 2021-02-05 03:27:58 +00:00
thorpej
9472fe4a8b s/bootspec/bstr/g to avoid shadowing a global. 2021-02-05 00:06:11 +00:00