NetBSD/sys/kern
thorpej 2685996b0e Merge thorpej-cfargs branch:
Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
  actually needed.
- Don't be explicit about what interface attribute is attaching if
  the device only has one.  (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
  situations, making is visibly easier to see when indirect config is
  in play, and allowing for future change in semantics.  (As of now,
  this is just a wrapper around config_match(), but that is an
  implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance.  This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
2021-04-24 23:36:23 +00:00
..
bufq_disksort.c
bufq_fcfs.c
bufq_priocscan.c
bufq_readprio.c
cnmagic.c
compat_stub.c Separate the compat_netbsd32_coredump from the compat_netbsd32 and 2020-11-01 18:51:02 +00:00
core_elf32.c Use <compat/netbsd32/netbsd32.h> instead of <machine/netbsd32_machdep.h>, 2021-01-02 02:13:42 +00:00
core_elf64.c
core_netbsd.c Move all non-emulation-specific coredump code into the coredump module, 2019-11-20 19:37:51 +00:00
exec_aout.c Move all non-emulation-specific coredump code into the coredump module, 2019-11-20 19:37:51 +00:00
exec_ecoff.c Move all non-emulation-specific coredump code into the coredump module, 2019-11-20 19:37:51 +00:00
exec_elf32.c Move all non-emulation-specific coredump code into the coredump module, 2019-11-20 19:37:51 +00:00
exec_elf64.c Move all non-emulation-specific coredump code into the coredump module, 2019-11-20 19:37:51 +00:00
exec_elf.c Tidy up the vnode locking around execve() on ELF images to acquire and 2020-01-12 18:30:58 +00:00
exec_script.c Fix typo in comment. 2020-03-23 02:44:22 +00:00
exec_subr.c Replace most uses of vp->v_usecount with a call to vrefcnt(vp), a function 2020-04-13 19:23:17 +00:00
files.kern Separate the compat_netbsd32_coredump from the compat_netbsd32 and 2020-11-01 18:51:02 +00:00
genlintstub.awk
init_main.c Expose olde style intrcnt interrupt accounting via event counters. 2021-04-01 04:41:38 +00:00
init_sysctl_base.c Allow architectures to define a macro PROC_MACHINE_ARCH(P) and 2017-10-31 12:37:23 +00:00
init_sysctl.c KNF (sort #includes and remove duplicate sys/cpu.h) 2020-09-20 12:51:57 +00:00
init_sysent.c regen 2020-11-02 18:56:15 +00:00
kern_acct.c Move proc_lock into the data segment. It was dynamically allocated because 2020-05-23 23:42:41 +00:00
kern_auth.c Add ACL support for FFS. From FreeBSD. 2020-05-16 18:31:45 +00:00
kern_cctr.c Add some more detail/explanation to the calibration timing diagram. 2020-10-10 18:18:04 +00:00
kern_cfglock.c
kern_clock.c entropy: Sample cycle counter or timecounter in hardclock. 2021-01-16 02:20:00 +00:00
kern_condvar.c PR/55664: Ruslan Nikolaev: Split out sleepq guts and turnstiles not used 2020-11-01 20:55:15 +00:00
kern_core.c Separate the compat_netbsd32_coredump from the compat_netbsd32 and 2020-11-01 18:51:02 +00:00
kern_cpu.c PR kern/45117 2020-10-08 09:16:13 +00:00
kern_crashme.c Fix outdated comment. We've enabled crashme for non-DEBUG kernels. 2020-04-23 03:15:47 +00:00
kern_ctf.c Check the CTF magic number in an endian friendly way (and don't use 2021-04-06 07:57:03 +00:00
kern_descrip.c Avoid negating the minimum size of pid_t (this overflows). 2020-12-24 12:14:50 +00:00
kern_drvctl.c Update for proplib(3) API changes. 2020-06-11 02:28:01 +00:00
kern_entropy.c entropy: Only print consolidation warning of AB_DEBUG. 2021-02-12 19:48:26 +00:00
kern_event.c Fix non-DIAGNOSTIC build 2021-01-27 06:59:08 +00:00
kern_exec.c Refactor interval timers to make it possible to support types other than 2020-12-05 18:17:01 +00:00
kern_exit.c Refactor interval timers to make it possible to support types other than 2020-12-05 18:17:01 +00:00
kern_fileassoc.c
kern_fork.c Move proc_lock into the data segment. It was dynamically allocated because 2020-05-23 23:42:41 +00:00
kern_history.c Traiing whitespace 2019-10-09 05:59:51 +00:00
kern_hook.c Add and use __FPTRCAST, requested by uwe@ 2019-10-16 18:29:49 +00:00
kern_idle.c Round of uvm.h cleanup. 2020-09-05 16:30:10 +00:00
kern_ksyms_buf.c
kern_ksyms.c The current MIPS DDB stacktrace code doesn't work if no symbols are 2020-09-23 09:52:02 +00:00
kern_kthread.c New functions kthread_fpu_enter/exit. 2020-08-01 02:04:55 +00:00
kern_ktrace_vfs.c
kern_ktrace.c Use "static" in the function intro if the function is static. 2021-02-27 13:02:42 +00:00
kern_lock.c Comments. 2020-12-22 01:57:29 +00:00
kern_lwp.c Improve English in comments 2021-01-13 07:36:56 +00:00
kern_malloc.c Add support for Kernel Memory Sanitizer (kMSan). It detects uninitialized 2019-11-14 16:23:52 +00:00
kern_module_hook.c Trailing whitespace 2019-12-13 08:02:53 +00:00
kern_module_vfs.c Merge the [pgoyette-compat] branch 2019-01-27 02:08:33 +00:00
kern_module.c uvm_availmem(): give it a boolean argument to specify whether a recent 2020-06-11 19:20:42 +00:00
kern_mutex_obj.c Add some new functions for lock objects: 2020-01-01 21:34:39 +00:00
kern_mutex.c Fix an IPI deadlock scenario that resulted in a TLB shootdown timeout 2021-04-03 14:56:13 +00:00
kern_ntptime.c Zero out the ntptimeval structure to prevent a 4 byte kernel stack disclosure. 2018-10-29 22:02:25 +00:00
kern_pax.c PAX_SEGVGUARD doesn't seem to work properly in testing for me, but at least 2020-01-23 10:21:14 +00:00
kern_physio.c OR into bp->b_cflags; don't overwrite. 2020-03-14 15:31:29 +00:00
kern_pmf.c Oops, missed a couple. 2020-06-11 02:30:21 +00:00
kern_proc.c Avoid negating the minimum size of pid_t (this overflows). 2020-12-24 12:14:50 +00:00
kern_prot.c Move proc_lock into the data segment. It was dynamically allocated because 2020-05-23 23:42:41 +00:00
kern_ras.c Remove charade dancing around now-dead RCU patent. 2019-12-14 16:58:25 +00:00
kern_rate.c
kern_reboot.c Mistake in previous - lwp_t *l was not meant to be static. 2020-02-23 22:56:41 +00:00
kern_resource.c Move proc_lock into the data segment. It was dynamically allocated because 2020-05-23 23:42:41 +00:00
kern_runq.c Oops. If a SCHED_RR thread is preempted and has exceeded its timeslice it 2020-05-23 21:24:41 +00:00
kern_rwlock_obj.c Add some new functions for lock objects: 2020-01-01 21:34:39 +00:00
kern_rwlock.c Add rw_lock_op(): return either RW_READER or RW_WRITER for a lock that is 2020-02-22 21:24:44 +00:00
kern_scdebug.c syscall debug - fix build when SYSCALL_DEBUG option is present in kernel config file 2019-03-14 19:51:49 +00:00
kern_sdt.c
kern_sig.c CTASSERT that NSIG <= 128. There are many hard-coded assumptions that 2021-04-03 11:19:11 +00:00
kern_sleepq.c - sleepq_block(): Add a new LWP flag, LW_CATCHINTR, that is used to track 2020-10-23 00:25:45 +00:00
kern_softint.c softint_disestablish(): use a high priority xcall to determine that the 2020-05-17 14:11:30 +00:00
kern_ssp.c
kern_stub.c New functions kthread_fpu_enter/exit. 2020-08-01 02:04:55 +00:00
kern_subr.c Restore missing message for RB_ASKNAME. 2020-11-21 08:10:27 +00:00
kern_synch.c Move proc_lock into the data segment. It was dynamically allocated because 2020-05-23 23:42:41 +00:00
kern_syscall.c PR/55629: Andreas Gustafsson: Don't crash when an emulation does not provide 2020-08-31 19:51:30 +00:00
kern_sysctl.c Sort includes, nix trailing whitespace, fix comment. 2020-08-27 14:11:57 +00:00
kern_tc.c Sort includes. 2021-04-08 06:20:47 +00:00
kern_threadpool.c threadpool(9): Fix synchronization between cancel and dispatch. 2021-01-23 16:33:49 +00:00
kern_time.c Centralise the setitimer() timer type validation in dosetitimer() as is 2021-04-03 12:57:21 +00:00
kern_timeout.c Stop allocating struct cpu_info in BSS; No need to db_read_bytes() 2020-06-27 01:26:32 +00:00
kern_todr.c Print the "preposterous TOD clock time" message only if the RTC is 2021-04-03 12:06:53 +00:00
kern_turnstile.c - Replace pid_table_lock with a lockless lookup covered by pserialize, with 2020-05-23 20:45:10 +00:00
kern_uidinfo.c Add a sysctl hashstat collector for uihash. 2021-04-01 06:25:45 +00:00
kern_uuid.c
kern_veriexec.c Oops, missed a couple. 2020-06-11 02:30:21 +00:00
kgdb_stub.c Improve English in comments 2021-01-13 07:36:56 +00:00
Make.tags.inc
Makefile
makesyscalls.sh use the first element of the array instead 2021-04-14 02:45:40 +00:00
sched_4bsd.c Oops. If a SCHED_RR thread is preempted and has exceeded its timeslice it 2020-05-23 21:24:41 +00:00
sched_m2.c Oops. If a SCHED_RR thread is preempted and has exceeded its timeslice it 2020-05-23 21:24:41 +00:00
subr_acl_nfs4.c Add ACL support for FFS. From FreeBSD. 2020-05-16 18:31:45 +00:00
subr_acl_posix1e.c Add ACL support for FFS. From FreeBSD. 2020-05-16 18:31:45 +00:00
subr_asan.c While we are inside ddb, allow all memory access. 2020-12-18 15:33:34 +00:00
subr_autoconf.c Merge thorpej-cfargs branch: 2021-04-24 23:36:23 +00:00
subr_blist.c
subr_bufq.c rename module_name to strategy_module_name to avoid fatal shadowing of 2019-02-17 23:17:41 +00:00
subr_callback.c
subr_copy.c Move proc_lock into the data segment. It was dynamically allocated because 2020-05-23 23:42:41 +00:00
subr_cprng.c Remove cprng initialization order hack. 2020-05-11 21:40:12 +00:00
subr_cpu.c Don't dump the CPU topology in the uninspiring case of a single CPU. 2020-09-23 12:05:16 +00:00
subr_cpufreq.c
subr_csan.c kcsan: fix the copyright notices 2020-09-10 14:04:45 +00:00
subr_debug.c
subr_device.c Fix a comment. Thanks rillig@ for pointing it out! 2021-02-06 05:33:20 +00:00
subr_devsw.c Add two utility functions to help use kmem with strings: kmem_strdupsize, 2017-11-07 18:35:57 +00:00
subr_disk_mbr.c Revert subr_disk_mbr.c r.1.54 2019-11-07 20:34:29 +00:00
subr_disk_open.c Make getdiskinfo() compatible with a DIOCGWEDGEINFO. 2020-02-29 14:44:44 +00:00
subr_disk.c Attach disk info even for zero sized disks. 2020-10-17 09:42:35 +00:00
subr_disklabel.c Fix previous. We define _KERNEL for rump in opt_rumpkernel.h. 2019-04-07 02:58:02 +00:00
subr_emul.c Merge the [pgoyette-compat] branch 2019-01-27 02:08:33 +00:00
subr_evcnt.c avoid an error in the recent sys/evcnt.h change to drop the 0 2021-04-17 00:05:31 +00:00
subr_exec_fd.c Move proc_lock into the data segment. It was dynamically allocated because 2020-05-23 23:42:41 +00:00
subr_extent.c More diagnostic 2019-08-15 09:04:22 +00:00
subr_fault.c be one-shot by default, with room for circular 2020-06-30 16:28:17 +00:00
subr_hash.c Don't call strncmp() where the length arg is the size of a pointer 2021-04-05 05:47:31 +00:00
subr_humanize.c This had a similar problem to that reported in PR lib/54053 2019-03-12 00:25:44 +00:00
subr_interrupt.c - don't return ENOMEM for errors not related to memory 2018-01-28 22:24:58 +00:00
subr_iostat.c Implement disk_rename()/iostat_rename() to rename a disk. 2019-05-22 08:47:02 +00:00
subr_ipi.c ipi: Membar audit. 2020-11-27 20:11:33 +00:00
subr_kcov.c Sync trace-pc and trace-cmp. 2020-07-03 16:11:11 +00:00
subr_kcpuset.c Set kcpuset's bit correctly to avoid undefined behavior. Found by KUBSan. 2019-07-26 05:39:55 +00:00
subr_kmem.c Do not cast memcpy arguments when the intention is unaligned access. 2021-02-06 13:54:48 +00:00
subr_kobj_vfs.c
subr_kobj.c print the index of the problematic symbol 2020-06-27 17:27:59 +00:00
subr_localcount.c Implement a debugging facility (overflow/underflow detection) for localcount 2017-11-17 09:26:36 +00:00
subr_lockdebug.c KNF. No binary changes. 2021-03-02 01:20:35 +00:00
subr_log.c Use sel{record,remove}_knote(). 2020-12-11 03:00:09 +00:00
subr_lwp_specificdata.c Implement an aggressive psref leak detector 2019-05-17 03:34:26 +00:00
subr_msan.c kmsan: update the copyright notices 2020-09-09 16:29:59 +00:00
subr_once.c add INIT_ONCE(9), FINI_ONCE(9) with changing once_t. 2019-03-19 08:16:51 +00:00
subr_optstr.c
subr_pcq.c Fix typo in comment. 2021-02-08 09:31:05 +00:00
subr_pcu.c pcu_available_p is only used in KASSERT(), fix non-diagnostic build. 2020-08-07 18:46:00 +00:00
subr_percpu.c Teach percpu to run constructors on CPU attach. 2020-05-11 21:37:31 +00:00
subr_physmap.c Fix some more uvm.h cleanup fallout. 2020-09-06 15:27:22 +00:00
subr_pool.c skip redzone on pools with the allocation (including all overhead) 2021-02-24 05:36:02 +00:00
subr_prf.c Add printf_nostamp(9), kernel printf() without prepending a timestamp. 2021-03-10 13:27:51 +00:00
subr_prof.c Overhaul the API used to fetch and store individual memory cells in 2019-04-06 03:06:23 +00:00
subr_pserialize.c Switch psz_ev_excl to static evcnt. 2019-12-05 03:21:29 +00:00
subr_psref.c Implement an aggressive psref leak detector 2019-05-17 03:34:26 +00:00
subr_specificdata.c
subr_spldebug.c
subr_syscall_stats.c Merge the [pgoyette-compat] branch 2019-01-27 02:08:33 +00:00
subr_tftproot.c Remove unnecessary inclusion of <sys/timevar.h> 2020-12-05 17:42:29 +00:00
subr_thmap.c thmap: Use keyed BLAKE2s for second-level hash and beyond. 2020-08-31 20:22:57 +00:00
subr_time.c restore flags-as-bitmask, just in case another function is passing its 2021-03-18 14:05:37 +00:00
subr_userconf.c call cnpollc(1) and cnpollc(0) around cngetc(). 2018-09-16 23:18:55 +00:00
subr_vmem.c Nix trailing whitespace. 2020-06-20 18:30:53 +00:00
subr_workqueue.c workqueue: Lift unnecessary restriction on workqueue_wait. 2020-09-08 17:02:18 +00:00
subr_xcall.c Comments. 2020-12-22 01:57:29 +00:00
sys_aio.c Move proc_lock into the data segment. It was dynamically allocated because 2020-05-23 23:42:41 +00:00
sys_descrip.c UVM locking changes, proposed on tech-kern: 2020-02-23 15:46:38 +00:00
sys_futex.c Revert "Use cv_timedwaitclock_sig in futex." 2020-05-05 15:25:18 +00:00
sys_generic.c Move proc_lock into the data segment. It was dynamically allocated because 2020-05-23 23:42:41 +00:00
sys_getrandom.c New system call getrandom() compatible with Linux and others. 2020-08-14 00:53:15 +00:00
sys_lwp.c Move proc_lock into the data segment. It was dynamically allocated because 2020-05-23 23:42:41 +00:00
sys_module.c Rename the MODULE_*_HOOK() macros to MODULE_HOOK_*() as briefly 2019-03-01 11:06:55 +00:00
sys_mqueue.c Move proc_lock into the data segment. It was dynamically allocated because 2020-05-23 23:42:41 +00:00
sys_pipe.c Fix a thundering herd problem in pipes. 2021-01-25 19:21:11 +00:00
sys_process_lwpstatus.c Include missing <sys/proc.h>. Hopefully fix build for everyone except vax, 2020-10-20 22:31:20 +00:00
sys_process.c Catch up with the usage of struct vmspace::vm_refcnt 2020-05-26 00:50:53 +00:00
sys_pset.c Move proc_lock into the data segment. It was dynamically allocated because 2020-05-23 23:42:41 +00:00
sys_ptrace_common.c Merge the two separate sets of init/fini routines and unbreak the build. 2020-11-04 19:27:41 +00:00
sys_ptrace.c Don't use == for assignment. 2020-11-04 19:16:34 +00:00
sys_sched.c Move proc_lock into the data segment. It was dynamically allocated because 2020-05-23 23:42:41 +00:00
sys_select.c Add sel{record,remove}_knote(), so hide some of the details surrounding 2020-12-11 01:25:29 +00:00
sys_sig.c Move proc_lock into the data segment. It was dynamically allocated because 2020-05-23 23:42:41 +00:00
sys_socket.c When SS_RESTARTSYS was added, it was accidentally given the same value as 2020-11-17 03:22:33 +00:00
sys_syscall.c Retire KLEAK. 2020-02-08 07:07:06 +00:00
syscalls_autoload.c regen 2020-11-02 18:56:15 +00:00
syscalls.c regen 2020-11-02 18:56:15 +00:00
syscalls.conf Add ACL support for FFS. From FreeBSD. 2020-05-16 18:31:45 +00:00
syscalls.master PR/55777: Ruslan Nikolaev: Make clock_getcpuclockid2 accessible from rump 2020-11-02 18:55:12 +00:00
systrace_args.c regen 2021-04-14 02:45:58 +00:00
sysv_ipc.c Explicitly cast pointers to uintptr_t before casting to enums. They are 2020-02-21 00:26:21 +00:00
sysv_msg.c Avoid -LONG_MIN msgtyp in msgrcv(2) and treat it as LONG_MAX 2019-10-04 23:20:22 +00:00
sysv_sem.c Many years ago someone created a new __link_set_sysctl_funcs to hold 2019-08-07 00:38:01 +00:00
sysv_shm.c simpler fix for the race between shmat() and shmdt(): 2019-10-09 17:47:13 +00:00
tty_bsdpty.c
tty_conf.c
tty_ptm.c PR kern/55237: Panic: vrelel: bad ref count (9.99.54) 2020-05-23 22:16:17 +00:00
tty_pty.c Use sel{record,remove}_knote(). 2020-12-11 03:00:09 +00:00
tty_subr.c s/transfered/transferred/ 2019-12-27 09:41:48 +00:00
tty_tty.c Move proc_lock into the data segment. It was dynamically allocated because 2020-05-23 23:42:41 +00:00
tty.c Use sel{record,remove}_knote(). 2020-12-11 03:00:09 +00:00
uipc_accf.c
uipc_domain.c PR/55777: Ruslan Nikolaev: Move the unp_sysctl_create to uipc_usrreq.c to 2020-11-06 14:50:13 +00:00
uipc_mbuf.c Revert accidentally committed debug code. Sorry. 2021-03-04 01:37:42 +00:00
uipc_mbufdebug.c KNF. No functional change. 2018-10-18 05:44:19 +00:00
uipc_proto.c
uipc_sem.c when updating the per-uid "semcnt", decrement the counter for the uid 2020-12-14 23:12:12 +00:00
uipc_socket2.c Add missing opt_inet.h. 2021-03-04 01:35:31 +00:00
uipc_socket.c Use sel{record,remove}_knote(). 2020-12-11 03:00:09 +00:00
uipc_syscalls.c Move proc_lock into the data segment. It was dynamically allocated because 2020-05-23 23:42:41 +00:00
uipc_usrreq.c PR/55777: Ruslan Nikolaev: Move the unp_sysctl_create to uipc_usrreq.c to 2020-11-06 14:50:13 +00:00
vfs_acl.c Add ACL support for FFS. From FreeBSD. 2020-05-16 18:31:45 +00:00
vfs_bio.c Add a sysctl hashstat collector for bufhash. 2021-04-01 06:25:59 +00:00
vfs_cache.c Be more clear and don't rely on cur being the first member. 2020-12-12 18:41:13 +00:00
vfs_cwd.c Revert the changes made in February to make cwdinfo use mostly lockless, 2020-04-21 21:42:47 +00:00
vfs_dirhash.c Introduce PR_ZERO to avoid open-coding memset()s everywhere. OK riastradh@. 2019-02-10 17:13:33 +00:00
vfs_getcwd.c Add ACL support for FFS. From FreeBSD. 2020-05-16 18:31:45 +00:00
vfs_hooks.c
vfs_init.c introduce vfs.generic.timestamp_precision sysctl to control precision 2021-02-04 21:07:06 +00:00
vfs_lockf.c
vfs_lookup.c Honor LOCKPARENT for ".." of the root directory. 2020-12-29 22:13:40 +00:00
vfs_mount.c Reorganize uvm_swap_shutdown() a bit, make sure the vnode gets 2021-02-16 09:56:32 +00:00
vfs_quotactl.c
vfs_subr.c introduce vfs.generic.timestamp_precision sysctl to control precision 2021-02-04 21:07:06 +00:00
vfs_syscalls.c Don't allow callers of fsync_range() to trigger UB in the kernel. 2021-02-17 17:39:08 +00:00
vfs_trans.c Reorganise the locking and allocation of fstrans_lwp_info slightly, to 2020-05-17 19:34:07 +00:00
vfs_vnode.c Add a sysctl hashstat collector for vcache. 2021-04-01 06:26:14 +00:00
vfs_vnops.c Lock the vnode while calling VOP_BMAP() for FIOGETBMAP. 2020-11-09 18:09:02 +00:00
vfs_wapbl.c fix wapbl_discard() to actually discard the queued bufs properly - need 2020-04-12 17:02:52 +00:00
vfs_xattr.c Add ACL support for FFS. From FreeBSD. 2020-05-16 18:31:45 +00:00
vnode_if.c Regen. 2020-05-18 08:30:06 +00:00
vnode_if.sh Add ACL support for FFS. From FreeBSD. 2020-05-16 18:31:45 +00:00
vnode_if.src VOP_STRATEGY() may still deadlock with devices. 2020-05-18 08:29:34 +00:00