Commit Graph

267374 Commits

Author SHA1 Message Date
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
kamil 453514a280 Add support for SIGRTMIN+1..SIGRTMAX-1 signals in ktruss(1)
Generate misc.c and misc.h with entries for signals between SIGRTMIN+1
and SIGRTMAX-1.
2019-05-06 11:58:37 +00:00
kamil 1ee0f07b95 siginfo(2): Ship with MI syscall information of a debugged process for
SIGTRAP and si_code TRAP_SCE/TRAP_SCX.
2019-05-06 08:32:40 +00:00
kamil 595032add5 Welcome to NetBSD 8.99.38!
Signal code struct and API changes.
2019-05-06 08:07:41 +00:00
kamil 7dee562254 Ship with syscall information with SIGTRAP TRAP_SCE/TRAP_SCX for tracers
Expand siginfo_t (struct size not changed) to new values for
SIGTRAP TRAP_SCE/TRAP_SCX events.

 - si_sysnum  -- syscall number (int)
 - si_retval  -- return value (2 x int)
 - si_error   -- error code (int)
 - si_args    -- syscall arguments (8 x uint64_t)

TRAP_SCE delivers si_sysnum and si_args.

TRAP_SCX delivers si_sysnum, si_retval, si_error and si_args.

Users: debuggers (like GDB) and syscall tracers (like strace, truss).

This MI interface is similar to the Linux kernel proposal of
PTRACE_GET_SYSCALL_INFO by the strace developer team.
2019-05-06 08:05:03 +00:00
wiz fd62bcefca Remove extra word. 2019-05-06 06:56:36 +00:00
wiz c1260514c9 Sort SEE ALSO. 2019-05-06 06:56:07 +00:00
mrg 0f723754e6 add a 'devs' script to display a list of all devices by device_t,
name, parent, private data.

for procs, put the printf \n into the same line.  non trivial
speed up with large process table.
2019-05-06 02:41:02 +00:00
sevan f8755991ed Use filesystems.config to reduce duplication 2019-05-06 02:24:37 +00:00
sevan 1850e1c560 Add ADOSFS & FILECORE (both disabled) 2019-05-06 01:43:09 +00:00
sevan d8c01e6105 Add V7FS (disabled) 2019-05-06 01:20:42 +00:00
sevan 851e065a7d Add autofs pseudo device (disabled)
Add a description for existing pseudo devices
2019-05-06 01:11:42 +00:00