267385 Commits

Author SHA1 Message Date
christos
9beb52efed mention truncation of the result if the size in optlen is less that the
size of the option to be returned in optval.
2019-05-08 14:10:42 +00:00
christos
4267c2f8b0 PR/54176: Anthony Mallet:
getsockopt(2) does not silently truncate returned optval
2019-05-08 14:05:18 +00:00
leot
666793fa92 Fix a typo
Reported by Tobias Ulmer via netbsd-docs@ ML, thanks!
2019-05-08 14:03:57 +00:00
isaki
e0c9195986 Merge isaki-audio2 branch.
Welcome to 8.99.39.
2019-05-08 13:47:33 +00:00
isaki
e622eac459 Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly.  Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism.  The encoding/channels/frequency
  conversions are completely handled in the upper layer.  So the hard-
  ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
  - Obsoletes query_encoding and add query_format instead.
  - Obsoletes set_params and add set_format instead.
  - Remove drain, setfd, mappage.
  - The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c         -> dev/audio/audio.c (rewritten)
- dev/audiovar.h      -> dev/audio/audiovar.h
- dev/audio_dai.h     -> dev/audio/audio_dai.h
- dev/audio_if.h      -> dev/audio/audio_if.h
- dev/audiobell.c     -> dev/audio/audiobell.c
- dev/audiobellvar.h  -> dev/audio/audiobellvar.h
- dev/mulaw.[ch]      -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
2019-05-08 13:40:13 +00:00
skrll
24ef49d776 Really go back to pre-whitespace change (1.52) arm32_kernel_vm_init 2019-05-08 13:18:47 +00:00
ozaki-r
dfdcf19001 Protect ether_multi list
PR 54153
2019-05-08 09:53:43 +00:00
cnst
b87889e72c cac(4): Xr bio(4) and friends, and mention when it was first introduced 2019-05-08 07:44:28 +00:00
wiz
8edeed6684 Make enumerations consistent, and use Dv for BIO*. 2019-05-08 07:41:23 +00:00
wiz
c41ad8e441 Revert previous, misunderstanding. 2019-05-08 07:17:29 +00:00
cnst
f01a8d9eee bio(4): document which commands are supported by which drivers; 2019-05-08 06:57:18 +00:00
cnst
0f59c4847a mpt(4): remove ENOTTY / noop implementation of bio(4) setstate
* All other bio(4) drivers either do or don't implement each command.

* This changes the returned error code, but it does not seem to matter,
  as some bio(4) drivers always return ENOTTY in the default case, whilst
  others always return EINVAL (e.g., both cac(4) and ciss(4) for setstate).
2019-05-08 06:32:01 +00:00
mrg
0e5d2a543b new comment explains this hack:
* XXXMRG: Stall task can run after slot is disabled when yanked.
 * This hack notices that the xs has been memset() in
 * xhci_disable_slot() and returns.  Both xhci_reset_endpoint()
 * and xhci_set_dequeue() rely upon a valid ring setup for correct
 * operation, and the latter will fault, as would
 * usb_transfer_complete() if it got that far.

this truly fixes yanking active ucom devices (uchcom, uplcom and
umcs all tested.)  prior efforts largely worked by allowing the
stall task to run first, as a side effect to their actual work.

ok @skrll.

XXX: pullup.
2019-05-08 06:31:02 +00:00
wiz
3a5a3e206b Sort SEE ALSO. 2019-05-08 06:10:30 +00:00
wiz
85d5917a34 Fix typo. 2019-05-08 06:09:51 +00:00
cnst
ac84331e0e bio(4) drivers: remove noop fallthrough-to-default bio(4) cmd cases
* Makes it easier to do code/feature analysis by not having
  extra noop code/symbols spattered around.

* Only an issue in cac(4) and ciss(4); other drivers don't do this.

* No binary changes.
2019-05-08 05:40:51 +00:00
thorpej
88c316691b Use posix_madvise() rather than the legacy madvise() call, and
wrapp the calls in #ifdef for the advice we're giving.  Should
address reports of host tool build issues.
2019-05-08 04:34:33 +00:00
cnst
f11bc4e580 bioctl(8): Xr ataraid(4), mpii(4) && mfii(4); 2019-05-08 03:29:59 +00:00
cnst
72b1accc40 mpii(4): Xr bio(4) and mention first appearance in Nx; 2019-05-08 03:12:48 +00:00
msaitoh
baf4c2eb26 Add DTrace. 2019-05-08 02:57:11 +00:00
cnst
267fbab7bd bio(4): enlist ataraid(4), mpii(4) and mfii(4) in bio(4); 2019-05-08 02:49:10 +00:00
thorpej
8319f966d5 Fix building libprop as a host tool library on platforms that don't have
the Matt Thomas rbtree:

- Include rb.c in libnbcompat, and provide a nbcompat sys/rbtree.h
  header.
- Make sure libprop's source file include prop_object_impl.h before
  anything else, and pull in nbtool_config.h from there.

Tested by simulating such a host system by renaming the host's
<sys/rbtree.h> out of the way (which reproduced the build failure)
and verifying that the host-tool installboot contained the rb_*
functions in its own .text segment.
2019-05-08 02:25:50 +00:00
christos
4ca6b93188 add more 2019-05-08 01:08:18 +00:00
christos
a4ff8f65ff Add slop of 1000 and explain why. 2019-05-08 00:55:18 +00:00
mrg
5a22560bff obsolete moscom(4). it was never in any default configs, did
not work for some cases.

umcs(4) supports everything it does plus one additional chipset,
has been in default configurations since netbsd 7.
2019-05-07 22:00:10 +00:00
sevan
ded1438be8 TMG 2019-05-07 21:14:46 +00:00
christos
ed042c77df Use the max limit (aka maxfiles or the moral equivalent of OPEN_MAX) which
makes poll(2) align with the Posix documentation (which allows EINVAL if
nfds > OPEN_MAX). From: Anthony Mallet
2019-05-07 20:10:21 +00:00
maya
07975b2231 Make CLEANFILES actually work. .TARGET is not defined when not in a target
rule.

Thanks xtos for the heads up.
2019-05-07 18:45:37 +00:00
maya
53af5ae4cc Replace the link command for libpthread.a so that we create a single section
with all the libpthread symbols in it.
This makes -lpthread behave like to -Wl,--whole-archive -lpthread.

This avoids a situation where threaded static binaries use some libc thread
stubs, which are racy.

Fixes PR lib/54001: call_once2_32, call_once2_static test cases failing on
amd64 since gcc7 import.

Suggested by Jonathan Wakely, thanks!
2019-05-07 18:12:53 +00:00
msaitoh
0d54e07587 - Use bus_dmamem_unmap() correctly in txp_dma_free() to prevent panic.
The code was wrong since rev. 1.1. This panic was found by adding KASSERT
  in uvm_map.c rev. 1.351. This bug may be related to PR kern/26204.
- Use aprint_normal() for non-error message.
2019-05-07 15:23:32 +00:00
hannken
7ccc083a7e Fix build, "pax" must be built before "libprop".
Ok: Matthew Green mrg@
2019-05-07 10:22:54 +00:00
hannken
8c4b1be312 Cleanup modules "solaris" and "zfs":
- Defer spa_config_load() until root is mounted.
- Restore the config path to "/etc/zfs/zpool.cache".
- Module "zfs" is type MODULE_CLASS_VFS and no longer depends on "rootvnode".
- Module "solaris" no longer depends on "mp_online".
- Fix rump component registration to not detach "/dev/zfs" if
  it didn't attach it.
2019-05-07 08:51:09 +00:00
hannken
db54d209c2 This implementation of Solaris taskq API is incomplete and doesn't track
Solaris upstream.  FreeBSD already replaced it with a glue to their
taskqueue API.

Replace it with a glue component that queues Solaris taskq requests to
threadpool jobs.
2019-05-07 08:49:59 +00:00
wiz
43723405a4 Fix typos. Fix link. Use Pa for path. 2019-05-07 08:14:59 +00:00
mrg
fa12701147 convert to USBHIST style debugging. 2019-05-07 05:17:22 +00:00
thorpej
1984711d9b Note installboot(8) for evbarm. 2019-05-07 05:06:42 +00:00
thorpej
02d67d1066 Add installboot(8) support for evbarm (and, in the future, other evb*)
boards that use u-boot.  A known board database lists boards and their
respective u-boot packages.  u-boot packages are discovered at run-time
(in /usr/pkg/share/u-boot, by default).  These packages contain board
database overlays that describe u-boot installation procedure that's
specific for that board.

Support this as a native tool and as a host tool.  The native tool
will attempt to determine the running board type using OpenFirmware
calls.  Host tool and native tool alike may also specify a board type
directly using the "-o board=xxx option" or have installboot(8) determine
the board type from a device tree blob using "-o dtb=/path/to/board.dtb".
A "-o media=xxx" option is provided for boards that have different u-boot
binaries and/or installation procedures for different media types (e.g.
SDMMC, eMMC, or USB).

This is trivial to extend to other evb* platforms that use u-boot, even if
they don't use FDT for autoconfiguration.
2019-05-07 05:02:41 +00:00
thorpej
e5c09b191b Use designated initializers for struct ib_mach. 2019-05-07 04:35:31 +00:00
thorpej
d380747e98 Add support for libprop as a host tool library. 2019-05-07 04:29:45 +00:00
thorpej
4a04944f52 Add "nextthing,pocketchip" to the head of the 'compatible' property
so that this device tree can be distinguished from that of the base
CHIP.  "nextthing,chip" remains in the list, but one match-priority
notch down.
2019-05-07 04:21:09 +00:00
kamil
bca8c3ffc4 Switch all users (except ia64) of custom machine/ansi.h to common_ansi.h
Deduplicate the code among ports and poll definitions of types
directly from a compiler.

This fixes miscompilation of certain programs that instruct compilers
to generate code for different types. This bug has been detected with
-fshort-wchar in EFI firmware.

Proposed and discussed on a mailing list (twice).

Itanium uses custom !ELF fallback switch, temporarily leave it as it is.
2019-05-07 03:49:25 +00:00
scole
5a014d7a0b Avoid some RAW dependency compilation warnings 2019-05-07 02:05:17 +00:00
mrg
d14f8b931e revert most of:
>fix umodem(4) detach:
>
>- ucom(4) needs kpreempt disabled around softint_schedule()
>- switch a copied printf() to aprint_error_dev()
>- use static normally in umodem_common.c
>- remove unused sc_openings in softc, convert sc_dying to real bool
>- add sc_refcnt, sc_lock and sc_detach_cv to softc.  usage is:
>  - sc_dying is protected by sc_lock
>  - sc_detach_cv is matched with sc_lock for cv operations
>  - sc_refcnt is increased in open and decreased in close, any time
>    it is decreased, it is checked for less than zero, and a broadcast
>    performed on sc_detach_cv.  detach waits for sc_refcnt.
>- umodem_param() and umodem_set() check for sc_dying
>
>this fixes pullout out an open ucom@umodem.
>
>@skrll.
>
>XXX: pullup

it only fixes the issue by chance (slightly delays, which
allows task to run, but there is no guarantee.  real fix
is incoming for all ucom parents.
2019-05-06 23:47:39 +00:00
mrg
45f153a473 revert most of:
>fix uchcom(4) detach, like umodem(4) recently:
>
>- use static normally in umodem_common.c
>- add sc_refcnt, sc_lock and sc_detach_cv to softc.  usage is:
>  - sc_dying is protected by sc_lock
>  - sc_detach_cv is matched with sc_lock for cv operations
>  - sc_refcnt is increased in open and decreased in close, any time
>    it is decreased, it is checked for less than zero, and a broadcast
>    performed on sc_detach_cv.  detach waits for sc_refcnt
>  - uchcom_param() and uchcom_set() check for sc_dying
>
>this fixes pullout out an open ucom@uchcom.

it only fixes the issue by chance (slightly delays, which
allows task to run, but there is no guarantee.  real fix
is incoming for all ucom parents.
2019-05-06 23:46:25 +00:00
christos
c1f68528e1 Avoid clang bug on earm with SSP/FORTIFY:
rt_libelftc_dem_gnu3.c:3567:3: warning: '__builtin___memset_chk' will always
      overflow destination buffer [-Wbuiltin-memcpy-chk-size]
		      memset(&f, 0, FLOAT_EXTENED_BYTES);
2019-05-06 23:20:51 +00:00
christos
41bb817512 You don't have to be _LP64 to run 32 bit binaries. You can be mips (64 bit
kernel/32 bit userland).
2019-05-06 19:20:13 +00:00
sevan
114620fd30 Bump size to resolve build. 2019-05-06 17:20:38 +00:00
ryo
7f8e059414 cv_init() must be done before calling maple_scanbus().
ok tsutsui@
2019-05-06 17:16:41 +00:00
ryo
de07935937 don't use tsleep() in interrupt context.
when the audio starts playing, initialization is performed on the aica arm driver side.
2019-05-06 17:12:50 +00:00
sevan
035b462fcd Oops, disable FILECORE as intended.
heads up <leot> <wiz>
2019-05-06 11:59:46 +00:00