Home | History | Annotate | only in /src/share/man/man9
History log of /src/share/man/man9
RevisionDateAuthorComments
 1.2 05-Apr-2010  joerg branches: 1.2.2;
Canonical prolog order
 1.1 25-Jan-2010  jruoho Add CTASSERT(9). From FreeBSD.

ok @wiz
 1.2.2.2 05-Apr-2010  joerg Canonical prolog order
 1.2.2.1 05-Apr-2010  joerg file CTASSERT.9 was added on branch uebayasi-xip on 2010-04-05 19:18:46 +0000
 1.13 27-Sep-2011  jym Document new *ASSERTMSG() prototype, and update KASSERT(9).

See also
http://mail-index.netbsd.org/tech-kern/2011/09/07/msg011427.html
 1.12 06-Apr-2011  jruoho Note also KASSERTMSG(). Small markup changes.
 1.11 26-Jan-2011  wiz Fix typo.
 1.10 25-Jan-2011  yamt - add some random notes

Basically, KASSERT() should be used for light-weight checks and
KDASSERT() should be used for heavier ones.

Callers should not rely on the side effects of expression because,
depending on the kernel compile options mentioned above, expression might
not be evaluated at all.

- Xr options(4)
- bump date
 1.9 29-Oct-2010  wiz branches: 1.9.2;
Sort SEE ALSO.
 1.8 28-Oct-2010  jruoho Xref CTASSERT(9).
 1.7 11-Jul-2008  gdt branches: 1.7.10;
Changemanpages written by Igor Sobrado to 2-clause license, per
private email from Igor. Drop attribution to Matt Thomas in those man
pages, per private email from Matt. In coredump_write.9, fix
capitalization of THomas. Requested by martin@.
 1.6 10-May-2008  martin Simplify some unclear grammar (sync KASSERT and KDASSERT wording)
 1.5 10-May-2008  martin Backout previous: the license sweep touched these files in error, so
restore the old license.
 1.4 30-Apr-2008  martin branches: 1.4.2;
Convert TNF licenses to new 2 clause variant
 1.3 10-Dec-2006  pooka branches: 1.3.10; 1.3.12;
fix description to match the code
 1.2 30-Jul-2006  wiz branches: 1.2.4;
Fix xref. New sentence, new line. Remove superfluous quotes.
 1.1 27-Jul-2006  gdt man pages contributed by Igor Sobrado.
 1.2.4.1 12-Dec-2006  tron Pull up following revision(s) (requested by pooka in ticket #268):
share/man/man9/KASSERT.9: revision 1.3
fix description to match the code
 1.3.12.1 18-May-2008  yamt sync with head.
 1.3.10.2 05-Oct-2008  mjf Sync with HEAD.
 1.3.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.4.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.7.10.1 06-Nov-2010  uebayasi Sync with HEAD.
 1.9.2.1 08-Feb-2011  bouyer Sync with HEAD
 1.2 15-Feb-2022  wiz Fix typo, use Nm instead of Xr to itself.
 1.1 15-Feb-2022  riastradh KERNEL_LOCK(9): New man page for old not-dead-yet hack.

I'm not documenting this to encourage anyone to use it. I'm only
documenting this to remind myself what the semantics is, because it's
kind of confusing and not at all like mutex(9).
 1.3 31-May-2022  andvar fix various typos in comments, documentation and messages.
 1.2 09-Dec-2007  yamt branches: 1.2.4;
should -> can
 1.1 09-Dec-2007  yamt document LWP_CACHE_CREDS.
 1.2.4.2 09-Jan-2008  matt sync with HEAD
 1.2.4.1 09-Dec-2007  matt file LWP_CACHE_CREDS.9 was added on branch matt-armv6 on 2008-01-09 01:39:17 +0000
 1.475 06-Sep-2025  riastradh paravirt_membar_sync(9): New memory barrier.

For use in paravirtualized drivers which require store-before-load
ordering -- irrespective of whether the kernel is built for a single
processor, or whether the (virtual) machine is booted with a single
processor.

This is even required on architectures that don't even have a
store-before-load ordering barrier, like m68k; adding, e.g., a virtio
bus is _as if_ the architecture has been extended with relaxed memory
ordering when talking with that new bus. Such architectures need
some way to request the hypervisor enforce that ordering -- on m68k,
that's done by issuing a CASL instruction, which qemu maps to an
atomic r/m/w with sequential consistency ordering in the host.

PR kern/59618: occasional virtio block device lock ups/hangs
 1.474 21-Jun-2025  gutteridge Add heartbeat(9) to installed man pages
 1.473 05-Aug-2024  christos Add a man page for acct_process to be referenced from acct.5
 1.472 24-Jul-2024  rin crashme(9): Install man page

Suggested by ozaki-r@
 1.471 10-Jul-2024  rin man9: Provide all combinations of {,u}{i,l}{max,min}(9)
 1.470 14-Jun-2024  riastradh branches: 1.470.2;
uvm_obj_wirepages(9): New man page.
 1.469 07-Jan-2024  pgoyette Install securelevel.9 as an alias of secmodel_securelevel.9

According to submitter, this should be sufficient to address misc/57824.
 1.468 02-Dec-2023  thorpej Add a vmem_xalloc_addr() function, which allocates a specific address
from an arena. This is just a convenience wrapper around vmem_xalloc(),
that's just a bit more obvious how to use and performs some additional
sanity checks.
 1.467 08-Jul-2023  christos Document how system call versioning is done. From this summer's compat-linux
GSoC, by Theodore Preduta.
 1.466 06-Mar-2023  uwe portfeatures(9): the man page for the __HAVE macros

The man page itself is a skeleton/template for now. Please add short
descriptions and xrefs. If the target man page doesn't yet document
relevant __HAVE macros (hi, mutex(9)), please add something there,
possibly in a .Sh IMPLEMENTATION NOTES section.
 1.465 04-Sep-2022  thorpej branches: 1.465.2;
Document the pktqueue interface.
 1.464 15-Feb-2022  riastradh KERNEL_LOCK(9): New man page for old not-dead-yet hack.

I'm not documenting this to encourage anyone to use it. I'm only
documenting this to remind myself what the semantics is, because it's
kind of confusing and not at all like mutex(9).
 1.463 12-Feb-2022  riastradh __cpu_simple_lock(9): New man page.

This doesn't mean you should use it! Mostly it's to document the
semantics to help understand existing uses, which should not
proliferate, and audit definitions.
 1.462 17-Jan-2022  christos Add new acl vnode op pages
 1.461 17-Jan-2022  christos Add acl related changes; there is no more vaccess; document the genfs functions
instead.
 1.460 22-Dec-2021  thorpej Document PR_PSERIALIZE. Remove documentation for pool_cache_setpredestruct().
 1.459 21-Dec-2021  thorpej Add pool_cache_setpredestruct(), which allows a pool cache to specify
a function to be called before the destructor for a batch of one or more
objects is called. This can be used as a synchronization point by
subsystems that rely on the type-stable nature of pool cache objects or
subsystems that use other forms of passive serialization.
 1.458 28-Apr-2021  thorpej Update autoconf(9) for recent autoconfiguration changes.
 1.457 16-Apr-2021  msaitoh - Remove obsolete cltom(9) and mtocl(9).
- Add missing manual page's link of m_adj.
 1.456 10-Mar-2021  simonb Add printf_nostamp(9), kernel printf() without prepending a timestamp.
 1.455 24-Jan-2021  thorpej Add kmem_tmpbuf_alloc(), a utility function for allocating memory for
temporary use where allocation on the stack is desirable, but only up to
a certain size. If the requested size fits within the specified stack
buffer, the stack buffer is returned. Otherwise, memory is allocated with
kmem_alloc(). Add a corresponding kmem_tmpbuf_free() function that frees
the memory using kmem_free() if it is not the tempory stack buffer location.
 1.454 21-Jan-2021  thorpej Add a manual page for strlist(9).
 1.453 31-Oct-2020  uwe Install ddb(9). Xref it from ddb(4).
 1.452 10-Jul-2020  thorpej Update pci_configure_bus(9) to reflect the new reality -- no more manual
fiddling with extent maps, use pciconf_resource_{init,add,fini}() instead.
 1.451 16-Jun-2020  thorpej Add vmem_xfreeall(), which frees all allocated regions in the specified arena.
All outstanding allocations MUST have been performed with vmem_xalloc() or
else the behavior is undefined. (This also implies that the arena must also
not have a quantum cache; note this in the documentation.)
 1.450 01-May-2020  jdolecek link also m_apply(9) to mbuf(9)
 1.449 30-Apr-2020  riastradh Rewrite entropy subsystem.

Primary goals:

1. Use cryptography primitives designed and vetted by cryptographers.
2. Be honest about entropy estimation.
3. Propagate full entropy as soon as possible.
4. Simplify the APIs.
5. Reduce overhead of rnd_add_data and cprng_strong.
6. Reduce side channels of HWRNG data and human input sources.
7. Improve visibility of operation with sysctl and event counters.

Caveat: rngtest is no longer used generically for RND_TYPE_RNG
rndsources. Hardware RNG devices should have hardware-specific
health tests. For example, checking for two repeated 256-bit outputs
works to detect AMD's 2019 RDRAND bug. Not all hardware RNGs are
necessarily designed to produce exactly uniform output.

ENTROPY POOL

- A Keccak sponge, with test vectors, replaces the old LFSR/SHA-1
kludge as the cryptographic primitive.

- `Entropy depletion' is available for testing purposes with a sysctl
knob kern.entropy.depletion; otherwise it is disabled, and once the
system reaches full entropy it is assumed to stay there as far as
modern cryptography is concerned.

- No `entropy estimation' based on sample values. Such `entropy
estimation' is a contradiction in terms, dishonest to users, and a
potential source of side channels. It is the responsibility of the
driver author to study the entropy of the process that generates
the samples.

- Per-CPU gathering pools avoid contention on a global queue.

- Entropy is occasionally consolidated into global pool -- as soon as
it's ready, if we've never reached full entropy, and with a rate
limit afterward. Operators can force consolidation now by running
sysctl -w kern.entropy.consolidate=1.

- rndsink(9) API has been replaced by an epoch counter which changes
whenever entropy is consolidated into the global pool.
. Usage: Cache entropy_epoch() when you seed. If entropy_epoch()
has changed when you're about to use whatever you seeded, reseed.
. Epoch is never zero, so initialize cache to 0 if you want to reseed
on first use.
. Epoch is -1 iff we have never reached full entropy -- in other
words, the old rnd_initial_entropy is (entropy_epoch() != -1) --
but it is better if you check for changes rather than for -1, so
that if the system estimated its own entropy incorrectly, entropy
consolidation has the opportunity to prevent future compromise.

- Sysctls and event counters provide operator visibility into what's
happening:
. kern.entropy.needed - bits of entropy short of full entropy
. kern.entropy.pending - bits known to be pending in per-CPU pools,
can be consolidated with sysctl -w kern.entropy.consolidate=1
. kern.entropy.epoch - number of times consolidation has happened,
never 0, and -1 iff we have never reached full entropy

CPRNG_STRONG

- A cprng_strong instance is now a collection of per-CPU NIST
Hash_DRBGs. There are only two in the system: user_cprng for
/dev/urandom and sysctl kern.?random, and kern_cprng for kernel
users which may need to operate in interrupt context up to IPL_VM.

(Calling cprng_strong in interrupt context does not strike me as a
particularly good idea, so I added an event counter to see whether
anything actually does.)

- Event counters provide operator visibility into when reseeding
happens.

INTEL RDRAND/RDSEED, VIA C3 RNG (CPU_RNG)

- Unwired for now; will be rewired in a subsequent commit.
 1.448 23-Feb-2020  mrg install rw_lock_op link too.
 1.447 07-Feb-2020  thorpej Document percpu_foreach_xcall().
 1.446 01-Feb-2020  riastradh New function percpu_create.

Associates a constructor and destructor with the percpu. Currently
the constructor runs immediately, but in principle we could use the
same API for future CPU hotplug support.

This lets you sleep for allocation or draining users before
deallocation when setting up or tearing down a percpu -- currently we
have many abuses of percpu_foreach in tree for that purpose.

Proposed on tech-kern:
https://mail-index.NetBSD.org/tech-kern/2020/01/30/msg026036.html
 1.445 20-Jan-2020  thorpej Remove FDDI support.
 1.444 29-Nov-2019  riastradh Missed a spot: delete mb.9 from MLINKS too.
 1.443 29-Nov-2019  riastradh New atomic load/store operations for the kernel.

Guarantee no fusing and no tearing, and can optionally impose
ordering relative to other memory operations.

Unordered:
- atomic_load_relaxed
- atomic_store_relaxed

Ordered:
- atomic_load_acquire
- atomic_load_consume
- atomic_store_release

These are intended to match C11 semantics, and can be defined in
terms of the C11 atomic API when ready.
 1.442 29-Nov-2019  riastradh Nix obsolete mb(9) man page.
 1.441 02-Oct-2019  rin Describe roundup2(9) in roundup(9).
Bump date.

Install it also as roundup2(9).
 1.440 28-Aug-2019  rmind Install thmap(9) man page.
 1.439 10-Aug-2019  mrg oops. i must have deleted the 'u' in 'ustore.9' when partially
fixing the alphabeta ordering here. fixes build.
 1.438 10-Aug-2019  mrg usbnet may be stable now. document it.
 1.437 08-May-2019  isaki branches: 1.437.2;
Update manpages respond to isaki-audio2 branch.
 1.436 06-Apr-2019  thorpej Overhaul the API used to fetch and store individual memory cells in
userspace. The old fetch(9) and store(9) APIs (fubyte(), fuword(),
subyte(), suword(), etc.) are retired and replaced with new ufetch(9)
and ustore(9) APIs that can return proper error codes, etc. and are
implemented consistently across all platforms. The interrupt-safe
variants are no longer supported (and several of the existing attempts
at fuswintr(), etc. were buggy and not actually interrupt-safe).

Also augmement the ucas(9) API, making it consistently available on
all plaforms, supporting uniprocessor and multiprocessor systems, even
those that do not have CAS or LL/SC primitives.

Welcome to NetBSD 8.99.37.
 1.435 24-Feb-2019  rin Install spi.9 and friends.
 1.434 24-Dec-2018  thorpej Add threadpool(9), an abstraction that provides shared pools of kernel
threads running at specific priorities, with support for unbound pools
and per-cpu pools.

Written by riastradh@, and based on the May 2014 draft, with a few changes
by me:
- Working on the assumption that a relative few priorities will actually
be used, reduce the memory footprint by using linked lists, rather than
2 large (and mostly empty) tables. The performance impact is essentially
nil, since these lists are consulted only when pools are created (and
destroyed, for DIAGNOSTIC checks), and the lists will have at most 225
entries.
- Make threadpool job object, which the caller must allocate storage for,
really opaque.
- Use typedefs for the threadpool types, to reduce the verbosity of the
API somewhat.
- Fix a bunch of pool / worker thread / job object lifecycle bugs.

Also include an ATF unit test, written by me, that exercises the basics
of the API by loading a kernel module that exposes several sysctls that
allow the ATF test script to create and destroy threadpools, schedule a
basic job, and verify that it ran.

And thus NetBSD 8.99.29 has arrived.
 1.433 22-Dec-2018  maxv Update the man page, we don't want M_COPY_PKTHDR, M_MOVE_PKTHDR, MH_ALIGN
and M_ALIGN.
 1.432 15-Nov-2018  maxv Simplify the mtag API:

- Remove m_tag_init(), m_tag_first(), m_tag_next() and
m_tag_delete_nonpersistent().

- Remove the 't' argument from m_tag_delete_chain().
 1.431 05-Oct-2018  hannken Bring back three state file system suspension:

NORMAL -> SUSPENDING -> SUSPENDED

and add operation fstrans_start_lazy() that only blocks while SUSPENDED.

Change vndthread() support operation handle_with_rdwr() to bracket
its file system operations by fstrans_start_lazy() and fstrans_done().

PR kern/53624 (dom0 freeze on domU exit)
 1.430 20-Sep-2018  rin Link pci_intr_*(9) to pci_intr(9), except for those described in pci_msi(9).
 1.429 15-Jul-2018  maxv Retire ipkdb entirely. The option was removed from the config files
yesterday.

ok kamil christos
 1.428 12-Jul-2018  maxv Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

* Removes "options PERFCTRS", the associated includes, and the associated
ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
good.

* Removes the PMC code of ARM XSCALE.

* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
definitions are put in sysarch.h.

* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
netbsd32 and rump.

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.427 03-Jun-2018  gson branches: 1.427.2;
Remove stray space to unbreak build
 1.426 03-Jun-2018  pgoyette Finish documenting the new modules(9) interfaces by adding the module
specificdata routines.
 1.425 03-Jun-2018  pgoyette Make a first pass at documenting the specificdata functionality.

XXX This is just a first pass, and I've probably made a ton of mistakes
XXX while reading the code! Updates and corrections greatly appreciated.
 1.424 03-Jun-2018  pgoyette Also add new entries in the .Nm list, and update Makefile to actually
build the MLINKS
 1.423 28-May-2018  pgoyette Add man-page links for new module_* accessor functions
 1.422 28-May-2018  nat Move the audio specification to section 9 under audio_system.

Ok wiz@
 1.421 27-May-2018  maya Don't mention sprintf and vsprintf, they don't exist in the kernel.
Drop MLINKS, too.
 1.420 12-May-2018  jdolecek remove ubc_alloc(9) and ubc_release(9) from ubc(9) from the documentation, they
are internal (static) functions

pointed out by Matthew Green in private email
 1.419 10-Apr-2018  maxv Remove m_getclr. It is unused, confusing (vs m_clget), and is a weak
implementation (eg you can't request a zeroed pkthdr mbuf).
 1.418 17-Jan-2018  maya branches: 1.418.2;
document pfil_{add,remove}_ihook, pfil_run_{addr,if}hooks

from ryo shimizu in PR bin/51941

changes by myself: fix mdoc -Tlint, add missing set lists, adjust date
to today, reword history addition.
 1.417 07-Nov-2017  christos document kmem_strdupsize/kmem_strdupfree
 1.416 31-Oct-2017  jdolecek remove ppi(9) manpage, the actual subsystem got never implemented

PR kern/52665 by Kamil Rytarowski
 1.415 13-Jun-2017  nat Add wsbell.

Found by wiz@.
 1.414 21-May-2017  abhinav branches: 1.414.2;
Add MLINKS for the functions described in bufq(9)
 1.413 19-May-2017  pgoyette Missed this during the localcount(9) import:

Add localcount(9) man-page - fix the build
 1.412 01-May-2017  pgoyette Ooops, localcount.9 was not supposed to be included here!
 1.411 01-May-2017  pgoyette Update mutex(9) for mutex_ownable()
 1.410 30-Apr-2017  pgoyette Make the primary name for this man-page devsw
 1.409 15-Apr-2017  kamil branches: 1.409.2;
Add new documentation locking(9)

It's a document from June 2015.

DESCRIPTION
The NetBSD kernel provides several synchronization and interrupt control
primitives. This manpage aims at giving an overview of these interfaces
and their proper application. This document includes also basic kernel
thread control primitives and rough overview of the NetBSD kernel design.

Part of interfaces are missing, like new mechanisms for networking SMP,
as this documentation page predates them.

Initial review back in 2015 by Thomas Klausner <wiz>
 1.408 15-Apr-2017  kamil Add new documentation for klua_mod_register(9) and klua_lock(9)

Lua kernel bindings.
 1.407 06-Apr-2017  abhinav Add MLINKS for extent_alloc1(9) and extent_alloc_subregion1(9).
 1.406 06-Apr-2017  pgoyette Oooppsss - the MLINK for splbio.9 was already present!
 1.405 06-Apr-2017  pgoyette Document splbio() as a deprecated synonym for splvm().
 1.404 06-Apr-2017  pgoyette Document ubc_zerorange(9). Add it (and ubc_purge(9)) to the MLINKS
 1.403 10-Mar-2017  martin PR misc/52058: replace all proc_trampoline with lwp_trampoline belatedly.
 1.402 22-Feb-2017  msaitoh Add links for kmem_intr_alloc.9, kmem_intr_free.9 and kmem_intr_zalloc.9.
 1.401 07-Jan-2017  ozaki-r branches: 1.401.2;
Add entries of pmap(9) functions
 1.400 02-Jan-2017  hannken Rename vget() to vcache_vget() and vcache_tryvget() respectively and
move the definitions to sys/vnode_impl.h.

No functional change intended.

Welcome to 7.99.54
 1.399 22-Dec-2016  cherry Add the uvm_hotplug.9 manpage to the build tree.
 1.398 28-Nov-2016  mlelstv Provide a man page for the disk driver subroutines (dksubr).
 1.397 20-Aug-2016  hannken Remove now obsolete operation vcache_remove().

Welcome to 7.99.36
 1.396 12-Jul-2016  knakahara branches: 1.396.2;
fix missing mans about pci.9 and pci_intr.9

- add links from pci.9 and pci_intr.9 to pci_msi.9
- add pci_intr_establish_xname entries
- add pci_intr_setattr entries
- add pci_intr_type descriptions
- fix pci_*_alloc functions' argument type

pointed out by nonaka@n.o.
 1.395 09-Apr-2016  riastradh Add passive references, intermediate between pserialize and refcount.

Discussed on tech-kern:

https://mail-index.netbsd.org/tech-kern/2016/01/24/msg020069.html

API is still experimental and likely to change. (Obvious changes:
either remove extra arguments everywhere, or shrink psref_target to a
single bit, at the expense of possibly valuable diagnostic checks.)
Should do some real testing before we use this in anger!
 1.394 09-Apr-2016  riastradh Introduce pserialize-safe linked lists.

These are like LIST_* from queue(3), but issue the appropriate memory
barriers for pserialize readers and writers.

Discussed on tech-kern:

https://mail-index.netbsd.org/tech-kern/2016/04/03/msg020365.html
 1.393 26-Oct-2015  mrg add documentation on "options KERNHIST".
 1.392 02-Oct-2015  msaitoh PCI Extended Configuration stuff written by nonaka@:
- Add PCI Extended Configuration Space support into x86.
- Check register offset of pci_conf_read() in MD part. It returns (pcireg_t)-1
if it isn't accessible.
- Decode Extended Capability in PCI Extended Configuration Space.
Currently the following extended capabilities are decoded:
- Advanced Error Reporting
- Virtual Channel
- Device Serial Number
- Power Budgeting
- Root Complex Link Declaration
- Root Complex Event Collector Association
- Access Control Services
- Alternative Routing-ID Interpretation
- Address Translation Services
- Single Root IO Virtualization
- Page Request
- TPH Requester
- Latency Tolerance Reporting
- Secondary PCI Express
- Process Address Space ID
- LN Requester
- L1 PM Substates
The following extended capabilities are not decoded yet:
- Root Complex Internal Link Control
- Multi-Function Virtual Channel
- RCRB Header
- Vendor Unique
- Configuration Access Correction
- Multiple Root IO Virtualization
- Multicast
- Resizable BAR
- Dynamic Power Allocation
- Protocol Multiplexing
- Downstream Port Containment
- Precision Time Management
- M-PCIe
- Function Reading Status Queueing
- Readiness Time Reporting
- Designated Vendor-Specific
 1.391 17-Aug-2015  knakahara Add man about kernel APIs to support intrctl(8).
 1.390 14-Aug-2015  knakahara Add pci_get_ht_capability(9) man.
 1.389 21-Jul-2015  knakahara add pci_intr_alloc() man
 1.388 12-Jul-2015  hannken Operations getnewvnode() and ungetnewvnode() have been replaced with vcache.
- Remove now obsolete functions getnewvnode() and ungetnewvnode().
- Document vcache operations.

Welcome to 7.99.20
 1.387 14-May-2015  pgoyette Add new man page for devsw_attach() and friends.

From Kamil Ritarowski with some editting by myself.
 1.386 27-Apr-2015  knakahara add x86 MD MSI/MSI-X support code.
 1.385 27-Apr-2015  knakahara add pci_intr_distribute(9) for x86.
 1.384 21-Apr-2015  pooka Remove the unused and all-but-unusable kthread_destroy(). Also makes
it more obvious that the opposite of kthread_create() is kthread_exit().
 1.383 30-Mar-2015  riastradh Remove obsolete cprng_strong_getflags/setflags(9) man page links.

XXX pullup-7
 1.382 30-Mar-2015  riastradh Hook bufferio(9) man page into the build.

Remove separate getiobuf(9) man page, subsumed by bufferio(9).
 1.381 30-Mar-2015  riastradh Hook up the new wapbl(9) man page.
 1.380 27-Dec-2014  maxv Cleanup:
- remove struct kmembuckets (dead)
- correctly deadify MALLOC_XX
- remove MALLOC_DEFINE_LIMIT and MALLOC_JUSTDEFINE_LIMIT (dead)
- remove malloc_roundup(), malloc_type_setlimit(), MALLOC_DEFINE_LIMIT()
and MALLOC_JUSTDEFINE_LIMIT() from man 9 malloc
 1.379 22-Dec-2014  wiz Add clock(9) from Kamil Rytarowski.
 1.378 25-May-2014  rmind branches: 1.378.2;
MI IPI interface:
- Implement support for the asynchronous IPI calls.
- Rework synchronous IPI code to reuse the asynchronous mechanism.
- Add ipi(9) manual page; needs wizd(8).

Note: MD code can now provide a low level primitive for the ipi(9) and
reuse this interface instead of open-coding. Portmasters are encouraged
to convert. Ride 6.99.43!
 1.377 24-Mar-2014  hannken branches: 1.377.2;
- Make VI_XLOCK, VI_CLEAN and VI_LOCKSHARE private to kern/vfs_*.c.
- Make vwait() static.
- Add vdead_check() to check a vnode for being or becoming dead.

Discussed on tech-kern.

Welcome to 6.99.38
 1.376 22-Mar-2014  skrll Add mtsleep(9) and a description of how it, tsleep(9), and wakeup(9)
should all be replaced with condvar(9).

While here clear out the lock(9) reference(s) and the obsoleted example.

Based on misc/48671
 1.375 18-Mar-2014  hannken Operations vmark(), vunmark() and vismarker() have been replaced by
vfs_vnode_iterator_*(), remove them.

Document vfs_vnode_iterator_*().

Make VI_MARKER private to vfs_vnode.c, vfs_mount.c and unfortunately
to ufs/lfs/lfs_segment.c.

Welcome to 6.99.37
 1.374 19-Sep-2013  rmind G/C npf_ncode(9)
 1.373 06-Aug-2013  soren Build orphaned man pages.
 1.372 17-Jun-2013  ryo add m_copyup(9) obtained from FreeBSD (manual only)
 1.371 22-May-2013  christos add a man page for ts2timo.
 1.370 28-Mar-2013  wiz Add more links for kcpuset(9).
 1.369 02-Dec-2012  rkujawa Also add links to pcu(9).
 1.368 02-Dec-2012  rkujawa Add pcu(9).
 1.367 29-Jul-2012  mlelstv branches: 1.367.2;
add rootconf(9) as a link to cpu_rootconf(9)
 1.366 02-Jul-2012  jym Document atop(9), ptoa(9), round_page(9) and trunc_page(9).
 1.365 13-May-2012  mrg document a large chunk of the USB interface. some of this is kind of
generic and depends upon understanding USB itself (and since i don't
really that well, i might have gotten some wrong.)
 1.364 13-Mar-2012  elad Replace the remaining KAUTH_GENERIC_ISSUSER authorization calls with
something meaningful. All relevant documentation has been updated or
written.

Most of these changes were brought up in the following messages:

http://mail-index.netbsd.org/tech-kern/2012/01/18/msg012490.html
http://mail-index.netbsd.org/tech-kern/2012/01/19/msg012502.html
http://mail-index.netbsd.org/tech-kern/2012/02/17/msg012728.html

Thanks to christos, manu, njoly, and jmmv for input.

Huge thanks to pgoyette for spinning these changes through some build
cycles and ATF.
 1.363 17-Feb-2012  plunky document config_detach_children(9)
 1.362 04-Dec-2011  jym branches: 1.362.2;
Improvements in secmodel(9). Document secmodel_register(9), _deregister(9)
and _eval(9).

Add secmodel_extensions(9), and indicate the new sysctl(7) to let
ordinary users control the CPU affinity (user_set_cpu_affinity).
 1.361 29-Nov-2011  tls Add (links for) missing "cross-references" from cprng(9). Some of the
functions replaced by cprng were never documented at all.
 1.360 28-Nov-2011  tls Add cprng(9) manual page, remove arc4random(9) manual page
 1.359 15-Nov-2011  jym pool_cache_sethiwat(9), pool_cache_setlowat(9), pool_cache_sethardlimit(9)
 1.358 15-Nov-2011  jym pool_sethardlimit.9 => pool.9
 1.357 01-Nov-2011  yamt branches: 1.357.2;
document skpc
 1.356 01-Nov-2011  yamt document scanc
 1.355 24-Oct-2011  yamt document ucas
 1.354 06-Oct-2011  jruoho Add kcpuset(9). Ok rmind@.
 1.353 30-Sep-2011  njoly There's no stand alone vpanic.9 man page.
 1.352 29-Sep-2011  christos add vpanic
 1.351 28-Sep-2011  jruoho Add a simple cpufreq(9).

This is slightly improved version presented on tech-kern@ with proper
locking and few additional functions, mainly required for ioctl(9)/cpuctl(8).
 1.350 27-Sep-2011  jym Document new *ASSERTMSG() prototype, and update KASSERT(9).

See also
http://mail-index.netbsd.org/tech-kern/2011/09/07/msg011427.html
 1.349 30-Jul-2011  rmind Add pserialize(9) manual page.
 1.348 03-Jun-2011  rmind Sync (mostly, not fully) uvm_km(9) and uvm_map(9) man pages with reality.
 1.347 01-Jun-2011  rmind branches: 1.347.2;
Split parts of uvm(9) into uvm_km(9) and uvm_map(9) man pages.

OK mrg@
 1.346 06-Apr-2011  jruoho Note also KASSERTMSG(). Small markup changes.
 1.345 26-Feb-2011  ahoka Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards
 1.344 27-Jan-2011  wiz Link kprintf(9) to device_printf(9). For David.
 1.343 19-Nov-2010  dholland branches: 1.343.2;
Introduce struct pathbuf. This is an abstraction to hold a pathname
and the metadata required to interpret it. Callers of namei must now
create a pathbuf and pass it to NDINIT (instead of a string and a
uio_seg), then destroy the pathbuf after the namei session is
complete.

Update all namei call sites accordingly. Add a pathbuf(9) man page and
update namei(9).

The pathbuf interface also now appears in a couple of related
additional places that were passing string/uio_seg pairs that were
later fed into NDINIT. Update other call sites accordingly.
 1.342 22-Aug-2010  rmind Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@
 1.341 21-Aug-2010  jruoho Add x86_msr_xcall(9).
 1.340 11-Aug-2010  pgoyette Add documentation for the various module system initialization routines.
 1.339 07-Aug-2010  pgoyette Add documentation for module_find_section()
 1.338 31-Jul-2010  pgoyette Make a first pass at documenting the module(9) subsystem.

XXX This is by no means complete, but it is a beginning.
 1.337 30-Jul-2010  jruoho Document the stack macros from <sys/param.h>.
 1.336 25-Jul-2010  jruoho Document the fine nullop() family of dummy functions.
 1.335 01-Jul-2010  jruoho Briefly document proc_find() and pgrp_find().
 1.334 25-Jun-2010  tsutsui Add config_mountroot(9) in autoconf(9) man page and LINKS for it.
 1.333 18-Jun-2010  hannken Remove the concept of recursive vnode locks by eliminating
vn_setrecurse(), vn_restorerecurse() and LK_CANRECURSE.
Welcome to 5.99.31

Discussed on tech-kern.
 1.332 08-Jun-2010  jruoho Briefly document the bintime_add() family of static inline functions.
 1.331 13-May-2010  jruoho Hook kthread_join(9) to the build.
 1.330 29-Apr-2010  jruoho Remove gsignal(9) and kgsignal(). Add links for kpgsignal(9) and kpsignal(9).
 1.329 29-Apr-2010  jruoho branches: 1.329.2;
Remove sched_psignal(9) and sigmasked(9). From Tetsuya Isaki in PR #40125.
 1.328 16-Apr-2010  dyoung Add a link, bus_space_is_equal.9 -> bus_space.9.
 1.327 13-Apr-2010  jruoho cpu_swapout(9) is no more.
 1.326 13-Apr-2010  jruoho Document the ctod-family of macros from <sys/param.h>.

XXX: Someone may want to check if there is anything to add or correct.
 1.325 13-Apr-2010  jruoho As the cited setroot(9) was nonexistent, briefly document it here.
 1.324 13-Apr-2010  jruoho Briefly note also curlwp.
 1.323 25-Mar-2010  jruoho In addition to 'hz', document also 'tick', 'tickadj', 'stathz', and 'profhz'.

The idea comes from OpenBSD, but this was written largely based on the
comments in kern_clock.c. XXX: schedhz?
 1.322 25-Mar-2010  jruoho Document p_find(), pfind(), pg_find(), and pgfind().

XXX: Needs a quick proofread.
 1.321 22-Mar-2010  jruoho Document the questionable ISSET/SET/CLR macros.
 1.320 06-Mar-2010  dsieger Since someone (hi ahoka) added a reference to non-existant sched_m2(9),
add at least a stub now.
 1.319 04-Mar-2010  jruoho Document the counting and rounding macros from <sys/param.h>.
 1.318 01-Mar-2010  jruoho Document the bitmap related macros in <sys/param.h>.
 1.317 01-Mar-2010  jruoho In addition to mstohz(9), document also hztoms.
 1.316 12-Feb-2010  dyoung Fix a typo in the MLINKS line for kmem.9.
 1.315 11-Feb-2010  haad Hook kmem_asprintf and vrele_async manpages to the build.
 1.314 06-Feb-2010  dyoung Move MD spllower(9) and splraise(9) doco from the MI spl(9) to an i386
manual page.
 1.313 26-Jan-2010  jruoho Document also the sysmon power switches; sysmon_pswitch(9).
 1.312 26-Jan-2010  jruoho Build links for rest of the sysmon_taskq(9) functions.
 1.311 25-Jan-2010  jruoho Add a simple manual page for the simple sysmon task queue.

ok wiz@
 1.310 25-Jan-2010  jruoho Add CTASSERT(9). From FreeBSD.

ok @wiz
 1.309 23-Jan-2010  rmind Remove xc_init_cpu(), percpu_init(), percpu_init_cpu() - they are part
of implementation, not public API. OK dyoung@.
 1.308 23-Jan-2010  rmind Rename xc(9) to xcall(9). OK dyoung@.
 1.307 22-Jan-2010  dyoung Install manual pages for cross-calls and per-CPU storage.
 1.306 20-Jan-2010  pooka add short description for bpf.9
 1.305 20-Jan-2010  dyoung Update PMF documentation: rename pmf_device_resume_subtree to
pmf_device_subtree_resume. Briefly describe pmf_qual_t and add it to
the PMF function signatures.

There's still a lot left to document.
 1.304 20-Jan-2010  pooka Remove MKLINKS for VATTR_NULL, so that the obsolete lists don't
have to do the work every build.
 1.303 08-Jan-2010  pooka Undocument checkalias() -- it was removed two years ago.
 1.302 08-Jan-2010  pooka vcount() was removed
 1.301 08-Jan-2010  pooka Remove documentation for removed macros.
 1.300 08-Jan-2010  dyoung Install pcq.9 and links. Update set list accordingly.
 1.299 05-Dec-2009  pooka remove cv_wakeup.9 (it wasn't documented, just linked)
 1.298 17-Nov-2009  dyoung Describe spllower(9) and splraise(9).
 1.297 05-Nov-2009  dyoung Document the device iteration routines.

I derived this manual page from pmf(9), hence my retention of Jared's
copyright notice.
 1.296 15-Oct-2009  jym Remove pool_cache_invalidate_local(9) from the sets, and mark the
entries as obsolete.

Noted by haad@. Thanks!
 1.295 08-Oct-2009  jym Add pool_cache_invalidate_local() to the pool_cache(9) API, to permit
per-CPU objects invalidation when cached in the pool cache.

See http://mail-index.netbsd.org/tech-kern/2009/10/05/msg006206.html .

Reviewed by bouyer@. Thanks!
 1.294 05-Oct-2009  rmind Add callback(9) man page. Reviewed and improved by <wiz>, thanks!
 1.293 02-Oct-2009  elad First part of secmodel cleanup and other misc. changes:

- Separate the suser part of the bsd44 secmodel into its own secmodel
and directory, pending even more cleanups. For revision history
purposes, the original location of the files was

src/sys/secmodel/bsd44/secmodel_bsd44_suser.c
src/sys/secmodel/bsd44/suser.h

- Add a man-page for secmodel_suser(9) and update the one for
secmodel_bsd44(9).

- Add a "secmodel" module class and use it. Userland program and
documentation updated.

- Manage secmodel count (nsecmodels) through the module framework.
This eliminates the need for secmodel_{,de}register() calls in
secmodel code.

- Prepare for secmodel modularization by adding relevant module bits.
The secmodels don't allow auto unload. The bsd44 secmodel depends
on the suser and securelevel secmodels. The overlay secmodel depends
on the bsd44 secmodel. As the module class is only cosmetic, and to
prevent ambiguity, the bsd44 and overlay secmodels are prefixed with
"secmodel_".

- Adapt the overlay secmodel to recent changes (mainly vnode scope).

- Stop using link-sets for the sysctl node(s) creation.

- Keep sysctl variables under nodes of their relevant secmodels. In
other words, don't create duplicates for the suser/securelevel
secmodels under the bsd44 secmodel, as the latter is merely used
for "grouping".

- For the suser and securelevel secmodels, "advertise presence" in
relevant sysctl nodes (sysctl.security.models.{suser,securelevel}).

- Get rid of the LKM preprocessor stuff.

- As secmodels are now modules, there's no need for an explicit call
to secmodel_start(); it's handled by the module framework. That
said, the module framework was adjusted to properly load secmodels
early during system startup.

- Adapt rump to changes: Instead of using empty stubs for securelevel,
simply use the suser secmodel. Also replace secmodel_start() with a
call to secmodel_suser_start().

- 5.99.20.

Testing was done on i386 ("release" build). Spearated module_init()
changes were tested on sparc and sparc64 as well by martin@ (thanks!).

Mailing list reference:

http://mail-index.netbsd.org/tech-kern/2009/09/25/msg006135.html
 1.292 16-Sep-2009  dyoung Don't install config_activate links such as config_activate.9 ->
autoconf.9. In the set list, mark the config_activate links
obsolete.
 1.291 05-Sep-2009  apb Sort bzero to the correct position
 1.290 05-Sep-2009  apb The man page should be BOOT_FLAG.9, not BOOT_FLAGS.9.
I am not marking the incorrect name as "obsolete" in the set lists
because it's been less than 12 hours. If you have already installed the
incorrectly named file, you will have to delete it manually.
 1.289 04-Sep-2009  apb Add a boothowto(9) man page, and link it to BOOT_FLAGS(9).
 1.288 03-Aug-2009  rmind Merge vmem_alloc(9) & friends (it's a whole company) into a single vmem(9).
 1.287 03-Aug-2009  rmind Merge workqueue_create(9), workqueue_destroy(9) and workqueue_enqueue(9)
into a single workqueue(9) man page.
 1.286 03-Aug-2009  wiz I guess ubc(9) should be used for all ubc_*(9) man pages, not only for
some. Make it so.
 1.285 03-Aug-2009  rmind Unify kmem_alloc/zalloc/free under kmem(9). Links preserved.
 1.284 03-Aug-2009  rmind Split descriptions of UBC functions from uvm(9) into separate ubc(9) man page.
 1.283 06-Jun-2009  hubertf add mlinks for iic manpages
 1.282 20-May-2009  dyoung Install disk_begindetach.9 links.
 1.281 10-May-2009  tsutsui Add MLINKS for pmf(9) functions.
 1.280 08-May-2009  dyoung Install a link from vfs_mountalloc.9 to vfssubr.9.
 1.279 04-May-2009  ad + callout_halt
 1.278 31-Mar-2009  tsutsui Add byteorder(9) man page which describes htole32() etc. From FreeBSD
via PR misc/40770, with some tweaks by me.
 1.277 16-Jan-2009  uebayasi branches: 1.277.2;
config_found_sm(9) -> config_found_sm_loc(9)
 1.276 04-Jan-2009  jdc Add missing callout_* links and order the callout_* links as per the
manual page.
 1.275 16-Dec-2008  christos kill bitmask_snprintf
 1.274 24-Nov-2008  tsutsui Replace timecounter(9) man page with OpenBSD's tc_init(9)
since the previous one was derived from FreeBSD's time(9)
which was based on NetBSD's time_second(9), and
it didn't mention the timecounter framework itself.
 1.273 24-Nov-2008  tsutsui Add tvtohz(9) man page, which is Xref'ed from microtime(9) and microuptime(9),
from FreeBSD.
 1.272 24-Nov-2008  tsutsui Merge description about bintime(9), getbintime(9), getmicrotime(9),
nanotime(9), and getnanotime(9) from FreeBSD's microtime(9) man page,
and add appropriate MLINKS.
 1.271 24-Nov-2008  tsutsui Add MLINKS to binuptime(9), getbinuptime(9), getmicrouptime(9), nanouptime(9),
and getnanouptime(9) from microuptime(9).
 1.270 16-Sep-2008  pgoyette branches: 1.270.2;
Add MLINKS for all the routines that cnmagic.9 documents. Without this,
"apropos magic" indicates that cn_trap(9) and friends have man pages, but
"man cn_trap" thinks otherwise.
 1.269 06-Sep-2008  jmcneill Add video(4) and video(9) man pages.
 1.268 03-Sep-2008  erh Add man page links from ttyldisc_{add,lookup,remove} to linedisc
 1.267 10-Aug-2008  tls Manual pages for accept_filters(9), from FreeBSD. Also, document syntax we
added in NetBSD for specifying accept filters in inetd.conf.
 1.266 06-Aug-2008  drochner there was a backslash too much
 1.265 06-Aug-2008  plunky add man page for sockopt(9)
 1.264 06-May-2008  yamt branches: 1.264.2;
update to match with the recent reality.
 1.263 06-May-2008  yamt document kpreempt_disable, kpreempt_enable, and kpreempt_disabled.
 1.262 03-May-2008  plunky update disk.9 manpage to current reality
- add disk_init() (from vmlocking merge)
- add disk_destroy() (from vmlocking merge)
- remove disk_resetstat() (was removed)
- update structure defs
- update examples (ANSI, const, device_t etc)
 1.261 02-Apr-2008  xtraeme branches: 1.261.2; 1.261.4;
Add MLINKS for the sysmon_envsys_* functions.
 1.260 24-Mar-2008  yamt update after yamt-lazymbuf merge.
 1.259 02-Mar-2008  rmind Rename selrecord(9) man page to select(9). Sync selnotify() with reality,
remove selwakeup(), add and explain the usage of selinit() and seldestroy().

Reviewed by <ad>.
 1.258 09-Dec-2007  jmcneill branches: 1.258.4;
Add power management framework man page.
 1.257 09-Dec-2007  yamt document LWP_CACHE_CREDS.
 1.256 05-Dec-2007  ad Add links for softint_*
 1.255 05-Dec-2007  ad + mutex_spin_enter, mutex_spin_exit
 1.254 05-Dec-2007  ad +splsoftbio(9)
 1.253 21-Nov-2007  elad Make securelevel a "secmodel" of its own.

While it's true that it's part of the traditional 4.4BSD security model,
there may come a time where a different "primary" security model used for
fine-grained privileges (ie., splitting root's responsibilities to various
privileges that can be assigned) may want to still have a securelevel
setting.

Idea from Daniel Carosone:

http://mail-index.netbsd.org/tech-security/2006/08/25/0001.html

The location of the removed files, for reference, was:

src/secmodel/bsd44/secmodel_bsd44_securelevel.c
src/secmodel/bsd44/securelevel.h
 1.252 21-Nov-2007  pooka Short description of putter(9)
 1.251 15-Oct-2007  pooka - uvn_attach.9
+ ubc_uiomove.9
 1.250 07-Oct-2007  hannken Update the file system copy-on-write handler.

- Instead of hooking the handler on the specdev of a mounted file system
hook directly on the `struct mount'.

- Rename from `vn_cow_*' to `fscow_*' and move to `kern/vfs_trans.c'. Use
`mount_*specific' instead of clobbering `struct mount' or `struct specinfo'.

- Replace the hand-made reader/writer lock with a krwlock.

- Keep `vn_cow_*' functions and mark as obsolete.

- Welcome to NetBSD 4.99.32 - `struct specinfo' changed size.

Reviewed by: Jason Thorpe <thorpej@netbsd.org>
 1.249 24-Sep-2007  wiz Document aprint*_dev and aprint*_ifnet. Requested by joerg@
 1.248 21-Jul-2007  dsieger branches: 1.248.4; 1.248.6;
Fix a glitch in previous commit:
s/mi_switch 9/mi_switch.9/

Reported by Paul Goyette.
 1.247 21-Jul-2007  dsieger Remove obsolete content about cpu_switchto() from ctxsw(9) and rename
it to mi_switch(9).

Suggested by yamt@
 1.246 18-Jul-2007  yamt document kpause. largely copied from condvar.9.
 1.245 15-Jul-2007  jnemeth setrunqueue is no more
 1.244 14-Jul-2007  dsieger Remove obsolete SCHED_LOCK(9), which is gone.

ok by <ad>
 1.243 14-Jul-2007  dsieger Move scheduler(9) to sched_4bsd(9) and sync its contents with reality. Also
add a reference to McKusick et. al., which still contains the best in-depth
description of the 4.4BSD scheduler.
 1.242 14-Jul-2007  dsieger Remove obsolete setrunqueue(9) manpage.

ok by <ad>.
 1.241 14-Jul-2007  dsieger Add initial manpage for the "new" scheduler API.

Note: More content will follow, to this manpage as well as the NetBSD
Internals book.

Ok by <ad>
 1.240 14-Jul-2007  ad Update mlinks for callout/kthread changes.
 1.239 14-Jul-2007  ad - kcont was removed.
- Replace some references to tsleep.
 1.238 03-Jul-2007  yamt update and document yield().
 1.237 01-Jul-2007  xtraeme Imported envsys 2, a brief description of the new features:
(Part 4: documentation and configuration files)

* Support for detachable sensors.
* Cleaned up the API for simplicity and efficiency.
* Ability to send capacity/critical/warning events to powerd(8).
* Adapted all the code to the new locking order.
* Compatibility with the old envsys API: the ENVSYS_GTREINFO
and ENVSYS_GTREDATA ioctl(2)s are supported.
* Added support for a 'dictionary based communication channel' between
sysmon_power(9) and powerd(8), that means there is no 32 bytes event
size restriction anymore.
* Binary compatibility with old envstat(8) and powerd(8) via COMPAT_40.
* All drivers with the n^2 gtredata bug were fixed, PR kern/36226.

Tested by:

blymn: smsc(4).
bouyer: ipmi(4), mfi(4).
kefren: ug(4).
njoly: viaenv(4), adt7463.c.
riz: owtemp(4).
xtraeme: acpiacad(4), acpibat(4), acpitz(4), aiboost(4), it(4), lm(4).
 1.236 18-May-2007  yamt obsolete mi_switch.9 and cpu_switch.9 MLINKS. pointed by Blair Sadewitz.
 1.235 17-May-2007  yamt add cpu_idle.9.
 1.234 17-May-2007  yamt update after yamt-idlelwp merge.
- remove cpu_exit.9.
- remove ctxsw.9 from makefile because it's too stale.
XXX maybe it will revive as mi_switch.9 later.
- add cpu_switchto.9 to makefile.
 1.233 21-Feb-2007  mrg document bus_dmatag_subregion(9) and bus_dmatag_destroy(9).
 1.232 17-Feb-2007  yamt need_resched -> cpu_need_resched.
 1.231 17-Feb-2007  yamt remove cpu_idle.9. it has not been available on trunk.
 1.230 16-Feb-2007  hannken Make fstrans(9) the default helper for file system suspension.
Replaces the now obsolete vn_start_write()/vn_finished_write().
 1.229 15-Feb-2007  tron Remove entries for rw_owned(9) again. The set lists were incorrect,
not this "Makefile".
 1.228 15-Feb-2007  tron Create symbolic links for rw_owned(9).
 1.227 15-Feb-2007  skrll Sort some entries.
 1.226 11-Feb-2007  ad Fix up MLINKS for previous. From nick@.
 1.225 11-Feb-2007  ad Add mb/rwlock/condvar/mutex section 9 manual pages.
 1.224 21-Jan-2007  hannken Add and update documentation for fstrans(9) file system suspension helper.

wiz?
 1.223 07-Jan-2007  elad Add a memoryallocators(9) man-page to give a short summary of memory
allocators available in the kernel.

Tons of input from YAMAMOTO Takashi, thanks!
 1.222 21-Dec-2006  yamt document splraiseipl and makeiplcookie.
 1.221 13-Nov-2006  dyoung Add a source-address selection policy mechanism to the kernel.

Also, add ioctls SIOCGIFADDRPREF/SIOCSIFADDRPREF to get/set preference
numbers for addresses. Make ifconfig(8) set/display preference
numbers.

To activate source-address selection policies in your kernel, add
'options IPSELSRC' to your kernel configuration.

Miscellaneous changes in support of source-address selection:

1 Factor out some common code, producing rt_replace_ifa().

2 Abbreviate a for-loop with TAILQ_FOREACH().

3 Add the predicates on IPv4 addresses IN_LINKLOCAL() and
IN_PRIVATE(), that are true for link-local unicast
(169.254/16) and RFC1918 private addresses, respectively.
Add the predicate IN_ANY_LOCAL() that is true for link-local
unicast and multicast.

4 Add IPv4-specific interface attach/detach routines,
in_domifattach and in_domifdetach, which build #ifdef
IPSELSRC.

See in_getifa(9) for a more thorough description of source-address
selection policy.
 1.220 04-Nov-2006  yamt document vmem_xalloc/xfree.
 1.219 22-Oct-2006  yamt document vmem.
 1.218 09-Oct-2006  rpaulo Modular (I tried ;-) TCP congestion control API. Whenever certain conditions
happen in the TCP stack, this interface calls the specified callback to
handle the situation according to the currently selected congestion
control algorithm.
A new sysctl node was created: net.inet.tcp.congctl.{available,selected}
with obvious meanings.
The old net.inet.tcp.newreno MIB was removed.
The API is discussed in tcp_congctl(9).

In the near future, it will be possible to selected a congestion control
algorithm on a per-socket basis.

Discussed on tech-net and reviewed by <yamt>.
 1.217 07-Oct-2006  cube Synchronise documentation with code. E.g., config_search is no more, but
instead you have config_search_{loc,ia}. Add documentation for
config_finalize_regsiter, too. Mostly fixes PR#32106 by Gavan Fantom, as I
think the cfdriver_* and cfattach_* stuff should be documented too, but I'm
not entirely sure where yet.
 1.216 04-Oct-2006  pooka fix slight ooops in previous
 1.215 04-Oct-2006  pooka and lo, the uvm_coredump() peril was no more (since almost 5 years ago)
 1.214 17-Sep-2006  wiz Make links from ieee80211(9) to pages for all included functions.
 1.213 16-Sep-2006  yamt add workqueue_destroy.
 1.212 16-Sep-2006  elad Add a man-page for secmodel_overlay(9).
 1.211 15-Sep-2006  elad Add a man-page for secmodel_bsd44, describing a bit the concepts of
super-user and securelevel.

The securelevel part was compiled of text from both init(8) and OpenBSD's
securelevel(7), and brought in-sync with what we really do.
 1.210 08-Sep-2006  elad First take at security model abstraction.

- Add a few scopes to the kernel: system, network, and machdep.

- Add a few more actions/sub-actions (requests), and start using them as
opposed to the KAUTH_GENERIC_ISSUSER place-holders.

- Introduce a basic set of listeners that implement our "traditional"
security model, called "bsd44". This is the default (and only) model we
have at the moment.

- Update all relevant documentation.

- Add some code and docs to help folks who want to actually use this stuff:

* There's a sample overlay model, sitting on-top of "bsd44", for
fast experimenting with tweaking just a subset of an existing model.

This is pretty cool because it's *really* straightforward to do stuff
you had to use ugly hacks for until now...

* And of course, documentation describing how to do the above for quick
reference, including code samples.

All of these changes were tested for regressions using a Python-based
testsuite that will be (I hope) available soon via pkgsrc. Information
about the tests, and how to write new ones, can be found on:

http://kauth.linbsd.org/kauthwiki

NOTE FOR DEVELOPERS: *PLEASE* don't add any code that does any of the
following:

- Uses a KAUTH_GENERIC_ISSUSER kauth(9) request,
- Checks 'securelevel' directly,
- Checks a uid/gid directly.

(or if you feel you have to, contact me first)

This is still work in progress; It's far from being done, but now it'll
be a lot easier.

Relevant mailing list threads:

http://mail-index.netbsd.org/tech-security/2006/01/25/0011.html
http://mail-index.netbsd.org/tech-security/2006/03/24/0001.html
http://mail-index.netbsd.org/tech-security/2006/04/18/0000.html
http://mail-index.netbsd.org/tech-security/2006/05/15/0000.html
http://mail-index.netbsd.org/tech-security/2006/08/01/0000.html
http://mail-index.netbsd.org/tech-security/2006/08/25/0000.html

Many thanks to YAMAMOTO Takashi, Matt Thomas, and Christos Zoulas for help
stablizing kauth(9).

Full credit for the regression tests, making sure these changes didn't break
anything, goes to Matt Fleming and Jaime Fournier.

Happy birthday Randi! :)
 1.209 06-Sep-2006  wiz Fix todr(9) MLINKS line.
 1.208 06-Sep-2006  gdamore time.9 renamed to time_second.9. various updates to reflect API changes.
 1.207 27-Jul-2006  gdt man pages contributed by Igor Sobrado.
 1.206 25-Jul-2006  elad first take at veriexec(9) man page, finally documenting some more
internals.
 1.205 14-Jul-2006  elad okay, since there was no way to divide this to two commits, here it goes..

introduce fileassoc(9), a kernel interface for associating meta-data with
files using in-kernel memory. this is very similar to what we had in
veriexec till now, only abstracted so it can be used more easily by more
consumers.

this also prompted the redesign of the interface, making it work on vnodes
and mounts and not directly on devices and inodes. internally, we still
use file-id but that's gonna change soon... the interface will remain
consistent.

as a result, veriexec went under some heavy changes to conform to the new
interface. since we no longer use device numbers to identify file-systems,
the veriexec sysctl stuff changed too: kern.veriexec.count.dev_N is now
kern.veriexec.tableN.* where 'N' is NOT the device number but rather a
way to distinguish several mounts.

also worth noting is the plugging of unmount/delete operations
wrt/fileassoc and veriexec.

tons of input from yamt@, wrstuden@, martin@, and christos@.
 1.204 08-Jul-2006  skrll Some section 9 man page edits:
- Update ctxsw(9) to reflect reality a little better
- chooselwp doesn't exist in the kernel so remove the man page.
- Remove the references to chooseproc which existed briefly.
 1.203 25-Jun-2006  yamt document kmem_alloc, kmem_free, kmem_zalloc.
 1.202 24-Jun-2006  kardel add microuptime.9 (from FreeBSD) for timecounters
 1.201 24-Jun-2006  kardel include timecounter.9 description
 1.200 19-Jun-2006  gdamore Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.
 1.199 04-Jun-2006  chap Document kernel function hashinit/hashdone.

"No[ objections] here." -christos@
 1.198 16-May-2006  elad branches: 1.198.2;
kill unused man-pages. prompted by Iain Hibbert.
 1.197 14-May-2006  elad add kauth man-page.
 1.196 14-May-2006  uwe G/c properties(9) and links. They are marked as obsolete in the sets
already.
 1.195 11-May-2006  gdamore Add preliminary documentation for DDC and EDID subsystem.
 1.194 11-Mar-2006  kleink branches: 1.194.2;
Document libkern's bcdtobin(9)/bintobcd(9).
 1.193 07-Mar-2006  pooka fdavail is a goner
 1.192 24-Feb-2006  pooka document fdclone
 1.191 12-Feb-2006  macallan add vcons.9
 1.190 03-Feb-2006  jmmv Implement options string parsing of the form 'a=b c=d ...'. This will be
initially used by i386's Multiboot support but will be useful in other
situations too (think refactoring mount(2)'s API).
 1.189 17-Jan-2006  thorpej Add a firmload(9) manual page.
 1.188 16-Jan-2006  yamt add getiobuf.9
 1.187 04-Jan-2006  xtraeme Manpage that explains the i2c framework... from OpenBSD.
 1.186 24-Dec-2005  matt Update man pages for new coredump interface.
 1.185 21-Dec-2005  rpaulo Fix links for cpu_lwp_fork.9. Pointed out by ghen@ and salo@.
 1.184 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.183 24-Nov-2005  yamt document workqueue.
 1.182 24-Nov-2005  yamt document RUN_ONCE.
 1.181 02-Nov-2005  yamt sync with kernel. (yamt-vop)
 1.180 02-Oct-2005  kleink Remove MLINKS leftover from previous.
 1.179 01-Oct-2005  yamt we don't have the global runtime anymore.
 1.178 23-Sep-2005  jmmv Kill the tmpfs(9) manual page; it was just documenting internal details of
tmpfs' "API" and was already rotting.

Instead, merge all the relevant comments into the code. This includes
acknowledgements to Google's Summer of Code 2005 program (they were in the
AUTHORS section of tmpfs(9) before), so all the files need to be changed
to include this sentence alongside the title. (Note that this was not a
requirement of the program.)
 1.177 23-Sep-2005  jmmv Apply the NFS exports list rototill patch:

- Remove all NFS related stuff from file system specific code.
- Drop the vfs_checkexp hook and generalize it in the new nfs_check_export
function, thus removing redundancy from all file systems.
- Move all NFS export-related stuff from kern/vfs_subr.c to the new
file sys/nfs/nfs_export.c. The former was becoming large and its code
is always compiled, regardless of the build options. Using the latter,
the code is only compiled in when NFSSERVER is enabled. While doing this,
also make some functions in nfs_subs.c conditional to NFSSERVER.
- Add a new command in nfssvc(2), called NFSSVC_SETEXPORTSLIST, that takes a
path and a set of export entries. At the moment it can only clear the
exports list or append entries, one by one, but it is done in a way that
allows setting the whole set of entries atomically in the future (see the
comment in mountd_set_exports_list or in doc/TODO).
- Change mountd(8) to use the nfssvc(2) system call instead of mount(2) so
that it becomes file system agnostic. In fact, all this whole thing was
done to remove a 'XXX' block from this utility!
- Change the mount*, newfs and fsck* userland utilities to not deal with NFS
exports initialization; done internally by the kernel when initializing
the NFS support for each file system.
- Implement an interface for VFS (called VFS hooks) so that several kernel
subsystems can run arbitrary code upon receipt of specific VFS events.
At the moment, this only provides support for unmount and is used to
destroy NFS exports lists from the file systems being unmounted, though it
has room for extension.

Thanks go to yamt@, chs@, thorpej@, wrstuden@ and others for their comments
and advice in the development of this patch.
 1.176 10-Sep-2005  jmmv Initial addition of tmpfs, an efficient memory file-system. This project
was developed as part of Google's Summer of Code 2005 program. This
change adds the kernel code, the mount_tmpfs utility, a regression test
suite and does all other related changes to integrate these.

The file-system is still *experimental*. Therefore, it is disabled by
default in all kernels. However, as typically done, a commented-out
entry is added in them to ease its setup.

Note that I haven't commited the required mountd(8) changes to be able
to export tmpfs file-systems because NFS support is still very unstable
and because, before enabling it, I'd like to do some other changes.

OK'ed by my project mentor, William Studenmund (wrstuden@).
 1.175 28-Aug-2005  reinoud Create functions ioctl_copyin() and ioctl_copyout(). They are meant to be
used in ioctl routines to do the right thing when the FKIOCTL flag is
passed to the IOCTL routine indicating its a in-kernel VOP_IOCTL call and
indirect addresses provided in the arguments are to be seen as kernel
adresses rather than userland adresses.

A simple substitution and prepending of the `flags' passed on to the ioctl
handler is enough to DTRT.
 1.174 23-Aug-2005  yamt document M_MOVE_PKTHDR.
 1.173 14-Aug-2005  yamt remove disk_init.
 1.172 20-Jul-2005  pooka statfs -> statvfs
(better late than never)
 1.171 24-Apr-2005  dyoung Add IEEE 802.11 manual pages from FreeBSD to both the Makefiles
and the set lists.
 1.170 01-Apr-2005  yamt remove links to uvm.9 for removed functions.
 1.169 02-Jan-2005  thorpej branches: 1.169.2;
Document file system extended attribute functions.
 1.168 06-Dec-2004  yamt document uvm_unmap.
 1.167 03-Dec-2004  atatat Add a man page that describes the kernel-only errno values that never
get passed back up to userland.
 1.166 06-Sep-2004  yamt add MLINKS for each mbuf tagging functions.
 1.165 06-Sep-2004  yamt document mbuf tagging interfaces.
 1.164 06-Sep-2004  yamt - document m_copyback_cow and m_makewritable.
- note limitations of m_copyback.
- bump date.
 1.163 05-Jul-2004  sketch Complete removal of uvm_useracc(9), as described in

http://mail-index.netbsd.org/source-changes/2003/11/13/0011.html
 1.162 25-May-2004  hannken Add ffs internal snapshots. Written by Marshall Kirk McKusick for FreeBSD.

- Not enabled by default. Needs kernel option FFS_SNAPSHOT.
- Change parameters of ffs_blkfree.
- Let the copy-on-write functions return an error so spec_strategy
may fail if the copy-on-write fails.
- Change genfs_*lock*() to use vp->v_vnlock instead of &vp->v_lock.
- Add flag B_METAONLY to VOP_BALLOC to return indirect block buffer.
- Add a function ffs_checkfreefile needed for snapshot creation.
- Add special handling of snapshot files:
Snapshots may not be opened for writing and the attributes are read-only.
Use the mtime as the time this snapshot was taken.
Deny mtime updates for snapshot files.
- Add function transferlockers to transfer any waiting processes from
one lock to another.
- Add vfsop VFS_SNAPSHOT to take a snapshot and make it accessible through
a vnode.
- Add snapshot support to ls, fsck_ffs and dump.

Welcome to 2.0F.

Approved by: Jason R. Thorpe <thorpej@netbsd.org>
 1.161 29-Mar-2004  dyoung Add a manual page to section 9 for rssadapt, the rate-adaptation
framework.
 1.160 24-Mar-2004  atatat branches: 1.160.2;
Add man page for new sysctl_teardown() function.
 1.159 23-Mar-2004  jonathan Add kcont(9) to Makefile, comp set.
 1.158 21-Mar-2004  he The man-page symlink should be pckbport_set_inputhandler, not
pckbport_set_inputhandle -- make it so.
 1.157 20-Mar-2004  bjh21 Kernel-internal documentation for pckbport.
 1.156 18-Feb-2004  yamt - document selnotify.
- add ref. to knote(9).
 1.155 14-Feb-2004  hannken Add a generic copy-on-write hook to add/remove functions that will be
called with every buffer written through spec_strategy().

Used by fss(4). Future file-system-internal snapshots will need them too.

Welcome to 1.6ZK

Approved by: Jason R. Thorpe <thorpej@netbsd.org>
 1.154 28-Jan-2004  jdolecek g/c obsolete cpu_wait(9)
reported in PR misc/24260 by Nicolas Joly
 1.153 21-Jan-2004  atatat Man page for kernel's sysctl infrastructure. Thanks for being
patient.
 1.152 20-Dec-2003  lha Add opencrypto.9 manpage, manpage copied from OpenBSD (Angelos D. Keromytis)
Some text added me (and thus all errors in the manpage are mine)
 1.151 04-Dec-2003  atatat Garbage collect some references to the old sysctl() infrastructure.
 1.150 16-Nov-2003  yamt a manpage of selrecord and selwakeup. from FreeBSD.
 1.149 21-Oct-2003  hannken Add section 9 man pages for:
vfs_write_suspend, vfs_write_resume, vn_start_write and vn_finished_write.
 1.148 13-Oct-2003  bouyer Add a man page for pmatch().
 1.147 28-Sep-2003  dsl Add do_setres[u,g}id
 1.146 21-Sep-2003  jdolecek add manpage for fsetown(9), fgetown(9), fownsignal(9)
 1.145 07-Sep-2003  seb Remove link from pool_cache.9 to itself.

Implicit approval by kleink@.
 1.144 07-Sep-2003  yamt a pool_cache(9) manpage.
maybe incomplete, but better than none.
 1.143 06-Sep-2003  yamt a man page for buffer cache interfaces.
(an incomplete page is better than no page)
 1.142 07-Apr-2003  gmcgarry vfs_setpublic.9 -> vfs_setpublicfs.9
 1.141 06-Apr-2003  gmcgarry Move vfs interface out of vfsops.9 into its own page. Document
it completely.
 1.140 04-Apr-2003  wiz Minimally document vfs_shutdown(9). XXX: Right man page?
 1.139 25-Mar-2003  thorpej Document pci_vpd_read() and pci_vpd_write().
 1.138 10-Feb-2003  drochner remove leftover pre-UVM manpages
 1.137 04-Feb-2003  thorpej Oops, forgot to remove links for callout_active and callout_deactivate.
 1.136 04-Feb-2003  thorpej Update for new callout(9) implemenatation.
 1.135 01-Feb-2003  thorpej Update for extensibe malloc types.
 1.134 11-Jan-2003  lha s/pfil_get_head/pfil_head_get/

fixes Joel Wilsson's <joelw@unix.se> misc/19796
 1.133 31-Dec-2002  thorpej Document aprint_error(), aprint_get_error_count(), and printf_nolog().
 1.132 31-Dec-2002  thorpej Document the "aprint" autoconfiguration message printing routines.
 1.131 23-Oct-2002  gmcgarry Add vgonel(), although it is used only once.
 1.130 20-Oct-2002  gmcgarry More kernel documentation.
 1.129 14-Oct-2002  gmcgarry link for vn_rdwr()
 1.128 14-Oct-2002  gmcgarry Move the vnode file descriptor operations into their own file.
Add vn_marktext() and vn_statfile() descriptions.
 1.127 05-Oct-2002  gmcgarry Document config_match().
 1.126 29-Sep-2002  jdolecek bring knote(9) and kfilter_register(9) from kqueue branch to mainline
HISTORY section mentions the interface is only available on experimental
kqueue branch (for now)
 1.125 29-Sep-2002  wiz Sort man page a bit after last.
 1.124 29-Sep-2002  wiz Rename sleep.9 to ltsleep.9, since sleep(9) is not there any more.
 1.123 22-Sep-2002  gmcgarry Document the details of the scheduler.
 1.122 28-Aug-2002  gmcgarry Documentation for Restartable Atomic Sequences (RAS).
 1.121 07-Aug-2002  tron Fix incorret (and obiously untested) symlink targets.
 1.120 07-Aug-2002  briggs Document new performance monitoring interface.
 1.119 04-Aug-2002  gmcgarry Document pci_set_powerstate()/pci_get_powerstate().
 1.118 02-Aug-2002  thorpej Manual page for hardware-assisted data mover interface.
 1.117 20-Jul-2002  thorpej * Add copyin_proc() and copyout_proc(), which are like copyin() and
copyout(), except they can operate on any process, not just curproc.
* Use this in uiomove() to allow UIO_USERSPACE to non-curproc.
 1.116 17-Jul-2002  hannken Add manpage for new device buffer queue interface.
With help from Thomas Klausner <wiz@netbsd.org>.
 1.115 16-Jul-2002  lha add missing pfil_head_get in manpage
add missing MLINKS
add new files to sets lists

fixes my own pr kern/15060
 1.114 14-Jul-2002  gmcgarry simple_lock_unlock -> simple_unlock
 1.113 09-Jul-2002  thorpej Overhaul documentation of the kernel signal facilities. Some text
liberally borrowed from Paul's psignal(9) manpage.

More work can be done here, but there's more here than before, at least.
 1.112 24-Jun-2002  gmcgarry Document for driver authors.
 1.111 31-May-2002  kleink Add missing bus_space_vaddr(9) link.
 1.110 28-May-2002  itojun add arc4random(9).
 1.109 25-May-2002  gmcgarry Document some mandatory machine-dependent interfaces. Addresses PR16272.
 1.108 05-Apr-2002  bouyer branches: 1.108.2;
Add a man page for mstohz()
 1.107 11-Feb-2002  kleink Add link for pci_conf_hook().
 1.106 07-Jan-2002  deberg add MALLOC.9 and FREE.9
 1.105 06-Jan-2002  deberg add VOP_GETPAGES to NAME and create link
 1.104 01-Jan-2002  augustss Add radio(4) man pages.
 1.103 24-Dec-2001  jdolecek Some basic documentation of uvm_loan() and uvm_unloan()
 1.102 05-Dec-2001  augustss Link malloc_roundup.9 to the right thing; section 9 links were off by one.
 1.101 05-Dec-2001  ad Document malloc_roundup().
 1.100 05-Dec-2001  lukem add hash(9)
 1.99 02-Dec-2001  gmcgarry Documentation for itimerfix(9), from Christos Zoulas.
 1.98 18-Nov-2001  kleink Create a bus_space_mmap(9) link, too.
 1.97 31-Oct-2001  gmcgarry Document new VEXECMAP vnode flag and rename vn_marktext() to vn_markexec().
 1.96 24-Oct-2001  enami s/fnctl/fcntl/
 1.95 22-Oct-2001  gmcgarry fnctl -> fcntl
 1.94 22-Oct-2001  gmcgarry Update for new pages and sort.
 1.93 04-Oct-2001  eeh Build the properties.9 manpage.
 1.92 10-Sep-2001  gmcgarry Document pci_find_device().
 1.91 09-Sep-2001  wiz Add hardclock(9). Written by myself, improved via some comments from
Christos (thanks!).
 1.90 04-Sep-2001  wiz Add hz(9) man page.
 1.89 04-Sep-2001  wiz Remove trailing whitespace
 1.88 28-Jul-2001  chs update uvm.9 links.
 1.87 12-Jul-2001  itojun add altq(9).
 1.86 07-Jul-2001  perry branches: 1.86.2;
add new b*() and mem*() man pages
 1.85 05-Jul-2001  nathanw Basic man page for setrunqueue() and remrunqueue(). Why not? They're easy.
 1.84 01-Jul-2001  gmcgarry Add some missing documentation.
 1.83 28-Jun-2001  itojun add m_pulldown.9 to MLINKS.
 1.82 21-Jun-2001  wiz disk_detach.9, not disk_detatch.9
 1.81 02-Jun-2001  jdolecek Document cnbell(), cngetc(), cngetsn(), cnpollc(), cnputc().
 1.80 24-May-2001  sommerfeld Clarify specification of in4_cksum; add description of in_cksum and
in6_cksum as well as makefile goo to install links.
 1.79 23-May-2001  sommerfeld Add in4_cksum
 1.78 12-May-2001  hubertf Add pool_init.9
 1.77 11-May-2001  bouyer Manual page describing interface between scsipi middle-layer and host bus
adapters.
 1.76 11-May-2001  eeh Install the cnmagic(9) manpage.
 1.75 27-Apr-2001  jdolecek Document ltsleep(9). Feel free to improve if you wish.
 1.74 24-Apr-2001  thorpej Add a manual page that describes the pmap(9) API and the requirements
of a pmap module.

Many thanks to Bill Sommerfeld for reviewing the document for me.
 1.73 18-Apr-2001  jdolecek Also create splvm(9) link to spl(9)
 1.72 10-Feb-2001  briggs Make and install pci_configure_bus(9) with a link to pci_conf_interrupt(9)
(called from pci_configure_bus()).
Also make and install pci_intr(9), which seems to have been overlooked in
the Makefile
 1.71 02-Nov-2000  eeh Add manpage for new line discipline stuff.
 1.70 13-Oct-2000  itojun document m_dup(9). talk a little bit about issues with shared
external storage (M_EXT).
 1.69 09-Aug-2000  tv Add manpage for bitmask_snprintf(9), describe tprintf(9), and simplify
kprintf(9) by removing the now unsupported "extra" printf format strings.
 1.68 03-Aug-2000  itojun add ppsratecheck(9).
 1.67 25-Jul-2000  pk Add man page for a new time-of-day clock driver interface. Also documents the
already existing clock_secs_to_ymdhms() & clock_ymdhms_to_secs().
 1.66 14-Jul-2000  gmcgarry Back out previous.
 1.65 13-Jul-2000  gmcgarry uvn_attach.9 -> uvm_attach.9
 1.64 26-Jun-2000  veego Fix the broken spinlockmgr.9 link to lock.9
 1.63 25-Jun-2000  gmcgarry lock(9) manpage. Not much, but it is a start.
 1.62 04-Jun-2000  cgd branches: 1.62.2;
Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
 1.61 31-May-2000  cgd documentation of the NetBSD machine-independent software interrupt
framework, dredged out of the January, 1997 tech-kern e-mail archives.
 1.60 15-Apr-2000  augustss branches: 1.60.2;
Add a man page describing the ucom interface for making tty like USB devices.
 1.59 27-Mar-2000  soda add a MLINKS for spllowersoftclock.9
 1.58 23-Mar-2000  thorpej Documentation for new callout interfaces.
 1.57 03-Feb-2000  cgd add documentation for the ratecheck() function, a new kernel function
(not even committed... docs before changes?! CALL RIPLEY!!!)
which can help programmers implement rate-limited actions.
 1.56 07-Jan-2000  kleink vslock() is gone in UVM; uvm_vslock() can be found in uvm(9).
 1.55 15-Dec-1999  augustss Add a skeleton for the usbdi documentation.
This is still very incomplete.
 1.54 06-Dec-1999  augustss Back out one change that's not ready yet.
 1.53 06-Dec-1999  augustss Document powerhook functions.
 1.52 21-May-1999  lukem branches: 1.52.4;
add humanize_number(9) / format_bytes(9)
 1.51 03-Apr-1999  msaitoh add MLINKS for pool(9).
fix some bugs.
 1.50 07-Mar-1999  hwr branches: 1.50.2;
Enable ioctl.9.
 1.49 13-Feb-1999  nathanw Document uiomove().
 1.48 19-Oct-1998  bouyer Man page describing the interface between the MI core wdc and its bus
front-ends.
 1.47 01-Oct-1998  jtk add bioscall(9) for i386
 1.46 15-Sep-1998  jeremy Added microtime.9.
 1.45 03-Sep-1998  frueauf Keep the alphabetical order.
 1.44 03-Sep-1998  augustss Fix kprintf related Makefile problems.
From John.P.Darrow@wheaton.edu, fixes PR 6091.
 1.43 02-Sep-1998  jeremy Added kprintf.9 and its aliases.
 1.42 09-May-1998  mrg uvm_swapout is a static function, not exported. does not belong in uvm.9
 1.41 08-May-1998  kleink Create a link for uvm_swapout(9).
 1.40 04-May-1998  mrg add uvm.9
 1.39 29-Apr-1998  kml rt_timer documentation
 1.38 19-Feb-1998  gwr remove man9.sun3x from SUBDIR list
 1.37 10-Jan-1998  lukem add pool.9
 1.36 07-Jan-1998  thorpej Sigh, typo.
 1.35 07-Jan-1998  thorpej oops, forgot a \
 1.34 07-Jan-1998  thorpej Add fork1.9
 1.33 24-Dec-1997  jeremy Added sun3x subdirectory.
 1.32 12-Nov-1997  mrg add missing .Nm calls and MLINKS. from spz@serpens.swb.de
 1.31 01-Nov-1997  explorer Add rnd.9
 1.30 11-Oct-1997  mycroft branches: 1.30.2;
Use bsd.man.mk and bsd.subdir.mk as appropriate.
 1.29 04-Oct-1997  kleink Add manual page containing documentation on mbuf management functions and
macros; contributed by S.P.Zeidler <spz@serpens.swb.de>.
 1.28 27-Aug-1997  augustss Add audio(9).
 1.27 13-Aug-1997  christos Rename busdma -> bus_dma
 1.26 13-Aug-1997  cgd bus_space_*() function manual page. Written by me (as plain text),
converted to use the doc macros by Christos, then severely cleaned,
hacked, and improved by me.
 1.25 12-Aug-1997  mikel add busdma(9) and MLINKS for bus_dma* functions
 1.24 29-May-1997  jeremy My last commit included SUBDIRS that don't exist yet. Remove them.
 1.23 25-May-1997  is Documentation of Ethernet and FDDI driver support functions and macros.
 1.22 22-May-1997  jeremy Add intro(9).
 1.21 21-May-1997  jeremy Added SUBDIRS= for architecture dependent directories.
 1.20 12-May-1997  explorer Add kernel log() man page. Will add other logging/printing functions soon.
 1.19 27-Mar-1997  gwr Renamed boot to cpu_reboot
 1.18 17-Mar-1997  is add arpresolve and arpintr descriptions
 1.17 16-Mar-1997  is Pull the ARP support function man page up to the main branch.
 1.16 11-Mar-1997  mikel add incomplete spl(9); realphabetize Makefile.
 1.15 27-Dec-1996  veego branches: 1.15.2;
Fix typo in the last commit.
 1.14 27-Dec-1996  pk Document disklabel routines.
 1.13 25-Nov-1996  pk Have a shot at `mi_switch()' and `cpu_switch()'.
 1.12 24-Sep-1996  ghudson Install mrg's pfil man page, which he forgot to have installed.
 1.11 24-Sep-1996  ghudson Install extent.9 and symlinks for each of its functions.
 1.10 10-Aug-1996  explorer add panic(9) man page
 1.9 23-Jun-1996  pk Add timeout(9)/untimeout(9)
 1.8 23-Jun-1996  pk Add tsleep(9)/sleep(9)/wakeup(9)
 1.7 22-Jun-1996  pk Add psignal()/pgsignal()/gsignal()
 1.6 16-Jun-1996  pk malloc.9/free.9
 1.5 16-Jun-1996  pk Additions: access.9, physio.9, vslock.9
 1.4 09-Jan-1996  thorpej Add fetch(9) and store(9), which describe the {fu,su}{,i}{byte,word}
functions. Cross-reference with each-other and copy(9).
 1.3 09-Jan-1996  thorpej copy(9) manual page: describes the copyin(), copyout(), copystr(),
copyinstr(), and copyoutstr() functions.
 1.2 09-Jan-1996  thorpej Build and install the disk(9) manual page.
 1.1 25-Nov-1995  perry Added first section 9 man pages -- initial pages and Makefile from cgd
Section 9 man pages document the internals of the kernel.
 1.15.2.1 06-Mar-1997  is A start to define the arp functions.
 1.30.2.2 12-Nov-1997  mrg pull up from trunk: add missing .Nm calls and MLINKS. from spz@serpens.swb.de
 1.30.2.1 01-Nov-1997  mellon Pull rev 1.31 up from trunk (explorer)
 1.50.2.2 18-Feb-2000  he Pull up revision 1.57 (via patch, requested by thorpej):
Implement ratecheck(), a function which can help kernel programmers
implement rate-limited actions.
 1.50.2.1 15-Apr-1999  msaitoh pullup 1.50-1.51 (add MLINKS for pool.9)
 1.52.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.60.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.62.2.3 15-Nov-2001  he Pull up revisions 1.90-1.91 (via patch, requested by hubertf):
Add manual pages hz(9) and hardclock(9), already referenced from
microtime(9).
 1.62.2.2 04-Feb-2001  he Pull up revisions 1.63-1.64 (via patch, requested by pooka):
Install lock.9 man page.
 1.62.2.1 16-Aug-2000  itojun pullup (approved by releng-1-5)

add ppsratecheck(9).

distrib/sets/lists/comp/mi 1.251 -> 1.252
share/man/man9/Makefile 1.67 -> 1.68 (equivalent to)
share/man/man9/ppsratecheck.9 (new)
sys/kern/kern_time.c 1.49 -> 1.51, 1.52 -> 1.53
sys/sys/time.h 1.29 -> 1.30
 1.86.2.1 10-Jul-2001  lukem add kfilter_register(9), knote(9)
 1.108.2.3 14-Feb-2003  jmc Pullup rev 1.138 (reqeusted by drochner in ticket #1160)
Remove leftover pre-UVM manpages.
 1.108.2.2 09-Nov-2002  tron Pull up revision 1.117 (requested by thorpej in ticket #527):
* Add copyin_proc() and copyout_proc(), which are like copyin() and
copyout(), except they can operate on any process, not just curproc.
* Use this in uiomove() to allow UIO_USERSPACE to non-curproc.
 1.108.2.1 31-May-2002  tv Pull up revision 1.111 (requested by kleink in ticket #106):
Add missing bus_space_vaddr(9) link.
 1.160.2.1 11-Sep-2004  he Pull up revision 1.164 (requested by yamt in ticket #831):
Add m_copyback_cow and m_makewritable.
 1.169.2.1 21-Jul-2005  tron Pull up revision 1.172 (requested by pooka in ticket #605):
statfs -> statvfs
(better late than never)
 1.194.2.2 19-Apr-2006  elad install kauth.9... can't believe i forgot to commit this one.
 1.194.2.1 11-Mar-2006  elad file Makefile was added on branch elad-kernelauth on 2006-04-19 21:24:02 +0000
 1.198.2.1 19-Jun-2006  chap Sync with head.
 1.248.6.2 21-Jul-2007  dsieger Fix a glitch in previous commit:
s/mi_switch 9/mi_switch.9/

Reported by Paul Goyette.
 1.248.6.1 21-Jul-2007  dsieger file Makefile was added on branch matt-mips64 on 2007-07-21 15:35:47 +0000
 1.248.4.3 23-Mar-2008  matt sync with HEAD
 1.248.4.2 09-Jan-2008  matt sync with HEAD
 1.248.4.1 06-Nov-2007  matt sync with HEAD
 1.258.4.1 24-Mar-2008  keiichi sync with head.
 1.261.4.1 18-May-2008  yamt sync with head.
 1.261.2.3 05-Oct-2008  mjf Sync with HEAD.
 1.261.2.2 02-Jun-2008  mjf Sync with HEAD.
 1.261.2.1 02-Apr-2008  mjf file Makefile was added on branch mjf-devfs2 on 2008-06-02 13:21:40 +0000
 1.264.2.2 24-Sep-2008  wrstuden Merge in changes between wrstuden-revivesa-base-2 and
wrstuden-revivesa-base-3.
 1.264.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.270.2.4 01-Dec-2008  snj Pull up following revision(s) (requested by tsutsui in ticket #153):
distrib/sets/lists/comp/mi: revision 1.1214
share/man/man9/Makefile: revision 1.274
share/man/man9/timecounter.9: revision 1.3
Replace timecounter(9) man page with OpenBSD's tc_init(9)
since the previous one was derived from FreeBSD's time(9)
which was based on NetBSD's time_second(9), and
it didn't mention the timecounter framework itself.
 1.270.2.3 01-Dec-2008  snj Pull up following revision(s) (requested by tsutsui in ticket #153):
distrib/sets/lists/comp/mi: revision 1.1213
share/man/man9/Makefile: revision 1.273
share/man/man9/tvtohz.9: revision 1.1
Add tvtohz(9) man page, which is Xref'ed from microtime(9) and microuptime(9),
from FreeBSD.
 1.270.2.2 01-Dec-2008  snj Pull up following revision(s) (requested by tsutsui in ticket #153):
distrib/sets/lists/comp/mi: revision 1.1212
share/man/man9/Makefile: revision 1.272
share/man/man9/microtime.9: revision 1.13
Merge description about bintime(9), getbintime(9), getmicrotime(9),
nanotime(9), and getnanotime(9) from FreeBSD's microtime(9) man page,
and add appropriate MLINKS.
 1.270.2.1 01-Dec-2008  snj Pull up following revision(s) (requested by tsutsui in ticket #153):
distrib/sets/lists/comp/mi: revision 1.1210
share/man/man9/Makefile: revision 1.271
Add MLINKS to binuptime(9), getbinuptime(9), getmicrouptime(9), nanouptime(9),
and getnanouptime(9) from microuptime(9).
 1.277.2.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.329.2.3 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.329.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.329.2.1 29-Apr-2010  uebayasi file Makefile was added on branch uebayasi-xip on 2010-08-17 06:40:04 +0000
 1.343.2.2 05-Mar-2011  bouyer Sync with HEAD
 1.343.2.1 08-Feb-2011  bouyer Sync with HEAD
 1.347.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.357.2.5 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.357.2.4 16-Jan-2013  yamt sync with (a bit old) head
 1.357.2.3 30-Oct-2012  yamt sync with head
 1.357.2.2 23-May-2012  yamt sync with head.
 1.357.2.1 17-Apr-2012  yamt sync with head
 1.362.2.2 27-Oct-2014  msaitoh Add genfs_rename.9 for ticket 1134. Rreported by Herbert J. Skuhra.
 1.362.2.1 08-Aug-2012  martin Pull up following revision(s) (requested by mlelstv in ticket #466):
sys/arch/amiga/amiga/autoconf.c: revision 1.113
sys/arch/rs6000/rs6000/autoconf.c: revision 1.4
sys/arch/emips/emips/autoconf.c: revision 1.6
sys/arch/sandpoint/sandpoint/autoconf.c: revision 1.27
sys/arch/evbmips/alchemy/autoconf.c: revision 1.18
sys/arch/sgimips/sgimips/autoconf.c: revision 1.43
sys/arch/atari/atari/autoconf.c: revision 1.63
sys/arch/powerpc/oea/ofw_autoconf.c: revision 1.17
sys/arch/mmeye/mmeye/autoconf.c: revision 1.9
distrib/sets/lists/comp/mi: revision 1.1771
sys/arch/mipsco/mipsco/autoconf.c: revision 1.25
sys/arch/iyonix/iyonix/autoconf.c: revision 1.14
sys/arch/hp300/hp300/autoconf.c: revision 1.100
sys/kern/init_main.c: revision 1.445
sys/arch/pmax/pmax/autoconf.c: revision 1.79
sys/arch/netwinder/netwinder/autoconf.c: revision 1.11
sys/arch/dreamcast/dreamcast/autoconf.c: revision 1.10
sys/arch/ibmnws/ibmnws/autoconf.c: revision 1.12
sys/arch/evbppc/ev64260/autoconf.c: revision 1.17
sys/arch/evbmips/gdium/autoconf.c: revision 1.5
sys/arch/algor/algor/autoconf.c: revision 1.21
share/man/man9/Makefile: revision 1.367
sys/arch/ews4800mips/ews4800mips/autoconf.c: revision 1.9
sys/arch/amigappc/amigappc/autoconf.c: revision 1.5
sys/arch/x86/x86/x86_autoconf.c: revision 1.65
sys/arch/acorn26/acorn26/autoconf.c: revision 1.9
sys/arch/mvmeppc/mvmeppc/autoconf.c: revision 1.13
sys/arch/vax/vax/autoconf.c: revision 1.94
sys/arch/usermode/dev/cpu.c: revision 1.72
sys/arch/evbppc/virtex/autoconf.c: revision 1.5
sys/arch/next68k/next68k/autoconf.c: revision 1.26
sys/arch/mac68k/mac68k/autoconf.c: revision 1.73
sys/arch/ia64/ia64/autoconf.c: revision 1.6
sys/arch/evbppc/obs405/obs405_autoconf.c: revision 1.6
share/man/man9/cpu_rootconf.9: revision 1.7
sys/arch/landisk/landisk/autoconf.c: revision 1.6
sys/arch/evbmips/malta/autoconf.c: revision 1.16
sys/arch/sun3/sun3/autoconf.c: revision 1.76
sys/arch/evbppc/explora/autoconf.c: revision 1.13
sys/arch/sun3/sun3/autoconf.c: revision 1.77
sys/arch/evbmips/loongson/autoconf.c: revision 1.3
sys/arch/evbmips/atheros/autoconf.c: revision 1.11
sys/arch/sparc64/sparc64/autoconf.c: revision 1.188
sys/arch/acorn32/acorn32/autoconf.c: revision 1.18
sys/arch/evbarm/evbarm/autoconf.c: revision 1.13
sys/arch/cobalt/cobalt/autoconf.c: revision 1.30
sys/arch/mvme68k/mvme68k/autoconf.c: revision 1.46
sys/arch/hp700/hp700/autoconf.c: revision 1.48
sys/arch/evbmips/adm5120/autoconf.c: revision 1.5
sys/arch/hpcmips/hpcmips/autoconf.c: revision 1.25
sys/arch/alpha/alpha/autoconf.c: revision 1.52
sys/arch/sparc/sparc/autoconf.c: revision 1.244
sys/arch/evbppc/pmppc/autoconf.c: revision 1.7
sys/arch/bebox/bebox/autoconf.c: revision 1.25
sys/arch/luna68k/luna68k/autoconf.c: revision 1.13
sys/arch/hpcarm/hpcarm/autoconf.c: revision 1.20
sys/arch/evbppc/walnut/autoconf.c: revision 1.21
sys/arch/cesfic/cesfic/autoconf.c: revision 1.26
sys/arch/cats/cats/autoconf.c: revision 1.17
sys/arch/x68k/x68k/autoconf.c: revision 1.67
sys/arch/news68k/news68k/autoconf.c: revision 1.21
sys/arch/arc/arc/autoconf.c: revision 1.34
sys/arch/evbsh3/evbsh3/autoconf.c: revision 1.11
sys/sys/conf.h: revision 1.143
sys/arch/evbmips/rasoc/autoconf.c: revision 1.3
sys/arch/hpcsh/hpcsh/autoconf.c: revision 1.26
sys/arch/sun68k/sun68k/autoconf.c: revision 1.29
sys/arch/evbmips/rmixl/autoconf.c: revision 1.6
sys/arch/zaurus/zaurus/autoconf.c: revision 1.12
sys/arch/xen/x86/autoconf.c: revision 1.15
sys/arch/evbppc/mpc85xx/autoconf.c: revision 1.6
sys/arch/shark/shark/autoconf.c: revision 1.18
sys/arch/prep/prep/autoconf.c: revision 1.25
sys/arch/newsmips/newsmips/autoconf.c: revision 1.36
sys/arch/sbmips/sbmips/autoconf.c: revision 1.8
Do not call setroot() from MD code and from MI code, which has
unwanted sideeffects in the RB_ASKNAME case. This fixes PR/46732.
No longer wrap MD cpu_rootconf(), as hp300 port stores reboot information
as a side effect. Instead call MI rootconf() from MD code which makes
rootconf() now a wrapper to setroot().
Adjust several MD routines to set the global booted_device,booted_partition
variables instead of passing partial information to setroot().
Make cpu_rootconf(9) describe the calling order.
add rootconf(9) as a link to cpu_rootconf(9)
make this compile again
 1.367.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.367.2.2 23-Jun-2013  tls resync from head
 1.367.2.1 25-Feb-2013  tls resync with head
 1.377.2.1 10-Aug-2014  tls Rebase.
 1.378.2.1 17-Jan-2015  martin Pull up following revision(s) (requested by maxv in ticket #427):
sys/compat/svr4/svr4_schedctl.c: revision 1.8
sys/netinet/tcp_timer.c: revision 1.88
sys/miscfs/genfs/layer_vfsops.c: revision 1.45
sys/compat/svr4/svr4_ioctl.c: revision 1.37
sys/ufs/chfs/chfs_vfsops.c: revision 1.14
sys/miscfs/fdesc/fdesc_vfsops.c: revision 1.91
sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.30
sys/compat/common/kern_time_50.c: revision 1.28
sys/netinet6/ip6_forward.c: revision 1.74
sys/miscfs/umapfs/umap_vnops.c: revision 1.57
sys/compat/svr4/svr4_fcntl.c: revision 1.74
distrib/sets/lists/comp/mi: revision 1.1931
sys/netinet6/udp6_output.c: revision 1.46
sys/fs/puffs/puffs_compat.c: revision 1.3
sys/fs/udf/udf_rename.c: revision 1.11
sys/compat/svr4/svr4_filio.c: revision 1.24
sys/fs/udf/udf_rename.c: revision 1.12
sys/netinet/tcp_usrreq.c: revision 1.202
sys/miscfs/umapfs/umap_subr.c: revision 1.29
sys/compat/linux/common/linux_fadvise64.c: revision 1.3
sys/netinet/if_atm.c: revision 1.34
sys/miscfs/procfs/procfs_subr.c: revision 1.106
sys/miscfs/genfs/layer_subr.c: revision 1.37
sys/netinet/tcp_sack.c: revision 1.30
sys/compat/freebsd/freebsd_misc.c: revision 1.33
sys/compat/freebsd/freebsd_file.c: revision 1.33
sys/ufs/chfs/chfs_vnode.c: revision 1.12
sys/compat/svr4/svr4_ttold.c: revision 1.34
sys/compat/linux/common/linux_file.c: revision 1.114
sys/compat/linux/arch/mips/linux_machdep.c: revision 1.43
sys/compat/linux/common/linux_signal.c: revision 1.76
sys/compat/common/compat_util.c: revision 1.46
sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.18
sys/compat/svr4/svr4_sockio.c: revision 1.36
sys/compat/linux/arch/arm/linux_machdep.c: revision 1.32
sys/compat/svr4/svr4_signal.c: revision 1.66
sys/kern/kern_exec.c: revision 1.410
sys/fs/puffs/puffs_vfsops.c: revision 1.115
sys/compat/svr4/svr4_exec_elf64.c: revision 1.15
sys/compat/linux/arch/i386/linux_machdep.c: revision 1.159
sys/compat/linux/arch/alpha/linux_machdep.c: revision 1.50
sys/compat/linux32/common/linux32_misc.c: revision 1.24
sys/netinet/in_pcb.c: revision 1.153
sys/sys/malloc.h: revision 1.116
sys/compat/common/if_43.c: revision 1.9
share/man/man9/Makefile: revision 1.380
sys/netinet/tcp_vtw.c: revision 1.12
sys/miscfs/umapfs/umap_vfsops.c: revision 1.95
sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.186
sys/compat/common/uipc_syscalls_43.c: revision 1.46
sys/ufs/ext2fs/ext2fs_vnops.c: revision 1.115
sys/fs/puffs/puffs_msgif.c: revision 1.97
sys/compat/svr4/svr4_ipc.c: revision 1.27
sys/compat/linux/common/linux_exec.c: revision 1.117
sys/ufs/ext2fs/ext2fs_readwrite.c: revision 1.66
sys/netinet/tcp_output.c: revision 1.179
sys/compat/svr4/svr4_termios.c: revision 1.28
sys/fs/udf/udf_strat_bootstrap.c: revision 1.4
sys/fs/puffs/puffs_subr.c: revision 1.67
sys/fs/puffs/puffs_node.c: revision 1.36
sys/miscfs/overlay/overlay_vnops.c: revision 1.21
sys/fs/cd9660/cd9660_node.c: revision 1.34
sys/netinet/raw_ip.c: revision 1.146
sys/sys/mallocvar.h: revision 1.13
sys/miscfs/overlay/overlay_vfsops.c: revision 1.63
share/man/man9/malloc.9: revision 1.50
sys/netinet6/dest6.c: revision 1.18
sys/compat/linux/common/linux_uselib.c: revision 1.33
sys/compat/linux/common/linux_socket.c: revision 1.120
share/man/man9/malloc.9: revision 1.51
sys/netinet/tcp_subr.c: revision 1.257
sys/compat/linux/common/linux_socketcall.c: revision 1.45
sys/compat/linux/common/linux_fadvise64_64.c: revision 1.3
sys/compat/freebsd/freebsd_ipc.c: revision 1.17
sys/compat/linux/common/linux_misc_notalpha.c: revision 1.109
sys/compat/linux/arch/alpha/linux_pipe.c: revision 1.17
sys/netinet6/in6_pcb.c: revision 1.132
sys/netinet6/in6_ifattach.c: revision 1.94
sys/compat/svr4/svr4_exec_elf32.c: revision 1.15
sys/miscfs/nullfs/null_vfsops.c: revision 1.90
sys/fs/cd9660/cd9660_util.c: revision 1.12
sys/compat/linux/arch/powerpc/linux_machdep.c: revision 1.48
sys/compat/freebsd/freebsd_exec_elf32.c: revision 1.20
sys/miscfs/procfs/procfs_vfsops.c: revision 1.94
sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.28
sys/compat/linux/common/linux_sched.c: revision 1.67
sys/compat/linux/common/linux_exec_aout.c: revision 1.67
sys/compat/linux/common/linux_pipe.c: revision 1.67
sys/compat/linux/common/linux_llseek.c: revision 1.34
sys/compat/linux/arch/mips/linux_ptrace.c: revision 1.10
Do not uselessly include <sys/malloc.h>.
Cleanup:
- remove struct kmembuckets (dead)
- correctly deadify MALLOC_XX
- remove MALLOC_DEFINE_LIMIT and MALLOC_JUSTDEFINE_LIMIT (dead)
- remove malloc_roundup(), malloc_type_setlimit(), MALLOC_DEFINE_LIMIT()
and MALLOC_JUSTDEFINE_LIMIT() from man 9 malloc
New sentence, new line. Bump date for previous.
Obsolete malloc_roundup(9), malloc_type_setlimit(9) and MALLOC_DEFINE_LIMIT(9)
man pages.
 1.396.2.6 26-Apr-2017  pgoyette Sync with HEAD
 1.396.2.5 20-Mar-2017  pgoyette Sync with HEAD
 1.396.2.4 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.396.2.3 18-Jul-2016  pgoyette Additional MLINKS for devsw_attach
 1.396.2.2 16-Jul-2016  pgoyette Add MLINKS for localcount(9)
 1.396.2.1 16-Jul-2016  pgoyette Initial man page for localcount(9).
 1.401.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.409.2.4 02-May-2017  pgoyette Sync with HEAD - tag prg-localcount2-base1
 1.409.2.3 30-Apr-2017  pgoyette Introduce mutex_ownable(9) and use it in localcount_release(9).

Commit of same code to head is awaiting discussion on tech-kern.
 1.409.2.2 28-Apr-2017  pgoyette Introduce config_detach_release() which does all the work from the
former config_detach(). Now, config_detach() simply acquires a
reference to the device, which config_detach_release() can release!

This is needed because some drivers call config_detach() with a
reference, while other drivers have not been updated to use the
localcount reference mechanism. So we provide a shim to make
everyone equal.
 1.409.2.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.414.2.2 09-Oct-2018  martin Pull up following revision(s) (requested by hannken in ticket #1052):

sys/kern/vfs_trans.c: revision 1.51
distrib/sets/lists/comp/mi: revision 1.2233
share/man/man9/fstrans.9: revision 1.27
share/man/man9/Makefile: revision 1.431
sys/sys/fstrans.h: revision 1.12
sys/rump/librump/rumpkern/emul.c: revision 1.187
sys/dev/vnd.c: revision 1.266
sys/miscfs/genfs/genfs_vfsops.c: revision 1.8

Bring back three state file system suspension:

NORMAL -> SUSPENDING -> SUSPENDED

and add operation fstrans_start_lazy() that only blocks while SUSPENDED.

Change vndthread() support operation handle_with_rdwr() to bracket
its file system operations by fstrans_start_lazy() and fstrans_done().

PR kern/53624 (dom0 freeze on domU exit)
 1.414.2.1 07-Jun-2018  martin Pull up following revision(s) (requested by nat in ticket #848):

share/man/man9/Makefile: revision 1.422
distrib/sets/lists/comp/mi: revision 1.2198
share/man/man7/Makefile: revision 1.33
share/man/man9/audio.9: revision 1.47
share/man/man7/audio.7: file removal
sys/dev/audio.c: revision 1.456
sys/dev/audio.c: revision 1.457
distrib/sets/lists/man/mi: revision 1.1591
share/man/man9/intro.9: revision 1.20
share/man/man7/audio.7: revision 1.3
share/man/man9/audio_system.9: revision 1.1
share/man/man7/intro.7: revision 1.26
share/man/man4/audio.4: revision 1.86

Fix a typo with sc_out/inports when setting the hardware recording gain on the
mix ring. Found by mrg@
XXX pullup-8

Using audioctl without the -p switch defaults to the mix ring. This allows
setting the hardware gain etc.

Update the audio spec in audio.7 to reflect these changes.
Addresses PR kern/52781.

Move the audio specification to section 9 under audio_system.
Ok wiz@
 1.418.2.8 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.418.2.7 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.418.2.6 20-Oct-2018  pgoyette Sync with head
 1.418.2.5 30-Sep-2018  pgoyette Ssync with HEAD
 1.418.2.4 28-Jul-2018  pgoyette Sync with HEAD
 1.418.2.3 25-Jun-2018  pgoyette Sync with HEAD
 1.418.2.2 21-May-2018  pgoyette Sync with HEAD
 1.418.2.1 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.427.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.427.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.427.2.1 10-Jun-2019  christos Sync with HEAD
 1.437.2.4 20-Jul-2024  martin Pull up following revision(s) (requested by rin in ticket #1857):

share/man/man9/imax.9: revision 1.7
share/man/man9/imax.9: revision 1.8
share/man/man9/Makefile: revision 1.471
distrib/sets/lists/comp/mi: revision 1.2463

imax(9): Belatedly catch up with min/max --> uimin/uimax renaming
done almost 6 years ago:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/lib/libkern/libkern.h#rev1.130
Thanks asahi at iij for pointing this out :)

imax.9: Additional fixes for previous...

man9: Provide all combinations of {,u}{i,l}{max,min}(9)
sets/lists: Add all combinations of {,u}{i,l}{max,min}(9)
 1.437.2.3 08-Dec-2019  martin Pull up following revision(s) (requested by riastradh in ticket #508):

distrib/sets/lists/comp/mi: revision 1.2294
share/man/man9/Makefile: revision 1.443
sys/sys/atomic.h: revision 1.18
share/man/man9/atomic_loadstore.9: revision 1.1
share/man/man9/atomic_loadstore.9: revision 1.2

New atomic load/store operations for the kernel.

Guarantee no fusing and no tearing, and can optionally impose
ordering relative to other memory operations.

Unordered:
- atomic_load_relaxed
- atomic_store_relaxed

Ordered:
- atomic_load_acquire
- atomic_load_consume
- atomic_store_release

These are intended to match C11 semantics, and can be defined in
terms of the C11 atomic API when ready.

Document relation to atomic_ops(3) and membar_ops(3).
 1.437.2.2 01-Sep-2019  martin Pull up following revision(s) (requested by oster in ticket #166):

share/man/man9/Makefile: revision 1.439

oops. i must have deleted the 'u' in 'ustore.9' when partially
fixing the alphabeta ordering here. fixes build.
 1.437.2.1 01-Sep-2019  martin Pull up following revision(s) (requested by mrg in ticket #135):

distrib/sets/lists/comp/mi 1.2279
distrib/sets/lists/modules/mi 1.123
share/man/man9/Makefile 1.438
share/man/man9/usbnet.9 1.1-1.9
sys/dev/ic/rndisreg.h 1.3
sys/dev/usb/TODO 1.47-1.52
sys/dev/usb/TODO.usbmp 1.15,1.16
sys/dev/usb/files.usb 1.157-1.167
sys/dev/usb/if_aue.c 1.155-1.161
sys/dev/usb/if_auereg.h 1.30-1.32
sys/dev/usb/if_axe.c 1.103-1.119
sys/dev/usb/if_axen.c 1.51-1.53,1.55-1.67
sys/dev/usb/if_axenreg.h 1.15
sys/dev/usb/if_cdce.c 1.54-1.67
sys/dev/usb/if_cue.c 1.85,1.86
sys/dev/usb/if_cuereg.h 1.23
sys/dev/usb/if_kue.c 1.97-1.100
sys/dev/usb/if_kuereg.h 1.23,1.24
sys/dev/usb/if_mue.c 1.51-1.55
sys/dev/usb/if_muereg.h 1.6
sys/dev/usb/if_muevar.h 1.9
sys/dev/usb/if_smsc.c 1.46-1.61
sys/dev/usb/if_smscreg.h 1.6
sys/dev/usb/if_smscvar.h delete
sys/dev/usb/if_udav.c 1.60-1.71
sys/dev/usb/if_udavreg.h 1.14,1.15
sys/dev/usb/if_upl.c 1.65,1.66
sys/dev/usb/if_ure.c 1.15-1.31
sys/dev/usb/if_urevar.h 1.4,1.5
sys/dev/usb/if_url.c 1.67-1.70
sys/dev/usb/if_urlreg.h 1.14
sys/dev/usb/if_urndis.c 1.22-1.33
sys/dev/usb/if_urtwn.c 1.72
sys/dev/usb/ohci.c 1.290
sys/dev/usb/uhub.c 1.143
sys/dev/usb/usb.c 1.180
sys/dev/usb/usb.h 1.118
sys/dev/usb/usb_mem.c 1.71
sys/dev/usb/usb_subr.c 1.238,1.239
sys/dev/usb/usbdevs 1.772
sys/dev/usb/usbdi.c 1.183,1.186
sys/dev/usb/usbdi.h 1.97
sys/dev/usb/usbdi_util.c 1.75
sys/dev/usb/usbhist.h 1.5,1.6
sys/dev/usb/usbnet.c 1.1-1.24
sys/dev/usb/usbnet.h 1.1-1.14
sys/dev/usb/usbroothub.c 1.9
sys/dev/usb/xhci.c 1.109,1.110
sys/modules/Makefile 1.223
sys/modules/usbnet/Makefile 1.1

usbnet(9): Add common framework for USB network devices.
This bring various safety fixes to all updated drivers,
and includes locking clean up, detach safety when being
used or not, separate rx/tx locks to improve performance,
porting to NET_MPSAFE, many edge/error case bugs in
drivers fixed, as well as resovling PRs 54303 and 54308.
These drivers are converted: axe(4), axen(4), aue(4),
cdce(4), cue(4), kue(4), mue(4), smsc(4), udav(4),
upl(4), ure(4), url(4), and urndis(4).
 1.465.2.5 20-Sep-2024  martin Pull up following revision(s) (requested by rin in ticket #887):

share/man/man9/versioningsyscalls.9: revision 1.1
share/man/man9/versioningsyscalls.9: revision 1.2
share/man/man9/versioningsyscalls.9: revision 1.3
share/man/man9/versioningsyscalls.9: revision 1.4
share/man/man9/versioningsyscalls.9: revision 1.5
share/man/man9/versioningsyscalls.9: revision 1.6
share/man/man9/versioningsyscalls.9: revision 1.7
share/man/man9/Makefile: revision 1.467
distrib/sets/lists/comp/mi: revision 1.2435
distrib/sets/lists/comp/mi: revision 1.2436

Document how system call versioning is done. From this summer's compat-linux
GSoC, by Theodore Preduta.

fix typo
versioningsyscalls(9): markup fixes

While here, fix the pasto for the new ino_t and time_t size.

Forgot to commit the expanded userland portion

versioningsyscalls(9): wrap long line in the example

versioningsyscalls.9: fix typo

explain what the current and new numbering practice are.

s/and/an/
 1.465.2.4 20-Sep-2024  martin Pull up following revision(s) (requested by rin in ticket #878):

distrib/sets/lists/comp/mi: revision 1.2426
share/man/man9/portfeatures.9: revision 1.1
share/man/man9/portfeatures.9: revision 1.2
share/man/man9/portfeatures.9: revision 1.3
share/man/man9/Makefile: revision 1.466

portfeatures(9): the man page for the __HAVE macros

The man page itself is a skeleton/template for now. Please add short
descriptions and xrefs. If the target man page doesn't yet document
relevant __HAVE macros (hi, mutex(9)), please add something there,
possibly in a .Sh IMPLEMENTATION NOTES section.
fix typos

Document __HAVE_UCAS_FULL and __HAVE_UCAS_MP.
 1.465.2.3 24-Jul-2024  martin Pull up following revision(s) (requested by rin in ticket #767):

share/man/man9/Makefile: revision 1.472
distrib/sets/lists/comp/mi: revision 1.2465

crashme(9): Install man page

Suggested by ozaki-r@
 1.465.2.2 20-Jul-2024  martin Pull up following revision(s) (requested by rin in ticket #762):

share/man/man9/imax.9: revision 1.7
share/man/man9/imax.9: revision 1.8
share/man/man9/Makefile: revision 1.471
distrib/sets/lists/comp/mi: revision 1.2463

imax(9): Belatedly catch up with min/max --> uimin/uimax renaming
done almost 6 years ago:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/lib/libkern/libkern.h#rev1.130

Thanks asahi at iij for pointing this out :)

imax.9: Additional fixes for previous...
man9: Provide all combinations of {,u}{i,l}{max,min}(9)
sets/lists: Add all combinations of {,u}{i,l}{max,min}(9)
 1.465.2.1 14-Jan-2024  martin Pull up following revision(s) (requested by pgoyette in ticket #539):

distrib/sets/lists/comp/mi: revision 1.2452
share/man/man9/Makefile: revision 1.469

Install securelevel.9 as an alias of secmodel_securelevel.9
According to submitter, this should be sufficient to address misc/57824.
 1.470.2.1 02-Aug-2025  perseant Sync with HEAD
 1.11 19-Mar-2019  wiz New sentence, new line. Fix Dd argument.
 1.10 19-Mar-2019  ryo add INIT_ONCE(9), FINI_ONCE(9) with changing once_t.

Welcome to 8.99.36
 1.9 03-Jul-2017  wiz branches: 1.9.6;
Remove workaround for ancient HTML generation code.
 1.8 06-Jul-2010  jruoho Use .Xr for Xrefs.
 1.7 03-Oct-2008  pooka branches: 1.7.10;
fix example: ONCE_DECL(), not DECL_ONCE()
 1.6 14-Jul-2007  ad branches: 1.6.10;
- kcont was removed.
- Replace some references to tsleep.
 1.5 17-Jan-2006  wiz Be a bit more explicit what happens when init_func fails.
After explanation from yamt@.
 1.4 16-Jan-2006  wiz Improve English.
 1.3 16-Jan-2006  yamt sync with kernel.
 1.2 24-Nov-2005  wiz Grammar fix, HTML quoting, sort SEE ALSO.
 1.1 24-Nov-2005  yamt document RUN_ONCE.
 1.6.10.1 05-Oct-2008  mjf Sync with HEAD.
 1.7.10.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.9.6.1 10-Jun-2019  christos Sync with HEAD
 1.5 14-Jul-2007  dsieger Remove obsolete SCHED_LOCK(9), which is gone.

ok by <ad>
 1.4 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.3 27-Sep-2002  wiz Begin new sentences on new lines; drop trailing whitespace; some mdoc
and typo fixes.
 1.2 27-Sep-2002  wiz Correct argument to SCHED_LOCK; drop a trailing whitespace, fix an xref.
Begin a sentence on a new line.
 1.1 22-Sep-2002  gmcgarry Document the details of the scheduler.
 1.5 13-Dec-2015  wiz Add missing verb.
 1.4 13-Dec-2015  plunky Clarify the meaning of this. These macros do not operate on bit numbers
as is implied.. the macros are defined as

#define SET(t, f) ((t) |= (f))
#define ISSET(t, f) ((t) & (f))
#define CLR(t, f) ((t) &= ~(f))

When the rationale is to provide clarity in the source code, then it
is good to have manual pages that are correct.
 1.3 12-Mar-2014  jruoho Fix a prototype.
 1.2 13-Apr-2010  jruoho branches: 1.2.2; 1.2.8; 1.2.14;
Add a BUGS section.
 1.1 22-Mar-2010  jruoho Document the questionable ISSET/SET/CLR macros.
 1.2.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.8.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.2.2 13-Apr-2010  jruoho Add a BUGS section.
 1.2.2.1 13-Apr-2010  jruoho file SET.9 was added on branch uebayasi-xip on 2010-04-13 08:24:32 +0000
 1.2 08-Apr-2011  jruoho Xref param(3).
 1.1 30-Jul-2010  jruoho branches: 1.1.2;
Document the stack macros from <sys/param.h>.
 1.1.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.1.2.1 30-Jul-2010  uebayasi file STACK.9 was added on branch uebayasi-xip on 2010-08-17 06:41:05 +0000
 1.2 17-Jan-2022  wiz Sort ERRORS, mark up NULL.
 1.1 17-Jan-2022  christos Add new acl vnode op pages
 1.2 17-Jan-2022  wiz Sort ERRORS, mark up NULL.
 1.1 17-Jan-2022  christos Add new acl vnode op pages
 1.2 17-Jan-2022  wiz Sort ERRORS, mark up NULL.
 1.1 17-Jan-2022  christos Add new acl vnode op pages
 1.2 26-Oct-2024  riastradh __cpu_simple_lock(9): Document __SIMPLELOCK_UNLOCKED.
 1.1 12-Feb-2022  riastradh branches: 1.1.4;
__cpu_simple_lock(9): New man page.

This doesn't mean you should use it! Mostly it's to document the
semantics to help understand existing uses, which should not
proliferate, and audit definitions.
 1.1.4.1 02-Aug-2025  perseant Sync with HEAD
 1.5 10-Apr-2009  wiz New sentence, new line. Add RCS Id. Punctuation.
 1.4 10-Apr-2009  joerg Tweak markup.
 1.3 09-Mar-2009  joerg Fix preamble to match order set out by mdoc(7). Discussed with wiz.
 1.2 12-Nov-2008  ad branches: 1.2.2;
Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.1 10-Aug-2008  tls branches: 1.1.2; 1.1.4;
Manual pages for accept_filters(9), from FreeBSD. Also, document syntax we
added in NetBSD for specifying accept filters in inetd.conf.
 1.1.4.2 05-Oct-2008  mjf Sync with HEAD.
 1.1.4.1 10-Aug-2008  mjf file accept_filter.9 was added on branch mjf-devfs2 on 2008-10-05 20:11:23 +0000
 1.1.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.1.2.1 10-Aug-2008  wrstuden file accept_filter.9 was added on branch wrstuden-revivesa on 2008-09-18 04:38:09 +0000
 1.2.2.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.11 10-Feb-2003  drochner remove leftover pre-UVM manpages
 1.10 07-Feb-2002  wiz branches: 1.10.2;
Fix typo reported in misc/15524.
 1.9 26-Dec-2001  wiz Drop some .Pps.
 1.8 21-Jun-2001  wiz Fix typos, punctuation and whitespace.
 1.7 16-Mar-1999  garbled More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.6 06-Mar-1999  mycroft Fix formatting errors (bad sentence breaks).
 1.5 09-May-1998  kleink Use size_t to pass the length of the memory region to operate on to chgkprot(),
kernacc(), useracc(), vslock() and vsunlock(); (unsigned) ints are not
adequate on all platforms.
 1.4 22-Apr-1998  ross Add David Brownlee's new intro pages, with editing. (PR #534[23])
Also, while here, expand apparently incorrectly .Dd month abbreviations.
(I thought about doing this in tmac/doc-common...heh...that would have
allowed a possible reverse map back to abbreviations.)
 1.3 11-Nov-1997  mrg add missing .Nm sections
 1.2 08-Oct-1997  jtc branches: 1.2.2;
Fix tipo inherited from old version of TNF copyright form.
s/REGENTS/FOUNDATION/.
 1.1 16-Jun-1996  pk kernacc() & useracc() manual pages.
 1.2.2.1 11-Nov-1997  mrg pull up from trunk: add missing .Nm sections
 1.10.2.1 14-Feb-2003  jmc Remove file. (reqeusted by drochner in ticket #1160)
Remove leftover pre-UVM manpages.
 1.6 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.5 11-Apr-2010  wiz branches: 1.5.2;
Make ready for HTML output.
Add RCS Id.
 1.4 11-Apr-2010  jruoho Use .Nm.
 1.3 09-Mar-2009  joerg Fix preamble to match order set out by mdoc(7). Discussed with wiz.
 1.2 13-Nov-2008  njoly branches: 1.2.2;
mdoc warning fix.
 1.1 10-Aug-2008  tls branches: 1.1.2; 1.1.4;
Manual pages for accept_filters(9), from FreeBSD. Also, document syntax we
added in NetBSD for specifying accept filters in inetd.conf.
 1.1.4.2 05-Oct-2008  mjf Sync with HEAD.
 1.1.4.1 10-Aug-2008  mjf file accf_data.9 was added on branch mjf-devfs2 on 2008-10-05 20:11:23 +0000
 1.1.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.1.2.1 10-Aug-2008  wrstuden file accf_data.9 was added on branch wrstuden-revivesa on 2008-09-18 04:38:09 +0000
 1.2.2.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.5.2.2 11-Apr-2010  wiz Make ready for HTML output.
Add RCS Id.
 1.5.2.1 11-Apr-2010  wiz file accf_data.9 was added on branch uebayasi-xip on 2010-04-11 21:32:11 +0000
 1.8 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.7 11-Apr-2010  jruoho branches: 1.7.2;
Use .Nm.
 1.6 14-Jul-2009  wiz New sentence, new line. Add RCS Id. Make HTML-ready.
 1.5 14-Jul-2009  tls Clarify accf_http manual page per wiz's request.
 1.4 09-Mar-2009  joerg Fix preamble to match order set out by mdoc(7). Discussed with wiz.
 1.3 13-Nov-2008  njoly branches: 1.3.2;
mdoc warning fix.
 1.2 04-Sep-2008  hubertf branches: 1.2.2; 1.2.4;
The pseudo-device is really "accf_http" instead of "accf_data"
Bump date

Sanity-checked by tls@
 1.1 10-Aug-2008  tls Manual pages for accept_filters(9), from FreeBSD. Also, document syntax we
added in NetBSD for specifying accept filters in inetd.conf.
 1.2.4.2 05-Oct-2008  mjf Sync with HEAD.
 1.2.4.1 04-Sep-2008  mjf file accf_http.9 was added on branch mjf-devfs2 on 2008-10-05 20:11:23 +0000
 1.2.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.2.2.1 04-Sep-2008  wrstuden file accf_http.9 was added on branch wrstuden-revivesa on 2008-09-18 04:38:09 +0000
 1.3.2.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.7.2.2 11-Apr-2010  jruoho Use .Nm.
 1.7.2.1 11-Apr-2010  jruoho file accf_http.9 was added on branch uebayasi-xip on 2010-04-11 05:40:17 +0000
 1.2 05-Aug-2024  uwe branches: 1.2.4;
acct_process(9): fix markup glitches, g/c pasto
 1.1 05-Aug-2024  christos Add a man page for acct_process to be referenced from acct.5
 1.2.4.2 02-Aug-2025  perseant Sync with HEAD
 1.2.4.1 05-Aug-2024  perseant file acct_process.9 was added on branch perseant-exfatfs on 2025-08-02 05:55:17 +0000
 1.4 18-Jan-2022  christos put back more links now that we have them.
 1.3 17-Jan-2022  wiz Sort SEE ALSO, fix punctuation.
 1.2 17-Jan-2022  christos Add acl related changes; there is no more vaccess; document the genfs functions
instead.
 1.1 18-Jun-2020  wiz Add acl(9) from FreeBSD.

Needs work before it should be added to the build.
 1.19 25-Oct-2022  msaitoh ifq_drops was changed to use uint64_t.
 1.18 26-May-2022  rillig altq.9: remove CONSTCOND comment from example code

Since 2021-01-31, lint no longer needs CONSTCOND in a do-while loop.
 1.17 21-Mar-2018  wiz Merge altq(4) HISTORY changes.
 1.16 20-Mar-2018  sevan Extend HISTORY section to match altq(4)
 1.15 03-Jul-2017  wiz branches: 1.15.4;
Remove workaround for ancient HTML generation code.
 1.14 24-Jun-2007  rumble TRUE -> true, FALSE -> false.
 1.13 14-Oct-2006  wiz Sort SEE ALSO.
 1.12 12-Oct-2006  peter Merge the peter-altq branch.

(sync with KAME & add support for using ALTQ with pf(4)).
 1.11 19-Jun-2005  peter Use 'pattr' consistently, bump date.
 1.10 17-Jun-2005  peter - Correct the IFQ_ENQUEUE macro.
- Fix some internal variable names for some macros.
- A few corrections from the OpenBSD manpage.
 1.9 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.8 28-May-2002  wiz Drop trailing spaces.
 1.7 28-May-2002  itojun nroff fixes, from openbsd via kame
 1.6 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.5 29-Oct-2001  jdolecek fix typo in example code
 1.4 04-Sep-2001  wiz Boring whitespace fixes.
 1.3 12-Jul-2001  wiz Grammar, whitespace and typo fixes.
 1.2 12-Jul-2001  itojun typo fixes, sync with openbsd tree
 1.1 12-Jul-2001  itojun add altq(9).
 1.15.4.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.4 28-Nov-2011  tls Add cprng(9) manual page, remove arc4random(9) manual page
 1.3 26-Dec-2005  perry branches: 1.3.46;
u_intN_t -> uintN_t
 1.2 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.1 28-May-2002  itojun add arc4random(9).
 1.3.46.1 17-Apr-2012  yamt sync with head
 1.27 01-Sep-2019  sevan Update arpresolve arguments
 1.26 17-Sep-2013  wiz branches: 1.26.18; 1.26.26; 1.26.28;
Sort sections: consistently put CODE REFERENCES directly before SEE ALSO.
 1.25 14-May-2010  joerg branches: 1.25.6; 1.25.12;
Resort sections to canonical order
 1.24 10-Mar-2009  joerg branches: 1.24.2;
Avoid .br, use .An for authors as suggested by wiz.
 1.23 30-Apr-2008  martin branches: 1.23.6;
Convert TNF licenses to new 2 clause variant
 1.22 04-Oct-2004  rumble branches: 1.22.26; 1.22.28;
Removed accidental repetitious words.
 1.21 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.20 03-Aug-2002  soren ifattach(9) has been split into *_ifattach().
 1.19 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.18 21-Jun-2001  wiz Fix typos, punctuation and whitespace.
 1.17 29-Apr-2001  jhawk Remove nonexistant references to ifattach(9) and *_ifattach(9),
per PR kern/4901.
 1.16 16-Mar-1999  garbled More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.15 06-Mar-1999  mycroft Fix formatting errors (bad sentence breaks).
 1.14 16-Feb-1999  is Fix Copyright dates
 1.13 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.12 03-Sep-1998  msaitoh Eliminate extra comma in SEE ALSO section
 1.11 02-Sep-1998  jeremy Changed references to filesystem paths to use the mdoc filesystem path
macro (.Pa).
 1.10 24-Nov-1997  lukem fix .Nx usage (use 1.0 instead of 0.9a, etc), and other minor cleanups
 1.9 12-Nov-1997  mrg add missing .Nm calls and MLINKS. from spz@serpens.swb.de
 1.8 25-May-1997  is branches: 1.8.2;
Add CODE REFERENCES sections. While here, move the fddi_{add,del}multi
description right below the ether_{add,del}multi description.
 1.7 25-May-1997  is Make clear which of these functions need to be called by hardware drivers.
 1.6 17-Mar-1997  is add arpresolve and arpintr descriptions
 1.5 16-Mar-1997  is Fix yet another typo.
 1.4 16-Mar-1997  is fix typo
 1.3 16-Mar-1997  is Pull the ARP support function man page up to the main branch.
 1.2 16-Mar-1997  is Pull this to the main branch.
 1.1 06-Mar-1997  is branches: 1.1.2;
file arp.9 was initially added on branch is-newarp.
 1.1.2.2 06-Mar-1997  is Add a few more details.
 1.1.2.1 06-Mar-1997  is A start to define the arp functions.
 1.8.2.1 12-Nov-1997  mrg pull up from trunk: add missing .Nm calls and MLINKS. from spz@serpens.swb.de
 1.22.28.1 18-May-2008  yamt sync with head.
 1.22.26.1 02-Jun-2008  mjf Sync with HEAD.
 1.23.6.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.24.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.25.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.25.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.26.28.1 02-Sep-2019  martin Pull up following revision(s) (requested by sevan in tickets
#154 - #164):

share/man/man1/man1.x68k/tvctrl.1: revision 1.6
share/man/man1/man1.x68k/aout2hux.1: revision 1.6
share/man/man1/man1.x68k/palette.1: revision 1.7
share/man/man9/arp.9: revision 1.27
share/man/man1/man1.atari/edahdi.1: revision 1.12
share/man/man1/man1.x68k/loadkmap.1: revision 1.7
share/man/man1/man1.atari/msconfig.1: revision 1.9
share/man/man1/man1.x68k/bellctrl.1: revision 1.16
share/man/man1/man1.x68k/bellctrl.1: revision 1.17
share/man/man4/null.4: revision 1.5
share/man/man4/null.4: revision 1.6
share/man/man1/man1.x68k/loadfont.1: revision 1.10
share/man/man8/man8.next68k/boot.8: revision 1.5

Provide history.
Improve grammar and readability. Minor cosmetics.
Update arpresolve arguments
 1.26.26.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.26.18.1 02-Sep-2019  martin Pull up following revision(s) (requested by sevan in tickets
#1352 - #1364):

share/man/man1/man1.x68k/tvctrl.1: revision 1.6
share/man/man1/man1.x68k/aout2hux.1: revision 1.6
share/man/man1/man1.x68k/palette.1: revision 1.7
share/man/man9/arp.9: revision 1.27
share/man/man1/man1.atari/edahdi.1: revision 1.12
share/man/man1/man1.x68k/loadkmap.1: revision 1.7
share/man/man1/man1.atari/msconfig.1: revision 1.9
share/man/man1/man1.x68k/bellctrl.1: revision 1.16
share/man/man1/man1.x68k/bellctrl.1: revision 1.17
share/man/man4/null.4: revision 1.5
share/man/man4/null.4: revision 1.6
share/man/man1/man1.x68k/loadfont.1: revision 1.10
share/man/man8/man8.next68k/boot.8: revision 1.5

Provide history.
Improve grammar and readability. Minor cosmetics.
Update arpresolve arguments
 1.8 18-Jun-2024  riastradh atomic_loadstore(9): Clarify relation to __HAVE_ATOMIC64_OPS.

PR kern/58340
 1.7 09-Apr-2022  riastradh branches: 1.7.2;
Introduce membar_acquire/release. Deprecate membar_enter/exit.

The names membar_enter/exit were unclear, and the documentation of
membar_enter has disagreed with the implementations on sparc,
powerpc, and even x86(!) for the entire time it has been in NetBSD.

The terms `acquire' and `release' are ubiquitous in the literature
today, and have been adopted in the C and C++ standards to mean
load-before-load/store and load/store-before-store, respectively,
which are exactly the orderings required by acquiring and releasing a
mutex, as well as other useful applications like decrementing a
reference count and then freeing the underlying object if it went to
zero.

Originally I proposed changing one word in the documentation for
membar_enter to make it load-before-load/store instead of
store-before-load/store, i.e., to make it an acquire barrier. I
proposed this on the grounds that

(a) all implementations guarantee load-before-load/store,
(b) some implementations fail to guarantee store-before-load/store,
and
(c) all uses in-tree assume load-before-load/store.

I verified parts (a) and (b) (except, for (a), powerpc didn't even
guarantee load-before-load/store -- isync isn't necessarily enough;
need lwsync in general -- but it _almost_ did, and it certainly didn't
guarantee store-before-load/store).

Part (c) might not be correct, however: under the mistaken assumption
that atomic-r/m/w then membar-w/rw is equivalent to atomic-r/m/w then
membar-r/rw, I only audited the cases of membar_enter that _aren't_
immediately after an atomic-r/m/w. All of those cases assume
load-before-load/store. But my assumption was wrong -- there are
cases of atomic-r/m/w then membar-w/rw that would be broken by
changing to atomic-r/m/w then membar-r/rw:

https://mail-index.netbsd.org/tech-kern/2022/03/29/msg028044.html

Furthermore, the name membar_enter has been adopted in other places
like OpenBSD where it actually does follow the documentation and
guarantee store-before-load/store, even if that order is not useful.
So the name membar_enter currently lives in a bad place where it
means either of two things -- r/rw or w/rw.

With this change, we deprecate membar_enter/exit, introduce
membar_acquire/release as better names for the useful pair (r/rw and
rw/w), and make sure the implementation of membar_enter guarantees
both what was documented _and_ what was implemented, making it an
alias for membar_sync.

While here, rework all of the membar_* definitions and aliases. The
new logic follows a rule to make it easier to audit:

membar_X is defined as an alias for membar_Y iff membar_X is
guaranteed by membar_Y.

The `no stronger than' relation is (the transitive closure of):

- membar_consumer (r/r) is guaranteed by membar_acquire (r/rw)
- membar_producer (w/w) is guaranteed by membar_release (rw/w)
- membar_acquire (r/rw) is guaranteed by membar_sync (rw/rw)
- membar_release (rw/w) is guaranteed by membar_sync (rw/rw)

And, for the deprecated membars:

- membar_enter (whether r/rw, w/rw, or rw/rw) is guaranteed by
membar_sync (rw/rw)
- membar_exit (rw/w) is guaranteed by membar_release (rw/w)

(membar_exit is identical to membar_release, but the name is
deprecated.)

Finally, while here, annotate some of the instructions with their
semantics. For powerpc, leave an essay with citations on the
unfortunate but -- as far as I can tell -- necessary decision to use
lwsync, not isync, for membar_acquire and membar_consumer.

Also add membar(3) and atomic(3) man page links.
 1.6 03-Sep-2020  riastradh atomic_load/store_* appeared in NetBSD 9, not 10.

Pullup preceded release of 9.0.
 1.5 08-Dec-2019  uwe branches: 1.5.2; 1.5.6;
Simplify markup for inline code to plain .Li in most places.

Use backslashes to protetect embedded spaces in inline code to prevent
filling from stretching them.

Use .Fn and .Fa to refer only to things this manual page documents,
they are not to be used for "a function" or "a function argument" in
general.

In code examples drop the empty line at the beginning of a function
(mandated by the KNF when there are no variables) - it doesn't help
readability here.
 1.4 07-Dec-2019  wiz Simplify macro usage.
 1.3 30-Nov-2019  riastradh Use .Sy, not .Em, for bold-faced WARNING of impending doom.

Underline and, worse, italic aren't as good at catching the eye.
 1.2 30-Nov-2019  riastradh Document relation to atomic_ops(3) and membar_ops(3).
 1.1 29-Nov-2019  riastradh New atomic load/store operations for the kernel.

Guarantee no fusing and no tearing, and can optionally impose
ordering relative to other memory operations.

Unordered:
- atomic_load_relaxed
- atomic_store_relaxed

Ordered:
- atomic_load_acquire
- atomic_load_consume
- atomic_store_release

These are intended to match C11 semantics, and can be defined in
terms of the C11 atomic API when ready.
 1.5.6.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.5.6.1 08-Dec-2019  martin file atomic_loadstore.9 was added on branch phil-wifi on 2020-04-08 14:07:22 +0000
 1.5.2.3 13-Sep-2020  martin Pull up following revision(s) (requested by riastradh in ticket #1082):

share/man/man9/atomic_loadstore.9: revision 1.6
share/man/man9/ipi.9: revision 1.5
lib/libc/atomic/membar_ops.3: revision 1.6

Spell out acronyms in title for clarity.

Update membar_ops(3) man page with examples and relation to C11.

Add exhortation to always always always document how membars come in
pairs for synchronization between two CPUs when you use them.

atomic_load/store_* appeared in NetBSD 9, not 10.

Pullup preceded release of 9.0.
 1.5.2.2 08-Dec-2019  martin Pull up following revision(s) (requested by riastradh in ticket #508):

distrib/sets/lists/comp/mi: revision 1.2294
share/man/man9/Makefile: revision 1.443
sys/sys/atomic.h: revision 1.18
share/man/man9/atomic_loadstore.9: revision 1.1
share/man/man9/atomic_loadstore.9: revision 1.2

New atomic load/store operations for the kernel.

Guarantee no fusing and no tearing, and can optionally impose
ordering relative to other memory operations.

Unordered:
- atomic_load_relaxed
- atomic_store_relaxed

Ordered:
- atomic_load_acquire
- atomic_load_consume
- atomic_store_release

These are intended to match C11 semantics, and can be defined in
terms of the C11 atomic API when ready.

Document relation to atomic_ops(3) and membar_ops(3).
 1.5.2.1 08-Dec-2019  martin file atomic_loadstore.9 was added on branch netbsd-9 on 2019-12-08 14:26:38 +0000
 1.7.2.1 27-Jun-2024  martin Pull up following revision(s) (requested by rin in ticket #728):

share/man/man9/atomic_loadstore.9: revision 1.8

atomic_loadstore(9): Clarify relation to __HAVE_ATOMIC64_OPS.

PR kern/58340
 1.61 28-Mar-2021  isaki Update documents.
- query_format has been mandatory (since at least Feb 2020).
- set_params has been replaced to set_format (since May 2019).
 1.60 06-Feb-2021  nia Fix various typos, etc
 1.59 06-Feb-2021  isaki Add a description to close().
> Before call to this, halt_input and halt_output are called if necessary.
 1.58 29-Feb-2020  isaki Describe about (existing) constraints on round_blocksize().
 1.57 23-Feb-2020  isaki Make start_input/halt_input optional if the driver has no recording,
make start_output/halt_output optional if the driver has no playback.
And remove such never called functions.
 1.56 12-Jun-2019  wiz Remove superfluous Pp.
 1.55 12-Jun-2019  isaki Describe about get_props() properties.
 1.54 09-May-2019  wiz Bump date.
 1.53 09-May-2019  wiz Improve wording, add more formatting.
 1.52 08-May-2019  isaki Update manpages respond to isaki-audio2 branch.
 1.51 16-Feb-2019  wiz Mark up NULL with Dv.
 1.50 16-Feb-2019  isaki Two minor fixes.
- 0 -> NULL.
- avoid K&R and sync with reality.
 1.49 02-Dec-2018  isaki Correct function name.
freem is used to free memory allocated by allocm.
 1.48 02-Dec-2018  isaki Sync prototypes with reality. These have been changed in 2011.
 1.47 28-May-2018  nat branches: 1.47.2;
Move the audio specification to section 9 under audio_system.

Ok wiz@
 1.46 15-May-2018  nat Add the audio mixer specification to section 7 of the manual.
See posting on tech-kern - "NetBSD Audio Specification 2018."
 1.45 03-Jul-2017  wiz branches: 1.45.4;
Remove workaround for ancient HTML generation code.
 1.44 13-Jul-2014  mbalmer branches: 1.44.16;
Fix a typo in a function name. Found by Nat Sloss, thanks.
Fixes PR misc/46446.
 1.43 23-Nov-2011  jmcneill branches: 1.43.6; 1.43.16;
update audio(9) docs for audiomp changes
 1.42 30-Apr-2008  martin branches: 1.42.22;
Convert TNF licenses to new 2 clause variant
 1.41 25-Apr-2008  mjf Grammar fix.
 1.40 10-Nov-2007  jmcneill branches: 1.40.6; 1.40.8;
Wups, bump date.
 1.39 10-Nov-2007  jmcneill It's mixer_ctrl_t, not mixer_ctl_t.
 1.38 30-Jul-2007  alc branches: 1.38.2; 1.38.4;
kills a few `caddr_t' occurences still present in manpage
 1.37 07-Mar-2007  dogcow running in emulated wizd mode, convert caddr_t to void *.
 1.36 11-Mar-2006  wiz s/.br/.Pp/; mark up AUDIOPOWER*; new sentence, new line.
Bump date for previous.
 1.35 07-Mar-2006  jmcneill Document powerstate callback in audio_hw_if
 1.34 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.33 20-Feb-2005  wiz Grammar improvement.
 1.32 20-Feb-2005  wiz > -> \*[Gt]
 1.31 20-Feb-2005  wiz Drop trailing whitespace.
 1.30 14-Feb-2005  fredb Delete a superfluous comma.
 1.29 14-Feb-2005  fredb Clarify that controls affecting both playback and recording should also
be placed in the AudioCinputs class.
 1.28 11-Jan-2005  kent reflect the recent audio_hw_if changes for open(), close(), set_params(),
round_blocksize(), trigger_output(), and trigger_input().
bump date.
 1.27 31-Jan-2004  wiz Bump date for previous, and break lines
so that macros only affect what they should.
 1.26 31-Jan-2004  fredb Fix a couple of long-standing bugs in the volume control(s) part of the
audio device interface:

1) When attempting to match the appropriate mixer control, we weren't
checking the class label, but only the second level label, so for
devices that had both an "inputs.cd" and a "record.cd", for example,
we could never do the right thing except by chance. For this reason,
evidently, all the record masters were labeled (by the underlying
drivers) either "record.record" or "record.volume", to distinguish
from "outputs.master". We'll now accept "record.master", and document
that as the the new preferred way.

2) More importantly, the model was deficient. Selecting a port on many
chips completely disables most of the level controls, which doesn't play
nice with other applications which are trying to use the interface. Now,
selecting a port simply sets which mixer input control shall be changed,
setting state in the audio layer. In other words, the "mixerout" port
is really selected all the time, enabling the final stage mixer, and
setting "gain" sets the level of the appropriate input. It should be
possible for separate applications to each control the mic, dac, and cd
inputs at the same time using this interface, simply by reiterating their
port selections with each change, but applications that don't bother to
do that aren't any worse off than they were before.

The user is expected to set the master output with another application,
dedicated to that task. Though it is now meaningful to select "no port"
with the audio device interface, to manipulate the master output, there's
no particular reason for an audio device consumer to do that. (I added
the capability in order to restore the initial state of the audio device,
for testing purposes. It might also be useful to users of broken binary-
only applications.)

Observe that the mixer device interface (and so, "mixerctl") still
retains all capabilities, including the ability to set the actual input
port on the chip, overriding the level controls. No change is being made
to the mixer device interface. The mixer device simply presents all the
controls on the chip, with no attempt at abstraction, so there are no
bugs there.

The upshot is, that applications that have been trying to use the audio
device interface to change the volume, such as mplayer, now "just work".

I've tested these changes extensively with "eso" and "eap" since first
proposing them on tech-kern last January, and somewhat with "esm" and a
few others. This closes both PR kern/10221, and PR kern/17159.
 1.25 05-May-2003  kleink Bring audio(9) back in sync with audio_if.h; from Murray Armfield in
PR misc/21432.
 1.24 06-Apr-2003  wiz Respect the law: Use A-law and mu-law as spellings as far as easily possible.
Inspired by Igor Sobrado in PR 19680.
 1.23 14-Oct-2002  wiz New sentence, new line.
 1.22 04-Jun-2002  isaki add factor_denom.
 1.21 13-Mar-2002  kent branches: 1.21.2;
Fix a typo
 1.20 11-Mar-2002  kent Update struct audio_params and description of set_params().
Feel free to correct my poor English ;-)
 1.19 03-Oct-2001  augustss Fix pasto in type of dev_ioctl method.
 1.18 02-Oct-2001  augustss Document a new method, dev_ioctl, for passing ioctl() down to the hardware
driver.
 1.17 21-Jun-2001  wiz Fix typos, punctuation and whitespace.
 1.16 24-Jul-2000  ad Fix a couple of oversights.
 1.15 17-Feb-2000  kleink Missed in previous: remove midi goo from argument list as well.
 1.14 11-Feb-2000  kleink * Nuke obsoleted midi interface from audio_attach_mi().
* Document trgger_{in,out}put().
Fixes PR kern/9341.
 1.13 16-Jun-1999  kleink allocm, freem: one step closer to reality.
 1.12 12-Jun-1999  kleink Sync round_buffersize() with reality.
 1.11 13-Apr-1999  augustss Make the copyrights conform to the standard.
 1.10 24-Mar-1999  mycroft branches: 1.10.2;
Remove blank lines.
 1.9 16-Mar-1999  garbled More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.8 22-Apr-1998  ross Add David Brownlee's new intro pages, with editing. (PR #534[23])
Also, while here, expand apparently incorrectly .Dd month abbreviations.
(I thought about doing this in tmac/doc-common...heh...that would have
allowed a possible reverse map back to abbreviations.)
 1.7 19-Oct-1997  augustss Layout changes.
 1.6 19-Oct-1997  augustss Small clarification.
 1.5 19-Oct-1997  augustss Update for SunOS compatibility.
 1.4 13-Oct-1997  augustss Fix pastos.
 1.3 11-Oct-1997  augustss Fix typos.
 1.2 08-Oct-1997  jtc Fix tipo inherited from old version of TNF copyright form.
s/REGENTS/FOUNDATION/.
 1.1 24-Aug-1997  augustss Initial version of the documentation of the interface between the
low and high level audio drivers, the audio_hw_if struct.
 1.10.2.1 16-Apr-1999  augustss Make a bunch of copyright headers conform to the standard.
Pullup approved by Perry.
 1.21.2.1 10-Jun-2002  tv Pull up revision 1.22 (requested by 194 in ticket #0):
add factor_denom.
 1.38.4.2 30-Jul-2007  alc kills a few `caddr_t' occurences still present in manpage
 1.38.4.1 30-Jul-2007  alc file audio.9 was added on branch matt-mips64 on 2007-07-30 22:48:47 +0000
 1.38.2.1 09-Jan-2008  matt sync with HEAD
 1.40.8.1 18-May-2008  yamt sync with head.
 1.40.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.42.22.1 17-Apr-2012  yamt sync with head
 1.43.16.1 10-Aug-2014  tls Rebase.
 1.43.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.44.16.2 07-Jun-2018  martin Pull up following revision(s) (requested by nat in ticket #848):

share/man/man9/Makefile: revision 1.422
distrib/sets/lists/comp/mi: revision 1.2198
share/man/man7/Makefile: revision 1.33
share/man/man9/audio.9: revision 1.47
share/man/man7/audio.7: file removal
sys/dev/audio.c: revision 1.456
sys/dev/audio.c: revision 1.457
distrib/sets/lists/man/mi: revision 1.1591
share/man/man9/intro.9: revision 1.20
share/man/man7/audio.7: revision 1.3
share/man/man9/audio_system.9: revision 1.1
share/man/man7/intro.7: revision 1.26
share/man/man4/audio.4: revision 1.86

Fix a typo with sc_out/inports when setting the hardware recording gain on the
mix ring. Found by mrg@
XXX pullup-8

Using audioctl without the -p switch defaults to the mix ring. This allows
setting the hardware gain etc.

Update the audio spec in audio.7 to reflect these changes.
Addresses PR kern/52781.

Move the audio specification to section 9 under audio_system.
Ok wiz@
 1.44.16.1 15-May-2018  martin Pull up following revision(s) (requested by nat in ticket #825):

share/man/man7/Makefile: revision 1.32
share/man/man9/audio.9: revision 1.46
sys/dev/audio.c: revision 1.453
sys/dev/audio.c: revision 1.454
sys/dev/audio.c: revision 1.455
share/man/man7/audio.7: revision 1.1
share/man/man7/audio.7: revision 1.2
share/man/man7/intro.7: revision 1.24
share/man/man4/audio.4: revision 1.85
distrib/sets/lists/man/mi: revision 1.1586

Fix numbering of vchan mixer controls to correspond to the vchan number in
use.

This makes the numbering of vchans consistient for audioctl and mixerctl.
Expose the audio_info structure of vchan zero(0) the mix ring to allow
setting the hardware gain and balance via audioctl(1) using the -p 0
switch.

It is not possible to influence the hardware gain/blance from the
audio_info structure of vchans 1 onwards. It is now possible to return
the audio mixers audio format from the audio_info structure of vchan 0 to
ease applications configuring for mmapped play back.

This is conformant to the audio specification posted on tech-kern see:

"NetBSD Audio Specification 2018"

or audio.7 manual page to be added in a follow up commit.
Add the audio mixer specification to section 7 of the manual.
See posting on tech-kern - "NetBSD Audio Specification 2018."
Update the introduction page to section 7 of the manual noting the audio
spec.

Various improvements, more markup, typo fixes.

Fix over cautious compiler error - setmode may not be initialized.
 1.45.4.3 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.45.4.2 25-Jun-2018  pgoyette Sync with HEAD
 1.45.4.1 21-May-2018  pgoyette Sync with HEAD
 1.47.2.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.47.2.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.47.2.1 10-Jun-2019  christos Sync with HEAD
 1.2 08-May-2019  isaki Update manpages respond to isaki-audio2 branch.
 1.1 28-May-2018  nat branches: 1.1.2; 1.1.4; 1.1.6;
Move the audio specification to section 9 under audio_system.

Ok wiz@
 1.1.6.1 10-Jun-2019  christos Sync with HEAD
 1.1.4.2 25-Jun-2018  pgoyette Sync with HEAD
 1.1.4.1 28-May-2018  pgoyette file audio_system.9 was added on branch pgoyette-compat on 2018-06-25 07:25:37 +0000
 1.1.2.2 07-Jun-2018  martin Pull up following revision(s) (requested by nat in ticket #848):

share/man/man9/Makefile: revision 1.422
distrib/sets/lists/comp/mi: revision 1.2198
share/man/man7/Makefile: revision 1.33
share/man/man9/audio.9: revision 1.47
share/man/man7/audio.7: file removal
sys/dev/audio.c: revision 1.456
sys/dev/audio.c: revision 1.457
distrib/sets/lists/man/mi: revision 1.1591
share/man/man9/intro.9: revision 1.20
share/man/man7/audio.7: revision 1.3
share/man/man9/audio_system.9: revision 1.1
share/man/man7/intro.7: revision 1.26
share/man/man4/audio.4: revision 1.86

Fix a typo with sc_out/inports when setting the hardware recording gain on the
mix ring. Found by mrg@
XXX pullup-8

Using audioctl without the -p switch defaults to the mix ring. This allows
setting the hardware gain etc.

Update the audio spec in audio.7 to reflect these changes.
Addresses PR kern/52781.

Move the audio specification to section 9 under audio_system.
Ok wiz@
 1.1.2.1 28-May-2018  martin file audio_system.9 was added on branch netbsd-8 on 2018-06-07 18:24:15 +0000
 1.35 08-Aug-2021  andvar change othersize to otherwise. I believe this is what was meant in the context.
 1.34 07-Aug-2021  uwe autoconf(9) - Improve formatting.

Don't hide consumed cfargs in the second sentence of a function's
description, they ends up hidden towards the right margin and that
sentence is guaranteed to get a line break further reducing its
readability. Instead make that the first sentence and start the
description with a new paragraph. That makes it looks like part of
the signature and is much more prominent.

Various markup improvements while here.

Bump date for thorpej-cfargs2 changes.
 1.33 07-Aug-2021  andvar s/configuraiton/configuration/ in comments and man pages.
 1.32 07-Aug-2021  thorpej Update for thorpej-cfargs2.
 1.31 28-Apr-2021  thorpej Update autoconf(9) for recent autoconfiguration changes.
 1.30 13-Mar-2013  riastradh branches: 1.30.20;
Fix argument order for config_attach_loc in autoconf(9).
 1.29 17-Feb-2012  plunky branches: 1.29.2;
document config_detach_children(9)
 1.28 02-Dec-2010  wiz branches: 1.28.6; 1.28.8;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.27 25-Jun-2010  tsutsui Add config_mountroot(9) in autoconf(9) man page and LINKS for it.
 1.26 07-Dec-2009  dyoung branches: 1.26.2;
Don't mention the activate interface, since config_activate() has been
gone for a while, now.
 1.25 16-Sep-2009  dyoung Delete documentation for config_activate(9), it does not exist any
more.
 1.24 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.23 04-Oct-2007  alc branches: 1.23.6; 1.23.8;
Sync with code in src/sys/sys/device.h:
- remove the `submatch' argument of config_found_ia()
- precise that config_found_ia() callis config_found_sm_loc() with both
`locs' and `submatch' set to NULL
 1.22 04-Oct-2007  alc fix unbalanced double quote
 1.21 14-Jul-2007  ad branches: 1.21.4;
- kcont was removed.
- Replace some references to tsleep.
 1.20 13-Oct-2006  wiz Bump date for previous.
 1.19 07-Oct-2006  cube Synchronise documentation with code. E.g., config_search is no more, but
instead you have config_search_{loc,ia}. Add documentation for
config_finalize_regsiter, too. Mostly fixes PR#32106 by Gavan Fantom, as I
think the cfdriver_* and cfattach_* stuff should be documented too, but I'm
not entirely sure where yet.
 1.18 20-Jun-2005  peter Change all .Xr config 8 to .Xr config 1, following the recent move of
config from usr.sbin -> usr.bin.

Reviewed by wiz.
 1.17 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.16 04-Apr-2003  wiz Refer ltsleep(9) instead of non-existing sleep(9).
 1.15 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.14 07-Jan-2003  jonb What is error.h? Perhaps it should be errno.h?...
 1.13 14-Oct-2002  wiz New sentence, new line.
 1.12 13-Oct-2002  wiz Bump date and copyright for config_match addition.
New sentence, new line; and add a missing closing brace.
 1.11 05-Oct-2002  gmcgarry Document config_match().
 1.10 02-Apr-2002  heinz typos
 1.9 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.8 13-Dec-2001  gmcgarry Use "machine description file" and "device definition files" correctly.
 1.7 18-Oct-2001  wiz Remove an empty line.
 1.6 18-Oct-2001  gmcgarry Improve the descriptions of the detach and activate/deactivate interfaces.
 1.5 13-Sep-2001  briggs Correct the return value description for config_found_sm().
Talk about return values for config_attach(), too.
 1.4 05-Sep-2001  gmcgarry Spelling and punctuation fixes.
 1.3 04-Sep-2001  wiz Boring whitespace fixes.
 1.2 17-Aug-2001  cjs Indicate what the config_found_sm submatch param is set to using config_found.
 1.1 01-Jul-2001  gmcgarry Add some missing documentation.
 1.21.4.1 06-Nov-2007  matt sync with HEAD
 1.23.8.1 18-May-2008  yamt sync with head.
 1.23.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.26.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.28.8.1 27-Oct-2014  msaitoh Pull up following revision(s) (requested by riastradh in ticket #1137):
share/man/man9/autoconf.9: revision 1.30
Fix argument order for config_attach_loc in autoconf(9).
 1.28.6.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.28.6.1 17-Apr-2012  yamt sync with head
 1.29.2.1 23-Jun-2013  tls resync from head
 1.30.20.2 17-May-2017  pgoyette Update autoconf(9) to mention that config_attach_pseudo() returns with
a reference held on the device.
 1.30.20.1 28-Apr-2017  pgoyette Introduce config_detach_release() which does all the work from the
former config_detach(). Now, config_detach() simply acquires a
reference to the device, which config_detach_release() can release!

This is needed because some drivers call config_detach() with a
reference, while other drivers have not been updated to use the
localcount reference mechanism. So we provide a shim to make
everyone equal.
 1.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.1 11-Mar-2006  kleink branches: 1.1.20; 1.1.22;
Document libkern's bcdtobin(9)/bintobcd(9).
 1.1.22.1 18-May-2008  yamt sync with head.
 1.1.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.6 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22309, verified by myself.
 1.5 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.4 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.3 23-Nov-2001  jdolecek Use <sys/systm.h> instead of <systm.h>. Noted in kern/14697 by John Franklin
 1.2 04-Sep-2001  wiz Usually, the SEE ALSO section doesn't end with a dot.
 1.1 07-Jul-2001  perry man pages for b*() and mem*(), noting b*() to be obsolete
 1.9 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22309, verified by myself.
 1.8 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.7 14-Oct-2002  wiz New sentence, new line.
 1.6 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.5 26-Dec-2001  wiz Fix SEE ALSO section.
 1.4 23-Nov-2001  jdolecek Use <sys/systm.h> instead of <systm.h>. Noted in kern/14697 by John Franklin
 1.3 04-Sep-2001  wiz Boring whitespace fixes.
 1.2 04-Sep-2001  wiz Usually, the SEE ALSO section doesn't end with a dot.
 1.1 07-Jul-2001  perry man pages for b*() and mem*(), noting b*() to be obsolete
 1.2 08-Jun-2010  jruoho Ups. Fix wrong filename suffix.
 1.1 08-Jun-2010  jruoho Briefly document the bintime_add() family of static inline functions.
 1.2 08-Jun-2010  wiz branches: 1.2.2;
Fix xref.
 1.1 08-Jun-2010  jruoho Ups. Fix wrong filename suffix.
 1.2.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.2.2.1 08-Jun-2010  uebayasi file bintime_add.9 was added on branch uebayasi-xip on 2010-08-17 06:41:05 +0000
 1.11 16-Dec-2008  christos kill bitmask_snprintf
 1.10 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.9 29-Jul-2007  pooka branches: 1.9.10; 1.9.12; 1.9.14;
update CODE REFERENCES to match new module
 1.8 27-Oct-2004  wiz Add missing whitespace (thanks, john)
 1.7 27-Oct-2004  wiz Remove some trailing whitespace and unnecessary macro argument quoting;
some other minor fixes.
 1.6 26-Oct-2004  heas Document Chris Torek's (the "new" format) bitmask format string.
 1.5 17-Oct-2004  heas bitmask_snprintf() returns char *, not void.
 1.4 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.3 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.2 04-Sep-2001  wiz Boring whitespace fixes.
 1.1 09-Aug-2000  tv Add manpage for bitmask_snprintf(9), describe tprintf(9), and simplify
kprintf(9) by removing the now unsupported "extra" printf format strings.
 1.9.14.2 29-Jul-2007  pooka update CODE REFERENCES to match new module
 1.9.14.1 29-Jul-2007  pooka file bitmask_snprintf.9 was added on branch matt-mips64 on 2007-07-29 09:40:55 +0000
 1.9.12.1 18-May-2008  yamt sync with head.
 1.9.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.6 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.5 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.4 02-Dec-2007  wiz New sentence, new line. Spelling. Prepare for HTML output.
 1.3 28-Nov-2007  plunky Clean up the way that bluetooth drivers attach to the bluetooth stack,
to remove the frobbing that drivers must do in the hci_unit structure.

- driver provides a static const interface descriptor
- hci_unit is allocated by hci_attach() rather than part of softc
- statistics are compiled by driver and provided on request
- driver provides output methods and is responsible for output queue
- stack provides input methods and is responsible for input queue
- mutex is used to arbitrate device queue access
 1.2 21-Apr-2007  plunky branches: 1.2.4;
Add 'service level' security for L2CAP and RFCOMM connections, following
the Linux (BlueZ) API.

- L2CAP or RFCOMM connections can require the baseband radio link
mode be any of:
authenticated (devices are paired)
encrypted (implies authentication)
secured (encryption, plus generate new link key)

- for sockets, the mode is set using setsockopt(2) and the socket
connection will be aborted if the mode change fails.

- mode settings will be applied during connection establishment, and
for safety, we enter a wait state and will only proceed when the mode
settings are successfuly set.

- It is possible to change the mode on already open connections, but
not possible to guarantee that data already queued (from either end)
will not be delivered. (this is a feature, not a bug)

- bthidev(4) and rfcomm_sppd(1) support "auth", "encrypt" and
"secure" options

- btdevctl(8) by default enables "auth" for HIDs, and "encrypt" for
keyboards (which are required to support it)
 1.1 19-Jun-2006  gdamore branches: 1.1.4; 1.1.6;
Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.
 1.1.6.1 03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.1.4.1 19-Jul-2007  liamjfoy Pull up following revision(s) (requested by plunky in ticket #744):
sys/netbt/l2cap_lower.c: revision 1.6
sys/dev/bluetooth/btdev.h: revision 1.6
sys/netbt/sco_socket.c: revision 1.9
sys/netbt/rfcomm_upper.c: revision 1.3
sys/netbt/l2cap_socket.c: revision 1.7
sys/netbt/rfcomm_upper.c: revision 1.5
lib/libusbhid/usbhid.h: revision 1.5
sys/netbt/rfcomm_upper.c: revision 1.6
usr.sbin/btdevctl/btdevctl.c: revision 1.4
usr.sbin/btdevctl/btdevctl.h: revision 1.3
usr.sbin/btdevctl/btdevctl.8: revision 1.4
sys/netbt/rfcomm_session.c: revision 1.5
sys/netbt/hci.h: revision 1.10
usr.bin/rfcomm_sppd/rfcomm_sppd.c: revision 1.6
sys/netbt/hci_link.c: revision 1.11
usr.bin/rfcomm_sppd/rfcomm_sppd.c: revision 1.7
usr.bin/rfcomm_sppd/rfcomm_sppd.c: revision 1.8
sys/dev/bluetooth/btsco.c: revision 1.14
sys/netbt/rfcomm_session.c: revision 1.9
usr.sbin/btdevctl/sdp.c: revision 1.2
share/man/man9/bluetooth.9: revision 1.2
usr.sbin/btdevctl/sdp.c: revision 1.3
sys/dev/bluetooth/bthidev.c: revision 1.8
sys/netbt/l2cap.h: revision 1.4
sys/netbt/rfcomm.h: revision 1.3
sys/netbt/l2cap.h: revision 1.5
sys/netbt/l2cap_misc.c: revision 1.3
share/man/man4/bluetooth.4: revision 1.5
lib/libusbhid/usbhid.3: revision 1.11
sys/netbt/bluetooth.h: revision 1.5
share/man/man4/bthidev.4: revision 1.8
sys/netbt/rfcomm_dlc.c: revision 1.3
usr.sbin/btdevctl/print.c: revision 1.8
sys/netbt/rfcomm_socket.c: revision 1.7
sys/netbt/l2cap_signal.c: revision 1.4
sys/netbt/l2cap_signal.c: revision 1.5
sys/netbt/l2cap_signal.c: revision 1.7
sys/netbt/hci_event.c: revision 1.6
usr.bin/rfcomm_sppd/rfcomm_sppd.1: revision 1.5
sys/netbt/l2cap_upper.c: revision 1.3
sys/netbt/l2cap_lower.c: revision 1.2
usr.sbin/btdevctl/db.c: revision 1.3
sys/netbt/l2cap_upper.c: revision 1.6
lib/libusbhid/descr.c: revision 1.5
sys/netbt/l2cap_upper.c: revision 1.7
sys/netbt/l2cap_lower.c: revision 1.4
Add 'service level' security for L2CAP and RFCOMM connections, following
the Linux (BlueZ) API.
- L2CAP or RFCOMM connections can require the baseband radio link
mode be any of:
authenticated (devices are paired)
encrypted (implies authentication)
secured (encryption, plus generate new link key)
- for sockets, the mode is set using setsockopt(2) and the socket
connection will be aborted if the mode change fails.
- mode settings will be applied during connection establishment, and
for safety, we enter a wait state and will only proceed when the mode
settings are successfuly set.
- It is possible to change the mode on already open connections, but
not possible to guarantee that data already queued (from either end)
will not be delivered. (this is a feature, not a bug)
- bthidev(4) and rfcomm_sppd(1) support "auth", "encrypt" and
"secure" options
- btdevctl(8) by default enables "auth" for HIDs, and "encrypt" for
keyboards (which are required to support it)
- ALSO INCLUDES OTHER MINOR FIXES
 1.2.4.1 09-Jan-2008  matt sync with HEAD
 1.3 27-Mar-1997  gwr Renamed boot to cpu_reboot (via repository copy)
 1.2 24-Sep-1996  ghudson Document bootstr parameter added by mrg a little while ago.
 1.1 25-Nov-1995  perry Added first section 9 man pages -- initial pages and Makefile from cgd
Section 9 man pages document the internals of the kernel.
 1.8 19-Jul-2018  wiz Remove trailing whitespace.
 1.7 15-Jul-2018  maxv Retire ipkdb entirely. The option was removed from the config files
yesterday.

ok kamil christos
 1.6 25-Feb-2010  wiz branches: 1.6.2; 1.6.46; 1.6.48;
Uncomment crash(8) reference.
 1.5 28-Sep-2009  apb .Xs -> .Dq.

There's no such thing as ".Xs"; it was a typo for ".Sx". However,
.Sx is intended for references to another section of the same man page,
not for references to sections of a different man page.
 1.4 11-Sep-2009  wiz Bump date for previous; add comma in enumeration.
 1.3 11-Sep-2009  apb Expose the kernel's boothowto(9) variable through the sysctl
kern.boothowto variable.

Part of the /etc/rc silent changes requested in PR 41946
and proposed in tech-userlevel.
 1.2 05-Sep-2009  wiz Various fixes; be more kind to mdoclint.
 1.1 04-Sep-2009  apb Add a boothowto(9) man page, and link it to BOOT_FLAGS(9).
 1.6.48.1 10-Jun-2019  christos Sync with HEAD
 1.6.46.1 28-Jul-2018  pgoyette Sync with HEAD
 1.6.2.2 25-Feb-2010  wiz Uncomment crash(8) reference.
 1.6.2.1 25-Feb-2010  wiz file boothowto.9 was added on branch uebayasi-xip on 2010-02-25 17:15:56 +0000
 1.5 25-Jun-2018  wiz Remove superfluous Pp.
 1.4 25-Jun-2018  msaitoh Removal of bpf_tap().
 1.3 02-Dec-2010  wiz branches: 1.3.44;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.2 08-Jun-2010  jruoho Grammar, markup.
 1.1 20-Jan-2010  pooka branches: 1.1.2;
add short description for bpf.9
 1.1.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.3.44.2 28-Jul-2018  pgoyette Sync with HEAD
 1.3.44.1 25-Jun-2018  pgoyette Sync with HEAD
 1.33 09-Jul-2025  bad buffercache.9: xref bufferio.9
 1.32 10-Apr-2017  maya branches: 1.32.24;
Bump date for previous.
 1.31 10-Apr-2017  riastradh B_DELWRI got renamed BO_DELWRI ages ago.
 1.30 20-Apr-2015  wiz branches: 1.30.2; 1.30.4;
Add missing .El. From Henning Petersen in PR 49845.
 1.29 29-Mar-2015  riastradh Cull some obsolete parts of buffercache(9) man page.
 1.28 29-Mar-2015  riastradh New man page bufferio(9) for I/O transfer view of struct buf.

Move biowait/biodone from buffercache(9) man page.
 1.27 28-Mar-2015  maxv Remove the 'cred' argument from bread(). Remove a now unused var in
ffs_snapshot.c. Update the man page accordingly.

ok hannken@
 1.26 28-Mar-2015  maxv Remove the 'cred' argument from breadn(), and update the man page
accordingly.

ok hannken@
 1.25 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.24 11-Nov-2009  rmind Sync declarations with reality, bump date.
 1.23 16-May-2008  hannken Make sure all cached buffers with valid, not yet written data have been
run through copy-on-write. Call fscow_run() with valid data where possible.

The LP_UFSCOW hack is no longer needed to protect ffs_copyonwrite() against
endless recursion.

- Add a flag B_MODIFY to bread(), breada() and breadn(). If set the caller
intends to modify the buffer returned.

- Always run copy-on-write on buffers returned from ffs_balloc().

- Add new function ffs_getblk() that gets a buffer, assigns a new blkno,
may clear the buffer and runs copy-on-write. Process possible errors
from getblk() or fscow_run(). Part of PR kern/38664.

Welcome to 4.99.63

Reviewed by: YAMAMOTO Takashi <yamt@netbsd.org>
 1.22 14-Jul-2007  ad branches: 1.22.10; 1.22.12; 1.22.14;
- kcont was removed.
- Replace some references to tsleep.
 1.21 08-Feb-2007  dillo Mark up function arguments with .Fa, not .Fn; also, fix typo in
function argument.
 1.20 04-Oct-2006  pooka ucred -> kauth sweep
 1.19 16-Jan-2006  yamt note that biodone and biowait don't really belong here.
 1.18 30-Nov-2005  yamt fix bread prototype. reminded by adam at albedo.art.pl
 1.17 27-Oct-2005  wrstuden Tweak non-device-file discussion of blkno units.
 1.16 27-Oct-2005  wrstuden Adjust discussion of blkno's units to describe the units for
blkno for non-special files. Per comments from yamt at.
 1.15 10-Sep-2005  wiz Drop trailing whitespace.
 1.14 08-Sep-2005  wrstuden Note the fact that buffer cache takes block numbers in
units of DEV_BSIZE, even if the device's device size is
larger. Update date.

Reviewed by wiz. :-)
 1.13 25-Jun-2004  wiz branches: 1.13.2;
Avoid contractions; use macro for emphasizing instead of stars; add articles.
 1.12 17-Jun-2004  yamt sync with the recent reality. (allocbuf; hi, pk)
 1.11 04-Nov-2003  keihan s/NetBSD.ORG/NetBSD.org/
s/netbsd.org/NetBSD.org/

OK'd by martin@
 1.10 15-Sep-2003  wiz Bump date for previous, and add two articles.
 1.9 15-Sep-2003  yamt correct book title.
 1.8 15-Sep-2003  yamt a brief note about struct buf.
 1.7 10-Sep-2003  wiz Fix typo.
 1.6 07-Sep-2003  yamt add a missig period.
 1.5 06-Sep-2003  yamt this is about buffer cache, not namei
 1.4 06-Sep-2003  yamt use .Fn rather than .Fa for functions.
 1.3 06-Sep-2003  wiz Grammar improvements; fix typos; mark up B_* flags with .Dv.
 1.2 06-Sep-2003  yamt note that bread() and friends don't use a given ucred.
 1.1 06-Sep-2003  yamt a man page for buffer cache interfaces.
(an incomplete page is better than no page)
 1.13.2.1 15-Sep-2005  tron Pull up following revision(s) (requested by wrstuden in ticket #784):
share/man/man9/buffercache.9: revision 1.14
Note the fact that buffer cache takes block numbers in
units of DEV_BSIZE, even if the device's device size is
larger. Update date.
Reviewed by wiz. :-)
 1.22.14.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.22.12.1 18-May-2008  yamt sync with head.
 1.22.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.30.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.30.2.1 26-Apr-2017  pgoyette Sync with HEAD
 1.32.24.1 02-Aug-2025  perseant Sync with HEAD
 1.18 12-Sep-2019  sevan struct buf is typedefed to buf_t
specify the width argument for Bl
 1.17 18-Mar-2017  riastradh branches: 1.17.12;
Use `\(em', not `--'.

Refill sentences and tweak wording where appropriate while here.
 1.16 30-Mar-2015  riastradh branches: 1.16.2; 1.16.4;
Plural agreement.
 1.15 30-Mar-2015  riastradh Fix tense.
 1.14 30-Mar-2015  riastradh Fix typo in example code.
 1.13 30-Mar-2015  riastradh Fix example code and emphasize it doesn't handle holes.
 1.12 30-Mar-2015  riastradh Use Dv NULL, per SIGWIZD.
 1.11 30-Mar-2015  riastradh Be a little more consistent about nulls.
 1.10 30-Mar-2015  riastradh Use Fn to mark up a function call.
 1.9 30-Mar-2015  riastradh Nested I/O transfers are not `asynchronous'.
 1.8 30-Mar-2015  riastradh Consistently use `.Vt "struct buf"' to name the type.
 1.7 30-Mar-2015  riastradh Note reusing bufs requires clearing BO_DONE.
 1.6 30-Mar-2015  riastradh Correct documentation of asynchronous/callback buffer I/O.

Asynchronous is not the same as callback: asynchronous means there is
no completion notification, and can be used only with buffer-cached
buffers.
 1.5 29-Mar-2015  riastradh Mention B_WRITE.
 1.4 29-Mar-2015  riastradh Remove \& from example code. Cargo-culted from I forget where.
 1.3 29-Mar-2015  riastradh Use `Ap s' instead of `No 's', per signal from wizd.
 1.2 29-Mar-2015  riastradh Clarify that getiobuf must be paired with putiobuf, not brelse.
 1.1 29-Mar-2015  riastradh New man page bufferio(9) for I/O transfer view of struct buf.

Move biowait/biodone from buffercache(9) man page.
 1.16.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.16.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.17.12.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.22 18-Nov-2016  wiz Use more markup.
 1.21 17-Nov-2016  pgoyette Update bufq man page for new functions, with appropriate cross-refs to
sysctl(7) and module(9).
 1.20 12-Apr-2009  joerg branches: 1.20.30;
Drop conditionals now that groff can handle the umlaut in the author
name.
 1.19 24-Jan-2009  wiz branches: 1.19.2;
Remove trailing whitespace and bump date for previous.
 1.18 24-Jan-2009  yamt note that bufq_cancel might be expensive
 1.17 13-Jan-2009  yamt g/c BUFQ_FOO() macros and use bufq_foo() directly.
 1.16 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.15 30-Apr-2008  reinoud Add a BUFQ_CANCEL() next to BUFQ_PUT() and BUFQ_GET().

BUFQ_CANCEL(queue, element) removes the specified element previously queued
on the queue. It returns NULL if it was not found on the queue and the
element if it was successfully removed.

Run trough tech-kern and changed name from BUFQ_REVOKE() by suggestion of
Jason Thorpe.
 1.14 12-Jan-2006  wiz branches: 1.14.20; 1.14.22;
Drop trailing whitespace.
 1.13 26-Dec-2005  xtraeme Sync bufq API with the new source code. ok'ed by yamt.
 1.12 16-Oct-2005  wiz Add comma in enumeration.
 1.11 16-Oct-2005  wiz English improvements.
 1.10 16-Oct-2005  yamt it's ok for BUFQ_PUT to change the next buffer after BUFQ_PEEK.
 1.9 16-Oct-2005  yamt sync with the new api.
 1.8 10-Oct-2005  xtraeme * bufq functions are defined in bufq.h not buf.h.
* Add missing bufq_drain() function.

Bump DATE.
 1.7 09-Jul-2005  xtraeme Mention BUFQ_PRIOCSCAN as a valid flag for the bq_flags argument,
ok'ed by yamt.
 1.6 16-Apr-2003  wiz branches: 1.6.6;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.5 19-Jan-2003  atatat The next release will be 2.0, not 1.7.
 1.4 14-Oct-2002  wiz New sentence, new line.
 1.3 23-Jul-2002  hannken The buffer returned by BUFQ_PEEK must remain the same until BUFQ_GET is
called. It may be used as the "current" buffer.
 1.2 21-Jul-2002  hannken Rename bufq_init() to bufq_alloc().
Add bufq_free() to remove a buffer queue.
Avoid MALLOC while holding a spinlock.

From Chuck Silvers.
 1.1 17-Jul-2002  hannken Add manpage for new device buffer queue interface.
With help from Thomas Klausner <wiz@netbsd.org>.
 1.6.6.2 15-Oct-2005  riz Pull up following revision(s) (requested by xtraeme in ticket #876):
share/man/man9/bufq.9: revision 1.8
* bufq functions are defined in bufq.h not buf.h.
* Add missing bufq_drain() function.
Bump DATE.
 1.6.6.1 28-Aug-2005  tron Pull up following revision(s) (requested by xtraeme in ticket #712):
share/man/man9/bufq.9: revision 1.7
Mention BUFQ_PRIOCSCAN as a valid flag for the bq_flags argument,
ok'ed by yamt.
 1.14.22.1 18-May-2008  yamt sync with head.
 1.14.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.19.2.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.20.30.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.82 04-Jan-2025  riastradh bus_dma(9): must, not should!

bus_dmamem_alloc returns opaque cookies which are meant only for
bus_dmamem_map and bus_dmamap_load (or bus_dmamap_load_raw) to eat,
not necessarily vaddrs or paddrs or baddrs.
 1.81 29-Dec-2024  andvar bus_dma(9): few small grammar/spelling improvements, mainly taken from OpenBSD.
bump the date.
 1.80 26-Dec-2024  andvar s/constrains/constraints/ in bus_dma(9) documentation.
 1.79 09-Oct-2024  uwe bus_dma(9): couple more nits
 1.78 09-Oct-2024  uwe bus_dma(9): clean up a few mark up nits
 1.77 09-Oct-2024  uwe bus_dma(9): mark up a few missed bus_dma_tag_t
 1.76 09-Oct-2024  uwe bus_dma(9): use consistent indentation for lists

We have list of functions with nested lists of arguments with nested
lists of flags. Use consistent indentation to provide something for
the eyes to hold onto. B/c the nesting is deep, use Ds for all
indents as semantically correct choices indent way more and leave very
little column width for flags.
 1.75 09-Oct-2024  uwe bus_dma(9): mark up bus_dma_tag_t in descriptions of "tag" argument
 1.74 09-Oct-2024  uwe bus_dma(9): g/c pleonastic "are as follows"

It's repated to the point of being a vocal tic.
 1.73 09-Oct-2024  uwe bus_dma(9): smarter "->" arrows
 1.72 09-Oct-2024  uwe bus_dma(9): touch up markup

Use .Vt for types. Untabify code to work around PS back-end quirk.
 1.71 09-Oct-2024  uwe bus_dma(9): replace long unwieldy Fn with Fo/Fa/Fc
 1.70 09-Oct-2024  uwe bus_dma(9): use subsections (.Ss) for what is subsections
 1.69 04-Jun-2024  riastradh branches: 1.69.2;
bus_dma(9): Document BUS_DMA_PREFETCHABLE.

Like BUS_DMA_NOCACHE. Doesn't absolve you of the need for
bus_dmamap_sync, but if you later pass the vaddr to bus_dmamap_load,
the DMA map might notice the mapping is write-combining and use this
to make bus_dmamap_sync cheaper.

PR kern/58309
 1.68 17-Feb-2024  skrll Steal the sync operation descriptions from FreeBSD and improve other
wording in this area.

Inspired by jmcneill@
 1.67 22-Jan-2022  skrll branches: 1.67.2;
Add a note about bus_dmatag_subregion [min_addr, max_addr]
 1.66 20-Aug-2018  riastradh Clarify that bus_dmamem_alloc boundary can be zero for no constraint.
 1.65 12-Nov-2017  riastradh branches: 1.65.2; 1.65.4;
Replace xref mb(9) by xref membar_ops(3).
 1.64 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.63 02-Jan-2017  wiz More macros, whitespace.
 1.62 02-Jan-2017  sevan Give a heads up about bus_dmatag_subregion()
 1.61 01-Jun-2016  wiz branches: 1.61.2;
Use .An -nosplit.
 1.60 01-Jun-2016  pgoyette Use .An for author names. From PR misc/49516
 1.59 30-Oct-2013  msaitoh branches: 1.59.4; 1.59.8;
Remove extra period.
 1.58 17-Sep-2013  pooka fix proto
 1.57 09-Jul-2011  wiz branches: 1.57.2; 1.57.4; 1.57.8;
Sort error descriptions.
 1.56 08-Jul-2011  dyoung Describe some of the expected return codes from bus_dmamap_load(9).
 1.55 01-Jul-2011  dyoung Bump date.
 1.54 01-Jul-2011  dyoung Switch machine/bus.h references to machine/bus_defs.h and
machine/bus_funcs.h references.
 1.53 14-May-2010  jruoho Use standard section headers.
 1.52 14-Apr-2010  wiz branches: 1.52.2;
Join URL.
 1.51 14-Apr-2010  jruoho Now that all USENIX papers are available online, add URL to SEE ALSO.
 1.50 05-Apr-2010  dyoung Change some references to <machine/bus.h> to <sys/bus.h>. MI drivers
should #include <sys/bus.h>. <sys/bus.h> #includes <machine/bus.h> for
the MD implementation details.
 1.49 22-Mar-2010  joerg Use .In instead of .Aq Pa for header files.
 1.48 15-Mar-2009  joerg Replace physical with logical markup.
 1.47 20-Feb-2009  dyoung Update date.
 1.46 20-Feb-2009  dyoung Clarify that dmamp is undefined if bus_dmamap_create(9) fails.
 1.45 02-May-2008  martin branches: 1.45.4; 1.45.6;
Move to 2 clause license
 1.44 19-May-2007  wiz branches: 1.44.10; 1.44.12;
Bump date for previous.
 1.43 07-Mar-2007  rmind We no longer have uio_segflg and uio_procp members in the the struct uio.
Instead of these, we use uio_vmspace. OK: ad@
 1.42 04-Mar-2007  tsutsui caddr_t -> void *
 1.41 02-Mar-2007  wiz Bump date for previous. New sentence, new line.
 1.40 21-Feb-2007  mrg document bus_dmatag_subregion(9) and bus_dmatag_destroy(9).
 1.39 02-Feb-2007  wiz Fix Dd argument.
 1.38 02-Feb-2007  ad Add manpage for memory barrier ops. Not enabled in the Makefile yet.
 1.37 30-Aug-2006  jnemeth make bus_dmamap_load() definition match description
 1.36 04-Feb-2006  wiz Use .Ap.
 1.35 29-Jan-2006  rpaulo More ktrace-lwp.
 1.34 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.33 09-Mar-2005  matt Add description of dm_maxsegsz.
 1.32 05-Nov-2004  wiz Cite Jason Thorpe's paper about bus_dma; from Jeff Rizzo in PR 27891.
 1.31 23-Apr-2004  simonb s/the the/the/ (only in sources that aren't regularly imported from
elsewhere).
 1.30 30-Jun-2003  wiz Pa Aq -> Aq Pa.
 1.29 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.28 16-Feb-2003  wiz Fix some typos reported by Hiten Pandya in PR 20366.
 1.27 11-Feb-2003  thorpej Improve the wording regarding the relationship between bus_dmamap_sync()
and memory barriers.
 1.26 28-Jan-2003  kent Introduce BUS_DMA_NOCACHE, and bus_dmamem_map() of i386 supports it.
 1.25 14-Oct-2002  wiz New sentence, new line.
 1.24 12-Jun-2002  wiz Fix punctuation in last.
 1.23 12-Jun-2002  fvdl Make it absolutely clear that bus_dmamap_sync is explicitly needed
for correct operation on all platforms.
 1.22 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.21 26-Dec-2001  wiz Drop some .Pp, sort sections.
 1.20 10-Sep-2001  wiz Use standard section headers.
 1.19 03-Sep-2001  uwe bus_dmamem_mmap returns "paddr_t", not "int".
 1.18 03-Sep-2001  uwe bus_dmamem_mmap: argument "off" is of type "off_t", not "int".
 1.17 19-Jul-2001  thorpej Document BUS_DMA_READ and BUS_DMA_WRITE.
 1.16 21-Jun-2001  wiz Fix typos, punctuation and whitespace.
 1.15 07-Mar-2001  thorpej Document the forthcoming BUS_DMA_STREAMING flag, per the
discussion about it on tech-kern.
 1.14 14-Jun-2000  cgd fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well. No functional changes.
 1.13 01-May-2000  fvdl branches: 1.13.2;
Clarify that you shouldn't use the bus_dma_segment_t return value from
bus_dmamem_alloc to program DMA registers, but that the dm_segs array
of a successfully loaded DMA mapping should be used.
 1.12 19-Apr-2000  soren Typo.
 1.11 16-Mar-1999  garbled More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.10 06-Mar-1999  mycroft Fix formatting errors (bad sentence breaks).
 1.9 25-Feb-1999  ross Add missing .El.
 1.8 04-Feb-1998  thorpej - Document the new bus_dmamap_sync() interface and related changes.
- Add an AUTHOR section, and fill it in with the folks involved with
designing and implementing this interface.
 1.7 11-Nov-1997  mrg add missing .Nm sections
 1.6 13-Aug-1997  cgd branches: 1.6.2;
enable bus_space(9) xref
 1.5 13-Aug-1997  christos Rename busdma -> bus_dma
 1.4 12-Aug-1997  christos Correct 8 spelling mistakes.
 1.3 12-Aug-1997  mikel add bus_dmamem_map() to SYNOPSIS, fix some more typos
 1.2 12-Aug-1997  mikel use -mdoc macros to good effect, and other minor editing
 1.1 11-Aug-1997  christos Training for my new position as Jason's secretary...
 1.6.2.1 11-Nov-1997  mrg pull up from trunk: add missing .Nm sections
 1.13.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.44.12.1 18-May-2008  yamt sync with head.
 1.44.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.45.6.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.45.4.2 24-Feb-2009  snj Pull up following revision(s) (requested by dyoung in ticket #482):
share/man/man9/bus_dma.9: revision 1.47
Update date.
 1.45.4.1 24-Feb-2009  snj Pull up following revision(s) (requested by dyoung in ticket #481):
share/man/man9/bus_dma.9: revision 1.46
Clarify that dmamp is undefined if bus_dmamap_create(9) fails.
 1.52.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.52.2.1 14-Apr-2010  uebayasi file bus_dma.9 was added on branch uebayasi-xip on 2010-08-17 06:40:04 +0000
 1.57.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.57.4.1 14-Jul-2017  snj Pull up following revision(s) (requested by sevan in ticket #1426):
share/man/man9/bus_dma.9: 1.58-1.62 via patch
fix proto
--
Remove extra period.
--
Use .An -nosplit.
--
Give a heads up about bus_dmatag_subregion()
 1.57.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.59.8.1 18-Jan-2017  skrll Sync with netbsd-5
 1.59.4.1 03-Jan-2017  snj Pull up following revision(s) (requested by sevan in ticket #1346):
share/man/man9/bus_dma.9: revisions 1.61, 1.62 via patch
Use .An -nosplit.
--
Give a heads up about bus_dmatag_subregion()
 1.61.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.65.4.1 10-Jun-2019  christos Sync with HEAD
 1.65.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.67.2.2 04-Oct-2024  martin Pull up following revision(s) (requested by rin in ticket #928):

sys/external/bsd/drm2/dist/drm/drm_gem.c: revision 1.25
sys/external/bsd/drm2/dist/drm/radeon/radeon_ci_dpm.c: revision 1.7
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/device/priv.h: revision 1.4
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/device/nouveau_nvkm_engine_device_acpi.c: revision 1.4
sys/external/bsd/drm2/dist/drm/i915/display/intel_opregion.h: revision 1.6
sys/external/bsd/drm2/dist/drm/i915/i915_drv.h: revision 1.49
sys/external/bsd/drm2/include/linux/mxm-wmi.h: revision 1.1
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci/nouveau_nvkm_subdev_pci_pcie.c: revision 1.4
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/device/nouveau_nvkm_engine_device_base.c: revision 1.13
sys/external/bsd/common/include/linux/bitops.h: revision 1.17
sys/external/bsd/drm2/nouveau/files.nouveau: revision 1.40
sys/external/bsd/drm2/linux/linux_pci.c: revision 1.30
sys/external/bsd/drm2/dist/drm/radeon/radeon_drv.h: revision 1.5
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/pci/nouveau_nvkm_subdev_pci_pcie.c: revision 1.5
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/mxm/nouveau_nvkm_subdev_mxm_base.c: revision 1.5
sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_gart.c: revision 1.12
sys/external/bsd/drm2/dist/drm/radeon/radeon_rv770.c: revision 1.3
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/disp/nouveau_nvkm_engine_disp_sorgm200.c: revision 1.3
sys/external/bsd/common/include/linux/printk.h: revision 1.14
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/instmem/nouveau_nvkm_subdev_instmem_gk20a.c: revision 1.10
sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_vi.c: revision 1.4
sys/external/bsd/drm2/include/linux/acpi.h: revision 1.11
sys/external/bsd/drm2/drm/drm_cdevsw.c: revision 1.31
sys/external/bsd/drm2/dist/drm/radeon/radeon_si.c: revision 1.6
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_acpi.c: revision 1.5
sys/external/bsd/drm2/dist/drm/i915/display/intel_acpi.h: revision 1.5
sys/external/bsd/drm2/include/acpi/video.h: revision 1.3
sys/external/bsd/drm2/dist/drm/radeon/radeon_evergreen.c: revision 1.6
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_acpi.h: revision 1.4
sys/arch/sparc64/include/pci_machdep.h: revision 1.31
sys/arch/sparc64/dev/pci_machdep.c: revision 1.83
sys/external/bsd/drm2/include/linux/kref.h: revision 1.14
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/device/nouveau_nvkm_engine_device_pci.c: revision 1.12
sys/external/bsd/drm2/linux/linux_dma_buf.c: revision 1.17
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/bios/nouveau_nvkm_subdev_bios_shadowacpi.c: revision 1.4
sys/external/bsd/drm2/drm/drm_module.c: revision 1.32
sys/external/bsd/drm2/dist/drm/i915/i915_gem.h: revision 1.8
sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_dmabuf.c: revision 1.7
sys/external/bsd/drm2/include/linux/smp.h: revision 1.5
sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_si.c: revision 1.5
sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_device.c: revision 1.20
sys/arch/x86/x86/bus_dma.c: revision 1.91
sys/external/bsd/drm2/radeon/files.radeon: revision 1.40
sys/external/bsd/drm2/include/acpi/acpi_bus.h: revision 1.1
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drv.h: revision 1.5
sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_device.c: revision 1.21
sys/external/bsd/common/include/asm/barrier.h: revision 1.20
sys/external/bsd/drm2/include/linux/nbsd-namespace-acpi.h: revision 1.2
sys/external/bsd/common/include/asm/barrier.h: revision 1.21
sys/modules/drmkms/drmkms_pci.h: revision 1.1
sys/external/bsd/drm2/dist/drm/drm_dp_helper.c: revision 1.17
sys/external/bsd/drm2/radeon/radeon_pci.c: revision 1.23
sys/external/bsd/drm2/linux/linux_xa.c: revision 1.4
sys/external/bsd/drm2/ttm/ttm_bo_vm.c: revision 1.23
sys/external/bsd/drm2/ttm/ttm_bo_vm.c: revision 1.24
sys/external/bsd/drm2/ttm/ttm_bo_vm.c: revision 1.25
sys/external/bsd/drm2/linux/linux_pci.c: revision 1.26
sys/dev/pci/pcivar.h: revision 1.120
sys/arch/xen/include/pci_machdep.h: revision 1.24
sys/external/bsd/drm2/ttm/ttm_bo_vm.c: revision 1.26
sys/external/bsd/drm2/linux/linux_pci.c: revision 1.27
sys/external/bsd/drm2/ttm/ttm_bo_vm.c: revision 1.27
sys/external/bsd/drm2/linux/linux_pci.c: revision 1.28
sys/external/bsd/drm2/dist/drm/radeon/radeon_cik.c: revision 1.8
sys/external/bsd/drm2/ttm/ttm_bo_vm.c: revision 1.28
sys/external/bsd/drm2/linux/linux_pci.c: revision 1.29
sys/external/bsd/drm2/include/linux/pci.h: revision 1.57
sys/external/bsd/drm2/include/linux/pci.h: revision 1.58
sys/external/bsd/drm2/dist/drm/radeon/radeon_acpi.c: revision 1.5
sys/external/bsd/drm2/dist/drm/nouveau/nouveau_display.c: revision 1.6
sys/external/bsd/drm2/dist/drm/amd/powerplay/hwmgr/amdgpu_hwmgr.c: revision 1.3
sys/external/bsd/drm2/dist/drm/amd/display/dc/core/amdgpu_dc_stream.c: revision 1.3
share/man/man9/bus_dma.9: revision 1.69
sys/external/bsd/drm2/drm/drm_gem_cma_helper.c: revision 1.15
sys/external/bsd/drm2/dist/drm/radeon/radeon_acpi.c: revision 1.6
sys/external/bsd/drm2/dist/drm/radeon/radeon.h: revision 1.12
sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_cik.c: revision 1.7
sys/dev/acpi/acpi_mcfg.c: revision 1.29
sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_acpi.c: revision 1.6
sys/external/bsd/drm2/dist/drm/radeon/radeon_r600.c: revision 1.7
sys/external/bsd/drm2/dist/drm/radeon/radeon_bios.c: revision 1.13
sys/modules/amdgpu/Makefile: revision 1.9
sys/external/bsd/drm2/dist/drm/radeon/radeon_bios.c: revision 1.14
sys/external/bsd/common/linux/linux_tasklet.c: revision 1.12
sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/device.h: revision 1.10
sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_mman.c: revision 1.23
sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu.h: revision 1.9
sys/external/bsd/drm2/include/linux/interval_tree.h: revision 1.14
sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_mman.c: revision 1.26
sys/external/bsd/drm2/dist/drm/amd/powerplay/hwmgr/amdgpu_smu7_hwmgr.c: revision 1.5
sys/dev/pci/pci.c: revision 1.168
sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_mman.c: revision 1.27
sys/external/bsd/drm2/dist/drm/radeon/radeon_si_dpm.c: revision 1.9
sys/external/bsd/drm2/pci/files.drmkms_pci: revision 1.18
sys/external/bsd/drm2/linux/linux_sync_file.c: revision 1.3
sys/external/bsd/drm2/amdgpu/files.amdgpu: revision 1.31
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/engine/device/nouveau_nvkm_engine_device_tegra.c: revision 1.4
sys/external/bsd/drm2/dist/drm/drm_gem.c: revision 1.24
sys/arch/xen/xen/xpci_xenbus.c: revision 1.29

drm: Eliminate __HAVE_ATOMIC_AS_MEMBAR conditionals.
Discussed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/02/23/msg028729.html

linux asm/barrier.h: Fix !MULTIPROCESSOR build.

remove "nouveau" from a comment. noted by jmcneill.

drm: KASSERT(A && B) -> KASSERT(A); KASSERT(B)
comment a function that has a clear overbounds read but it isn't used.
found by GCC 12.

nix the NetBSD specific GEM_BUG_ON().
avoids GCC 12 warnings, and matches upstream closer.
avoid uninitialised variable usage in drm_gem_cma_create_internal().
in the case nothing has returned 'error', 'nsegs' and the dma info
are (potentially) uninitialised, so consider this an error.
found by GCC 12.

avoid a GCC 12 warning.
there's a 1-element long array and a loop conditional that tries to see
if indexes for it are not identical. as these indexes will always both
be 0, the only valid index, the condition is always false. GCC 12
triggers a strange warning on this code that can never run (see below),
so simply assert the array size is 1 and comment the rest.
amdgpu_dc_stream.c:470:55: error: array subscript [0, 0] is outside array bounds of 'struct dc_writeback_info[1]' [-Werror=array-bounds]
470 | stream->writeback_info[j] = stream->writeback_info[i];

convert a KASSERT() into an if () panic() sequence to appease GCC 12.
OK riastradh@.

drm: Fix conditionals around drmkms_pci and agp.
Kernel should build now with all pci drm drivers stripped out but
DRM_LEGACY still enabled. (Might not be very useful, but it'll
build. Maybe we should also have DRM_LEGACY_PCI so those drivers can
be modloaded later.)

drmkms: Fix module build.
avoid an unlikely array bounds issue picked up by GCC 12.
nvkm_pcie_speed() can return -1, which is then used as an array index,
so make this default return PCIe 1.0 speeds.

drm: enable almost all PCIe functionality
linux_pci.c revisions 1.24 and 1.25 implemented most of the remaining
missing PCIe backends, but only enabled them for some amdgpu portions.
this enables all code marked with "XXX amdgpu pcie", "XXX radeon pcie",
and "XXX pcie speed". for most of it, simply removing #ifndefs __NetBSD__
to enable compliation was required, once the new "bus->max_bus_speed"
member was added to struct pci_bus. add an "always fails" backend for
pci_enable_atomic_ops_to_root() which seems to only be necessary
for virtual GPU functionality (and could be implemented if needed.)
tested on radeon 5450, 7750, R7 240 [radeon], and RX 550 [amdgpu], and
nvidia 750 and 1030 [nouveau].
this still does not quite work on nvidia cards. there are two problems
that remain:
- the call to set the link speed is skipped because the speed is set
to the default value of "-1". nvkm_pcie_set_link() will actually
determine the right value for this and for some cards, calling this
function if the current speed is -1 helps set the link speed. it
may be that on linux other paths we don't have enabled properly
would set this (there's one via debugfs, and a jetson specific one,
though perhaps setting either AC or DC speed values as boot options
(after hooking up these for netbsd) would currently work.
- worse, cards newer than kepler - geforce 900, 1000, and newer, are
all lacking the backing support to set pcie link speed. the GT 1030
card i have been testing with remains at pcie 1.0.

radeon: fix and enable ACPI methods for getting ROM BIOS
The hacky way of getting the BIOS mapped only works on x86. ACPI
should be preferred if available. Makes BIOS reading though VFCT
work on aarch64 with EDK2. (But only if EDK2 has POSTed the GPU.)
XXX amdgpu should get the same treatment.

drm: put_cpu() should enable preemption, not disable it again

drm(4): make pr_debug equivalent to aprint_debug
significantly reduces the default spam from amdgpu(4).

drm: Set CONFIG_ACPI in linux/acpi.h and make it build.

Leave a little ACPI-related functionality disabled for now, like
getting EDID out of ACPI -- needs a bit more work to make this work,
and I don't have hardware to work on that.
Should help with failures of the forms:
- unable to locate a BIOS ROM
- bios: unable to locate usable image
on various machines.

radeon_acpi.c: ifdef out unused function on NetBSD.
Should fix syzkaller build.

drm(4): Fix st_rdev in stat.
dminor->index already has the 64*type adjustment, as allocated in
drm_minor_alloc.
PR kern/58180

linux_sync_file: Fix missing init/fini steps.
Noted by rjs@.
PR kern/58210

ttm: Sync ttm_bo_uvm_fault_idle better with Linux.
PR xsrc/58133
ttm: Undo mistake in previous.

PR xsrc/58133
linux: Add a few more cases to pci_get_class.
Should fix crash on boot with amdgpu now that the ACPI business is
enabled.

i915: Fix dmabuf mmap object.

drm: Fix missing bounds checks in dma buf mmap.

drm_gem.c: Fix sense of assertion.
This is the opposite of WARN_ON.
Noted by rjs@.

drm_gem.c: Enable drm_gem_fence_array_add now that we emulate xa.
linux_xa: Delete and replace collision in xa_store as intended.
Don't free the colliding node that's still in the tree.
Noted by rjs@.

i915_gem_mman.c: Apply mmap types via pmap flags.
This way, userland gets buffers mapped write-combining or uncached as
needed.
PR xsrc/58307

x86: Teach bus_dmamem_map about BUS_DMA_PREFETCHABLE.
PR port-amd64/58308

bus_dma(9): Document BUS_DMA_PREFETCHABLE.
Like BUS_DMA_NOCACHE. Doesn't absolve you of the need for
bus_dmamap_sync, but if you later pass the vaddr to bus_dmamap_load,
the DMA map might notice the mapping is write-combining and use this
to make bus_dmamap_sync cheaper.
PR kern/58309

nouveau_nvkm_subdev_instmem_gk20a.c: Use BUS_DMA_PREFETCHABLE.
Matches Linux's pgprot_writecombine.
Unclear where the appropriate bus_dmamap_sync happens, or is supposed
to happen -- not using it would be wrong, but asking for a
prefetchable mapping may paper over symptoms, at least!

ttm: Sync more with Linux.
Add the original copyright and attribution since this is now,
intentionally, a modified copy of the original and not just roughly
the same algorithm.

ttm: Respect PGO_ALLPAGES.
Not sure this is useful but it reduces XXX's and makes this match
udv_fault better so it's easier to understand.

ttm: Sync cacheability flag logic with Linux.

ttm: Add XXX about readahead fault failures.

pci: Pass cookie through pci_find_device, pci_enumerate_bus, take 2.
New functions pci_find_device1 and pci_enumerate_bus1 have the cookie
argument. Existing symbols pci_find_device and pci_enumerate_bus are
now wrappers for the cookieless version.
This will allow pci_find_device callers to pass a cookie through to
the match function so they can keep state or pass in extra parameters
like b/d/f numbers, which will allow us to nix some horrible kludges
in the Linux PCI API emulation for drm (and, perhaps, Intel wifi).
This change drops the symbol pci_probe_device, in favour of a new
pci_probe_device1 with the cookie argument. But I don't think that
requires a revbump because it's only called by MD pci_enumerate_bus1
implementations, which don't live in modules anyway.
Take 2: Make sure to handle NULL match function.
linux_pci: Nix pci enumeration kludges.
Now that we can pass a cookie through, this stuff will be a little
less fragile.

i915: Omit needless i915_gem_object_pin/unpin_pages cycle in fault.
vm_fault_cpu and vm_fault_gtt, called by i915_gem_fault, already do
the pinning and unpinning internally, so there is no need for
i915_gem_fault to do it.
No functional change intended, except that the transient pin count
will be one lower than before during the fault routine (but it will
still be positive).

i915: Match Linux fault routine return code actions.
Omit needless EINTR interception -- this is now handled by
i915_error_to_vmf_fault.
Earlier revert was over a false alarm -- bisection shows the new
warnings arose from linux_pci.c 1.29 here:
https://mail-index.netbsd.org/source-changes/2024/06/23/msg151929.html

linux_pci: Fix shifto in pci_get_class.
It looks like Linux's pci_get_class also matches the interface part
of the PCI class register (but not the revision part), and I hadn't
noticed that in the previous shim structured differently.

With GCC12 kernel ALL/amd64 triggers "'sor' may be used uninitialized".
If "sublinks & 3" is zero GCC is right and sor[1] may be returned unitialized.
Fix by initializing "sor" to zero to return -1 instead of uninitialized value.
Ok: Taylor R Campbell <riastradh@>

amdgpu: Map BAR 2, not BAR 5, on pre-bonaire chips.
PR kern/58384

amdgpu: Map consecutive pages, not the same one over and over again.
PR kern/58385

linux/bitops: Fix overestimate for BITS_TO_LONGS(9)
Fortunately, this seems harmless except for allocating
excessive buffer memory.
Pointed out by nonaka@, OK riastradh@.
 1.67.2.1 13-Sep-2024  martin Pull up following revision(s) (requested by rin in ticket #860):

share/man/man9/bus_dma.9: revision 1.68

Steal the sync operation descriptions from FreeBSD and improve other
wording in this area.

Inspired by jmcneill@
 1.69.2.1 02-Aug-2025  perseant Sync with HEAD
 1.55 13-Aug-2022  wiz Remove Li without effect.
 1.54 12-Aug-2022  riastradh bus_space(9): Update barrier semantics to match reality and sense.

As proposed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2022/07/16/msg028249.html

tl;dr:
- bus_space_barrier is needed only with prefetchable/cacheable.
- BUS_SPACE_BARRIER_READ is like membar_acquire.
- BUS_SPACE_BARRIER_WRITE is like membar_release.
- READ|WRITE is like membar_sync.
 1.53 13-Nov-2017  wiz Sort errors. Remove superfluous macros.
 1.52 12-Nov-2017  riastradh Replace xref mb(9) by xref membar_ops(3).
 1.51 16-Apr-2017  wiz Merge "userland" to be consistent with other man pages.
 1.50 16-Sep-2016  wiz branches: 1.50.2;
Use Nm instead of Xr to itself. Add missing space. Bump date for previous.
 1.49 15-Sep-2016  jdolecek update manpage with reality WRT BUS_SPACE_BARRIER_SYNC and
BUS_SPACE_BARRIER_X_BEFORE_Y flags
 1.48 01-Jun-2016  wiz branches: 1.48.2;
Fix typo. Use .An -nosplit.
 1.47 01-Jun-2016  pgoyette Use .An for authors. From PR misc/49516
 1.46 19-Jul-2012  jdf Added missing newline, as proposed by Petri Laakso in PR kern/46721.
 1.45 08-Jul-2011  wiz branches: 1.45.2;
Remove trailing whitespace, use Er for errors, break some lines to avoid
unintended markup.
 1.44 06-Jul-2011  dyoung Describe bus_space_tag_create(9) and bus_space_tag_destroy(9) for
implementing bus spaces in MI code.

(This documentation may be several hours ahead of the implementation,
sorry.)
 1.43 06-Jul-2011  dyoung Document bus_space_reserve(9), bus_space_reserve_subregion(9),
bus_space_release(9), bus_space_reservation_map(9),
bus_space_reservation_unmap(9), bus_space_reservation_addr(9),
bus_space_reservation_size(9), bus_space_handle_is_equal(9).
 1.42 01-Jul-2011  dyoung Bump date.
 1.41 01-Jul-2011  dyoung Switch machine/bus.h references to machine/bus_defs.h and
machine/bus_funcs.h references.
 1.40 16-Apr-2010  dyoung branches: 1.40.2;
Describe bus_space_is_equal(9).
 1.39 05-Apr-2010  dyoung Change some references to <machine/bus.h> to <sys/bus.h>. MI drivers
should #include <sys/bus.h>. <sys/bus.h> #includes <machine/bus.h> for
the MD implementation details.
 1.38 22-Mar-2010  joerg Use .In instead of .Aq Pa for header files.
 1.37 10-Mar-2009  joerg Instead of .Xo + .Fo and .Fc / .Xc, just use .Fn. We don't want to
support a troff with macro argument limit. OK wiz.
 1.36 02-May-2008  martin branches: 1.36.6;
Move to 2 clause license
 1.35 01-Mar-2008  xtraeme branches: 1.35.2; 1.35.4;
Fix the mb(9) xref.
 1.34 02-Feb-2007  wiz branches: 1.34.4; 1.34.8;
Fix Dd argument.
 1.33 02-Feb-2007  ad Add manpage for memory barrier ops. Not enabled in the Makefile yet.
 1.32 26-Dec-2005  perry u_intN_t -> uintN_t
 1.31 30-Jun-2003  wiz Pa Aq -> Aq Pa.
 1.30 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.29 01-Jan-2003  jschauma preceeding -> preceding
Pointed out by Igor Sobrado in PR misc/19636.
 1.28 14-Oct-2002  wiz New sentence, new line.
 1.27 09-Oct-2002  wiz Move a comma. Closes PR 18600 by Hiten Pandya.
 1.26 25-Sep-2002  heinz small typo
 1.25 25-May-2002  wiz Remove a superfluous 'no'. kern/17022 by John Heasley.
 1.24 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.23 11-Feb-2002  wiz Whitespace nits, and a paragraph fix.
 1.22 11-Feb-2002  eeh New fine-grained BUS_SPACE_SYNC* operations. Since these are completely
machine dependent, port maintainers need to implement them themselves.
 1.21 26-Dec-2001  wiz Drop some .Pp, sort sections.
 1.20 04-Sep-2001  thorpej Define the bus_space_mmap() method for mmap'ing bus space into
user programs.
 1.19 21-Jun-2001  wiz Fix typos, punctuation and whitespace.
 1.18 19-Jun-2001  wiz `existent', not `existant'
 1.17 27-May-2001  wiz Fix typos reported in misc/13053 by Patrick Welche.
Whitespace nit cleanup while I'm here.
 1.16 23-Nov-2000  scw Document the bus_space_peek_N() and bus_space_poke_N() families
of functions, as proposed on tech-kern.

These provide a way to safely access bus space without crashing
the system if nothing responds on the bus. c.f. `badaddr()'.
 1.15 09-Aug-2000  tv Terminate an unterminated .Bl.
 1.14 03-Aug-2000  briggs As noted by jhawk--'count' is a function argument when I note that that
functions which take a count of bytes have undefined results if the specified
(count) is zero.
 1.13 01-Aug-2000  briggs Add some basic bus_space_*stream_N documentation.
 1.12 27-May-2000  soren branches: 1.12.4;
The datap argument to bus_space_write_{multi,region}_* should be const.
 1.11 17-Apr-2000  drochner -document the BUS_SPACE_MAP_PREFETCHABLE flag introduced a while ago
-add a missing link: bus_space_vaddr() to get a pointer from a handle;
needed to make the BUS_SPACE_MAP_LINEAR flag useful
 1.10 16-Mar-1999  garbled More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.9 06-Mar-1999  mycroft Fix formatting errors (bad sentence breaks).
 1.8 07-Jul-1998  ross s/count/flags/ in bus_space_barrier() section.
 1.7 06-Feb-1998  perry macroize BSD, NetBSD, FreeBSD and misc cleanup
 1.6 27-Jan-1998  hubertf s.SYNOPSIS.DESCRIPTION., fixes PR kern/4898
by NAKAJIMA Yoshihiro <nakayosh@kcn.or.jp>
 1.5 18-Dec-1997  mikel fix pasto, from Rafal Boni in PR misc/4673
 1.4 11-Nov-1997  mrg add missing .Nm sections
 1.3 14-Aug-1997  cgd branches: 1.3.2;
clean up the copy_region text slightly
 1.2 13-Aug-1997  christos Rename busdma -> bus_dma
 1.1 13-Aug-1997  cgd bus_space_*() function manual page. Written by me (as plain text),
converted to use the doc macros by Christos, then severely cleaned,
hacked, and improved by me.
 1.3.2.1 11-Nov-1997  mrg pull up from trunk: add missing .Nm sections
 1.12.4.2 09-Sep-2000  sommerfeld Pull up 1.15: terminate an unterminated .Bl
approved by jhawk
 1.12.4.1 06-Aug-2000  briggs Approved by thorpej
Pull up revisions 1.13 and 1.14--
Add some basic bus_space_*stream_N documentation. ...and note that
functions that take a count should be called with a non-zero count.
 1.34.8.1 24-Mar-2008  keiichi sync with head.
 1.34.4.1 23-Mar-2008  matt sync with HEAD
 1.35.4.1 18-May-2008  yamt sync with head.
 1.35.2.2 02-Jun-2008  mjf Sync with HEAD.
 1.35.2.1 01-Mar-2008  mjf file bus_space.9 was added on branch mjf-devfs2 on 2008-06-02 13:21:41 +0000
 1.36.6.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.40.2.2 29-Jul-2010  uebayasi Document bus_space_physload(9), bus_space_physunload(9),
bus_space_physload_device(9), and bus_space_physunload_device(9).
 1.40.2.1 16-Apr-2010  uebayasi file bus_space.9 was added on branch uebayasi-xip on 2010-07-29 04:44:34 +0000
 1.45.2.1 30-Oct-2012  yamt sync with head
 1.48.2.2 26-Apr-2017  pgoyette Sync with HEAD
 1.48.2.1 04-Nov-2016  pgoyette Sync with HEAD
 1.50.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.5 13-Aug-1997  christos Rename to bus_dma.9
 1.4 12-Aug-1997  christos Correct 8 spelling mistakes.
 1.3 12-Aug-1997  mikel add bus_dmamem_map() to SYNOPSIS, fix some more typos
 1.2 12-Aug-1997  mikel use -mdoc macros to good effect, and other minor editing
 1.1 11-Aug-1997  christos Training for my new position as Jason's secretary...
 1.11 16-Oct-2017  christos revert; this is section 9 and userland headers are not available in kernel
context.
 1.10 16-Oct-2017  wiz Remove Tn.
 1.9 16-Oct-2017  maya Suggest to include the POSIX <endian.h> rather than BSD <sys/endian.h>
 1.8 14-May-2010  dholland fix previous again, hopefully ok this time
 1.7 06-May-2010  dholland Improve previous further.
 1.6 05-May-2010  jruoho Clarify a sentence by removing a comma.
 1.5 04-May-2010  jruoho Reference bswap(3). Improvements in the HISTORY section. Remove the AUTHORS
(of the man page) section, which does not appear in the original (FreeBSD)
manual page.
 1.4 02-Oct-2009  cegger branches: 1.4.2;
fix grammar: a -> an
 1.3 10-Apr-2009  tsutsui branches: 1.3.2;
Fix typo.
 1.2 01-Apr-2009  wiz Use .An and .Aq for formatting in the AUTHORS section.
 1.1 31-Mar-2009  tsutsui Add byteorder(9) man page which describes htole32() etc. From FreeBSD
via PR misc/40770, with some tweaks by me.
 1.3.2.2 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.3.2.1 10-Apr-2009  jym file byteorder.9 was added on branch jym-xensuspend on 2009-05-13 19:19:15 +0000
 1.4.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.7 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22309, verified by myself.
 1.6 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.5 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.4 23-Nov-2001  jdolecek Use <sys/systm.h> instead of <systm.h>. Noted in kern/14697 by John Franklin
 1.3 04-Sep-2001  wiz Usually, the SEE ALSO section doesn't end with a dot.
 1.2 07-Jul-2001  perry remove redundant .Pp
 1.1 07-Jul-2001  perry man pages for b*() and mem*(), noting b*() to be obsolete
 1.5 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.4 29-Oct-2009  wiz Bump date for previous.
 1.3 28-Oct-2009  njoly Remove callback_entry ce description which has nothing to do with
callback_run_roundrobin() function.
 1.2 14-Oct-2009  joerg Fix markup.
 1.1 05-Oct-2009  rmind Add callback(9) man page. Reviewed and improved by <wiz>, thanks!
 1.29 12-Jan-2020  sevan Update callout_halt() to match src/sys/sys/callout.h
 1.28 20-Nov-2014  ozaki-r branches: 1.28.16; 1.28.18;
Make it clear that we should use not callout_stop but callout_halt before callout_destroy
 1.27 27-Jul-2014  riastradh branches: 1.27.2;
callout_ack returns void, not bool.
 1.26 03-Feb-2013  jdc branches: 1.26.6;
Note that a callout should be stopped before being destroyed.
 1.25 03-Aug-2009  rmind branches: 1.25.8; 1.25.10; 1.25.14;
Relate interfaces by updating "see also" section.
 1.24 04-May-2009  wiz Add missing word.
 1.23 04-May-2009  ad Add a CONCURRENCY section with some food for thought.
 1.22 04-May-2009  ad Document callout_halt.
 1.21 12-Mar-2009  joerg No space between dot and macro name.
 1.20 04-Jan-2009  jdc branches: 1.20.2;
Add callout_pending to NAME section.
 1.19 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.18 29-Dec-2007  wiz branches: 1.18.4; 1.18.6;
Document CALLOUT_MPSAFE. Bump date.
 1.17 16-Oct-2007  joerg Sync callout(9) man page with bool changes.
 1.16 14-Jul-2007  xtraeme branches: 1.16.4;
Bump date.
 1.15 14-Jul-2007  ad Sync with reality.
 1.14 04-Mar-2005  mycroft Document callout_active().
 1.13 27-Oct-2003  thorpej - Change callout_setfunc() to require that the callout handle is already
initialized. Update the txp(4) to compensate.
- Statically initialize the TCP timer callout handles in the tcpcb
template. We still use callout_setfunc(), but that call is now much
less expensive. Add a comment that the compiler is likely to unroll
the loop (so don't sweat that it's there).
 1.12 19-Oct-2003  he Make the documentation match the source, and excise instances of
the RUNNING flag which existed in an earlier draft implementation.
Also, now that callout_stop() no longer clears INVOKING, reflect
that as well.
 1.11 07-Aug-2003  wiz Bump date for callout_invoking; fix macro usage; remove superfluous "The".
 1.10 20-Jul-2003  he Temporarily introduce CALLOUT_INVOKING, callout_invoking() and callout_ack()
to make users of the callout facility able to cooperate to work around the
race caused by the callout code lowering interrupt priority level when
invoking callout handlers, something which allows other code to run before
the callout handler gets to it's spl*() call.

This is to enable the workaround for the TCP code found in PR#20390 to be
applied.

This should be backed out once a more comprehensive fix can be put in
place.
 1.9 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.8 04-Feb-2003  thorpej Update for new callout(9) implemenatation.
 1.7 14-Oct-2002  wiz New sentence, new line.
 1.6 13-Feb-2002  ross branches: 1.6.2;
Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.5 04-Sep-2001  wiz Xref hz(9), now that it exists.
 1.4 21-Jun-2001  wiz Fix typos, punctuation and whitespace.
 1.3 29-Apr-2001  jhawk Comment out references to hz(9) and hardclock(9). It'd be nice
if someone wrote them, but let's not reference them until they are
written. Addresses PR kern/4901.
 1.2 27-Mar-2000  jdolecek Add an include statement to SYNOPSIS sections. Fixes kern/9685.
 1.1 23-Mar-2000  thorpej Documentation for new callout interfaces.
 1.6.2.1 22-Oct-2003  jmc Pullup via patch (requested by he in ticket #1530)


Introduce a new INVOKING status for callouts, and use it to close
a race condition in the TCP code. Fixes PR#20390.
 1.16.4.2 09-Jan-2008  matt sync with HEAD
 1.16.4.1 06-Nov-2007  matt sync with HEAD
 1.18.6.1 18-May-2008  yamt sync with head.
 1.18.4.1 02-Jun-2008  mjf Sync with HEAD.
 1.20.2.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.25.14.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.25.14.1 25-Feb-2013  tls resync with head
 1.25.10.2 07-Dec-2014  martin Pull up following revision(s) (requested by ozaki-r in ticket #1201):
sys/kern/kern_ktrace.c: revision 1.166
sys/dev/isa/aps.c: revision 1.16
sys/dev/sysmon/sysmonvar.h: revision 1.45
sys/dev/ir/irframe_tty.c: revision 1.60
sys/dev/sysmon/sysmon_envsys_events.c: revision 1.111-1.112 (patch)
sys/dev/pci/pccbb.c: revision 1.207
sys/dev/wscons/wskbd.c: revision 1.135
sys/dev/usb/ohci.c: revision 1.254
sys/net/if_ecosubr.c: revision 1.41
sys/dev/pcmcia/btbc.c: revision 1.17
sys/arch/x86/x86/via_padlock.c: revision 1.23
sys/dev/sdmmc/sdmmc.c: revision 1.23 (patch)
sys/dev/bluetooth/btkbd.c: revision 1.17
sys/dev/bluetooth/bcsp.c: revision 1.25
sys/arch/x86/pci/fwhrng.c: revision 1.8
sys/dev/ic/nslm7x.c: revision 1.61
share/man/man9/callout.9: revision 1.28 (patch)

Replace callout_stop with callout_halt and ensure the callout
is not running before destroying it.
 1.25.10.1 29-Sep-2014  msaitoh Pull up following revision(s) (requested by riastradh in ticket #1119):
share/man/man9/callout.9: revision 1.27
callout_ack returns void, not bool.
 1.25.8.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.26.6.1 10-Aug-2014  tls Rebase.
 1.27.2.1 01-Dec-2014  martin Pull up following revision(s) (requested by ozaki-r in ticket #279):
sys/kern/kern_ktrace.c: revision 1.166
sys/dev/isa/aps.c: revision 1.16
sys/dev/sysmon/sysmonvar.h: revision 1.45
sys/dev/ir/irframe_tty.c: revision 1.60
sys/dev/sysmon/sysmon_envsys_events.c: revision 1.111
sys/dev/sysmon/sysmon_envsys_events.c: revision 1.112
sys/dev/pci/pccbb.c: revision 1.207
sys/dev/wscons/wskbd.c: revision 1.135
sys/dev/usb/ohci.c: revision 1.254
sys/net/if_ecosubr.c: revision 1.41
sys/dev/pcmcia/btbc.c: revision 1.17
sys/arch/x86/x86/via_padlock.c: revision 1.23
sys/dev/sdmmc/sdmmc.c: revision 1.23
sys/dev/bluetooth/btkbd.c: revision 1.17
sys/dev/bluetooth/bcsp.c: revision 1.25
sys/arch/x86/pci/fwhrng.c: revision 1.8
sys/dev/ic/nslm7x.c: revision 1.61
share/man/man9/callout.9: revision 1.28
Replace callout_stop with callout_halt
In order to call callout_destroy for a callout safely, we have to ensure
the function of the callout is not running and pending. To do so, we should
use callout_halt, not callout_stop.
Discussed with martin@ and riastradh@.
Make it clear that we should use not callout_stop but callout_halt
before callout_destroy
Replace callout_stop with callout_halt
In order to call callout_destroy for a callout safely, we have to ensure
the function of the callout is not running and pending. To do so, we should
use callout_halt, not callout_stop.
In this case, we need to pass an interlock to callout_halt to wait for
the callout complete.
Reviewed by riastradh@.
Kill sme_callout_mtx and use sme_mtx instead
We can use sme_mtx for the callout as well. Actually we should do so
because sme_events_list and some other data that are touched in the
callout should be protected by sme_mtx, not sme_callout_mtx.
Discussed with riastradh@ in
http://mail-index.netbsd.org/tech-kern/2014/11/11/msg017956.html
Replace callout_stop with callout_halt
In order to call callout_destroy for a callout safely, we have to ensure
the function of the callout is not running and pending. To do so, we should
use callout_halt, not callout_stop.
In this case, we need to pass an interlock to callout_halt to wait for
the callout complete. And also we make sure that SME_CALLOUT_INITIALIZED
is unset before calling callout_halt to prevent the callout from calling
callout_schedule. This is the same as what we did in sys/netinet6/mld6.c@1.61.
Reviewed by riastradh@.
 1.28.18.1 21-Jan-2020  martin Pull up following revision(s) (requested by sevan in ticket #621):

share/man/man9/callout.9: revision 1.29

Update callout_halt() to match src/sys/sys/callout.h
 1.28.16.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.20 15-Feb-2016  riastradh cardbus autoconf uses cardbus_attach_args, not isapnp_attach_args.
 1.19 13-Jul-2014  mbalmer Don't lie about the CardBus device database. Diff from Jukka Ruohonen.
Fixes PR misc/39625.
 1.18 06-Jan-2014  njoly branches: 1.18.2;
Kill one more trailing space in function argument.
 1.17 30-May-2011  dyoung branches: 1.17.4; 1.17.10;
MI drivers should #include <sys/bus.h> not <machine/bus.h>.
 1.16 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.15 15-Apr-2010  jruoho branches: 1.15.2;
Remove references to the deprecated powerhook_establish(9).
 1.14 25-Feb-2010  dyoung Don't mention cardbus_free_tag() and Cardbus_free_tag(), they are no
more.
 1.13 24-Feb-2010  dyoung Update the doco, just in case somebody adds a new CardBus driver
before I've finished tucking CardBus under the PCI abstraction,
unlikely though that is.
 1.12 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.11 03-Jul-2004  mycroft branches: 1.11.26; 1.11.28;
Cardbus -> CardBus
 1.10 30-Jun-2003  wiz Fixes to make these man page look nice with groff-1.19.
 1.9 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.8 14-Apr-2003  kleink Following the pci(9) example, list cardbusreg.h here as well.
 1.7 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.6 14-Oct-2002  wiz New sentence, new line.
 1.5 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.4 04-Sep-2001  wiz One formatting and two punctuation fixes.
 1.3 04-Sep-2001  wiz Boring whitespace fixes.
 1.2 06-Jul-2001  abs pcmcia(9) not PCMCIA(9)
 1.1 01-Jul-2001  gmcgarry Add some missing documentation.
 1.11.28.1 18-May-2008  yamt sync with head.
 1.11.26.1 02-Jun-2008  mjf Sync with HEAD.
 1.15.2.2 15-Apr-2010  jruoho Remove references to the deprecated powerhook_establish(9).
 1.15.2.1 15-Apr-2010  jruoho file cardbus.9 was added on branch uebayasi-xip on 2010-04-15 08:40:47 +0000
 1.17.10.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.18.2.1 10-Aug-2014  tls Rebase.
 1.2 08-Jul-2006  skrll Some section 9 man page edits:
- Update ctxsw(9) to reflect reality a little better
- chooselwp doesn't exist in the kernel so remove the man page.
- Remove the references to chooseproc which existed briefly.
 1.1 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.4 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.3 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.2 27-Sep-2002  wiz Begin new sentences on new lines; drop trailing whitespace; some mdoc
and typo fixes.
 1.1 22-Sep-2002  gmcgarry Document the details of the scheduler.
 1.2 26-Dec-2014  wiz Fix description of days_in_month. Based on email from Kamil
Rytarowski.
 1.1 22-Dec-2014  wiz Add clock(9) from Kamil Rytarowski.
 1.17 07-Sep-2024  rillig man: use https URLs for www.NetBSD.org
 1.16 07-Jul-2019  gutteridge branches: 1.16.12;
cnmagic.9: add xref to ddb(4), and minor grammatical fixes
 1.15 03-Jul-2017  wiz branches: 1.15.6;
Remove workaround for ancient HTML generation code.
 1.14 08-Jun-2010  jruoho Add FUNCTIONS. List only complete prototypes in SYNOPSIS. Sort SYNOPSIS
according to the appearance in FUNCTIONS. Fix typo; cnm_trap() -> cn_trap().
Remove the .Va typedef struct cnm_state cnm_state_t; in SYNOPSIS. And some
miscellaneous markup improvements.
 1.13 06-Oct-2004  dbj branches: 1.13.42;
fix typo: s/sate/state/
 1.12 02-Jun-2004  seb Fix macro name.
Approved by wiz@
 1.11 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.10 14-Feb-2003  grant The correct capitalisation of 'NetBSD.org' is (you
guessed it) 'NetBSD.org'.

some mdoc fixes.
 1.9 14-Oct-2002  wiz New sentence, new line.
 1.8 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.7 26-Dec-2001  wiz Sort sections.
 1.6 10-Sep-2001  wiz Use standard section headers.
 1.5 21-Jun-2001  wiz Fix typos, punctuation and whitespace.
 1.4 12-Jun-2001  wiz receive, not recieve
 1.3 05-Jun-2001  wiz Add section to Dt.
 1.2 09-Apr-2001  wiz Fix date, and whitespace while I'm here.
 1.1 08-Nov-2000  eeh Add console magic sequence framework.
 1.13.42.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.15.6.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.16.12.1 02-Aug-2025  perseant Sync with HEAD
 1.31 07-Sep-2023  ad Permit calling cv_signal()/cv_broadcast() after mutex release.
 1.30 27-Aug-2020  fcambus Fix a bunch of typos in various kernel man pages.
 1.29 19-Aug-2020  msaitoh s/ be be / be /
 1.28 11-May-2020  riastradh Remove timedwaitclock.

This did not fix the bug I hoped it would fix in futex, and needs
more design thought. Might redo it somewhat differently later.
 1.27 03-May-2020  riastradh Bump date.
 1.26 03-May-2020  riastradh Document cv_timedwaitclock.
 1.25 03-May-2020  riastradh Add a note about setting the timeout to zero _and_ returning success.
 1.24 03-May-2020  riastradh Simplify example of cv_timedwaitbt.

It is simpler if there is only one place we check the condition.

That said, there are cases where the caller needs to re-check before
choosing to fail (e.g., futex_wait in kern/sys_futex.c, which must
verify the condition before taking destructive steps to abort the
wait). But it's not clear that that's the norm.
 1.23 03-May-2020  riastradh Update cv_timedwaitbt documentation to reflect useful reality.

Previously, a negative timeout was forbidden (kassert), a zero or
maybe even just a sufficiently small timeout would block forever, and
we would subtract the time elapsed -- possibly longer than the
timeout, leading to a negative updated timeout, which would trip the
kassert the next time around if used as advertised. DERP.

Now negative timeouts are still forbidden in order to detect usage
mistakes, but a zero timeout fails immediately and we clamp the
subtracted time to be at least zero so you can always safely call
cv_timedwaitbt in a loop.

(An alternative would be to fail immediately for all nonpositive
timeouts, and to leave in the timespec the negative time we overshot,
but it's not clear this would be useful.)
 1.22 10-Apr-2020  ad - Make this needed sequence always work for condvars, by not touching the CV
again after wakeup. Previously it could panic because cv_signal() could
be called by cv_wait_sig() + others:

cv_broadcast(cv);
cv_destroy(cv);

- In support of the above, if an LWP doing a timed wait is awoken by
cv_broadcast() or cv_signal(), don't return an error if the timer
fires after the fact, i.e. either succeed or fail, not both.

- Remove LOCKDEBUG code for CVs which never worked properly and is of
questionable use.
 1.21 12-Dec-2019  pgoyette Point out that spurious wake-ups are possible, and that an LWP should
check for resource availability after being awoken.
 1.20 12-Apr-2019  abhinav Split the examples into two separate literal sections

ok wiz@
 1.19 13-Nov-2017  wiz branches: 1.19.4;
Bump date for previous.
 1.18 12-Nov-2017  riastradh Replace xref mb(9) by xref membar_ops(3).
 1.17 12-Nov-2017  riastradh Rework cv_timedwaitbt documentation and example code.
 1.16 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.15 03-Jul-2017  pgoyette Update to include new cv_timedwaitbt() and cv_timedwaitbt_sig().

Also update code example.

OK riastradh@
 1.14 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.13 06-Aug-2008  skrll Spellos
 1.12 04-Jun-2008  ad Note that DIAGNOSTIC/LOCKDEBUG applies.
 1.11 30-Apr-2008  martin branches: 1.11.2;
Convert TNF licenses to new 2 clause variant
 1.10 26-Jan-2008  wiz branches: 1.10.4; 1.10.6;
Document that cv_timedwait with a ticks argument of zero behaves like
cv_wait.
 1.9 29-Mar-2007  ad branches: 1.9.4;
- Note that cv_has_waiters() can only be used to assert that there are
waiters sleeping non-interruptably (i.e., in cv_wait()). Prompted by
a discussion with pooka@.
- Minor cosmetic changes.
 1.8 05-Feb-2007  ad Sync with latest changes.
 1.7 03-Feb-2007  ad Document cv_has_waiters().
 1.6 03-Feb-2007  ad - Require that cv_signal/cv_broadcast be called with the interlock held.
- Provide 'async' versions that don't need the interlock.
 1.5 02-Feb-2007  wiz Sort SEE ALSO. Fix typo.
 1.4 02-Feb-2007  ad Add manpage for memory barrier ops. Not enabled in the Makefile yet.
 1.3 04-Dec-2006  wiz Use more markup. Use HTML escapes. Use .Rs/.Re for book citation.
 1.2 13-Nov-2006  ad Fix errors.
 1.1 13-Nov-2006  ad Add manual pages for RW locks, mutexes and condition variables. Not
enabled in the Makefile.
 1.9.4.1 23-Mar-2008  matt sync with HEAD
 1.10.6.2 17-Jun-2008  yamt sync with head.
 1.10.6.1 18-May-2008  yamt sync with head.
 1.10.4.3 05-Oct-2008  mjf Sync with HEAD.
 1.10.4.2 29-Jun-2008  mjf Sync with HEAD.
 1.10.4.1 02-Jun-2008  mjf Sync with HEAD.
 1.11.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.11.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.19.4.3 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.19.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.19.4.1 10-Jun-2019  christos Sync with HEAD
 1.30 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.29 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.28 05-Apr-2010  joerg branches: 1.28.2;
\\ -> \e
 1.27 03-Mar-2010  pooka update description of deffs
 1.26 15-Mar-2009  joerg Replace tagged list without non-tagged content with display.
 1.25 30-Apr-2008  martin branches: 1.25.6;
Convert TNF licenses to new 2 clause variant
 1.24 04-Jun-2006  perry branches: 1.24.18; 1.24.20;
add a couple of .Xr's to config(5).
Not yet really enough, but a bit for now.
 1.23 07-Jul-2005  snj branches: 1.23.2;
config lives in src/usr.bin/config these days.
 1.22 20-Jun-2005  peter Change all .Xr config 8 to .Xr config 1, following the recent move of
config from usr.sbin -> usr.bin.

Reviewed by wiz.
 1.21 15-Dec-2004  wiz Drop trailing whitespace.
 1.20 02-Sep-2004  jmmv Add minor space for proper formatting.
 1.19 11-Apr-2004  fredb Fix a couple of minor typos.
 1.18 27-Sep-2003  kei Add missing `Ar' flag. Approved by Thomas Klausner.
 1.17 23-Aug-2003  wiz New sentence, new line.
 1.16 19-Aug-2003  jdolecek fixup the part what happens when specified filename
doesn't exist in description of cinclude
 1.15 19-Aug-2003  jdolecek document 'include', 'cinclude', 'prefix' and 'package'
bump date
 1.14 25-Jun-2003  heas Fix description of defflag, defparam (and defopt) when a filename is omitted.
 1.13 06-Apr-2003  wiz Grammar fix.
 1.12 06-Apr-2003  wiz description, not descripton. Igor Sobrado in PR 19680.
 1.11 30-Mar-2003  wiz Separate "command" from "line".
 1.10 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.9 14-Oct-2002  wiz New sentence, new line.
 1.8 06-Sep-2002  wiz Bump date.
 1.7 06-Sep-2002  gehenna Document the ``device-major'' statement and remove the ``major'' statement.
 1.6 23-Mar-2002  heinz some typos
 1.5 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.4 26-Dec-2001  wiz Fix SEE ALSO section.
 1.3 13-Dec-2001  gmcgarry Document the defflag and defparam statements.
 1.2 04-Sep-2001  wiz Boring whitespace fixes.
 1.1 01-Jul-2001  gmcgarry Add some missing documentation.
 1.23.2.1 19-Jun-2006  chap Sync with head.
 1.24.20.1 18-May-2008  yamt sync with head.
 1.24.18.1 02-Jun-2008  mjf Sync with HEAD.
 1.25.6.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.28.2.2 05-Apr-2010  joerg \\ -> \e
 1.28.2.1 05-Apr-2010  joerg file config.9 was added on branch uebayasi-xip on 2010-04-05 19:27:17 +0000
 1.19 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.18 08-Jun-2010  jruoho Offset indent the example.
 1.17 05-Apr-2010  joerg branches: 1.17.2;
\\ -> \e
 1.16 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.15 03-Jan-2006  rumble branches: 1.15.20; 1.15.22;
Typo: add a missing article.
 1.14 01-May-2003  uebayasi Typos, mostly a -> an.

Reviewed by: grant
 1.13 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.12 01-Apr-2003  wiz Space before punctuation after macro argument (to avoid the punctuation
being marked up) and bump date.
 1.11 01-Apr-2003  perry Fix a bit of grammar and remove some remnants I hadn't meant to commit
in the last.
 1.10 01-Apr-2003  perry Add bare-bones documentation for cnflush and cnhalt
 1.9 14-Feb-2003  perry Note that cngetc returns 0 if there is no console input device.
 1.8 14-Oct-2002  wiz New sentence, new line.
 1.7 20-Sep-2002  uebayasi .Xr each other.
 1.6 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.5 05-Jul-2001  jdolecek remove the splhigh stuff altogether, that is not going to be requirement
 1.4 21-Jun-2001  wiz Fix typos, punctuation and whitespace.
 1.3 04-Jun-2001  jdolecek Note CTRL-u clears the entered input in cngetsn() too, besides '@'
slighly adjust the sentence about Backspace key
 1.2 02-Jun-2001  jdolecek Console input may not be necessarily keyboard, adjust accordingly.
Comment out the splhigh stuff for now, it doesn't quite match current use.
 1.1 02-Jun-2001  jdolecek Document cnbell(), cngetc(), cngetsn(), cnpollc(), cnputc().
 1.15.22.1 18-May-2008  yamt sync with head.
 1.15.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.17.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.17.2.1 05-Apr-2010  uebayasi file cons.9 was added on branch uebayasi-xip on 2010-08-17 06:40:04 +0000
 1.22 01-Sep-2019  wiz fetch(9) -> ufetch(9)
 1.21 01-Sep-2019  oster s/Xr store/Xr ustore/ to fix cross-references in these man-pages.
 1.20 08-Feb-2018  dholland branches: 1.20.4; 1.20.6;
Typo fixes from Eitan Adler.
 1.19 12-Sep-2008  simonb Revert change made two years ago(!). copyin_proc() and copyout_proc()
have never been converted to operation on LWPs.
 1.18 29-Jan-2006  rpaulo branches: 1.18.20; 1.18.24;
More ktrace-lwp.
 1.17 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.16 10-Sep-2005  wiz Use more markup. Drop trailing whitespace.
 1.15 28-Aug-2005  reinoud Create functions ioctl_copyin() and ioctl_copyout(). They are meant to be
used in ioctl routines to do the right thing when the FKIOCTL flag is
passed to the IOCTL routine indicating its a in-kernel VOP_IOCTL call and
indirect addresses provided in the arguments are to be seen as kernel
adresses rather than userland adresses.

A simple substitution and prepending of the `flags' passed on to the ioctl
handler is enough to DTRT.
 1.14 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.13 14-Oct-2002  wiz New sentence, new line.
 1.12 20-Jul-2002  thorpej * Add copyin_proc() and copyout_proc(), which are like copyin() and
copyout(), except they can operate on any process, not just curproc.
* Use this in uiomove() to allow UIO_USERSPACE to non-curproc.
 1.11 13-Feb-2002  ross branches: 1.11.2;
Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.10 21-Jun-2001  wiz Fix typos, punctuation and whitespace.
 1.9 16-Mar-1999  garbled More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.8 03-Sep-1998  msaitoh Eliminate extra comma in SEE ALSO section
 1.7 26-Jul-1998  msaitoh fix a small bug
 1.6 22-Feb-1998  kleink Update to reflect that copy*str() implementations must be able to handle NULL
being passed in the 'done' argument. Also, s/NULL/NUL/ where appropriate.
 1.5 11-Nov-1997  mrg add missing .Nm sections
 1.4 24-Mar-1997  christos branches: 1.4.2;
const poisoning.
 1.3 19-Jun-1996  pk `.Pa' => `.Fa'
 1.2 09-Jan-1996  thorpej Add fetch(9) and store(9), which describe the {fu,su}{,i}{byte,word}
functions. Cross-reference with each-other and copy(9).
 1.1 09-Jan-1996  thorpej copy(9) manual page: describes the copyin(), copyout(), copystr(),
copyinstr(), and copyoutstr() functions.
 1.4.2.1 11-Nov-1997  mrg pull up from trunk: add missing .Nm sections
 1.11.2.1 09-Nov-2002  tron Pull up revision 1.12 (requested by thorpej in ticket #527):
* Add copyin_proc() and copyout_proc(), which are like copyin() and
copyout(), except they can operate on any process, not just curproc.
* Use this in uiomove() to allow UIO_USERSPACE to non-curproc.
 1.18.24.1 24-Sep-2008  wrstuden Merge in changes between wrstuden-revivesa-base-2 and
wrstuden-revivesa-base-3.
 1.18.20.1 05-Oct-2008  mjf Sync with HEAD.
 1.20.6.2 05-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #174):
lib/libc/sys/chmod.2: revision 1.48
lib/libc/sys/stat.2: revision 1.59
lib/libc/sys/unlink.2: revision 1.30
lib/libc/sys/lseek.2: revision 1.25
lib/libc/sys/getuid.2: revision 1.18
lib/libc/sys/chown.2: revision 1.37
lib/libm/man/exp.3: revision 1.32
lib/libm/man/log.3: revision 1.7
lib/libc/sys/open.2: revision 1.60
lib/libc/stdio/fopen.3: revision 1.36
lib/libc/stdio/putc.3: revision 1.14
lib/libc/sys/mount.2: revision 1.51
share/man/man9/copy.9: revision 1.22
share/man/man9/uiomove.9: revision 1.20
lib/libc/sys/setuid.2: revision 1.23
lib/libc/sys/close.2: revision 1.18
sbin/init/init.8: revision 1.61
lib/libc/sys/write.2: revision 1.36
lib/libc/sys/read.2: revision 1.39
sbin/init/init.8: revision 1.62
lib/libc/sys/wait.2: revision 1.40
usr.bin/tty/tty.1: revision 1.10
lib/libc/sys/link.2: revision 1.33
usr.bin/du/du.1: revision 1.24
lib/libc/stdlib/exit.3: revision 1.17
usr.bin/su/su.1: revision 1.53
usr.bin/mail/mail.1: revision 1.66
lib/libc/sys/fork.2: revision 1.25
usr.bin/su/su.1: revision 1.54
usr.bin/mail/mail.1: revision 1.67
lib/libm/man/sin.3: revision 1.15
share/man/man9/intro.9: revision 1.26
share/man/man5/utmp.5: revision 1.17
lib/libc/compat-43/creat.3: revision 1.17
lib/libc/time/ctime.3: revision 1.61
lib/libcompat/4.1/stty.3: revision 1.10
usr.bin/dc/dc.1: revision 1.3
lib/libm/man/cos.3: revision 1.17
lib/libc/sys/chdir.2: revision 1.23
lib/libc/gen/exec.3: revision 1.30
lib/libc/gen/exec.3: revision 1.31
games/bcd/bcd.6: revision 1.18
games/bcd/bcd.6: revision 1.19
usr.bin/write/write.1: revision 1.7
usr.bin/wc/wc.1: revision 1.18
usr.bin/pr/pr.1: revision 1.24
usr.bin/who/who.1: revision 1.25
lib/libc/sys/mkdir.2: revision 1.30
lib/libc/stdio/getc.3: revision 1.13
usr.bin/sort/sort.1: revision 1.40
usr.bin/mesg/mesg.1: revision 1.11
share/man/man5/passwd.5: revision 1.34
sort was there since v1
https://www.bell-labs.com/usr/dmr/www/man61.pdf

dc was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

du was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mail was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mesg was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

su was in v1
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man14.pdf
Update URL

write was in v1
https://www.bell-labs.com/usr/dmr/www/man14.pdf
grammar

passwd(5) was in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

utmp(5) was present in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

Earliest version of wtmp I could find was in v3
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man5/wtmp.5

Document history of chdir(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chmod(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chown(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

create was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of exec()
Move statement on execlpe() & execvpe() to HISTORY section.

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

fork was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
stat() was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

document history of fstat()
https://www.bell-labs.com/usr/dmr/www/man21.pdf

getuid was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

stty & gtty were around since v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
https://www.bell-labs.com/usr/dmr/www/man22.pdf

mount & umount were present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

Open was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

read was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

seek was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

setuid was in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

unlink was presen in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

wait was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

write was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

start documenting history
exp was present in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

log appeared in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putc & putw were in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putchar was in v4
https://minie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man3/putchr.3

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Document history.
https://www.bell-labs.com/usr/dmr/www/man11.pdf
Between v1 & v6 UNIX, bcd was rewritten in C, but I don't know if which
version,
hence I've skipped mentioning it.
End sentence with a dot.
Remove superfluous Pp.
Remove superfluous Pp.
Remove superfluous Ns.
Remove superfluous Pp.
fetch(9) -> ufetch(9)
fetch(9) -> ufetch(9). Remove superfluous Pp.
fetch(9) -> ufetch(9). Remove reference to unimplemented ppi(9).
 1.20.6.1 01-Sep-2019  martin Pull up following revision(s) (requested by oster in ticket #167):

share/man/man9/copy.9: revision 1.21
share/man/man9/intro.9: revision 1.25
share/man/man9/uiomove.9: revision 1.19

s/Xr store/Xr ustore/ to fix cross-references in these man-pages.
 1.20.4.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.5 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.4 11-Jul-2008  gdt Changemanpages written by Igor Sobrado to 2-clause license, per
private email from Igor. Drop attribution to Matt Thomas in those man
pages, per private email from Matt. In coredump_write.9, fix
capitalization of THomas. Requested by martin@.
 1.3 30-Apr-2008  martin branches: 1.3.2;
Convert TNF licenses to new 2 clause variant
 1.2 12-Jan-2006  wiz branches: 1.2.20; 1.2.22;
Break lines to 80 chars.
 1.1 24-Dec-2005  matt Update man pages for new coredump interface.
 1.2.22.1 18-May-2008  yamt sync with head.
 1.2.20.2 05-Oct-2008  mjf Sync with HEAD.
 1.2.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.3.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.16 17-May-2022  riastradh cprng(9): Note ipl must be at most IPL_SOFTSERIAL now.
 1.15 16-Mar-2022  riastradh cprng(9): Forbid use in hard interrupt context.

May need access to the global entropy pool (infrequently). This way
the global entropy pool lock can be lowered to IPL_SOFTSERIAL too,
with a little additional work.
 1.14 17-Aug-2020  wiz cprng(9): Remove trailing comma.
 1.13 17-Aug-2020  riastradh Update cprng_strong API documentation.

Should maybe just get rid of the flags arguments.
 1.12 17-Aug-2020  riastradh Update cprng(9) man page for CTR_DRBG -> Hash_DRBG change last year.
 1.11 24-Mar-2020  skrll Fix cprng_fast64 return type to match code
 1.10 19-Feb-2015  riastradh branches: 1.10.16; 1.10.18;
Clarify advice about when to use what parts of cprng(9).

Add security model to specify the difference between cprng_strong and
cprng_fast.

Fix code references. cprng_fast now uses ChaCha8, not RC4.

XXX Would have been nice if they had been called cprng and cprng_weak
to reduce confusion about which one to use, or even random and
weakrandom. Too late for that now, though.
 1.9 18-Mar-2014  riastradh branches: 1.9.4;
Merge riastradh-drm2 to HEAD.
 1.8 18-Jul-2013  riastradh Rework cprng(9) man page to reflect the current state of affairs.

- Remove defunct cprng_strong_getflags/setflags.
- Remove defunct cprng_strong_ready.
- Document CPRNG_HARD.
- Omit cprng_strong structure, which is now opaque.
- Specify what can sleep and under what conditions.
- Be a little more consistent about some markup.

This is not the whole story (select/kqueue stuff for /dev/random is
still omitted), and I plan to change it some more (to split
cprng_strong into one routine that unconditionally guarantees as many
bytes as you asked, and another routine that may block or return
partial reads), but this will do until I find the time for those.
 1.7 23-Jun-2013  riastradh branches: 1.7.2;
Fix dangling sentence vestige in cprng(9).
 1.6 23-Aug-2012  drochner branches: 1.6.2;
fix some signatures
 1.5 17-Dec-2011  wiz branches: 1.5.4;
Use more markup. Bump date for previous.
 1.4 17-Dec-2011  tls Separate /dev/random pseudodevice implemenation from kernel entropy pool
implementation. Rewrite pseudodevice code to use cprng_strong(9).

The new pseudodevice is cloning, so each caller gets bits from a stream
generated with its own key. Users of /dev/urandom get their generators
keyed on a "best effort" basis -- the kernel will rekey generators
whenever the entropy pool hits the high water mark -- while users of
/dev/random get their generators rekeyed every time key-length bits
are output.

The underlying cprng_strong API can use AES-256 or AES-128, but we use
AES-128 because of concerns about related-key attacks on AES-256. This
improves performance (and reduces entropy pool depletion) significantly
for users of /dev/urandom but does cause users of /dev/random to rekey
twice as often.

Also fixes various bugs (including some missing locking and a reseed-counter
overflow in the CTR_DRBG code) found while testing this.

For long reads, this generator is approximately 20 times as fast as the
old generator (dd with bs=64K yields 53MB/sec on 2Ghz Core2 instead of
2.5MB/sec) and also uses a separate mutex per instance so concurrency
is greatly improved. For reads of typical key sizes for modern
cryptosystems (16-32 bytes) performance is about the same as the old
code: a little better for 32 bytes, a little worse for 16 bytes.
 1.3 28-Nov-2011  wiz Spelling.
 1.2 28-Nov-2011  wiz Whitespace fixes; new sentence, new line; better macro usage.
Sort SEE ALSO.
 1.1 28-Nov-2011  tls Add cprng(9) manual page, remove arc4random(9) manual page
 1.5.4.4 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.5.4.3 30-Oct-2012  yamt sync with head
 1.5.4.2 17-Apr-2012  yamt sync with head
 1.5.4.1 17-Dec-2011  yamt file cprng.9 was added on branch yamt-pagecache on 2012-04-17 00:05:49 +0000
 1.6.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.2.1 23-Jul-2013  riastradh sync with HEAD
 1.9.4.1 18-Mar-2015  snj Pull up following revision(s) (requested by riastradh in ticket #605):
share/man/man9/cprng.9: revision 1.10
Clarify advice about when to use what parts of cprng(9).
Add security model to specify the difference between cprng_strong and
cprng_fast.
Fix code references. cprng_fast now uses ChaCha8, not RC4.
XXX Would have been nice if they had been called cprng and cprng_weak
to reduce confusion about which one to use, or even random and
weakrandom. Too late for that now, though.
 1.10.18.1 30-Mar-2020  martin Pull up following revision(s) (requested by skrll in ticket #805):

share/man/man9/cprng.9: revision 1.11

Fix cprng_fast64 return type to match code
 1.10.16.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.7 23-Mar-2015  riastradh Update some xrefs to point to softint(9), not the old/alt spelling.
 1.6 13-Apr-2010  jruoho branches: 1.6.2;
Small changes to wording and markup.
 1.5 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.4 16-Apr-2003  wiz branches: 1.4.32; 1.4.34;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.3 14-Oct-2002  wiz New sentence, new line.
 1.2 25-May-2002  wiz Standardize spelling.
 1.1 25-May-2002  gmcgarry Document some mandatory machine-dependent interfaces. Addresses PR16272.
 1.4.34.1 18-May-2008  yamt sync with head.
 1.4.32.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.2.2 13-Apr-2010  jruoho Small changes to wording and markup.
 1.6.2.1 13-Apr-2010  jruoho file cpu_configure.9 was added on branch uebayasi-xip on 2010-04-13 12:04:26 +0000
 1.10 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.9 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.8 24-Dec-2005  matt branches: 1.8.20; 1.8.22;
Update man pages for new coredump interface.
 1.7 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.6 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.5 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.4 14-Oct-2002  wiz New sentence, new line.
 1.3 25-May-2002  wiz Standardize spelling.
 1.2 25-May-2002  wiz Fix Dt.
 1.1 25-May-2002  gmcgarry Document some mandatory machine-dependent interfaces. Addresses PR16272.
 1.8.22.1 18-May-2008  yamt sync with head.
 1.8.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.6 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.5 30-Jul-2007  alc branches: 1.5.8; 1.5.10; 1.5.12;
kills a few `caddr_t' occurences still present in manpage
 1.4 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.3 14-Oct-2002  wiz New sentence, new line.
 1.2 25-May-2002  wiz Standardize spelling.
 1.1 25-May-2002  gmcgarry Document some mandatory machine-dependent interfaces. Addresses PR16272.
 1.5.12.2 30-Jul-2007  alc kills a few `caddr_t' occurences still present in manpage
 1.5.12.1 30-Jul-2007  alc file cpu_dumpconf.9 was added on branch matt-mips64 on 2007-07-30 22:48:47 +0000
 1.5.10.1 18-May-2008  yamt sync with head.
 1.5.8.1 02-Jun-2008  mjf Sync with HEAD.
 1.9 17-May-2007  yamt update after yamt-idlelwp merge.
- remove cpu_exit.9.
- remove ctxsw.9 from makefile because it's too stale.
XXX maybe it will revive as mi_switch.9 later.
- add cpu_switchto.9 to makefile.
 1.8 23-Aug-2003  wiz New sentence, new line; grammar fix.
 1.7 23-Aug-2003  yamt sync with reality.
 1.6 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.5 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.4 14-Oct-2002  wiz New sentence, new line.
 1.3 25-May-2002  wiz Standardize spelling.
 1.2 25-May-2002  wiz Fix Dt.
 1.1 25-May-2002  gmcgarry Document some mandatory machine-dependent interfaces. Addresses PR16272.
 1.5 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.4 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.3 14-Oct-2002  wiz New sentence, new line.
 1.2 25-May-2002  wiz Uppercase PCB.
 1.1 25-May-2002  gmcgarry Document some mandatory machine-dependent interfaces. Addresses PR16272.
 1.9 20-Apr-2007  yamt update. (cpu_did_resched)
 1.8 23-Feb-2007  yamt sys/proc.h -> sys/cpu.h
 1.7 20-Feb-2007  wiz Sort SEE ALSO.
 1.6 17-Feb-2007  yamt some more notes.
 1.5 17-Feb-2007  yamt add manpages for yamt-idlelwp branch. not enabled in the makefile yet.
 1.4 17-Feb-2007  yamt remove cpu_idle.9. it has not been available on trunk.
 1.3 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.2 27-Sep-2002  wiz Begin new sentences on new lines; drop trailing whitespace; some mdoc
and typo fixes.
 1.1 22-Sep-2002  gmcgarry Document the details of the scheduler.
 1.8 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.7 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.6 16-Apr-2003  wiz branches: 1.6.32; 1.6.34;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.5 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.4 14-Oct-2002  wiz New sentence, new line.
 1.3 25-May-2002  wiz Standardize spelling.
 1.2 25-May-2002  wiz Fix Dt.
 1.1 25-May-2002  gmcgarry Document some mandatory machine-dependent interfaces. Addresses PR16272.
 1.6.34.1 18-May-2008  yamt sync with head.
 1.6.32.1 02-Jun-2008  mjf Sync with HEAD.
 1.7 26-Apr-2018  scole Rename "cpu_switch" to "cpu_switchto"
 1.6 10-Mar-2017  wiz branches: 1.6.10;
Bump date for previous.
 1.5 10-Mar-2017  martin PR misc/52058: replace all proc_trampoline with lwp_trampoline belatedly.
 1.4 13-Apr-2010  jruoho branches: 1.4.2; 1.4.30; 1.4.34;
Refer to cpu_switchto(9) instead of nonexistent cpu_switch(x).
 1.3 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.2 29-Jan-2006  rpaulo branches: 1.2.20; 1.2.22;
More ktrace-lwp that I got wrong in the first try.

Thanks to Gregory McGarry for pointing this out.
 1.1 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.2.22.1 18-May-2008  yamt sync with head.
 1.2.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.34.1 21-Apr-2017  bouyer Sync with HEAD
 1.4.30.1 20-Mar-2017  pgoyette Sync with HEAD
 1.4.2.2 13-Apr-2010  jruoho Refer to cpu_switchto(9) instead of nonexistent cpu_switch(x).
 1.4.2.1 13-Apr-2010  jruoho file cpu_lwp_fork.9 was added on branch uebayasi-xip on 2010-04-13 05:41:54 +0000
 1.6.10.1 02-May-2018  pgoyette Synch with HEAD
 1.10 23-Nov-2019  ad Update to match recent changes.
 1.9 24-Oct-2011  yamt branches: 1.9.42;
- document RESCHED_KPREEMPT
- "Specifically" -> "Typically" in the paragraph which says what this
function can do, because they are merely examples.
 1.8 31-Jul-2010  jruoho Remove EXAMPLES-title (the example was not really an example). Use .Xr for
cpu_idle(9) instead of .Fn.
 1.7 25-May-2008  wiz branches: 1.7.10;
Put argument directly behind macro call. Link to sched_4bsd instead
of removed scheduler(9).
 1.6 30-Apr-2008  martin branches: 1.6.2;
Convert TNF licenses to new 2 clause variant
 1.5 17-May-2007  yamt branches: 1.5.10; 1.5.12;
update after yamt-idlelwp merge.
 1.4 17-Feb-2007  yamt - move an implementation example to an EXAMPLES section.
- adapt to multiprocessor.
 1.3 17-Feb-2007  yamt process -> LWP.
 1.2 17-Feb-2007  yamt correct a header.
XXX maybe it's better to introduce sys/cpu.h.
 1.1 17-Feb-2007  yamt need_resched -> cpu_need_resched.
 1.5.12.2 04-Jun-2008  yamt sync with head
 1.5.12.1 18-May-2008  yamt sync with head.
 1.5.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.7.10.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.9.42.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.4 13-Apr-2010  jruoho branches: 1.4.2;
Cosmetics.
 1.3 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.2 16-Apr-2003  wiz branches: 1.2.32; 1.2.34;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.1 25-May-2002  gmcgarry Document some mandatory machine-dependent interfaces. Addresses PR16272.
 1.2.34.1 18-May-2008  yamt sync with head.
 1.2.32.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.2.2 13-Apr-2010  jruoho Cosmetics.
 1.4.2.1 13-Apr-2010  jruoho file cpu_number.9 was added on branch uebayasi-xip on 2010-04-13 06:21:41 +0000
 1.19 07-Sep-2024  rillig man: use https URLs for www.NetBSD.org
 1.18 11-Feb-2010  dyoung branches: 1.18.2; 1.18.60;
Change mentions of doshutdownhooks(9) to pmf_system_shutdown(9).
 1.17 04-Sep-2009  apb Add cross references to new boothowto(9) man page.
 1.16 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.15 04-Apr-2003  wiz Uncomment vfs_shutdown xref.
 1.14 14-Feb-2003  grant The correct capitalisation of 'NetBSD.org' is (you
guessed it) 'NetBSD.org'.

some mdoc fixes.
 1.13 14-Oct-2002  wiz New sentence, new line.
 1.12 25-May-2002  wiz Fix Xref.
 1.11 25-May-2002  gmcgarry Document some mandatory machine-dependent interfaces. Addresses PR16272.
 1.10 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.9 04-Sep-2001  wiz Boring whitespace fixes.
 1.8 29-Apr-2001  jhawk Remove refernece to nonexistant vfs_shutdown(9), per
kern/4901
 1.7 14-Jun-2000  cgd sweep of my licenses (userland files w/o only my copyright) for
consistency. (no functional changes)
 1.6 14-Jun-2000  cgd fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well. No functional changes.
 1.5 06-Apr-1999  pk branches: 1.5.6;
1, 2, 3 and.. 4!
 1.4 16-Mar-1999  garbled branches: 1.4.2;
More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.3 27-Mar-1997  gwr Renamed boot to cpu_reboot (via repository copy)
 1.2 24-Sep-1996  ghudson Document bootstr parameter added by mrg a little while ago.
 1.1 25-Nov-1995  perry Added first section 9 man pages -- initial pages and Makefile from cgd
Section 9 man pages document the internals of the kernel.
 1.4.2.1 07-Apr-1999  pk Pull up from trunk: copyright text warts.
 1.5.6.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.18.60.1 02-Aug-2025  perseant Sync with HEAD
 1.18.2.2 11-Feb-2010  dyoung Change mentions of doshutdownhooks(9) to pmf_system_shutdown(9).
 1.18.2.1 11-Feb-2010  dyoung file cpu_reboot.9 was added on branch uebayasi-xip on 2010-02-11 18:22:27 +0000
 1.10 26-Nov-2014  wiz New sentence, new line. Use more markup. Sort SEE ALSO.
 1.9 26-Nov-2014  mlelstv Mention the new bootspec variable.
Give more details about the root device configuration.
 1.8 29-Jul-2012  wiz Serial comma, whitespace fixes, sort SEE ALSO.
Bump date for previous.
 1.7 29-Jul-2012  mlelstv Do not call setroot() from MD code and from MI code, which has
unwanted sideeffects in the RB_ASKNAME case. This fixes PR/46732.

No longer wrap MD cpu_rootconf(), as hp300 port stores reboot information
as a side effect. Instead call MI rootconf() from MD code which makes
rootconf() now a wrapper to setroot().

Adjust several MD routines to set the global booted_device,booted_partition
variables instead of passing partial information to setroot().

Make cpu_rootconf(9) describe the calling order.
 1.6 13-Apr-2010  jruoho branches: 1.6.2; 1.6.8; 1.6.10;
As the cited setroot(9) was nonexistent, briefly document it here.
 1.5 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.4 14-Jun-2005  peter branches: 1.4.20; 1.4.22;
s/CPU_DUMPCONF/CPU_ROOTCONF/
 1.3 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.2 25-May-2002  wiz Standardize spelling.
 1.1 25-May-2002  gmcgarry Document some mandatory machine-dependent interfaces. Addresses PR16272.
 1.4.22.1 18-May-2008  yamt sync with head.
 1.4.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.10.1 08-Aug-2012  martin Pull up following revision(s) (requested by mlelstv in ticket #466):
sys/arch/amiga/amiga/autoconf.c: revision 1.113
sys/arch/rs6000/rs6000/autoconf.c: revision 1.4
sys/arch/emips/emips/autoconf.c: revision 1.6
sys/arch/sandpoint/sandpoint/autoconf.c: revision 1.27
sys/arch/evbmips/alchemy/autoconf.c: revision 1.18
sys/arch/sgimips/sgimips/autoconf.c: revision 1.43
sys/arch/atari/atari/autoconf.c: revision 1.63
sys/arch/powerpc/oea/ofw_autoconf.c: revision 1.17
sys/arch/mmeye/mmeye/autoconf.c: revision 1.9
distrib/sets/lists/comp/mi: revision 1.1771
sys/arch/mipsco/mipsco/autoconf.c: revision 1.25
sys/arch/iyonix/iyonix/autoconf.c: revision 1.14
sys/arch/hp300/hp300/autoconf.c: revision 1.100
sys/kern/init_main.c: revision 1.445
sys/arch/pmax/pmax/autoconf.c: revision 1.79
sys/arch/netwinder/netwinder/autoconf.c: revision 1.11
sys/arch/dreamcast/dreamcast/autoconf.c: revision 1.10
sys/arch/ibmnws/ibmnws/autoconf.c: revision 1.12
sys/arch/evbppc/ev64260/autoconf.c: revision 1.17
sys/arch/evbmips/gdium/autoconf.c: revision 1.5
sys/arch/algor/algor/autoconf.c: revision 1.21
share/man/man9/Makefile: revision 1.367
sys/arch/ews4800mips/ews4800mips/autoconf.c: revision 1.9
sys/arch/amigappc/amigappc/autoconf.c: revision 1.5
sys/arch/x86/x86/x86_autoconf.c: revision 1.65
sys/arch/acorn26/acorn26/autoconf.c: revision 1.9
sys/arch/mvmeppc/mvmeppc/autoconf.c: revision 1.13
sys/arch/vax/vax/autoconf.c: revision 1.94
sys/arch/usermode/dev/cpu.c: revision 1.72
sys/arch/evbppc/virtex/autoconf.c: revision 1.5
sys/arch/next68k/next68k/autoconf.c: revision 1.26
sys/arch/mac68k/mac68k/autoconf.c: revision 1.73
sys/arch/ia64/ia64/autoconf.c: revision 1.6
sys/arch/evbppc/obs405/obs405_autoconf.c: revision 1.6
share/man/man9/cpu_rootconf.9: revision 1.7
sys/arch/landisk/landisk/autoconf.c: revision 1.6
sys/arch/evbmips/malta/autoconf.c: revision 1.16
sys/arch/sun3/sun3/autoconf.c: revision 1.76
sys/arch/evbppc/explora/autoconf.c: revision 1.13
sys/arch/sun3/sun3/autoconf.c: revision 1.77
sys/arch/evbmips/loongson/autoconf.c: revision 1.3
sys/arch/evbmips/atheros/autoconf.c: revision 1.11
sys/arch/sparc64/sparc64/autoconf.c: revision 1.188
sys/arch/acorn32/acorn32/autoconf.c: revision 1.18
sys/arch/evbarm/evbarm/autoconf.c: revision 1.13
sys/arch/cobalt/cobalt/autoconf.c: revision 1.30
sys/arch/mvme68k/mvme68k/autoconf.c: revision 1.46
sys/arch/hp700/hp700/autoconf.c: revision 1.48
sys/arch/evbmips/adm5120/autoconf.c: revision 1.5
sys/arch/hpcmips/hpcmips/autoconf.c: revision 1.25
sys/arch/alpha/alpha/autoconf.c: revision 1.52
sys/arch/sparc/sparc/autoconf.c: revision 1.244
sys/arch/evbppc/pmppc/autoconf.c: revision 1.7
sys/arch/bebox/bebox/autoconf.c: revision 1.25
sys/arch/luna68k/luna68k/autoconf.c: revision 1.13
sys/arch/hpcarm/hpcarm/autoconf.c: revision 1.20
sys/arch/evbppc/walnut/autoconf.c: revision 1.21
sys/arch/cesfic/cesfic/autoconf.c: revision 1.26
sys/arch/cats/cats/autoconf.c: revision 1.17
sys/arch/x68k/x68k/autoconf.c: revision 1.67
sys/arch/news68k/news68k/autoconf.c: revision 1.21
sys/arch/arc/arc/autoconf.c: revision 1.34
sys/arch/evbsh3/evbsh3/autoconf.c: revision 1.11
sys/sys/conf.h: revision 1.143
sys/arch/evbmips/rasoc/autoconf.c: revision 1.3
sys/arch/hpcsh/hpcsh/autoconf.c: revision 1.26
sys/arch/sun68k/sun68k/autoconf.c: revision 1.29
sys/arch/evbmips/rmixl/autoconf.c: revision 1.6
sys/arch/zaurus/zaurus/autoconf.c: revision 1.12
sys/arch/xen/x86/autoconf.c: revision 1.15
sys/arch/evbppc/mpc85xx/autoconf.c: revision 1.6
sys/arch/shark/shark/autoconf.c: revision 1.18
sys/arch/prep/prep/autoconf.c: revision 1.25
sys/arch/newsmips/newsmips/autoconf.c: revision 1.36
sys/arch/sbmips/sbmips/autoconf.c: revision 1.8
Do not call setroot() from MD code and from MI code, which has
unwanted sideeffects in the RB_ASKNAME case. This fixes PR/46732.
No longer wrap MD cpu_rootconf(), as hp300 port stores reboot information
as a side effect. Instead call MI rootconf() from MD code which makes
rootconf() now a wrapper to setroot().
Adjust several MD routines to set the global booted_device,booted_partition
variables instead of passing partial information to setroot().
Make cpu_rootconf(9) describe the calling order.
add rootconf(9) as a link to cpu_rootconf(9)
make this compile again
 1.6.8.1 30-Oct-2012  yamt sync with head
 1.6.2.2 13-Apr-2010  jruoho As the cited setroot(9) was nonexistent, briefly document it here.
 1.6.2.1 13-Apr-2010  jruoho file cpu_rootconf.9 was added on branch uebayasi-xip on 2010-04-13 07:32:32 +0000
 1.7 13-Apr-2010  jruoho branches: 1.7.2;
Small changes to wording and markup.
 1.6 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.5 01-Mar-2006  wiz branches: 1.5.20; 1.5.22;
Bump date for previous.
 1.4 27-Feb-2006  sketch Update documentation to reflect reality; uvm_init() runs after the console
has been configured, then cpu_startup() prints the initial copyright banner.
 1.3 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.2 25-May-2002  wiz Standardize spelling.
 1.1 25-May-2002  gmcgarry Document some mandatory machine-dependent interfaces. Addresses PR16272.
 1.5.22.1 18-May-2008  yamt sync with head.
 1.5.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.7.2.2 13-Apr-2010  jruoho Small changes to wording and markup.
 1.7.2.1 13-Apr-2010  jruoho file cpu_startup.9 was added on branch uebayasi-xip on 2010-04-13 12:04:26 +0000
 1.7 13-Apr-2010  jruoho cpu_swapout(9) is no more.
 1.6 31-May-2008  enami No comma is necessary for the last .Nm entry.
 1.5 30-Apr-2008  martin branches: 1.5.2;
Convert TNF licenses to new 2 clause variant
 1.4 20-Dec-2005  rpaulo branches: 1.4.20; 1.4.22;
Adapt man pages to ktrace-lwp.
 1.3 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.2 14-Oct-2002  wiz New sentence, new line.
 1.1 25-May-2002  gmcgarry Document some mandatory machine-dependent interfaces. Addresses PR16272.
 1.4.22.2 04-Jun-2008  yamt sync with head
 1.4.22.1 18-May-2008  yamt sync with head.
 1.4.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.5.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.14 03-Jun-2011  wiz Sort SEE ALSO.
 1.13 03-Jun-2011  yamt correct the section number of membar_producer. noted by wiz@
 1.12 02-Jun-2011  yamt mention memory barriers necessary for non-interlocked adaptive mutex release.
 1.11 13-Apr-2010  jruoho branches: 1.11.2; 1.11.6;
Improvements to wording and markup.
 1.10 25-May-2008  wiz Use Fn for function.
 1.9 24-Jan-2008  ad branches: 1.9.4; 1.9.6; 1.9.8;
Document returning parameter. Fixes PR misc/37612.
 1.8 02-Dec-2007  wiz Fix typo.
 1.7 21-May-2007  yamt branches: 1.7.4;
fix the description of return values. pointed by Martin Husemann.
reviewed by toshii@
 1.6 21-Apr-2007  yamt sync with the code.
 1.5 18-Apr-2007  yamt update.
 1.4 20-Mar-2007  yamt sync with reality.
 1.3 17-Feb-2007  yamt cpu_switchto doesn't use curlwp.
 1.2 17-Feb-2007  yamt locking note.
 1.1 17-Feb-2007  yamt add manpages for yamt-idlelwp branch. not enabled in the makefile yet.
 1.7.4.2 23-Mar-2008  matt sync with HEAD
 1.7.4.1 09-Jan-2008  matt sync with HEAD
 1.9.8.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.9.6.1 04-Jun-2008  yamt sync with head
 1.9.4.1 02-Jun-2008  mjf Sync with HEAD.
 1.11.6.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.11.2.2 13-Apr-2010  jruoho Improvements to wording and markup.
 1.11.2.1 13-Apr-2010  jruoho file cpu_switchto.9 was added on branch uebayasi-xip on 2010-04-13 06:05:57 +0000
 1.4 04-Dec-2003  atatat Garbage collect some references to the old sysctl() infrastructure.
 1.3 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.2 14-Oct-2002  wiz New sentence, new line.
 1.1 25-May-2002  gmcgarry Document some mandatory machine-dependent interfaces. Addresses PR16272.
 1.3 28-Jan-2004  jdolecek g/c obsolete cpu_wait(9)
reported in PR misc/24260 by Nicolas Joly
 1.2 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.1 25-May-2002  gmcgarry Document some mandatory machine-dependent interfaces. Addresses PR16272.
 1.7 01-Dec-2015  jmcneill There is no user space control for this with cpuctl(8) as far as I can tell. Remove all references to it.
 1.6 27-Oct-2011  jruoho Revert the revision 1.5 in cpufreq(9). Instead, document that the KPI can
not be used before interrupts have been enabled. Suggested by macallan@.
 1.5 20-Oct-2011  jruoho Do not use xcall(9) in cpufreq_register(9), as it requires kthreads to be
running and may impose hacks like config_interrupts(9) in the backend.
 1.4 30-Sep-2011  jruoho Note the order of the dummy boolean states.
 1.3 28-Sep-2011  wiz Add missing comma.
 1.2 28-Sep-2011  jruoho Bump date and add one missing note.
 1.1 28-Sep-2011  jruoho Add a simple cpufreq(9).

This is slightly improved version presented on tech-kern@ with proper
locking and few additional functions, mainly required for ioctl(9)/cpuctl(8).
 1.6 24-Jul-2024  uwe crashme(9): brush up markup, reword cn_fn slightly for clarity
 1.5 11-Dec-2021  riastradh branches: 1.5.4;
crashme(9): Touch up man page markup.

Better consistency with sysctl(7), less random widthing and
offsetting.
 1.4 11-Dec-2021  mrg remove clause 3 from all my licenses that aren't conflicting with
another copyright claim line. again. (i did this in 2008 and then
did not update all of my personal templates.)
 1.3 11-Dec-2021  riastradh Update crashme(9) man page for recent additions. Reorganize slightly.
 1.2 09-Jan-2019  wiz branches: 1.2.2; 1.2.4;
More markup. Add missing El. Fix typo.
 1.1 09-Jan-2019  mrg document crashme(9) functionality.

XXX: install me
 1.2.4.2 10-Jun-2019  christos Sync with HEAD
 1.2.4.1 09-Jan-2019  christos file crashme.9 was added on branch phil-wifi on 2019-06-10 22:05:41 +0000
 1.2.2.2 18-Jan-2019  pgoyette Synch with HEAD
 1.2.2.1 09-Jan-2019  pgoyette file crashme.9 was added on branch pgoyette-compat on 2019-01-18 08:50:12 +0000
 1.5.4.1 02-Aug-2025  perseant Sync with HEAD
 1.7 16-May-2006  elad kill unused man-pages. prompted by Iain Hibbert.
 1.6 26-Dec-2005  perry u_intN_t -> uintN_t
 1.5 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.4 25-Jan-2003  kleink <sys/ucred.h> requires <sys/param.h> as a pre-requisite; suggested
by Martin Husemann.
 1.3 20-Oct-2002  wiz New sentence, new line; grammar fixes; use more markup.
 1.2 20-Oct-2002  wiz Drop trailing whitespace.
 1.1 20-Oct-2002  gmcgarry More kernel documentation.
 1.9 25-May-2015  prlw1 typo
 1.8 27-Oct-2014  christos PR/49326: Henning Petersen: Correct errors in man pages csf.9 , pci.9 and ucom.9
 1.7 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.6 02-Sep-2009  ahoka Mention sched_m4.
 1.5 15-Mar-2009  joerg Consistently provide -width for tag lists.
 1.4 30-Apr-2008  martin branches: 1.4.6;
Convert TNF licenses to new 2 clause variant
 1.3 15-Jul-2007  wiz branches: 1.3.10; 1.3.12;
Fix Fn abuses. Sort SEE ALSO. End sentences with dots.
Use .Nm more.
 1.2 14-Jul-2007  dsieger Add references to sched_4bsd(9).
 1.1 14-Jul-2007  dsieger Add initial manpage for the "new" scheduler API.

Note: More content will follow, to this manpage as well as the NetBSD
Internals book.

Ok by <ad>
 1.3.12.1 18-May-2008  yamt sync with head.
 1.3.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.6.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.4 08-Apr-2011  jruoho Xref param(3).
 1.3 13-Apr-2010  jruoho branches: 1.3.2;
Add HISTORY.
 1.2 13-Apr-2010  jruoho Fix roff warnings. Note btop() and btopr() on Solaris as an example.
 1.1 13-Apr-2010  jruoho Document the ctod-family of macros from <sys/param.h>.

XXX: Someone may want to check if there is anything to add or correct.
 1.3.2.2 13-Apr-2010  jruoho Add HISTORY.
 1.3.2.1 13-Apr-2010  jruoho file ctod.9 was added on branch uebayasi-xip on 2010-04-13 11:01:23 +0000
 1.23 21-Jul-2007  dsieger Remove obsolete content about cpu_switchto() from ctxsw(9) and rename
it to mi_switch(9).

Suggested by yamt@
 1.22 18-Jul-2007  dsieger Sync with reality:

- cpu_switch() is gone.
- Adjust function prototypes and return values
- Add references to csf(9) and sched_4bsd(9).
- Bump date.
 1.21 17-Jul-2007  dsieger Remove references to SCHED_LOCK(9), which is gone. Slightly sync with
reality.

XXX: This needs more updates after idle-lwp changes.
 1.20 14-Jul-2007  ad - kcont was removed.
- Replace some references to tsleep.
 1.19 09-Jul-2006  wiz Bump date for previous, formatting nit.
Fix typo (I think).
 1.18 08-Jul-2006  skrll Some section 9 man page edits:
- Update ctxsw(9) to reflect reality a little better
- chooselwp doesn't exist in the kernel so remove the man page.
- Remove the references to chooseproc which existed briefly.
 1.17 13-May-2003  wiz Bump date for last.
 1.16 13-May-2003  fvdl Fix this up a bit to match reality. Needs more work, and so do some
other manpages describing scheduling-related functions.
 1.15 04-Apr-2003  wiz Refer pmap(9) for pmap_activate.
 1.14 27-Sep-2002  wiz Begin new sentences on new lines; drop trailing whitespace; some mdoc
and typo fixes.
 1.13 22-Sep-2002  gmcgarry Document the details of the scheduler.
 1.12 26-Dec-2001  wiz Drop some .Pps.
 1.11 04-Sep-2001  wiz Boring whitespace fixes.
 1.10 16-Mar-1999  garbled More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.9 06-Mar-1999  mycroft Fix formatting errors (bad sentence breaks).
 1.8 22-Sep-1998  kleink Typo (run queue array name).
 1.7 03-Sep-1998  msaitoh Eliminate extra comma in SEE ALSO section
 1.6 22-Apr-1998  ross Add David Brownlee's new intro pages, with editing. (PR #534[23])
Also, while here, expand apparently incorrectly .Dd month abbreviations.
(I thought about doing this in tmac/doc-common...heh...that would have
allowed a possible reverse map back to abbreviations.)
 1.5 27-Nov-1997  mikel fix capitalization as noted by Chris Demetriou in PR 4377
while I'm here, fix numerous spelling, grammar, and -mdoc macro usage bugs
 1.4 12-Nov-1997  mrg add missing .Nm calls and MLINKS. from spz@serpens.swb.de
 1.3 08-Oct-1997  jtc branches: 1.3.2;
Fix tipo inherited from old version of TNF copyright form.
s/REGENTS/FOUNDATION/.
 1.2 02-Dec-1996  tls .Dt request takes two and only two arguments; use of three leads to rather strange looking man page headers. :-)
 1.1 25-Nov-1996  pk Have a shot at `mi_switch()' and `cpu_switch()'.
 1.3.2.2 27-Nov-1997  mellon Pull rev 1.5 up from trunk (mikel)
 1.3.2.1 12-Nov-1997  mrg pull up from trunk: add missing .Nm calls and MLINKS. from spz@serpens.swb.de
 1.7 08-Jul-2023  riastradh curcpu_stable(9): New function for asserting curcpu() is stable.
 1.6 22-Sep-2022  riastradh curproc(9): Rework man page.
 1.5 01-Jul-2010  wiz Change xref from pfind(9) to proc_find(9). Bump date.
 1.4 13-Apr-2010  jruoho branches: 1.4.2;
Briefly note also curlwp.
 1.3 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.2 16-Apr-2003  wiz branches: 1.2.32; 1.2.34;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.1 25-May-2002  gmcgarry Document some mandatory machine-dependent interfaces. Addresses PR16272.
 1.2.34.1 18-May-2008  yamt sync with head.
 1.2.32.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.4.2.1 13-Apr-2010  uebayasi file curproc.9 was added on branch uebayasi-xip on 2010-08-17 06:40:05 +0000
 1.3 31-Oct-2020  wiz Improve wording.
 1.2 30-Oct-2020  uwe Add a few missing articles.
 1.1 30-Oct-2020  uwe ddb(9) - first cut at the documentation for writing and adding new DDB
commands. Not yet complete and not hooked into the build.
 1.8 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.7 04-Jan-2014  wiz New sentence, new line.
 1.6 21-Jul-2013  njoly Kill a few trailing spaces.
 1.5 20-Jul-2013  wiz Use Mt for email addresses.
 1.4 23-Dec-2006  wiz branches: 1.4.36; 1.4.42; 1.4.48;
Use HTML escapes.
 1.3 23-Dec-2006  wiz Drop trailing whitespace.
 1.2 03-Dec-2006  tsutsui Remove an invalid (and nonexistent) .Xr usage.
 1.1 11-May-2006  gdamore Add preliminary documentation for DDC and EDID subsystem.
 1.4.48.1 23-Jul-2013  riastradh sync with HEAD
 1.4.42.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.36.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.8 31-May-2021  simonb Use <sys/param.h> in the synopsis rather than <machine/param.h>; an MI
interface should be pulled in via <sys/...>.
 1.7 20-Jul-2011  jruoho branches: 1.7.48;
Xref delay(9) and kpause(9) with each other.
 1.6 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.5 14-Jul-2007  ad branches: 1.5.10; 1.5.12;
- kcont was removed.
- Replace some references to tsleep.
 1.4 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.3 14-Oct-2002  gmcgarry Some clarification on being reentrant.
 1.2 04-Aug-2002  gmcgarry Expand. From discussion on tech-kern.
 1.1 25-May-2002  gmcgarry Document some mandatory machine-dependent interfaces. Addresses PR16272.
 1.5.12.1 18-May-2008  yamt sync with head.
 1.5.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.7.48.1 31-May-2021  cjep sync with head
 1.5 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.4 20-Jul-2013  wiz Use Mt for email addresses.
 1.3 02-Dec-2010  wiz branches: 1.3.6; 1.3.12; 1.3.16;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.2 05-Nov-2009  wiz Drop trailing whitespace; use full month name in Dd.
 1.1 05-Nov-2009  dyoung Document the device iteration routines.

I derived this manual page from pmf(9), hence my retention of Jared's
copyright notice.
 1.3.16.1 23-Jul-2013  riastradh sync with HEAD
 1.3.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.6 02-Feb-2023  uwe devsw_attach(9): Use semantic markup instead of .Em
 1.5 02-Feb-2023  pgoyette Fix markup.
 1.4 28-Mar-2022  riastradh driver(9): devsw_detach never fails. Make it return void.

Prune a whole lotta dead branches as a result of this. (Some logic
calling this is also wrong for other reasons; devsw_detach is final
-- you should never have any reason to decide to roll it back. To be
cleaned up in subsequent commits...)

XXX kernel ABI change to devsw_detach signature requires bump
 1.3 30-Apr-2017  pgoyette Make the primary name for this man-page devsw
 1.2 14-May-2015  wiz branches: 1.2.2; 1.2.6;
Minus needs a backslash, add it.
 1.1 14-May-2015  pgoyette Add new man page for devsw_attach() and friends.

From Kamil Ritarowski with some editting by myself.
 1.2.6.2 02-May-2017  pgoyette Sync with HEAD - tag prg-localcount2-base1
 1.2.6.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.2.2.1 17-Jul-2016  pgoyette Update for new functions {b,c}devsw_{acquire,release}
 1.46 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.45 05-Mar-2017  wiz New sentence, new line.
Use more macros.
Bump date for previous.
 1.44 05-Mar-2017  mlelstv Enhance disk metrics by calculating a weighted sum that is incremented
by the number of concurrent I/O requests. Also introduce a new disk_wait()
function to measure requests waiting in a bufq.
iostat -y now reports data about waiting and active requests.

So far only drivers using dksubr and dk, ccd, wd and xbd collect data about
waiting requests.
 1.43 23-Jan-2017  abhinav Fix typo: s/openes/opens
 1.42 12-Dec-2016  wiz branches: 1.42.2;
Fix xref.
 1.41 10-Dec-2016  mlelstv Add d_label and add a few words to minphys and strategy.

Update disk man page for other users of the disk driver switch and
add reference to dksubr(9).
 1.40 31-Dec-2014  mlelstv branches: 1.40.2;
Retire disk_blocksize().
 1.39 29-Dec-2014  wiz Use more markup. Bump date for previous.
 1.38 29-Dec-2014  mlelstv document missing disk_set_info function that maintains the device's
"disk-info" dictionary.
 1.37 29-Dec-2014  mlelstv Implement DIOCGMEDIASIZE and DIOCGSECTORSIZE from FreeBSD.
 1.36 02-Dec-2010  wiz branches: 1.36.24;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.35 30-Dec-2009  wiz branches: 1.35.2;
Add missing dot.
 1.34 30-Dec-2009  jnemeth mdoclint
 1.33 30-Dec-2009  haad Mention problems which disk api have with concurrent usage remove splbio
line from man page because it is not true anymore, mention disk_isbusy and
add dm driver to references.
 1.32 20-May-2009  wiz Punctuation nit and typo fix.
 1.31 20-May-2009  dyoung Describe disk_begindetach(9).
 1.30 08-Apr-2009  joerg Don't indent struct dkbad with tab, the rest of the man page doesn't do
that either.
 1.29 14-Mar-2009  apb Fix typo and stray line in previous.
 1.28 14-Mar-2009  apb Minimal documentation for disk-related ioctls; mostly derived from
comments in sys/dkio.h
 1.27 03-May-2008  plunky branches: 1.27.6;
update disk.9 manpage to current reality
- add disk_init() (from vmlocking merge)
- add disk_destroy() (from vmlocking merge)
- remove disk_resetstat() (was removed)
- update structure defs
- update examples (ANSI, const, device_t etc)
 1.26 23-Dec-2006  wiz branches: 1.26.10; 1.26.12;
Use Dv for defined values.
 1.25 25-Nov-2006  scw Document disk_blocksize(9).
 1.24 26-Dec-2005  perry u_intN_t -> uintN_t
 1.23 14-Aug-2005  yamt remove disk_init which we don't have anymore.
 1.22 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.21 14-Feb-2003  grant The correct capitalisation of 'NetBSD.org' is (you
guessed it) 'NetBSD.org'.

some mdoc fixes.
 1.20 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.19 06-Nov-2002  enami Sync with reality; The struct disk has been extended to have
separate read/write disk statistics. Pointed out by itohy.
 1.18 14-Oct-2002  wiz New sentence, new line.
 1.17 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.16 26-Dec-2001  wiz Sort sections.
 1.15 28-Nov-2001  wiz No point in using __P in prototype declarations in man pages.
 1.14 10-Sep-2001  wiz Use standard section headers.
 1.13 21-Jun-2001  wiz Fix typos, punctuation and whitespace.
 1.12 21-Apr-2001  jdolecek fix typo
 1.11 31-May-2000  cgd in foo_softc example, actual struct device, not a pointer to one
 1.10 16-Mar-1999  garbled branches: 1.10.8;
More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.9 03-Sep-1998  msaitoh Eliminate extra comma in SEE ALSO section
 1.8 02-Sep-1998  jeremy Changed references to filesystem paths to use the mdoc filesystem path
macro (.Pa).
 1.7 22-Apr-1998  ross Add David Brownlee's new intro pages, with editing. (PR #534[23])
Also, while here, expand apparently incorrectly .Dd month abbreviations.
(I thought about doing this in tmac/doc-common...heh...that would have
allowed a possible reverse map back to abbreviations.)
 1.6 06-Feb-1998  perry macroize BSD, NetBSD, FreeBSD and misc cleanup
 1.5 11-Nov-1997  mrg add missing .Nm sections
 1.4 24-Sep-1996  ghudson branches: 1.4.4;
Correct a typo: sc_dk in a softc structure should be a struct disk, not
a struct disk *, at least as used in the example.
 1.3 19-Jun-1996  pk Fix spelling.
 1.2 08-Apr-1996  jtc fix typo; Reported by David Leonard <s160828@student.uq.edu.au> in PR #2307.
 1.1 09-Jan-1996  thorpej Manual page describing the new generic disk framework.
 1.4.4.1 11-Nov-1997  mrg pull up from trunk: add missing .Nm sections
 1.10.8.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.26.12.1 18-May-2008  yamt sync with head.
 1.26.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.27.6.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.35.2.1 05-Nov-2010  uebayasi Document DIOCGPHYSSEG.
 1.36.24.1 01-Jun-2015  snj Pull up following revision(s) (requested by jnemeth in ticket #775):
share/man/man9/disk.9: revision 1.37
sys/kern/subr_disk.c: revisions 1.104, 1.105
sys/dev/dksubr.c: revision 1.56
sys/sys/dkio.h: revision 1.21
Implement DIOCGMEDIASIZE and DIOCGSECTORSIZE from FreeBSD.
--
clear error for new ioctls.
 1.40.2.2 20-Mar-2017  pgoyette Sync with HEAD
 1.40.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.42.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.13 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.12 25-Sep-2004  chris branches: 1.12.26; 1.12.28;
Remove repeated "in the"
 1.11 21-Dec-2002  wiz parameterized instead of parametrized, from Adrian Mrva.
 1.10 26-Dec-2001  wiz Drop some .Pps.
 1.9 21-Jun-2001  wiz Fix typos, punctuation and whitespace.
 1.8 16-Mar-1999  garbled More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.7 06-Mar-1999  mycroft Fix formatting errors (bad sentence breaks).
 1.6 03-Sep-1998  msaitoh Eliminate extra comma in SEE ALSO section
 1.5 22-Apr-1998  ross Add David Brownlee's new intro pages, with editing. (PR #534[23])
Also, while here, expand apparently incorrectly .Dd month abbreviations.
(I thought about doing this in tmac/doc-common...heh...that would have
allowed a possible reverse map back to abbreviations.)
 1.4 11-Nov-1997  mrg add missing .Nm sections
 1.3 08-Oct-1997  jtc branches: 1.3.2;
Fix tipo inherited from old version of TNF copyright form.
s/REGENTS/FOUNDATION/.
 1.2 11-Apr-1997  mikel supply missing .Nm, and other cleanup
 1.1 27-Dec-1996  pk Document disklabel routines.
 1.3.2.1 11-Nov-1997  mrg pull up from trunk: add missing .Nm sections
 1.12.28.1 18-May-2008  yamt sync with head.
 1.12.26.1 02-Jun-2008  mjf Sync with HEAD.
 1.7 08-Dec-2019  mlelstv Drop comment about dk_lookup being in the wrong place.
 1.6 21-Oct-2017  wiz branches: 1.6.4;
Fix non-macro. Properly end list.
 1.5 21-Oct-2017  abhinav Remove comma after last Nm entry
 1.4 12-Dec-2016  wiz branches: 1.4.2;
New sentence, new line.
Sort SEE ALSO.
 1.3 10-Dec-2016  mlelstv Add d_label and add a few words to minphys and strategy.

Update disk man page for other users of the disk driver switch and
add reference to dksubr(9).
 1.2 28-Nov-2016  wiz New sentence, new line.
Use more/better formatting.
Fix a typo.
 1.1 28-Nov-2016  mlelstv Provide a man page for the disk driver subroutines (dksubr).
 1.4.2.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.4.2.1 12-Dec-2016  pgoyette file dksubr.9 was added on branch pgoyette-localcount on 2017-01-07 08:56:08 +0000
 1.6.4.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.15 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.14 25-Jan-2010  jruoho Do not list complete prototypes in the sections describing the functions.
 1.13 04-May-2009  wiz Prepare for HTML output.
 1.12 05-Dec-2007  ad branches: 1.12.14;
IPL_BIO -> IPL_VM
 1.11 14-Jul-2007  ad branches: 1.11.4;
- kcont was removed.
- Replace some references to tsleep.
 1.10 24-Dec-2005  perry Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.9 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.8 15-Mar-2003  wiz Use "its" instead of "it's" where appropriate.
From Soren Jacobsen in PR 20730.
 1.7 05-Feb-2003  briggs Update example to match current code.
 1.6 14-Oct-2002  wiz New sentence, new line.
 1.5 04-Aug-2002  thorpej Fix a typo.
 1.4 04-Aug-2002  thorpej Document "xor5", "xor6", "xor7", and "xor8".
 1.3 02-Aug-2002  wiz ispell. Sort SEE ALSO. Mark up NULL. Some other minor changes.
 1.2 02-Aug-2002  thorpej Document "xor2", "xor3", and "xor4".
 1.1 02-Aug-2002  thorpej Manual page for hardware-assisted data mover interface.
 1.11.4.1 09-Jan-2008  matt sync with HEAD
 1.12.14.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.7 17-Oct-2017  pgoyette Typo: s/processes/process's/ for possession
 1.6 19-May-2017  abhinav Remove reference to suser(9), its man page was removed quite long back.
 1.5 17-Sep-2013  wiz Sort sections: consistently put CODE REFERENCES directly before SEE ALSO.
 1.4 30-Apr-2008  martin branches: 1.4.22; 1.4.28;
Convert TNF licenses to new 2 clause variant
 1.3 04-Oct-2004  rumble branches: 1.3.26; 1.3.28;
'..is is valid to..' -> '..it is valid to..'
 1.2 28-Sep-2003  wiz Use more macros, fix a typo, drop trailing spaces, misc other fixes.
 1.1 28-Sep-2003  dsl Add do_setres[u,g}id
 1.3.28.1 18-May-2008  yamt sync with head.
 1.3.26.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.28.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.22.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.9 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.8 31-May-2008  enami No comma is necessary for the last .Nm entry.
 1.7 30-Apr-2008  martin branches: 1.7.2;
Convert TNF licenses to new 2 clause variant
 1.6 20-Dec-2005  rpaulo branches: 1.6.20; 1.6.22;
Adapt man pages to ktrace-lwp.
 1.5 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.4 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.3 20-Oct-2002  wiz New sentence, new line; grammar fixes; use more markup.
 1.2 20-Oct-2002  wiz Drop trailing whitespace.
 1.1 20-Oct-2002  gmcgarry More kernel documentation.
 1.6.22.2 04-Jun-2008  yamt sync with head
 1.6.22.1 18-May-2008  yamt sync with head.
 1.6.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.7.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.6 05-Apr-2010  joerg branches: 1.6.2;
Drop incorrect ,
 1.5 05-Apr-2010  joerg Drop redundant macros.
 1.4 11-Feb-2010  dyoung Mention that dopowerhooks(9) is deprecated. Suggest to use
pmf_system_suspend(9), instead.
 1.3 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.2 06-Aug-2000  augustss branches: 1.2.36; 1.2.38;
Update documentation about order of hooks.
 1.1 06-Dec-1999  augustss branches: 1.1.2;
Document powerhook functions.
 1.1.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.2.38.1 18-May-2008  yamt sync with head.
 1.2.36.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.2.2 05-Apr-2010  joerg Drop incorrect ,
 1.6.2.1 05-Apr-2010  joerg file dopowerhooks.9 was added on branch uebayasi-xip on 2010-04-05 19:31:30 +0000
 1.13 07-Sep-2024  rillig man: use https URLs for www.NetBSD.org
 1.12 05-Apr-2010  joerg branches: 1.12.2; 1.12.60;
Drop redundant macros. Drop incorrect ,
 1.11 11-Feb-2010  dyoung Mention that doshutdownhooks(9) is deprecated. Suggest to use
pmf_system_shutdown(9), instead.
 1.10 14-Feb-2003  grant The correct capitalisation of 'NetBSD.org' is (you
guessed it) 'NetBSD.org'.

some mdoc fixes.
 1.9 14-Oct-2002  wiz New sentence, new line.
 1.8 31-Jul-2002  soren boot(9) is now cpu_reboot(9).
Adresses part of PR kern/4901.
 1.7 04-Sep-2001  wiz Boring whitespace fixes.
 1.6 29-Apr-2001  jhawk Remove reference to nonexistant boot(9). ADdresses PR
kern/4901.
 1.5 14-Jun-2000  cgd sweep of my licenses (userland files w/o only my copyright) for
consistency. (no functional changes)
 1.4 14-Jun-2000  cgd fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well. No functional changes.
 1.3 06-Apr-1999  pk branches: 1.3.6;
1, 2, 3 and.. 4!
 1.2 16-Mar-1999  garbled branches: 1.2.2;
More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.1 25-Nov-1995  perry Added first section 9 man pages -- initial pages and Makefile from cgd
Section 9 man pages document the internals of the kernel.
 1.2.2.1 07-Apr-1999  pk Pull up from trunk: copyright text warts.
 1.3.6.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.12.60.1 02-Aug-2025  perseant Sync with HEAD
 1.12.2.2 05-Apr-2010  joerg Drop redundant macros. Drop incorrect ,
 1.12.2.1 05-Apr-2010  joerg file doshutdownhooks.9 was added on branch uebayasi-xip on 2010-04-05 19:32:56 +0000
 1.34 11-Feb-2022  riastradh driver(9): Correct paragraph about the driver activate function.
 1.33 11-Feb-2022  riastradh driver(9): Delete outdated info about softc and struct device.
 1.32 17-Nov-2017  wiz Remove superfluous Pp. Fix xref.
 1.31 16-Nov-2017  riastradh Use device_private, not cast, to get at softc.

Someone^TM should turn this wall of prose into a nice itemized list
to make it clearer.
 1.30 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.29 30-Apr-2017  pgoyette Add a cross-ref to devsw(9)
 1.28 19-Jul-2016  maya branches: 1.28.4;
Don't reference older CFATTACH_DECL
 1.27 23-Jul-2011  jym branches: 1.27.24;
And struct cfdata => cfdata_t too...
 1.26 23-Jul-2011  jym struct device => device_t. Bump date.
 1.25 05-Jan-2011  jmcneill cdevsw/bdevsw d_type is now d_flag
 1.24 31-Jan-2010  wiz Bump date for SEE ALSO change.
 1.23 31-Jan-2010  jruoho Do not advertise deprecated APIs in an important introductory manual page.
 1.22 18-May-2009  wiz Avoid Po/Pc when not needed (i.e. most of the time, always here).
Mark up some defined values with .Dv.
 1.21 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.20 14-Oct-2007  plunky branches: 1.20.6; 1.20.8;
make it clear that no deactivate call will be made if the activate returns
an error.
 1.19 30-Jul-2007  alc branches: 1.19.2; 1.19.4;
kills a few `caddr_t' occurences still present in manpage
 1.18 13-Oct-2006  wiz Improve HTML output.
 1.17 09-Oct-2006  uebayasi No variable name in function argument declaration.
 1.16 08-Oct-2006  elad PR/31140: Tetsuya Isaki: driver(9) does not describe about kqfilter
 1.15 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.14 20-Jun-2005  peter Change all .Xr config 8 to .Xr config 1, following the recent move of
config from usr.sbin -> usr.bin.

Reviewed by wiz.
 1.13 16-May-2004  wiz Fix typo.
 1.12 16-Apr-2003  wiz branches: 1.12.2;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.11 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.10 07-Jan-2003  jonb describe the CFATTACH decl macro, rather than defining struct cfattach
 1.9 14-Oct-2002  wiz New sentence, new line.
 1.8 14-Sep-2002  jonb Fix typos that made errors in my first driver.
"All the other drivers did it this way..."
 1.7 06-Sep-2002  wiz Bump date.
For single words, prefer ``.Dq foo'' over ``.Do\nfoo\n.Dc''.
Punctuation nits.
 1.6 06-Sep-2002  gehenna Add the description of device switch and naming convention.
 1.5 02-Apr-2002  heinz wording
 1.4 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.3 26-Dec-2001  wiz Fix SEE ALSO section.
 1.2 04-Sep-2001  wiz Boring whitespace fixes.
 1.1 01-Jul-2001  gmcgarry Add some missing documentation.
 1.12.2.1 17-May-2004  tron Pull up revision 1.13 (requested by wiz in ticket #344):
Fix typo.
 1.19.4.2 30-Jul-2007  alc kills a few `caddr_t' occurences still present in manpage
 1.19.4.1 30-Jul-2007  alc file driver.9 was added on branch matt-mips64 on 2007-07-30 22:48:47 +0000
 1.19.2.1 06-Nov-2007  matt sync with HEAD
 1.20.8.1 18-May-2008  yamt sync with head.
 1.20.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.27.24.1 26-Jul-2016  pgoyette Sync with HEAD
 1.28.4.1 02-May-2017  pgoyette Sync with HEAD - tag prg-localcount2-base1
 1.9 04-Jan-2014  wiz Sort sections.
 1.8 25-Jul-2013  wiz Remove superfluous Pp.
 1.7 25-Jul-2013  tcort edid.9: fixes for example code

- 'struct edid_info' in edidvar.h uses 'struct videomode' so
videomode.h needs to be included too.
- edid_print takes a pointer to 'struct edid_info' so add the & operator.

OK by wiz@
 1.6 20-Jul-2013  wiz Use Mt for email addresses.
 1.5 06-Mar-2013  wiz branches: 1.5.4;
New sentence, new line.
 1.4 02-Dec-2010  wiz branches: 1.4.6; 1.4.12;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.3 23-Jan-2010  wiz Remove xref to itself from SEE ALSO.
 1.2 23-Dec-2006  wiz Drop trailing whitespace.
 1.1 11-May-2006  gdamore Add preliminary documentation for DDC and EDID subsystem.
 1.4.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.12.1 23-Jun-2013  tls resync from head
 1.4.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.5.4.1 23-Jul-2013  riastradh sync with HEAD
 1.6 29-Jun-2021  dholland Add containment for the cloning devices hack in vn_open.

Cloning devices (and also things like /dev/stderr) work by allocating
a struct file, stuffing it in the file table (which is a layer
violation), stuffing the file descriptor number for it in a magic
field of struct lwp (which is gross), and then "failing" with one of
two magic errnos, EDUPFD or EMOVEFD.

Before this commit, all callers of vn_open in the kernel (there are
quite a few) were expected to check for these errors and handle the
situation. Needless to say, none of them except for open() itself did,
resulting in internal negative errnos being returned to userspace.

This hack is fairly deeply rooted and cannot be eliminated all at
once. This commit adds logic to handle the magic errnos inside
vn_open; now on success vn_open returns either a vnode or an integer
file descriptor, along with a flag that says whether the underlying
code requested EDUPFD or EMOVEFD. Callers not prepared to cope with
file descriptors can pass NULL for the extra return values, in which
case if a file descriptor would be produced vn_open fails with
EOPNOTSUPP.

Since I'm rearranging vn_open's signature anyway, stop exposing struct
nameidata. Instead, take three arguments: an optional vnode to use as
the starting point (like openat()), the path, and additional namei
flags to use, restricted to NOCHROOT and TRYEMULROOT. (Other namei
behavior, e.g. NOFOLLOW, can be requested via the open flags.)

This change requires a kernel bump. Ride the one an hour ago.
(That was supposed to be coordinated; did not intend to let an hour
slip by. My fault.)
 1.5 22-Mar-2010  joerg branches: 1.5.2;
Use .In instead of .Aq Pa for header files.
 1.4 05-Dec-2004  atatat wiz warning: A .Bl directive has no matching .El (fixed)
 1.3 03-Dec-2004  wiz New sentence, new line, drop trailing whitespace.
 1.2 03-Dec-2004  christos Explain the remaining kernel error codes.
 1.1 03-Dec-2004  atatat Add a man page that describes the kernel-only errno values that never
get passed back up to userland.
 1.5.2.2 22-Mar-2010  joerg Use .In instead of .Aq Pa for header files.
 1.5.2.1 22-Mar-2010  joerg file errno.9 was added on branch uebayasi-xip on 2010-03-22 18:58:34 +0000
 1.28 20-Jan-2020  thorpej Remove FDDI support.
 1.27 28-Dec-2016  wiz branches: 1.27.14;
Use more macros.
 1.26 28-Dec-2016  ozaki-r Use ether_ifattach in carp_clone_create instead of C&P code

carp_clone_destroy calls ether_ifdetach so not calling ether_ifattach is
inconsistent. If we add something pair of initialization and destruction
to ether_ifattach and ether_ifdetach (e.g., mutex_init/mutex_destroy),
ether_ifdetach of carp_clone_destroy won't work. So use ether_ifattach.

In order to do so, make ether_ifattach accept the 2nd argument (lla) as
NULL to allow carp to initialize its link level address by itself.
 1.25 17-Sep-2013  wiz branches: 1.25.8;
Sort sections: consistently put CODE REFERENCES directly before SEE ALSO.
 1.24 02-Dec-2010  wiz branches: 1.24.6; 1.24.12;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.23 14-May-2010  joerg Reorder sections to canonical order.
 1.22 22-Mar-2010  joerg branches: 1.22.2;
Use .In instead of .Aq Pa for header files.
 1.21 25-Jan-2010  jruoho Improve wording.
 1.20 25-Jan-2010  jruoho Add the names of the parameters to the section describing the functions.
 1.19 09-Mar-2009  joerg .br -> .Pp, the former is not mdoc markup
 1.18 30-Apr-2008  martin branches: 1.18.6;
Convert TNF licenses to new 2 clause variant
 1.17 19-Sep-2007  dyoung branches: 1.17.6; 1.17.8;
Update documentation to match source.
 1.16 26-Dec-2005  perry branches: 1.16.12;
u_intN_t -> uintN_t
 1.15 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.14 14-Oct-2002  wiz New sentence, new line.
 1.13 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.12 04-Sep-2001  wiz Boring whitespace fixes.
 1.11 07-Nov-2000  lukem fix up various .Nm abuses:
- keep the case consistent between the actual name and what's referenced.
e.g, if it's `foo', don't use '.Nm Foo' at the start of a sentence.
- remove unnecessary `.Nm foo' after the first occurrence (except for
using `.Nm ""' if there's stuff following, or for the 2nd and so on
occurrences in a SYNOPSIS
- use Sx, Ic, Li, Em, Sq, and Xr as appropriate
 1.10 16-Mar-1999  garbled More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.9 06-Mar-1999  mycroft Fix formatting errors (bad sentence breaks).
 1.8 16-Feb-1999  is Fix Copyright dates
 1.7 16-Feb-1999  is Assign my files to The NetBSD Foundation, Inc.
 1.6 03-Sep-1998  msaitoh Eliminate extra comma in SEE ALSO section
 1.5 27-Nov-1997  mikel fix capitalization as noted by Chris Demetriou in PR 4377
while I'm here, fix numerous spelling, grammar, and -mdoc macro usage bugs
 1.4 24-Nov-1997  lukem fix .Nx usage (use 1.0 instead of 0.9a, etc), and other minor cleanups
 1.3 12-Nov-1997  mrg add missing .Nm calls and MLINKS. from spz@serpens.swb.de
 1.2 25-May-1997  is branches: 1.2.2;
Add CODE REFERENCES sections. While here, move the fddi_{add,del}multi
description right below the ether_{add,del}multi description.
 1.1 25-May-1997  is Documentation of Ethernet and FDDI driver support functions and macros.
 1.2.2.2 27-Nov-1997  mellon Pull rev 1.4 and 1.5 up from trunk (mikel)
 1.2.2.1 12-Nov-1997  mrg pull up from trunk: add missing .Nm calls and MLINKS. from spz@serpens.swb.de
 1.16.12.1 06-Nov-2007  matt sync with HEAD
 1.17.8.1 18-May-2008  yamt sync with head.
 1.17.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.18.6.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.22.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.22.2.1 22-Mar-2010  uebayasi file ethersubr.9 was added on branch uebayasi-xip on 2010-08-17 06:40:05 +0000
 1.24.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.24.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.25.8.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.27.14.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.23 07-Sep-2024  rillig man: use https URLs for www.NetBSD.org
 1.22 03-Jul-2017  wiz branches: 1.22.18;
Remove workaround for ancient HTML generation code.
 1.21 14-Jan-2011  dyoung In the EXAMPLES section, use device_t and accessors instead of struct
device.
 1.20 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.19 07-Aug-2010  jruoho Don't use complete prototypes in FUNCTIONS. But use standard section headers.
 1.18 08-Jun-2010  jruoho Three small markup improvements.
 1.17 11-Feb-2008  dyoung branches: 1.17.18;
Suggest #include <sys/evcnt.h> instead of <sys/device.h>, since
the former is sufficient, and the latter pulls in oodles of
unnecessary stuff.
 1.16 20-Dec-2007  uebayasi Use TAB in .Bd -literal.
 1.15 17-Sep-2006  wiz branches: 1.15.8;
"is be" -> "is"
 1.14 26-Dec-2005  perry u_intN_t -> uintN_t
 1.13 11-Jan-2005  simonb Document the EVCNT_TYPE_TRAP event type.
 1.12 05-Jun-2004  rumble typo: "The value NULL is be used" -> "The value NULL is used"
 1.11 18-Feb-2004  enami The source file is changed.
 1.10 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.9 14-Feb-2003  grant The correct capitalisation of 'NetBSD.org' is (you
guessed it) 'NetBSD.org'.

some mdoc fixes.
 1.8 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.7 14-Oct-2002  wiz New sentence, new line.
 1.6 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.5 26-Dec-2001  wiz Sort sections.
 1.4 10-Sep-2001  wiz Use standard section headers.
 1.3 06-May-2001  wiz Change xref for vmstat(8) to vmstat(1).
Whitespace, punctuation and spelling fixes while I'm here.
 1.2 13-Jun-2000  cgd branches: 1.2.4;
Replace my personal attribution string ("This product includes software
developed by Christopher G. Demetriou for the NetBSD Project.") with
a generic NetBSD one ("This product includes software developed for the
NetBSD Project. See http://www.netbsd.org/ for information about NetBSD.")
so that this same set of terms can be used by others if they so desire.
(Eventually i'll be converting more/all of my code.)
 1.1 04-Jun-2000  cgd Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
 1.2.4.2 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.2.4.1 13-Jun-2000  minoura file evcnt.9 was added on branch minoura-xpg4dl on 2000-06-22 16:17:46 +0000
 1.15.8.2 23-Mar-2008  matt sync with HEAD
 1.15.8.1 09-Jan-2008  matt sync with HEAD
 1.17.18.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.22.18.1 02-Aug-2025  perseant Sync with HEAD
 1.4 09-Mar-2009  joerg Fix preamble to match order set out by mdoc(7). Discussed with wiz.
 1.3 08-Feb-2007  dillo branches: 1.3.20;
Fix typo.
 1.2 02-Jan-2005  wiz Use Dq macro. s/null/nul/ in one case. Fix Xrefs.
 1.1 02-Jan-2005  thorpej Document file system extended attribute functions.
 1.3.20.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.37 28-Aug-2017  skrll typos :S
 1.36 28-Aug-2017  skrll Bump date
 1.35 28-Aug-2017  skrll Note EX_EARLY
 1.34 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.33 06-Apr-2017  abhinav Add extent_alloc1 and extent_alloc_subregion1 to the NAME section.
 1.32 14-Jul-2012  rkujawa branches: 1.32.14; 1.32.18;
s/Jukly/July/
 1.31 14-Jul-2012  wiz Bump date for previous.
 1.30 14-Jul-2012  rkujawa Adapt extent(9) page to not so recent changes in extent code. Argument
mtype to extent_create() was removed.
 1.29 02-Dec-2010  wiz branches: 1.29.6;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.28 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.27 07-Mar-2007  dogcow branches: 1.27.10; 1.27.12;
running in emulated wizd mode, convert caddr_t to void *.
 1.26 30-Jun-2003  wiz Simplify macro usage.
 1.25 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.24 14-Feb-2003  grant The correct capitalisation of 'NetBSD.org' is (you
guessed it) 'NetBSD.org'.

some mdoc fixes.
 1.23 14-Oct-2002  wiz New sentence, new line.
 1.22 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.21 26-Dec-2001  wiz Sort sections.
 1.20 10-Sep-2001  wiz Use standard section headers.
 1.19 04-Sep-2001  wiz Boring whitespace fixes.
 1.18 01-Jul-2001  gmcgarry Refer to locks by their correct names as described lock(9).
 1.17 21-Jun-2001  wiz Fix typos, punctuation and whitespace.
 1.16 14-Jun-2000  cgd fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well. No functional changes.
 1.15 16-Mar-1999  garbled branches: 1.15.8;
More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.14 10-Sep-1998  pk oops, roff parameter overflow.
 1.13 10-Sep-1998  pk Document the "skew" extensions.
 1.12 03-Sep-1998  msaitoh Eliminate extra comma in SEE ALSO section
 1.11 02-Sep-1998  jeremy Changed references to filesystem paths to use the mdoc filesystem path
macro (.Pa).
 1.10 06-Jun-1998  thorpej Add a section about locking within the extent manager.
 1.9 06-Feb-1998  perry macroize BSD, NetBSD, FreeBSD and misc cleanup
 1.8 24-Nov-1997  lukem fix .Nx usage (use 1.0 instead of 0.9a, etc), and other minor cleanups
 1.7 11-Nov-1997  mrg fix oversight in previous.
 1.6 11-Nov-1997  mrg add missing .Nm sections
 1.5 08-Oct-1997  jtc branches: 1.5.2;
Fix tipo inherited from old version of TNF copyright form.
s/REGENTS/FOUNDATION/.
 1.4 18-Mar-1997  perry fix typos per pr-3349 submitted by SAITOH Masanobu
 1.3 16-Mar-1997  is Fix .Nx call.
 1.2 17-Oct-1996  thorpej Sync with the extent map implementation; just document the new
flags.
 1.1 24-Sep-1996  ghudson Describes the extent manager introduced in NetBSD 1.2A.
 1.5.2.1 11-Nov-1997  mrg pull up from trunk: add missing .Nm sections
 1.15.8.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.27.12.1 18-May-2008  yamt sync with head.
 1.27.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.29.6.1 30-Oct-2012  yamt sync with head
 1.32.18.1 21-Apr-2017  bouyer Sync with HEAD
 1.32.14.1 26-Apr-2017  pgoyette Sync with HEAD
 1.17 06-Apr-2019  thorpej Overhaul the API used to fetch and store individual memory cells in
userspace. The old fetch(9) and store(9) APIs (fubyte(), fuword(),
subyte(), suword(), etc.) are retired and replaced with new ufetch(9)
and ustore(9) APIs that can return proper error codes, etc. and are
implemented consistently across all platforms. The interrupt-safe
variants are no longer supported (and several of the existing attempts
at fuswintr(), etc. were buggy and not actually interrupt-safe).

Also augmement the ucas(9) API, making it consistently available on
all plaforms, supporting uniprocessor and multiprocessor systems, even
those that do not have CAS or LL/SC primitives.

Welcome to NetBSD 8.99.37.
 1.16 16-Apr-2003  wiz branches: 1.16.100;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.15 14-Oct-2002  wiz New sentence, new line.
 1.14 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.13 26-Dec-2001  wiz Sort sections.
 1.12 16-May-2001  perry systm.h says these take const void * parameters
 1.11 16-May-2001  perry fuword returns a long, according to systm.h
 1.10 16-Mar-1999  garbled More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.9 03-Sep-1998  msaitoh Eliminate extra comma in SEE ALSO section
 1.8 06-Jul-1998  msaitoh fix typo.
 1.7 08-Jun-1998  lukem remove unnecessary paragraph separator
 1.6 22-Apr-1998  ross Add David Brownlee's new intro pages, with editing. (PR #534[23])
Also, while here, expand apparently incorrectly .Dd month abbreviations.
(I thought about doing this in tmac/doc-common...heh...that would have
allowed a possible reverse map back to abbreviations.)
 1.5 11-Nov-1997  mrg add missing .Nm sections
 1.4 17-Oct-1996  gwr branches: 1.4.4;
Clarify the description of return values, and add a BUGS section
describing the ambiguity of -1 error return from fuword().
 1.3 19-Jun-1996  pk `.Pa' => `.Fa'
 1.2 09-Jan-1996  perry Fix typo: failire -> failure
 1.1 09-Jan-1996  thorpej Add fetch(9) and store(9), which describe the {fu,su}{,i}{byte,word}
functions. Cross-reference with each-other and copy(9).
 1.4.4.1 11-Nov-1997  mrg pull up from trunk: add missing .Nm sections
 1.16.100.1 10-Jun-2019  christos Sync with HEAD
 1.19 23-Apr-2017  wiz Use more markup.
 1.18 23-Apr-2017  pgoyette And actually remove the double-negative that triggered this series of
minor commits! Thanks, Abhinav, for pointing out my typo!
 1.17 23-Apr-2017  pgoyette Reword further to make it clearer that the two flag bits are separately
settable.
 1.16 23-Apr-2017  abhinav Fix a sentence (remove double negation)
Fix mandoc lint warning (remove Pp before Bd)
 1.15 23-Apr-2017  abhinav Fix typo.
 1.14 02-Dec-2010  wiz branches: 1.14.28;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.13 17-May-2009  elad Undocument FILE_LOCK(), FILE_UNLOCK() -- heh.
 1.12 10-May-2009  elad Stub documentation for FILE_LOCK(), FILE_UNLOCK().
 1.11 30-Apr-2008  martin branches: 1.11.6;
Convert TNF licenses to new 2 clause variant
 1.10 07-Mar-2007  dogcow branches: 1.10.10; 1.10.12;
running in emulated wizd mode, convert caddr_t to void *.
 1.9 04-Oct-2006  pooka ucred -> kauth sweep
 1.8 29-Jan-2006  rpaulo More ktrace-lwp that I got wrong in the first try.

Thanks to Gregory McGarry for pointing this out.
 1.7 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.6 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.5 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.4 20-Oct-2002  gmcgarry Some more xrefs.
 1.3 20-Oct-2002  wiz New sentence, new line; grammar fixes; use more markup.
 1.2 20-Oct-2002  wiz Drop trailing whitespace.
 1.1 20-Oct-2002  gmcgarry More kernel documentation.
 1.10.12.1 18-May-2008  yamt sync with head.
 1.10.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.11.6.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.14.28.1 26-Apr-2017  pgoyette Sync with HEAD
 1.30 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.29 01-Dec-2016  pgoyette orrect the text for fileassoc_table_run() - it takes two parameters.
 1.28 08-Nov-2016  pgoyette Merge changes from David H. Gutteridge in PR misc/51611

Thanks!
 1.27 18-Mar-2014  riastradh branches: 1.27.4; 1.27.8; 1.27.10;
Merge riastradh-drm2 to HEAD.
 1.26 20-Jul-2013  wiz Use Mt for email addresses.
 1.25 27-Jan-2010  wiz branches: 1.25.8; 1.25.14; 1.25.18;
Bump date for reorg.
 1.24 26-Jan-2010  jruoho Capitalize one more title. Use a complete sentence in CODE REFERENCES.
 1.23 26-Jan-2010  jruoho Move the complete prototypes to the SYNOPSIS. Also capitalize the titles.
 1.22 14-Sep-2008  itohy Escape "\" as "\e" in the example.
Fix formatting problems reported by Stathis Kamperis on PR bin/39535.
 1.21 28-May-2008  snj Fix a spelling error.
 1.20 15-May-2007  elad branches: 1.20.10; 1.20.12; 1.20.14;
Some Veriexec stuff that's been rotting in my tree for months.

Bug fixes:
- Fix crash reported by Scott Ellis on current-users@.

- Fix race conditions in enforcing the Veriexec rename and remove
policies. These are NOT security issues.

- Fix memory leak in rename handling when overwriting a monitored
file.

- Fix table deletion logic.

- Don't prevent query requests if not in learning mode.


KPI updates:
- fileassoc_table_run() now takes a cookie to pass to the callback.

- veriexec_table_add() was removed, it is now done internally. As a
result, there's no longer a need for VERIEXEC_TABLESIZE.

- veriexec_report() was removed, it is now internal.

- Perform sanity checks on the entry type, and enforce default type
in veriexec_file_add() rather than in veriexecctl.

- Add veriexec_flush(), used to delete all Veriexec tables, and
veriexec_dump(), used to fill an array with all Veriexec entries.


New features:
- Add a '-k' flag to veriexecctl, to keep the filenames in the kernel
database. This allows Veriexec to produce slightly more accurate
logs under certain circumstances. In the future, this can be either
replaced by vnode->pathname translation, or combined with it.

- Add a VERIEXEC_DUMP ioctl, to dump the entire Veriexec database.
This can be used to recover a database if the file was lost.
Example usage:

# veriexecctl dump > /etc/signatures

Note that only entries with the filename kept (that is, were loaded
with the '-k' flag) will be dumped.

Idea from Brett Lymn.

- Add a VERIEXEC_FLUSH ioctl, to delete all Veriexec entries. Sample
usage:

# veriexecctl flush

- Add a 'veriexec_flags' rc(8) variable, and make its default have
the '-k' flag. On systems using the default signatures file
(generaetd from running 'veriexecgen' with no arguments), this will
use additional 32kb of kernel memory on average.

- Add a '-e' flag to veriexecctl, to evaluate the fingerprint during
load. This is done automatically for files marked as 'untrusted'.


Misc. stuff:
- The code for veriexecctl was massively simplified as a result of
eliminating the need for VERIEXEC_TABLESIZE, and now uses a single
pass of the signatures file, making the loading somewhat faster.

- Lots of minor fixes found using the (still under development)
Veriexec regression testsuite.

- Some of the messages Veriexec prints were improved.

- Various documentation fixes.


All relevant man-pages were updated to reflect the above changes.

Binary compatibility with existing veriexecctl binaries is maintained.
 1.19 06-Feb-2007  elad PR/35253: YAMAMOTO Takashi: fileassoc hash size problem

fileassoc_table_add() was removed from the KPI and made internal. From now
fileassoc(9) will manage the optimal table size internally.

Input from and okay yamt@.
 1.18 09-Jan-2007  elad Remove advertising clause from all of my stuff.
 1.17 23-Dec-2006  wiz Use HTML escapes.
 1.16 23-Dec-2006  yamt remove the fileassoc "tabledata" functionality.
 1.15 11-Dec-2006  yamt update an example.
 1.14 11-Dec-2006  yamt FILEASSOC_NHOOKS has gone.
 1.13 11-Dec-2006  yamt it's fileassoc, not verifiedexec.
 1.12 11-Dec-2006  yamt sync with the implementation.
 1.11 26-Oct-2006  wiz Bump date for previous.
 1.10 26-Oct-2006  drochner minor fixes and cleanup, reviewed by elad
 1.9 06-Sep-2006  blymn * Remove "hinted" interface
* Modify fileassoc internals to use fhandle_t instead of fileid
 1.8 20-Aug-2006  blymn Add functions to the fileassoc interface to allow a "hint" to be provided
instead of performing an implicit VOP_GETATTR() when adding/looking up
fileassoc entries.
 1.7 11-Aug-2006  christos Pretending to be Elad's keyboard:

fileassoc.diff adds a fileassoc_table_run() routine that allows you to
pass a callback to be called with every entry on a given mount.

veriexec.diff adds some raw device access policies: if raw disk is
opened at strict level 1, all fingerprints on this disk will be
invalidated as a safety measure. level 2 will not allow opening disk
for raw writing if we monitor it, and prevent raw writes to memory.
level 3 will not allow opening any disk for raw writing.

both update all relevant documentation.

veriexec concept is okay blymn@.
 1.6 20-Jul-2006  wiz branches: 1.6.2;
Use standard section headers. Make HTML-ready.
 1.5 20-Jul-2006  elad add caveats section mentioning that kpi routines can result in a call to
VOP_GETATTR() and note this should be considered when using the interface.
also say this limitation is planned on being removed.
 1.4 16-Jul-2006  elad expose less api; prompted by yamt@.
 1.3 15-Jul-2006  elad sync examples with reality.. oops.
 1.2 14-Jul-2006  wiz Use Dv for defined values. Update history, this KPI appeared in 4.0.
Some other minor fixes.
 1.1 14-Jul-2006  elad okay, since there was no way to divide this to two commits, here it goes..

introduce fileassoc(9), a kernel interface for associating meta-data with
files using in-kernel memory. this is very similar to what we had in
veriexec till now, only abstracted so it can be used more easily by more
consumers.

this also prompted the redesign of the interface, making it work on vnodes
and mounts and not directly on devices and inodes. internally, we still
use file-id but that's gonna change soon... the interface will remain
consistent.

as a result, veriexec went under some heavy changes to conform to the new
interface. since we no longer use device numbers to identify file-systems,
the veriexec sysctl stuff changed too: kern.veriexec.count.dev_N is now
kern.veriexec.tableN.* where 'N' is NOT the device number but rather a
way to distinguish several mounts.

also worth noting is the plugging of unmount/delete operations
wrt/fileassoc and veriexec.

tons of input from yamt@, wrstuden@, martin@, and christos@.
 1.6.2.1 14-Aug-2006  tron Pull up following revision(s) (requested by elad in ticket #15):
sys/miscfs/specfs/spec_vnops.c: revision 1.88
share/man/man9/fileassoc.9: revision 1.7
sys/kern/kern_verifiedexec.c: revision 1.66
sys/sys/verified_exec.h: revision 1.39
sys/sys/fileassoc.h: revision 1.3
lib/libc/gen/sysctl.3: revision 1.178
share/man/man9/veriexec.9: revision 1.4
sys/kern/kern_fileassoc.c: revision 1.6
Pretending to be Elad's keyboard:
fileassoc.diff adds a fileassoc_table_run() routine that allows you to
pass a callback to be called with every entry on a given mount.
veriexec.diff adds some raw device access policies: if raw disk is
opened at strict level 1, all fingerprints on this disk will be
invalidated as a safety measure. level 2 will not allow opening disk
for raw writing if we monitor it, and prevent raw writes to memory.
level 3 will not allow opening any disk for raw writing.
both update all relevant documentation.
veriexec concept is okay blymn@.
 1.20.14.2 24-Sep-2008  wrstuden Merge in changes between wrstuden-revivesa-base-2 and
wrstuden-revivesa-base-3.
 1.20.14.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.20.12.1 04-Jun-2008  yamt sync with head
 1.20.10.2 05-Oct-2008  mjf Sync with HEAD.
 1.20.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.25.18.1 23-Jul-2013  riastradh sync with HEAD
 1.25.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.25.8.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.27.10.1 18-Jan-2017  skrll Sync with netbsd-5
 1.27.8.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.27.4.1 18-Dec-2016  snj Pull up following revision(s) (requested by riastradh in ticket #1314):
share/man/man9/fileassoc.9: revision 1.28
Merge changes from David H. Gutteridge in PR misc/51611
Thanks!
 1.18 08-Apr-2019  wiz Remove superfluous comma. Try improving a sentence. Remove duplicate sentence.
 1.17 08-Apr-2019  maya Update to reference the newer (committed long ago) API.

With comments from Rocky Hotas on netbsd-docs, thanks.
 1.16 02-Dec-2010  wiz branches: 1.16.46;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.15 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.14 25-Jul-2006  riz branches: 1.14.18; 1.14.20;
Update falloc() to match current reality.
 1.13 07-Mar-2006  pooka add fdclone to NAME also
 1.12 07-Mar-2006  pooka fdavail is a goner
 1.11 24-Feb-2006  wiz Serial comma, and remove leading space.
 1.10 24-Feb-2006  pooka document fdclone
 1.9 29-Jan-2006  kleink Make this consistent with <sys/filedesc.h>; fixes PR kern/32506 from
Ola Eriksson.
 1.8 29-Jan-2006  rpaulo Gah, I got them wrong again. Thanks Klaus.
 1.7 29-Jan-2006  rpaulo More ktrace-lwp that I got wrong in the first try.

Thanks to Gregory McGarry for pointing this out.
 1.6 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.5 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.4 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.3 20-Oct-2002  wiz New sentence, new line; grammar fixes; use more markup.
 1.2 20-Oct-2002  wiz Drop trailing whitespace.
 1.1 20-Oct-2002  gmcgarry More kernel documentation.
 1.14.20.1 18-May-2008  yamt sync with head.
 1.14.18.1 02-Jun-2008  mjf Sync with HEAD.
 1.16.46.1 10-Jun-2019  christos Sync with HEAD
 1.10 16-Mar-2018  sevan Add the default locations firmload is set to search for firmaware files.
 1.9 28-Apr-2015  prlw1 branches: 1.9.14;
Fix typos
 1.8 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.7 20-Jul-2013  wiz Use Mt for email addresses.
 1.6 24-Jan-2010  jruoho branches: 1.6.8; 1.6.14; 1.6.18;
Provide a FUNCTIONS section and remove the types from the functions therein.
 1.5 24-Jun-2009  dholland Fix typo, noticed in passing by wiz
 1.4 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.3 21-Jan-2006  wiz branches: 1.3.20; 1.3.22;
Use .Aq instead of <>.
 1.2 17-Jan-2006  rpaulo Add missing authors and history sections.
Ok'ed by Jason Thorpe.
 1.1 17-Jan-2006  thorpej Add a firmload(9) manual page.
 1.3.22.1 18-May-2008  yamt sync with head.
 1.3.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.18.1 23-Jul-2013  riastradh sync with HEAD
 1.6.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.8.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.9.14.1 22-Mar-2018  pgoyette Synch with HEAD, resolve conflicts
 1.5 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.4 20-Jul-2013  wiz Use Mt for email addresses.
 1.3 30-Mar-2011  jruoho branches: 1.3.4; 1.3.10; 1.3.14;
Remove a duplicate word, .Fn for functions, .Vt.
 1.2 27-Feb-2011  wiz branches: 1.2.2;
Add comma in enumeration.
 1.1 26-Feb-2011  ahoka Import the Flash and NAND subsytem code contributed by the University
of Szeged, Hungary.

The commit includes:
- Flash layer, which gives a common API to access flash devices
- NAND controller subsystem for the flash layer
- An example OMAP driver which is used on BeagleBoard or alike ARM boards
 1.2.2.2 05-Mar-2011  bouyer Sync with HEAD
 1.2.2.1 27-Feb-2011  bouyer file flash.9 was added on branch bouyer-quota2 on 2011-03-05 15:09:27 +0000
 1.3.14.1 23-Jul-2013  riastradh sync with HEAD
 1.3.10.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.16 16-Apr-2018  wiz Merge EAGAIN descriptions.
 1.15 16-Apr-2018  kamil Remove the rnewprocp argument from fork1(9)

It's now unused and it can cause use-after-free scenarios as noted by
<Mateusz Guzik>.

Reference: http://mail-index.netbsd.org/tech-kern/2017/09/08/msg022267.html

Sponsored by <The NetBSD Foundation>
 1.14 30-Apr-2008  martin branches: 1.14.62;
Convert TNF licenses to new 2 clause variant
 1.13 04-Jan-2008  mjf branches: 1.13.4; 1.13.6;
Duh, it's 2008 now, not 2007.
 1.12 04-Jan-2008  mjf Rephrase the explanation of when "func" is called.
 1.11 13-Mar-2004  wiz branches: 1.11.24;
Break line differently to tell groff that the sentence does not
end after e.g.
While the previous here obviously did.
Mark up NULL with Dv, and a function name with .Fn.
 1.10 11-Mar-2004  pooka bump date

(oh, and as a side-effect, make description match modern reality)
 1.9 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.8 14-Oct-2002  wiz New sentence, new line.
 1.7 06-Aug-2002  pooka document FORK_CLEANFILES
 1.6 11-Jul-2002  pooka document missing flags

XXX: this man page is still out-of-date
 1.5 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.4 21-Jun-2001  wiz Fix typos, punctuation and whitespace.
 1.3 16-Mar-1999  garbled More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.2 07-Jan-1998  thorpej Oops, list includes in synopsis.
 1.1 07-Jan-1998  thorpej Add a manual page for fork1(), the kernel's internal fork interface.
 1.11.24.1 09-Jan-2008  matt sync with HEAD
 1.13.6.1 18-May-2008  yamt sync with head.
 1.13.4.1 02-Jun-2008  mjf Sync with HEAD.
 1.14.62.1 22-Apr-2018  pgoyette Sync with HEAD
 1.9 12-Mar-2009  joerg Consistently use .Dv for SA_SIGINFO, .Sv doesn't exist.
 1.8 30-Apr-2008  martin branches: 1.8.4; 1.8.6;
Convert TNF licenses to new 2 clause variant
 1.7 29-Jan-2006  rpaulo branches: 1.7.20; 1.7.22;
Update copyright date.
 1.6 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.5 14-Oct-2003  wiz Move siginfo(5) and ucontext(5) to siginfo(2) and ucontext(2) resp.,
and fix references.
Per a discussion on source-changes around Sep 14 2003.
 1.4 22-Sep-2003  wiz Bump date for previous.
 1.3 22-Sep-2003  christos document passing of signo to fownsignal
 1.2 21-Sep-2003  wiz Fix xrefs, and add lots of articles to make it sound better.
 1.1 21-Sep-2003  jdolecek add manpage for fsetown(9), fgetown(9), fownsignal(9)
 1.7.22.1 18-May-2008  yamt sync with head.
 1.7.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.8.6.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.8.4.1 15-Mar-2009  snj Pull up following revision(s) (requested by joerg in ticket #567):
share/man/man9/fsetown.9: revision 1.9
Consistently use .Dv for SA_SIGINFO, .Sv doesn't exist.
 1.29 05-Oct-2018  uwe Minor markup fixes. Add a missing word.
 1.28 05-Oct-2018  wiz Simplify macro usage. No visible change.
 1.27 05-Oct-2018  hannken Bring back three state file system suspension:

NORMAL -> SUSPENDING -> SUSPENDED

and add operation fstrans_start_lazy() that only blocks while SUSPENDED.

Change vndthread() support operation handle_with_rdwr() to bracket
its file system operations by fstrans_start_lazy() and fstrans_done().

PR kern/53624 (dom0 freeze on domU exit)
 1.26 03-Jul-2017  wiz branches: 1.26.4; 1.26.6;
Remove workaround for ancient HTML generation code.
 1.25 04-Jun-2017  hannken Operations fstrans_start() and fstrans_start_nowait() now always
use FSTRANS_SHARED as lock type so remove the lock type argument.

File system state FSTRANS_SUSPENDING is now unused so remove it.

Regen vnode_if files.

Ride 8.99.1 less than a hour ago.
 1.24 29-May-2017  wiz branches: 1.24.2;
Bump date for previous.
 1.23 29-May-2017  riastradh Omit description of fstrans_mount/unmount too.
 1.22 29-May-2017  riastradh No more need to call fstrans_mount: vfs does for us now.
 1.21 18-Mar-2017  riastradh Use `\(em', not `--'.

Refill sentences and tweak wording where appropriate while here.
 1.20 31-Mar-2015  riastradh branches: 1.20.2; 1.20.4;
More details on what may sleep and what won't sleep when.
 1.19 31-Mar-2015  riastradh Nesting shared in lazy is OK. Note nesting never blocks.
 1.18 31-Mar-2015  riastradh Prohibit cross-mount transactions.
 1.17 31-Mar-2015  riastradh Revamp fstrans(9) man page.

- Fix example: fstrans_start never fails and returns void.
- Add fstrans_mount/fstrans_unmount.
- Explain intent, not just mechanism.
- Add internal cross-references and redundant information from
different callers' perspectives.
 1.16 17-Sep-2013  wiz Sort sections: consistently put CODE REFERENCES directly before SEE ALSO.
 1.15 12-Apr-2010  jruoho branches: 1.15.2; 1.15.8; 1.15.14;
Add a FUNCTIONS section.

In addition, small improvements to wording and markup.
 1.14 24-Jun-2009  zafer fix common spelling error.
 1.13 12-Apr-2009  joerg Drop conditionals now that groff can handle the umlaut in the author
name.
 1.12 30-Apr-2008  martin branches: 1.12.6;
Convert TNF licenses to new 2 clause variant
 1.11 02-Dec-2007  hannken branches: 1.11.6; 1.11.8;
Fscow_run(): add a flag "bool data_valid" to note still valid data.
Buffers run through copy-on-write are marked B_COWDONE. This condition
is valid until the buffer has run through bwrite() and gets cleared from
biodone().

Welcome to 4.99.39.

Reviewed by: YAMAMOTO Takashi <yamt@netbsd.org>
 1.10 08-Oct-2007  hannken Bump date.
 1.9 07-Oct-2007  hannken Update the file system copy-on-write handler.

- Instead of hooking the handler on the specdev of a mounted file system
hook directly on the `struct mount'.

- Rename from `vn_cow_*' to `fscow_*' and move to `kern/vfs_trans.c'. Use
`mount_*specific' instead of clobbering `struct mount' or `struct specinfo'.

- Replace the hand-made reader/writer lock with a krwlock.

- Keep `vn_cow_*' functions and mark as obsolete.

- Welcome to NetBSD 4.99.32 - `struct specinfo' changed size.

Reviewed by: Jason Thorpe <thorpej@netbsd.org>
 1.8 26-Jul-2007  pooka branches: 1.8.4; 1.8.6;
missed a few due to the blinding effects of underlining
 1.7 26-Jul-2007  pooka include variable names in synopsis
 1.6 24-Jun-2007  rumble TRUE -> true, FALSE -> false.
 1.5 17-May-2007  hannken Fstrans_start() always returns zero, so change its type to void.
 1.4 16-Feb-2007  hannken Make fstrans(9) the default helper for file system suspension.
Replaces the now obsolete vn_start_write()/vn_finished_write().
 1.3 29-Jan-2007  hannken Change fstrans enum types to upper case.
No functional change.

From Antti Kantee <pooka@netbsd.org>
 1.2 23-Jan-2007  wiz Make HTML-safe.
 1.1 21-Jan-2007  hannken Add and update documentation for fstrans(9) file system suspension helper.

wiz?
 1.8.6.2 26-Jul-2007  pooka missed a few due to the blinding effects of underlining
 1.8.6.1 26-Jul-2007  pooka file fstrans.9 was added on branch matt-mips64 on 2007-07-26 08:43:53 +0000
 1.8.4.2 09-Jan-2008  matt sync with HEAD
 1.8.4.1 06-Nov-2007  matt sync with HEAD
 1.11.8.1 18-May-2008  yamt sync with head.
 1.11.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.12.6.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.15.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.15.8.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.15.2.2 12-Apr-2010  jruoho Add a FUNCTIONS section.

In addition, small improvements to wording and markup.
 1.15.2.1 12-Apr-2010  jruoho file fstrans.9 was added on branch uebayasi-xip on 2010-04-12 21:28:56 +0000
 1.20.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.20.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.24.2.2 09-Oct-2018  martin Pull up following revision(s) (requested by hannken in ticket #1052):

sys/kern/vfs_trans.c: revision 1.51
distrib/sets/lists/comp/mi: revision 1.2233
share/man/man9/fstrans.9: revision 1.27
share/man/man9/Makefile: revision 1.431
sys/sys/fstrans.h: revision 1.12
sys/rump/librump/rumpkern/emul.c: revision 1.187
sys/dev/vnd.c: revision 1.266
sys/miscfs/genfs/genfs_vfsops.c: revision 1.8

Bring back three state file system suspension:

NORMAL -> SUSPENDING -> SUSPENDED

and add operation fstrans_start_lazy() that only blocks while SUSPENDED.

Change vndthread() support operation handle_with_rdwr() to bracket
its file system operations by fstrans_start_lazy() and fstrans_done().

PR kern/53624 (dom0 freeze on domU exit)
 1.24.2.1 04-Jun-2017  bouyer pullup the following revisions, requested by hannken in ticket #2:
src/share/man/man9/fstrans.9 1.25
src/sys/kern/vfs_mount.c 1.66
src/sys/kern/vfs_subr.c 1.468
src/sys/kern/vfs_trans.c 1.46
src/sys/kern/vfs_vnode.c 1.94, 1.95, 1.96
src/sys/kern/vnode_if.c 1.105, 1.106
src/sys/kern/vnode_if.sh 1.65, 1.66
src/sys/kern/vnode_if.src 1.76
src/sys/miscfs/genfs/genfs_io.c 1.69
src/sys/miscfs/genfs/genfs_vnops.c 1.196, 1.197
src/sys/miscfs/genfs/layer_extern.h 1.40
src/sys/miscfs/genfs/layer_vfsops.c 1.51
src/sys/miscfs/genfs/layer_vnops.c 1.67
src/sys/miscfs/nullfs/null_vnops.c 1.42
src/sys/miscfs/overlay/overlay_vnops.c 1.24
src/sys/miscfs/umapfs/umap_vnops.c 1.60
src/sys/rump/include/rump/rumpvnode_if.h 1.29, 1.30
src/sys/rump/librump/rumpkern/emul.c 1.182
src/sys/rump/librump/rumpvfs/rumpvnode_if.c 1.29, 1.30
src/sys/sys/fstrans.h 1.11
src/sys/sys/vnode.h 1.278
src/sys/sys/vnode_if.h 1.100, 1.101
src/sys/sys/vnode_impl.h 1.14, 1.15
src/sys/ufs/lfs/lfs_pages.c 1.12

Vnode state, lock and fstrans cleanup:
- Rename vnode state "VS_ACTIVE" to "VS_LOADED" and add synthetic
state "VS_ACTIVE" to assert a loaded vnode with usecount > 0.

- Redo FSTRANS in vnode_if.c and use it for VOP_LOCK and VOP_UNLOCK.

- Cleanup the genfs lock operations.

- Make "struct vnode_impl" member "vi_lock" a krwlock_t again.

- Remove the lock type argument from fstrans_start and
fstrans_start_nowait,
remove now unused FSTRANS state "FSTRANS_SUSPENDING".
 1.26.6.1 10-Jun-2019  christos Sync with HEAD
 1.26.4.1 20-Oct-2018  pgoyette Sync with head
 1.8 17-Jan-2022  wiz Sort SEE ALSO, fix punctuation.
 1.7 17-Jan-2022  christos Add acl related changes; there is no more vaccess; document the genfs functions
instead.
 1.6 07-Aug-2020  wiz Remove trailing whitespace.
 1.5 07-Aug-2020  christos Catch up with genfs_can argument changes
 1.4 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.3 20-Jul-2013  wiz Use Mt for email addresses.
 1.2 14-Mar-2012  wiz branches: 1.2.2; 1.2.4; 1.2.6;
Remove trailing whitespace. Fix typo. Sort.
 1.1 13-Mar-2012  elad Replace the remaining KAUTH_GENERIC_ISSUSER authorization calls with
something meaningful. All relevant documentation has been updated or
written.

Most of these changes were brought up in the following messages:

http://mail-index.netbsd.org/tech-kern/2012/01/18/msg012490.html
http://mail-index.netbsd.org/tech-kern/2012/01/19/msg012502.html
http://mail-index.netbsd.org/tech-kern/2012/02/17/msg012728.html

Thanks to christos, manu, njoly, and jmmv for input.

Huge thanks to pgoyette for spinning these changes through some build
cycles and ATF.
 1.2.6.1 23-Jul-2013  riastradh sync with HEAD
 1.2.4.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.2.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.2.2 17-Apr-2012  yamt sync with head
 1.2.2.1 14-Mar-2012  yamt file genfs.9 was added on branch yamt-pagecache on 2012-04-17 00:05:49 +0000
 1.2 17-Jan-2022  wiz Sort SEE ALSO, fix punctuation.
 1.1 17-Jan-2022  christos Add acl related changes; there is no more vaccess; document the genfs functions
instead.
 1.1 17-Jan-2022  christos Add acl related changes; there is no more vaccess; document the genfs functions
instead.
 1.1 17-Jan-2022  christos Add acl related changes; there is no more vaccess; document the genfs functions
instead.
 1.5 17-Jan-2022  wiz use "non-null" instead of "nonnull" for readability
 1.4 08-Feb-2018  dholland Typo fixes from Eitan Adler.
 1.3 18-Mar-2014  riastradh branches: 1.3.4; 1.3.8;
Merge riastradh-drm2 to HEAD.
 1.2 20-Jul-2013  wiz Use Mt for email addresses.
 1.1 01-May-2013  riastradh branches: 1.1.2; 1.1.4;
First draft of a long-awaited man page for genfs_rename(9).
 1.1.4.1 23-Jul-2013  riastradh sync with HEAD
 1.1.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.2.2 23-Jun-2013  tls resync from head
 1.1.2.1 01-May-2013  tls file genfs_rename.9 was added on branch tls-maxphys on 2013-06-23 06:28:54 +0000
 1.3.8.2 27-Oct-2014  msaitoh Pull up following revision(s) (requested by riastradh in ticket #1134):
share/man/man9/genfs_rename.9: revision 1.1
First draft of a long-awaited man page for genfs_rename(9).
 1.3.8.1 18-Mar-2014  msaitoh file genfs_rename.9 was added on branch netbsd-6 on 2014-10-27 05:43:51 +0000
 1.3.4.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.4.1 18-Mar-2014  yamt file genfs_rename.9 was added on branch yamt-pagecache on 2014-05-22 11:37:52 +0000
 1.6 30-Mar-2015  riastradh Hook bufferio(9) man page into the build.

Remove separate getiobuf(9) man page, subsumed by bufferio(9).
 1.5 28-Apr-2011  wiz Improve wording.
 1.4 12-Mar-2009  joerg Fix markup.
 1.3 06-May-2008  yamt branches: 1.3.6;
update to match with the recent reality.
 1.2 17-Jan-2006  wiz branches: 1.2.20; 1.2.22;
Sort SEE ALSO.
 1.1 16-Jan-2006  yamt add getiobuf.9
 1.2.22.1 18-May-2008  yamt sync with head.
 1.2.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.3.6.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.3 25-Mar-2010  jruoho branches: 1.3.2;
Vaguely describe the frame-parameter. Beautify.
 1.2 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.1 09-Sep-2001  wiz branches: 1.1.2; 1.1.36; 1.1.38;
Add hardclock(9). Written by myself, improved via some comments from
Christos (thanks!).
 1.1.38.1 18-May-2008  yamt sync with head.
 1.1.36.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.2.2 15-Nov-2001  he Pull up revision 1.1 (new, requested by hubertf):
Add manual pages hz(9) and hardclock(9), already referenced from
microtime(9).
 1.1.2.1 09-Sep-2001  he file hardclock.9 was added on branch netbsd-1-5 on 2001-11-15 23:00:47 +0000
 1.3.2.2 25-Mar-2010  jruoho Vaguely describe the frame-parameter. Beautify.
 1.3.2.1 25-Mar-2010  jruoho file hardclock.9 was added on branch uebayasi-xip on 2010-03-25 15:17:39 +0000
 1.4 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.3 16-Apr-2003  wiz branches: 1.3.32; 1.3.34;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.2 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.1 05-Dec-2001  lukem add hash(9)
 1.3.34.1 18-May-2008  yamt sync with head.
 1.3.32.1 02-Jun-2008  mjf Sync with HEAD.
 1.9 17-Sep-2013  wiz Sort sections: consistently put CODE REFERENCES directly before SEE ALSO.
 1.8 28-Apr-2011  wiz branches: 1.8.4; 1.8.10;
New sentence, new line.
 1.7 01-Jul-2008  pooka Code is in subr_hash, not kern_hash.

from Michal Spacek
 1.6 27-May-2008  hubertf Fix code reference after hashinit(9) was moved from
kern_subr.c to kern_hash.c some time ago.

Noted by Michael Spacek.
 1.5 06-May-2008  yamt branches: 1.5.2;
update after the following change.

subr_hash.c
revision 1.3
date: 2008/05/05 17:11:17; author: ad; state: Exp; lines: +26 -12
- Convert hashinit() to use kmem_alloc(). The hash tables can be large
and it's better to not have them in kmem_map.
- Convert a couple of minor items along the way to kmem_alloc().
- Fix some memory leaks.
 1.4 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.3 23-Dec-2006  wiz branches: 1.3.10; 1.3.12;
Drop trailing whitespace.
 1.2 05-Jun-2006  chap branches: 1.2.2;
Reword a couple of spots that committed too much internal detail, spotted
by brian and der Mouse, and another that seemed to throw a reader. Add
the CODE REFERENCES section.

Critical discussion of this man page:
http://mail-index.netbsd.org/tech-kern/2006/06/04/0012.html et seq.

And with all that, what a lucky break to catch that I was thinking of
the /reciprocal/ of the load factor, before anybody else spotted it!
Now I can fix it before anybody notices. Heh. Wait, is this going in
the lo^C
 1.1 04-Jun-2006  chap Document kernel function hashinit/hashdone.

"No[ objections] here." -christos@
 1.2.2.2 19-Jun-2006  chap Sync with head.
 1.2.2.1 05-Jun-2006  chap file hashinit.9 was added on branch chap-midi on 2006-06-19 04:15:05 +0000
 1.3.12.2 04-Jun-2008  yamt sync with head
 1.3.12.1 18-May-2008  yamt sync with head.
 1.3.10.2 05-Oct-2008  mjf Sync with HEAD.
 1.3.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.5.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.5.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.8.10.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.6 02-Jun-2024  andvar fix various typos in word `interrupt', mainly in comments.
 1.5 07-Jul-2023  uwe heartbeat(9): markup fixes

Use .Cd for options. Don't use the usual <space><tab>, which is
superfluous in the man page. Paragraph break after the config section
of synopsis, before the C API section.
 1.4 07-Jul-2023  riastradh heartbeat(9): Fix grammaro in man page.
 1.3 07-Jul-2023  wiz Replace main(9) reference with code location
 1.2 07-Jul-2023  wiz Sort SEE ALSO
 1.1 07-Jul-2023  riastradh heartbeat(9): New mechanism to check progress of kernel.

This uses hard interrupts to check progress of low-priority soft
interrupts, and one CPU to check progress of another CPU.

If no progress has been made after a configurable number of seconds
(kern.heartbeat.max_period, default 15), then the system panics --
preferably on the CPU that is stuck so we get a stack trace in dmesg
of where it was stuck, but if the stuckness was detected by another
CPU and the stuck CPU doesn't acknowledge the request to panic within
one second, the detecting CPU panics instead.

This doesn't supplant hardware watchdog timers. It is possible for
hard interrupts to be stuck on all CPUs for some reason too; in that
case heartbeat(9) has no opportunity to complete.

Downside: heartbeat(9) relies on hardclock to run at a reasonably
consistent rate, which might cause trouble for the glorious tickless
future. However, it could be adapted to take a parameter for an
approximate number of units that have elapsed since the last call on
the current CPU, rather than treating that as a constant 1.

XXX kernel revbump -- changes struct cpu_info layout
 1.9 07-Aug-2010  jruoho Wording, markup.
 1.8 30-Apr-2008  martin branches: 1.8.12;
Convert TNF licenses to new 2 clause variant
 1.7 26-Dec-2005  perry branches: 1.7.20; 1.7.22;
u_intN_t -> uintN_t
 1.6 04-Oct-2004  rumble Removed accidental repetitious words.
 1.5 26-Sep-2002  wiz Kilo abbreviation is a small k (PR 18408). Unrelated mdoc fix.
 1.4 26-Dec-2001  wiz Drop some .Pps.
 1.3 05-Jun-2001  wiz Remove trailing dot from Nd.
 1.2 05-Aug-2000  briggs On 20 Feb 2000, the humanize_number() function got a fifth argument--a
divisor. This divisor replaces a hard-coded divisor of 1024. To remain
consistent with the hard-coded SI prefix list, humanize_number should
probably only be called with a divisor of 1000 or 1024.
This is now documented.
 1.1 21-May-1999  lukem branches: 1.1.8;
add humanize_number(9) / format_bytes(9)
 1.1.8.1 06-Aug-2000  briggs Approved by: thorpej
Pullup revision 1.2--
On 20 Feb 2000, the humanize_number() function got a fifth argument--a
divisor. This divisor replaces a hard-coded divisor of 1024. To remain
consistent with the hard-coded SI prefix list, humanize_number should
probably only be called with a divisor of 1000 or 1024.
This is now documented.
 1.7.22.1 18-May-2008  yamt sync with head.
 1.7.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.8.12.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.9 26-Mar-2010  wiz branches: 1.9.2;
Split Nm argument in NAME section on multiple lines, like usual.
 1.8 25-Mar-2010  jruoho In addition to 'hz', document also 'tick', 'tickadj', 'stathz', and 'profhz'.

The idea comes from OpenBSD, but this was written largely based on the
comments in kern_clock.c. XXX: schedhz?
 1.7 04-Mar-2010  jruoho Instead of "int hz", use "extern int hz".
 1.6 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.5 20-Feb-2007  wiz branches: 1.5.10; 1.5.12;
time(9) was renamed to time_second(9), fix xrefs.
 1.4 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.3 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.2 05-Sep-2001  gmcgarry branches: 1.2.2;
Spelling fixes.
 1.1 04-Sep-2001  wiz Add hz(9) man page.
 1.2.2.2 15-Nov-2001  he Pull up revision s 1.1-1.2 (new, requested by hubertf):
Add manual pages hz(9) and hardclock(9), already referenced from
microtime(9).
 1.2.2.1 05-Sep-2001  he file hz.9 was added on branch netbsd-1-5 on 2001-11-15 23:00:31 +0000
 1.5.12.1 18-May-2008  yamt sync with head.
 1.5.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.9.2.2 26-Mar-2010  wiz Split Nm argument in NAME section on multiple lines, like usual.
 1.9.2.1 26-Mar-2010  wiz file hz.9 was added on branch uebayasi-xip on 2010-03-26 19:40:42 +0000
 1.6 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.5 20-Jul-2013  wiz Use Mt for email addresses.
 1.4 17-Sep-2006  wiz branches: 1.4.42; 1.4.48; 1.4.54;
There is no, and was no, ifnet(9), remove it from SEE ALSO.
 1.3 12-Sep-2006  pooka Bring the ieee80211 manual pages reasonably up-to-date with reality:
fix prototypes and descriptions, remove old stuff no longer present,
add some new interfaces, tweak markup, etcetc
 1.2 25-Apr-2005  wiz Add $NetBSD$ RCS Id.
 1.1 24-Apr-2005  dyoung Add IEEE 802.11 manual pages from FreeBSD.
 1.4.54.1 23-Jul-2013  riastradh sync with HEAD
 1.4.48.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.42.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.5 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.4 20-Jul-2013  wiz Use Mt for email addresses.
 1.3 12-Sep-2006  pooka branches: 1.3.42; 1.3.48; 1.3.54;
Bring the ieee80211 manual pages reasonably up-to-date with reality:
fix prototypes and descriptions, remove old stuff no longer present,
add some new interfaces, tweak markup, etcetc
 1.2 25-Apr-2005  wiz Add $NetBSD$ RCS Id.
 1.1 24-Apr-2005  dyoung Add IEEE 802.11 manual pages from FreeBSD.
 1.3.54.1 23-Jul-2013  riastradh sync with HEAD
 1.3.48.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.42.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.5 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.4 20-Jul-2013  wiz Use Mt for email addresses.
 1.3 12-Sep-2006  pooka branches: 1.3.42; 1.3.48; 1.3.54;
Bring the ieee80211 manual pages reasonably up-to-date with reality:
fix prototypes and descriptions, remove old stuff no longer present,
add some new interfaces, tweak markup, etcetc
 1.2 25-Apr-2005  wiz Add $NetBSD$ RCS Id.
 1.1 24-Apr-2005  dyoung Add IEEE 802.11 manual pages from FreeBSD.
 1.3.54.1 23-Jul-2013  riastradh sync with HEAD
 1.3.48.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.42.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.7 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.6 20-Jul-2013  wiz Use Mt for email addresses.
 1.5 07-Mar-2007  dogcow branches: 1.5.36; 1.5.42; 1.5.48;
running in emulated wizd mode, convert caddr_t to void *.
 1.4 17-Sep-2006  wiz We have no wicontrol(8), link to wiconfig(8) instead.
 1.3 12-Sep-2006  pooka Bring the ieee80211 manual pages reasonably up-to-date with reality:
fix prototypes and descriptions, remove old stuff no longer present,
add some new interfaces, tweak markup, etcetc
 1.2 25-Apr-2005  wiz Add $NetBSD$ RCS Id.
 1.1 24-Apr-2005  dyoung Add IEEE 802.11 manual pages from FreeBSD.
 1.5.48.1 23-Jul-2013  riastradh sync with HEAD
 1.5.42.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.36.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.8 08-Feb-2018  dholland Typo fixes from Eitan Adler.
 1.7 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.6 20-Jul-2013  wiz Use Mt for email addresses.
 1.5 17-Sep-2006  wiz branches: 1.5.42; 1.5.48; 1.5.54;
"is be" -> "is"
 1.4 12-Sep-2006  pooka markup fixes
 1.3 12-Sep-2006  pooka Bring the ieee80211 manual pages reasonably up-to-date with reality:
fix prototypes and descriptions, remove old stuff no longer present,
add some new interfaces, tweak markup, etcetc
 1.2 25-Apr-2005  wiz Add $NetBSD$ RCS Id.
 1.1 24-Apr-2005  dyoung Add IEEE 802.11 manual pages from FreeBSD.
 1.5.54.1 23-Jul-2013  riastradh sync with HEAD
 1.5.48.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.42.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.6 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.5 20-Jul-2013  wiz Use Mt for email addresses.
 1.4 17-Sep-2006  wiz branches: 1.4.42; 1.4.48; 1.4.54;
"is be" -> "is"
 1.3 12-Sep-2006  pooka Bring the ieee80211 manual pages reasonably up-to-date with reality:
fix prototypes and descriptions, remove old stuff no longer present,
add some new interfaces, tweak markup, etcetc
 1.2 25-Apr-2005  wiz Add $NetBSD$ RCS Id.
 1.1 24-Apr-2005  dyoung Add IEEE 802.11 manual pages from FreeBSD.
 1.4.54.1 23-Jul-2013  riastradh sync with HEAD
 1.4.48.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.42.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.5 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.4 20-Jul-2013  wiz Use Mt for email addresses.
 1.3 12-Sep-2006  pooka branches: 1.3.42; 1.3.48; 1.3.54;
Bring the ieee80211 manual pages reasonably up-to-date with reality:
fix prototypes and descriptions, remove old stuff no longer present,
add some new interfaces, tweak markup, etcetc
 1.2 25-Apr-2005  wiz Add $NetBSD$ RCS Id.
 1.1 24-Apr-2005  dyoung Add IEEE 802.11 manual pages from FreeBSD.
 1.3.54.1 23-Jul-2013  riastradh sync with HEAD
 1.3.48.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.42.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.17 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.16 21-Feb-2017  dyoung Fix PR standards/51989: the extension bit extends the presence bitmap
by 32 bits, not 64.
 1.15 18-Mar-2014  riastradh branches: 1.15.8; 1.15.12;
Merge riastradh-drm2 to HEAD.
 1.14 20-Jul-2013  wiz Use Mt for email addresses.
 1.13 06-Mar-2013  wiz branches: 1.13.4;
New sentence, new line.
 1.12 05-Apr-2010  joerg branches: 1.12.2; 1.12.8; 1.12.14;
\\ -> \e
 1.11 26-Mar-2007  dyoung Define four new radiotap fields per discussions with John Bicket, Sam
Leffler, and others:

IEEE80211_RADIOTAP_RX_FLAGS = 14,
IEEE80211_RADIOTAP_TX_FLAGS = 15,
IEEE80211_RADIOTAP_RTS_RETRIES = 16,
IEEE80211_RADIOTAP_DATA_RETRIES = 17,

I describe the fields in the manual page and in comments in the
header file (cross-referenced by the manual page).
 1.10 12-Mar-2006  wiz Bump date for previous.
 1.9 12-Mar-2006  dyoung Note in radiotap header file and manual page that radiotap fields
are little-endian. Fix wi(4) and atw(4) to reflect this fact.
 1.8 13-Dec-2005  explorer 'the the' => 'the' and change DLT type from IEEE_80211_RADIO to the correct IEEE802_11_RADIO name
 1.7 12-Jul-2005  dyoung Be explicit about the requirement that capture fields be naturally
aligned to comply with the radiotap standard.

Assert David Young's maintainership of the radiotap capture format.
 1.6 12-Jul-2005  wiz Bump date for last but one.
 1.5 12-Jul-2005  wiz Use more markup.
 1.4 11-Jul-2005  dyoung Explain how the extension bit works in the bitmap that tells which
fields are present.
 1.3 25-Apr-2005  wiz tcpdump(8), not (1).
 1.2 25-Apr-2005  wiz Use \*[Gt]. Add $NetBSD$ RCS Id.
 1.1 24-Apr-2005  dyoung Add IEEE 802.11 manual pages from FreeBSD.
 1.12.14.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.12.14.1 23-Jun-2013  tls resync from head
 1.12.8.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.12.2.2 05-Apr-2010  joerg \\ -> \e
 1.12.2.1 05-Apr-2010  joerg file ieee80211_radiotap.9 was added on branch uebayasi-xip on 2010-04-05 19:34:29 +0000
 1.13.4.1 23-Jul-2013  riastradh sync with HEAD
 1.15.12.1 21-Apr-2017  bouyer Sync with HEAD
 1.15.8.1 20-Mar-2017  pgoyette Sync with HEAD
 1.10 03-Apr-2014  riastradh Correct return type of iic_release_bus.
 1.9 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.8 20-Jul-2013  wiz Use Mt for email addresses.
 1.7 15-Oct-2011  jruoho branches: 1.7.2; 1.7.4; 1.7.8; 1.7.12;
Xref i2cscan(8).
 1.6 17-Mar-2010  jruoho branches: 1.6.2;
Add also the SMBus specification.
 1.5 17-Mar-2010  jruoho Add the specification from NXP to SEE ALSO.
 1.4 18-May-2009  wiz Consistently use "buflen" as function argument name.
From Jukka Ruohonen in PR 41436.
 1.3 02-Feb-2007  wiz Fix Dd argument.
 1.2 12-Jan-2006  wiz Use In; mark up defined values with Dv; fix iic_exec arguments.
 1.1 04-Jan-2006  xtraeme Manpage that explains the i2c framework... from OpenBSD.
 1.6.2.2 17-Mar-2010  jruoho Add also the SMBus specification.
 1.6.2.1 17-Mar-2010  jruoho file iic.9 was added on branch uebayasi-xip on 2010-03-17 18:55:14 +0000
 1.7.12.1 23-Jul-2013  riastradh sync with HEAD
 1.7.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.4.1 29-Sep-2014  msaitoh Pull up following revision(s) (requested by riastradh in ticket #1130):
share/man/man9/iic.9: revision 1.10
Correct return type of iic_release_bus.
 1.7.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.8 10-Jul-2024  rin imax.9: Additional fixes for previous...
 1.7 10-Jul-2024  rin imax(9): Belatedly catch up with min/max --> uimin/uimax renaming

done almost 6 years ago:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/lib/libkern/libkern.h#rev1.130

Thanks asahi at iij for pointing this out :)
 1.6 08-Jun-2010  jruoho branches: 1.6.48; 1.6.56; 1.6.58;
Xref ilog2(3).
 1.5 11-Jul-2008  gdt branches: 1.5.10;
Changemanpages written by Igor Sobrado to 2-clause license, per
private email from Igor. Drop attribution to Matt Thomas in those man
pages, per private email from Matt. In coredump_write.9, fix
capitalization of THomas. Requested by martin@.
 1.4 10-May-2008  martin Backout previous: the license sweep touched these files in error, so
restore the old license.
 1.3 30-Apr-2008  martin branches: 1.3.2;
Convert TNF licenses to new 2 clause variant
 1.2 30-Jul-2006  wiz branches: 1.2.18;
Serial comma.
 1.1 27-Jul-2006  gdt man pages contributed by Igor Sobrado.
 1.2.18.1 05-Oct-2008  mjf Sync with HEAD.
 1.3.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.3.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.5.10.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.6.58.1 02-Aug-2025  perseant Sync with HEAD
 1.6.56.1 20-Jul-2024  martin Pull up following revision(s) (requested by rin in ticket #762):

share/man/man9/imax.9: revision 1.7
share/man/man9/imax.9: revision 1.8
share/man/man9/Makefile: revision 1.471
distrib/sets/lists/comp/mi: revision 1.2463

imax(9): Belatedly catch up with min/max --> uimin/uimax renaming
done almost 6 years ago:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/lib/libkern/libkern.h#rev1.130

Thanks asahi at iij for pointing this out :)

imax.9: Additional fixes for previous...
man9: Provide all combinations of {,u}{i,l}{max,min}(9)
sets/lists: Add all combinations of {,u}{i,l}{max,min}(9)
 1.6.48.1 20-Jul-2024  martin Pull up following revision(s) (requested by rin in ticket #1857):

share/man/man9/imax.9: revision 1.7
share/man/man9/imax.9: revision 1.8
share/man/man9/Makefile: revision 1.471
distrib/sets/lists/comp/mi: revision 1.2463

imax(9): Belatedly catch up with min/max --> uimin/uimax renaming
done almost 6 years ago:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/lib/libkern/libkern.h#rev1.130
Thanks asahi at iij for pointing this out :)

imax.9: Additional fixes for previous...

man9: Provide all combinations of {,u}{i,l}{max,min}(9)
sets/lists: Add all combinations of {,u}{i,l}{max,min}(9)
 1.6 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.5 05-Jun-2001  wiz branches: 1.5.36; 1.5.38;
Uppercase Dt argument.
 1.4 24-May-2001  wiz Whitespace nits, and re-sort SEE ALSO according to mdoc.samples(7).
 1.3 24-May-2001  sommerfeld Clarify specification of in4_cksum; add description of in_cksum and
in6_cksum as well as makefile goo to install links.
 1.2 23-May-2001  wiz Minor fixes (whitespace, Nm -> Fn, punctuation, sort SEE ALSO).
 1.1 23-May-2001  sommerfeld preliminary man page with rough spec for what this function should do.
(XXX should also include in_cksum, in6_cksum).
 1.5.38.1 18-May-2008  yamt sync with head.
 1.5.36.1 02-Jun-2008  mjf Sync with HEAD.
 1.11 21-Jan-2020  wiz Remove superfluous Pp.
 1.10 20-Jan-2020  nia when referring to the "user"/"operator"/"network manager": he -> they
 1.9 03-Jul-2017  wiz branches: 1.9.6;
Remove workaround for ancient HTML generation code.
 1.8 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.7 20-Jul-2013  wiz Use Mt for email addresses.
 1.6 19-Oct-2009  rmind branches: 1.6.8; 1.6.14; 1.6.18;
Drop 3rd and 4th clauses from David Young's license.
Reviewed and approved by dyoung@ (copyright holder).
 1.5 09-Mar-2009  joerg Fix preamble to match order set out by mdoc(7). Discussed with wiz.
 1.4 02-Mar-2007  wiz branches: 1.4.20;
Bump date for previous.
 1.3 22-Feb-2007  dyoung Reverse sense of preference numbers: prefer source addresses with
higher preference numbers. Thanks to Mihai Chelaru for pointing
out my mistake.
 1.2 19-Nov-2006  wiz branches: 1.2.2;
Add RCS Id. Use Nx. Sort SEE ALSO. Avoid Xr to ourselves.
Avoid marking up commas. Uppercase Dt argument.
 1.1 13-Nov-2006  dyoung Add a source-address selection policy mechanism to the kernel.

Also, add ioctls SIOCGIFADDRPREF/SIOCSIFADDRPREF to get/set preference
numbers for addresses. Make ifconfig(8) set/display preference
numbers.

To activate source-address selection policies in your kernel, add
'options IPSELSRC' to your kernel configuration.

Miscellaneous changes in support of source-address selection:

1 Factor out some common code, producing rt_replace_ifa().

2 Abbreviate a for-loop with TAILQ_FOREACH().

3 Add the predicates on IPv4 addresses IN_LINKLOCAL() and
IN_PRIVATE(), that are true for link-local unicast
(169.254/16) and RFC1918 private addresses, respectively.
Add the predicate IN_ANY_LOCAL() that is true for link-local
unicast and multicast.

4 Add IPv4-specific interface attach/detach routines,
in_domifattach and in_domifdetach, which build #ifdef
IPSELSRC.

See in_getifa(9) for a more thorough description of source-address
selection policy.
 1.2.2.2 04-Mar-2007  bouyer Pull up following revision(s) (requested by dyoung in ticket #486):
share/man/man9/in_getifa.9: revision 1.4
Bump date for previous.
 1.2.2.1 04-Mar-2007  bouyer Pull up following revision(s) (requested by dyoung in ticket #481):
sys/netinet/in_selsrc.c: revision 1.4
sys/netinet/in_selsrc.c: revision 1.5
share/man/man9/in_getifa.9: revision 1.3
Add net.inet.ip.selectsrc.default even if GETIFA_DEBUG is not
Reverse sense of preference numbers: prefer source addresses with
higher preference numbers. Thanks to Mihai Chelaru for pointing
out my mistake.
 1.4.20.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.6.18.1 23-Jul-2013  riastradh sync with HEAD
 1.6.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.8.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.9.6.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.14 07-Sep-2024  rillig man: use https URLs for www.NetBSD.org
 1.13 20-Feb-2007  wiz branches: 1.13.90;
time(9) was renamed to time_second(9), fix xrefs.
 1.12 06-Sep-2006  wiz Fix typo.
 1.11 06-Sep-2006  gdamore time.9 renamed to time_second.9. various updates to reflect API changes.
 1.10 02-Mar-2006  uwe Remove BUGS section and xref clock_ymdhms_to_secs(9).
While here, use hyphen in "battery-backed" consistently.
 1.9 14-Feb-2003  grant The correct capitalisation of 'NetBSD.org' is (you
guessed it) 'NetBSD.org'.

some mdoc fixes.
 1.8 14-Oct-2002  wiz New sentence, new line.
 1.7 04-Sep-2001  wiz Boring whitespace fixes.
 1.6 14-Jun-2000  cgd sweep of my licenses (userland files w/o only my copyright) for
consistency. (no functional changes)
 1.5 14-Jun-2000  cgd fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well. No functional changes.
 1.4 06-Apr-1999  pk branches: 1.4.6;
1, 2, 3 and.. 4!
 1.3 16-Mar-1999  garbled branches: 1.3.2;
More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.2 27-Mar-1996  jtc fix typo; reported by Manuel Bouyer in PR #2268
 1.1 25-Nov-1995  perry Added first section 9 man pages -- initial pages and Makefile from cgd
Section 9 man pages document the internals of the kernel.
 1.3.2.1 07-Apr-1999  pk Pull up from trunk: copyright text warts.
 1.4.6.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.13.90.1 02-Aug-2025  perseant Sync with HEAD
 1.2 06-Jul-2016  abhinav Add missing .Nd

ok wiz@, knakaraha@
 1.1 17-Aug-2015  knakahara Add man about kernel APIs to support intrctl(8).
 1.26 01-Sep-2019  wiz fetch(9) -> ufetch(9). Remove reference to unimplemented ppi(9).
 1.25 01-Sep-2019  oster s/Xr store/Xr ustore/ to fix cross-references in these man-pages.
 1.24 08-May-2019  isaki branches: 1.24.2;
Update manpages respond to isaki-audio2 branch.
 1.23 15-Jul-2018  maxv Retire ipkdb entirely. The option was removed from the config files
yesterday.

ok kamil christos
 1.22 13-Jul-2018  maxv Remove the X86PMC code I had written, replaced by tprof. Many defines
become unused in specialreg.h, so remove them. We don't want to add
defines all the time, there are countless PMCs on many generations, and
it's better to just inline the event/unit values.
 1.21 28-May-2018  wiz branches: 1.21.2;
File system police.
 1.20 28-May-2018  nat Move the audio specification to section 9 under audio_system.

Ok wiz@
 1.19 12-Nov-2017  riastradh branches: 1.19.2;
Xref locking(9). Xref membar_ops(3), not mb(9).
 1.18 30-May-2017  abhinav branches: 1.18.2;
Remove references to cpu_swapout(9) and cpu_exit(9)

Those functions were removed several years back, discussed on tech-kern:
<http://mail-index.netbsd.org/tech-kern/2017/05/20/msg021913.html>
 1.17 19-May-2017  abhinav Remove reference to pathname(9), its man page was removed 10 years ago.
 1.16 23-Mar-2015  riastradh Update some xrefs to point to softint(9), not the old/alt spelling.
 1.15 19-Jan-2013  riastradh Fix typo, unless `ro raising' is something I don't know about.
 1.14 02-Dec-2010  wiz branches: 1.14.6; 1.14.12;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.13 15-Apr-2010  jruoho branches: 1.13.2;
Remove references to the deprecated powerhook_establish(9).
 1.12 11-Feb-2010  dyoung Do not mention shutdownhook_establish(9) and doshutdownhooks(9), but
mention pmf(9) and pmf_system_shutdown(9), instead.
 1.11 04-May-2009  wiz s/ctxsw/mi_switch/
 1.10 11-Mar-2009  joerg Fix preamble
 1.9 16-Dec-2008  christos branches: 1.9.2;
kill bitmask_snprintf
 1.8 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.7 14-Jul-2007  ad branches: 1.7.10; 1.7.12;
- kcont was removed.
- Replace some references to tsleep.
 1.6 20-Feb-2007  wiz Fix some xrefs. Fix Dd argument. Remove superfluous Pps.
 1.5 18-Feb-2007  rmind Introduce table of contents for core references. Please note, that in
future one should follow such hierarchy:
1. Table of contents (only intro.9)
2. Abstract description of subsystems (e.g. memoryallocators.9)
3. Concrete description of subsystem (e.g. vmem.9)

Thanks tsutsui@ for better structurization and wiz@ for quick review.
OK by tech-kern@ positivism.
 1.4 08-Oct-1999  msaitoh s/ the the / the /
 1.3 06-Feb-1998  perry branches: 1.3.4;
macroize BSD, NetBSD, FreeBSD and misc cleanup
 1.2 22-May-1997  jeremy Reduce redundant 'describes'.
 1.1 22-May-1997  jeremy Introduction to kernel internals section.
 1.3.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.7.12.1 18-May-2008  yamt sync with head.
 1.7.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.9.2.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.13.2.2 15-Apr-2010  jruoho Remove references to the deprecated powerhook_establish(9).
 1.13.2.1 15-Apr-2010  jruoho file intro.9 was added on branch uebayasi-xip on 2010-04-15 08:40:47 +0000
 1.14.12.1 25-Feb-2013  tls resync with head
 1.14.6.1 23-Jan-2013  yamt sync with head
 1.18.2.1 07-Jun-2018  martin Pull up following revision(s) (requested by nat in ticket #848):

share/man/man9/Makefile: revision 1.422
distrib/sets/lists/comp/mi: revision 1.2198
share/man/man7/Makefile: revision 1.33
share/man/man9/audio.9: revision 1.47
share/man/man7/audio.7: file removal
sys/dev/audio.c: revision 1.456
sys/dev/audio.c: revision 1.457
distrib/sets/lists/man/mi: revision 1.1591
share/man/man9/intro.9: revision 1.20
share/man/man7/audio.7: revision 1.3
share/man/man9/audio_system.9: revision 1.1
share/man/man7/intro.7: revision 1.26
share/man/man4/audio.4: revision 1.86

Fix a typo with sc_out/inports when setting the hardware recording gain on the
mix ring. Found by mrg@
XXX pullup-8

Using audioctl without the -p switch defaults to the mix ring. This allows
setting the hardware gain etc.

Update the audio spec in audio.7 to reflect these changes.
Addresses PR kern/52781.

Move the audio specification to section 9 under audio_system.
Ok wiz@
 1.19.2.2 28-Jul-2018  pgoyette Sync with HEAD
 1.19.2.1 25-Jun-2018  pgoyette Sync with HEAD
 1.21.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.21.2.1 10-Jun-2019  christos Sync with HEAD
 1.24.2.2 05-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #174):
lib/libc/sys/chmod.2: revision 1.48
lib/libc/sys/stat.2: revision 1.59
lib/libc/sys/unlink.2: revision 1.30
lib/libc/sys/lseek.2: revision 1.25
lib/libc/sys/getuid.2: revision 1.18
lib/libc/sys/chown.2: revision 1.37
lib/libm/man/exp.3: revision 1.32
lib/libm/man/log.3: revision 1.7
lib/libc/sys/open.2: revision 1.60
lib/libc/stdio/fopen.3: revision 1.36
lib/libc/stdio/putc.3: revision 1.14
lib/libc/sys/mount.2: revision 1.51
share/man/man9/copy.9: revision 1.22
share/man/man9/uiomove.9: revision 1.20
lib/libc/sys/setuid.2: revision 1.23
lib/libc/sys/close.2: revision 1.18
sbin/init/init.8: revision 1.61
lib/libc/sys/write.2: revision 1.36
lib/libc/sys/read.2: revision 1.39
sbin/init/init.8: revision 1.62
lib/libc/sys/wait.2: revision 1.40
usr.bin/tty/tty.1: revision 1.10
lib/libc/sys/link.2: revision 1.33
usr.bin/du/du.1: revision 1.24
lib/libc/stdlib/exit.3: revision 1.17
usr.bin/su/su.1: revision 1.53
usr.bin/mail/mail.1: revision 1.66
lib/libc/sys/fork.2: revision 1.25
usr.bin/su/su.1: revision 1.54
usr.bin/mail/mail.1: revision 1.67
lib/libm/man/sin.3: revision 1.15
share/man/man9/intro.9: revision 1.26
share/man/man5/utmp.5: revision 1.17
lib/libc/compat-43/creat.3: revision 1.17
lib/libc/time/ctime.3: revision 1.61
lib/libcompat/4.1/stty.3: revision 1.10
usr.bin/dc/dc.1: revision 1.3
lib/libm/man/cos.3: revision 1.17
lib/libc/sys/chdir.2: revision 1.23
lib/libc/gen/exec.3: revision 1.30
lib/libc/gen/exec.3: revision 1.31
games/bcd/bcd.6: revision 1.18
games/bcd/bcd.6: revision 1.19
usr.bin/write/write.1: revision 1.7
usr.bin/wc/wc.1: revision 1.18
usr.bin/pr/pr.1: revision 1.24
usr.bin/who/who.1: revision 1.25
lib/libc/sys/mkdir.2: revision 1.30
lib/libc/stdio/getc.3: revision 1.13
usr.bin/sort/sort.1: revision 1.40
usr.bin/mesg/mesg.1: revision 1.11
share/man/man5/passwd.5: revision 1.34
sort was there since v1
https://www.bell-labs.com/usr/dmr/www/man61.pdf

dc was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

du was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mail was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mesg was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

su was in v1
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man14.pdf
Update URL

write was in v1
https://www.bell-labs.com/usr/dmr/www/man14.pdf
grammar

passwd(5) was in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

utmp(5) was present in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

Earliest version of wtmp I could find was in v3
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man5/wtmp.5

Document history of chdir(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chmod(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chown(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

create was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of exec()
Move statement on execlpe() & execvpe() to HISTORY section.

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

fork was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
stat() was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

document history of fstat()
https://www.bell-labs.com/usr/dmr/www/man21.pdf

getuid was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

stty & gtty were around since v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
https://www.bell-labs.com/usr/dmr/www/man22.pdf

mount & umount were present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

Open was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

read was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

seek was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

setuid was in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

unlink was presen in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

wait was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

write was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

start documenting history
exp was present in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

log appeared in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putc & putw were in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putchar was in v4
https://minie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man3/putchr.3

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Document history.
https://www.bell-labs.com/usr/dmr/www/man11.pdf
Between v1 & v6 UNIX, bcd was rewritten in C, but I don't know if which
version,
hence I've skipped mentioning it.
End sentence with a dot.
Remove superfluous Pp.
Remove superfluous Pp.
Remove superfluous Ns.
Remove superfluous Pp.
fetch(9) -> ufetch(9)
fetch(9) -> ufetch(9). Remove superfluous Pp.
fetch(9) -> ufetch(9). Remove reference to unimplemented ppi(9).
 1.24.2.1 01-Sep-2019  martin Pull up following revision(s) (requested by oster in ticket #167):

share/man/man9/copy.9: revision 1.21
share/man/man9/intro.9: revision 1.25
share/man/man9/uiomove.9: revision 1.19

s/Xr store/Xr ustore/ to fix cross-references in these man-pages.
 1.13 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.12 01-Jul-2011  dyoung Reference <sys/bus.h> instead of <machine/bus.h>.
 1.11 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.10 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.9 26-Dec-2005  perry branches: 1.9.20; 1.9.22;
u_intN_t -> uintN_t
 1.8 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.7 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.6 14-Oct-2002  wiz New sentence, new line, and fix a typo.
 1.5 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.4 09-Sep-2001  gmcgarry Fix formatting glitches, from Thomas Klausner.
 1.3 04-Sep-2001  wiz Punctuation fixes.
 1.2 04-Sep-2001  wiz Boring whitespace fixes.
 1.1 01-Jul-2001  gmcgarry Add some missing documentation.
 1.9.22.1 18-May-2008  yamt sync with head.
 1.9.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.36 07-Jul-2022  andvar fix reference to magma(4) by pointing to sparc/magma 4 and update the date.
 1.35 07-Jul-2022  andvar remove reference to tb(4), which was removed back in 2005.
 1.34 27-Jan-2019  maxv Remove the satlink driver. It was disabled everywhere, had no man page and
no use either. Spotted by thorpej in PR/21345, ok christos.
 1.33 23-Sep-2018  maxv Remove ISDN from the kernel. It has remained unmaintained for a long time,
is of poor quality, and is now an obstacle to MP-ification. It was removed
ten years ago from FreeBSD for the same reason.

This retires a big user of the mbuf API, and will ease maintenance of the
kernel.
 1.32 03-Jul-2017  wiz branches: 1.32.4; 1.32.6;
Remove workaround for ancient HTML generation code.
 1.31 06-Mar-2013  wiz Use more markup.
 1.30 11-Dec-2010  cegger branches: 1.30.6; 1.30.12;
ossaudio(3) -> compat/ossaudio and soundcard.h

suggested by Ian Hibbert
 1.29 11-Dec-2010  cegger add pci(4) and ossaudio(3)

yes, be careful. They can easily conflict. Actually when this happens kdump
fails compiling due to 'duplicate case value'
 1.28 14-May-2010  joerg Reorder sections to canonical order
 1.27 02-Oct-2009  cegger branches: 1.27.2;
fix grammar: a -> an
 1.26 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.25 02-May-2008  martin Move to standard 2 clause license
 1.24 07-Mar-2007  dogcow branches: 1.24.10; 1.24.12;
running in emulated wizd mode, convert caddr_t to void *.
 1.23 17-Sep-2006  plunky fix btsco(4) driver name
 1.22 19-Jun-2006  gdamore Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.) This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.
 1.21 17-Jun-2006  reed Fix typo or mispelling.
 1.20 01-May-2003  uebayasi branches: 1.20.12;
Typos, mostly a -> an.

Reviewed by: grant
 1.19 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.18 07-Apr-2003  wiz More e.g. cleanup. Igor Sobrado, PR 19692.
 1.17 14-Oct-2002  wiz New sentence, new line.
 1.16 11-Jun-2002  wiz Change i4b xrefs to isdn xrefs.
 1.15 28-Apr-2002  atatat Provide some documentation on the EPASSTHROUGH new world order.
 1.14 22-Apr-2002  enami Fix sample code:
- Put single space around binary operator or after a comma.
- Lineup case label with switch().
- ANSIfy.
- Use \e to print \.
- Deref the pointer to get a value.
 1.13 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.12 07-Dec-2001  wiz Massively improve markup, fix a sentence and two xrefs.
 1.11 13-Sep-2001  atatat Add mention of the _IO() ioctl type: ioctls that just frob something
in the kernel, but don't copy anything in or out.
 1.10 10-Sep-2001  wiz Use standard section headers.
 1.9 26-Jul-2001  bjh21 Another thing I found lying around: Mention every ioctl tag I could find in
the tree. Maybe this will stop people picking duplicates so often.
 1.8 01-Jul-2001  kristerw Corrected spelling of "-width".
 1.7 21-Jun-2001  wiz Fix typos, punctuation and whitespace.
 1.6 09-Apr-2001  wiz Fix xref, and whitespace.
XXX: this man page could do with some markup improvements
 1.5 07-Nov-2000  lukem fix up various .Nm abuses:
- keep the case consistent between the actual name and what's referenced.
e.g, if it's `foo', don't use '.Nm Foo' at the start of a sentence.
- remove unnecessary `.Nm foo' after the first occurrence (except for
using `.Nm ""' if there's stuff following, or for the 2nd and so on
occurrences in a SYNOPSIS
- use Sx, Ic, Li, Em, Sq, and Xr as appropriate
 1.4 19-Nov-1999  enami Don't pass so many args to .Nd macro. It just overflows.
 1.3 15-Sep-1999  hwr branches: 1.3.4;
Fix a typo.
 1.2 16-Mar-1999  garbled More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.1 07-Mar-1999  hwr Should fix misc/5934.
is@netbsd.org gave it's ok.
 1.3.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.20.12.1 19-Jun-2006  chap Sync with head.
 1.24.12.1 18-May-2008  yamt sync with head.
 1.24.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.27.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.30.12.1 23-Jun-2013  tls resync from head
 1.30.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.32.6.1 10-Jun-2019  christos Sync with HEAD
 1.32.4.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.6 12-Feb-2022  riastradh ipi(9): Document memory ordering guarantees.
 1.5 02-Sep-2020  riastradh Spell out acronyms in title for clarity.
 1.4 06-Apr-2019  wiz branches: 1.4.2;
Remove superfluous Pp.
 1.3 06-Apr-2019  thorpej Overhaul the API used to fetch and store individual memory cells in
userspace. The old fetch(9) and store(9) APIs (fubyte(), fuword(),
subyte(), suword(), etc.) are retired and replaced with new ufetch(9)
and ustore(9) APIs that can return proper error codes, etc. and are
implemented consistently across all platforms. The interrupt-safe
variants are no longer supported (and several of the existing attempts
at fuswintr(), etc. were buggy and not actually interrupt-safe).

Also augmement the ucas(9) API, making it consistently available on
all plaforms, supporting uniprocessor and multiprocessor systems, even
those that do not have CAS or LL/SC primitives.

Welcome to NetBSD 8.99.37.
 1.2 25-May-2014  wiz branches: 1.2.2; 1.2.6; 1.2.28;
Sort SEE ALSO. Wording improvements. Remove unnecessary Pp.
 1.1 25-May-2014  rmind MI IPI interface:
- Implement support for the asynchronous IPI calls.
- Rework synchronous IPI code to reuse the asynchronous mechanism.
- Add ipi(9) manual page; needs wizd(8).

Note: MD code can now provide a low level primitive for the ipi(9) and
reuse this interface instead of open-coding. Portmasters are encouraged
to convert. Ride 6.99.43!
 1.2.28.1 10-Jun-2019  christos Sync with HEAD
 1.2.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.6.1 25-May-2014  tls file ipi.9 was added on branch tls-maxphys on 2014-08-20 00:02:37 +0000
 1.2.2.2 10-Aug-2014  tls Rebase.
 1.2.2.1 25-May-2014  tls file ipi.9 was added on branch tls-earlyentropy on 2014-08-10 06:53:26 +0000
 1.4.2.1 13-Sep-2020  martin Pull up following revision(s) (requested by riastradh in ticket #1082):

share/man/man9/atomic_loadstore.9: revision 1.6
share/man/man9/ipi.9: revision 1.5
lib/libc/atomic/membar_ops.3: revision 1.6

Spell out acronyms in title for clarity.

Update membar_ops(3) man page with examples and relation to C11.

Add exhortation to always always always document how membars come in
pairs for synchronization between two CPUs when you use them.

atomic_load/store_* appeared in NetBSD 9, not 10.

Pullup preceded release of 9.0.
 1.10 15-Jul-2018  maxv Retire ipkdb entirely. The option was removed from the config files
yesterday.

ok kamil christos
 1.9 04-Sep-2009  apb branches: 1.9.46; 1.9.48;
Add cross references to new boothowto(9) man page.
 1.8 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.7 10-May-2007  itohy branches: 1.7.10; 1.7.12;
Add missing "
 1.6 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.5 14-Oct-2002  wiz New sentence, new line.
 1.4 02-Jun-2002  wiz Document ipkdb_trap based on comments by ws.
 1.3 25-May-2002  wiz Improve formatting. End list with .El.
 1.2 25-May-2002  wiz ispell
 1.1 25-May-2002  gmcgarry Document some mandatory machine-dependent interfaces. Addresses PR16272.
 1.7.12.1 18-May-2008  yamt sync with head.
 1.7.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.9.48.1 10-Jun-2019  christos Sync with HEAD
 1.9.46.1 28-Jul-2018  pgoyette Sync with HEAD
 1.20 30-May-2011  dyoung MI drivers should #include <sys/bus.h> not <machine/bus.h>.
 1.19 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.18 12-Mar-2009  joerg Replace vertical space with paragraph breaks.
 1.17 30-Apr-2008  martin branches: 1.17.6;
Convert TNF licenses to new 2 clause variant
 1.16 07-Mar-2007  dogcow branches: 1.16.10; 1.16.12;
running in emulated wizd mode, convert caddr_t to void *.
 1.15 29-Jan-2006  rpaulo More ktrace-lwp that I got wrong in the first try.

Thanks to Gregory McGarry for pointing this out.
 1.14 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.13 30-Jun-2003  wiz Add Ns.
 1.12 10-May-2003  wiz Bump date for last; new sentence, new line.
 1.11 10-May-2003  fvdl Document isa_drq_alloc/free.
 1.10 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.9 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.8 01-Jan-2003  jschauma defacto -> de facto
Pointed out by Igor Sobrado in PR misc/19633.
 1.7 14-Oct-2002  wiz New sentence, new line.
 1.6 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.5 26-Dec-2001  wiz Fix SEE ALSO section.
 1.4 04-Sep-2001  wiz Punctuation fixes.
 1.3 04-Sep-2001  wiz Boring whitespace fixes.
 1.2 05-Jul-2001  nathanw The I/O address space of ISA is 16 bits; correct this, but add a note
explaining why it is often treated as only having 10 bits of I/O
address space.
 1.1 01-Jul-2001  gmcgarry Add some missing documentation.
 1.16.12.1 18-May-2008  yamt sync with head.
 1.16.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.17.6.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.12 30-May-2011  dyoung MI drivers should #include <sys/bus.h> not <machine/bus.h>.
 1.11 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.10 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.9 26-Dec-2005  perry branches: 1.9.20; 1.9.22;
u_intN_t -> uintN_t
 1.8 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.7 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.6 14-Oct-2002  wiz New sentence, new line.
 1.5 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.4 26-Dec-2001  wiz Fix SEE ALSO section.
 1.3 04-Sep-2001  wiz Fix isa xrefs, and SEE ALSO.
 1.2 04-Sep-2001  wiz Boring whitespace fixes.
 1.1 01-Jul-2001  gmcgarry Add some missing documentation.
 1.9.22.1 18-May-2008  yamt sync with head.
 1.9.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.8 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.7 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.6 17-Jun-2006  reed branches: 1.6.18; 1.6.20;
Fix typo or mispelling.
 1.5 16-Apr-2003  wiz branches: 1.5.12;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.4 01-Feb-2003  jdolecek slightly adjust to clarify handling of zero time (tv_sec == tv_usec == 0)
- itimerfix() leaves the time as zero in this case, doesn't adjust to one tick

also use 'one tick' rather than mere 'tick' in first paragraph
 1.3 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.2 02-Dec-2001  wiz Drop a space, and mark-up EINVAL.
 1.1 02-Dec-2001  gmcgarry Documentation for itimerfix(9), from Christos Zoulas.
 1.5.12.1 19-Jun-2006  chap Sync with head.
 1.6.20.1 18-May-2008  yamt sync with head.
 1.6.18.1 02-Jun-2008  mjf Sync with HEAD.
 1.115 01-Jul-2025  bad correct the descriotion if KAUTH_CRED_COPY

Noticed by Vasyl Maksym Lanko.
Bump date.
 1.114 04-Oct-2023  ad branches: 1.114.2;
kauth_cred_hold(): return cred verbatim so that donating a reference to
another data structure can be done more elegantly.
 1.113 07-Aug-2021  isaki x68k now uses KAUTH_MACHDEP_UNMANAGEDMEM.
 1.112 15-Jul-2018  maxv Retire ipkdb entirely. The option was removed from the config files
yesterday.

ok kamil christos
 1.111 28-Aug-2017  wiz branches: 1.111.2; 1.111.4;
Remove superfluous Pp. Fix self-referencing xrefs. Improve others.
 1.110 28-Aug-2017  wiz Bump date for previous.
 1.109 28-Aug-2017  kamil Remove the filesystem tracing feature

This is a legacy interface from 4.4BSD, and it was
introduced to overcome shortcomings of ptrace(2) at that time, which are
no longer relevant (performance). Today /proc/#/ctl offers a narrow
subset of ptrace(2) commands and is not applicable for modern
applications use beyond simplistic tracing scenarios.

This removal will simplify kernel internals. Users will still be able to
use all the other /proc files.

This change won't affect other procfs files neither Linux compat
features within mount_procfs(8). /proc/#/ctl isn't available on Linux.

Remove:
- /proc/#/ctl from mount_procfs(8)
- P_FSTRACE note from the documentation of ps(1)
- /proc/#/ctl and filesystem tracing documentation from mount_procfs(8)
- KAUTH_REQ_PROCESS_PROCFS_CTL documentation from kauth(9)
- source code file miscfs/procfs/procfs_ctl.c
- PFSctl and procfs_doctl() from sys/miscfs/procfs/procfs.h
- KAUTH_REQ_PROCESS_PROCFS_CTL from sys/sys/kauth.h
- PSL_FSTRACE (0x00010000) from sys/sys/proc.h
- P_FSTRACE (0x00010000) from sys/sys/sysctl.h

Reduce code complexity after removal of this functionality.

Update TODO.ptrace accordingly: remove two entries about /proc tracing.

Do not keep legacy notes as comments in the headers about removed
PSL_FSTRACE / P_FSTRACE, as this interface had little number of users
(close or equal to zero).

Proposed on tech-kern@.

All filesystem tracing utility users are encouraged to switch to ptrace(2).

Sponsored by <The NetBSD Foundation>
 1.108 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.107 18-Mar-2017  riastradh branches: 1.107.4;
Use `\(em', not `--'.

Refill sentences and tweak wording where appropriate while here.
 1.106 26-Feb-2017  riastradh Clarify that kauth_cred_get doesn't modify with reference count.
 1.105 18-Mar-2014  riastradh branches: 1.105.8; 1.105.12;
Merge riastradh-drm2 to HEAD.
 1.104 20-Jul-2013  wiz Use Mt for email addresses.
 1.103 03-Jul-2012  cheusov branches: 1.103.2; 1.103.4;

Fix documentation for function kauth_register_key (PR 46641).
 1.102 27-Jun-2012  wiz Bump date for previous.
 1.101 27-Jun-2012  cheusov Add new action KAUTH_CRED_CHROOT for kauth(9)'s credential scope.
Reviewed and approved by elad@.
 1.100 17-Mar-2012  njoly Small typo.
 1.99 14-Mar-2012  wiz Bump date for previous.
Spell "file system" like in other man pages.
Fix typos.
 1.98 13-Mar-2012  elad Replace the remaining KAUTH_GENERIC_ISSUSER authorization calls with
something meaningful. All relevant documentation has been updated or
written.

Most of these changes were brought up in the following messages:

http://mail-index.netbsd.org/tech-kern/2012/01/18/msg012490.html
http://mail-index.netbsd.org/tech-kern/2012/01/19/msg012502.html
http://mail-index.netbsd.org/tech-kern/2012/02/17/msg012728.html

Thanks to christos, manu, njoly, and jmmv for input.

Huge thanks to pgoyette for spinning these changes through some build
cycles and ATF.
 1.97 11-Mar-2012  njoly Use Lk macro instead of Pa when dealing with URLs, to produce links
with HTML output. And while here update some dead URL links.
First part of PR/29238.
 1.96 17-Jan-2012  cegger fix secmodel implementation of CPU_UCODE.
ok wiz@ for the manpages
ok elad@
 1.95 04-Dec-2011  jym KAUTH_GENERIC_CANSEE is no more.
 1.94 04-Dec-2011  jym GETPARAMS => GETPARAM
SETPARAMS => SETPARAM
 1.93 08-Nov-2011  wiz Remove trailing whitespace. New sentence, new line.
 1.92 08-Nov-2011  jym Small improvements to kauth(9).
 1.91 28-Apr-2011  wiz branches: 1.91.4;
Typo fix.
 1.90 25-Apr-2011  wiz Add missing word.
 1.89 08-Dec-2009  mbalmer Fix typographics errors.
 1.88 10-Aug-2009  wiz Bump date for previous.
 1.87 10-Aug-2009  plunky reduce the number of KAUTH_DEVICE_BLUETOOTH_SEND/RECV requests
by passing the packet type as an argument rather than having
a different request for each type.

(from a suggestion by mrg)
 1.86 10-Aug-2009  plunky remove last usage of KAUTH_ISSUSER in bluetooth code by adding
some requests to the device scope:

KAUTH_DEVICE_BLUETOOTH_SEND_COMMAND
KAUTH_DEVICE_BLUETOOTH_RECV_COMMAND
KAUTH_DEVICE_BLUETOOTH_RECV_EVENT
KAUTH_DEVICE_BLUETOOTH_RECV_DATA

and a listener tied to the HCI protocol that will approve the basic
minimum to be sent and received.

handle the requests in the bsd44_suser listener by approving all
when the credential is root.
 1.85 08-May-2009  wiz Spelling fixes.
 1.84 08-May-2009  elad Add and use a network scope action/request for tun(4), similar to ppp(4),
sl(4), and strip(4).
 1.83 07-May-2009  elad Introduce several actions/requests for authorizing file-system related
operations, specifically quota and block allocation from reserved space.

Modify ufs_quotactl() to accomodate passing "mp" earlier by vfs_busy()ing
it a little bit higher.

Mailing list reference:

http://mail-index.netbsd.org/tech-kern/2009/04/26/msg004936.html

Note that the umapfs request mentioned in this thread was NOT added as
there is still on-going discussion regarding the proper implementation.
 1.82 07-May-2009  elad Introduce actions/requests to handle authorization for ppp(4), sl(4),
strip(4), btuart(4) and bcsp(4) network interfaces and devices.

Mailing list reference:

http://mail-index.netbsd.org/tech-kern/2009/04/27/msg004955.html
 1.81 07-May-2009  wiz Remove .Pp before and after .Ss.
 1.80 07-May-2009  elad .Sy -> .Ss for a subsection header.

Pointed out by wiz@, thanks!
 1.79 05-May-2009  elad Add device scope actions for rnd(4) and use them.

Mailing list reference:

http://mail-index.netbsd.org/tech-kern/2009/04/27/msg004953.html
 1.78 03-May-2009  wiz Remove Pp before Ss.
 1.77 03-May-2009  elad Add a bluetooth action to the device scope and use it in netbt as a
replacement for KAUTH_GENERIC_ISSUSER.

Mailing list reference:

http://mail-index.netbsd.org/tech-kern/2009/04/25/msg004905.html

Bluetooth-specific authorization wrapper might come later.
 1.76 20-Apr-2009  elad Document KAUTH_REQ_NETWORK_BIND_PORT.
 1.75 16-Apr-2009  wiz exec(3), not (2).
 1.74 15-Apr-2009  elad Remove a few KAUTH_GENERIC_ISSUSER in favor of more descriptive
alternatives.

Discussed on tech-kern:

http://mail-index.netbsd.org/tech-kern/2009/04/11/msg004798.html

Input from ad@, christos@, dyoung@, tsutsui@.

Okay ad@.
 1.73 15-Mar-2009  joerg Provide -width for -tag lists.
 1.72 12-Nov-2008  ad branches: 1.72.2;
Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.71 23-Sep-2008  pooka Make kauth_cred_setgroups() signature match the const, hard reality.
 1.70 28-Feb-2008  elad branches: 1.70.2;
Introduce a new kauth action, KAUTH_NETWORK_NFS, and two requests,
KAUTH_REQ_NETWORK_NFS_EXPORT and KAUTH_REQ_NETWORK_NFS_SVC, and use them
to replace two KAUTH_GENERIC_ISSUSER calls in the NFS code.

Also replace two more with KAUTH_SYSTEM_MKNOD, where appropriate.

Documetnation and examples updated. More to come.
 1.69 28-Feb-2008  elad Factor out the guts of get/setparam so it can be used from the compat code.

Make the FreeBSD and Linux compat code convert the parameters to their
native representation and call the native routines.

Remove KAUTH_PROCESS_SCHEDULER_GET/SET.

Update documentation and examples.

XXX: For now, only the Linux compat code does the priority conversion
XXX: right.

Linux priority conversion code from yamt@, thanks!

Okay yamt@.
 1.68 16-Feb-2008  elad branches: 1.68.2;
Fold KAUTH_REQ_PROCESS_SCHEDULER_* to KAUTH_PROCESS_SCHEDULER_*. In other
words, don't pass an action and a request, and just use a single action to
indicate what is the operation in question.

This is the first step in fixing PR/37986, which calls for policy/priority
checking in the secmodel code. Right now we're lacking room for another
parameter required to make a decision, and this change makes room for such.
 1.67 02-Feb-2008  elad Add, document, and use KAUTH_REQ_PROCESS_KTRACE_PERSISTENT.
 1.66 01-Feb-2008  elad Replace a KAUTH_GENERIC_ISSUSER in the cpuctl code with a proper kauth
request.

Reviewed by ad@, tested by me.
 1.65 30-Jan-2008  elad Use proper kauth(9) actions/requests for native scheduler stuff and the
recently introduced processor-sets.

Discussed with and okay rmind@, yamt@, and christos@.
 1.64 23-Jan-2008  elad Bump date.
 1.63 23-Jan-2008  elad Tons of process scope changes.

- Add a KAUTH_PROCESS_SCHEDULER action, to handle scheduler related
requests, and add specific requests for set/get scheduler policy and
set/get scheduler parameters.

- Add a KAUTH_PROCESS_KEVENT_FILTER action, to handle kevent(2) related
requests.

- Add a KAUTH_DEVICE_TTY_STI action to handle requests to TIOCSTI.

- Add requests for the KAUTH_PROCESS_CANSEE action, indicating what
process information is being looked at (entry itself, args, env,
open files).

- Add requests for the KAUTH_PROCESS_RLIMIT action indicating set/get.

- Add requests for the KAUTH_PROCESS_CORENAME action indicating set/get.

- Make bsd44 secmodel code handle the newly added rqeuests appropriately.

All of the above make it possible to issue finer-grained kauth(9) calls in
many places, removing some KAUTH_GENERIC_ISSUSER requests.

- Remove the "CAN" from KAUTH_PROCESS_CAN{KTRACE,PROCFS,PTRACE,SIGNAL}.

Discussed with christos@ and yamt@.
 1.62 09-Jan-2008  simonb Remove support for NetBSD/pc532.
 1.61 09-Jan-2008  simonb Remove some old sh5 references.
 1.60 07-Jan-2008  elad Make fork use kauth.

Been running in my tree for over a month at least.

Reviewed and okay yamt@, and special thanks to him as well as rittera@
for making this possible through fixing NDIS to not call fork1() with
l1 != curlwp.
 1.59 31-Dec-2007  ad Remove systrace. Ok core@.
 1.58 27-Nov-2007  elad Add a NOTES section to the manual, indicating that kauth(9) is still under
active development and its ABI (and possibly API) may change between
NetBSD versions.

This is critical to, for example, LKMs, where there might be a case of them
being built using one version of the ABI and used on system with another.

The main concern for "ABI" here is the set of KAUTH_* actions and requests
that is (for now) an enum. This note is likely to be removed as kauth(9)
is stablized -- hopefully before NetBSD 5.0.

okay christos@
 1.57 25-Nov-2007  elad Deprecate KAUTH_REQ_SYSTEM_TIME_BACKWARDS, as it was merged into
KAUTH_REQ_SYSTEM_TIME_SYSTEM.
 1.56 25-Nov-2007  elad Refactor time modification checks and place them in the secmodel code.

okay christos@
 1.55 23-Nov-2007  elad Fix typo.
 1.54 23-Nov-2007  elad Kill another instance of KAUTH_GENERIC_ISSUSER.
 1.53 23-Sep-2007  yamt use a correct type for UIO_*.
 1.52 11-Jul-2007  dsl branches: 1.52.4;
Document the 'flags' parameter to kauth_cred_set/getgroups.
Fix some obvious typos in the return types and return values of these
functions.
 1.51 31-Jan-2007  elad Add a new scope, the credentials scope, which is internal to the kauth(9)
implementation and meant to be used by security models to hook credential
related operations (init, fork, copy, free -- hooked in kauth_cred_alloc(),
kauth_proc_fork(), kauth_cred_clone(), and kauth_cred_free(), respectively)
and document it.

Add specificdata to credentials, and routines to register/deregister new
"keys", as well as set/get routines. This allows security models to add
their own private data to a kauth_cred_t.

The above two, combined, allow security models to control inheritance of
their own private data in credentials which is a requirement for doing
stuff like, I dunno, capabilities?
 1.50 28-Jan-2007  elad Talk about special cases for kauth_authorize_action().
 1.49 27-Jan-2007  elad Remove extra '.El', left in previous commit.
 1.48 20-Jan-2007  elad Kill KAUTH_PROCESS_RESOURCE and just replace it with two actions for
nice and rlimit.
 1.47 15-Jan-2007  elad Introduce kauth_proc_fork() to control credential inheritance.
 1.46 09-Jan-2007  elad Remove advertising clause from all of my stuff.
 1.45 02-Jan-2007  elad Make mount(2) and unmount(2) use kauth(9) for security policy.

Okay yamt@.
 1.44 01-Jan-2007  elad Make kauth_deregister_scope() and kauth_unlisten_scope() free the
passed kauth_scope_t and kauth_listener_t objects, respectively.

Okay yamt@.
 1.43 26-Dec-2006  elad Make machdep scope architecture-agnostic by removing all arch-specific
requests and centralizing them all. The result is that some of these
are not used on some architectures, but the documentation was updated
to reflect that.
 1.42 23-Dec-2006  wiz Use Dv for defined values.
 1.41 23-Dec-2006  wiz Fix sections in Xrefs.
 1.40 22-Dec-2006  elad Add requests indicating access to unmanaged memory for arm, pc532, powerpc,
sh3, sh5, and vax, and use them instead of KAUTH_GENERIC_ISSUSER.

Update documentation and example secmodel code.
 1.39 19-Dec-2006  elad Some changes to get rid of another KAUTH_GENERIC_ISSUSER usage:
- Make procfs_control() in procfs_ctl.c static,
- Add an argument to the above, 'pfs', for the pfsnode,
- Add another request type to KAUTH_PROCESS_CANPROCFS named
KAUTH_REQ_PROCESS_CANPROCFS_CTL (and update documentation),
- Use the above combination in a call to kauth_authorize_process().
 1.38 14-Dec-2006  elad - moves 'nice' access semantics to secmodel code,
- makes sysctl_proc_find() just lookup the process,
- use KAUTH_PROCESS_CANSEE requests to determine if the caller is
allowed to view the target process' corename, stop flags, and
rlimits,
- use explicit kauth(9) calls with KAUTH_PROCESS_CORENAME,
KAUTH_REQ_PROCESS_RESOURCE_NICE, KAUTH_REQ_PROCESS_RESOURCE_RLIMIT,
and KAUTH_PROCESS_STOPFLAG when modifying the aforementioned.
- sync man-page and example skeleton secmodel with reality.

okay yamt@

this is a pullup candidate.
 1.37 02-Dec-2006  elad Change kauth(9) KPI for kauth_authorize_device_passthru() to add another
argument, u_long, serving as a bit-mask of generic requests for the
passthru request.

Discussed on tech-security@ and tech-kern@. Okay tls@.
 1.36 28-Nov-2006  elad branches: 1.36.2;
Move ktrace, ptrace, systrace, and procfs to use kauth(9).

First, remove process_checkioperm() calls from MD code. Similar checks
using kauth(9) routines (on the process scope, using appropriate action)
are done in the callers.

Add secmodel back-end to handle each subsystem.
 1.35 22-Nov-2006  elad Introduce KAUTH_REQ_MACHDEP_{ALPHA,X86}_UNMANAGEDMEM to handle access
to unmanaged memory.

These are the last two securelevel references in the MD code.
 1.34 19-Nov-2006  elad Provide a standard authorization wrapper for the device scope.
 1.33 15-Nov-2006  elad First attempt at an examples section, and while here also add some notes
about extending kauth(9).
 1.32 04-Nov-2006  elad Sync with reality.
 1.31 30-Oct-2006  wiz Avoid punctuation markup; remove pastos (?).
 1.30 30-Oct-2006  elad Use integers, not pointers to integers, for KAUTH_REQ_NETWORK_SOCKET_OPEN.

Reminded by yamt@, thanks!
 1.29 26-Oct-2006  elad Don't take chances... properly document KAUTH_NETWORK_INTERFACE. On a
second thought having that warning just in the CVS log doesn't look too
helpful. :)
 1.28 26-Oct-2006  elad Document that arg1 and arg2 for KAUTH_NETWORK_INTERFACE are optional.
Document that arg3 is optionally the interface-specific request. Should
only make sense if we pass ifnet * in arg1!
 1.27 25-Oct-2006  elad Introduce KAUTH_REQ_NETWORK_SOCKET_OPEN, to check if opening a socket is
allowed. It takes three int * arguments indicating domain, type, and
protocol. Replace previous KAUTH_REQ_NETWORK_SOCKET_RAWSOCK with it (but
keep it still).

Places that used to explicitly check for privileged context now don't
need it anymore, so I replaced these with XXX comment indiacting it for
future reference.

Documented and updated examples as well.
 1.26 24-Oct-2006  elad Sync documentation for KAUTH_PROCESS_CANSIGNAL with reality.
 1.25 22-Oct-2006  elad Use consistent wording.

While here, undocument converstion routines for pcred/ucred, as these are
going to be deprecated. They already are, actually, but because we exposed
them to userland so cleverly with sysctl, it may require more thinking
before actually removing them. For now, just make sure nobody relies on
these types. Or at least try...
 1.24 22-Oct-2006  pooka reflect kauth uucred routine changes

thanks to Elad for reminding
 1.23 21-Oct-2006  elad Document KAUTH_NETWORK_INTERFACE arguments.
 1.22 20-Oct-2006  elad Introduce a new action on the network scope, KAUTH_NETWORK_INTERFACE,
used to manage network interfaces.

Add four sub-actions to fulfill generic needs for now, until a more
carefully defined usage of the interface is documented: get, set,
getpriv, and setpriv.
 1.21 20-Oct-2006  elad Add a new ALTQ kauth(9) request, KAUTH_REQ_NETWORK_ALTQ_JOBS.
 1.20 13-Oct-2006  elad Introduce KAUTH_REQ_NETWORK_SOCKET_CANSEE. Since we're not gonna be having
credentials on sockets, at least not anytime soon, this is a way to check
if we can "look" at a socket. Later on when (and if) we do have socket
credentials, the interface usage remains the same because we pass the
socket.

This also fixes sysctl for inet/inet6 pcblist.
 1.19 03-Oct-2006  wiz Use present tense for device scope, like for the others.
 1.18 30-Sep-2006  elad Some mdoc cleanup.
 1.17 30-Sep-2006  elad Implement the "device" scope.

It uses an authorization wrapper per device class on the system to
ensure type-safety.

For now, it supports only terminal (TTY) devices, and has two actions
for them: "open terminal" and "privileged set". Sample usage has been
added to i386 and hp300 code for reference.

Update documentation.
 1.16 23-Sep-2006  wiz Drop trailing spaces.
 1.15 19-Sep-2006  elad Lose (void *) casts on the machdep scope authorization wrapper. Update
documentation.
 1.14 19-Sep-2006  elad Remove ugly (void *) casts from network scope authorization wrapper and
calls to it.

While here, adapt code for system scope listeners to avoid some more
casts (forgotten in previous run).

Update documentation.
 1.13 17-Sep-2006  wiz Typo fix. Plural fixes.
 1.12 17-Sep-2006  elad Update kauth(9) that was forgotten in the big secmodel commit, and some
markup fixes.
 1.11 14-Aug-2006  ad Minor update for per-LWP creds.
 1.10 22-Jul-2006  elad sync with reality.
 1.9 20-Jul-2006  elad add note about how listeners should not sleep.
 1.8 17-Jul-2006  elad correct documentation wrt/KAUTH_PROCESS_CANSEE.
 1.7 17-Jul-2006  ad Sync with reality.
 1.6 16-Jul-2006  elad add KAUTH_GENERIC_CANSEE, which is like the KAUTH_PROCESS_CANSEE, only
for two kauth_cred_t rather than kauth_cred_t and struct proc *.

advise against using it in the man-page; it should be used only in cases
where we either don't have an object-specific op or when we can't easily
use one.
 1.5 14-Jul-2006  elad kauth(9) will be in netbsd 4.0.
 1.4 28-May-2006  yamt remove kauth_cred_destroy.
 1.3 14-May-2006  yamt branches: 1.3.2;
add a missing \ .
 1.2 14-May-2006  elad add kauth man-page.
 1.1 10-Mar-2006  elad branches: 1.1.2;
file kauth.9 was initially added on branch elad-kernelauth.
 1.1.2.22 08-Apr-2006  wiz New sentence, new line. Use Dv. Avoid a few abbreviations.
 1.1.2.21 05-Apr-2006  elad modest thanks to a friend.
 1.1.2.20 30-Mar-2006  elad mdoc fixes + make link work
 1.1.2.19 21-Mar-2006  elad mdoc(7) fixes, from jmmv@.
 1.1.2.18 16-Mar-2006  elad Minor mdoc, whitespace, and spelling fixes.
From Peter Postma, thanks!
 1.1.2.17 14-Mar-2006  elad Reflect recent changes in group management routines.
 1.1.2.16 12-Mar-2006  elad Wording nits.
 1.1.2.15 12-Mar-2006  elad Document how listener synchronization should be done by using reference
counting and garbage collection for cleanup.
 1.1.2.14 12-Mar-2006  elad Locking is done internally and should be documented as part of the KPI.
 1.1.2.13 12-Mar-2006  elad kauth_cred_compare() -> kauth_cred_uucmp(),
kauth_cred_convert() -> kauth_cred_uucvt().
 1.1.2.12 12-Mar-2006  elad Document how each of the arguments is treated depending on the op in
each scope.

While here do some cleanup.
 1.1.2.11 12-Mar-2006  elad Spacing nit.
 1.1.2.10 12-Mar-2006  elad Remove kauth_cred_memcmp().
 1.1.2.9 11-Mar-2006  elad mdoc fixups.
 1.1.2.8 11-Mar-2006  elad Be clear about what values authorization requests can return.
 1.1.2.7 11-Mar-2006  elad Fix a documentation mistake from the previous commit.

It is not clear from Apple's TN2127 what the listener cookie is for, and
the NetBSD kauth(9) code reflects that (it does not use the listener
cookie for anything).

Comment out that bit in the man-page for now.
 1.1.2.6 11-Mar-2006  elad Add some information about managing scopes and listeners.
 1.1.2.5 11-Mar-2006  elad Document kauth_cred_ismember_gid() and deprecate kauth_cred_groupmember().
 1.1.2.4 11-Mar-2006  elad Wording nit.
 1.1.2.3 10-Mar-2006  elad We no longer have kauth_cred_zero().
 1.1.2.2 10-Mar-2006  elad Document that kauth_cred_convert() sets the reference count to one.

While I'm here, also document kauth_cred_getrefcnt().
 1.1.2.1 10-Mar-2006  elad Add man-page for kernel authorization.
 1.3.2.1 19-Jun-2006  chap Sync with head.
 1.36.2.7 15-Dec-2007  pavel Pull up following revisions (requested by elad in ticket #1003):
share/man/man9/kauth.9: revision 1.58
Add a NOTES section to the manual, indicating that kauth(9) is still under
active development and its ABI (and possibly API) may change between
NetBSD versions.

This is critical to, for example, LKMs, where there might be a case of them
being built using one version of the ABI and used on system with another.

The main concern for "ABI" here is the set of KAUTH_* actions and requests
that is (for now) an enum. This note is likely to be removed as kauth(9)
is stablized -- hopefully before NetBSD 5.0.
okay christos@
 1.36.2.6 02-Feb-2007  tron branches: 1.36.2.6.2;
Pull up following revision(s) (requested by elad in ticket #391):
share/man/man9/kauth.9: revision 1.49 via patch
Remove extra '.El', left in previous commit.
 1.36.2.5 21-Jan-2007  bouyer Pull up following revision(s) (requested by elad in ticket #379):
sys/secmodel/bsd44/secmodel_bsd44_suser.c: revision 1.33 via patch
share/examples/secmodel/secmodel_example.c: revision 1.14 via patch
sys/sys/kauth.h: revision 1.35 via patch
sys/kern/kern_resource.c: revision 1.112 via patch
share/man/man9/kauth.9: revision 1.48 via patch
Kill KAUTH_PROCESS_RESOURCE and just replace it with two actions for
nice and rlimit.
 1.36.2.4 06-Jan-2007  bouyer Pull up following revision(s) (requested by elad in ticket #322):
share/man/man9/kauth.9: revision 1.44
sys/kern/kern_auth.c: revision 1.36
Make kauth_deregister_scope() and kauth_unlisten_scope() free the
passed kauth_scope_t and kauth_listener_t objects, respectively.
Okay yamt@.
 1.36.2.3 06-Jan-2007  bouyer Pull up following revision(s) (requested by elad in ticket #316):
share/examples/secmodel/secmodel_example.c: revision 1.10 via patch
sys/arch/i386/i386/sys_machdep.c: revision 1.79
sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.31
share/man/man9/secmodel_bsd44.9: revision 1.9
sys/arch/vax/vax/mem.c: revision 1.34 via patch
sys/arch/sh3/sh3/mem.c: revision 1.23 via patch
sys/arch/sh5/sh5/mem.c: revision 1.14 via patch
sys/secmodel/bsd44/secmodel_bsd44_suser.c: revision 1.22 via patch
sys/arch/powerpc/powerpc/mem.c: revision 1.27 via patch
sys/arch/x86/x86/x86_machdep.c: revision 1.5
sys/arch/alpha/alpha/machdep.c: revision 1.291
sys/arch/arm/arm32/mem.c: revision 1.17 via patch
sys/secmodel/bsd44/secmodel_bsd44_securelevel.c: revision 1.20
sys/sys/kauth.h: revision 1.29 via patch
sys/arch/amd64/amd64/sys_machdep.c: revision 1.10
share/man/man9/kauth.9: revision 1.43 via patch
sys/arch/xen/i386/sys_machdep.c: revision 1.10
sys/kern/kern_auth.c: revision 1.35
sys/arch/pc532/pc532/mem.c: revision 1.43 via patch
Make machdep scope architecture-agnostic by removing all arch-specific
requests and centralizing them all. The result is that some of these
are not used on some architectures, but the documentation was updated
to reflect that.
 1.36.2.2 04-Jan-2007  bouyer Pull up following revision(s) (requested by hubert in ticket #334):
share/man/man9/kauth.9: revision 1.39
sys/miscfs/procfs/procfs_ctl.c: revision 1.38
sys/sys/kauth.h: revision 1.27
Some changes to get rid of another KAUTH_GENERIC_ISSUSER usage:
- Make procfs_control() in procfs_ctl.c static,
- Add an argument to the above, 'pfs', for the pfsnode,
- Add another request type to KAUTH_PROCESS_CANPROCFS named
KAUTH_REQ_PROCESS_CANPROCFS_CTL (and update documentation),
- Use the above combination in a call to kauth_authorize_process().
 1.36.2.1 04-Dec-2006  tron Pull up following revision(s) (requested by elad in ticket #247):
sys/dev/ic/dpt.c: revision 1.55
sys/dev/pci/amr.c: revision 1.43
sys/secmodel/bsd44/secmodel_bsd44_securelevel.c: revision 1.19
sys/dev/pci/mly.c: revision 1.33
share/man/man9/kauth.9: revision 1.37
sys/dev/ic/mlx.c: revision 1.49
sys/dev/ic/icp_ioctl.c: revision 1.14
sys/dev/i2o/iop.c: revision 1.62
sys/dev/pci/twe.c: revision 1.82
sys/sys/kauth.h: revision 1.25
sys/dev/i2o/dpti.c: revision 1.31
sys/kern/kern_auth.c: revision 1.33
sys/dev/tc/stic.c: revision 1.37
Change kauth(9) KPI for kauth_authorize_device_passthru() to add another
argument, u_long, serving as a bit-mask of generic requests for the
passthru request.
Discussed on tech-security@ and tech-kern@. Okay tls@.
 1.36.2.6.2.1 06-Jan-2008  wrstuden Catch up to netbsd-4.0 release.
 1.52.4.3 23-Mar-2008  matt sync with HEAD
 1.52.4.2 09-Jan-2008  matt sync with HEAD
 1.52.4.1 06-Nov-2007  matt sync with HEAD
 1.68.2.1 24-Mar-2008  keiichi sync with head.
 1.70.2.2 05-Oct-2008  mjf Sync with HEAD.
 1.70.2.1 28-Feb-2008  mjf file kauth.9 was added on branch mjf-devfs2 on 2008-10-05 20:11:23 +0000
 1.72.2.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.91.4.4 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.91.4.3 30-Oct-2012  yamt sync with head
 1.91.4.2 17-Apr-2012  yamt sync with head
 1.91.4.1 10-Nov-2011  yamt sync with head
 1.103.4.1 23-Jul-2013  riastradh sync with HEAD
 1.103.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.105.12.1 21-Apr-2017  bouyer Sync with HEAD
 1.105.8.1 20-Mar-2017  pgoyette Sync with HEAD
 1.107.4.1 12-Apr-2018  martin Pull up following revision(s) (requested by kamil in ticket #713):

sys/modules/procfs/Makefile: revision 1.4
sys/miscfs/procfs/procfs_vfsops.c: revision 1.98
bin/ps/ps.1: revision 1.108
sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.32
sys/miscfs/procfs/procfs_vnops.c: revision 1.198
sys/kern/sys_ptrace_common.c: revision 1.23
sys/kern/sys_ptrace_common.c: revision 1.24
sbin/mount_procfs/mount_procfs.8: revision 1.36
sys/kern/sys_ptrace_common.c: revision 1.25
sys/kern/sys_ptrace.c: revision 1.5
sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.30
sys/sys/proc.h: revision 1.342
sys/kern/sys_ptrace_common.c: revision 1.26
sys/miscfs/procfs/procfs_ctl.c: file removal
sys/kern/sys_ptrace_common.c: revision 1.27
sys/miscfs/procfs/procfs_subr.c: revision 1.109
sys/kern/sys_ptrace_common.c: revision 1.28
sys/secmodel/extensions/secmodel_extensions.c: revision 1.8
sys/kern/sys_ptrace_common.c: revision 1.29
sys/sys/ptrace.h: revision 1.62
sys/compat/netbsd32/netbsd32_signal.c: revision 1.45
share/man/man9/kauth.9: revision 1.109
sys/miscfs/procfs/files.procfs: revision 1.12
sys/compat/netbsd32/netbsd32.h: revision 1.115
sys/miscfs/procfs/procfs.h: revision 1.72
sys/compat/netbsd32/netbsd32_ptrace.c: revision 1.5
sys/kern/kern_sig.c: revision 1.337
sys/sys/kauth.h: revision 1.75
sys/sys/sysctl.h: revision 1.224
sys/kern/sys_ptrace_common.c: revision 1.30
sys/kern/sys_ptrace_common.c: revision 1.31
sys/kern/sys_ptrace_common.c: revision 1.32
sys/kern/sys_ptrace_common.c: revision 1.33
sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.20
sys/kern/sys_ptrace_common.c: revision 1.34
sys/kern/sys_ptrace_common.c: revision 1.36
sys/kern/kern_proc.c: revision 1.207
sys/kern/kern_exit.c: revision 1.269
doc/TODO.ptrace: revision 1.29

Make {s,g}et{db,fp,}regs work again for PK_32 processes
XXX: pullup-8

add disgusting magic to handle compat_netbsd32 as a module.

use process_*reg32 instead of struct *reg32.

Remove the filesystem tracing feature

This is a legacy interface from 4.4BSD, and it was
introduced to overcome shortcomings of ptrace(2) at that time, which are
no longer relevant (performance). Today /proc/#/ctl offers a narrow
subset of ptrace(2) commands and is not applicable for modern
applications use beyond simplistic tracing scenarios.

This removal will simplify kernel internals. Users will still be able to
use all the other /proc files.

This change won't affect other procfs files neither Linux compat
features within mount_procfs(8). /proc/#/ctl isn't available on Linux.

Remove:
- /proc/#/ctl from mount_procfs(8)
- P_FSTRACE note from the documentation of ps(1)
- /proc/#/ctl and filesystem tracing documentation from mount_procfs(8)
- KAUTH_REQ_PROCESS_PROCFS_CTL documentation from kauth(9)
- source code file miscfs/procfs/procfs_ctl.c
- PFSctl and procfs_doctl() from sys/miscfs/procfs/procfs.h
- KAUTH_REQ_PROCESS_PROCFS_CTL from sys/sys/kauth.h
- PSL_FSTRACE (0x00010000) from sys/sys/proc.h
- P_FSTRACE (0x00010000) from sys/sys/sysctl.h

Reduce code complexity after removal of this functionality.

Update TODO.ptrace accordingly: remove two entries about /proc tracing.

Do not keep legacy notes as comments in the headers about removed

PSL_FSTRACE / P_FSTRACE, as this interface had little number of users
(close or equal to zero).
Proposed on tech-kern@.

All filesystem tracing utility users are encouraged to switch to ptrace(2).

Sponsored by <The NetBSD Foundation>

untangle the mess:
- factor out common code
- break each ptrace subcall to its own sub-function
.. more to come ...
- reduce ifdef ugliness by moving it up top.
- factor out PT_IO and make PT_{READ,WRITE}_{I,D} use it
- factor out PT_DUMPCORE
- factor out sendsig code
.. more to come ...

handle siginfo requests for ptrace32

ptrace: Partially undo PT_{READ,WRITE}_{I,D} and unbreak these commands

The refactored code did not work and was generating EFAULT.

Sponsored by <The NetBSD Foundation>

Merge the code back; the problem was that since we are reading/writing
to a kernel address for PT_{READ,WRITE}_{I,D} we need the kernel vmspace.
provide separate read and write functions to accomodate register functions
that need a size argument.

don't ignore error from copyout_piod

Use the proper process (the tracee) to get information about lwps and
registers and the tracer for vmspace.

Add new sysctl(3) entry: security.models.extensions.user_set_dbregs

Model this new sysctl(3) entry after "user_set_cpu_affinity" in the same
level of sysctl(3) switches.

Allow to read unconditionally Debug Registers (no change here). This is
convenient as even if a user of a debugger does not use hardware assisted
watchpoints/breakpoints, a debugger can still prompt these values to store
in an internal cache with context of registers. Reading them should have
no security concerns.

Add a paranoid MI switch that prohibits by default setting these registers
by a regular user (non-superuser). Make this switch disabled by default.
There are enough reserved bits out there to allow using them
unconditionally on hardened hosts.

Features shipped with Debug Registers are optional features in debuggers.
There is no reduction in elementary functionality.

Reviewed by <christos>

Sponsored by <The NetBSD Foundation>
 1.111.4.1 10-Jun-2019  christos Sync with HEAD
 1.111.2.1 28-Jul-2018  pgoyette Sync with HEAD
 1.114.2.1 02-Aug-2025  perseant Sync with HEAD
 1.10 14-Jul-2007  ad - kcont was removed.
- Replace some references to tsleep.
 1.9 24-Nov-2005  yamt .Xr kcont and workqueue each other.
 1.8 18-Nov-2005  wiz Bump date for previous.
 1.7 17-Nov-2005  jld Fix names of constants to match the actual header.
 1.6 24-Mar-2004  snj We can't guarantee that the continuation will run at the specified IPL,
so desired_ipl is a better name than continue_ipl.

Suggested by jonathan@
 1.5 24-Mar-2004  snj It's continue_ipl, not desired_ipl.
 1.4 23-Mar-2004  wiz .Nd should not end in a dot or start with an article;
there is no sleep(9); use Ar for function arguments; mark up
KCL_IPL* and IPL_* with .Dv; restore a "K" that was lost; use
even more .Dq for double-quoted strings; mark up author with .An.
 1.3 23-Mar-2004  snj Remove superfluous Nm.
 1.2 23-Mar-2004  snj Bump date to match date this file was added. Drop trailing space. Clean
up ugly usage of Fn. Correct Nm usage. New sentence, new line. Use Sq
and Dq for single and double quotes, respectively. Listify. Slight grammar
fixes. Fix Fn usage. Use Nx instead of NetBSD. Remove unnecessary comma.

Over to you, wiz.
 1.1 23-Mar-2004  jonathan Commit draft kcont.9 (really, this time).
 1.7 06-Apr-2017  dholland Add missing .Sh RETURN VALUES
 1.6 30-Apr-2008  martin branches: 1.6.46; 1.6.50;
Convert TNF licenses to new 2 clause variant
 1.5 04-Apr-2006  wiz branches: 1.5.20; 1.5.22;
Bump date for previous.
 1.4 04-Apr-2006  mrg actually, chuq says that now kcopy(9) should return a real errno in
the failure case (usually what ever uvm_fault() returned.)
 1.3 04-Apr-2006  mrg be explicit about what the return values of kcopy(9) are: zero for success
and non-zero for failure. (this documents practice - there are -1, EFAULT
and semi-random non-zero values returned.)
 1.2 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.1 25-May-2002  gmcgarry Document some mandatory machine-dependent interfaces. Addresses PR16272.
 1.5.22.1 18-May-2008  yamt sync with head.
 1.5.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.50.1 21-Apr-2017  bouyer Sync with HEAD
 1.6.46.1 26-Apr-2017  pgoyette Sync with HEAD
 1.9 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.8 21-Jul-2013  njoly Kill a few trailing spaces.
 1.7 18-Jul-2013  wiz New sentence, new line. Some whitespace. Bump date for previous.
 1.6 17-Jul-2013  matt Some constification.
Add kcpuset_clone, kcpuset_insersection, kcpuset_remove,
kcpuset_ffs, kcpuset_ffs_intersecting,
kcpuset_atomicly_merge, kcpuset_atomicly_intersect, kcpuset_atomicly_remove
 1.5 27-Jan-2013  pgoyette branches: 1.5.2;
Fix indentation of kcpuset_export_u32
 1.4 16-Sep-2012  rmind Describe kcpuset_export_u32(9) routine.
 1.3 07-Jul-2012  rmind branches: 1.3.2;
Document kcpuset_isotherset() and kcpuset_countset().
 1.2 06-Oct-2011  wiz branches: 1.2.2;
Remove superfluous Pp.
 1.1 06-Oct-2011  jruoho Add kcpuset(9). Ok rmind@.
 1.2.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.2.1 30-Oct-2012  yamt sync with head
 1.3.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.2.2 25-Feb-2013  tls resync with head
 1.3.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.5.2.1 23-Jul-2013  riastradh sync with HEAD
 1.10 11-Dec-2021  mrg remove clause 3 from all my licenses that aren't conflicting with
another copyright claim line. again. (i did this in 2008 and then
did not update all of my personal templates.)
 1.9 01-Nov-2017  wiz Add space.
 1.8 30-Oct-2017  wiz Whitespace fix. Give Bl tag table a width. Fix Xr.
 1.7 29-Oct-2017  pgoyette More improvements in grammar and readability.
 1.6 29-Oct-2017  pgoyette Use correct mark-up for NetBSD version.
 1.5 28-Oct-2017  pgoyette Update the kernhist(9) kernel history code to address issues identified
in PR kern/52639, as well as some general cleaning-up...

(As proposed on tech-kern@ with additional changes and enhancements.)

Details of changes:

* All history arguments are now stored as uintmax_t values[1], both in
the kernel and in the structures used for exporting the history data
to userland via sysctl(9). This avoids problems on some architectures
where passing a 64-bit (or larger) value to printf(3) can cause it to
process the value as multiple arguments. (This can be particularly
problematic when printf()'s format string is not a literal, since in
that case the compiler cannot know how large each argument should be.)

* Update the data structures used for exporting kernel history data to
include a version number as well as the length of history arguments.

* All [2] existing users of kernhist(9) have had their format strings
updated. Each format specifier now includes an explicit length
modifier 'j' to refer to numeric values of the size of uintmax_t.

* All [2] existing users of kernhist(9) have had their format strings
updated to replace uses of "%p" with "%#jx", and the pointer
arguments are now cast to (uintptr_t) before being subsequently cast
to (uintmax_t). This is needed to avoid compiler warnings about
casting "pointer to integer of a different size."

* All [2] existing users of kernhist(9) have had instances of "%s" or
"%c" format strings replaced with numeric formats; several instances
of mis-match between format string and argument list have been fixed.

* vmstat(1) has been modified to handle the new size of arguments in the
history data as exported by sysctl(9).

* vmstat(1) now provides a warning message if the history requested with
the -u option does not exist (previously, this condition was silently
ignored, with only a single blank line being printed).

* vmstat(1) now checks the version and argument length included in the
data exported via sysctl(9) and exits if they do not match the values
with which vmstat was built.

* The kernhist(9) man-page has been updated to note the additional
requirements imposed on the format strings, along with several other
minor changes and enhancements.

[1] It would have been possible to use an explicit length (for example,
uint64_t) for the history arguments. But that would require another
"rototill" of all the users in the future when we add support for an
architecture that supports a larger size. Also, the printf(3) format
specifiers for explicitly-sized values, such as "%"PRIu64, are much
more verbose (and less aesthetically appealing, IMHO) than simply
using "%ju".

[2] I've tried very hard to find "all [the] existing users of kernhist(9)"
but it is possible that I've missed some of them. I would be glad to
update any stragglers that anyone identifies.
 1.4 29-Oct-2015  mrg branches: 1.4.8;
flesh out the descrition of kernhist_dumpmask()
 1.3 26-Oct-2015  mrg oops, i really did mean a section 9 reference for usb -- but as usbdi(9).
 1.2 26-Oct-2015  wiz Various fixes and improvements.

Guess what the end of a sentence could be.
 1.1 26-Oct-2015  mrg add documentation on "options KERNHIST".
 1.4.8.1 02-Nov-2017  snj Pull up following revision(s) (requested by pgoyette in ticket #335):
share/man/man9/kernhist.9: 1.5-1.8
sys/arch/acorn26/acorn26/pmap.c: 1.39
sys/arch/arm/arm32/fault.c: 1.105 via patch
sys/arch/arm/arm32/pmap.c: 1.350, 1.359
sys/arch/arm/broadcom/bcm2835_bsc.c: 1.7
sys/arch/arm/omap/if_cpsw.c: 1.20
sys/arch/arm/omap/tiotg.c: 1.7
sys/arch/evbarm/conf/RPI2_INSTALL: 1.3
sys/dev/ic/sl811hs.c: 1.98
sys/dev/usb/ehci.c: 1.256
sys/dev/usb/if_axe.c: 1.83
sys/dev/usb/motg.c: 1.18
sys/dev/usb/ohci.c: 1.274
sys/dev/usb/ucom.c: 1.119
sys/dev/usb/uhci.c: 1.277
sys/dev/usb/uhub.c: 1.137
sys/dev/usb/umass.c: 1.160-1.162
sys/dev/usb/umass_quirks.c: 1.100
sys/dev/usb/umass_scsipi.c: 1.55
sys/dev/usb/usb.c: 1.168
sys/dev/usb/usb_mem.c: 1.70
sys/dev/usb/usb_subr.c: 1.221
sys/dev/usb/usbdi.c: 1.175
sys/dev/usb/usbdi_util.c: 1.67-1.70
sys/dev/usb/usbroothub.c: 1.3
sys/dev/usb/xhci.c: 1.75
sys/external/bsd/drm2/dist/drm/i915/i915_gem.c: 1.34
sys/kern/kern_history.c: 1.15
sys/kern/kern_xxx.c: 1.74
sys/kern/vfs_bio.c: 1.275-1.276
sys/miscfs/genfs/genfs_io.c: 1.71
sys/sys/kernhist.h: 1.21
sys/ufs/ffs/ffs_balloc.c: 1.63
sys/ufs/lfs/lfs_vfsops.c: 1.361
sys/ufs/lfs/ulfs_inode.c: 1.21
sys/ufs/lfs/ulfs_vnops.c: 1.52
sys/ufs/ufs/ufs_inode.c: 1.102
sys/ufs/ufs/ufs_vnops.c: 1.239
sys/uvm/pmap/pmap.c: 1.37-1.39
sys/uvm/pmap/pmap_tlb.c: 1.22
sys/uvm/uvm_amap.c: 1.108
sys/uvm/uvm_anon.c: 1.64
sys/uvm/uvm_aobj.c: 1.126
sys/uvm/uvm_bio.c: 1.91
sys/uvm/uvm_device.c: 1.66
sys/uvm/uvm_fault.c: 1.201
sys/uvm/uvm_km.c: 1.144
sys/uvm/uvm_loan.c: 1.85
sys/uvm/uvm_map.c: 1.353
sys/uvm/uvm_page.c: 1.194
sys/uvm/uvm_pager.c: 1.111
sys/uvm/uvm_pdaemon.c: 1.109
sys/uvm/uvm_swap.c: 1.175
sys/uvm/uvm_vnode.c: 1.103
usr.bin/vmstat/vmstat.c: 1.219
Reorder to test for null before null deref in debug code
--
Reorder to test for null before null deref in debug code
--
KNF
--
No need for '\n' in UVMHIST_LOG
--
normalise a BIOHIST log message
--
Update the kernhist(9) kernel history code to address issues identified
in PR kern/52639, as well as some general cleaning-up...
(As proposed on tech-kern@ with additional changes and enhancements.)
Details of changes:
* All history arguments are now stored as uintmax_t values[1], both in
the kernel and in the structures used for exporting the history data
to userland via sysctl(9). This avoids problems on some architectures
where passing a 64-bit (or larger) value to printf(3) can cause it to
process the value as multiple arguments. (This can be particularly
problematic when printf()'s format string is not a literal, since in
that case the compiler cannot know how large each argument should be.)
* Update the data structures used for exporting kernel history data to
include a version number as well as the length of history arguments.
* All [2] existing users of kernhist(9) have had their format strings
updated. Each format specifier now includes an explicit length
modifier 'j' to refer to numeric values of the size of uintmax_t.
* All [2] existing users of kernhist(9) have had their format strings
updated to replace uses of "%p" with "%#jx", and the pointer
arguments are now cast to (uintptr_t) before being subsequently cast
to (uintmax_t). This is needed to avoid compiler warnings about
casting "pointer to integer of a different size."
* All [2] existing users of kernhist(9) have had instances of "%s" or
"%c" format strings replaced with numeric formats; several instances
of mis-match between format string and argument list have been fixed.
* vmstat(1) has been modified to handle the new size of arguments in the
history data as exported by sysctl(9).
* vmstat(1) now provides a warning message if the history requested with
the -u option does not exist (previously, this condition was silently
ignored, with only a single blank line being printed).
* vmstat(1) now checks the version and argument length included in the
data exported via sysctl(9) and exits if they do not match the values
with which vmstat was built.
* The kernhist(9) man-page has been updated to note the additional
requirements imposed on the format strings, along with several other
minor changes and enhancements.
[1] It would have been possible to use an explicit length (for example,
uint64_t) for the history arguments. But that would require another
"rototill" of all the users in the future when we add support for an
architecture that supports a larger size. Also, the printf(3)
format
specifiers for explicitly-sized values, such as "%"PRIu64, are much
more verbose (and less aesthetically appealing, IMHO) than simply
using "%ju".
[2] I've tried very hard to find "all [the] existing users of
kernhist(9)"
but it is possible that I've missed some of them. I would be glad
to
update any stragglers that anyone identifies.
--
For some reason this single kernel seems to have outgrown its declared
size as a result of the kernhist(9) changes. Bump the size.
XXX The amount of increase may be excessive - anyone with more detailed
XXX knowledge please feel free to further adjust the value
appropriately.
--
Misssed one cast of pointer --> uintptr_t in previous kernhist(9) commit
--
And yet another one. :(
--
Use correct mark-up for NetBSD version.
--
More improvements in grammar and readability.
--
Remove a stray '"' (obvious typo) and add a couple of casts that are
probably needed.
--
And replace an instance of "%p" conversion with "%#jx"
--
Whitespace fix. Give Bl tag table a width. Fix Xr.
 1.11 31-Oct-2020  christos document f_touch
 1.10 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.9 09-Dec-2003  augustss branches: 1.9.32; 1.9.34;
Fix markup typo.
 1.8 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.7 04-Apr-2003  wiz Sort SEE ALSO.
 1.6 14-Feb-2003  grant The correct capitalisation of 'NetBSD.org' is (you
guessed it) 'NetBSD.org'.

some mdoc fixes.
 1.5 19-Jan-2003  jdolecek g/c the NEXTRELEASE comment tag now that the next version number is decided
 1.4 23-Oct-2002  jdolecek update HISTORY - kqueue branch was merged
bump date
 1.3 29-Sep-2002  wiz misc mdoc fixes.
 1.2 29-Sep-2002  jdolecek bring knote(9) and kfilter_register(9) from kqueue branch to mainline
HISTORY section mentions the interface is only available on experimental
kqueue branch (for now)
 1.1 10-Jul-2001  lukem branches: 1.1.2;
file kfilter_register.9 was initially added on branch kqueue.
 1.1.2.1 10-Jul-2001  lukem add kfilter_register(9), knote(9)
 1.9.34.1 18-May-2008  yamt sync with head.
 1.9.32.1 02-Jun-2008  mjf Sync with HEAD.
 1.5 16-Apr-2017  wiz branches: 1.5.2; 1.5.4;
Merge "userland" to be consistent with other man pages.
 1.4 15-Apr-2017  sevan Add authors email address.
 1.3 15-Apr-2017  sevan Improve wording.
Bump date.
 1.2 15-Apr-2017  wiz Improve wording. Use standard section headers. Improve table formatting.
 1.1 15-Apr-2017  kamil Add new documentation for klua_mod_register(9) and klua_lock(9)

Lua kernel bindings.
 1.5.4.2 26-Apr-2017  pgoyette Sync with HEAD
 1.5.4.1 16-Apr-2017  pgoyette file klua_lock.9 was added on branch pgoyette-localcount on 2017-04-26 02:52:58 +0000
 1.5.2.2 21-Apr-2017  bouyer Sync with HEAD
 1.5.2.1 16-Apr-2017  bouyer file klua_lock.9 was added on branch bouyer-socketcan on 2017-04-21 16:53:20 +0000
 1.5 16-Apr-2017  wiz branches: 1.5.2; 1.5.4;
More wording and whitespace.
 1.4 15-Apr-2017  sevan Add authors email address.
 1.3 15-Apr-2017  sevan Improve wording.
Bump date.
 1.2 15-Apr-2017  wiz Improve wording.
 1.1 15-Apr-2017  kamil Add new documentation for klua_mod_register(9) and klua_lock(9)

Lua kernel bindings.
 1.5.4.2 26-Apr-2017  pgoyette Sync with HEAD
 1.5.4.1 16-Apr-2017  pgoyette file klua_mod_register.9 was added on branch pgoyette-localcount on 2017-04-26 02:52:58 +0000
 1.5.2.2 21-Apr-2017  bouyer Sync with HEAD
 1.5.2.1 16-Apr-2017  bouyer file klua_mod_register.9 was added on branch bouyer-socketcan on 2017-04-21 16:53:20 +0000
 1.28 06-Mar-2021  rin Fix trivial typo. No need to bump date.
 1.27 24-Jan-2021  thorpej Add kmem_tmpbuf_alloc(), a utility function for allocating memory for
temporary use where allocation on the stack is desirable, but only up to
a certain size. If the requested size fits within the specified stack
buffer, the stack buffer is returned. Otherwise, memory is allocated with
kmem_alloc(). Add a corresponding kmem_tmpbuf_free() function that frees
the memory using kmem_free() if it is not the tempory stack buffer location.
 1.26 19-Jun-2020  wiz Remove trailing whitespace.
 1.25 18-Jun-2020  kamil Document kmem_strdup() and kmem_strndup()

Added in 2018 by christos@ in sys/sys/kmem.h r. 1.11.
 1.24 15-Aug-2019  maxv Unlink KMEM_GUARD leftovers.
 1.23 07-Nov-2017  christos branches: 1.23.4;
document kmem_strdupsize/kmem_strdupfree
 1.22 26-Aug-2017  joerg Drop stray .El.
 1.21 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.20 29-Feb-2016  chs fix vmem_alloc() to never return an error for VM_SLEEP requests,
thus fixing kmem_alloc() to never return NULL for KM_SLEEP requests.
instead these operations will retry forever, which was the intent.
 1.19 11-Dec-2015  wiz Whitespace nit.
 1.18 11-Dec-2015  christos Spell out that KM_SLEEP allocations can fail.
 1.17 28-Jul-2015  wiz Use more Dv.
 1.16 28-Jul-2015  wiz New sentence, new line.
 1.15 28-Jul-2015  maxv Document KMEM_SIZE, KMEM_REDZONE and KMEM_GUARD.
 1.14 26-Nov-2013  rmind branches: 1.14.4;
Mention kmem_intr(9) routines.
 1.13 14-Jun-2011  rmind branches: 1.13.2; 1.13.8;
Xr uvm_km(9)
 1.12 08-Jan-2011  jym branches: 1.12.4;
CONSIDERATION => CONSIDERATIONS, to be on par with the rest of man pages.
 1.11 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.10 16-May-2010  jruoho IMPLEMENTATION NOTES back to NOTES.
 1.9 14-May-2010  jruoho Use standard section headers.
 1.8 23-Apr-2010  rmind branches: 1.8.2;
Mention that kmem_free(9) may block, just in a case it is not clear.
 1.7 13-Feb-2010  wiz Bump date for new kmem_asprintf.
 1.6 12-Feb-2010  dyoung Start a new paragraph before describing kmem_asprintf().
 1.5 11-Feb-2010  haad Add kmem_asprintf rotuine which allocates string accordingly to format
string from kmem pool. Allocated string is string length + 1 char for ending
zero.

Ok: ad@.
 1.4 23-Jan-2010  rmind Cross-link a little.
 1.3 03-Aug-2009  wiz Fix typo.
 1.2 03-Aug-2009  rmind kmem(9): add code references, improve a little.
 1.1 03-Aug-2009  rmind Unify kmem_alloc/zalloc/free under kmem(9). Links preserved.
 1.8.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.8.2.1 23-Apr-2010  uebayasi file kmem.9 was added on branch uebayasi-xip on 2010-08-17 06:40:05 +0000
 1.12.4.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.13.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.13.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.14.4.1 03-Dec-2017  snj Pull up following revision(s) (requested by mlelstv in ticket #1521):
share/man/man9/kmem.9: revision 1.20 via patch
share/man/man9/vmem.9: revision 1.16
sys/kern/subr_kmem.c: revision 1.62
sys/kern/subr_vmem.c: revision 1.94
fix vmem_alloc() to never return an error for VM_SLEEP requests,
thus fixing kmem_alloc() to never return NULL for KM_SLEEP requests.
instead these operations will retry forever, which was the intent.
 1.23.4.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.12 03-Aug-2009  rmind Unify kmem_alloc/zalloc/free under kmem(9). Links preserved.
 1.11 03-Aug-2009  rmind kmem_alloc(9): make notes under NOTES section.
 1.10 29-Mar-2009  wiz Spelling.
 1.9 29-Mar-2009  ad kernel memory guard for DEBUG kernels, proposed on tech-kern.
See kmem_alloc(9) for details.
 1.8 29-Dec-2008  wiz branches: 1.8.2;
Mark up NULL with .Dv.
 1.7 29-Dec-2008  ad Add a bunch of new text, in particular:

Use of KM_NOSLEEP is strongly discouraged as it can
create transient, hard to debug failures that occur
when the system is under memory pressure.

In situations where it is not possible to sleep, for
example because locks are held by the caller, the
code path should be restructured to allow the allo-
cation to be made in another place.
 1.6 03-Jan-2008  yamt branches: 1.6.10;
note about 0 and NULL.
 1.5 17-Feb-2007  wiz branches: 1.5.4;
Whitespace nit.
 1.4 16-Feb-2007  rmind - Add link to memoryallocators(9) in kmem_*(9), vmem(9), uvm(9), malloc(9),
pool(9) and pool_cache(9) manuals.
- Sort uvm(9) "SEE ALSO" section.
 1.3 04-Nov-2006  yamt consistency.
 1.2 25-Jun-2006  wiz Various minor improvements.
 1.1 25-Jun-2006  yamt document kmem_alloc, kmem_free, kmem_zalloc.
 1.5.4.1 09-Jan-2008  matt sync with HEAD
 1.6.10.1 02-Feb-2009  snj Pull up following revision(s) (requested by ad in ticket #356):
share/man/man9/kmem_alloc.9: revision 1.7
Add a bunch of new text, in particular:
Use of KM_NOSLEEP is strongly discouraged as it can
create transient, hard to debug failures that occur
when the system is under memory pressure.
In situations where it is not possible to sleep, for
example because locks are held by the caller, the
code path should be restructured to allow the allo-
cation to be made in another place.
 1.8.2.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.6 03-Aug-2009  rmind Unify kmem_alloc/zalloc/free under kmem(9). Links preserved.
 1.5 03-Jan-2008  yamt note about 0 and NULL.
 1.4 17-Feb-2007  wiz branches: 1.4.4;
Whitespace nit.
 1.3 16-Feb-2007  rmind - Add link to memoryallocators(9) in kmem_*(9), vmem(9), uvm(9), malloc(9),
pool(9) and pool_cache(9) manuals.
- Sort uvm(9) "SEE ALSO" section.
 1.2 25-Jun-2006  wiz Various minor improvements.
 1.1 25-Jun-2006  yamt document kmem_alloc, kmem_free, kmem_zalloc.
 1.4.4.1 09-Jan-2008  matt sync with HEAD
 1.6 03-Aug-2009  rmind Unify kmem_alloc/zalloc/free under kmem(9). Links preserved.
 1.5 17-Feb-2007  wiz Whitespace nit.
 1.4 16-Feb-2007  rmind - Add link to memoryallocators(9) in kmem_*(9), vmem(9), uvm(9), malloc(9),
pool(9) and pool_cache(9) manuals.
- Sort uvm(9) "SEE ALSO" section.
 1.3 14-Jul-2006  yamt fix a typo.
 1.2 25-Jun-2006  wiz Various minor improvements.
 1.1 25-Jun-2006  yamt document kmem_alloc, kmem_free, kmem_zalloc.
 1.17 15-Apr-2017  abhinav Use Xr instead of Fn to refer kqueue(2)
 1.16 02-Apr-2017  abhinav Use Xr instead of Fn to reference splsched(9)
 1.15 18-Mar-2014  riastradh branches: 1.15.8; 1.15.12;
Merge riastradh-drm2 to HEAD.
 1.14 20-Jul-2013  wiz Use Mt for email addresses.
 1.13 22-Mar-2010  joerg branches: 1.13.2; 1.13.8; 1.13.14; 1.13.18;
Use .In instead of .Aq Pa for header files.
 1.12 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.11 18-Feb-2004  jdolecek branches: 1.11.32; 1.11.34;
bump date for previous
 1.10 18-Feb-2004  wiz Remove duplicate word. From Ognyan Kulev in PR 24472.
 1.9 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.8 23-Feb-2003  wiz Bump date and copyright for last.
 1.7 23-Feb-2003  pk Noet that knote() must not be called from interrupt contexts running at an
interrupt priority level higher than splsched().
 1.6 19-Jan-2003  jdolecek g/c the NEXTRELEASE comment tag now that the next version number is decided
 1.5 23-Oct-2002  jdolecek update HISTORY - kqueue branch was merged
bump date
 1.4 16-Oct-2002  jdolecek KNOTE() check if the list is nonempty now
 1.3 29-Sep-2002  wiz misc mdoc fixes.
 1.2 29-Sep-2002  jdolecek bring knote(9) and kfilter_register(9) from kqueue branch to mainline
HISTORY section mentions the interface is only available on experimental
kqueue branch (for now)
 1.1 10-Jul-2001  lukem branches: 1.1.2;
file knote.9 was initially added on branch kqueue.
 1.1.2.1 10-Jul-2001  lukem add kfilter_register(9), knote(9)
 1.11.34.1 18-May-2008  yamt sync with head.
 1.11.32.1 02-Jun-2008  mjf Sync with HEAD.
 1.13.18.1 23-Jul-2013  riastradh sync with HEAD
 1.13.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.13.8.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.13.2.2 22-Mar-2010  joerg Use .In instead of .Aq Pa for header files.
 1.13.2.1 22-Mar-2010  joerg file knote.9 was added on branch uebayasi-xip on 2010-03-22 18:58:34 +0000
 1.15.12.1 21-Apr-2017  bouyer Sync with HEAD
 1.15.8.1 26-Apr-2017  pgoyette Sync with HEAD
 1.8 17-Oct-2013  gson Don't capitalize "it" in the middle of a sentence.
 1.7 20-Jul-2011  jruoho branches: 1.7.2; 1.7.8;
Xref delay(9) and kpause(9) with each other.
 1.6 25-Apr-2011  wiz Sort SEE ALSO, sort errors.
 1.5 06-Aug-2008  skrll Spellos
 1.4 30-Apr-2008  martin branches: 1.4.2;
Convert TNF licenses to new 2 clause variant
 1.3 02-Jan-2008  pooka branches: 1.3.4; 1.3.6;
mtx is not an interlock here, merely convenience.
 1.2 28-Oct-2007  rjs Fix typo. s/conat/const
 1.1 18-Jul-2007  yamt branches: 1.1.4; 1.1.6;
document kpause. largely copied from condvar.9.
 1.1.6.2 18-Jul-2007  yamt document kpause. largely copied from condvar.9.
 1.1.6.1 18-Jul-2007  yamt file kpause.9 was added on branch matt-mips64 on 2007-07-18 12:18:08 +0000
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 06-Nov-2007  matt sync with HEAD
 1.3.6.1 18-May-2008  yamt sync with head.
 1.3.4.2 05-Oct-2008  mjf Sync with HEAD.
 1.3.4.1 02-Jun-2008  mjf Sync with HEAD.
 1.4.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.7.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3 16-Feb-2010  rmind branches: 1.3.2;
kpreempt(9): add a note when kernel preemption is disabled/deferred.
Sprinkle cross-links, bump dates.
 1.2 21-Dec-2008  ad -Kernel preemption is currently disabled by default.
-It can be enabled by tweaking kern.sched.kpreempt_pri sysctl.
+On architectures where kernel preemption is not supported natively, these
+functions may still be used.
 1.1 06-May-2008  yamt branches: 1.1.4; 1.1.6; 1.1.8;
document kpreempt_disable, kpreempt_enable, and kpreempt_disabled.
 1.1.8.1 02-Feb-2009  snj Pull up following revision(s) (requested by ad in ticket #361):
share/man/man9/kpreempt.9: revision 1.2
-Kernel preemption is currently disabled by default.
-It can be enabled by tweaking kern.sched.kpreempt_pri sysctl.
+On architectures where kernel preemption is not supported natively, these
+functions may still be used.
 1.1.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.1.6.1 06-May-2008  mjf file kpreempt.9 was added on branch mjf-devfs2 on 2008-06-02 13:21:41 +0000
 1.1.4.2 18-May-2008  yamt sync with head.
 1.1.4.1 06-May-2008  yamt file kpreempt.9 was added on branch yamt-pf42 on 2008-05-18 12:31:13 +0000
 1.3.2.2 16-Feb-2010  rmind kpreempt(9): add a note when kernel preemption is disabled/deferred.
Sprinkle cross-links, bump dates.
 1.3.2.1 16-Feb-2010  rmind file kpreempt.9 was added on branch uebayasi-xip on 2010-02-16 19:21:31 +0000
 1.41 12-Jan-2025  rillig kprintf.9: fix typo
 1.40 10-Mar-2021  simonb branches: 1.40.8;
Add printf_nostamp(9), kernel printf() without prepending a timestamp.
 1.39 21-May-2019  wiz Fix some typos and remove cargo-cult quoting.
 1.38 20-May-2019  christos document vasprintf
 1.37 27-May-2018  maya branches: 1.37.2;
Don't mention sprintf and vsprintf, they don't exist in the kernel.
Drop MLINKS, too.
 1.36 27-Oct-2017  joerg branches: 1.36.2;
Revert printf return value change.
 1.35 27-Oct-2017  utkarsh009 Update the return type of printf(9)

from 'void' to 'int' as a result of
redeclaration in sys/sys/systm.h
 1.34 01-Feb-2017  abhinav Add missing entries in the NAME section.

These functions are described in the body of the man page but not
mentioned in the NAME section. Without an entry in the NAME section
apropos(1) doesn't get this man page in the results when queried for
one of those functions.

ok from christos.
 1.33 17-Sep-2013  wiz branches: 1.33.8; 1.33.12;
Sort sections: consistently put CODE REFERENCES directly before SEE ALSO.
 1.32 21-Nov-2012  christos document change in {,v}snprintf() behavior.
 1.31 17-Jul-2011  joerg branches: 1.31.2; 1.31.8;
Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.30 21-Jan-2011  dyoung Describe device_printf(9).

XXX Need symbolic link device_printf.9 -> kprintf.9.
 1.29 17-Feb-2010  cnst branches: 1.29.2; 1.29.4;
grammar in kprintf.9 (s/or/and/ and add some commas); ok wiz, pgoyette
 1.28 04-Sep-2009  apb Add cross references to new boothowto(9) man page.
 1.27 08-Apr-2009  joerg Fix markup of .Nm line, the comma is not part of the function names.
 1.26 17-Dec-2008  wiz branches: 1.26.2;
mdoclint cleanup:
Sort SEE ALSO, fix xref sections, new sentence - new line.
 1.25 16-Dec-2008  christos kill bitmask_snprintf
 1.24 25-Jul-2008  manu Document apping between boothowto flags and boot(8) arguments selecting
aprint_*() verbosity. From Jean-Yves Migeon <jean-yves.migeon@espci.fr>
 1.23 30-Apr-2008  martin branches: 1.23.2;
Convert TNF licenses to new 2 clause variant
 1.22 24-Sep-2007  wiz branches: 1.22.6; 1.22.8;
Document aprint*_dev and aprint*_ifnet. Requested by joerg@
 1.21 26-Jul-2007  pooka branches: 1.21.4; 1.21.6;
<machine/stdarg.h> is needed for va_lists
 1.20 16-Jul-2006  rillig Added an explicit statement about the differences between the user-space
snprintf and the kernel snprintf.
 1.19 15-Jan-2006  rillig Updated the .Ddate.
 1.18 14-Jan-2006  rillig The tprintf_open function returns NULL if no terminal handle could be
acquired.
 1.17 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.16 02-Jan-2003  wiz New sentence, new line.
 1.15 31-Dec-2002  thorpej Document aprint_error(), aprint_get_error_count(), and printf_nolog().
 1.14 31-Dec-2002  thorpej Document the "aprint" autoconfiguration message printing routines.
 1.13 14-Oct-2002  wiz New sentence, new line.
 1.12 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.11 26-Dec-2001  wiz Fix SEE ALSO section.
 1.10 04-Sep-2001  wiz Boring whitespace fixes.
 1.9 09-Aug-2000  tv Add manpage for bitmask_snprintf(9), describe tprintf(9), and simplify
kprintf(9) by removing the now unsupported "extra" printf format strings.
 1.8 07-Feb-2000  abs Note that use of %: is strongly discouraged.
 1.7 12-Sep-1999  kleink Use full month names with .Dd, as per mdoc.samples(7).
 1.6 16-Mar-1999  garbled More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.5 10-Sep-1998  enami comma is not a part of argument.
 1.4 03-Sep-1998  msaitoh Eliminate extra comma in SEE ALSO section
 1.3 03-Sep-1998  jeremy Corrected my incorrect usage of hyphens, en-dashes, and em-dashes.
 1.2 02-Sep-1998  jeremy Added missing punctuation and utilized more mdoc macros where possible.
 1.1 02-Sep-1998  jeremy A manual page describing the kernel printf functions and the special formatting
options which differentiate them from their user space counterparts.
 1.21.6.2 26-Jul-2007  pooka <machine/stdarg.h> is needed for va_lists
 1.21.6.1 26-Jul-2007  pooka file kprintf.9 was added on branch matt-mips64 on 2007-07-26 10:00:22 +0000
 1.21.4.1 06-Nov-2007  matt sync with HEAD
 1.22.8.1 18-May-2008  yamt sync with head.
 1.22.6.2 05-Oct-2008  mjf Sync with HEAD.
 1.22.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.23.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.26.2.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.29.4.1 08-Feb-2011  bouyer Sync with HEAD
 1.29.2.2 17-Feb-2010  cnst grammar in kprintf.9 (s/or/and/ and add some commas); ok wiz, pgoyette
 1.29.2.1 17-Feb-2010  cnst file kprintf.9 was added on branch uebayasi-xip on 2010-02-17 22:04:15 +0000
 1.31.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.31.8.1 25-Feb-2013  tls resync with head
 1.31.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.31.2.1 16-Jan-2013  yamt sync with (a bit old) head
 1.33.12.1 21-Apr-2017  bouyer Sync with HEAD
 1.33.8.1 20-Mar-2017  pgoyette Sync with HEAD
 1.36.2.1 25-Jun-2018  pgoyette Sync with HEAD
 1.37.2.1 10-Jun-2019  christos Sync with HEAD
 1.40.8.1 02-Aug-2025  perseant Sync with HEAD
 1.30 01-Aug-2020  wiz Fix typo in macro and merge to error descriptions for the same error
 1.29 01-Aug-2020  riastradh New functions kthread_fpu_enter/exit.

The MI definitions don't do anything but maintain a flag, but MD code
can define kthread_fpu_enter/exit_md to actually enable/disable the
FPU. (These are almost pcu_load/discard on systems that use pcu(9),
except they apply to all PCUs.)

Discussed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2020/06/20/msg026524.html

The proposed kthread flag KTHREAD_FPU is not included because I
couldn't find any particular need for it that would not be covered by
just calling kthread_fpu_enter/exit in the kthread function.
 1.28 21-Apr-2015  pooka Remove the unused and all-but-unusable kthread_destroy(). Also makes
it more obvious that the opposite of kthread_create() is kthread_exit().
 1.27 07-Aug-2011  rmind Rename slightly misleading KTHREAD_JOINABLE to KTHREAD_MUSTJOIN.
 1.26 19-May-2011  wiz Improve wording.
 1.25 19-May-2011  rmind Re-implement kthread_join(9), so that it actually works (hi haad@).
 1.24 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.23 13-May-2010  jruoho In order to widen the paragraphs, move the newly added list of flags below
the list of function parameters. Add two small sentences to give few more
clues about KTHREAD_JOINABLE. Add a missing prototype for kthread_join().
Also: newpl -> newlp.
 1.22 13-May-2010  wiz Put flags into a list. Bug fixes to kthread_join docs.
 1.21 12-May-2010  haad Document kthread_join in kthread(9).
 1.20 03-Aug-2009  rmind branches: 1.20.2;
Relate interfaces by updating "see also" section.
 1.19 29-Jan-2009  wiz Mark up NULL and SCHED_*.
 1.18 29-Jan-2009  ad - Allow creating timeshard kthreads. To be used to fix the RAIDframe
parity rewrite issue.
- Create kthreads in the SCHED_RR class by default, not SCHED_FIFO.
 1.17 30-Apr-2008  martin branches: 1.17.4;
Convert TNF licenses to new 2 clause variant
 1.16 21-Nov-2007  xtraeme branches: 1.16.6; 1.16.8;
kthread_create1 is no more, ok thx.
 1.15 14-Jul-2007  ad branches: 1.15.4;
Sync with reality.
 1.14 10-Sep-2005  wiz Bump date for previous.
 1.13 27-Aug-2005  briggs Mention that a kthread *must* call kthread_exit() to terminate itself
properly. If you don't, the kernel will likely crash.
 1.12 23-Apr-2004  simonb branches: 1.12.2;
s/the the/the/ (only in sources that aren't regularly imported from
elsewhere).
 1.11 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.10 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.9 14-Oct-2002  wiz New sentence, new line.
 1.8 09-Oct-2002  itojun fix typo. PR 18597
put full ANSI prototype in FUNCTIONS section for consistency.
 1.7 08-Mar-2002  kleink Fix the declaration of the function to be registered with kthread_create{,1};
from Peter Seebach in PR kern/15838.
 1.6 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.5 05-Dec-2001  enami proc0 isn't the init.
 1.4 10-Oct-2001  hubertf fix typo (shaed)
 1.3 04-Sep-2001  wiz Two punctuation nits, and sort SEE ALSO.
 1.2 04-Sep-2001  wiz Boring whitespace fixes.
 1.1 01-Jul-2001  gmcgarry Add some missing documentation.
 1.12.2.1 12-Sep-2005  tron Pull up following revision(s) (requested by briggs in ticket #759):
share/man/man9/kthread.9: revision 1.13
Mention that a kthread *must* call kthread_exit() to terminate itself
properly. If you don't, the kernel will likely crash.
 1.15.4.1 09-Jan-2008  matt sync with HEAD
 1.16.8.1 18-May-2008  yamt sync with head.
 1.16.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.17.4.1 02-Feb-2009  snj Pull up following revision(s) (requested by ad in ticket #397):
share/man/man9/kthread.9: revision 1.18
sys/kern/kern_kthread.c: revision 1.25
sys/sys/kthread.h: revision 1.8
- Allow creating timeshard kthreads. To be used to fix the RAIDframe
parity rewrite issue.
- Create kthreads in the SCHED_RR class by default, not SCHED_FIFO.
 1.20.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.12 07-Sep-2024  rillig man: use https URLs for www.NetBSD.org
 1.11 03-Sep-2008  erh branches: 1.11.74;
Add "linedisc" to the name section of the linedisc man page so
it shows up better in apropos output.
 1.10 04-Jun-2005  uwe branches: 1.10.20; 1.10.24;
Update to reflect the constification of the arguments of
ttyldisc_lookup and ttyldisc_remove.
 1.9 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.8 14-Feb-2003  grant The correct capitalisation of 'NetBSD.org' is (you
guessed it) 'NetBSD.org'.

some mdoc fixes.
 1.7 14-Oct-2002  wiz New sentence, new line.
 1.6 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.5 26-Dec-2001  wiz Sort sections.
 1.4 10-Sep-2001  wiz Use standard section headers.
 1.3 09-Apr-2001  wiz Fix date, and some whitespace while I'm here.
 1.2 10-Feb-2001  eeh Update line discipline documentation.
 1.1 02-Nov-2000  eeh Add manpage for new line discipline stuff.
 1.10.24.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.10.20.1 05-Oct-2008  mjf Sync with HEAD.
 1.11.74.1 02-Aug-2025  perseant Sync with HEAD
 1.7 25-Feb-2019  pgoyette Add explicit cross-references to pserialize(9) for the sections about
ensuring that a localcount doesn't disappear while in the process of
being referenced, in the same manner as psref(9).
 1.6 02-Jun-2017  chs branches: 1.6.10;
localcount_init() can't fail because percpu_alloc() can't fail.
remove the check and change the return type to void.
 1.5 19-May-2017  pgoyette Identify TNF as the copyright holder.
 1.4 19-May-2017  wiz Cleanups and standardization.
 1.3 19-May-2017  pgoyette Minor improvements in wording.
 1.2 19-May-2017  pgoyette Introduce new localcount(9) reference-count primitives.
 1.1 16-Jul-2016  pgoyette branches: 1.1.2; 1.1.6;
file localcount.9 was initially added on branch pgoyette-localcount.
 1.1.6.3 04-May-2017  pgoyette Give Taylor credit for the initial implementation.

Improve cross-references to the subsystems currently using localcount.
 1.1.6.2 29-Apr-2017  pgoyette Remove extraneous argument to .Nm
 1.1.6.1 27-Apr-2017  pgoyette Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita. There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.
 1.1.2.7 08-Dec-2016  pgoyette Minor tweaks.
 1.1.2.6 03-Aug-2016  pgoyette As suggested in private Email, rename BUGS section to CAVEATS.
 1.1.2.5 01-Aug-2016  pgoyette Add a BUGS section, which is really a RESTRICTIONS section (but mdoclint
doesn't like RESTRICTIONS!)
 1.1.2.4 16-Jul-2016  pgoyette Add myself as author/compiler of the man page.
 1.1.2.3 16-Jul-2016  pgoyette Improve description of localcount_release
 1.1.2.2 16-Jul-2016  pgoyette Add a bit more about appropriate use-cases.
 1.1.2.1 16-Jul-2016  pgoyette Initial man page for localcount(9).
 1.6.10.1 10-Jun-2019  christos Sync with HEAD
 1.29 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.28 30-Jan-2008  ad branches: 1.28.4; 1.28.6;
These interfaces have been obsoleted and removed from the system.

Please see the condvar(9), mutex(9), and rwlock(9) manual pages for
information on kernel synchronisation primitives.
 1.27 09-Jan-2008  xtraeme transferlockers() is gone. ok ad
 1.26 01-Mar-2007  yamt branches: 1.26.4;
sync with the code. (pri_t)
 1.25 17-Feb-2007  wiz Use Em for notes. Whitespace nits. Typo fix.
 1.24 11-Feb-2007  ad Mark these interfaces obsolete.
 1.23 04-Oct-2004  rumble Removed accidental repetitious words.
 1.22 27-May-2004  wiz Uppercase CPU.
 1.21 25-May-2004  hannken Add ffs internal snapshots. Written by Marshall Kirk McKusick for FreeBSD.

- Not enabled by default. Needs kernel option FFS_SNAPSHOT.
- Change parameters of ffs_blkfree.
- Let the copy-on-write functions return an error so spec_strategy
may fail if the copy-on-write fails.
- Change genfs_*lock*() to use vp->v_vnlock instead of &vp->v_lock.
- Add flag B_METAONLY to VOP_BALLOC to return indirect block buffer.
- Add a function ffs_checkfreefile needed for snapshot creation.
- Add special handling of snapshot files:
Snapshots may not be opened for writing and the attributes are read-only.
Use the mtime as the time this snapshot was taken.
Deny mtime updates for snapshot files.
- Add function transferlockers to transfer any waiting processes from
one lock to another.
- Add vfsop VFS_SNAPSHOT to take a snapshot and make it accessible through
a vnode.
- Add snapshot support to ls, fsck_ffs and dump.

Welcome to 2.0F.

Approved by: Jason R. Thorpe <thorpej@netbsd.org>
 1.20 24-May-2004  snj Bump date for last. Minor English fixes. Use Dq. Sprinkle some Dv.
 1.19 22-May-2004  yamt document LK_EXCLOTHER.
 1.18 30-Jun-2003  wiz Add Ns.
 1.17 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.16 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.15 14-Oct-2002  wiz New sentence, new line.
 1.14 14-Jul-2002  gmcgarry simple_lock_unlock -> simple_unlock
 1.13 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.12 01-Nov-2001  wiz Drop a spare .Pp.
 1.11 27-Oct-2001  gmcgarry - simple_lock_unlock() -> simple_unlock()
- include description of LK_INTERLOCK flag

Improvements suggested by Anthony Mallet in PR-14367.
 1.10 04-Sep-2001  wiz Two punctuation fixes.
 1.9 04-Sep-2001  wiz Boring whitespace fixes.
 1.8 01-Jul-2001  gmcgarry Add code references. Fix formatting.
 1.7 31-May-2001  gmcgarry - correctly describe the usage of flags to the lock manager
- clarify terminology on shared and exclusive access to locks
- fix history
- formatting fixes
 1.6 06-May-2001  gmcgarry Fix format, add history and cross references.
 1.5 22-Jan-2001  ad Fix typo.
 1.4 07-Nov-2000  lukem use .Xr
 1.3 14-Aug-2000  deberg branches: 1.3.2;
fix typo
 1.2 07-Jul-2000  gmcgarry Improve use of specific terms and definitions.
 1.1 25-Jun-2000  gmcgarry lock(9) manpage. Not much, but it is a start.
 1.3.2.4 06-Jun-2002  he Pull up revision 1.11 (requested by drochner):
Correct some errors. Fixes PR#14367.
 1.3.2.3 16-Aug-2001  tv Pullup [mrg]:

share/man/man9/lock.9 1.4-1.8

Correct several semantic and descriptive errors.
 1.3.2.2 14-Aug-2000  deberg pullup 1.1-1.3 (new file). preemptively approved by jhawk.

lock(9) manpage. Not much, but it is a start.

and some fixes.
 1.3.2.1 14-Aug-2000  deberg file lock.9 was added on branch netbsd-1-5 on 2000-08-14 03:28:49 +0000
 1.26.4.1 23-Mar-2008  matt sync with HEAD
 1.28.6.1 18-May-2008  yamt sync with head.
 1.28.4.1 02-Jun-2008  mjf Sync with HEAD.
 1.8 27-Aug-2017  wiz Bump date for psref, localcount changes.
 1.7 27-Aug-2017  wiz New sentence, new line.
 1.6 23-Aug-2017  pgoyette Add locking(9) and psref(9) summaries to locking(9).

PR misc/52504

XXX Pull-up to -8 ?
 1.5 16-Apr-2017  wiz branches: 1.5.2; 1.5.4; 1.5.6; 1.5.8;
Wording.
 1.4 15-Apr-2017  sevan Re-edit
Add authors email address
Remove mb(9) as it's depricated
Bump date

TODO:
Software & Hard interrupt context description.
 1.3 15-Apr-2017  skrll Typo - although maybe the language should change
 1.2 15-Apr-2017  skrll Typo
 1.1 15-Apr-2017  kamil Add new documentation locking(9)

It's a document from June 2015.

DESCRIPTION
The NetBSD kernel provides several synchronization and interrupt control
primitives. This manpage aims at giving an overview of these interfaces
and their proper application. This document includes also basic kernel
thread control primitives and rough overview of the NetBSD kernel design.

Part of interfaces are missing, like new mechanisms for networking SMP,
as this documentation page predates them.

Initial review back in 2015 by Thomas Klausner <wiz>
 1.5.8.1 25-Aug-2017  snj Pull up following revision(s) (requested by pgoyette in ticket #229):
share/man/man9/locking.9: revision 1.6
Add locking(9) and psref(9) summaries to locking(9).
PR misc/52504
 1.5.6.1 12-May-2017  pgoyette Add info for localcount(9)

Sort SEE ALSO

Sort the usage table

XXX This man-page is a work in progress. Notably, it is still missing
XXX a section on psref(9).
 1.5.4.2 26-Apr-2017  pgoyette Sync with HEAD
 1.5.4.1 16-Apr-2017  pgoyette file locking.9 was added on branch pgoyette-localcount on 2017-04-26 02:52:58 +0000
 1.5.2.2 21-Apr-2017  bouyer Sync with HEAD
 1.5.2.1 16-Apr-2017  bouyer file locking.9 was added on branch bouyer-socketcan on 2017-04-21 16:53:20 +0000
 1.10 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.9 16-Apr-2003  wiz branches: 1.9.32; 1.9.34;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.8 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.7 04-Sep-2001  wiz Boring whitespace fixes.
 1.6 17-Aug-1999  enami Use .Pa for pathname.
 1.5 16-Mar-1999  garbled More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.4 03-Sep-1998  msaitoh Eliminate extra comma in SEE ALSO section
 1.3 03-Sep-1998  jeremy Reformatted slightly and changed to use more macros.
 1.2 08-Oct-1997  jtc Fix tipo inherited from old version of TNF copyright form.
s/REGENTS/FOUNDATION/.
 1.1 12-May-1997  explorer Add kernel log() man page. Will add other logging/printing functions soon.
 1.9.34.1 18-May-2008  yamt sync with head.
 1.9.32.1 02-Jun-2008  mjf Sync with HEAD.
 1.20 07-May-2024  christos also mention kpause(9) here.
 1.19 27-Aug-2020  fcambus Fix a bunch of typos in various kernel man pages.
 1.18 18-Mar-2017  riastradh Use `\(em', not `--'.

Refill sentences and tweak wording where appropriate while here.
 1.17 22-Mar-2014  wiz branches: 1.17.8; 1.17.12;
New sentence, new line; slight wording improvements.
 1.16 22-Mar-2014  skrll Bump date for previous
 1.15 22-Mar-2014  skrll Add mtsleep(9) and a description of how it, tsleep(9), and wakeup(9)
should all be replaced with condvar(9).

While here clear out the lock(9) reference(s) and the obsoleted example.

Based on misc/48671
 1.14 28-Jan-2012  wiz branches: 1.14.6;
Fix word duplication in previous.
 1.13 28-Jan-2012  rmind Update ltsleep(9) man page.
 1.12 30-Apr-2008  martin branches: 1.12.22;
Convert TNF licenses to new 2 clause variant
 1.11 17-Jun-2007  pooka branches: 1.11.10; 1.11.12;
ident is now of type wchan_t
 1.10 01-Mar-2007  yamt sync with the code. (pri_t)
 1.9 17-Feb-2007  wiz Use Em for notes. Whitespace nits.
 1.8 11-Feb-2007  ad Mark these interfaces obsolete.
 1.7 24-Dec-2005  perry Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
 1.6 04-Oct-2004  rumble Removed accidental repetitious words.
 1.5 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.4 11-Apr-2003  yamt 'indent' is now const.
 1.3 07-Apr-2003  wiz More e.g. cleanup. Igor Sobrado, PR 19692.
 1.2 14-Oct-2002  wiz New sentence, new line.
 1.1 29-Sep-2002  wiz Rename sleep.9 to ltsleep.9, since sleep(9) is not there any more.
 1.11.12.1 18-May-2008  yamt sync with head.
 1.11.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.12.22.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.12.22.1 17-Apr-2012  yamt sync with head
 1.14.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.12.1 21-Apr-2017  bouyer Sync with HEAD
 1.17.8.1 20-Mar-2017  pgoyette Sync with HEAD
 1.8 15-Nov-2018  maxv Remove the 't' argument from m_tag_find().
 1.7 15-Nov-2018  maxv Simplify the mtag API:

- Remove m_tag_init(), m_tag_first(), m_tag_next() and
m_tag_delete_nonpersistent().

- Remove the 't' argument from m_tag_delete_chain().
 1.6 15-Nov-2018  maxv Merge uipc_mbuf2.c into uipc_mbuf.c. Reorder the latter a little to gather
similar functions. No functional change.
 1.5 02-Dec-2010  wiz branches: 1.5.44; 1.5.46;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.4 19-Jul-2005  gdt Note that once a tag is attached to an mbuf with m_tag_prepend,
freeing the mbuf will free the tag.
 1.3 07-Sep-2004  wiz Grammar improvements, sort SEE ALSO, fix a typo.
 1.2 06-Sep-2004  yamt fix typos.
 1.1 06-Sep-2004  yamt document mbuf tagging interfaces.
 1.5.46.1 10-Jun-2019  christos Sync with HEAD
 1.5.44.1 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.3 23-Dec-2006  wiz Drop trailing dot in Nd.
 1.2 21-Dec-2006  yamt fix a typo.
 1.1 21-Dec-2006  yamt document splraiseipl and makeiplcookie.
 1.59 04-Jan-2021  pgoyette Better grammar.
 1.58 04-Jun-2020  wiz Add missing comma.
 1.57 30-May-2020  jdolecek slightly improve sentence, no need to 'Note' when in NOTES section
 1.56 30-May-2020  jdolecek remove M_SOFTDEP from list of supported malloc types, it's long gone

also remove M_PCB - while it is used by SCTP, it's actually not defined
anywhere

in fact add new NOTES section explaining that the malloc types are
actually not used on NetBSD
 1.55 14-Oct-2018  jdolecek remove M_CANFAIL from list of supported flags for malloc(9)
 1.54 03-Jul-2017  wiz branches: 1.54.4; 1.54.6;
Remove workaround for ancient HTML generation code.
 1.53 07-Aug-2015  maxv Remove KMEMSTATS.
 1.52 23-May-2015  maxv Remove the DIAGNOSTIC section, and two references to MALLOC and FREE.
 1.51 27-Dec-2014  wiz New sentence, new line. Bump date for previous.
 1.50 27-Dec-2014  maxv Cleanup:
- remove struct kmembuckets (dead)
- correctly deadify MALLOC_XX
- remove MALLOC_DEFINE_LIMIT and MALLOC_JUSTDEFINE_LIMIT (dead)
- remove malloc_roundup(), malloc_type_setlimit(), MALLOC_DEFINE_LIMIT()
and MALLOC_JUSTDEFINE_LIMIT() from man 9 malloc
 1.49 27-May-2014  wiz branches: 1.49.2;
Add missing word
 1.48 27-May-2014  christos I like riastradh's kmem/pool explanation.
 1.47 03-Aug-2009  rmind branches: 1.47.14; 1.47.24;
Mention kmem(9).
 1.46 09-Mar-2009  joerg Reorder .Bl and .Pp so make it clear that the space goes before the
list.
 1.45 29-Dec-2008  ad branches: 1.45.2;
Tweak text.
 1.44 19-Dec-2008  cegger MALLOC and FREE macros no longer exists.
 1.43 12-Nov-2008  ad Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.42 30-Apr-2008  martin branches: 1.42.4;
Convert TNF licenses to new 2 clause variant
 1.41 24-Mar-2008  yamt branches: 1.41.2; 1.41.4;
discourage the new use of malloc(9).
 1.40 30-Jul-2007  alc branches: 1.40.8;
kills a few `caddr_t' occurences still present in manpage
 1.39 14-Jul-2007  ad - kcont was removed.
- Replace some references to tsleep.
 1.38 29-Mar-2007  pooka document MALLOC_JUSTDEFINE and MALLOC_JUSTDEFINE_LIMIT
 1.37 17-Feb-2007  wiz Whitespace nit.
 1.36 16-Feb-2007  rmind - Add link to memoryallocators(9) in kmem_*(9), vmem(9), uvm(9), malloc(9),
pool(9) and pool_cache(9) manuals.
- Sort uvm(9) "SEE ALSO" section.
 1.35 07-Nov-2004  wiz Document that free does not handle NULL. Addresses PR 28063.
 1.34 16-Jul-2003  wiz Bump date for last.
 1.33 16-Jul-2003  dbj fix description of type declaration of "type" argument to free(9)
 1.32 19-Jun-2003  yamt explicitly note MALLOC-free and malloc-FREE is ok.
 1.31 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.30 15-Mar-2003  wiz Use "its" instead of "it's" where appropriate.
From Soren Jacobsen in PR 20730.
 1.29 01-Feb-2003  wiz Typo fix.
 1.28 01-Feb-2003  thorpej Update for extensibe malloc types.
 1.27 17-Jan-2003  itojun switch from kame-based m_aux mbuf auxiliary data, to openbsd m_tag
implementation. it will simplify porting across *bsd (such as kame/altq),
and make us more synchronized. from Joel Wilsson
 1.26 14-Oct-2002  wiz New sentence, new line.
 1.25 27-Jun-2002  yamt note that MALLOC is intended to be used with a constant size.
 1.24 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.23 12-Jan-2002  nathanw Reserve the SA malloc type on the trunk.
 1.22 07-Jan-2002  deberg sync type list with <sys/malloc.h>
 1.21 05-Dec-2001  ad Document malloc_roundup().
 1.20 04-Dec-2001  wiz Misc fixes.
 1.19 04-Dec-2001  jdolecek document M_CANFAIL
 1.18 18-Nov-2001  wiz Sort sections.
 1.17 17-Nov-2001  lukem document M_PIPE, M_AGP, M_PROP
 1.16 17-Nov-2001  lukem Add new malloc(9) flag M_ZERO - zeros memory before returning.
From Poul-Henning Kamp's equivalent enhancement in FreeBSD.
 1.15 06-May-2001  wiz Change xref for vmstat(8) to vmstat(1).
Whitespace, punctuation and spelling fixes while I'm here.
 1.14 17-Feb-2001  pooka make this reflect the current state found in malloc.h
 1.13 24-Dec-2000  wiz some whitespace cleanup
 1.12 18-Nov-1999  kristerw Fixed typos (from OpenBSD)
 1.11 08-Sep-1999  oster branches: 1.11.4;
Note M_RAIDFRAME.
 1.10 16-Mar-1999  garbled More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.9 06-Mar-1999  mycroft Fix formatting errors (bad sentence breaks).
 1.8 29-Jul-1998  pk Add a few more memory types.
 1.7 22-Apr-1998  ross Add David Brownlee's new intro pages, with editing. (PR #534[23])
Also, while here, expand apparently incorrectly .Dd month abbreviations.
(I thought about doing this in tmac/doc-common...heh...that would have
allowed a possible reverse map back to abbreviations.)
 1.6 11-Nov-1997  mrg add missing .Nm sections
 1.5 08-Oct-1997  jtc branches: 1.5.2;
Fix tipo inherited from old version of TNF copyright form.
s/REGENTS/FOUNDATION/.
 1.4 02-Aug-1997  kleink Sync with <sys/malloc.h>.
 1.3 11-Nov-1996  lukem fix the the typos
 1.2 30-Oct-1996  lukem fix typo
 1.1 16-Jun-1996  pk kernel memory allocator
 1.5.2.1 11-Nov-1997  mrg pull up from trunk: add missing .Nm sections
 1.11.4.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.40.8.2 30-Jul-2007  alc kills a few `caddr_t' occurences still present in manpage
 1.40.8.1 30-Jul-2007  alc file malloc.9 was added on branch matt-mips64 on 2007-07-30 22:48:48 +0000
 1.41.4.1 18-May-2008  yamt sync with head.
 1.41.2.2 02-Jun-2008  mjf Sync with HEAD.
 1.41.2.1 24-Mar-2008  mjf file malloc.9 was added on branch mjf-devfs2 on 2008-06-02 13:21:41 +0000
 1.42.4.1 02-Feb-2009  snj Pull up following revision(s) (requested by ad in ticket #368):
share/man/man9/malloc.9: revision 1.45 via patch
Tweak text.
 1.45.2.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.47.24.1 10-Aug-2014  tls Rebase.
 1.47.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.49.2.2 04-Nov-2015  riz Pull up following revision(s) (requested by maxv in ticket #940):
share/man/man4/options.4: revision 1.446
share/man/man4/options.4: revision 1.447
share/man/man9/malloc.9: revision 1.52
share/man/man9/malloc.9: revision 1.53
Remove the DIAGNOSTIC section, and two references to MALLOC and FREE.
Remove KMEMSTATS.
Remove the malloc debug options. They no longer exist.
Remove KMEMSTATS
 1.49.2.1 17-Jan-2015  martin Pull up following revision(s) (requested by maxv in ticket #427):
sys/compat/svr4/svr4_schedctl.c: revision 1.8
sys/netinet/tcp_timer.c: revision 1.88
sys/miscfs/genfs/layer_vfsops.c: revision 1.45
sys/compat/svr4/svr4_ioctl.c: revision 1.37
sys/ufs/chfs/chfs_vfsops.c: revision 1.14
sys/miscfs/fdesc/fdesc_vfsops.c: revision 1.91
sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.30
sys/compat/common/kern_time_50.c: revision 1.28
sys/netinet6/ip6_forward.c: revision 1.74
sys/miscfs/umapfs/umap_vnops.c: revision 1.57
sys/compat/svr4/svr4_fcntl.c: revision 1.74
distrib/sets/lists/comp/mi: revision 1.1931
sys/netinet6/udp6_output.c: revision 1.46
sys/fs/puffs/puffs_compat.c: revision 1.3
sys/fs/udf/udf_rename.c: revision 1.11
sys/compat/svr4/svr4_filio.c: revision 1.24
sys/fs/udf/udf_rename.c: revision 1.12
sys/netinet/tcp_usrreq.c: revision 1.202
sys/miscfs/umapfs/umap_subr.c: revision 1.29
sys/compat/linux/common/linux_fadvise64.c: revision 1.3
sys/netinet/if_atm.c: revision 1.34
sys/miscfs/procfs/procfs_subr.c: revision 1.106
sys/miscfs/genfs/layer_subr.c: revision 1.37
sys/netinet/tcp_sack.c: revision 1.30
sys/compat/freebsd/freebsd_misc.c: revision 1.33
sys/compat/freebsd/freebsd_file.c: revision 1.33
sys/ufs/chfs/chfs_vnode.c: revision 1.12
sys/compat/svr4/svr4_ttold.c: revision 1.34
sys/compat/linux/common/linux_file.c: revision 1.114
sys/compat/linux/arch/mips/linux_machdep.c: revision 1.43
sys/compat/linux/common/linux_signal.c: revision 1.76
sys/compat/common/compat_util.c: revision 1.46
sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.18
sys/compat/svr4/svr4_sockio.c: revision 1.36
sys/compat/linux/arch/arm/linux_machdep.c: revision 1.32
sys/compat/svr4/svr4_signal.c: revision 1.66
sys/kern/kern_exec.c: revision 1.410
sys/fs/puffs/puffs_vfsops.c: revision 1.115
sys/compat/svr4/svr4_exec_elf64.c: revision 1.15
sys/compat/linux/arch/i386/linux_machdep.c: revision 1.159
sys/compat/linux/arch/alpha/linux_machdep.c: revision 1.50
sys/compat/linux32/common/linux32_misc.c: revision 1.24
sys/netinet/in_pcb.c: revision 1.153
sys/sys/malloc.h: revision 1.116
sys/compat/common/if_43.c: revision 1.9
share/man/man9/Makefile: revision 1.380
sys/netinet/tcp_vtw.c: revision 1.12
sys/miscfs/umapfs/umap_vfsops.c: revision 1.95
sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.186
sys/compat/common/uipc_syscalls_43.c: revision 1.46
sys/ufs/ext2fs/ext2fs_vnops.c: revision 1.115
sys/fs/puffs/puffs_msgif.c: revision 1.97
sys/compat/svr4/svr4_ipc.c: revision 1.27
sys/compat/linux/common/linux_exec.c: revision 1.117
sys/ufs/ext2fs/ext2fs_readwrite.c: revision 1.66
sys/netinet/tcp_output.c: revision 1.179
sys/compat/svr4/svr4_termios.c: revision 1.28
sys/fs/udf/udf_strat_bootstrap.c: revision 1.4
sys/fs/puffs/puffs_subr.c: revision 1.67
sys/fs/puffs/puffs_node.c: revision 1.36
sys/miscfs/overlay/overlay_vnops.c: revision 1.21
sys/fs/cd9660/cd9660_node.c: revision 1.34
sys/netinet/raw_ip.c: revision 1.146
sys/sys/mallocvar.h: revision 1.13
sys/miscfs/overlay/overlay_vfsops.c: revision 1.63
share/man/man9/malloc.9: revision 1.50
sys/netinet6/dest6.c: revision 1.18
sys/compat/linux/common/linux_uselib.c: revision 1.33
sys/compat/linux/common/linux_socket.c: revision 1.120
share/man/man9/malloc.9: revision 1.51
sys/netinet/tcp_subr.c: revision 1.257
sys/compat/linux/common/linux_socketcall.c: revision 1.45
sys/compat/linux/common/linux_fadvise64_64.c: revision 1.3
sys/compat/freebsd/freebsd_ipc.c: revision 1.17
sys/compat/linux/common/linux_misc_notalpha.c: revision 1.109
sys/compat/linux/arch/alpha/linux_pipe.c: revision 1.17
sys/netinet6/in6_pcb.c: revision 1.132
sys/netinet6/in6_ifattach.c: revision 1.94
sys/compat/svr4/svr4_exec_elf32.c: revision 1.15
sys/miscfs/nullfs/null_vfsops.c: revision 1.90
sys/fs/cd9660/cd9660_util.c: revision 1.12
sys/compat/linux/arch/powerpc/linux_machdep.c: revision 1.48
sys/compat/freebsd/freebsd_exec_elf32.c: revision 1.20
sys/miscfs/procfs/procfs_vfsops.c: revision 1.94
sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.28
sys/compat/linux/common/linux_sched.c: revision 1.67
sys/compat/linux/common/linux_exec_aout.c: revision 1.67
sys/compat/linux/common/linux_pipe.c: revision 1.67
sys/compat/linux/common/linux_llseek.c: revision 1.34
sys/compat/linux/arch/mips/linux_ptrace.c: revision 1.10
Do not uselessly include <sys/malloc.h>.
Cleanup:
- remove struct kmembuckets (dead)
- correctly deadify MALLOC_XX
- remove MALLOC_DEFINE_LIMIT and MALLOC_JUSTDEFINE_LIMIT (dead)
- remove malloc_roundup(), malloc_type_setlimit(), MALLOC_DEFINE_LIMIT()
and MALLOC_JUSTDEFINE_LIMIT() from man 9 malloc
New sentence, new line. Bump date for previous.
Obsolete malloc_roundup(9), malloc_type_setlimit(9) and MALLOC_DEFINE_LIMIT(9)
man pages.
 1.54.6.1 10-Jun-2019  christos Sync with HEAD
 1.54.4.1 20-Oct-2018  pgoyette Sync with head
 1.9 29-Nov-2019  riastradh Nix obsolete mb(9) man page.
 1.8 13-Nov-2017  wiz branches: 1.8.4;
Bump space for previous. Formatting fix.
 1.7 12-Nov-2017  riastradh Explicitly mark mb(9) as deprecated, as it has been for a decade.
 1.6 02-Jan-2011  jruoho Xref __insn_barrier(3) and mb(9) with each other.
 1.5 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.4 01-Dec-2007  wiz branches: 1.4.6; 1.4.8;
Fix typos.
 1.3 08-Apr-2007  ad branches: 1.3.4;
Tidy up a bit.
 1.2 02-Feb-2007  wiz Sort options. Fix a few typos.
 1.1 02-Feb-2007  ad Add manpage for memory barrier ops. Not enabled in the Makefile yet.
 1.3.4.1 09-Jan-2008  matt sync with HEAD
 1.4.8.1 18-May-2008  yamt sync with head.
 1.4.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.8.4.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.67 28-Jun-2022  rillig fix references in manual pages to the reference documentation
 1.66 22-Dec-2018  maxv Update the man page, we don't want M_COPY_PKTHDR, M_MOVE_PKTHDR, MH_ALIGN
and M_ALIGN.
 1.65 15-Nov-2018  maxv Remove the 'copy' argument from m_devget(), unused. While here rename
off0->off.
 1.64 07-May-2018  maxv branches: 1.64.2;
Clean up, improve a bit, and document m_remove_pkthdr.
 1.63 28-Apr-2018  maxv Rename the 'flags' and 'nowait' arguments to 'how'. The other BSDs did the
same. Also, in m_defrag, rename 'mold' to 'm'.
 1.62 27-Apr-2018  wiz New sentence, new line.
 1.61 27-Apr-2018  maxv M_CLUSTER -> M_EXT_CLUSTER, and remove M_CLUSTER completely.
 1.60 27-Apr-2018  maxv Improve the documentation of m_copypacket(), to say explicitly that a
header must be present, contrary to m_copym().

While here fix a variable name (from yesterday).
 1.59 26-Apr-2018  maxv Stop adding '0's in parameter and function names, that's just misleading.
Some remain, they need more investigation.
 1.58 26-Apr-2018  maxv Remove m_prepend from the man page, it's a helper, and is not supposed to
be part of the API.
 1.57 10-Apr-2018  maxv Remove m_getclr. It is unused, confusing (vs m_clget), and is a weak
implementation (eg you can't request a zeroed pkthdr mbuf).
 1.56 25-Jan-2018  maxv branches: 1.56.2;
Improve wording.
 1.55 22-Jan-2018  maxv m_split does not 'attempt' to restore the chain, it just restores it plain
and simple.
 1.54 22-Jan-2018  maxv m_prepend does not tolerate being given len > MHLEN, so add a panic, and
document this behavior.
 1.53 01-Jan-2018  wiz Remove trailing comma from SYNOPSIS.
Try improving markup.
 1.52 01-Jan-2018  maxv Remove MFREE.
 1.51 17-Jun-2013  ryo add m_copyup(9) obtained from FreeBSD (manual only)
 1.50 02-Dec-2010  wiz branches: 1.50.6; 1.50.12;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.49 09-Mar-2009  joerg .br -> .Pp, the former is not a mdoc(7) macro.
 1.48 31-May-2008  enami branches: 1.48.4;
No comma is necessary for the last .Nm entry.
 1.47 30-Apr-2008  martin branches: 1.47.2;
Convert TNF licenses to new 2 clause variant
 1.46 24-Mar-2008  yamt branches: 1.46.2; 1.46.4;
update after yamt-lazymbuf merge.
 1.45 30-Jul-2007  alc branches: 1.45.8;
kills a few `caddr_t' occurences still present in manpage
 1.44 07-Mar-2007  dogcow running in emulated wizd mode, convert caddr_t to void *.
 1.43 30-Jul-2006  wiz Bump date for previous.
 1.42 28-Jul-2006  dyoung Let there be no mistake, m_makewritable() does not guarantee that
the writable bytes [off, off+len) are consecutive.
 1.41 29-Mar-2006  riz Fix up the description of m_copyback_cow(), which was at best
ambiguous, and at worst, wrong.
 1.40 23-Aug-2005  yamt document M_MOVE_PKTHDR.
 1.39 02-Jul-2005  wiz Sort SEE ALSO.
 1.38 01-Jul-2005  kleink Xref m_tag(9); suggested by Peter Postma for closure of kern/20170.
 1.37 01-Jul-2005  peter Add ".An -nosplit" to avoid getting newlines for every .An macro.
 1.36 02-Jun-2005  bad Be explicit about which beginning the offset is applied to in m_copydata().
 1.35 18-Mar-2005  wiz Bump date for mtocl, cltom removal.
 1.34 18-Mar-2005  yamt remove cltom and mtocl. they've gone away long time ago.
 1.33 15-Dec-2004  wiz branches: 1.33.2;
New sentence, new line. Zero is no defined value, just a number.
 1.32 15-Dec-2004  wiz Drop trailing whitespace.
 1.31 12-Dec-2004  spz adds a description of m_apply
closes PR kern/26059
has been looked at by Jason Thorpe and Christos Zoulas
 1.30 06-Sep-2004  wiz mdoc and Grammar improvements (at least I hope so :) ).
 1.29 06-Sep-2004  yamt - document m_copyback_cow and m_makewritable.
- note limitations of m_copyback.
- bump date.
 1.28 27-May-2003  yamt branches: 1.28.2;
sync with reality and more note. (MEXTADD)
 1.27 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.26 25-Feb-2003  wiz .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
 1.25 14-Feb-2003  grant The correct capitalisation of 'NetBSD.org' is (you
guessed it) 'NetBSD.org'.

some mdoc fixes.
 1.24 03-Jan-2003  jschauma Fix typos noted by Igor Sobrado in PR misc/19641 (some already fixed
by others):

MCHTYPE(9) - implemntation (implementation)
VFS_CHECKEXP(9) - specied (specified), acces (access)
VOP_ABORTOP(9) - singla (single), implments (implements),
callling (calling), credientials (credentials)
 1.23 14-Oct-2002  wiz New sentence, new line.
 1.22 12-May-2002  wiz Spelling fixes, from Sergey Svishchev in kern/16650.
 1.21 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.20 26-Dec-2001  wiz Sort sections.
 1.19 28-Nov-2001  kleink Add missing `size' argument to MEXTADD declaration; from Yannick Montulet
in PR misc/14758.
 1.18 28-Nov-2001  kleink No point in using __P for prototype declarations in a manual page.
 1.17 04-Sep-2001  wiz Boring whitespace fixes.
 1.16 28-Jul-2001  itojun document behavior of M_{LEADING,TRAILING}SPACE when mbuf data portion is shared.
(NOTE: this is a netbsd-only behavior)
 1.15 28-Jun-2001  itojun wording - refer to [off, off + len] by "the contiguous region", it should
be more clear
 1.14 28-Jun-2001  itojun document m_pulldown (grammar check anyone?).
document m_pullup length restriction (len <= MHLEN).
 1.13 17-Jun-2001  kleink Correct mtod() return data type.
 1.12 09-Apr-2001  wiz Replace a .Xr with a .Pa.
 1.11 07-Nov-2000  lukem fix up various .Nm abuses:
- keep the case consistent between the actual name and what's referenced.
e.g, if it's `foo', don't use '.Nm Foo' at the start of a sentence.
- remove unnecessary `.Nm foo' after the first occurrence (except for
using `.Nm ""' if there's stuff following, or for the 2nd and so on
occurrences in a SYNOPSIS
- use Sx, Ic, Li, Em, Sq, and Xr as appropriate
 1.10 13-Oct-2000  itojun document m_dup(9). talk a little bit about issues with shared
external storage (M_EXT).
 1.9 14-Aug-2000  tv MLINK2->M_LINK2, also make the listing of these three options be more in
line with the columnar layout.
 1.8 19-Nov-1999  enami Don't pass so many args to .Nd macro. It just overflows.
 1.7 16-Mar-1999  garbled branches: 1.7.6;
More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.6 06-Mar-1999  mycroft Fix formatting errors (bad sentence breaks).
 1.5 03-Sep-1998  msaitoh Eliminate extra comma in SEE ALSO section
 1.4 22-Apr-1998  ross Add David Brownlee's new intro pages, with editing. (PR #534[23])
Also, while here, expand apparently incorrectly .Dd month abbreviations.
(I thought about doing this in tmac/doc-common...heh...that would have
allowed a possible reverse map back to abbreviations.)
 1.3 27-Nov-1997  mikel fix capitalization as noted by Chris Demetriou in PR 4377
while I'm here, fix numerous spelling, grammar, and -mdoc macro usage bugs
 1.2 12-Nov-1997  mrg add missing .Nm calls and MLINKS. from spz@serpens.swb.de
 1.1 04-Oct-1997  kleink branches: 1.1.2;
Add manual page containing documentation on mbuf management functions and
macros; contributed by S.P.Zeidler <spz@serpens.swb.de>.
 1.1.2.2 27-Nov-1997  mellon Pull rev 1.3 up from trunk (mikel)
 1.1.2.1 12-Nov-1997  mrg pull up from trunk: add missing .Nm calls and MLINKS. from spz@serpens.swb.de
 1.7.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.28.2.1 11-Sep-2004  he branches: 1.28.2.1.2;
Pull up revision 1.29 (requested by yamt in ticket #831):
Add m_copyback_cow and m_makewritable.
 1.28.2.1.2.1 04-Apr-2006  tron Pull up following revision(s) (requested by riz in ticket #10405):
share/man/man9/mbuf.9: revision 1.41 via patch
Fix up the description of m_copyback_cow(), which was at best
ambiguous, and at worst, wrong.
 1.33.2.1 03-Apr-2006  tron Pull up following revision(s) (requested by riz in ticket #1233):
share/man/man9/mbuf.9: revision 1.41 via patch
Fix up the description of m_copyback_cow(), which was at best
ambiguous, and at worst, wrong.
 1.45.8.2 30-Jul-2007  alc kills a few `caddr_t' occurences still present in manpage
 1.45.8.1 30-Jul-2007  alc file mbuf.9 was added on branch matt-mips64 on 2007-07-30 22:48:48 +0000
 1.46.4.2 04-Jun-2008  yamt sync with head
 1.46.4.1 18-May-2008  yamt sync with head.
 1.46.2.2 02-Jun-2008  mjf Sync with HEAD.
 1.46.2.1 24-Mar-2008  mjf file mbuf.9 was added on branch mjf-devfs2 on 2008-06-02 13:21:41 +0000
 1.47.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.48.4.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.50.12.1 23-Jun-2013  tls resync from head
 1.50.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.56.2.5 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.56.2.4 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.56.2.3 21-May-2018  pgoyette Sync with HEAD
 1.56.2.2 02-May-2018  pgoyette Synch with HEAD
 1.56.2.1 16-Apr-2018  pgoyette Sync with HEAD, resolve some conflicts
 1.64.2.1 10-Jun-2019  christos Sync with HEAD
 1.12 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.11 15-Mar-2013  njoly Fix a few file system paths to use Pa macro.
 1.10 30-May-2011  dyoung branches: 1.10.4; 1.10.10;
MI drivers should #include <sys/bus.h> not <machine/bus.h>.
 1.9 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.8 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.7 16-Apr-2003  wiz branches: 1.7.32; 1.7.34;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.6 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.5 14-Oct-2002  wiz New sentence, new line.
 1.4 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.3 26-Oct-2001  jdolecek Fix typo - it's <dev/mca/mcadevs.h>, not <dev/tc/mcadevs.h>.
Reported by Miod Vallat in misc/14365.
 1.2 22-Oct-2001  wiz Whitespace, punctuation fixes; sort sections, fix xrefs.
 1.1 22-Oct-2001  gmcgarry Programmer's guide for MicroChannel.
 1.7.34.1 18-May-2008  yamt sync with head.
 1.7.32.1 02-Jun-2008  mjf Sync with HEAD.
 1.10.10.1 23-Jun-2013  tls resync from head
 1.10.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.5 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22309, verified by myself.
 1.4 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.3 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.2 23-Nov-2001  jdolecek Use <sys/systm.h> instead of <systm.h>. Noted in kern/14697 by John Franklin
 1.1 07-Jul-2001  perry man pages for b*() and mem*(), noting b*() to be obsolete
 1.10 18-Mar-2017  riastradh Use `\(em', not `--'.

Refill sentences and tweak wording where appropriate while here.
 1.9 02-Jan-2012  wiz branches: 1.9.22; 1.9.26;
Bump date for previous. Move RCS Id to top of file.
 1.8 02-Jan-2012  rkujawa Correct the include path.
 1.7 08-Sep-2003  wiz branches: 1.7.58;
Use St -isoC-9X instead of St -isoC9X, to be in sync with groff.
 1.6 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22309, verified by myself.
 1.5 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.4 14-Oct-2002  wiz New sentence, new line.
 1.3 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.2 26-Dec-2001  wiz Fix SEE ALSO section.
 1.1 07-Jul-2001  perry man pages for b*() and mem*(), noting b*() to be obsolete
 1.7.58.1 17-Apr-2012  yamt sync with head
 1.9.26.1 21-Apr-2017  bouyer Sync with HEAD
 1.9.22.1 20-Mar-2017  pgoyette Sync with HEAD
 1.6 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22309, verified by myself.
 1.5 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.4 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.3 26-Dec-2001  wiz Fix SEE ALSO section.
 1.2 23-Nov-2001  jdolecek Use <sys/systm.h> instead of <systm.h>. Noted in kern/14697 by John Franklin
 1.1 07-Jul-2001  perry man pages for b*() and mem*(), noting b*() to be obsolete
 1.8 29-Oct-2017  riastradh Fix typo.

Wishful thinking for some of our resource-constrained platforms!
 1.7 28-Oct-2017  riastradh Rework memory allocators summary.

Recommend kmem(9) for everything that doesn't have special needs.

Note vmem(9) and extent(9) too.
 1.6 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.5 20-Jul-2013  wiz Use Mt for email addresses.
 1.4 03-Aug-2009  rmind branches: 1.4.8; 1.4.14; 1.4.18;
Sync with reality a little, drop description of obsolete interface.
XXX: man page needs better wording.
 1.3 09-Jan-2007  elad Remove advertising clause from all of my stuff.
 1.2 08-Jan-2007  wiz Sort SEE ALSO.
 1.1 07-Jan-2007  elad Add a memoryallocators(9) man-page to give a short summary of memory
allocators available in the kernel.

Tons of input from YAMAMOTO Takashi, thanks!
 1.4.18.1 23-Jul-2013  riastradh sync with HEAD
 1.4.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.8.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.5 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22309, verified by myself.
 1.4 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.3 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.2 23-Nov-2001  jdolecek Use <sys/systm.h> instead of <systm.h>. Noted in kern/14697 by John Franklin
 1.1 07-Jul-2001  perry man pages for b*() and mem*(), noting b*() to be obsolete
 1.4 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.3 04-May-2009  wiz New sentence, new line. Prepare for HTML output.
 1.2 30-Apr-2008  martin branches: 1.2.6;
Convert TNF licenses to new 2 clause variant
 1.1 21-Jul-2007  dsieger branches: 1.1.10; 1.1.12; 1.1.14;
Remove obsolete content about cpu_switchto() from ctxsw(9) and rename
it to mi_switch(9).

Suggested by yamt@
 1.1.14.2 21-Jul-2007  dsieger Remove obsolete content about cpu_switchto() from ctxsw(9) and rename
it to mi_switch(9).

Suggested by yamt@
 1.1.14.1 21-Jul-2007  dsieger file mi_switch.9 was added on branch matt-mips64 on 2007-07-21 08:51:32 +0000
 1.1.12.1 18-May-2008  yamt sync with head.
 1.1.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.2.6.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.6 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.5 14-Jul-2007  ad - kcont was removed.
- Replace some references to tsleep.
 1.4 04-Oct-2004  rumble Removed accidental repetitious words.
 1.3 23-Jan-2004  wiz Sort sections, sort SEE ALSO; some gramamar fixes;
use more mdoc, |fmt. Add RCS Id.
 1.2 23-Jan-2004  wiz Drop trailing whitespace.
 1.1 19-Jan-2004  jdolecek branches: 1.1.1;
Initial revision
 1.1.1.1 19-Jan-2004  jdolecek Import Gary Thorpe's netbsd-ppbus 1.3. This is NetBSD port
of FreeBSD Parallel Port Bus framework. Work in progress.
 1.21 17-Sep-2013  wiz Sort sections: consistently put CODE REFERENCES directly before SEE ALSO.
 1.20 20-Jul-2013  wiz Use Mt for email addresses.
 1.19 13-May-2013  wiz branches: 1.19.2;
Make nanotime and getnanotime prototypes match.
Also, the BUGS section doesn't describe something fixable, so make
it a CAVEATS section instead.
Bump date.
 1.18 08-Jun-2010  jruoho branches: 1.18.6; 1.18.12;
Xref bintime_add(9).
 1.17 08-Jun-2010  jruoho Don't unnecessarily clutter the SEE ALSO.
 1.16 17-May-2010  jruoho Briefly describe and note also struct bintime.
 1.15 28-Nov-2008  tsutsui branches: 1.15.4;
Sync with microuptime(9):
- improve punctuation
- add explicit xref to hz(9)
- use Em for HZ
 1.14 24-Nov-2008  tsutsui Add Xref to new timecounter(9).
 1.13 24-Nov-2008  tsutsui Merge description about bintime(9), getbintime(9), getmicrotime(9),
nanotime(9), and getnanotime(9) from FreeBSD's microtime(9) man page,
and add appropriate MLINKS.
 1.12 30-Apr-2008  martin branches: 1.12.4;
Convert TNF licenses to new 2 clause variant
 1.11 20-Feb-2007  wiz branches: 1.11.10; 1.11.12;
time(9) was renamed to time_second(9), fix xrefs.
 1.10 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.9 29-Jun-2002  gmcgarry Xref hardclock(9).
 1.8 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.7 04-Sep-2001  wiz Xref hz(9), now that it exists.
 1.6 04-Sep-2001  wiz Boring whitespace fixes.
 1.5 19-Jun-2001  msaitoh s/monotomically/monotonically/g
 1.4 29-Apr-2001  jhawk Comment out references to hz(9) and hardclock(9). It'd be nice
if someone wrote them, but let's not reference them until they are
written. Addresses PR kern/4901.
 1.3 12-Sep-1999  kleink branches: 1.3.8;
Use full month names with .Dd, as per mdoc.samples(7).
 1.2 16-Mar-1999  garbled More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.1 15-Sep-1998  jeremy Manual page which describes the microtime() function for obtaining the
current value of the system realtime clock.
 1.3.8.1 30-Sep-2001  he Pull up revision 1.5 (requested by msaitoh):
Spelling fixes.
 1.11.12.1 18-May-2008  yamt sync with head.
 1.11.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.12.4.3 01-Dec-2008  snj Pull up following revision(s) (requested by tsutsui in ticket #153):
share/man/man9/microtime.9: revision 1.15
Sync with microuptime(9):
- improve punctuation
- add explicit xref to hz(9)
- use Em for HZ
 1.12.4.2 01-Dec-2008  snj Pull up following revision(s) (requested by tsutsui in ticket #153):
share/man/man9/microtime.9: revision 1.14
share/man/man9/microuptime.9: revision 1.3
share/man/man9/tvtohz.9: revision 1.2
Add Xref to new timecounter(9).
 1.12.4.1 01-Dec-2008  snj Pull up following revision(s) (requested by tsutsui in ticket #153):
distrib/sets/lists/comp/mi: revision 1.1212
share/man/man9/Makefile: revision 1.272
share/man/man9/microtime.9: revision 1.13
Merge description about bintime(9), getbintime(9), getmicrotime(9),
nanotime(9), and getnanotime(9) from FreeBSD's microtime(9) man page,
and add appropriate MLINKS.
 1.15.4.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.18.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.18.12.1 23-Jun-2013  tls resync from head
 1.18.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.19.2.1 23-Jul-2013  riastradh sync with HEAD
 1.12 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.11 20-Jul-2013  wiz Use Mt for email addresses.
 1.10 08-Jun-2010  jruoho branches: 1.10.6; 1.10.12; 1.10.16;
Don't unnecessarily clutter the SEE ALSO.
 1.9 17-May-2010  jruoho Briefly describe and note also struct bintime.
 1.8 28-Nov-2008  tsutsui branches: 1.8.4;
- use Em for HZ
- also add hz(9) to SEE ALSO
 1.7 26-Nov-2008  wiz Fix part of previous, and add link to hz(9) so it will
not happen again.
 1.6 26-Nov-2008  wiz Casing and punctuation improvements.
 1.5 25-Nov-2008  tsutsui Bump date for previous.
 1.4 24-Nov-2008  tsutsui Pull expected usage of get*uptime() functions from <sys/timevar.h>
as well as microtime(9) man page.
 1.3 24-Nov-2008  tsutsui Add Xref to new timecounter(9).
 1.2 24-Nov-2008  tsutsui Put FreeBSD's RCS Id for reference.
 1.1 24-Jun-2006  kardel branches: 1.1.26;
add microuptime.9 (from FreeBSD) for timecounters
 1.1.26.7 01-Dec-2008  snj Pull up following revision(s) (requested by tsutsui in ticket #153):
share/man/man9/microuptime.9: revision 1.8
- use Em for HZ
- also add hz(9) to SEE ALSO
 1.1.26.6 01-Dec-2008  snj Pull up following revision(s) (requested by tsutsui in ticket #153):
share/man/man9/microuptime.9: revision 1.7
Fix part of previous, and add link to hz(9) so it will
not happen again.
 1.1.26.5 01-Dec-2008  snj Pull up following revision(s) (requested by tsutsui in ticket #153):
share/man/man9/microuptime.9: revision 1.6
Casing and punctuation improvements.
 1.1.26.4 01-Dec-2008  snj Pull up following revision(s) (requested by tsutsui in ticket #153):
share/man/man9/microuptime.9: revision 1.5
Bump date for previous.
 1.1.26.3 01-Dec-2008  snj Pull up following revision(s) (requested by 153):
share/man/man9/microuptime.9: revision 1.4
Pull expected usage of get*uptime() functions from <sys/timevar.h>
as well as microtime(9) man page.
 1.1.26.2 01-Dec-2008  snj Pull up following revision(s) (requested by tsutsui in ticket #153):
share/man/man9/microtime.9: revision 1.14
share/man/man9/microuptime.9: revision 1.3
share/man/man9/tvtohz.9: revision 1.2
Add Xref to new timecounter(9).
 1.1.26.1 01-Dec-2008  snj Pull up following revision(s) (requested by tsutsui in ticket #153):
share/man/man9/microuptime.9: revision 1.2
Put FreeBSD's RCS Id for reference.
 1.8.4.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.10.16.1 23-Jul-2013  riastradh sync with HEAD
 1.10.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.10.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.55 25-Feb-2025  martin PR 59102: fix signature of module callback function.
 1.54 12-Aug-2022  riastradh branches: 1.54.4;
module(9), sysctl(7): Document kern.module.autounload_unsafe.
 1.53 22-Jul-2021  pgoyette module_hold() returns void, not int

XXX module_hold() and module_rele() should probably not be exposed, since
XXX they really aren't MP-safe.
 1.52 07-Apr-2019  pgoyette Make explicit note that MODULE_CLASS_ANY should note be used as the
class of a MODULE(). MODULE_CLASS_ANY is intended only to indicate
a "wildcard" match when (auto)loading modules.
 1.51 27-Jan-2019  wiz Grammar fix.
 1.50 27-Jan-2019  pgoyette Merge the [pgoyette-compat] branch
 1.49 18-Jun-2018  pgoyette branches: 1.49.2;
The whole point of my recent addition of the specificdata(9) man page
was so it could be cross-referenced here. So, add the xref.
 1.48 15-Jun-2018  pgoyette Add missing .Fn mark-up
 1.47 15-Jun-2018  wiz Whitespace fixes.
 1.46 03-Jun-2018  pgoyette Finish documenting the new modules(9) interfaces by adding the module
specificdata routines.
 1.45 03-Jun-2018  pgoyette Also add new entries in the .Nm list, and update Makefile to actually
build the MLINKS
 1.44 03-Jun-2018  pgoyette Add documentation on the module_{,un}register_callbacks() routines.

XXX Still need to document the module_specificdata_* stuff, which
XXX needs to refer to a non-existent specificdata(9) man page!
 1.43 28-May-2018  pgoyette Partial update for new module interfaces. This update addresses the
new accessor functions and changes to module_hold() and module_rele(),
and fixes the prototype of each module's xxx_modcmd() function.

We still need updates related to the "specificdata" and callback
changes:

specificdata_key_t module_specific_key_create(specificdata_key_t *,
specificdata_dtor_t);
void module_specific_key_delete(specificdata_key_t);
void *module_getspecific(module_t *, specificdata_key_t);
void module_setspecific(module_t *, specificdata_key_t, void *);
void *module_register_callbacks(void (*)(struct module *),
void (*)(struct module *));
void module_unregister_callbacks(void *);

XXX The various functions listed in the man page should grouped into a
XXX few logical sub-sets.
 1.42 20-Dec-2017  wiz branches: 1.42.2;
Fix xref. Remove unnecessary Tn.
 1.41 20-Dec-2017  pgoyette Provide the real width of the MODULE_CLASS_xxx table's first column.
 1.40 16-Dec-2017  pgoyette Explicitly note that the required argument to the MODULE() macro is
a quoted string, or NULL.
 1.39 16-Dec-2017  pgoyette Document the arguments to the MODULE() macro
 1.38 04-Oct-2015  pgoyette branches: 1.38.8;
Minor tweaks, from Michael McConville
 1.37 04-Jun-2015  pgoyette Fix typo - from Kamil Rytarowski
 1.36 14-May-2015  wiz Sort sections.
 1.35 13-May-2015  pgoyette Add a reference to the recently added module examples.
 1.34 13-May-2015  pgoyette Add the correct cross-ref, to intro(9lua)
 1.33 13-May-2015  pgoyette Note to self: if you're going to revert, do it right.

This should restore the original SEE ALSO section.
 1.32 13-May-2015  pgoyette Revert revision 1.31 - the referenced page does not exist and I am not
qualified to write it!
 1.31 13-May-2015  pgoyette Add an entry for lue(9lua) to the SEE ALSO list.
 1.30 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.29 20-Jul-2013  wiz Use Mt for email addresses.
 1.28 18-Oct-2011  jruoho branches: 1.28.2; 1.28.8; 1.28.12;
Note that manually loaded modules are not auto-unloaded.
 1.27 13-Feb-2011  jym Notify that the file system has to be mounted first before modules can
be loaded from it.

ok pgoyette@
 1.26 09-Jan-2011  jnemeth branches: 1.26.2;
Update module_autoload to say that a .plist file will be loaded, and if
that .plist contains noautoload=true then the system will refuse to load
the module.
 1.25 14-Dec-2010  jruoho Fix xref; module(4) -> module(7).
 1.24 13-Dec-2010  jruoho Xref module(4).
 1.23 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.22 28-Nov-2010  jnemeth Rename the autoloaded property list from <module>.prop to <module>.plist
as discussed on tech-kern.
 1.21 25-Aug-2010  jnemeth note that MODULE_CLASS_SECMODEL is also automatically deregistered when being unloaded
 1.20 24-Aug-2010  jruoho Few small nits.
 1.19 21-Aug-2010  pgoyette Put a valid date here - no more placeholder.
 1.18 21-Aug-2010  pgoyette Define a set of new kernel locking primitives to implement the recursive
kernconfig_mutex. Update module subsystem to use this mutex rather than
its own internal (non-recursive) mutex. Make module_autoload() do its
own locking to be consistent with the rest of the module_xxx() calls.
Update module(9) man page appropriately.

As discussed on tech-kern over the last few weeks.

Welcome to NetBSD 5.99.39 !
 1.17 18-Aug-2010  pgoyette Note that, for MODULE_CLASS_SECMODEL, the class is not ignored. Rather,
we will automatically call secmodel_register() for these modules.
 1.16 17-Aug-2010  wiz filesystem -> file system
 1.15 17-Aug-2010  jnemeth branches: 1.15.2;
A few corrections:

- the return value from modcmd(MODULE_CMD_FINI) is not ignored;
the module is only unloaded if the return value is 0
- if loading a module fails, the dependents won't be unloaded until
the auto_unload timer goes off
- clarify that <module>.prop is merged with the dictionary passed
in by modctl()
- clarify that other parts of the kernel shouldn't normally call
module_unload()
- add some more source references and mention routines expected to
be supplied by architecture dependent code
 1.14 14-Aug-2010  wiz Sort sections, remove trailing whitespace.
 1.13 14-Aug-2010  pgoyette Add an Authors section
 1.12 11-Aug-2010  wiz We usually write "file system", so change it to this version here.
Also, fix a typo, and remove a line only consisting of ".Fn ".
 1.11 11-Aug-2010  pgoyette Add documentation for the various module system initialization routines.
 1.10 08-Aug-2010  wiz Remove trailing whitespace, and mark up file name suffix.
 1.9 08-Aug-2010  pgoyette Filling in a few more gaps.
 1.8 07-Aug-2010  pgoyette Add documentation for module_find_section()
 1.7 04-Aug-2010  wiz Fix typo.
 1.6 04-Aug-2010  jruoho Improvements to wording, grammar, and markup.
 1.5 31-Jul-2010  pgoyette Unimplemented modcmd() routines should return ENOTTY, not zero.
 1.4 31-Jul-2010  pgoyette Improve markup, add documentation for the module's modcmd() interface
 1.3 31-Jul-2010  pgoyette Crap - another typo.
 1.2 31-Jul-2010  pgoyette Minor grammar nits.
 1.1 31-Jul-2010  pgoyette Make a first pass at documenting the module(9) subsystem.

XXX This is by no means complete, but it is a beginning.
 1.15.2.3 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.15.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.15.2.1 17-Aug-2010  uebayasi file module.9 was added on branch uebayasi-xip on 2010-08-17 06:41:05 +0000
 1.26.2.1 17-Feb-2011  bouyer Sync with HEAD
 1.28.12.1 23-Jul-2013  riastradh sync with HEAD
 1.28.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.28.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.38.8.1 21-Dec-2017  snj Pull up following revision(s) (requested by pgoyette in ticket #452):
share/man/man9/module.9: 1.39-1.140
Document the arguments to the MODULE() macro
--
Explicitly note that the required argument to the MODULE() macro is
a quoted string, or NULL.
 1.42.2.8 07-Sep-2018  pgoyette At the request of reviewers, remove the module alias functionality.

We will rely only on module names and duplicate-symbol detection to
detect module conflicts.
 1.42.2.7 25-Jun-2018  pgoyette Sync with HEAD
 1.42.2.6 16-Mar-2018  pgoyette Typo - missing 's'
 1.42.2.5 15-Mar-2018  pgoyette Spell the macro name correctly: MODULE_WITH_ALIASES vs MODULE_WITH_ALIAS
 1.42.2.4 14-Mar-2018  pgoyette Update to describe module aliases.
 1.42.2.3 11-Mar-2018  pgoyette Store the aliases list in the mod_info struct, since it is totally
static data. This saves us having to make a special xxx_modcmd()
call to retrieve the data. Update module(9) man page accordingly.
 1.42.2.2 10-Mar-2018  pgoyette We'll use an array of individual aliases, rather than a single, comma-
separated list. This saves us parsing the list each time through.
 1.42.2.1 10-Mar-2018  pgoyette Document the MODULE_CMD_GETALIASES command
 1.49.2.1 10-Jun-2019  christos Sync with HEAD
 1.54.4.1 02-Aug-2025  perseant Sync with HEAD
 1.12 28-Sep-2019  christos document that mstohz take and return unsigned int
 1.11 20-Oct-2011  wiz branches: 1.11.42;
Use Aq instead of \*[Lt]...\*[Gt]
 1.10 20-Oct-2011  jruoho Xref mstohz(9) and tvtohz(9) with each other.
 1.9 08-Apr-2011  jruoho Xref param(3).
 1.8 01-Jul-2010  jruoho Use .Fn instead of .Nm.
 1.7 01-Mar-2010  jruoho branches: 1.7.2;
In addition to mstohz(9), document also hztoms.
 1.6 19-Oct-2009  bouyer Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
 1.5 05-Oct-2003  bouyer Remove references to University of California from my copyright notices.
 1.4 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.3 14-Oct-2002  wiz New sentence, new line. .Fn needs an argument, so give it one.
 1.2 05-Apr-2002  wiz Various fixes, from spelling to mdoc.
 1.1 05-Apr-2002  bouyer Add a man page for mstohz()
 1.7.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.7.2.1 01-Mar-2010  uebayasi file mstohz.9 was added on branch uebayasi-xip on 2010-08-17 06:40:05 +0000
 1.11.42.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.35 01-Feb-2023  gutteridge mutex.9: add a small detail to the history section
 1.34 19-Dec-2022  uwe mutex(9): Minor formatting fixes

While here, move the reference to options(4) to the OPTIONS section.
 1.33 18-Dec-2022  gutteridge mutex.9: fix markup (.Em not .Fn)
 1.32 20-Aug-2022  riastradh mutex(9): Note counterintuitive IPL change releasing spin locks.

No functional change -- documentation only.

Details:

https://mail-index.netbsd.org/tech-kern/2010/11/12/msg009203.html
 1.31 09-Dec-2017  wiz Remove superfluous Pp.
 1.30 08-Dec-2017  riastradh Specify memory ordering implied by mutex_(spin_)enter/exit.

I'm hesitant to just say `implies membar_enter/exit' -- that may be a
little stronger than we intend, since we don't really mean to
guarantee anything about loads and stores before the mutex_enter or
after the mutex_exit. But we probably end up implementing the
semantics that we imply membar_enter/exit on all CPUs.
 1.29 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.28 02-May-2017  wiz Use more markup. Bump date for previous.
 1.27 01-May-2017  pgoyette Update mutex(9) for mutex_ownable()
 1.26 04-Sep-2013  skrll branches: 1.26.16;
Typo. Bump date.
 1.25 07-Jul-2012  rmind branches: 1.25.2;
mutex_owned: update about not-held test.
 1.24 02-Dec-2010  wiz branches: 1.24.6;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.23 14-Sep-2010  ahoka add a note on IPL and spinning mutexes

TODO: explain when the IPL will be restored
 1.22 16-Feb-2010  rmind branches: 1.22.2;
kpreempt(9): add a note when kernel preemption is disabled/deferred.
Sprinkle cross-links, bump dates.
 1.21 25-Jan-2010  jruoho Remove two consecutive commas in the SEE ALSO section.
 1.20 22-Nov-2009  mbalmer s/the the/the/
 1.19 18-May-2009  wiz Mark up defined value with Dv.
 1.18 23-Mar-2009  ad Xr lockstat 8
 1.17 19-Jul-2008  rmind branches: 1.17.4;
- From Paul Goyette: correct the description of mutex_spin_exit.
- Remove sentence about lockmgr(9), as it is finally replaced.
- Note atomic_ops(3) and membar_ops(3) man pages.
 1.16 30-Apr-2008  martin branches: 1.16.2;
Convert TNF licenses to new 2 clause variant
 1.15 07-Dec-2007  ad branches: 1.15.6; 1.15.8;
Fix pasto.
 1.14 05-Dec-2007  ad Minor corrections, from David P. Reese, Jr.
 1.13 05-Dec-2007  ad Xr spl(9)
 1.12 05-Dec-2007  ad Sort.
 1.11 05-Dec-2007  ad Sync with reality. (Apolgies for moving the goalposts slightly but it took
a long time to decide on and implement the new interrupt model.)
 1.10 01-Dec-2007  wiz Drop trailing whitespace.
 1.9 09-Apr-2007  ad branches: 1.9.4;
Try to be more concise, and add a bit more text.
 1.8 10-Mar-2007  matt Fix typo
 1.7 02-Feb-2007  wiz Fix Dd argument.
 1.6 02-Feb-2007  ad Add manpage for memory barrier ops. Not enabled in the Makefile yet.
 1.5 23-Dec-2006  wiz Use more markup. Use .Rs/.Re for book citation. Add missing comma.
 1.4 23-Dec-2006  wiz Drop trailing whitespace.
 1.3 14-Nov-2006  ad Remove misleading sentence, to be replaced by a manual page describing basic locking rules.
 1.2 13-Nov-2006  ad Fix errors.
 1.1 13-Nov-2006  ad Add manual pages for RW locks, mutexes and condition variables. Not
enabled in the Makefile.
 1.9.4.1 09-Jan-2008  matt sync with HEAD
 1.15.8.1 18-May-2008  yamt sync with head.
 1.15.6.2 05-Oct-2008  mjf Sync with HEAD.
 1.15.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.16.2.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.17.4.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.22.2.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.22.2.1 16-Feb-2010  uebayasi file mutex.9 was added on branch uebayasi-xip on 2010-10-22 07:11:54 +0000
 1.24.6.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.24.6.1 30-Oct-2012  yamt sync with head
 1.25.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.26.16.3 11-May-2017  pgoyette Sync with HEAD
 1.26.16.2 02-May-2017  pgoyette Sync with HEAD - tag prg-localcount2-base1
 1.26.16.1 30-Apr-2017  pgoyette Introduce mutex_ownable(9) and use it in localcount_release(9).

Commit of same code to head is awaiting discussion on tech-kern.
 1.21 19-Apr-2017  abhinav Fix typo: s/nshashtbl/nchashtbl
 1.20 18-Mar-2017  riastradh Omit excessive indentation for text.
 1.19 07-Feb-2014  wiz branches: 1.19.8; 1.19.12;
Mark up author name with An.
 1.18 07-Feb-2014  hannken Change vnode operation lookup to return the resulting vnode *vpp unlocked.
Change cache_lookup() to return an unlocked vnode.

Discussed on tech-kern@

Welcome to 6.99.31
 1.17 05-Nov-2012  wiz Use other markup. Remove trailing space.
 1.16 05-Nov-2012  dholland Update docs for namecache changes.
 1.15 02-Dec-2010  wiz branches: 1.15.6; 1.15.12;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.14 21-Jul-2010  hannken Using cache_revlookup() leads to vnode races as it returns an unreferenced
vnode that may disappear before the caller has a chance to reference it.

Reference the vnode while the name cache is locked.

No objections on tech-kern.
 1.13 13-May-2009  wiz branches: 1.13.2;
Mark up NULL with Dv.
 1.12 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.11 25-Jun-2007  rumble branches: 1.11.10; 1.11.12;
Note that if vp is NULL in cache_enter, a negative entry is created.
 1.10 28-Dec-2004  wiz Bump date for previous.
 1.9 28-Dec-2004  yamt update to match with the recent reality. PR/28793.
 1.8 16-Apr-2003  wiz branches: 1.8.4;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.7 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.6 14-Oct-2002  wiz New sentence, new line, and fix a typo.
 1.5 06-Aug-2002  wiz Add a missing brace.
 1.4 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.3 22-Oct-2001  gmcgarry mount.9 doesn't exist (yet?)
 1.2 22-Oct-2001  wiz Whitespace, punctuation fixes; sort sections, fix xrefs.
 1.1 22-Oct-2001  gmcgarry Programmer's guide to the VFS interface.
 1.8.4.1 06-May-2005  riz Pull up revision 1.9-1.10 (requested by yamt in ticket #1168):
update to match with the recent reality. PR/28793.
 1.11.12.1 18-May-2008  yamt sync with head.
 1.11.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.13.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.15.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.15.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.15.6.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.15.6.1 16-Jan-2013  yamt sync with (a bit old) head
 1.19.12.1 21-Apr-2017  bouyer Sync with HEAD
 1.19.8.2 26-Apr-2017  pgoyette Sync with HEAD
 1.19.8.1 20-Mar-2017  pgoyette Sync with HEAD
 1.52 26-Dec-2021  andvar namei(9): s/operatoins/operations/
 1.51 05-May-2019  christos sync with reality
 1.50 03-Jul-2017  wiz branches: 1.50.6;
Remove workaround for ancient HTML generation code.
 1.49 03-May-2017  abhinav Fix a sentence: s/a operation/an operation/
 1.48 03-May-2017  abhinav Fixes in NAME section:
Insert comma between two Nm entries
Remove comma after last Nm entries
 1.47 21-Mar-2017  wiz branches: 1.47.2;
Add width argument to list.
 1.46 18-Mar-2017  riastradh Bump date.
 1.45 18-Mar-2017  riastradh Remove excessive indentation from function description text.
 1.44 18-Mar-2017  riastradh Move out-of-place note about interrupt context and namei.

Tweak paragraph break.
 1.43 18-Mar-2017  riastradh Use `\(em', not `--'.

Refill sentences and tweak wording where appropriate while here.
 1.42 18-Mar-2017  riastradh Clarify wording: pathname component is not a vnode or lookup result.
 1.41 18-Mar-2017  riastradh Organize namei flags by whose perspective they are relevant to.

- namei callers
- input to VOP_LOOKUP set by caller
- input to VOP_LOOKUP set by namei
- output from VOP_LOOKUP
 1.40 18-Mar-2017  riastradh Rewrite intro to say positively, actively how you use namei.
 1.39 18-Mar-2017  riastradh Rewrite operating modes section.

- Identify contract with caller.
- Identify contract with file system.
- Identify failure modes.
- Write in bulleted lists, not long rambly paragraphs.
 1.38 18-Mar-2017  riastradh Clarify what NOCACHE and MAKEENTRY do and who uses them.

De-editorialize.
 1.37 07-May-2016  wiz branches: 1.37.2; 1.37.4;
Use Er for errors and Dq for double quoted strings. Whitespace nits.
 1.36 06-May-2016  dholland Revise/update. List the functions in a sensible order. Document all
the modes and flags. Document the structure fields properly.
Distinguish internals from public interfaces. Mention historic dead
flags like SAVESTART because they still exist in other projects.
Explain the current layout of vfs_lookup.c, or at least the primary
points of it.

Etc.

This ended up being a much larger rewrite than I intended.

Bump date again.
 1.35 05-May-2016  salazar update struct nameidata documentation
 1.34 21-Apr-2015  wiz Bump date for previous.
 1.33 21-Apr-2015  riastradh Cull long-dead flags from namei(9) man page.
 1.32 21-Jun-2014  dholland Update a comment on a structure description. Noted by wiz a long time
ago.

does not seem to be worth bumping the date for.
 1.31 09-Apr-2013  njoly branches: 1.31.4;
Fix section (3 -> 2) in openat xref.
 1.30 05-Nov-2012  wiz Bump date for previous.
 1.29 05-Nov-2012  dholland Document NDAT(), and while here update some of the now-outdated
material in the namei man page. There's quite a bit more to be done.
 1.28 05-Nov-2012  dholland These two man pages contain complete cut and paste copies of struct
componentname and/or struct nameidata. Update the copies, for both
today's changes and a number of earlier changes too.
 1.27 02-Dec-2010  wiz branches: 1.27.6; 1.27.12;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.26 19-Nov-2010  dholland bump date for previous (thanks jnemeth)
 1.25 19-Nov-2010  dholland Introduce struct pathbuf. This is an abstraction to hold a pathname
and the metadata required to interpret it. Callers of namei must now
create a pathbuf and pass it to NDINIT (instead of a string and a
uio_seg), then destroy the pathbuf after the namei session is
complete.

Update all namei call sites accordingly. Add a pathbuf(9) man page and
update namei(9).

The pathbuf interface also now appears in a couple of related
additional places that were passing string/uio_seg pairs that were
later fed into NDINIT. Update other call sites accordingly.
 1.24 27-Sep-2009  wiz Bump date for today's changes.
 1.23 27-Sep-2009  dholland Move a big wodge of symlink-following code from nfsd to inside
lookup_for_nfsd(). This code is, or at least should be, the same as
the regular symlink-following code plus an extra flag nfsd needs.

The two lots of code can/will be merged in the future.
 1.22 27-Sep-2009  dholland Rename lookup() to lookup_for_nfsd(), to make it clear just whose
private backdoor entry point this is.

Also, clone the lookup_for_nfsd() entry point as
lookup_for_nfsd_index(), for use by a different call site in nfsd that
does different unclean things with nameidata.
 1.21 29-Jun-2009  wiz Use more markup. Punctuation nit.
 1.20 29-Jun-2009  dholland Bump date for previous (thanks uebayasi@)
 1.19 29-Jun-2009  dholland Document namei_simple_kernel and namei_simple_user.
 1.18 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.17 28-Dec-2007  pooka branches: 1.17.4; 1.17.6;
The leprechaun is dead, update interfaces.
 1.16 30-Jun-2007  pooka branches: 1.16.4;
Include struct componentname declaration in struct namei - it's
usually the more interesting of the two anyway.
 1.15 28-Jun-2007  pooka Fix description on what is returned locked and when.

noticed by Rumble
 1.14 23-Dec-2006  wiz Bump date for previous.
 1.13 09-Dec-2006  chs a smorgasbord of improvements to vnode locking and path lookup:
- LOCKPARENT is no longer relevant for lookup(), relookup() or VOP_LOOKUP().
these now always return the parent vnode locked. namei() works as before.
lookup() and various other paths no longer acquire vnode locks in the
wrong order via vrele(). fixes PR 32535.
as a nice side effect, path lookup is also up to 25% faster.
- the above allows us to get rid of PDIRUNLOCK.
- also get rid of WANTPARENT (just use LOCKPARENT and unlock it).
- remove an assumption in layer_node_find() that all file systems implement
a recursive VOP_LOCK() (unionfs doesn't).
- require that all file systems supply vfs_vptofh and vfs_fhtovp routines.
fill in eopnotsupp() for file systems that don't support being exported
and remove the checks for NULL. (layerfs calls these without checking.)
- in union_lookup1(), don't change refcounts in the ISDOTDOT case, just
adjust which vnode is locked. fixes PR 33374.
- apply fixes for ufs_rename() from ufs_vnops.c rev. 1.61 to ext2fs_rename().
 1.12 03-Mar-2006  rumble branches: 1.12.6;
Update namei(9) comments and man page to indicate that we operate on
vnodes, not inodes.
 1.11 29-Jan-2006  rpaulo More ktrace-lwp that I got wrong in the first try.

Thanks to Gregory McGarry for pointing this out.
 1.10 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.9 06-May-2003  jmmv Drop trailing whitespace. Reviewed by wiz.
 1.8 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.7 13-Apr-2003  dbj grammar nit. "set to." changed to "to which"
 1.6 06-Apr-2003  wiz Fix two typos, from Igor Sobrado in PR 19680.
 1.5 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.4 14-Oct-2002  wiz New sentence, new line.
 1.3 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.2 22-Oct-2001  wiz Whitespace, punctuation fixes; sort sections, fix xrefs.
 1.1 22-Oct-2001  gmcgarry Programmer's guide to the VFS interface.
 1.12.6.1 17-Feb-2007  tron Apply patch (requested by chs in ticket #422):
- Fix various deadlock problems with nullfs and unionfs.
- Speed up path lookups by upto 25%.
 1.16.4.1 09-Jan-2008  matt sync with HEAD
 1.17.6.1 18-May-2008  yamt sync with head.
 1.17.4.1 02-Jun-2008  mjf Sync with HEAD.
 1.27.12.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.27.12.2 23-Jun-2013  tls resync from head
 1.27.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.27.6.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.27.6.1 16-Jan-2013  yamt sync with (a bit old) head
 1.31.4.1 10-Aug-2014  tls Rebase.
 1.37.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.37.2.2 26-Apr-2017  pgoyette Sync with HEAD
 1.37.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.47.2.1 11-May-2017  pgoyette Sync with HEAD
 1.50.6.1 10-Jun-2019  christos Sync with HEAD
 1.5 17-Feb-2007  yamt need_resched -> cpu_need_resched.
 1.4 26-Jun-2003  wiz -indent -> -offset indent.
 1.3 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.2 27-Sep-2002  wiz Begin new sentences on new lines; drop trailing whitespace; some mdoc
and typo fixes.
 1.1 22-Sep-2002  gmcgarry Document the details of the scheduler.
 1.10 19-Sep-2013  rmind G/C npf_ncode(9)
 1.9 01-Jul-2012  rmind branches: 1.9.2;
NPF improvements:
- Add NPF_OPCODE_PROTO to match the address and/or protocol only.
- Update parser to support arbitrary "pass proto <name/number>".
- Fix IPv6 address and protocol handling (add a regression test).
- Fix few theorethical races in session handling module.
- Misc fixes, simplifications and some clean up.
 1.8 23-Dec-2011  rmind branches: 1.8.2;
Amend previous.
 1.7 23-Dec-2011  rmind Sync with reality a little.
 1.6 30-Jan-2011  rmind branches: 1.6.4;
Sync man page with reality.
 1.5 02-Dec-2010  wiz branches: 1.5.2;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.4 16-Sep-2010  rmind branches: 1.4.2;
NPF checkpoint:
- Add support for bi-directional NAT and redirection / port forwarding.
- Finish filtering on ICMP type/code and add filtering on TCP flags.
- Add support for TCP reset (RST) or ICMP destination unreachable on block.
- Fix a bunch of bugs; misc cleanup.
 1.3 24-Aug-2010  rmind Move npf.conf(5-8) into the correct section, hence npf.conf(5).
 1.2 22-Aug-2010  wiz Add more articles and more formatting.
 1.1 22-Aug-2010  rmind Import NPF - a packet filter. Some features:

- Designed to be fully MP-safe and highly efficient.

- Tables/IP sets (hash or red-black tree) for high performance lookups.

- Stateful filtering and Network Address Port Translation (NAPT).
Framework for application level gateways (ALGs).

- Packet inspection engine called n-code processor - inspired by BPF -
supporting generic RISC-like and specific CISC-like instructions for
common patterns (e.g. IPv4 address matching). See npf_ncode(9) manual.

- Convenient userland utility npfctl(8) with npf.conf(8).

NOTE: This is not yet a fully capable alternative to PF or IPFilter.
Further work (support for binat/rdr, return-rst/return-icmp, common ALGs,
state saving/restoring, logging, etc) is in progress.

Thanks a lot to Matt Thomas for various useful comments and code review.
Aye by: board@
 1.4.2.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.4.2.1 16-Sep-2010  uebayasi file npf_ncode.9 was added on branch uebayasi-xip on 2010-10-22 07:11:54 +0000
 1.5.2.1 08-Feb-2011  bouyer Sync with HEAD
 1.6.4.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.6.4.2 30-Oct-2012  yamt sync with head
 1.6.4.1 17-Apr-2012  yamt sync with head
 1.8.2.1 05-Jul-2012  riz Pull up following revision(s) (requested by rmind in ticket #399):
sys/net/npf/npf_session.c: revision 1.14
sys/net/npf/npf_tableset.c: revision 1.12
sys/net/npf/npf_state_tcp.c: revision 1.8
usr.sbin/npf/npftest/libnpftest/npf_mbuf_subr.c: revision 1.3
usr.sbin/npf/npfctl/npf_data.c: revision 1.14
sys/net/npf/npf_inet.c: revision 1.13
sys/net/npf/npf_ruleset.c: revision 1.12
sys/net/npf/npf.h: revision 1.18
usr.sbin/npf/npfctl/npf_ncgen.c: revision 1.11
usr.sbin/npf/npfctl/npfctl.8: revision 1.7
usr.sbin/npf/npfctl/npf_parse.y: revision 1.9
usr.sbin/npf/npftest/libnpftest/npf_state_test.c: revision 1.2
usr.sbin/npf/npfctl/npfctl.8: revision 1.8
sys/net/npf/npf_instr.c: revision 1.12
usr.sbin/npf/npftest/libnpftest/npf_table_test.c: revision 1.3
usr.sbin/npf/npfctl/npf.conf.5: revision 1.13
usr.sbin/npf/npfctl/npf.conf.5: revision 1.14
sys/net/npf/npf_state.c: revision 1.9
sys/net/npf/npf_processor.c: revision 1.11
usr.sbin/npf/npfctl/npfctl.c: revision 1.13
usr.sbin/npf/npfctl/npfctl.c: revision 1.14
usr.sbin/npf/npfctl/npf_build.c: revision 1.10
lib/libnpf/npf.3: revision 1.5
lib/libnpf/npf.h: revision 1.8
share/man/man9/npf_ncode.9: revision 1.9
usr.sbin/npf/npfctl/npf_scan.l: revision 1.4
lib/libnpf/npf.c: revision 1.9
usr.sbin/npf/npfctl/npfctl.h: revision 1.16
sys/net/npf/npf_nat.c: revision 1.14
usr.sbin/npf/npftest/libnpftest/npf_processor_test.c: revision 1.2
usr.sbin/npf/npfctl/npf_disassemble.c: revision 1.6
sys/net/npf/npf_impl.h: revision 1.17
sys/net/npf/npf_handler.c: revision 1.18
sys/net/npf/npf_handler.c: revision 1.19
usr.sbin/npf/npftest/libnpftest/npf_test.h: revision 1.4
sys/net/npf/npf_ncode.h: revision 1.9
Fix and update npf.conf(5), npfctl(8) and its usage message.
npf_state_tcp: fix for FIN retransmission and out-of-order ACK case.
NPF improvements:
- Add NPF_OPCODE_PROTO to match the address and/or protocol only.
- Update parser to support arbitrary &quot;pass proto &lt;name/number&gt;&quot;.
- Fix IPv6 address and protocol handling (add a regression test).
- Fix few theorethical races in session handling module.
- Misc fixes, simplifications and some clean up.
npf_packet_handler: fix gcc unused warning.
 1.9.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1 25-Jul-2010  jruoho branches: 1.1.2;
Document the fine nullop() family of dummy functions.
 1.1.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.1.2.1 25-Jul-2010  uebayasi file nullop.9 was added on branch uebayasi-xip on 2010-08-17 06:41:05 +0000
 1.24 08-Sep-2024  rillig fix a/an grammar in obvious cases
 1.23 22-May-2022  riastradh branches: 1.23.4;
opencrypto: Touch up man page a little.
 1.22 22-May-2022  riastradh opencrypto: crypto_dispatch never fails now. Make it return void.

Same with crypto_kdispatch.
 1.21 22-May-2022  riastradh opencrypto: Rip out EAGAIN logic when unregistering crypto drivers.

I'm pretty sure this never worked reliably based on code inspection,
and it's unlikely to have ever been tested because it only applies
when unregistering a driver -- but we have no crypto drivers for
removable devices, so it would only apply if we went out of our way
to trigger detach with drvctl.

Instead, just make the operation fail with ENODEV, and remove all the
callback logic to resubmit the request on EAGAIN. (Maybe this should
be ENXIO, but crypto_kdispatch already does ENODEV.)
 1.20 22-May-2022  riastradh opencrypto: Make crypto_freesession return void.

No callers use the return value. It is not sensible to allow this to
fail.
 1.19 22-May-2022  riastradh opencrypto: Make freesession callback return void.

No functional change intended: all drivers already return zero
unconditionally.
 1.18 22-May-2022  riastradh opencrypto: Assert num>0 in crypto_getreq, num=1 in crypto_kgetreq.

- For crypto_getreq this makes downstream reasoning easier: on
success, crp_desc is guaranteed to be nonnull.

- For crypto_kgetreq, this was already assumed, just silently
ignored and not checked by anything.
 1.17 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.16 26-May-2017  wiz New sentence, new line. Punctuation fixes.
 1.15 26-May-2017  knakahara update opencrypto(9)
 1.14 31-Dec-2013  pgoyette Clear up documentation for crypto_unregister() vs crypto_unregister_all()
since there is no definition of CRYPTO_ALGORITHM_ALL!

XXX The description of the arguments for crypto_register() needs further
updates, too, but that will be left for another day.
 1.13 20-Jul-2013  wiz Use Mt for email addresses.
 1.12 16-Sep-2011  jym branches: 1.12.2; 1.12.8; 1.12.12;
Update list of algorithm identifiers available in opencrypto(9).
 1.11 23-May-2011  drochner -in the descriptor for encryption xforms, split the "blocksize" field
into "blocksize" and "IV size"
-add an "reinit" function pointer which, if set, means that the xform
does its IV handling itself and doesn't want the default CBC handling
by the framework (poor name, but left that way to avoid unecessary
differences)
This syncs with Open/FreeBSD, purpose is to allow non-CBC transforms.
Refer to ivsize instead of blocksize where appropriate.
(At this point, blocksize and ivsize are identical.)
 1.10 22-Jan-2010  wiz Fix typo. Make HTML-ready. Remove trailing whitespace. Add dot in
abbreviation.
 1.9 22-Jan-2010  hubertf Document sysctls
 1.8 08-Dec-2009  mbalmer Fix typographics errors.
 1.7 04-May-2009  wiz Sort SEE ALSO. Drop trailing whitespace.
 1.6 12-Mar-2009  joerg Remove redundant markup. Add missing width for .Bl -tag.
 1.5 14-Jul-2007  ad branches: 1.5.18; 1.5.20; 1.5.24;
- kcont was removed.
- Replace some references to tsleep.
 1.4 07-Mar-2007  dogcow running in emulated wizd mode, convert caddr_t to void *.
 1.3 23-Apr-2004  keihan s/netbsd.org/NetBSD.org/g
 1.2 20-Dec-2003  wiz Use In instead of Fd #include <...>; reword a sentence so
it is easier to read.
 1.1 20-Dec-2003  lha Add opencrypto.9 manpage, manpage copied from OpenBSD (Angelos D. Keromytis)
Some text added me (and thus all errors in the manpage are mine)
 1.5.24.1 21-Apr-2010  matt sync to netbsd-5
 1.5.20.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.5.18.1 14-Feb-2010  bouyer Pull up following revision(s) (requested by hubertf in ticket #1293):
share/man/man9/opencrypto.9: revision 1.9
Document sysctls
 1.12.12.1 23-Jul-2013  riastradh sync with HEAD
 1.12.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.12.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.23.4.1 02-Aug-2025  perseant Sync with HEAD
 1.6 20-Apr-2023  uwe optstr(9): markup fixes

While here, wrap long .Fn lines for readability and make the
optstr_get_item list compact.
 1.5 20-Apr-2023  skrll Update to include value conversion routines.
 1.4 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.3 11-Aug-2007  pooka branches: 1.3.8; 1.3.10;
boolean_t -> bool sweep
 1.2 24-Jun-2007  rumble TRUE -> true, FALSE -> false.
 1.1 03-Feb-2006  jmmv Implement options string parsing of the form 'a=b c=d ...'. This will be
initially used by i386's Multiboot support but will be useful in other
situations too (think refactoring mount(2)'s API).
 1.3.10.1 18-May-2008  yamt sync with head.
 1.3.8.1 02-Jun-2008  mjf Sync with HEAD.
 1.23 04-Oct-2019  gutteridge panic.9: add xrefs to printf(3) and printf(9)

printf(3) fmt strings are referenced in the body, and there might as
well be a cross-reference to other kernel message output functions.
 1.22 15-Jul-2018  maxv Retire ipkdb entirely. The option was removed from the config files
yesterday.

ok kamil christos
 1.21 12-Jun-2012  jdf branches: 1.21.30; 1.21.32;
* decapitalize NAME section's line
* improve wording
* make RETURN VALUES section consistent with other man pages' (e.g. exit(3) and
abort(3)

Patch provided by Bug Hunting.
 1.20 29-Sep-2011  christos branches: 1.20.2;
add vpanic
 1.19 01-Dec-2009  explorer Assign copyright to TNF
 1.18 12-Jan-2009  christos mention panic uses.
 1.17 04-Feb-2006  wiz branches: 1.17.28; 1.17.32;
Bump date for previous.
 1.16 28-Jan-2006  darrenr another documentation update for ddb.onpanic. this time, rewrite it to
refer to options(4) rather than add a new description of what its values
can be.
 1.15 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.14 27-Sep-2002  wiz Add a line saying that a trailing '\n' is not needed. Bump date.
While here: new sentence, new line.
 1.13 06-Aug-2002  wiz Fix .Fn arguments.
 1.12 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.11 04-Dec-2001  wiz Sort SEE ALSO.
 1.10 04-Dec-2001  jdolecek the dump device isn't hardcoded into compiled kernel commonly nowadays
xref swapctl(8)
 1.9 04-Sep-2001  wiz Boring whitespace fixes.
 1.8 26-May-2000  jhawk If db_onpanic is unset and DDB is compiled in, panic() now calls
db_stack_trace_print(__builtin_frame_address(0),...), to printf() the
stack trace to the message bufffer and console. Idea from SunOS/Solaris.
Useful when dumping fails.
 1.7 06-Mar-1999  mycroft Fix formatting errors (bad sentence breaks).
 1.6 03-Sep-1998  msaitoh Eliminate extra comma in SEE ALSO section
 1.5 03-Sep-1998  jeremy Cleaned up some statements.
Added cross references to related pages.
 1.4 06-Feb-1998  perry macroize BSD, NetBSD, FreeBSD and misc cleanup
 1.3 19-Jul-1997  kleink Typo.
 1.2 09-Oct-1996  explorer add copyright and netbsd rcs tag
 1.1 10-Aug-1996  explorer add panic(9) man page
 1.17.32.1 21-Apr-2010  matt sync to netbsd-5
 1.17.28.1 01-Dec-2009  explorer Assign copyright to TNF
 1.20.2.1 30-Oct-2012  yamt sync with head
 1.21.32.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.21.32.1 10-Jun-2019  christos Sync with HEAD
 1.21.30.1 28-Jul-2018  pgoyette Sync with HEAD
 1.1 06-Sep-2025  riastradh paravirt_membar_sync(9): New memory barrier.

For use in paravirtualized drivers which require store-before-load
ordering -- irrespective of whether the kernel is built for a single
processor, or whether the (virtual) machine is booted with a single
processor.

This is even required on architectures that don't even have a
store-before-load ordering barrier, like m68k; adding, e.g., a virtio
bus is _as if_ the architecture has been extended with relaxed memory
ordering when talking with that new bus. Such architectures need
some way to request the hypervisor enforce that ordering -- on m68k,
that's done by issuing a CASL instruction, which qemu maps to an
atomic r/m/w with sequential consistency ordering in the host.

PR kern/59618: occasional virtio block device lock ups/hangs
 1.2 30-Nov-2010  dholland Document pathbuf_assimilate, used by nfsd to move pathnames from mbufs to
pathbufs. It is like pathbuf_create but takes responsibility for the path
buffer passed in. (Because this is asymmetric, it carries an extra risk
of error and therefore shouldn't be used except where it's really needed.)
 1.1 19-Nov-2010  dholland Introduce struct pathbuf. This is an abstraction to hold a pathname
and the metadata required to interpret it. Callers of namei must now
create a pathbuf and pass it to NDINIT (instead of a string and a
uio_seg), then destroy the pathbuf after the namei session is
complete.

Update all namei call sites accordingly. Add a pathbuf(9) man page and
update namei(9).

The pathbuf interface also now appears in a couple of related
additional places that were passing string/uio_seg pairs that were
later fed into NDINIT. Update other call sites accordingly.
 1.4 19-May-2007  christos this experimental interface is not in use anymore.
 1.3 15-Apr-2007  plunky although this is an intentionally undocumented interface (see PR/35278),
fix up the non existent documentation to reflect the reality.
 1.2 13-Apr-2007  plunky Tidy this up:
fix mdoc warnings
add missing .El
add missing Fn

remove extraneous text
add function names to SYNOPSIS
 1.1 16-Jan-2007  elad Add man-page for pathname(9) routines, but don't link to build yet.
 1.49 02-Nov-2018  jmcneill Add support for multiple PCI segments.
 1.48 20-Sep-2018  rin - pci_intr_setattr() is in pci_intr(9)
- pci_intr_type() is in pci_msi(9)
 1.47 12-Sep-2018  mrg - link to pci_mapreg_type() from pci_mapreg_map() for the type argument
- note that 64 bit memory mappings are different to others
- bump date
 1.46 03-Jul-2017  wiz branches: 1.46.4; 1.46.6;
Remove workaround for ancient HTML generation code.
 1.45 12-Jul-2016  wiz Use Nm instead of Xr to itself.
 1.44 12-Jul-2016  knakahara fix missing mans about pci.9 and pci_intr.9

- add links from pci.9 and pci_intr.9 to pci_msi.9
- add pci_intr_establish_xname entries
- add pci_intr_setattr entries
- add pci_intr_type descriptions
- fix pci_*_alloc functions' argument type

pointed out by nonaka@n.o.
 1.43 04-Oct-2015  wiz Bump date.
 1.42 02-Oct-2015  msaitoh PCI Extended Configuration stuff written by nonaka@:
- Add PCI Extended Configuration Space support into x86.
- Check register offset of pci_conf_read() in MD part. It returns (pcireg_t)-1
if it isn't accessible.
- Decode Extended Capability in PCI Extended Configuration Space.
Currently the following extended capabilities are decoded:
- Advanced Error Reporting
- Virtual Channel
- Device Serial Number
- Power Budgeting
- Root Complex Link Declaration
- Root Complex Event Collector Association
- Access Control Services
- Alternative Routing-ID Interpretation
- Address Translation Services
- Single Root IO Virtualization
- Page Request
- TPH Requester
- Latency Tolerance Reporting
- Secondary PCI Express
- Process Address Space ID
- LN Requester
- L1 PM Substates
The following extended capabilities are not decoded yet:
- Root Complex Internal Link Control
- Multi-Function Virtual Channel
- RCRB Header
- Vendor Unique
- Configuration Access Correction
- Multiple Root IO Virtualization
- Multicast
- Resizable BAR
- Dynamic Power Allocation
- Protocol Multiplexing
- Downstream Port Containment
- Precision Time Management
- M-PCIe
- Function Reading Status Queueing
- Readiness Time Reporting
- Designated Vendor-Specific
 1.41 15-Aug-2015  wiz Mark up NULL with Dv.
 1.40 14-Aug-2015  knakahara fix pci_get_ht_capability(9).
 1.39 14-Aug-2015  knakahara Add pci_get_ht_capability(9) man.
 1.38 27-Oct-2014  wiz Unfix parts of previous.
We currently do not split arguments in their components if they
are functions with arguments themselves.
 1.37 27-Oct-2014  christos PR/49326: Henning Petersen: Correct errors in man pages csf.9 , pci.9 and ucom.9
 1.36 30-Jan-2012  drochner document pci_aprint_devinfo(9) (not the _fancy variant yet because
it is still experimental)
 1.35 25-Aug-2011  dyoung branches: 1.35.2;
Describe pci_bus_devorder(9).

TBD: symbolic link pci_bus_devorder.9 -> pci.9.
 1.34 30-May-2011  dyoung MI drivers should #include <sys/bus.h> not <machine/bus.h>.
 1.33 05-Apr-2011  dyoung Update manual page for constification of pci_attach_args.
 1.32 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.31 28-Apr-2010  dyoung branches: 1.31.2;
Document pci_chipset_tag_create(9) and pci_chipset_tag_destroy(9).
 1.30 11-Feb-2010  dyoung Do not reference deprecated API shutdownhook_establish(9), but reference
pmf(9), instead.
 1.29 17-Apr-2009  cegger pci_activate() wants a device and not a softc. This matches the implementation.
 1.28 17-Apr-2009  cegger pci_activate synopsis and function description don't match.
cube@ says, function description is correct. So remove reg argument in
pci_activate synopsis.
 1.27 12-Nov-2008  ad branches: 1.27.2;
Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.26 11-May-2008  he Manually break up the pci_activate() declaration, so that we avoid a
warning from nroff.
 1.25 30-Apr-2008  martin branches: 1.25.2;
Convert TNF licenses to new 2 clause variant
 1.24 18-Jun-2006  wiz branches: 1.24.18; 1.24.20;
Remove superfluous character.
 1.23 18-Jun-2006  wiz Drop trailing whitespace.
 1.22 18-Jun-2006  christos Update for latest powersave api.
 1.21 01-Mar-2006  wiz branches: 1.21.2;
.sp -> .Pp
 1.20 01-Mar-2006  wiz Only use mdoc macros. Improve wording. Bump date for last-but-one.
 1.19 01-Mar-2006  wiz Use more markup. New sentence, new line. Remove trailing whitespace.
 1.18 01-Mar-2006  gdamore Document new pci_find_rom() API.
 1.17 27-Feb-2006  gdamore Note caveats about PCI_MAPREG_TYPE_ROM.
 1.16 28-Jan-2005  wiz Fix dot placement. Bump date for pci_conf_{capture,restore} documentation.
 1.15 27-Jan-2005  jmcneill Document pci_conf_capture(9), pci_conf_restore(9) as well as
struct pci_conf_state.
 1.14 24-Apr-2004  kleink Describe new len argument to pci_devinfo(9).
 1.13 30-Jun-2003  wiz Fixes to make these man page look nice with groff-1.19.
 1.12 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.11 16-Apr-2003  wiz Fix a typo, and improve grammar.
 1.10 25-Mar-2003  thorpej Document pci_vpd_read() and pci_vpd_write().
 1.9 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.8 14-Oct-2002  wiz New sentence, new line.
 1.7 04-Aug-2002  gmcgarry Document pci_set_powerstate()/pci_get_powerstate().
 1.6 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.5 24-Sep-2001  hubertf Fix some typos,
submitted in PR 14053 by Michael K. Sanders <msanders@confusion.net>
 1.4 10-Sep-2001  gmcgarry Document pci_find_device().
 1.3 04-Sep-2001  wiz Punctuation fixes.
 1.2 04-Sep-2001  wiz Boring whitespace fixes.
 1.1 01-Jul-2001  gmcgarry Add some missing documentation.
 1.21.2.1 19-Jun-2006  chap Sync with head.
 1.24.20.1 18-May-2008  yamt sync with head.
 1.24.18.1 02-Jun-2008  mjf Sync with HEAD.
 1.25.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.27.2.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.31.2.2 28-Apr-2010  dyoung Document pci_chipset_tag_create(9) and pci_chipset_tag_destroy(9).
 1.31.2.1 28-Apr-2010  dyoung file pci.9 was added on branch uebayasi-xip on 2010-04-28 21:15:48 +0000
 1.35.2.1 17-Apr-2012  yamt sync with head
 1.46.6.1 10-Jun-2019  christos Sync with HEAD
 1.46.4.2 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.46.4.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.20 27-Aug-2020  fcambus Fix a bunch of typos in various kernel man pages.
 1.19 10-Jul-2020  wiz Remove trailing comma.
 1.18 10-Jul-2020  thorpej Update pci_configure_bus(9) to reflect the new reality -- no more manual
fiddling with extent maps, use pciconf_resource_{init,add,fini}() instead.
 1.17 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.16 14-Jul-2012  rkujawa extent_create does not take storage type argument anymore.
 1.15 22-Mar-2010  joerg branches: 1.15.2; 1.15.8;
Use .In instead of .Aq Pa for header files.
 1.14 24-Feb-2006  wiz Use \*[Am] for better HTML output.
 1.13 22-Feb-2006  garbled the prototype for pci_conf_interrupt() was wrong. correct.
 1.12 05-Mar-2004  wiz Be consistent in spelling "autoconfiguration" without a hyphen.
Noted by John Heasley.
 1.11 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.10 09-Dec-2002  scw The walnut port has been subsumed by the new evbppc port.
 1.9 14-Oct-2002  wiz New sentence, new line.
 1.8 25-Feb-2002  kleink * Sync with implementation: declare the `id' argument to pci_conf_hook()
as pcireg_t, which is more appropriate.
* Fix the argument order to pci_conf_hook (d'oh!).
 1.7 21-Feb-2002  kleink Be a little more specific about cacheline_size.
 1.6 21-Feb-2002  kleink Document firstbus and cacheline_size arguments, too.
 1.5 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.4 11-Feb-2002  kleink Add documentation for pci_conf_hook().
 1.3 26-Dec-2001  wiz Drop some .Pp, sort sections.
 1.2 21-Jun-2001  wiz Fix typos, punctuation and whitespace.
 1.1 10-Feb-2001  briggs Add man page for pci_configure_bus()
 1.15.8.1 30-Oct-2012  yamt sync with head
 1.15.2.2 22-Mar-2010  joerg Use .In instead of .Aq Pa for header files.
 1.15.2.1 22-Mar-2010  joerg file pci_configure_bus.9 was added on branch uebayasi-xip on 2010-03-22 18:58:34 +0000
 1.27 27-Aug-2020  fcambus Fix a bunch of typos in various kernel man pages.
 1.26 20-Sep-2018  rin pci_intr_type() is described in pci_msi(9).
 1.25 17-Sep-2016  jdolecek branches: 1.25.12; 1.25.14;
note that pci_intr_establish_xname() is new in NetBSD 8.0
 1.24 12-Jul-2016  knakahara branches: 1.24.2;
fix missing mans about pci.9 and pci_intr.9

- add links from pci.9 and pci_intr.9 to pci_msi.9
- add pci_intr_establish_xname entries
- add pci_intr_setattr entries
- add pci_intr_type descriptions
- fix pci_*_alloc functions' argument type

pointed out by nonaka@n.o.
 1.23 13-Oct-2015  msaitoh Add note about the return value of pci_intr_setattr(). Found by wizd(8).
 1.22 13-Oct-2015  wiz Add return type for pci_intr_setattr to SYNOPSIS. Add missing comma.

XXX: return values for pci_intr_setattr are not documented.
 1.21 13-Oct-2015  msaitoh Add missing pci_intr_setattr(). The function first appeared in NetBSD 5.0.
 1.20 06-Aug-2015  wiz Use Dv for NULL, remove dot at end of SEE ALSO
 1.19 05-Aug-2015  mrg document pci_intr_evcnt()
 1.18 25-Feb-2015  riastradh Fix type of pc argument in pci_intr(9) man page.
 1.17 30-Mar-2014  christos branches: 1.17.4;
Say how big the buffer should be.
 1.16 30-Mar-2014  christos fix pic_intr_string prototype
 1.15 05-Apr-2011  dyoung branches: 1.15.4; 1.15.6; 1.15.10;
Update manual page for constification of pci_attach_args.
 1.14 22-Mar-2010  joerg branches: 1.14.2;
Use .In instead of .Aq Pa for header files.
 1.13 02-May-2008  martin Move to 2 clause license
 1.12 30-Jun-2003  wiz branches: 1.12.32; 1.12.34;
Pa Aq -> Aq Pa.
 1.11 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.10 14-Oct-2002  wiz New sentence, new line.
 1.9 19-May-2002  wiz mdoc police, and a slight grammar improvement.
 1.8 18-May-2002  sommerfeld Describe swizzled vs. unswizzled interrupt fun
 1.7 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.6 26-Dec-2001  wiz Drop some .Pps.
 1.5 15-Sep-2001  uwe Fix duplicate "is is".
 1.4 21-Jun-2001  wiz Fix typos, punctuation and whitespace.
 1.3 12-Jun-2001  wiz receive, not recieve
 1.2 05-Jun-2001  wiz Remove trailing dot from Nd, and some whitespace fixes.
 1.1 28-Dec-2000  sommerfeld Preliminary pci_intr_* man page.
 1.12.34.1 18-May-2008  yamt sync with head.
 1.12.32.1 02-Jun-2008  mjf Sync with HEAD.
 1.14.2.2 22-Mar-2010  joerg Use .In instead of .Aq Pa for header files.
 1.14.2.1 22-Mar-2010  joerg file pci_intr.9 was added on branch uebayasi-xip on 2010-03-22 18:58:34 +0000
 1.15.10.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.15.6.1 14-Apr-2015  msaitoh Pull up following revision(s) (requested by riastradh in ticket #1272):
share/man/man9/pci_intr.9: revision 1.18 via patch
Fix type of pc argument in pci_intr(9) man page.
 1.15.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.17.4.1 18-Mar-2015  snj Pull up following revision(s) (requested by riastradh in ticket #599):
share/man/man9/pci_intr.9: revision 1.18
Fix type of pc argument in pci_intr(9) man page.
 1.24.2.1 04-Nov-2016  pgoyette Sync with HEAD
 1.25.14.1 10-Jun-2019  christos Sync with HEAD
 1.25.12.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.3 17-Aug-2015  knakahara Add man about kernel APIs to support intrctl(8).
 1.2 27-Apr-2015  wiz Improve wording.
 1.1 27-Apr-2015  knakahara add pci_intr_distribute(9) for x86.
 1.18 12-Jan-2021  knakahara Fix PR kern/55920 . Add pci_msi_count() and pci_msix_count() description.
 1.17 27-Nov-2018  jdolecek branches: 1.17.2;
document pci_intr_alloc() with NULL now also trying MSI-X

note aarch64 support
 1.16 17-Sep-2016  wiz branches: 1.16.12; 1.16.14;
Use Mt for email address.
 1.15 17-Sep-2016  jdolecek include also @n.o email for Kengo Nakahara
 1.14 17-Sep-2016  jdolecek add HISTORY and AUTHORS; listed there Kengo Nakahara as he seems to be the
primary author according to commits, feel free to adjust as appropriate
 1.13 16-Sep-2016  jdolecek bump date for the typo fix
 1.12 15-Sep-2016  jdolecek fix typo in function names
 1.11 29-Aug-2016  knakahara specify when pci_intr_release(9) is called as "pih" is NULL.
 1.10 12-Jul-2016  knakahara branches: 1.10.2;
fix missing mans about pci.9 and pci_intr.9

- add links from pci.9 and pci_intr.9 to pci_msi.9
- add pci_intr_establish_xname entries
- add pci_intr_setattr entries
- add pci_intr_type descriptions
- fix pci_*_alloc functions' argument type

pointed out by nonaka@n.o.
 1.9 11-Jul-2016  wiz Bump date for function prototype change.
 1.8 11-Jul-2016  knakahara pci_intr_type() is required pci_chipset_tag_t argument by other than x86.

pointed out by nonaka@n.o.
 1.7 13-Aug-2015  msaitoh Change pci_msi[x]_count()'s argument.
 1.6 24-Jul-2015  knakahara fix typo. reported by nonaka@n.o
 1.5 21-Jul-2015  wiz Fix Dd argument, whitespace, improve readability.
 1.4 21-Jul-2015  knakahara add pci_intr_alloc() man
 1.3 15-May-2015  knakahara update man.
 1.2 27-Apr-2015  wiz Improve wording and macro usage.
 1.1 27-Apr-2015  knakahara add x86 MD MSI/MSI-X support code.
 1.10.2.1 04-Nov-2016  pgoyette Sync with HEAD
 1.16.14.1 10-Jun-2019  christos Sync with HEAD
 1.16.12.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.17.2.1 15-Jan-2021  martin Pull up following revision(s) (requested by knakahara in ticket #1185):

share/man/man9/pci_msi.9: revision 1.18

Fix PR kern/55920 . Add pci_msi_count() and pci_msix_count() description.
 1.5 09-Mar-2009  joerg Fix preamble to match order set out by mdoc(7). Discussed with wiz.
 1.4 07-Aug-2004  wiz branches: 1.4.36;
Quote a minus for PostScript output and fix a typo.
 1.3 05-Aug-2004  bjh21 Document various things I missed last time. Thanks to Jochen Kunz for
pointing them out.
 1.2 20-Mar-2004  wiz New sentence, new line. Remove superfluous double quote.
Fix a typo.
 1.1 20-Mar-2004  bjh21 Kernel-internal documentation for pckbport.
 1.4.36.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.22 11-Feb-2018  wiz Add missing comma.
 1.21 08-Feb-2018  dholland Typo fixes from Eitan Adler.
 1.20 30-May-2011  dyoung MI drivers should #include <sys/bus.h> not <machine/bus.h>.
 1.19 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.18 15-Apr-2010  jruoho branches: 1.18.2;
Remove references to the deprecated powerhook_establish(9).
 1.17 12-Mar-2009  joerg Replace vertical spaces with paragraphs.
 1.16 30-Apr-2008  martin branches: 1.16.6;
Convert TNF licenses to new 2 clause variant
 1.15 26-Dec-2005  perry branches: 1.15.20; 1.15.22;
u_intN_t -> uintN_t
 1.14 02-Nov-2005  wiz Fix pcmcia_io_map arguments. From Iain Hibbert in PR 31973.
Bump date.
 1.13 30-Jun-2003  wiz Remove superfluous semicolon.
 1.12 01-May-2003  uebayasi Typos, mostly a -> an.

Reviewed by: grant
 1.11 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.10 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.9 14-Oct-2002  wiz New sentence, new line.
 1.8 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.7 21-Jan-2002  wiz Fix typo in macro.
 1.6 26-Dec-2001  wiz Fix SEE ALSO section.
 1.5 15-Dec-2001  soren Reflect pcmcia_mem_map(9) interface change.
 1.4 15-Dec-2001  soren By analogy with cardbus.9, call it 'PCMCIA PC-Card'.
 1.3 04-Sep-2001  wiz Punctuation fixes.
 1.2 04-Sep-2001  wiz Boring whitespace fixes.
 1.1 01-Jul-2001  gmcgarry Add some missing documentation.
 1.15.22.1 18-May-2008  yamt sync with head.
 1.15.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.16.6.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.18.2.2 15-Apr-2010  jruoho Remove references to the deprecated powerhook_establish(9).
 1.18.2.1 15-Apr-2010  jruoho file pcmcia.9 was added on branch uebayasi-xip on 2010-04-15 08:40:47 +0000
 1.9 23-Feb-2023  riastradh pcq(9): Document memory ordering guarantees.
 1.8 08-Feb-2018  dholland branches: 1.8.14;
Typo fixes from Eitan Adler.
 1.7 18-Apr-2015  mlelstv fix reference to queue(3)
 1.6 22-Jan-2012  rmind Replace pcq(9) with the implementation from ad@ and minor changes by me.

PR/40516, PR/45631.
 1.5 02-Dec-2010  wiz branches: 1.5.6;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.4 08-Jan-2010  wiz Remove empty line. Bump date for previous.
 1.3 08-Jan-2010  rmind pcq(9): use more accurate wording, do not expose implementation details.
 1.2 04-Jan-2010  wiz Sort NAME section and removing trailing dot; remove duplicate RCS Id.
 1.1 04-Jan-2010  dyoung Add a manual page for producer/consumer queues, pcq(9), that I derived
from some documentation written by Matt Thomas.
 1.5.6.1 17-Apr-2012  yamt sync with head
 1.8.14.1 30-Jul-2023  martin Pull up following revision(s) (requested by riastradh in ticket #263):

share/man/man9/pcq.9: revision 1.9
sys/kern/subr_pcq.c: revision 1.14
sys/kern/subr_pcq.c: revision 1.15
sys/kern/subr_pcq.c: revision 1.16
sys/kern/subr_pcq.c: revision 1.17
sys/kern/subr_pcq.c: revision 1.18
sys/kern/subr_pcq.c: revision 1.19

pcq(9): Make pcq_put a release operation, in memory ordering.

Otherwise, for example, the following assertion could fail:
/* publisher */
nusers = foo->nusers;
pcq_put(pcq, foo);
KASSERT(nusers == 0);
/* user */
foo = pcq_get(pcq);
if (foo != NULL)
atomic_inc_uint(&foo->nusers);


pcq(9): Fix consume operation in pcq_peek/get.

These use atomic_load_consume to match the atomic_store_release in
pcq_put for pcq->pcq_items[c].

Reading the snapshot of pcq->pcq_pc need not be ordered:
- The consumer side (pcq_peek/get) is serialized by the API contract
(single-consumer, multi-producer), so no ordering is necessary.
- The producer side updates pcq->pcq_pc first; if the consumer side
sees that before the producer side has stored pcq->pcq_items[c],
there's no problem -- it's as if the consumer had happened just a
moment earlier and the producer hadn't entered pcq_put yet.

However, it should be an atomic load, not a plain load. So use
atomic_load_relaxed, if for no other reason than to pacify thread
sanitizers.


pcq(9): Explain why store need not be atomic in pcq_get.
No functional change intended.

pcq(9): Explain why membar_release isn't needed in pcq_get.
No functional change intended.

pcq(9): Document memory ordering guarantees.

pcq(9): Sketch correctness proof for some critical properties.
No functional change intended.

pcq(9): KASSERT(A && B) -> KASSERT(A); KASSERT(B)
 1.12 17-Mar-2017  wiz Bump date for previous.
 1.11 16-Mar-2017  chs allow pcu_save() and pcu_discard() to be called on other threads,
ptrace needs to use it that way.
 1.10 25-May-2014  rmind branches: 1.10.6; 1.10.10;
pcu(9) man page: correct PCU_REENABLE description, add pcu_discard_all(),
improve some wording.
 1.9 16-May-2014  wiz Consistency.
 1.8 16-May-2014  martin Add missing .Bl
 1.7 16-May-2014  rmind pcu(9):
- Remove PCU_KERNEL (hi matt!) and significantly simplify the code.
This experimental feature was tried on ARM did not meet the expectations.
It may be revived one day, but it should be done in a much simpler way.
- Add a message structure for xcall function, pass the LWP ower and thus
optimise a race condition: if LWP is discarding its state on a remote CPU,
but another LWP already did it - do not cause an unecessary re-faulting.
- Reduce the variety of flags for PCU operations (only PCU_VALID and
PCU_REENABLE are used now), pass them only to the pcu_state_load().
- Rename pcu_used_p() to pcu_valid_p(); hopefully it is less confusing.
- pcu_save_all_on_cpu: SPL ought to be used here.
- Update and improve the pcu(9) man page; it needs wizd(8) though.
 1.6 15-May-2014  wiz More markup. Better table width. Bump date for previous.
 1.5 12-May-2014  martin Belatedly adapt to changes in the code.
 1.4 23-Jan-2014  skrll branches: 1.4.2;
Fix eraseo from yesterday
 1.3 22-Jan-2014  skrll Update a little (don't trust myself to update anymore). Fix a macro
problem while I'm here.
 1.2 03-Dec-2012  wiz branches: 1.2.2; 1.2.6;
Bump date to this year for new man page.
 1.1 02-Dec-2012  rmind Add pcu(9) man page.
 1.2.6.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.6.2 25-Feb-2013  tls resync with head
 1.2.6.1 03-Dec-2012  tls file pcu.9 was added on branch tls-maxphys on 2013-02-25 00:28:15 +0000
 1.2.2.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.2.2 16-Jan-2013  yamt sync with (a bit old) head
 1.2.2.1 03-Dec-2012  yamt file pcu.9 was added on branch yamt-pagecache on 2013-01-16 05:32:37 +0000
 1.4.2.1 10-Aug-2014  tls Rebase.
 1.10.10.1 21-Apr-2017  bouyer Sync with HEAD
 1.10.6.1 20-Mar-2017  pgoyette Sync with HEAD
 1.16 02-Aug-2023  riastradh percpu(9): percpu_create ctor may be called later, not synchronously.
 1.15 07-Feb-2020  wiz Remove duplicate word.
 1.14 07-Feb-2020  thorpej Document percpu_foreach_xcall().
 1.13 01-Feb-2020  riastradh New function percpu_create.

Associates a constructor and destructor with the percpu. Currently
the constructor runs immediately, but in principle we could use the
same API for future CPU hotplug support.

This lets you sleep for allocation or draining users before
deallocation when setting up or tearing down a percpu -- currently we
have many abuses of percpu_foreach in tree for that purpose.

Proposed on tech-kern:
https://mail-index.NetBSD.org/tech-kern/2020/01/30/msg026036.html
 1.12 31-May-2017  chs branches: 1.12.10;
vmem_alloc() with VM_SLEEP cannot fail, so percpu_alloc() cannot fail either.
 1.11 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.10 20-Jul-2013  wiz Use Mt for email addresses.
 1.9 02-Dec-2010  wiz branches: 1.9.6; 1.9.12; 1.9.16;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.8 23-Jan-2010  wiz Remove trailing whitespace, fix xref to xcall.
 1.7 23-Jan-2010  rmind Cross-link a little.
 1.6 23-Jan-2010  rmind Remove xc_init_cpu(), percpu_init(), percpu_init_cpu() - they are part
of implementation, not public API. OK dyoung@.
 1.5 22-Jan-2010  dyoung Cross-reference xc(9) instead of queue(9).
 1.4 22-Jan-2010  dyoung Add missing .El.
 1.3 22-Jan-2010  dyoung Move a start of sentence to the first column.
 1.2 22-Jan-2010  dyoung Mention all of the API routines in the NAME section, and capitalize
'percpu'. Also in the NAME section, call it a "Per-CPU storage
allocator."
 1.1 22-Jan-2010  dyoung Add a manual page for per-CPU storage. Somebody should read this to
make sure I've described it correctly and intelligibly.

TBD: hook this up in the Makefile and in the set lists.
 1.9.16.1 23-Jul-2013  riastradh sync with HEAD
 1.9.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.9.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.12.10.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.40 15-Jan-2022  wiz whitespace fix
 1.39 15-Jan-2022  christos PR/56629: Andreas Gustafsson: Update documentation about the filter head
maintainance functions.
 1.38 17-Jan-2018  uwe Use more semantic markup.
 1.37 17-Jan-2018  pgoyette Avoid applying .Dv to the left parenthesis, since it is not applied to
the closing right parenthesis.
 1.36 17-Jan-2018  maya document pfil_{add,remove}_ihook, pfil_run_{addr,if}hooks

from ryo shimizu in PR bin/51941

changes by myself: fix mdoc -Tlint, add missing set lists, adjust date
to today, reword history addition.
 1.35 01-Jun-2016  wiz Use .An -nosplit.
 1.34 01-Jun-2016  pgoyette Use .An for authors. From PR misc/49516
 1.33 22-Aug-2013  wiz Remove PFIL_HOOKS references, code was unifdefed.
From David H. Gutteridge in PR 48146.

Bump date.
 1.32 22-Mar-2010  joerg branches: 1.32.2; 1.32.8; 1.32.14;
Use .In instead of .Aq Pa for header files.
 1.31 29-May-2008  mrg remove clause #3 from my license where there are no other
copyright holders involved.
 1.30 08-Jan-2006  riz branches: 1.30.20; 1.30.22; 1.30.24;
pfil_add_hook() and pfil_remove_hook() return int, not void.
From Liam J. Foy.
 1.29 26-Sep-2005  rpaulo Sync prototypes with reality.
 1.28 27-Jul-2004  wiz branches: 1.28.2;
New sentence, new line; use Aq Pa for header file inclusion;
no parentheses at eol.
 1.27 27-Jul-2004  wiz Do not put parentheses on their own line; bump date for previous.
 1.26 27-Jul-2004  yamt PFIL_NEWIF -> PFIL_IFNET.
 1.25 25-Jul-2004  yamt document recent changes.
provided by Peter Postma. PR/26068
mdoc tweaks by me.
 1.24 01-Jan-2004  wiz branches: 1.24.4;
Bump date for new history section.
 1.23 01-Jan-2004  mrg add a history section.
 1.22 01-Jul-2003  wiz Remove .Nx before 1.5K.
 1.21 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.20 22-Nov-2002  wiz Use correct macro.
 1.19 14-Oct-2002  wiz New sentence, new line.
 1.18 16-Jul-2002  lha add missing pfil_head_get in manpage
add missing MLINKS
add new files to sets lists

fixes my own pr kern/15060
 1.17 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.16 26-Dec-2001  wiz Sort sections.
 1.15 04-Sep-2001  wiz Boring whitespace fixes.
 1.14 11-Nov-2000  thorpej Update for the new pfil framework.
 1.13 20-Feb-2000  darrenr update to match recent changes
 1.12 18-Jun-1999  mrg fix includes: out goes netinet/ip.h, in comings sys/mbuf, net/if.h and net/pfil.h.
partly from mike@pelley.com in PR#7803.
 1.11 16-Mar-1999  garbled More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.10 10-Nov-1998  msaitoh Add missing period.
 1.9 03-Sep-1998  msaitoh Eliminate extra comma in SEE ALSO section
 1.8 19-Mar-1998  mrg convert pfil(9) in and out lists from <sys/queue.h> LISTs to TAILQs, and
change pfil_add_hook to put output filters at the tail of the queue,
while continuing to place input filters at the head of the queue. update
the two users of these functions, and document these changes.

fixes PR#4593.
 1.7 11-Nov-1997  mrg add missing .Nm sections
 1.6 10-Oct-1997  mrg branches: 1.6.2;
remove advertising clause from all my licenses.
 1.5 08-Oct-1997  jtc Fix tipo inherited from old version of TNF copyright form.
s/REGENTS/FOUNDATION/.
 1.4 13-Apr-1997  mrg update this a bit.
 1.3 02-Dec-1996  tls option is PFIL_HOOKS, not PACKET_FILTER
 1.2 18-Nov-1996  mrg update copyright.
 1.1 06-Sep-1996  mrg add pfil manual page.
 1.6.2.1 11-Nov-1997  mrg pull up from trunk: add missing .Nm sections
 1.24.4.1 09-Jan-2006  tron Pull up following revision(s) (requested by riz in ticket #10217):
share/man/man9/pfil.9: revision 1.30 via patch
pfil_add_hook() and pfil_remove_hook() return int, not void.
From Liam J. Foy.
 1.28.2.1 09-Jan-2006  tron Pull up following revision(s) (requested by riz in ticket #1110):
share/man/man9/pfil.9: revision 1.30 via patch
pfil_add_hook() and pfil_remove_hook() return int, not void.
From Liam J. Foy.
 1.30.24.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.30.22.1 04-Jun-2008  yamt sync with head
 1.30.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.32.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.32.8.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.32.2.2 22-Mar-2010  joerg Use .In instead of .Aq Pa for header files.
 1.32.2.1 22-Mar-2010  joerg file pfil.9 was added on branch uebayasi-xip on 2010-03-22 18:58:34 +0000
 1.3 01-Jul-2010  jruoho Remove the now obsolete pfind(9).
 1.2 26-Mar-2010  wiz branches: 1.2.2;
Uppercase Dt argument. Fix a typo. Improve wording in one sentence.
 1.1 25-Mar-2010  jruoho Document p_find(), pfind(), pg_find(), and pgfind().

XXX: Needs a quick proofread.
 1.2.2.3 17-Aug-2010  uebayasi Sync with HEAD.
 1.2.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.2.2.1 26-Mar-2010  uebayasi file pfind.9 was added on branch uebayasi-xip on 2010-08-17 06:40:05 +0000
 1.12 12-Sep-2019  sevan Update parameter list, struct buf is typedefed to buf_t
 1.11 13-Apr-2010  jruoho branches: 1.11.2; 1.11.48;
Minor markup nits.
 1.10 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.9 21-Jun-2001  wiz branches: 1.9.36; 1.9.38;
xref uvm_vs{,un}lock instead of vs{,un}lock
 1.8 21-Jun-2001  wiz Remove unnecessary .Pp, and a punctuation fix.
 1.7 19-Jun-2001  wiz `accessible' only has one `a'.
 1.6 21-Mar-2000  oster 'rouinte'->'routine'
 1.5 16-Mar-1999  garbled More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.4 06-Mar-1999  mycroft Fix formatting errors (bad sentence breaks).
 1.3 08-Oct-1997  jtc Fix tipo inherited from old version of TNF copyright form.
s/REGENTS/FOUNDATION/.
 1.2 11-Nov-1996  lukem fix the the typos
 1.1 15-Jun-1996  pk Add descriptions of physio(), vslock(), vsunlock().
 1.9.38.1 18-May-2008  yamt sync with head.
 1.9.36.1 02-Jun-2008  mjf Sync with HEAD.
 1.11.48.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.11.2.2 13-Apr-2010  jruoho Minor markup nits.
 1.11.2.1 13-Apr-2010  jruoho file physio.9 was added on branch uebayasi-xip on 2010-04-13 10:06:44 +0000
 1.3 05-Sep-2022  wiz Fix logic error in pktq_set_maxlen() description.

Ok thorpej@
 1.2 05-Sep-2022  wiz pkgqueue(9): fix some nits, remove trailing whitespace
 1.1 04-Sep-2022  thorpej Document the pktqueue interface.
 1.48 16-Aug-2020  thorpej Be explcit that all calls to pmap_activate() and pmap_deactivate()
from MI code are made with preemption disabled and with l == curlwp.
 1.47 14-Mar-2020  ad pmap_remove_all(): Return a boolean value to indicate the behaviour. If
true, all mappings have been removed, the pmap is totally cleared out, and
UVM can then avoid doing the work to call pmap_remove() for each map entry.
If false, either nothing has been done, or some helpful arch-specific voodoo
has taken place.
 1.46 14-Jan-2019  wiz Remove Pp before It, where it has no effect.
 1.45 13-Jan-2019  mrg add a note about pmap_activate() and pmap_deactivate() not being allow to block.
 1.44 16-Feb-2012  yamt branches: 1.44.30; 1.44.32;
fix a description of PMAP_PREFER argument.
 1.43 06-Jul-2010  cegger branches: 1.43.6;
Turn PMAP_NOCACHE into MI flag.
Add MI flags PMAP_WRITE_COMBINE, PMAP_WRITE_BACK, PMAP_NOCACHE_OVR.
Update pmap(9) manpage.

hppa: Remove MD PMAP_NOCACHE flag as it exists as MI flag
mips: Rename MD PMAP_NOCACHE to PGC_NOCACHE.

x86: Implement new MI flags using Page-Attribute Tables.
x86: Implement BUS_SPACE_MAP_PREFETCHABLE.

Patch presented on tech-kern@:
http://mail-index.netbsd.org/tech-kern/2010/06/30/msg008458.html

No comments on this last version.
 1.42 22-Mar-2010  joerg branches: 1.42.2;
Use .In instead of .Aq Pa for header files.
 1.41 07-Nov-2009  wiz Remove leading zero from Dd. New sentence, new line.
 1.40 07-Nov-2009  cegger Update pmap(9) manpage:
- Document new flags argument for pmap_kenter_pa
- Document new flags argument for pmap_enter as well
- Document the prot argument for pmap_kenter_pa. This is copy&pasted from
pmap_enter.
Patch showed on tech-kern@ http://mail-index.netbsd.org/tech-kern/2009/11/04/msg006436.html
Thanks to Martin Husemann for his comments to the original patch version.
 1.39 21-Oct-2009  rmind pmap(9): G/C pmap_collect, bump date.
 1.38 03-Aug-2009  pooka play the "make signature match implementation-after-churn" game
 1.37 09-Dec-2008  pooka pmap_kernel() is syntactic sugar for kernel_pmap_ptr now.
 1.36 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.35 25-Dec-2007  jmcneill branches: 1.35.4; 1.35.6;
pmap_phys_address: the prototype for this asks for a paddr_t, not an int.
 1.34 08-Aug-2007  pooka branches: 1.34.2;
boolean_t -> bool
 1.33 24-Jun-2007  rumble TRUE -> true, FALSE -> false.
 1.32 18-Dec-2006  simonb Explicitly mention that pmap_extract() should deal with KSEG-style
kernel addresses.
 1.31 24-Sep-2006  tsutsui Sync PMAP_PREFER(9) usage with -current implemetation.
 1.30 09-Sep-2005  wiz Uppercase CPU. Remove a superfluous double quote. Use Dv for defined
values.
 1.29 11-Aug-2005  yamt document pmap_procwr.
 1.28 11-Jan-2005  wiz Grammar improvements.
 1.27 09-Jan-2005  yamt document PMAP_PREFER. bump date.
 1.26 23-Apr-2004  simonb s/the the/the/ (only in sources that aren't regularly imported from
elsewhere).
 1.25 20-Jan-2004  pooka pmap_{de,}activate() take struct lwp * now

+ bump date!
 1.24 10-May-2003  thorpej Back out the following chagne:
http://mail-index.netbsd.org/source-changes/2003/05/08/0068.html

There were some side-effects that I didn't anticipate, and fixing them
is proving to be more difficult than I thought, do just eject for now.
Maybe one day we can look at this again.

Fixes PR kern/21517.
 1.23 08-May-2003  thorpej Simplify the way the bounds of the managed kernel virtual address
space is advertised to UVM by making virtual_avail and virtual_end
first-class exported variables by UVM. Machine-dependent code is
responsible for initializing them before main() is called. Anything
that steals KVA must adjust these variables accordingly.

This reduces the number of instances of this info from 3 to 1, and
Simplify the way the bounds of the managed kernel virtual address
space is advertised to UVM by making virtual_avail and virtual_end
first-class exported variables by UVM. Machine-dependent code is
responsible for initializing them before main() is called. Anything
that steals KVA must adjust these variables accordingly.

This reduces the number of instances of this info from 3 to 1, and
simplifies the pmap(9) interface by removing the pmap_virtual_space()
function call, and removing two arguments from pmap_steal_memory().

Simplify the way the bounds of the managed kernel virtual address
space is advertised to UVM by making virtual_avail and virtual_end
first-class exported variables by UVM. Machine-dependent code is
responsible for initializing them before main() is called. Anything
that steals KVA must adjust these variables accordingly.

This reduces the number of instances of this info from 3 to 1, and
simplifies the pmap(9) interface by removing the pmap_virtual_space()
function call, and removing two arguments from pmap_steal_memory().

This also eliminates some kludges such as having to burn kernel_map
entries on space used by the kernel and stolen KVA.

This also eliminates use of VM_{MIN,MAX}_KERNEL_ADDRESS from MI code,
this giving MD code greater flexibility over the bounds of the managed
kernel virtual address space if a given port's specific platforms can
vary in this regard (this is especially true of the evb* ports).
 1.22 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.21 07-Apr-2003  wiz More e.g. cleanup. Igor Sobrado, PR 19692.
 1.20 14-Feb-2003  grant The correct capitalisation of 'NetBSD.org' is (you
guessed it) 'NetBSD.org'.

some mdoc fixes.
 1.19 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.18 27-Sep-2002  wiz Bump date for pmap_remove addition.
Begin new sentences on new lines.
Use .Aq as much as possible instead of \*[Lt]foo\*[Gt].
 1.17 22-Sep-2002  chs document new stuff:
UVM_KMF_CANFAIL, uvm_uarea_alloc(), uvm_uarea_free(), pmap_remove_all().
 1.16 14-Aug-2002  wiz Mdoc nits unrelated to last commit, and bump date for last commit.
 1.15 14-Aug-2002  thorpej * Document the existing requirement that machine-independent code
not pmap_kenter_pa() a mapping at a virtual address for which a
valid mapping already exists.
* Document the new requirement that machine-independent code not
not pmap_kenter_pa() a mapping with VM_PROT_EXEC.
 1.14 01-Apr-2002  chs branches: 1.14.2;
correct and clarify the previous revision.
 1.13 28-Mar-2002  eeh Explicitly document previously undocumented (and changed) semantics
of pmap_clear_reference and pmap_clear_modify.
 1.12 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.11 07-Feb-2002  ross Edit -mdoc usage.

* There is no -indent option to .Bd or .Bl, although you would
never know that from its frequent use in this tree. There is a
"-offset indent" combination that makes sense, and you can certainly
say "-width indent".

* Also, you can't markup the -width option argument, tho you CAN
use a callable macro. So "-width Ar filename" doesn't make sense,
but either "-width Ar" or "-width filename" does, as might something
like "-width xxfilename" for a little extra space.

* There are a lot of needlessly complex hanging tag macros in man4 used
to create simple item lists. Those should be simplified one of these
days before someone copies and edits yet another man4 page.
 1.10 26-Dec-2001  wiz Sort sections.
 1.9 10-Sep-2001  wiz Use standard section headers.
 1.8 10-Sep-2001  chris Update man page with pmap_update change.
 1.7 04-Sep-2001  wiz Boring whitespace fixes.
 1.6 11-Aug-2001  matt In the summary, fix pmap_steal_memory return type from void to vaddr_t.
 1.5 28-Jul-2001  chs vm_page_t -> struct vm_page *.
 1.4 25-Apr-2001  kleink Tyop poleece.
 1.3 25-Apr-2001  bjh21 Fix typo: maching -> machine
 1.2 24-Apr-2001  gmcgarry Minor punctuation corrections.
 1.1 24-Apr-2001  thorpej Add a manual page that describes the pmap(9) API and the requirements
of a pmap module.

Many thanks to Bill Sommerfeld for reviewing the document for me.
 1.14.2.2 18-Nov-2002  he Pull up revision 1.16 (requested by thorpej in ticket #677):
Mdoc nits in last, and bump date for last commit.
 1.14.2.1 18-Nov-2002  he Pull up revision 1.15 (requested by thorpej in ticket #676):
o Document the existing requirement that machine-independent
code not pmap_kenter_pa() a mappint at a virtual address
for which a valid mapping already exists.
o Document the new requirement that machine-idependent code
not pmap_kenter_pa() a mapping with VM_PROT_EXEC.
 1.34.2.1 09-Jan-2008  matt sync with HEAD
 1.35.6.1 18-May-2008  yamt sync with head.
 1.35.4.1 02-Jun-2008  mjf Sync with HEAD.
 1.42.2.4 15-Nov-2010  uebayasi Revert xmd(4).
 1.42.2.3 30-Oct-2010  uebayasi Implement pmap_physload_device(9) to replace xmd(4) MD backend.
Implement pmap_mmap(9) and use it from mem(4) and xmd(4).
 1.42.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.42.2.1 22-Mar-2010  uebayasi file pmap.9 was added on branch uebayasi-xip on 2010-08-17 06:40:05 +0000
 1.43.6.1 17-Apr-2012  yamt sync with head
 1.44.32.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.44.32.1 10-Jun-2019  christos Sync with HEAD
 1.44.30.1 18-Jan-2019  pgoyette Synch with HEAD
 1.3 19-Oct-2009  bouyer Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
 1.2 14-Oct-2003  wiz Use still more macros.
 1.1 13-Oct-2003  bouyer Add a man page for pmatch().
 1.15 12-Jul-2018  maxv Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

* Removes "options PERFCTRS", the associated includes, and the associated
ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
good.

* Removes the PMC code of ARM XSCALE.

* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
definitions are put in sysarch.h.

* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
netbsd32 and rump.

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.14 01-Jun-2016  wiz branches: 1.14.14; 1.14.16;
Use .An -nosplit.
 1.13 01-Jun-2016  pgoyette Use .An for authors. From PR misc/49516
 1.12 22-Feb-2012  njoly Adjust cpu_switch(9) -> cpu_switchto(9) in xrefs.
 1.11 14-May-2010  jruoho branches: 1.11.6;
Use standard section headers.
 1.10 22-Mar-2010  joerg branches: 1.10.2;
Use .In instead of .Aq Pa for header files.
 1.9 12-Mar-2009  joerg .Bl already provides the vertical space between items, so don't add
additional space manually.
 1.8 29-Jan-2006  rpaulo branches: 1.8.30;
Update copyright date.
 1.7 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.6 31-Oct-2005  wiz Reword a sentence slightly, and add more markup.
 1.5 31-Oct-2005  uwe Minus sign is \-
Mark up function argument in the text.
 1.4 30-Jun-2003  wiz Pa Aq -> Aq Pa.
 1.3 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.2 14-Oct-2002  wiz New sentence, new line.
 1.1 07-Aug-2002  briggs Document new performance monitoring interface.
 1.8.30.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.10.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.10.2.1 22-Mar-2010  uebayasi file pmc.9 was added on branch uebayasi-xip on 2010-08-17 06:40:05 +0000
 1.11.6.1 17-Apr-2012  yamt sync with head
 1.14.16.1 10-Jun-2019  christos Sync with HEAD
 1.14.14.1 28-Jul-2018  pgoyette Sync with HEAD
 1.23 09-Mar-2024  riastradh pmf(9): Document the bug in pmf_device_register return type.

PR kern/57575
 1.22 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.21 20-Jul-2013  wiz Use Mt for email addresses.
 1.20 02-Apr-2012  plunky branches: 1.20.2; 1.20.4;
language improvement
 1.19 02-Dec-2010  wiz branches: 1.19.6;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.18 25-Feb-2010  wiz branches: 1.18.2;
Bump date.
 1.17 24-Feb-2010  dyoung A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.
 1.16 26-Jan-2010  jruoho Revert previous.
 1.15 26-Jan-2010  jruoho Give it a single name; it is sufficient to list the functions in the SYNOPSIS.
 1.14 20-Jan-2010  wiz Bump date for previous.
 1.13 20-Jan-2010  dyoung Update PMF documentation: rename pmf_device_resume_subtree to
pmf_device_subtree_resume. Briefly describe pmf_qual_t and add it to
the PMF function signatures.

There's still a lot left to document.
 1.12 21-Oct-2009  snj Drop 3rd and 4th clauses. OK jmcneill (copyright holder).
 1.11 14-May-2009  dyoung Improve pmf_device_register(9) and pmf_device_register1(9) descriptions.
 1.10 14-May-2009  jnemeth mention PMFE_AUDIO_VOLUME_UP
 1.9 10-May-2009  wiz New sentence, new line. Use Xr for cross-reference.
 1.8 10-May-2009  tsutsui - add pmf_device_register1() to NAME section
- add a return type of pmf_device_register1()
 1.7 29-Mar-2008  jmcneill branches: 1.7.10;
Fix paths in CODE REFERENCES section.
 1.6 03-Mar-2008  drochner update for pmf_device_register1() and the "boothowto" argument to
shutdown handlers
 1.5 03-Feb-2008  uwe branches: 1.5.2;
Mark up PMFE_* list properly.
 1.4 03-Feb-2008  uwe pmf_device_register() returns false on error.
 1.3 13-Dec-2007  xtraeme branches: 1.3.2;
Fix pmf_device_register() prototype, this returns bool and not void.
 1.2 10-Dec-2007  jmcneill Remove trailing comma in SEE ALSO section, bump date.
 1.1 09-Dec-2007  jmcneill Add power management framework man page.
 1.3.2.3 23-Mar-2008  matt sync with HEAD
 1.3.2.2 09-Jan-2008  matt sync with HEAD
 1.3.2.1 13-Dec-2007  matt file pmf.9 was added on branch matt-armv6 on 2008-01-09 01:39:21 +0000
 1.5.2.1 24-Mar-2008  keiichi sync with head.
 1.7.10.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.18.2.2 25-Feb-2010  wiz Bump date.
 1.18.2.1 25-Feb-2010  wiz file pmf.9 was added on branch uebayasi-xip on 2010-02-25 12:56:38 +0000
 1.19.6.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.19.6.1 17-Apr-2012  yamt sync with head
 1.20.4.1 23-Jul-2013  riastradh sync with HEAD
 1.20.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.50 22-Dec-2021  thorpej Document PR_PSERIALIZE. Remove documentation for pool_cache_setpredestruct().
 1.49 13-Apr-2020  wiz Remove superfluous whitespace & macros.
 1.48 13-Apr-2020  chs slightly change and fix the semantics of pool_set*wat(), pool_sethardlimit()
and pool_prime() (and their pool_cache_* counterparts):

- the pool_set*wat() APIs are supposed to specify thresholds for the count of
free items in the pool before pool pages are automatically allocated or freed
during pool_get() / pool_put(), whereas pool_sethardlimit() and pool_prime()
are supposed to specify minimum and maximum numbers of total items
in the pool (both free and allocated). these were somewhat conflated
in the existing code, so separate them as they were intended.

- change pool_prime() to take an absolute number of items to preallocate
rather than an increment over whatever was done before, and wait for
any memory allocations to succeed. since pool_prime() can no longer fail
after this, change its return value to void and adjust all callers.

- pool_setlowat() is documented as not immediately attempting to allocate
any memory, but it was changed some time ago to immediately try to allocate
up to the lowat level, so just fix the manpage to describe the current
behaviour.

- add a pool_cache_prime() to complete the API set.
 1.47 10-Feb-2019  christos document PR_ZERO
 1.46 24-Dec-2016  abhinav branches: 1.46.14;
Add a missing .El, which is causing the rest of the text being
rendered indented. Patch provided by fox on IRC.

While there, remove a .Pp before .Bl.
 1.45 15-Aug-2015  maxv branches: 1.45.2;
Remove POOL_INIT() (does not exist).
 1.44 14-Nov-2011  jym Document pool_sethardlimit.
 1.43 30-Apr-2008  martin branches: 1.43.22;
Convert TNF licenses to new 2 clause variant
 1.42 25-Jul-2007  pooka branches: 1.42.10; 1.42.12; 1.42.14;
pool_init: wchan is const
 1.41 15-Mar-2007  ad Document the ipl argument to pool_init.
 1.40 16-Feb-2007  rmind - Add link to memoryallocators(9) in kmem_*(9), vmem(9), uvm(9), malloc(9),
pool(9) and pool_cache(9) manuals.
- Sort uvm(9) "SEE ALSO" section.
 1.39 03-Oct-2005  wiz Use full month names in Dd.
 1.38 02-Oct-2005  bouyer Xref pool_cache(9) and bump date.
 1.37 02-Jun-2005  wiz Update pool_prime description to match change in v1.55 of kern/subr_pool.c
(from 2001).
Noted by go@, no comment to diff for over a month from thorpej@.
 1.36 02-Feb-2005  wiz branches: 1.36.2;
Remove a superfluous .El. Noted by Nicolas Joly in PR 29186.
 1.35 01-Jan-2005  yamt document PR_NOTOUCH and bump date.
 1.34 25-Apr-2004  simonb Document the POOL_INIT macro.
 1.33 24-Mar-2004  pooka attempt to clarify bit about flags usage:
* remove mention to PR_URGENT, since it was removed from the code
two years ago
* mention PR_NOWAIT
 1.32 08-Mar-2004  wiz Bump date for previous.
 1.31 08-Mar-2004  dbj note that pool_init and pool_destroy should never be called
in interrupt context.
if this is not a desired restriction, then those functions
should be reviewed for safety, at least protecting pool_head_slock
with splvm()
 1.30 21-Dec-2003  simonb Dump date for previous.
 1.29 21-Dec-2003  simonb Note that the fifth argument to pool_init() is "flags" and not "nitems".
 1.28 01-May-2003  uebayasi Typos, mostly a -> an.

Reviewed by: grant
 1.27 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.26 12-Nov-2002  minoura Typo.
- missing argument
- s/of of/of/
 1.25 14-Oct-2002  wiz New sentence, new line.
 1.24 20-Aug-2002  wiz Drop .Pp before .Ss.
 1.23 11-Aug-2002  soren Sync with reality.
 1.22 11-Aug-2002  soren POOL_STORAGE_SIZE no longer exists.
 1.21 13-Feb-2002  ross branches: 1.21.2;
Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.20 26-Dec-2001  wiz Fix SEE ALSO section.
 1.19 19-Jul-2001  gmcgarry Bring up to date. pool_create() doesn't exist any longer. Include
missing description of pool_destroy(). Fix some minor nits.

It isn't clear from the source whether pool_reclaim() and pool_drain()
should belong to the exported API. At least it seems they aren't used.
No descriptions for these functions exist in this manpage.
 1.18 21-Jun-2001  wiz Fix typos, punctuation and whitespace.
 1.17 06-Apr-2001  wiz Double typo.
 1.16 04-Apr-2001  wiz Xref uvm(9), not UVM(9).
XXX: perhaps we should have a link to UVM(9), too?
 1.15 31-May-2000  pk branches: 1.15.2;
Document pool_init(9) and generally Sync with Reality.
 1.14 05-Aug-1999  sommerfeld branches: 1.14.6;
Create new pool flag PR_LIMITFAIL, indicating that even PR_WAIT
allocations should fail if the pool is at its hard limit.
Document flag in pool(9).
Use it in mbuf.h for the first allocate call for M_GET, M_GETHDR, and
MCLGET, so that m_reclaim gets called even for blocking allocations.
 1.13 03-Apr-1999  msaitoh add MLINKS for pool(9).
fix some bugs.
 1.12 16-Mar-1999  garbled branches: 1.12.2;
More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.11 03-Sep-1998  msaitoh Eliminate extra comma in SEE ALSO section
 1.10 03-Sep-1998  jeremy Corrected my incorrect usage of hyphens, en-dashes, and em-dashes.
 1.9 03-Sep-1998  jeremy Added subsections for easier reading and some explanatory paragraphs.
Used special groff characters where applicable.
 1.8 02-Sep-1998  jeremy Changed references to filesystem paths to use the mdoc filesystem path
macro (.Pa).
 1.7 17-Aug-1998  pk Fix date.
 1.6 29-Jul-1998  pk The new memory resource pool scheme.
 1.5 22-Apr-1998  ross Add David Brownlee's new intro pages, with editing. (PR #534[23])
Also, while here, expand apparently incorrectly .Dd month abbreviations.
(I thought about doing this in tmac/doc-common...heh...that would have
allowed a possible reverse map back to abbreviations.)
 1.4 20-Feb-1998  pk Describe the client-provided storage option.
 1.3 06-Feb-1998  perry macroize BSD, NetBSD, FreeBSD and misc cleanup
 1.2 10-Jan-1998  lukem use Nx 1.4 not Nx 1.3a
 1.1 13-Dec-1997  pk Pool resource utility docs.
 1.12.2.1 15-Apr-1999  msaitoh pullup 1.12-1.13 (fix entries for pool_prime, pool_sethiwat and pool_setlowat)
 1.14.6.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.15.2.1 26-Apr-2001  he Pull up revision 1.16 (requested by wiz):
Correct uvm(9) reference.
 1.21.2.1 24-Dec-2003  jmc Pullup rev 1.29 (requested by simon in ticket #1581)

Note that the fifth argument to pool_init() is "flags" and not "nitems".
 1.36.2.2 05-Oct-2005  tron Pull up following revision(s) (requested by bouyer in ticket #856):
share/man/man9/pool.9: revision 1.38
Xref pool_cache(9) and bump date.
 1.36.2.1 05-Oct-2005  tron Pull up following revision(s) (requested by bouyer in ticket #855):
share/man/man9/pool.9: revision 1.37
Update pool_prime description to match change in v1.55 of kern/subr_pool.c
(from 2001).
Noted by go@, no comment to diff for over a month from thorpej@.
 1.42.14.2 25-Jul-2007  pooka pool_init: wchan is const
 1.42.14.1 25-Jul-2007  pooka file pool.9 was added on branch matt-mips64 on 2007-07-25 09:14:19 +0000
 1.42.12.1 18-May-2008  yamt sync with head.
 1.42.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.43.22.1 17-Apr-2012  yamt sync with head
 1.45.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.46.14.2 21-Apr-2020  martin Sync with HEAD
 1.46.14.1 10-Jun-2019  christos Sync with HEAD
 1.24 22-Dec-2021  thorpej Document PR_PSERIALIZE. Remove documentation for pool_cache_setpredestruct().
 1.23 21-Dec-2021  thorpej Add pool_cache_setpredestruct(), which allows a pool cache to specify
a function to be called before the destructor for a batch of one or more
objects is called. This can be used as a synchronization point by
subsystems that rely on the type-stable nature of pool cache objects or
subsystems that use other forms of passive serialization.
 1.22 13-Apr-2020  wiz Remove superfluous whitespace & macros.
 1.21 13-Apr-2020  chs slightly change and fix the semantics of pool_set*wat(), pool_sethardlimit()
and pool_prime() (and their pool_cache_* counterparts):

- the pool_set*wat() APIs are supposed to specify thresholds for the count of
free items in the pool before pool pages are automatically allocated or freed
during pool_get() / pool_put(), whereas pool_sethardlimit() and pool_prime()
are supposed to specify minimum and maximum numbers of total items
in the pool (both free and allocated). these were somewhat conflated
in the existing code, so separate them as they were intended.

- change pool_prime() to take an absolute number of items to preallocate
rather than an increment over whatever was done before, and wait for
any memory allocations to succeed. since pool_prime() can no longer fail
after this, change its return value to void and adjust all callers.

- pool_setlowat() is documented as not immediately attempting to allocate
any memory, but it was changed some time ago to immediately try to allocate
up to the lowat level, so just fix the manpage to describe the current
behaviour.

- add a pool_cache_prime() to complete the API set.
 1.20 06-Apr-2020  rin Remove copy-paste garbage.
 1.19 15-Nov-2011  jym branches: 1.19.2; 1.19.34;
Document pool_cache_sethardlimit(9), the faithful friend of
pool_sethardlimit(9).
 1.18 01-Jun-2011  dyoung branches: 1.18.2;
Describe the arguments to ctor and dtor.
 1.17 02-Dec-2010  wiz branches: 1.17.4;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.16 23-Jan-2010  wiz Whitespace fix.
 1.15 23-Jan-2010  rmind Cross-link a little.
 1.14 24-Dec-2009  bad Fix argument names in description of pool_cache_init().
 1.13 15-Oct-2009  thorpej - pool_cache_invalidate(): broadcast a cross-call to drain the per-CPU
caches before draining the global cache.
- pool_cache_invalidate_local(): remove.
 1.12 08-Oct-2009  wiz Bump date for new pool_cache_invalidate_local().
 1.11 08-Oct-2009  jym Add pool_cache_invalidate_local() to the pool_cache(9) API, to permit
per-CPU objects invalidation when cached in the pool cache.

See http://mail-index.netbsd.org/tech-kern/2009/10/05/msg006206.html .

Reviewed by bouyer@. Thanks!
 1.10 06-Sep-2009  jym Fix typo.
 1.9 03-Aug-2009  wiz Remove trailing whitespace, and fix a typo.
 1.8 03-Aug-2009  rmind Mention kmem(9).
 1.7 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.6 01-Feb-2008  ad branches: 1.6.4; 1.6.6;
Sync with reality. This is a work in progress.
 1.5 16-Feb-2007  rmind branches: 1.5.4;
- Add link to memoryallocators(9) in kmem_*(9), vmem(9), uvm(9), malloc(9),
pool(9) and pool_cache(9) manuals.
- Sort uvm(9) "SEE ALSO" section.
 1.4 21-Dec-2003  simonb Fix a tyop.
 1.3 04-Nov-2003  keihan s/NetBSD.ORG/NetBSD.org/
s/netbsd.org/NetBSD.org/

OK'd by martin@
 1.2 07-Sep-2003  wiz Fix a Xr (missing section), and sort SEE ALSO.
 1.1 07-Sep-2003  yamt a pool_cache(9) manpage.
maybe incomplete, but better than none.
 1.5.4.1 23-Mar-2008  matt sync with HEAD
 1.6.6.1 18-May-2008  yamt sync with head.
 1.6.4.1 02-Jun-2008  mjf Sync with HEAD.
 1.17.4.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.18.2.1 17-Apr-2012  yamt sync with head
 1.19.34.2 21-Apr-2020  martin Sync with HEAD
 1.19.34.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.19.2.1 02-Jul-2012  jdc Pull up revisions:
src/sys/kern/subr_pool.c revision 1.196
src/share/man/man9/pool_cache.9 patch
(requested by jym in ticket #366).

As pool reclaiming is unlikely to happen at interrupt or softint
context, re-enable the portion of code that allows invalidation of
CPU-bound pool caches.

Two reasons:
- CPU cached objects being invalidated, the probability of fetching an
obsolete object from the pool_cache(9) is greatly reduced. This speeds
up pool_cache_get() quite a bit as it does not have to keep destroying
objects until it finds an updated one when an invalidation is in progress.

- for situations where we have to ensure that no obsolete object remains
after a state transition (canonical example: pmap mappings between Xen
VM restoration), invalidating all pool_cache(9) is the safest way to go.

As it uses xcall(9) to broadcast the execution of pool_cache_transfer(),
pool_cache_invalidate() cannot be called from interrupt or softint
context (scheduling a xcall(9) can put a LWP to sleep).

pool_cache_xcall() => pool_cache_transfer() to reflect its use.

Invalidation being a costly process (1000s objects may be destroyed),
all places where pool_cache_invalidate() may be called from
interrupt/softint context will now get caught by the proper KASSERT(),
and fixed. Ping me when you see one.

Tested under i386 and amd64 by running ATF suite within 64MiB HVM
domains (tried triggering pgdaemon a few times).

No objection on tech-kern@.

XXX a similar fix has to be pulled up to NetBSD-6, but with a more
conservative approach.

See http://mail-index.netbsd.org/tech-kern/2012/05/29/msg013245.html
 1.4 27-Jul-2025  gutteridge portfeatures.9: also document __HAVE_PROCFS_MACHDEP
 1.3 06-Mar-2023  thorpej branches: 1.3.2; 1.3.4;
Document __HAVE_UCAS_FULL and __HAVE_UCAS_MP.
 1.2 06-Mar-2023  wiz fix typos
 1.1 06-Mar-2023  uwe portfeatures(9): the man page for the __HAVE macros

The man page itself is a skeleton/template for now. Please add short
descriptions and xrefs. If the target man page doesn't yet document
relevant __HAVE macros (hi, mutex(9)), please add something there,
possibly in a .Sh IMPLEMENTATION NOTES section.
 1.3.4.2 20-Sep-2024  martin Pull up following revision(s) (requested by rin in ticket #878):

distrib/sets/lists/comp/mi: revision 1.2426
share/man/man9/portfeatures.9: revision 1.1
share/man/man9/portfeatures.9: revision 1.2
share/man/man9/portfeatures.9: revision 1.3
share/man/man9/Makefile: revision 1.466

portfeatures(9): the man page for the __HAVE macros

The man page itself is a skeleton/template for now. Please add short
descriptions and xrefs. If the target man page doesn't yet document
relevant __HAVE macros (hi, mutex(9)), please add something there,
possibly in a .Sh IMPLEMENTATION NOTES section.
fix typos

Document __HAVE_UCAS_FULL and __HAVE_UCAS_MP.
 1.3.4.1 06-Mar-2023  martin file portfeatures.9 was added on branch netbsd-10 on 2024-09-20 10:27:11 +0000
 1.3.2.1 02-Aug-2025  perseant Sync with HEAD
 1.15 04-Jan-2025  riastradh powerhook_establish(9): Nix trailing whitespace.
 1.14 30-Dec-2024  pgoyette Restore missing "When"
 1.13 30-Dec-2024  pgoyette Use a more appropriate preposition.
 1.12 30-Dec-2024  christos When deprecating something we should mention what is the replacement!
 1.11 15-May-2009  wiz branches: 1.11.60;
Use Nm instead of Xr to itself.
 1.10 14-May-2009  dyoung Mention that these are deprecated APIs. Bump date.
 1.9 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.8 24-Sep-2006  dogcow branches: 1.8.16; 1.8.18;
it's now const char *name, not char *name. (hi, wiz!)
 1.7 24-Sep-2006  wiz Bump date for previous.
 1.6 24-Sep-2006  jmcneill Add "name" parameter to powerhook_establish, to aid debugging. No objections
on tech-kern@
 1.5 09-Dec-2002  uwe Do a few overlooked s/shutdown/power/.
 1.4 14-Oct-2002  wiz New sentence, new line.
 1.3 21-Jun-2001  wiz Fix typos, punctuation and whitespace.
 1.2 26-Nov-2000  takemura Add new powerhook argument values, PWR_SOFTSUSPEND, PWR_SOFTSTANDBY and
PWR_SOFTRESUME. Apm calls powerhook with the values in normal interrupt
priority level while others are protected with splhigh().
 1.1 06-Dec-1999  augustss branches: 1.1.2; 1.1.6;
Document powerhook functions.
 1.1.6.1 06-May-2001  he Pull up revision 1.2 (requested by he):
Add new powerhook argument values, PWR_SOFTSUSPEND, PWR_SOFTSTANDBY and
PWR_SOFTRESUME. Apm calls powerhook with the values in normal interrupt
priority level while others are protected with splhigh().
 1.1.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.8.18.1 18-May-2008  yamt sync with head.
 1.8.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.11.60.1 02-Aug-2025  perseant Sync with HEAD
 1.6 31-Oct-2017  jdolecek remove ppi(9) manpage, the actual subsystem got never implemented

PR kern/52665 by Kamil Rytarowski
 1.5 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.4 26-Dec-2005  perry u_intN_t -> uintN_t
 1.3 23-Jan-2004  wiz New sentence, new line; |fmt; misc fixes.
 1.2 23-Jan-2004  wiz Drop trailing whitespace.
 1.1 19-Jan-2004  jdolecek branches: 1.1.1;
Initial revision
 1.1.1.1 19-Jan-2004  jdolecek Import Gary Thorpe's netbsd-ppbus 1.3. This is NetBSD port
of FreeBSD Parallel Port Bus framework. Work in progress.
 1.6 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.5 20-Feb-2007  wiz branches: 1.5.10; 1.5.12;
time(9) was renamed to time_second(9), fix xrefs.
 1.4 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.3 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.2 04-Sep-2001  wiz Boring whitespace fixes.
 1.1 03-Aug-2000  itojun branches: 1.1.2;
add ppsratecheck(9).
 1.1.2.2 16-Aug-2000  itojun pullup (approved by releng-1-5)

add ppsratecheck(9).

distrib/sets/lists/comp/mi 1.251 -> 1.252
share/man/man9/Makefile 1.67 -> 1.68 (equivalent to)
share/man/man9/ppsratecheck.9 (new)
sys/kern/kern_time.c 1.49 -> 1.51, 1.52 -> 1.53
sys/sys/time.h 1.29 -> 1.30
 1.1.2.1 03-Aug-2000  itojun file ppsratecheck.9 was added on branch netbsd-1-5 on 2000-08-16 01:20:31 +0000
 1.5.12.1 18-May-2008  yamt sync with head.
 1.5.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.6 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.5 03-Jul-2007  yamt branches: 1.5.10; 1.5.12;
update and document yield().
 1.4 20-Dec-2005  rpaulo Update to match reality.
 1.3 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.2 27-Sep-2002  wiz Begin new sentences on new lines; drop trailing whitespace; some mdoc
and typo fixes.
 1.1 22-Sep-2002  gmcgarry Document the details of the scheduler.
 1.5.12.1 18-May-2008  yamt sync with head.
 1.5.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.1 01-Jul-2010  jruoho branches: 1.1.2;
Briefly document proc_find() and pgrp_find().
 1.1.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.1.2.1 01-Jul-2010  uebayasi file proc_find.9 was added on branch uebayasi-xip on 2010-08-17 06:41:05 +0000
 1.12 14-May-2006  uwe G/c properties(9) and links. They are marked as obsolete in the sets
already.
 1.11 04-Oct-2004  rumble Move a comma up to the preceding line as advised by wiz@.
 1.10 04-Oct-2004  rumble Removed accidental repetitious words.
 1.9 30-Jun-2003  wiz Pa Aq -> Aq Pa.
 1.8 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.7 06-Apr-2003  wiz Fix two typos, from Igor Sobrado in PR 19680.
 1.6 14-Feb-2003  grant The correct capitalisation of 'NetBSD.org' is (you
guessed it) 'NetBSD.org'.

some mdoc fixes.
 1.5 06-Jan-2003  wiz through, not throught.
 1.4 14-Oct-2002  wiz New sentence, new line.
 1.3 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.2 04-Oct-2001  wiz Whitespace fixes, formatting improvements, drop some unnecessary .Pp, sort
sections.
 1.1 04-Oct-2001  eeh Add generic properties.
 1.15 01-Oct-2025  riastradh pserialize(9): Update example to reflect current idioms.

Also save the trouble of a data-dependent read barrier on Alpha in
every iteration of the loop -- only needed on the first iteration, in
this example!
 1.14 10-Oct-2021  riastradh pserialize(9): Lift rule that pserialize_perform be serialized.

There may have been a technical reason for this back when we were
following the expired passive serialization patent to the letter, but
no more -- and this is a real burden for some applications.
 1.13 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.12 26-Jan-2016  riastradh Note limited extent for reference to the pserialized object.
 1.11 26-Jan-2016  riastradh Suggest the cacheline-aligned global struct idiom.
 1.10 09-Mar-2015  riastradh Suggest membar_datadep_consumer now that we have it.
 1.9 21-Nov-2014  riastradh Fix = -> == in conditional in example. Oops!
 1.8 21-Nov-2014  riastradh Use membar_consumer until we have membar_datadep_consumer.
 1.7 21-Nov-2014  riastradh Elaborate comment before pserialize_perform.
 1.6 21-Nov-2014  riastradh Fix typo: pserialize_read_exit(s), not s = pserialize_read_exit().
 1.5 21-Nov-2014  riastradh Bump date.
 1.4 21-Nov-2014  riastradh Expand pserialize(9) example to include publish, read, and destroy.
 1.3 07-Aug-2011  rmind branches: 1.3.4; 1.3.20;
Fix .Xr to membar_ops(3), not membar(9). Spotted by wiz@.
 1.2 02-Aug-2011  wiz Whitespace nits.
 1.1 30-Jul-2011  rmind Add pserialize(9) manual page.
 1.3.20.1 18-Mar-2015  snj Pull up following revision(s) (requested by riastradh in ticket #607):
share/man/man9/pserialize.9: revisions 1.4-1.8
Expand pserialize(9) example to include publish, read, and destroy.
--
Bump date.
--
Fix typo: pserialize_read_exit(s), not s = pserialize_read_exit().
--
Elaborate comment before pserialize_perform.
--
Use membar_consumer until we have membar_datadep_consumer.
 1.3.4.1 24-Mar-2015  snj Pull up following revision(s) (requested by riastradh in ticket #1270):
share/man/man9/pserialize.9: revision 1.4-1.8
Expand pserialize(9) example to include publish, read, and destroy.
--
Bump date.
--
Fix typo: pserialize_read_exit(s), not s = pserialize_read_exit().
--
Elaborate comment before pserialize_perform.
--
Use membar_consumer until we have membar_datadep_consumer.
 1.6 09-Jul-2002  thorpej Overhaul documentation of the kernel signal facilities. Some text
liberally borrowed from Paul's psignal(9) manpage.

More work can be done here, but there's more here than before, at least.
 1.5 16-Mar-1999  garbled More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.4 06-Mar-1999  mycroft Fix minor formatting errors.
 1.3 11-Nov-1997  mrg add missing .Nm sections
 1.2 08-Oct-1997  jtc branches: 1.2.2;
Fix tipo inherited from old version of TNF copyright form.
s/REGENTS/FOUNDATION/.
 1.1 22-Jun-1996  pk Add psignal()/pgsignal()/gsignal()
 1.2.2.1 11-Nov-1997  mrg pull up from trunk: add missing .Nm sections
 1.19 06-Nov-2021  riastradh pslist(9): No need to serialize pserialize_perform any more.

So take it out of the mutex section.
 1.18 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.17 07-Jul-2016  ozaki-r Constify some arguments of pslist(9) functions

By doing so, callers don't need to discard const qualifier.
 1.16 27-Apr-2016  ozaki-r Fix declaration of PSLIST_READER_FIRST
 1.15 11-Apr-2016  riastradh Clarify wording about when to use PSLIST_ENTRY_DESTROY.
 1.14 11-Apr-2016  riastradh Remove incorrect comment about non-effect of PSLIST_ENTRY_DESTROY.

This does have an effect -- it nullifies the next pointer. (The text
was copied from PSLIST_DESTROY, which really has no effect without
options DIAGNOSTIC.)
 1.13 09-Apr-2016  riastradh Parrot markup for PTHREAD_MUTEX_INITIALIZER synopsis.
 1.12 09-Apr-2016  riastradh Use the proper pluralization of `frotz'.

Per the jargon file, `frotz' is a contraction of `frobnitz', which
pluralizes to `frobnitzem'; `frobbotzim' is the plural of the related
but not identical term `frobozz'.

Fixing other uses of this plural elsewhere among the man pages is
left to the reader inclined to humorous linguistic studies.
 1.11 09-Apr-2016  riastradh Say `loop header', not `loop head'.

`Head' means something else in this context -- a list head.
 1.10 09-Apr-2016  riastradh Fix a vestige of an earlier word choice: s/connected/associated/1
 1.9 09-Apr-2016  riastradh Fix wording around `list heads'.

A list head is not a list, conceptually.
 1.8 09-Apr-2016  riastradh Tighten opening paragraph. Split into two smaller sentences.
 1.7 09-Apr-2016  riastradh Use imperative mood consistently.
 1.6 09-Apr-2016  riastradh Fix missing NAME operand to PSLIST_ENTRY_DESTROY.
 1.5 09-Apr-2016  uwe Use \(em for em-dash.
 1.4 09-Apr-2016  uwe Add couple of missing .Ns
 1.3 09-Apr-2016  riastradh Add passive references, intermediate between pserialize and refcount.

Discussed on tech-kern:

https://mail-index.netbsd.org/tech-kern/2016/01/24/msg020069.html

API is still experimental and likely to change. (Obvious changes:
either remove extra arguments everywhere, or shrink psref_target to a
single bit, at the expense of possibly valuable diagnostic checks.)
Should do some real testing before we use this in anger!
 1.2 09-Apr-2016  riastradh Fix name of example list head.
 1.1 09-Apr-2016  riastradh Introduce pserialize-safe linked lists.

These are like LIST_* from queue(3), but issue the appropriate memory
barriers for pserialize readers and writers.

Discussed on tech-kern:

https://mail-index.netbsd.org/tech-kern/2016/04/03/msg020365.html
 1.5 27-Apr-2016  ozaki-r Fix usages of PSLIST_ENTRY_* in the example code
 1.4 27-Apr-2016  ozaki-r Fix usage of frobbotzim_prc in the example code
 1.3 15-Apr-2016  riastradh Tweak wording. Use \(em for emdash.
 1.2 10-Apr-2016  wiz Fix xref section.
 1.1 09-Apr-2016  riastradh Add passive references, intermediate between pserialize and refcount.

Discussed on tech-kern:

https://mail-index.netbsd.org/tech-kern/2016/01/24/msg020069.html

API is still experimental and likely to change. (Obvious changes:
either remove extra arguments everywhere, or shrink psref_target to a
single bit, at the expense of possibly valuable diagnostic checks.)
Should do some real testing before we use this in anger!
 1.3 18-May-2009  wiz New sentence, new line.
 1.2 02-May-2008  martin Move to standard 2 clause license
 1.1 21-Nov-2007  pooka branches: 1.1.4; 1.1.8; 1.1.10;
Short description of putter(9)
 1.1.10.1 18-May-2008  yamt sync with head.
 1.1.8.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.4.2 09-Jan-2008  matt sync with HEAD
 1.1.4.1 21-Nov-2007  matt file putter.9 was added on branch matt-armv6 on 2008-01-09 01:39:22 +0000
 1.6 18-Jul-2018  wiz Various improvements.
 1.5 09-Jul-2018  rkujawa Try to bring this man page up to NetBSD standards.

This page is bad and we should feel bad about it. But perhaps now it is
considerably less bad.
 1.4 20-Dec-2005  rpaulo branches: 1.4.86; 1.4.88;
Adapt man pages to ktrace-lwp.
 1.3 02-Jan-2002  wiz Whitespace nits.
 1.2 02-Jan-2002  augustss Remove factual errors from the radio man pages.
Also rearrange some information.
 1.1 01-Jan-2002  augustss Add radio(4) man pages.
 1.4.88.1 10-Jun-2019  christos Sync with HEAD
 1.4.86.1 28-Jul-2018  pgoyette Sync with HEAD
 1.16 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.15 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.14 13-May-2010  wiz Join %U.
 1.13 17-Apr-2010  jruoho branches: 1.13.2;
Correct the location of the header.
 1.12 14-Apr-2010  jruoho Add the USENIX paper of Gregory McGarry to SEE ALSO.
 1.11 14-Apr-2010  jruoho Refer to cpu_switchto(9) instead of nonexistent cpu_switch(9).
In addition, small markup changes.
 1.10 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.9 19-May-2007  wiz branches: 1.9.10; 1.9.12;
Fix bug introduced by imperfect wizd emulation.
 1.8 07-Mar-2007  dogcow running in emulated wizd mode, convert caddr_t to void *.
 1.7 16-Jan-2006  rpaulo Revert to previous. ras(9) uses 'struct proc'.
Pointed out by Gregory McGarry.
 1.6 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.5 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.4 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.3 14-Oct-2002  wiz New sentence, new line.
 1.2 29-Aug-2002  wiz Mdoc nit (\-1 instead of -1. \- is minus, - is hyphen).
 1.1 28-Aug-2002  gmcgarry Documentation for Restartable Atomic Sequences (RAS).
 1.9.12.1 18-May-2008  yamt sync with head.
 1.9.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.13.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.13.2.1 17-Apr-2010  uebayasi file ras.9 was added on branch uebayasi-xip on 2010-08-17 06:40:06 +0000
 1.20 25-Jul-2025  martin PR 58582: make rasops and wsdisplay headers idempotent.
 1.19 08-Aug-2019  uwe branches: 1.19.10;
Try to improve formatting and naration.
 1.18 07-Aug-2019  rin - Stop showing struct rasops_info; readers can read the header itself.
- Correct description for optimized font widths.
- Remove strange blank line.
 1.17 03-Jul-2017  wiz branches: 1.17.6; 1.17.8;
Remove workaround for ancient HTML generation code.
 1.16 13-Jan-2012  wiz Use more markup. Increase table width since longest string changed.
 1.15 13-Jan-2012  wiz New sentence, new line. Use more markup. Bump date for previous.
 1.14 13-Jan-2012  macallan document some rasops_info flags that have been added recently ( and not so
recently )
 1.13 13-Jan-2012  macallan document recent changes
 1.12 02-Dec-2010  wiz branches: 1.12.6;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.11 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.10 18-Feb-2006  jmcneill branches: 1.10.20; 1.10.22;
Reflect shadow framebuffer changes (hi wiz!).
 1.9 21-Jan-2005  rumble "is implement" -> "is implemented"
 1.8 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.7 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.6 06-Jan-2003  wiz descriptor with a c.
 1.5 14-Oct-2002  wiz New sentence, new line.
 1.4 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.3 28-Nov-2001  wiz No point in using __P in prototype declarations in man pages.
 1.2 22-Oct-2001  wiz Whitespace, punctuation fixes; sort sections, fix xrefs.
 1.1 22-Oct-2001  gmcgarry Programmer's guide for the rasops subsystem.
 1.10.22.1 18-May-2008  yamt sync with head.
 1.10.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.12.6.1 17-Apr-2012  yamt sync with head
 1.17.8.1 15-Aug-2019  martin Pull up following revision(s) (requested by rin in ticket #56):

sys/dev/rasops/rasops.c: revision 1.120
sys/dev/rasops/rasops.h: revision 1.40
sys/dev/rasops/rasops.c: revision 1.121
sys/dev/rasops/rasops.h: revision 1.41
sys/dev/rasops/rasops.c: revision 1.122
sys/dev/rasops/rasops.h: revision 1.42
sys/dev/rasops/rasops.h: revision 1.43
sys/dev/rasops/rasops.h: revision 1.44
sys/dev/rasops/rasops.h: revision 1.45
sys/dev/rasops/rasops.h: revision 1.46
sys/dev/rasops/rasops.h: revision 1.47
sys/dev/rasops/rasops.h: revision 1.48
sys/dev/rasops/rasops32.c: revision 1.40
sys/dev/rasops/rasops32.c: revision 1.41
sys/dev/rasops/rasops32.c: revision 1.42
sys/dev/rasops/rasops32.c: revision 1.43
sys/dev/rasops/rasops32.c: revision 1.44
sys/dev/rasops/rasops32.c: revision 1.45
sys/dev/rasops/rasops32.c: revision 1.46
sys/dev/rasops/rasops1-4_putchar.h: revision 1.1
sys/dev/rasops/rasops1-4_putchar.h: revision 1.2
sys/dev/rasops/rasops1-4_putchar.h: revision 1.3
sys/dev/rasops/rasops1_putchar_width.h: revision 1.3
sys/dev/rasops/rasops1_putchar_width.h: revision 1.4
sys/dev/rasops/rasops1_putchar_width.h: revision 1.5
sys/dev/rasops/rasops1_putchar_width.h: revision 1.6
sys/dev/rasops/README: revision 1.7
sys/dev/rasops/rasops_putchar_aa.h: revision 1.5
sys/dev/rasops/rasops_putchar_aa.h: revision 1.6
sys/dev/rasops/rasops8.c: revision 1.45
sys/dev/rasops/rasops8.c: revision 1.46
sys/dev/rasops/rasops8.c: revision 1.47
sys/dev/rasops/rasops24.c: revision 1.40
sys/dev/rasops/rasops8.c: revision 1.48
sys/dev/rasops/rasops24.c: revision 1.41
sys/dev/rasops/rasops8.c: revision 1.49
sys/dev/rasops/rasops24.c: revision 1.42
sys/dev/rasops/rasops24.c: revision 1.43
sys/dev/rasops/rasops24.c: revision 1.44
sys/dev/rasops/rasops_masks.c: revision 1.10
doc/CHANGES: revision 1.2566
sys/dev/rasops/rasops24.c: revision 1.45
doc/CHANGES: revision 1.2567
sys/dev/rasops/rasops24.c: revision 1.46
sys/dev/rasops/rasops24.c: revision 1.47
sys/dev/rasops/rasops24.c: revision 1.48
sys/dev/rasops/rasops24.c: revision 1.49
sys/dev/rasops/rasops_bitops.h: revision 1.19
sys/dev/rasops/rasops_putchar_aa.h: file removal
sys/dev/wscons/wsdisplay_vcons.c: revision 1.40
sys/dev/rasops/rasops8.c: revision 1.50
sys/dev/rasops/rasops8.c: revision 1.51
sys/dev/rasops/rasops24.c: revision 1.50
sys/arch/luna68k/dev/omrasops.c: revision 1.21
sys/dev/rasops/rasops_bitops.h: revision 1.20
sys/dev/wsfb/genfb.c: revision 1.68
sys/dev/rasops/rasops_bitops.h: revision 1.21
sys/dev/wsfb/genfb.c: revision 1.69
sys/dev/rasops/rasops_putchar_width.h: revision 1.10
sys/dev/rasops/rasops_bitops.h: revision 1.22
sys/dev/rasops/rasops_putchar_width.h: revision 1.11
sys/dev/rasops/rasops_bitops.h: revision 1.23
sys/dev/rasops/rasops_putchar_width.h: revision 1.12
sys/dev/rasops/rasops_bitops.h: revision 1.24
sys/dev/rasops/rasops_putchar_width.h: revision 1.13
sys/dev/rasops/rasops_bitops.h: revision 1.25
sys/dev/rasops/rasops_putchar_width.h: revision 1.14
sys/dev/rasops/rasops_putchar_width.h: revision 1.15
sys/dev/rasops/rasops1.c: revision 1.32
sys/dev/rasops/rasops1.c: revision 1.33
sys/dev/rasops/rasops1.c: revision 1.34
sys/dev/rasops/rasops1.c: revision 1.35
sys/dev/rasops/rasops1.c: revision 1.36
sys/dev/rasops/rasops1.c: revision 1.37
sys/dev/rasops/rasops4.c: revision 1.21
sys/dev/rasops/rasops4.c: revision 1.22
sys/dev/rasops/rasops4.c: revision 1.23
sys/dev/rasops/rasops4.c: revision 1.24
sys/dev/rasops/rasops4.c: revision 1.25
sys/dev/rasops/rasops4.c: revision 1.26
sys/dev/rasops/rasops4.c: revision 1.27
sys/dev/rasops/rasops4.c: revision 1.28
sys/dev/wsfb/genfb.c: revision 1.70
sys/dev/rasops/rasops2.c: revision 1.27
sys/dev/rasops/rasops2.c: revision 1.28
share/man/man9/rasops.9: revision 1.18
sys/dev/rasops/rasops.c: revision 1.102
sys/dev/rasops/rasops2.c: revision 1.29
share/man/man9/rasops.9: revision 1.19
sys/dev/rasops/rasops.c: revision 1.103
sys/dev/rasops/rasops.c: revision 1.104
sys/dev/rasops/rasops.c: revision 1.105
sys/dev/rasops/rasops.c: revision 1.106
sys/dev/rasops/rasops.c: revision 1.107
sys/dev/rasops/rasops_putchar.h: revision 1.6
sys/dev/rasops/rasops.c: revision 1.108
sys/dev/rasops/rasops_putchar.h: revision 1.7
sys/dev/rasops/rasops.c: revision 1.109
sys/dev/rasops/rasops_putchar.h: revision 1.8
sys/dev/rasops/rasops2.c: revision 1.30
sys/dev/rasops/rasops2.c: revision 1.31
sys/dev/rasops/rasops15.c: revision 1.32
sys/dev/rasops/rasops2.c: revision 1.32
sys/dev/rasops/rasops15.c: revision 1.33
sys/dev/rasops/rasops2.c: revision 1.33
sys/dev/rasops/rasops15.c: revision 1.34
sys/dev/rasops/rasops15.c: revision 1.35
sys/dev/rasops/rasops15.c: revision 1.36
sys/dev/rasops/rasops.c: revision 1.110
sys/dev/rasops/rasops15.c: revision 1.37
sys/dev/rasops/rasops.c: revision 1.111
sys/dev/rasops/rasops15.c: revision 1.38
sys/dev/rasops/rasops.c: revision 1.112
sys/dev/rasops/rasops15.c: revision 1.39
sys/dev/rasops/rasops.c: revision 1.113
sys/dev/rasops/rasops.c: revision 1.114
sys/dev/rasops/rasops.c: revision 1.115
sys/dev/rasops/rasops_masks.h: revision 1.9
sys/dev/rasops/rasops.c: revision 1.116
sys/dev/rasops/rasops.c: revision 1.117
sys/dev/rasops/rasops.c: revision 1.118
sys/dev/rasops/rasops.c: revision 1.119
sys/dev/rasops/rasops.h: revision 1.39

Misc clean-up's:
- protect private stuff in rasops.h by _RASOPS_PRIVATE
- staticify rasops_copycols() and rasops_isgray[]
- G/C unused extern int cold
Switch to per-device stamp, and retire stamp_mutex.

Provide buffer capable of single-row pixels in order to make things simpler.

Factor out copy-paste. No functional changes.
When font is switched, not only putchar, but also other ri_ops can be
changed by backend driver, e.g., see rasops1.c:
https://nxr.netbsd.org/xref/src/sys/dev/rasops/rasops1.c#58
4 is 1 << 2, not 1 << 3...

Fix erasecols and do_cursor for font width >= 32 bits.
Also, some cosmetic clean-up's.

Oops, for rasops_copycols(), we cannot use memmove even if src == dst.
On the other hand, memmove is safe for rasops_copyrows().
Fix unaligned writes to buffer, that are introduced in 1.105:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/rasops/rasops.c#rev1.105

Support font width 32 on monochrome screen.

Remove duplicate substitution. Style. No functional changes.

Correct copy count. This affects ``left-to-right'' copy for region
including word boundary.

Fix a bug in shadow fb support for copycols on 1, 2, and 4bpp screen,
which was introduced in 1.18:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/rasops/rasops_bitops.h#rev1.18

Add general putchar functions for 2 and 4bpp.
Note that 1bpp continues to use its local version in rasops1.c,
which is much faster and simpler.

Cosmetic changes. No functional changes.

Reflect reality.

Notify size of shadow framebuffer if enabled.

Fix unaligned word write's to buffer, introduced in rev 1.42:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/rasops/rasops24.c#rev1.42

Real fix for 24-bpp color:
- When centering screen, locate effective base address of framebuffer to
both word and 24-bit color boundary.
- Consistently convert ri_devcmap to ``big endian'' if not RI_BSWAP.

Also, fix possible bug for 15/16-bpp with RI_BSWAP (not tested).

Protect rasops_copy{rows,cols}() by _RASOPS_PRIVATE.

Use _KERNEL_OPT.

Simplify calculation for 12-byte alignment.
No functional changes.

Fix black color-attribution for depths 2 and 4.

Depth 2 is monochrome.
IMO, it is impossible to support ANSI colors on 2-bpp display; fore-
and background can be same value even if they are different colors
logically.

Fix a critical bug for rasops_copyrows() introduced in rev. 1.90:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/rasops/rasops.c#rev1.90
When src < dst, we have to copy backward.

Simplify rasops_do_cursor():
- Use static masks similar to that used in rasops_bitops.h,
rather than generating them on the fly.
- Use pointer for proper type to avoid unnecessary casts.

Use "hp" instead of "hrp" consistently with other files.
No functional changes.

Stop allocating ri_buf and ri_stamp dynamically. As commented in
rasops.h, it is not safe to use kmem_alloc(9) in rasops_init();
rasops routines can be used for early putchar, which means that
UVM is not fully initialized.

Should fix a problem reported by macallan:
http://mail-index.netbsd.org/tech-kern/2019/08/02/msg025327.html

Instead of using ri_buf, inline function rasops_memcpy32() is
introduced to fill 32bit data efficiently.

Instead of using ri_stamp (per device stamp), stamp_ri is
introduced to distinguish for which device stamp is calculated.

Oops, revert an unintentional change for now.

If RI_CLEAR is set, do not forget to clear real framebuffer.

Modify struct rasops_info again (ride 9.99.4 bump).
- remove ri_buf and friends.
- remove ri_stamp and frieds.
- introduce ri_ul, which will be used for scaling underline with font.

Also add hack for ri_ul; adjust its size to obsoleted member, ri_delta,
which was only used rasops routines internally. Now, size and offsets of
all members of struct rasops_info become same with netbsd-9, -8, and -7,
again. So we can safelly pull up fixes to any release branches!

Scaling dimensions of underline by font height.

Currently,
- offset of underline is fixed to 1-row from bottom of characters, and
- height of underline is fixed to 1.
Both are good for standard 8x16 fonts. However, it is too thin for
larger fonts, especially when used on display of high resolution.
Also, 1-row offset of underline is ugly for small fonts, e.g.,
spleen5x8.
Therefore, adjust offset and height as,
- no changes for standard 16-height fonts.
- scaling by font height for larger fonts.
- set offset to zero for fonts of height smaller than 16.

Merge rasops_putchar_aa.h into rasops_putchar.h.

Support scaling underline dimensions by font height.

Separate general putchar for 1-4bpp from rasops_bitops:
- Support anti-aliasing for 2bpp, which works perfectly!
- Support scaling underline dimensions with font height.

We support anti-aliasing for depth 2.
Use switch appropriately.
- Stop showing struct rasops_info; readers can read the header itself.
- Correct description for optimized font widths.
- Remove strange blank line.

Try to improve formatting and naration.

Make rasops_erase{rows,cols}() public again; hp300/diofb uses them.
Pointed out by martin.

When legacy Apple 4-bpp color palette is used, make green dark so that
kernel messages are printed nicely on white background.

Fix color range overflow; we cannot make bright colors more brighter.

Correctly check whether character is in font in rasops_mapchar().
Also, make sure that in putchar functions for completeness.

Fix bug introduced in rev. 1.69:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/wsfb/genfb.c#rev1.69
is_bgr should be initialized to false. Otherwise, color becomes strange
for depths 24 and 32 unless backend explicitly set "is_bgr" property.

Set 4-bpp devcmap in a similar manner to non-RGB case of 8-bpp.
No functional changes since this is not in use (4-bpp is monochrome).

Misc style clean up's.
- Introduce and use proper macros.
- Use not ambiguous variable names.
- Unify similar functions as possible as I can.
- G/C unused headers.
- Use #include <dev/rasops/foo.h> instead of "foo.h"

No particular functional changes intended.

My work for rasops(9) was finished (hopefully).

I will send pull-up request for netbsd-9, if there are no new failures
reported within few days.

Fix format in order not to confuse changes2html script.
Minor improvements of wording for my entry.

When using stamp, drop attributions other than back and foreground
colors so that stamp is not updated unnecessarily.
 1.17.6.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.19.10.1 02-Aug-2025  perseant Sync with HEAD
 1.12 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.11 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.10 20-Feb-2007  wiz branches: 1.10.10; 1.10.12;
time(9) was renamed to time_second(9), fix xrefs.
 1.9 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.8 14-Oct-2002  wiz New sentence, new line.
 1.7 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.6 21-Jun-2001  wiz Fix typos, punctuation and whitespace.
 1.5 03-Aug-2000  jhawk Xr ppsratecheck
 1.4 02-Aug-2000  itojun add a note on possible misbehavior when mininterval < 1/hz.
 1.3 02-Aug-2000  itojun add .Ed against .Bd
 1.2 14-Jun-2000  cgd fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well. No functional changes.
 1.1 03-Feb-2000  cgd branches: 1.1.2; 1.1.4;
add documentation for the ratecheck() function, a new kernel function
(not even committed... docs before changes?! CALL RIPLEY!!!)
which can help programmers implement rate-limited actions.
 1.1.4.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.1.2.2 18-Feb-2000  he Pull up revision 1.1 (new, requested by thorpej):
Implement ratecheck(), a function which can help kernel programmers
implement rate-limited actions.
 1.1.2.1 03-Feb-2000  he file ratecheck.9 was added on branch netbsd-1-4 on 2000-02-18 20:26:43 +0000
 1.10.12.1 18-May-2008  yamt sync with head.
 1.10.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.12 07-Sep-2024  rillig man: use https URLs for www.NetBSD.org
 1.11 20-Feb-2007  wiz branches: 1.11.90;
time(9) was renamed to time_second(9), fix xrefs.
 1.10 06-Sep-2006  gdamore time.9 renamed to time_second.9. various updates to reflect API changes.
 1.9 02-Mar-2006  uwe Remove BUGS section and xref clock_secs_to_ymdhms(9).
While here, use hyphen in "battery-backed" consistently.
 1.8 14-Feb-2003  grant The correct capitalisation of 'NetBSD.org' is (you
guessed it) 'NetBSD.org'.

some mdoc fixes.
 1.7 14-Oct-2002  wiz New sentence, new line.
 1.6 04-Sep-2001  wiz Boring whitespace fixes.
 1.5 14-Jun-2000  cgd sweep of my licenses (userland files w/o only my copyright) for
consistency. (no functional changes)
 1.4 14-Jun-2000  cgd fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well. No functional changes.
 1.3 06-Apr-1999  pk branches: 1.3.6;
1, 2, 3 and.. 4!
 1.2 16-Mar-1999  garbled branches: 1.2.2;
More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.1 25-Nov-1995  perry Added first section 9 man pages -- initial pages and Makefile from cgd
Section 9 man pages document the internals of the kernel.
 1.2.2.1 07-Apr-1999  pk Pull up from trunk: copyright text warts.
 1.3.6.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.11.90.1 02-Aug-2025  perseant Sync with HEAD
 1.33 25-Dec-2024  andvar fix typo in rnd(9) documentation.
 1.32 04-Aug-2023  riastradh branches: 1.32.2;
entropy(9): Simplify stages. Split interrupt vs non-interrupt paths.

- Nix the entropy stage (cold, warm, hot). Just use the usual kernel
`cold' (cold: single-core, single-thread; interrupts may happen),
and don't make any three-way distinction about whether interrupts
or threads or other CPUs can be running.

Instead, while cold, use splhigh/splx or forbid paths to come from
interrupt context, and while warm, use mutex or the per-CPU hard
and soft interrupt paths for low latency. This comes at a small
cost to some interrupt latency, since we may stir the pool in
interrupt context -- but only for a very short window early at boot
between configure and configure2, so it's hard to imagine it
matters much.

- Allow rnd_add_uint32 to run in hard interrupt context or with spin
locks held, but defer processing to softint and drop samples on the
floor if buffer is full. This is mainly used for cheaply tossing
samples from drivers for non-HWRNG devices into the entropy pool,
so it is often used from interrupt context and/or under spin locks.

- New rnd_add_data_intr provides the interrupt-like data entry path
for arbitrary buffers and driver-specified entropy estimates: defer
processing to softint and drop samples on the floor if buffer is
full.

- Document that rnd_add_data is forbidden under spin locks outside
interrupt context (will crash in LOCKDEBUG), and inadvisable in
interrupt context (but technically permitted just in case there are
compatibility issues for now); later we can forbid it altogether in
interrupt context or under spin locks.

- Audit all uses of rnd_add_data to use rnd_add_data_intr where it
might be used in interrupt context or under a spin lock.

This fixes a regression from last year when the global entropy lock
was changed from IPL_VM (spin) to IPL_SOFTSERIAL (adaptive). Thought
I'd caught all the problems from that, but another one bit three
different people this week, presumably because of recent changes that
led to more non-HWRNG drivers entering the entropy consolidation
path from rnd_add_uint32.

In my attempt to preserve the rnd(9) API for the (now long-since
abandoned) prospect of pullup to netbsd-9 in my rewrite of the
entropy subsystem in 2020, I didn't introduce a separate entry point
for entering entropy from interrupt context or equivalent, i.e., spin
locks held, and instead made rnd_add_data rely on cpu_intr_p() to
decide whether to process the whole sample under a lock or only take
as much as there's buffer space for before scheduling a softint. In
retrospect, that was a mistake (though perhaps not as much of a
mistake as other entropy API decisions...), a mistake which is
finally getting rectified now by rnd_add_data_intr.

XXX pullup-10
 1.31 17-May-2022  riastradh branches: 1.31.2;
rnd(9): Note that rndsource callbacks are never run in hardint.

But they may be run in softint at IPL_SOFTSERIAL.
 1.30 19-Mar-2022  riastradh rnd(9): Document the serial use of rndsource callbacks.

This simplifies the rndsource API -- no need to lock, unless you're
also coordinating with other driver logic like concurrent
opencrypto(4) requests that share device requests.
 1.29 04-May-2020  wiz Improve markup.
 1.28 30-Apr-2020  riastradh Rewrite entropy subsystem.

Primary goals:

1. Use cryptography primitives designed and vetted by cryptographers.
2. Be honest about entropy estimation.
3. Propagate full entropy as soon as possible.
4. Simplify the APIs.
5. Reduce overhead of rnd_add_data and cprng_strong.
6. Reduce side channels of HWRNG data and human input sources.
7. Improve visibility of operation with sysctl and event counters.

Caveat: rngtest is no longer used generically for RND_TYPE_RNG
rndsources. Hardware RNG devices should have hardware-specific
health tests. For example, checking for two repeated 256-bit outputs
works to detect AMD's 2019 RDRAND bug. Not all hardware RNGs are
necessarily designed to produce exactly uniform output.

ENTROPY POOL

- A Keccak sponge, with test vectors, replaces the old LFSR/SHA-1
kludge as the cryptographic primitive.

- `Entropy depletion' is available for testing purposes with a sysctl
knob kern.entropy.depletion; otherwise it is disabled, and once the
system reaches full entropy it is assumed to stay there as far as
modern cryptography is concerned.

- No `entropy estimation' based on sample values. Such `entropy
estimation' is a contradiction in terms, dishonest to users, and a
potential source of side channels. It is the responsibility of the
driver author to study the entropy of the process that generates
the samples.

- Per-CPU gathering pools avoid contention on a global queue.

- Entropy is occasionally consolidated into global pool -- as soon as
it's ready, if we've never reached full entropy, and with a rate
limit afterward. Operators can force consolidation now by running
sysctl -w kern.entropy.consolidate=1.

- rndsink(9) API has been replaced by an epoch counter which changes
whenever entropy is consolidated into the global pool.
. Usage: Cache entropy_epoch() when you seed. If entropy_epoch()
has changed when you're about to use whatever you seeded, reseed.
. Epoch is never zero, so initialize cache to 0 if you want to reseed
on first use.
. Epoch is -1 iff we have never reached full entropy -- in other
words, the old rnd_initial_entropy is (entropy_epoch() != -1) --
but it is better if you check for changes rather than for -1, so
that if the system estimated its own entropy incorrectly, entropy
consolidation has the opportunity to prevent future compromise.

- Sysctls and event counters provide operator visibility into what's
happening:
. kern.entropy.needed - bits of entropy short of full entropy
. kern.entropy.pending - bits known to be pending in per-CPU pools,
can be consolidated with sysctl -w kern.entropy.consolidate=1
. kern.entropy.epoch - number of times consolidation has happened,
never 0, and -1 iff we have never reached full entropy

CPRNG_STRONG

- A cprng_strong instance is now a collection of per-CPU NIST
Hash_DRBGs. There are only two in the system: user_cprng for
/dev/urandom and sysctl kern.?random, and kern_cprng for kernel
users which may need to operate in interrupt context up to IPL_VM.

(Calling cprng_strong in interrupt context does not strike me as a
particularly good idea, so I added an event counter to see whether
anything actually does.)

- Event counters provide operator visibility into when reseeding
happens.

INTEL RDRAND/RDSEED, VIA C3 RNG (CPU_RNG)

- Unwired for now; will be rewired in a subsequent commit.
 1.27 07-Dec-2019  wiz Simplify macro usage.
 1.26 04-Dec-2019  riastradh Update rnd(9) man page to reflect reality since netbsd-7.

- Note rndsource_setcb, RND_FLAG_HASCB, and rnd_add_data_sync.
- Note user's obligation to serialize access to each rndsource.
 1.25 13-Apr-2015  riastradh branches: 1.25.16; 1.25.18;
Update header file references in rnd man pages.
 1.24 10-Aug-2014  wiz Markup simplifications and improvements. Bump date for previous.
 1.23 10-Aug-2014  tls Merge tls-earlyentropy branch into HEAD.
 1.22 12-Jul-2012  pgoyette branches: 1.22.2; 1.22.8;
More updates, since the structure name has changed from rndsourc_element_t
to krndsource_t. While here, add RND_TYPE_ENV to the list of source types.
 1.21 11-Jul-2012  pgoyette Use correct source file reference
 1.20 17-Dec-2011  wiz New sentence, new line. Fix some markup. Bump date for previous.
 1.19 17-Dec-2011  tls Separate /dev/random pseudodevice implemenation from kernel entropy pool
implementation. Rewrite pseudodevice code to use cprng_strong(9).

The new pseudodevice is cloning, so each caller gets bits from a stream
generated with its own key. Users of /dev/urandom get their generators
keyed on a "best effort" basis -- the kernel will rekey generators
whenever the entropy pool hits the high water mark -- while users of
/dev/random get their generators rekeyed every time key-length bits
are output.

The underlying cprng_strong API can use AES-256 or AES-128, but we use
AES-128 because of concerns about related-key attacks on AES-256. This
improves performance (and reduces entropy pool depletion) significantly
for users of /dev/urandom but does cause users of /dev/random to rekey
twice as often.

Also fixes various bugs (including some missing locking and a reseed-counter
overflow in the CTR_DRBG code) found while testing this.

For long reads, this generator is approximately 20 times as fast as the
old generator (dd with bs=64K yields 53MB/sec on 2Ghz Core2 instead of
2.5MB/sec) and also uses a separate mutex per instance so concurrency
is greatly improved. For reads of typical key sizes for modern
cryptosystems (16-32 bytes) performance is about the same as the old
code: a little better for 32 bytes, a little worse for 16 bytes.
 1.18 28-Nov-2011  tls Add cprng(9) manual page, remove arc4random(9) manual page
 1.17 16-Sep-2008  jmcneill branches: 1.17.20;
Mention RND_TYPE_RNG type for rnd_attach_source
 1.16 30-Apr-2008  martin branches: 1.16.2;
Convert TNF licenses to new 2 clause variant
 1.15 26-Dec-2005  perry branches: 1.15.20; 1.15.22;
u_intN_t -> uintN_t
 1.14 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.13 14-Oct-2002  wiz New sentence, new line.
 1.12 19-Aug-2002  wiz It's RND_FLAG_*, not RND_FLAGS*. Noted by Christian Biere in kern/17992.
Also fix an unrelated mdoc error.
 1.11 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.10 26-Dec-2001  wiz Sort sections.
 1.9 10-Sep-2001  wiz Use standard section headers.
 1.8 04-Sep-2001  wiz Boring whitespace fixes.
 1.7 07-Nov-2000  lukem fix up various .Nm abuses:
- keep the case consistent between the actual name and what's referenced.
e.g, if it's `foo', don't use '.Nm Foo' at the start of a sentence.
- remove unnecessary `.Nm foo' after the first occurrence (except for
using `.Nm ""' if there's stuff following, or for the 2nd and so on
occurrences in a SYNOPSIS
- use Sx, Ic, Li, Em, Sq, and Xr as appropriate
 1.6 16-Mar-1999  garbled More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.5 06-Mar-1999  mycroft Fix formatting errors (bad sentence breaks).
 1.4 28-Feb-1999  explorer Update to slightly altered rnd_attach_source() api
 1.3 03-Sep-1998  msaitoh Eliminate extra comma in SEE ALSO section
 1.2 12-Nov-1997  mrg add missing .Nm calls and MLINKS. from spz@serpens.swb.de
 1.1 01-Nov-1997  explorer branches: 1.1.2;
Add rnd.9
 1.1.2.2 12-Nov-1997  mrg pull up from trunk: add missing .Nm calls and MLINKS. from spz@serpens.swb.de
 1.1.2.1 01-Nov-1997  mrg file rnd.9 was added on branch netbsd-1-3 on 1997-11-12 01:04:07 +0000
 1.15.22.1 18-May-2008  yamt sync with head.
 1.15.20.2 05-Oct-2008  mjf Sync with HEAD.
 1.15.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.16.2.1 24-Sep-2008  wrstuden Merge in changes between wrstuden-revivesa-base-2 and
wrstuden-revivesa-base-3.
 1.17.20.2 30-Oct-2012  yamt sync with head
 1.17.20.1 17-Apr-2012  yamt sync with head
 1.22.8.1 07-Apr-2014  tls Be a little more clear and consistent about harvesting entropy from devices:

1) deprecate RND_FLAG_NO_ESTIMATE

2) define RND_FLAG_COLLECT_TIME, RND_FLAG_COLLECT_VALUE

3) define RND_FLAG_ESTIMATE_TIME, RND_FLAG_ESTIMATE_VALUE

4) define RND_FLAG_DEFAULT: RND_FLAG_COLLECT_TIME|
RND_FLAG_COLLECT_VALUE|RND_FLAG_ESTIMATE_TIME

5) Make entropy harvesting from environmental sensors a little more generic
and remove it from individual sensor drivers.

6) Remove individual open-coded delta-estimators for values from a few
places in the tree (uvm, environmental drivers).

7) 0 -> RND_FLAG_DEFAULT, actually gather entropy from various drivers
that had stubbed out code, other minor cleanups.
 1.22.2.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.25.18.1 15-Jul-2020  martin Pull up following revision(s) (requested by riastradh in ticket #1007):

share/man/man9/rnd.9: revision 1.26
share/man/man9/rnd.9: revision 1.27

Update rnd(9) man page to reflect reality since netbsd-7.
- Note rndsource_setcb, RND_FLAG_HASCB, and rnd_add_data_sync.
- Note user's obligation to serialize access to each rndsource.

Simplify macro usage.
 1.25.16.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.31.2.2 31-Dec-2024  snj Pull up following revision(s) (requested by andvar in ticket #1033):
share/man/man9/rnd.9: 1.33
fix typo in rnd(9) documentation.
 1.31.2.1 11-Aug-2023  martin Pull up following revision(s) (requested by riastradh in ticket #319):

sys/dev/pci/ubsec.c: revision 1.64
sys/dev/pci/hifn7751.c: revision 1.82
lib/libc/gen/getentropy.3: revision 1.5
lib/libc/gen/getentropy.3: revision 1.6
share/man/man4/rnd.4: revision 1.41
lib/libc/sys/getrandom.2: revision 1.2
lib/libc/sys/getrandom.2: revision 1.3
share/man/man5/rc.conf.5: revision 1.193
share/man/man7/entropy.7: revision 1.5
share/man/man7/entropy.7: revision 1.6
share/man/man7/entropy.7: revision 1.7
share/man/man7/entropy.7: revision 1.8
etc/security: revision 1.130
share/man/man7/entropy.7: revision 1.9
etc/security: revision 1.131
sys/crypto/cprng_fast/cprng_fast.c: revision 1.19
sys/sys/rndio.h: revision 1.3
tests/lib/libc/sys/t_getrandom.c: revision 1.5
etc/defaults/rc.conf: revision 1.164
etc/defaults/rc.conf: revision 1.165
sys/sys/rndsource.h: revision 1.10
sys/kern/kern_entropy.c: revision 1.62
sys/kern/kern_entropy.c: revision 1.63
sys/kern/kern_entropy.c: revision 1.64
sys/kern/subr_cprng.c: revision 1.44
sys/kern/kern_entropy.c: revision 1.65
sys/kern/kern_clock.c: revision 1.149
sys/dev/pci/viornd.c: revision 1.22
share/man/man9/rnd.9: revision 1.32
sys/kern/subr_prf.c: revision 1.202
sys/sys/rndsource.h: revision 1.8
sys/sys/rndsource.h: revision 1.9
share/man/man7/entropy.7: revision 1.10

1. Reinstate netbsd<=9 entropy estimator to unblock /dev/random, in
parallel with assessment of only confident entropy sources (seed,
HWRNG) for security warnings like sshd keys in motd and daily
insecurity report.

2. Make multiuser boot wait for first /dev/random output soon after
loading a seed and configuring rndctl, so that getentropy(3) meets
its contract starting early at boot without introducing blocking
paths that could cause hangs in init(8) or single-user mode.
Operators can choose to disable this wait in rc.conf.

3. Fix some bugs left over from reducing the global entropy lock from
a spin lock at IPL_VM to an adaptive lock at IPL_SOFTSERIAL.

4. Update man pages.
 1.32.2.1 02-Aug-2025  perseant Sync with HEAD
 1.3 30-Apr-2020  riastradh Rewrite entropy subsystem.

Primary goals:

1. Use cryptography primitives designed and vetted by cryptographers.
2. Be honest about entropy estimation.
3. Propagate full entropy as soon as possible.
4. Simplify the APIs.
5. Reduce overhead of rnd_add_data and cprng_strong.
6. Reduce side channels of HWRNG data and human input sources.
7. Improve visibility of operation with sysctl and event counters.

Caveat: rngtest is no longer used generically for RND_TYPE_RNG
rndsources. Hardware RNG devices should have hardware-specific
health tests. For example, checking for two repeated 256-bit outputs
works to detect AMD's 2019 RDRAND bug. Not all hardware RNGs are
necessarily designed to produce exactly uniform output.

ENTROPY POOL

- A Keccak sponge, with test vectors, replaces the old LFSR/SHA-1
kludge as the cryptographic primitive.

- `Entropy depletion' is available for testing purposes with a sysctl
knob kern.entropy.depletion; otherwise it is disabled, and once the
system reaches full entropy it is assumed to stay there as far as
modern cryptography is concerned.

- No `entropy estimation' based on sample values. Such `entropy
estimation' is a contradiction in terms, dishonest to users, and a
potential source of side channels. It is the responsibility of the
driver author to study the entropy of the process that generates
the samples.

- Per-CPU gathering pools avoid contention on a global queue.

- Entropy is occasionally consolidated into global pool -- as soon as
it's ready, if we've never reached full entropy, and with a rate
limit afterward. Operators can force consolidation now by running
sysctl -w kern.entropy.consolidate=1.

- rndsink(9) API has been replaced by an epoch counter which changes
whenever entropy is consolidated into the global pool.
. Usage: Cache entropy_epoch() when you seed. If entropy_epoch()
has changed when you're about to use whatever you seeded, reseed.
. Epoch is never zero, so initialize cache to 0 if you want to reseed
on first use.
. Epoch is -1 iff we have never reached full entropy -- in other
words, the old rnd_initial_entropy is (entropy_epoch() != -1) --
but it is better if you check for changes rather than for -1, so
that if the system estimated its own entropy incorrectly, entropy
consolidation has the opportunity to prevent future compromise.

- Sysctls and event counters provide operator visibility into what's
happening:
. kern.entropy.needed - bits of entropy short of full entropy
. kern.entropy.pending - bits known to be pending in per-CPU pools,
can be consolidated with sysctl -w kern.entropy.consolidate=1
. kern.entropy.epoch - number of times consolidation has happened,
never 0, and -1 iff we have never reached full entropy

CPRNG_STRONG

- A cprng_strong instance is now a collection of per-CPU NIST
Hash_DRBGs. There are only two in the system: user_cprng for
/dev/urandom and sysctl kern.?random, and kern_cprng for kernel
users which may need to operate in interrupt context up to IPL_VM.

(Calling cprng_strong in interrupt context does not strike me as a
particularly good idea, so I added an event counter to see whether
anything actually does.)

- Event counters provide operator visibility into when reseeding
happens.

INTEL RDRAND/RDSEED, VIA C3 RNG (CPU_RNG)

- Unwired for now; will be rewired in a subsequent commit.
 1.2 24-Jun-2013  riastradh branches: 1.2.6; 1.2.10;
Replace consttime_bcmp/explicit_bzero by consttime_memequal/explicit_memset.

consttime_memequal is the same as the old consttime_bcmp.
explicit_memset is to memset as explicit_bzero was to bcmp.

Passes amd64 release and i386/ALL, but I'm sure I missed some spots,
so please let me know.
 1.1 23-Jun-2013  riastradh Rework rndsink(9) abstraction and adapt arc4random(9) and cprng(9).

rndsink(9):
- Simplify API.
- Simplify locking scheme.
- Add a man page.
- Avoid races in destruction.
- Avoid races in requesting entropy now and scheduling entropy later.

Periodic distribution of entropy to sinks reduces the need for the
last one, but this way we don't need to rely on periodic distribution
(e.g., in a future tickless NetBSD).

rndsinks_lock should probably eventually merge with the rndpool lock,
but we'll put that off for now.

cprng(9):
- Make struct cprng_strong opaque.
- Move rndpseudo.c parts that futz with cprng guts to subr_cprng.c.
- Fix kevent locking. (Is kevent locking documented anywhere?)
- Stub out rump cprng further until we can rumpify rndsink instead.
- Strip code to grovel through struct cprng_strong in fstat.
 1.2.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.10.1 24-Jun-2013  tls file rndsink.9 was added on branch tls-maxphys on 2014-08-20 00:02:37 +0000
 1.2.6.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.6.1 24-Jun-2013  yamt file rndsink.9 was added on branch yamt-pagecache on 2014-05-22 11:37:52 +0000
 1.9 02-Oct-2019  rin Describe roundup2(9) in roundup(9).
Bump date.

Install it also as roundup2(9).
 1.8 01-Jun-2011  jruoho branches: 1.8.44;
Fix a typo.
 1.7 08-Apr-2011  wiz Sort SEE ALSO.
 1.6 08-Apr-2011  jruoho Xref param(3).
 1.5 08-Apr-2011  jruoho Put back the example (removed in the revision 1.3).
 1.4 24-Jan-2011  enami roundup2(x, y) does not assume that x is power of 2, but y is.
 1.3 08-Jun-2010  jruoho branches: 1.3.2;
Remove the unnecessary example.
 1.2 08-Jun-2010  jruoho Xref ilog2(3) and imax(9).
 1.1 04-Mar-2010  jruoho branches: 1.1.2;
Document the counting and rounding macros from <sys/param.h>.
 1.1.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.1.2.1 04-Mar-2010  uebayasi file roundup.9 was added on branch uebayasi-xip on 2010-08-17 06:40:06 +0000
 1.3.2.1 08-Feb-2011  bouyer Sync with HEAD
 1.8.44.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.10 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.9 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.8 20-Jul-2013  wiz Use Mt for email addresses.
 1.7 02-Dec-2010  wiz branches: 1.7.6; 1.7.12; 1.7.16;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.6 19-Oct-2009  rmind Drop 3rd and 4th clauses from David Young's license.
Reviewed and approved by dyoung@ (copyright holder).
 1.5 25-Feb-2006  wiz Improvements from jmc@openbsd.
 1.4 08-Dec-2004  peter Change .Nx 2.1 to .Nx 3.0, because 3.0 will be the next major
release, not 2.1.
 1.3 23-Apr-2004  keihan s/netbsd.org/NetBSD.org/g
 1.2 23-Apr-2004  simonb s/the the/the/ (only in sources that aren't regularly imported from
elsewhere).
 1.1 29-Mar-2004  dyoung Add a manual page to section 9 for rssadapt, the rate-adaptation
framework.
 1.7.16.1 23-Jul-2013  riastradh sync with HEAD
 1.7.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.7.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.15 01-Jun-2016  wiz Use .An -nosplit.
 1.14 01-Jun-2016  pgoyette Use .An for authors. From PR misc/49516
 1.13 17-Sep-2013  wiz Sort sections: consistently put CODE REFERENCES directly before SEE ALSO.
 1.12 14-May-2010  joerg branches: 1.12.6; 1.12.12;
Reorder sections to canonical order.
 1.11 02-May-2008  martin branches: 1.11.12;
Move to 2 clause license
 1.10 16-Apr-2003  wiz branches: 1.10.32; 1.10.34;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.9 14-Oct-2002  wiz New sentence, new line.
 1.8 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.7 04-Sep-2001  wiz Sort SEE ALSO, and a punctuation nit.
 1.6 04-Sep-2001  wiz Boring whitespace fixes.
 1.5 11-Jun-2001  wiz Fix various misspellings of compatible/compatibility.
 1.4 16-Mar-1999  garbled More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.3 03-Sep-1998  msaitoh Eliminate extra comma in SEE ALSO section
 1.2 02-Sep-1998  jeremy Changed references to filesystem paths to use the mdoc filesystem path
macro (.Pa).
 1.1 29-Apr-1998  kml rt_timer documentation
 1.10.34.1 18-May-2008  yamt sync with head.
 1.10.32.1 02-Jun-2008  mjf Sync with HEAD.
 1.11.12.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.12.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.12.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.20 22-Feb-2020  ad Add rw_lock_op(): return either RW_READER or RW_WRITER for a lock that is
known to be held by the caller. Panic if the lock is not held.
 1.19 10-Dec-2018  jdolecek upon further reflection, rw_write_held() actually seems to be safe
for check that the write lock is not currently held by current lwp - current
lwp can't acquire the rwlock even when preempted
 1.18 10-Dec-2018  jdolecek clarify how rw_{write,read,lock}_held() work; rw_write_held() actually
returns non-zero only if current lwp is the owner, the other two don't care
about owner; also warn that functions are not atomic, and thus should only
ever be used to assert that the lock is held
 1.17 12-Nov-2017  riastradh branches: 1.17.2; 1.17.4;
Replace xref mb(9) by xref membar_ops(3).
 1.16 03-Jun-2017  abhinav Fix typo: s/DIANOSTIC/DIAGNOSTIC
 1.15 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.14 22-Nov-2009  mbalmer s/the the/the/
 1.13 23-Mar-2009  wiz Fix typo, sort SEE ALSO.
 1.12 23-Mar-2009  ad Xr lockstat 8
 1.11 23-Mar-2009  ad Add "PERFORMANCE CONSIDERATIONS"
 1.10 30-Apr-2008  martin branches: 1.10.6;
Convert TNF licenses to new 2 clause variant
 1.9 05-Dec-2007  ad branches: 1.9.6; 1.9.8;
Note that rw locks can be taken from a soft interrupt handler.
 1.8 27-Aug-2007  xtraeme branches: 1.8.2;
Valid arguments for rw_enter() and rw_tryenter() are RW_READER/RW_WRITER
not RW_READ/RW_WRITE.

Bump date.
 1.7 08-Aug-2007  pooka krwlock_op_t -> const krw_t
 1.6 02-Feb-2007  wiz Fix Dd argument.
 1.5 02-Feb-2007  ad Add manpage for memory barrier ops. Not enabled in the Makefile yet.
 1.4 23-Dec-2006  wiz Use more markup. Use .Rs/.Re for book citation.
 1.3 23-Dec-2006  wiz Drop trailing whitespace.
 1.2 13-Nov-2006  ad Fix errors.
 1.1 13-Nov-2006  ad Add manual pages for RW locks, mutexes and condition variables. Not
enabled in the Makefile.
 1.8.2.1 09-Jan-2008  matt sync with HEAD
 1.9.8.1 18-May-2008  yamt sync with head.
 1.9.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.10.6.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.17.4.2 08-Apr-2020  martin Merge changes from current as of 20200406
 1.17.4.1 10-Jun-2019  christos Sync with HEAD
 1.17.2.1 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.4 24-Apr-2013  yamt fix prototype
 1.3 24-Apr-2013  yamt fix return value
 1.2 01-Nov-2011  wiz branches: 1.2.2; 1.2.8;
Fix typo, try to improve Nd.
 1.1 01-Nov-2011  yamt document scanc
 1.2.8.1 23-Jun-2013  tls resync from head
 1.2.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.9 09-Apr-2019  sevan Add instructions on how to determine the scheduler in use.
 1.8 02-Dec-2010  wiz branches: 1.8.46;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.7 07-Mar-2010  jruoho branches: 1.7.2;
Use .Bx to write 4.4BSD.
 1.6 06-Mar-2010  wiz Fix Xr and sort SEE ALSO.
 1.5 06-Mar-2010  dsieger Since someone (hi ahoka) added a reference to non-existant sched_m2(9),
add at least a stub now.
 1.4 05-Mar-2010  dsieger Minor wording correction.
 1.3 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.2 15-Jul-2007  wiz branches: 1.2.10; 1.2.12;
Fix Fn abuse. New sentence, new line. End sentence with dot.
 1.1 14-Jul-2007  dsieger Move scheduler(9) to sched_4bsd(9) and sync its contents with reality. Also
add a reference to McKusick et. al., which still contains the best in-depth
description of the 4.4BSD scheduler.
 1.2.12.1 18-May-2008  yamt sync with head.
 1.2.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.7.2.2 07-Mar-2010  jruoho Use .Bx to write 4.4BSD.
 1.7.2.1 07-Mar-2010  jruoho file sched_4bsd.9 was added on branch uebayasi-xip on 2010-03-07 05:37:26 +0000
 1.8.46.1 10-Jun-2019  christos Sync with HEAD
 1.4 09-Apr-2019  sevan Add instructions on how to determine the scheduler in use.
 1.3 02-Dec-2010  wiz branches: 1.3.46;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.2 06-Mar-2010  wiz branches: 1.2.2;
Fix typos and sort SEE ALSO.
 1.1 06-Mar-2010  dsieger Since someone (hi ahoka) added a reference to non-existant sched_m2(9),
add at least a stub now.
 1.2.2.2 06-Mar-2010  wiz Fix typos and sort SEE ALSO.
 1.2.2.1 06-Mar-2010  wiz file sched_m2.9 was added on branch uebayasi-xip on 2010-03-06 22:02:32 +0000
 1.3.46.1 10-Jun-2019  christos Sync with HEAD
 1.8 14-Jul-2007  dsieger Move scheduler(9) to sched_4bsd(9) and sync its contents with reality. Also
add a reference to McKusick et. al., which still contains the best in-depth
description of the 4.4BSD scheduler.
 1.7 23-Dec-2006  wiz New sentence, new line. Fix typo.
 1.6 23-Dec-2006  wiz Fix typo.
 1.5 23-Dec-2006  wiz Drop trailing whitespace.
 1.4 04-Dec-2006  hubertf Update to describe current API (only), and not duplicate that can be
found elsewhere. (And which will appear in the NetBSD Internals Guide
soonish).

Submitted by Daniel Sieger <dsieger@TechFak.Uni-Bielefeld.DE>,
OK'd by martin@ and yamt@
 1.3 16-Apr-2003  wiz branches: 1.3.18;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.2 27-Sep-2002  wiz Begin new sentences on new lines; drop trailing whitespace; some mdoc
and typo fixes.
 1.1 22-Sep-2002  gmcgarry Document the details of the scheduler.
 1.3.18.1 09-Dec-2006  bouyer Pull up following revision(s) (requested by hubertf in ticket #253):
share/man/man9/scheduler.9: revision 1.4
Update to describe current API (only), and not duplicate that can be
found elsewhere. (And which will appear in the NetBSD Internals Guide
soonish).
Submitted by Daniel Sieger <dsieger@TechFak.Uni-Bielefeld.DE>,
OK'd by martin@ and yamt@
 1.33 29-Oct-2024  nat Revert to previous - scsipi_done_once is not necessary.

From riastradh@.
 1.32 28-Oct-2024  nat Document scsipi_done_once(9).

Same as scsipi_done(9) but does not run more commands from the xfer queue. It
is up to the caller of scsipi_done once to check the queue once the transfer
is complete.
 1.31 03-Jul-2017  wiz branches: 1.31.18;
Remove workaround for ancient HTML generation code.
 1.30 20-Nov-2016  wiz Bump date for previous. Use more markup.
 1.29 20-Nov-2016  mlelstv Make scsipi framework MPSAFE.

Data structures are now protected by a per-adapter mutex at IPL_BIO
that is created by the scsibus or atapibus instance when the adapter
is configured.
The enable reference counter and the channel freeze counter which are
currently used by HBA code before the adapter is configured, are made
atomic.
The target drivers are now all tagged as D_MPSAFE.

Almost all HBA drivers still require the kernel lock to present,
so all callbacks into HBA code are still protected by kernel lock
unless the driver is tagged as SCSIPI_ADAPT_MPSAFE.

TODO: refactor sd and cd to use dksubr.
 1.28 29-Jul-2016  palle scsipi(9): Removed duplicate "for"
 1.27 01-Jun-2016  wiz branches: 1.27.2;
Use .An -nosplit.
 1.26 01-Jun-2016  pgoyette Use .An for authors. From PR misc/49516
 1.25 22-Mar-2010  joerg branches: 1.25.2;
Use .In instead of .Aq Pa for header files.
 1.24 19-Oct-2009  bouyer Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
 1.23 04-May-2009  wiz Use Aq instead of \*[Lt]\*[Gt].
 1.22 02-Apr-2009  mjf Continue my crusade - queueing -> queuing
 1.21 12-Mar-2009  joerg .Fa Dv is redundant, only .Dv is effective, so remove the .Fa.
 1.20 27-Feb-2009  mjf Typo and grammar fixes.

- s/though/through/ appropriately.
- autoconf(4) doesn't exist, autoconf(9) is the correct reference.
 1.19 30-Jul-2007  alc branches: 1.19.14; 1.19.18;
kills a few `caddr_t' occurences still present in manpage
 1.18 26-Dec-2005  perry u_intN_t -> uintN_t
 1.17 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.16 05-Oct-2003  bouyer Remove references to University of California from my copyright notices.
 1.15 03-May-2003  wiz DMA, not dma nor Dma.
 1.14 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.13 06-Apr-2003  wiz Fix a typo, from Igor Sobrado in PR 19680.
 1.12 06-Jan-2003  wiz successful with only one l.
 1.11 14-Oct-2002  wiz New sentence, new line.
 1.10 15-May-2002  bouyer Note PERIPH_CAP_DT for DT clocking capability, and that CAP_SYNC/CAP_WIDE*
is for ST clocking only.
 1.9 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.8 26-Dec-2001  wiz Sort sections.
 1.7 28-Nov-2001  wiz No point in using __P in prototype declarations in man pages.
 1.6 14-Oct-2001  bouyer Note that ADAPTER_REQ_GROW_RESOURCES is called from the completion thread.
 1.5 04-Sep-2001  wiz Boring whitespace fixes.
 1.4 18-Jul-2001  bouyer Document scsipi_thread_call_callback() and scsipi_target_detach()
 1.3 21-Jun-2001  wiz Fix typos, punctuation and whitespace.
 1.2 23-May-2001  bouyer Add a note about scsipi_channel_thaw() and command ordering.
 1.1 11-May-2001  bouyer Manual page describing interface between scsipi middle-layer and host bus
adapters.
 1.19.18.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.19.14.2 30-Jul-2007  alc kills a few `caddr_t' occurences still present in manpage
 1.19.14.1 30-Jul-2007  alc file scsipi.9 was added on branch matt-mips64 on 2007-07-30 22:48:48 +0000
 1.25.2.2 22-Mar-2010  joerg Use .In instead of .Aq Pa for header files.
 1.25.2.1 22-Mar-2010  joerg file scsipi.9 was added on branch uebayasi-xip on 2010-03-22 18:58:34 +0000
 1.27.2.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.27.2.1 06-Aug-2016  pgoyette Sync with HEAD
 1.31.18.1 02-Aug-2025  perseant Sync with HEAD
 1.23 26-Jan-2022  andvar remove double t from targeted, add missing r to arbitrary
And fix few more typos along the way in comments and man pages.
 1.22 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.21 18-Mar-2017  riastradh Use `\(em', not `--'.

Refill sentences and tweak wording where appropriate while here.
 1.20 18-Mar-2014  riastradh branches: 1.20.8; 1.20.12;
Merge riastradh-drm2 to HEAD.
 1.19 20-Jul-2013  wiz Use Mt for email addresses.
 1.18 04-Dec-2011  jym branches: 1.18.6; 1.18.10;
Improvements in secmodel(9). Document secmodel_register(9), _deregister(9)
and _eval(9).

Add secmodel_extensions(9), and indicate the new sysctl(7) to let
ordinary users control the CPU affinity (user_set_cpu_affinity).
 1.17 02-Dec-2010  wiz branches: 1.17.6;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.16 10-May-2009  wiz New sentence, new line.
 1.15 10-May-2009  elad Fix securelevel listener function name.
 1.14 15-Mar-2009  joerg Provide -width for tag lists.
XXX The examples need to be reworked to fit the terminal width
 1.13 12-Nov-2008  ad branches: 1.13.2;
Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.12 28-May-2008  snj Fix a typo.
 1.11 13-Apr-2007  plunky branches: 1.11.10; 1.11.12; 1.11.14;
remove 'unknown keyword' error (use -tag or -hyphen, not both)
 1.10 31-Jan-2007  elad Forgot to add notes about secmodel_register() and secmodel_register() in
previous commit -- added now.
 1.9 31-Jan-2007  elad Update instructions on writing a new security model to include some notes
about LKMs and private data in credentials.
 1.8 31-Jan-2007  elad Fix mdoc (Lt -> Gt).
 1.7 09-Jan-2007  elad Remove advertising clause from all of my stuff.
 1.6 19-Sep-2006  elad branches: 1.6.2;
Maintain list of security models we ship with NetBSD in secmodel(9), and
some tiny markup fix in secmodel_bsd44(9).
 1.5 17-Sep-2006  elad Add SYNOPSIS, after consulting wiz@, thanks!
 1.4 17-Sep-2006  elad Update kauth(9) that was forgotten in the big secmodel commit, and some
markup fixes.
 1.3 16-Sep-2006  elad Refer to the secmodel_{bsd44,overlay}(9) man-pages and the examples
directory.

Bump date.
 1.2 10-Sep-2006  wiz Quote HTML characters. Use standard headers. Remove trailing comma.
 1.1 08-Sep-2006  elad First take at security model abstraction.

- Add a few scopes to the kernel: system, network, and machdep.

- Add a few more actions/sub-actions (requests), and start using them as
opposed to the KAUTH_GENERIC_ISSUSER place-holders.

- Introduce a basic set of listeners that implement our "traditional"
security model, called "bsd44". This is the default (and only) model we
have at the moment.

- Update all relevant documentation.

- Add some code and docs to help folks who want to actually use this stuff:

* There's a sample overlay model, sitting on-top of "bsd44", for
fast experimenting with tweaking just a subset of an existing model.

This is pretty cool because it's *really* straightforward to do stuff
you had to use ugly hacks for until now...

* And of course, documentation describing how to do the above for quick
reference, including code samples.

All of these changes were tested for regressions using a Python-based
testsuite that will be (I hope) available soon via pkgsrc. Information
about the tests, and how to write new ones, can be found on:

http://kauth.linbsd.org/kauthwiki

NOTE FOR DEVELOPERS: *PLEASE* don't add any code that does any of the
following:

- Uses a KAUTH_GENERIC_ISSUSER kauth(9) request,
- Checks 'securelevel' directly,
- Checks a uid/gid directly.

(or if you feel you have to, contact me first)

This is still work in progress; It's far from being done, but now it'll
be a lot easier.

Relevant mailing list threads:

http://mail-index.netbsd.org/tech-security/2006/01/25/0011.html
http://mail-index.netbsd.org/tech-security/2006/03/24/0001.html
http://mail-index.netbsd.org/tech-security/2006/04/18/0000.html
http://mail-index.netbsd.org/tech-security/2006/05/15/0000.html
http://mail-index.netbsd.org/tech-security/2006/08/01/0000.html
http://mail-index.netbsd.org/tech-security/2006/08/25/0000.html

Many thanks to YAMAMOTO Takashi, Matt Thomas, and Christos Zoulas for help
stablizing kauth(9).

Full credit for the regression tests, making sure these changes didn't break
anything, goes to Matt Fleming and Jaime Fournier.

Happy birthday Randi! :)
 1.6.2.1 08-Feb-2007  tron Pull up following revision(s) (requested by elad in ticket #401):
share/man/man9/secmodel.9: revision 1.8
Fix mdoc (Lt -> Gt).
 1.11.14.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.11.12.1 04-Jun-2008  yamt sync with head
 1.11.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.13.2.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.17.6.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.17.6.1 17-Apr-2012  yamt sync with head
 1.18.10.1 23-Jul-2013  riastradh sync with HEAD
 1.18.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.20.12.1 21-Apr-2017  bouyer Sync with HEAD
 1.20.8.1 20-Mar-2017  pgoyette Sync with HEAD
 1.17 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.16 20-Jul-2013  wiz Use Mt for email addresses.
 1.15 22-Nov-2012  abs branches: 1.15.2;
Punctuation and (non-)capitalization fixes.

From Bug Hunting.
 1.14 04-Dec-2011  jym branches: 1.14.6;
Improvements in secmodel(9). Document secmodel_register(9), _deregister(9)
and _eval(9).

Add secmodel_extensions(9), and indicate the new sysctl(7) to let
ordinary users control the CPU affinity (user_set_cpu_affinity).
 1.13 02-Oct-2009  elad branches: 1.13.8;
Bump date to today's date (rather than when the changes were made).
 1.12 02-Oct-2009  elad First part of secmodel cleanup and other misc. changes:

- Separate the suser part of the bsd44 secmodel into its own secmodel
and directory, pending even more cleanups. For revision history
purposes, the original location of the files was

src/sys/secmodel/bsd44/secmodel_bsd44_suser.c
src/sys/secmodel/bsd44/suser.h

- Add a man-page for secmodel_suser(9) and update the one for
secmodel_bsd44(9).

- Add a "secmodel" module class and use it. Userland program and
documentation updated.

- Manage secmodel count (nsecmodels) through the module framework.
This eliminates the need for secmodel_{,de}register() calls in
secmodel code.

- Prepare for secmodel modularization by adding relevant module bits.
The secmodels don't allow auto unload. The bsd44 secmodel depends
on the suser and securelevel secmodels. The overlay secmodel depends
on the bsd44 secmodel. As the module class is only cosmetic, and to
prevent ambiguity, the bsd44 and overlay secmodels are prefixed with
"secmodel_".

- Adapt the overlay secmodel to recent changes (mainly vnode scope).

- Stop using link-sets for the sysctl node(s) creation.

- Keep sysctl variables under nodes of their relevant secmodels. In
other words, don't create duplicates for the suser/securelevel
secmodels under the bsd44 secmodel, as the latter is merely used
for "grouping".

- For the suser and securelevel secmodels, "advertise presence" in
relevant sysctl nodes (sysctl.security.models.{suser,securelevel}).

- Get rid of the LKM preprocessor stuff.

- As secmodels are now modules, there's no need for an explicit call
to secmodel_start(); it's handled by the module framework. That
said, the module framework was adjusted to properly load secmodels
early during system startup.

- Adapt rump to changes: Instead of using empty stubs for securelevel,
simply use the suser secmodel. Also replace secmodel_start() with a
call to secmodel_suser_start().

- 5.99.20.

Testing was done on i386 ("release" build). Spearated module_init()
changes were tested on sparc and sparc64 as well by martin@ (thanks!).

Mailing list reference:

http://mail-index.netbsd.org/tech-kern/2009/09/25/msg006135.html
 1.11 21-Nov-2007  elad Make securelevel a "secmodel" of its own.

While it's true that it's part of the traditional 4.4BSD security model,
there may come a time where a different "primary" security model used for
fine-grained privileges (ie., splitting root's responsibilities to various
privileges that can be assigned) may want to still have a securelevel
setting.

Idea from Daniel Carosone:

http://mail-index.netbsd.org/tech-security/2006/08/25/0001.html

The location of the removed files, for reference, was:

src/secmodel/bsd44/secmodel_bsd44_securelevel.c
src/secmodel/bsd44/securelevel.h
 1.10 09-Jan-2007  elad branches: 1.10.4;
Remove advertising clause from all of my stuff.
 1.9 26-Dec-2006  elad Make machdep scope architecture-agnostic by removing all arch-specific
requests and centralizing them all. The result is that some of these
are not used on some architectures, but the documentation was updated
to reflect that.
 1.8 22-Nov-2006  elad branches: 1.8.2;
Add missing items to the securelevel implications list.
Now it is complete.
 1.7 19-Sep-2006  elad Maintain list of security models we ship with NetBSD in secmodel(9), and
some tiny markup fix in secmodel_bsd44(9).
 1.6 17-Sep-2006  elad Add SYNOPSIS, after consulting wiz@, thanks!
 1.5 17-Sep-2006  elad Update kauth(9) that was forgotten in the big secmodel commit, and some
markup fixes.
 1.4 15-Sep-2006  wiz Sort sections, remove superfluous line.
 1.3 15-Sep-2006  elad Remove securelevel-related text from init(8) man-page as they're now in
secmodel_bsd44(9).

I'm not sure I agree with the BUGS section, but for now move it to
secmodel_bsd44(9) as well.
 1.2 15-Sep-2006  wiz Fix a typo, use \- for minus.
 1.1 15-Sep-2006  elad Add a man-page for secmodel_bsd44, describing a bit the concepts of
super-user and securelevel.

The securelevel part was compiled of text from both init(8) and OpenBSD's
securelevel(7), and brought in-sync with what we really do.
 1.8.2.1 06-Jan-2007  bouyer Pull up following revision(s) (requested by elad in ticket #316):
share/examples/secmodel/secmodel_example.c: revision 1.10 via patch
sys/arch/i386/i386/sys_machdep.c: revision 1.79
sys/arch/amd64/amd64/netbsd32_machdep.c: revision 1.31
share/man/man9/secmodel_bsd44.9: revision 1.9
sys/arch/vax/vax/mem.c: revision 1.34 via patch
sys/arch/sh3/sh3/mem.c: revision 1.23 via patch
sys/arch/sh5/sh5/mem.c: revision 1.14 via patch
sys/secmodel/bsd44/secmodel_bsd44_suser.c: revision 1.22 via patch
sys/arch/powerpc/powerpc/mem.c: revision 1.27 via patch
sys/arch/x86/x86/x86_machdep.c: revision 1.5
sys/arch/alpha/alpha/machdep.c: revision 1.291
sys/arch/arm/arm32/mem.c: revision 1.17 via patch
sys/secmodel/bsd44/secmodel_bsd44_securelevel.c: revision 1.20
sys/sys/kauth.h: revision 1.29 via patch
sys/arch/amd64/amd64/sys_machdep.c: revision 1.10
share/man/man9/kauth.9: revision 1.43 via patch
sys/arch/xen/i386/sys_machdep.c: revision 1.10
sys/kern/kern_auth.c: revision 1.35
sys/arch/pc532/pc532/mem.c: revision 1.43 via patch
Make machdep scope architecture-agnostic by removing all arch-specific
requests and centralizing them all. The result is that some of these
are not used on some architectures, but the documentation was updated
to reflect that.
 1.10.4.1 09-Jan-2008  matt sync with HEAD
 1.13.8.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.13.8.2 16-Jan-2013  yamt sync with (a bit old) head
 1.13.8.1 17-Apr-2012  yamt sync with head
 1.14.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.14.6.1 25-Feb-2013  tls resync with head
 1.15.2.1 23-Jul-2013  riastradh sync with HEAD
 1.7 27-Mar-2022  christos Describe the hardlink restrictions.
 1.6 20-Jan-2020  nia when referring to the "user"/"operator"/"network manager": he -> they
 1.5 18-Mar-2014  riastradh branches: 1.5.26;
Merge riastradh-drm2 to HEAD.
 1.4 20-Jul-2013  wiz Use Mt for email addresses.
 1.3 22-Nov-2012  abs branches: 1.3.2;
Punctuation and (non-)capitalization fixes.

From Bug Hunting.
 1.2 09-Dec-2011  njoly branches: 1.2.4; 1.2.8;
Kill extra El macro.
 1.1 04-Dec-2011  jym Improvements in secmodel(9). Document secmodel_register(9), _deregister(9)
and _eval(9).

Add secmodel_extensions(9), and indicate the new sysctl(7) to let
ordinary users control the CPU affinity (user_set_cpu_affinity).
 1.2.8.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.8.1 25-Feb-2013  tls resync with head
 1.2.4.4 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.2.4.3 16-Jan-2013  yamt sync with (a bit old) head
 1.2.4.2 17-Apr-2012  yamt sync with head
 1.2.4.1 09-Dec-2011  yamt file secmodel_extensions.9 was added on branch yamt-pagecache on 2012-04-17 00:05:49 +0000
 1.3.2.1 23-Jul-2013  riastradh sync with HEAD
 1.5.26.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.6 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.5 20-Jul-2013  wiz Use Mt for email addresses.
 1.4 02-Dec-2010  wiz branches: 1.4.6; 1.4.12; 1.4.16;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.3 09-Jan-2007  elad Remove advertising clause from all of my stuff.
 1.2 17-Sep-2006  elad Add SYNOPSIS, after consulting wiz@, thanks!
 1.1 16-Sep-2006  elad Add a man-page for secmodel_overlay(9).
 1.4.16.1 23-Jul-2013  riastradh sync with HEAD
 1.4.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.19 18-May-2019  alnsn Don't mention SVS because it can't be changed anymore.
 1.18 15-Jul-2018  maxv Retire ipkdb entirely. The option was removed from the config files
yesterday.

ok kamil christos
 1.17 27-Apr-2018  wiz branches: 1.17.2;
Fix xrefs.
 1.16 26-Apr-2018  alnsn Add SVS. It may not be disabled at securelevel 1 and above.
 1.15 18-Mar-2014  riastradh branches: 1.15.18; 1.15.24;
Merge riastradh-drm2 to HEAD.
 1.14 20-Jul-2013  wiz Use Mt for email addresses.
 1.13 22-Nov-2012  abs branches: 1.13.2;
Punctuation and (non-)capitalization fixes.

From Bug Hunting.
 1.12 17-Jan-2012  cegger branches: 1.12.6;
fix secmodel implementation of CPU_UCODE.
ok wiz@ for the manpages
ok elad@
 1.11 04-Dec-2011  jym Improvements in secmodel(9). Document secmodel_register(9), _deregister(9)
and _eval(9).

Add secmodel_extensions(9), and indicate the new sysctl(7) to let
ordinary users control the CPU affinity (user_set_cpu_affinity).
 1.10 22-Dec-2010  wiz branches: 1.10.6;
Improve wording.
 1.9 21-Dec-2010  jruoho Note vm.user_va0_disable.
 1.8 14-Dec-2010  jruoho Note specifically that kernel modules can be loaded at securelevel 0.
In addition, some markup improvements.
 1.7 02-Oct-2009  elad Centralize documentation about exported sysctl variables in the relevant
secmodel's man-page.
 1.6 25-Jul-2009  mbalmer Document recent gpio(4) changes and introduce a new config file for GPIO.
Integrate with the startup scripts in /etc/rc.d. Introduce new variable
"gpio" for /etc/rc.conf.
 1.5 11-Nov-2008  reed Fix Document Title and one line description.
 1.4 10-Nov-2008  elad Add Hugh Graham (hugh@openbsd.org) to the copyright notice.

This man-page is based on OpenBSD's securelevel(7), and the copyright was
not reflecting that (probably due to a copy/paste error on my part; I can't
remember).

Noticed by Jeremy C. Reed, thanks!
 1.3 28-May-2008  snj Remove trailing whitespace, correct a spelling error, and fix an xref.
 1.2 31-Dec-2007  ad branches: 1.2.2; 1.2.6; 1.2.8; 1.2.10;
Remove systrace. Ok core@.
 1.1 21-Nov-2007  elad Make securelevel a "secmodel" of its own.

While it's true that it's part of the traditional 4.4BSD security model,
there may come a time where a different "primary" security model used for
fine-grained privileges (ie., splitting root's responsibilities to various
privileges that can be assigned) may want to still have a securelevel
setting.

Idea from Daniel Carosone:

http://mail-index.netbsd.org/tech-security/2006/08/25/0001.html

The location of the removed files, for reference, was:

src/secmodel/bsd44/secmodel_bsd44_securelevel.c
src/secmodel/bsd44/securelevel.h
 1.2.10.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.2.8.1 04-Jun-2008  yamt sync with head
 1.2.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.2.2.2 09-Jan-2008  matt sync with HEAD
 1.2.2.1 31-Dec-2007  matt file secmodel_securelevel.9 was added on branch matt-armv6 on 2008-01-09 01:39:22 +0000
 1.10.6.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.10.6.2 16-Jan-2013  yamt sync with (a bit old) head
 1.10.6.1 17-Apr-2012  yamt sync with head
 1.12.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.12.6.1 25-Feb-2013  tls resync with head
 1.13.2.1 23-Jul-2013  riastradh sync with HEAD
 1.15.24.2 28-Jul-2018  pgoyette Sync with HEAD
 1.15.24.1 02-May-2018  pgoyette Synch with HEAD
 1.15.18.1 05-May-2018  martin Pull up following revision(s) (requested by alnsn in ticket #790):

share/man/man9/secmodel_securelevel.9: revision 1.16
sys/secmodel/suser/secmodel_suser.c: revision 1.44
sys/secmodel/securelevel/secmodel_securelevel.c: revision 1.31
sys/sys/kauth.h: revision 1.76
sys/arch/x86/x86/svs.c: revision 1.18

Add KAUTH_MACHDEP_SVS_DISABLE and add support to secmodel_securelevel(9).
Disabling SVS is denied at securelevel 1 and above.

Add SVS. It may not be disabled at securelevel 1 and above.
 1.17.2.1 10-Jun-2019  christos Sync with HEAD
 1.7 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.6 20-Jul-2013  wiz Use Mt for email addresses.
 1.5 04-Dec-2011  jym branches: 1.5.6; 1.5.10;
Improvements in secmodel(9). Document secmodel_register(9), _deregister(9)
and _eval(9).

Add secmodel_extensions(9), and indicate the new sysctl(7) to let
ordinary users control the CPU affinity (user_set_cpu_affinity).
 1.4 03-Oct-2009  wiz branches: 1.4.8;
Drop trailing whitespace.
 1.3 02-Oct-2009  elad Centralize documentation about exported sysctl variables in the relevant
secmodel's man-page.
 1.2 02-Oct-2009  elad Bump date to today's date (rather than when the changes were made).
 1.1 02-Oct-2009  elad First part of secmodel cleanup and other misc. changes:

- Separate the suser part of the bsd44 secmodel into its own secmodel
and directory, pending even more cleanups. For revision history
purposes, the original location of the files was

src/sys/secmodel/bsd44/secmodel_bsd44_suser.c
src/sys/secmodel/bsd44/suser.h

- Add a man-page for secmodel_suser(9) and update the one for
secmodel_bsd44(9).

- Add a "secmodel" module class and use it. Userland program and
documentation updated.

- Manage secmodel count (nsecmodels) through the module framework.
This eliminates the need for secmodel_{,de}register() calls in
secmodel code.

- Prepare for secmodel modularization by adding relevant module bits.
The secmodels don't allow auto unload. The bsd44 secmodel depends
on the suser and securelevel secmodels. The overlay secmodel depends
on the bsd44 secmodel. As the module class is only cosmetic, and to
prevent ambiguity, the bsd44 and overlay secmodels are prefixed with
"secmodel_".

- Adapt the overlay secmodel to recent changes (mainly vnode scope).

- Stop using link-sets for the sysctl node(s) creation.

- Keep sysctl variables under nodes of their relevant secmodels. In
other words, don't create duplicates for the suser/securelevel
secmodels under the bsd44 secmodel, as the latter is merely used
for "grouping".

- For the suser and securelevel secmodels, "advertise presence" in
relevant sysctl nodes (sysctl.security.models.{suser,securelevel}).

- Get rid of the LKM preprocessor stuff.

- As secmodels are now modules, there's no need for an explicit call
to secmodel_start(); it's handled by the module framework. That
said, the module framework was adjusted to properly load secmodels
early during system startup.

- Adapt rump to changes: Instead of using empty stubs for securelevel,
simply use the suser secmodel. Also replace secmodel_start() with a
call to secmodel_suser_start().

- 5.99.20.

Testing was done on i386 ("release" build). Spearated module_init()
changes were tested on sparc and sparc64 as well by martin@ (thanks!).

Mailing list reference:

http://mail-index.netbsd.org/tech-kern/2009/09/25/msg006135.html
 1.4.8.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4.8.1 17-Apr-2012  yamt sync with head
 1.5.10.1 23-Jul-2013  riastradh sync with HEAD
 1.5.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.4 05-Apr-2010  joerg branches: 1.4.2;
No trailing whitespace
 1.3 13-May-2008  tnn Change a couple of stray selwakeup references to selnotify.
Also fix typo.
 1.2 25-Mar-2008  xtraeme branches: 1.2.2; 1.2.4; 1.2.6;
The select and poll subsystems are now implemented in sys_select.c
and not sys_generic.c.
 1.1 02-Mar-2008  rmind branches: 1.1.2; 1.1.4;
Rename selrecord(9) man page to select(9). Sync selnotify() with reality,
remove selwakeup(), add and explain the usage of selinit() and seldestroy().

Reviewed by <ad>.
 1.1.4.2 24-Mar-2008  keiichi sync with head.
 1.1.4.1 02-Mar-2008  keiichi file select.9 was added on branch keiichi-mipv6 on 2008-03-24 07:14:50 +0000
 1.1.2.2 23-Mar-2008  matt sync with HEAD
 1.1.2.1 02-Mar-2008  matt file select.9 was added on branch matt-armv6 on 2008-03-23 00:45:37 +0000
 1.2.6.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.2.4.1 18-May-2008  yamt sync with head.
 1.2.2.2 02-Jun-2008  mjf Sync with HEAD.
 1.2.2.1 25-Mar-2008  mjf file select.9 was added on branch mjf-devfs2 on 2008-06-02 13:21:42 +0000
 1.4.2.2 05-Apr-2010  joerg No trailing whitespace
 1.4.2.1 05-Apr-2010  joerg file select.9 was added on branch uebayasi-xip on 2010-04-05 19:36:30 +0000
 1.9 02-Mar-2008  rmind Rename selrecord(9) man page to select(9). Sync selnotify() with reality,
remove selwakeup(), add and explain the usage of selinit() and seldestroy().

Reviewed by <ad>.
 1.8 14-Feb-2008  ad branches: 1.8.2;
- Clarify how this works.
- Note the locking rules.
 1.7 14-Feb-2008  ad - Remove pointless AUTHORS section.
- Remove implementation details.
 1.6 20-Dec-2005  rpaulo branches: 1.6.12;
Adapt man pages to ktrace-lwp.
 1.5 28-Apr-2005  riz Tyop fix: s/selwakup/selwakeup/
Approved by jmcneill.
 1.4 18-Feb-2004  wiz Remove superfluous double quotes, add back a comma
in an enumeration, and remove an article.
 1.3 18-Feb-2004  yamt - document selnotify.
- add ref. to knote(9).
 1.2 16-Nov-2003  wiz Remove superfluous double quotes; restrict to 80 chars/line;
add some commas.
 1.1 16-Nov-2003  yamt a manpage of selrecord and selwakeup. from FreeBSD.
 1.6.12.1 23-Mar-2008  matt sync with HEAD
 1.8.2.1 24-Mar-2008  keiichi sync with head.
 1.3 04-Dec-2012  christos more xref.
 1.2 02-Mar-2010  jruoho branches: 1.2.2; 1.2.8; 1.2.14;
Reference bitstring(3).
 1.1 01-Mar-2010  jruoho Document the bitmap related macros in <sys/param.h>.
 1.2.14.1 25-Feb-2013  tls resync with head
 1.2.8.1 16-Jan-2013  yamt sync with (a bit old) head
 1.2.2.2 02-Mar-2010  jruoho Reference bitstring(3).
 1.2.2.1 02-Mar-2010  jruoho file setbit.9 was added on branch uebayasi-xip on 2010-03-02 06:37:12 +0000
 1.4 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.3 16-Apr-2003  wiz branches: 1.3.32; 1.3.34;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.2 14-Oct-2002  wiz New sentence, new line.
 1.1 25-May-2002  gmcgarry Document some mandatory machine-dependent interfaces. Addresses PR16272.
 1.3.34.1 18-May-2008  yamt sync with head.
 1.3.32.1 02-Jun-2008  mjf Sync with HEAD.
 1.9 14-Jul-2007  dsieger Remove obsolete setrunqueue(9) manpage.

ok by <ad>.
 1.8 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.7 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.6 27-Sep-2002  wiz Begin new sentences on new lines; drop trailing whitespace; some mdoc
and typo fixes.
 1.5 22-Sep-2002  gmcgarry Document the details of the scheduler.
 1.4 05-Jul-2002  wiz Nitpicks in last.
 1.3 05-Jul-2002  nathanw Note that these functions must be called with the scheduler lock held.
 1.2 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.1 05-Jul-2001  nathanw Basic man page for setrunqueue() and remrunqueue(). Why not? They're easy.
 1.11 07-Sep-2024  rillig man: use https URLs for www.NetBSD.org
 1.10 15-May-2009  wiz branches: 1.10.60;
Use Nm instead of Xr to itself.
 1.9 14-May-2009  dyoung Mention that these are deprecated APIs. Bump date.
 1.8 14-Feb-2003  grant The correct capitalisation of 'NetBSD.org' is (you
guessed it) 'NetBSD.org'.

some mdoc fixes.
 1.7 14-Oct-2002  wiz New sentence, new line.
 1.6 04-Sep-2001  wiz Boring whitespace fixes.
 1.5 14-Jun-2000  cgd sweep of my licenses (userland files w/o only my copyright) for
consistency. (no functional changes)
 1.4 14-Jun-2000  cgd fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well. No functional changes.
 1.3 06-Apr-1999  pk branches: 1.3.6;
1, 2, 3 and.. 4!
 1.2 16-Mar-1999  garbled branches: 1.2.2;
More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.1 25-Nov-1995  perry Added first section 9 man pages -- initial pages and Makefile from cgd
Section 9 man pages document the internals of the kernel.
 1.2.2.1 07-Apr-1999  pk Pull up from trunk: copyright text warts.
 1.3.6.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.10.60.1 02-Aug-2025  perseant Sync with HEAD
 1.24 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.23 29-Apr-2010  jruoho Update this, mechanically, to match the new functions and their prototypes.

XXX: Someone more familiar with the code should proofread the page and
evaluate how well it reflects the reality in 2010.
 1.22 29-Apr-2010  jruoho Remove gsignal(9) and kgsignal(). Add links for kpgsignal(9) and kpsignal(9).
 1.21 29-Apr-2010  jruoho branches: 1.21.2;
Only use complete prototypes in the SYNOPSIS.
 1.20 29-Apr-2010  jruoho Remove sched_psignal(9) and sigmasked(9). From Tetsuya Isaki in PR #40125.
 1.19 04-May-2009  wiz Prepare for HTML output.
 1.18 07-Dec-2008  isaki branches: 1.18.2;
Fix two typos in function name.
 1.17 31-May-2008  enami branches: 1.17.2;
No comma is necessary for the last .Nm entry.
 1.16 30-Apr-2008  martin branches: 1.16.2;
Convert TNF licenses to new 2 clause variant
 1.15 14-Jul-2007  ad branches: 1.15.10; 1.15.12;
- kcont was removed.
- Replace some references to tsleep.
 1.14 20-Jan-2006  wiz Remove superfluous .Pp.
 1.13 16-Jan-2006  yamt add a missing .Ed
 1.12 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.11 15-Dec-2004  wiz Drop trailing whitespace.
 1.10 08-Jan-2004  wiz Bump date for previous; break line
so that only relevant parts are marked up.
 1.9 07-Jan-2004  christos explain how trapsignal is used in the trap code.
 1.8 25-Sep-2003  christos constification notes.
 1.7 06-Sep-2003  wiz Mark up NULL; whitespace nits.
 1.6 06-Sep-2003  christos clarify versioning scheme, and update for SA_SIGINFO.
 1.5 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.4 14-Oct-2002  wiz New sentence, new line.
 1.3 28-Jul-2002  manu Make killproc really public, and while we are there, constify.
 1.2 09-Jul-2002  wiz ispell
 1.1 09-Jul-2002  thorpej Overhaul documentation of the kernel signal facilities. Some text
liberally borrowed from Paul's psignal(9) manpage.

More work can be done here, but there's more here than before, at least.
 1.15.12.2 04-Jun-2008  yamt sync with head
 1.15.12.1 18-May-2008  yamt sync with head.
 1.15.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.16.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.17.2.1 13-Dec-2008  bouyer Pull up following revision(s) (requested by isaki in ticket #179):
share/man/man9/signal.9: revision 1.18
Fix two typos in function name.
 1.18.2.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.21.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.21.2.1 29-Apr-2010  uebayasi file signal.9 was added on branch uebayasi-xip on 2010-08-17 06:40:06 +0000
 1.2 01-Nov-2011  wiz Casing.
 1.1 01-Nov-2011  yamt document skpc
 1.22 29-Sep-2002  wiz Rename sleep.9 to ltsleep.9, since sleep(9) is not there any more.
 1.21 29-Sep-2002  wiz Complete removal of sleep(9) references, update copyright and date.
 1.20 29-Sep-2002  jdolecek sleep(9) was nuked in rev. 1.95 of <sys/proc.h> on 2000/05/27; remove it
from manpage too
 1.19 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.18 26-Dec-2001  wiz Sort sections.
 1.17 07-Oct-2001  jdolecek xref hz(9), remove dot after lock(9)
 1.16 04-Sep-2001  wiz Boring whitespace fixes.
 1.15 01-Jul-2001  gmcgarry Fix terminology in discussion on locks. Expand history.
Add cross-references.
 1.14 29-Jun-2001  jdolecek Add #include <sys/proc.h> to SYNOPSIS, note tsleep() is a macro.
Fixes kern/10770.
 1.13 21-Jun-2001  wiz Fix typos, punctuation and whitespace.
 1.12 27-Apr-2001  jdolecek Document ltsleep(9). Feel free to improve if you wish.
 1.11 24-Mar-1999  mycroft Remove blank lines.
 1.10 16-Mar-1999  garbled More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.9 06-Mar-1999  mycroft Fix formatting errors (bad sentence breaks).
 1.8 16-Jan-1999  msaitoh Add "const"
 1.7 05-Nov-1997  mrg add .Nm entries for copies made with MLINKS. this allows 'makewhatis' to
properly capture all information about what functions, programs, etc., the
man page documents.
 1.6 08-Oct-1997  jtc Fix tipo inherited from old version of TNF copyright form.
s/REGENTS/FOUNDATION/.
 1.5 21-Sep-1997  is tlseep -> tsleep
 1.4 06-Feb-1997  mikel fix swapped tsleep() arguments; PR misc/3192.
also some minor edits.
 1.3 18-Nov-1996  pk Correct two typos.
 1.2 30-Oct-1996  lukem parameter names in (t)sleep() for identifier should be 'void *ident'
not 'void *indent' for consistency with wakeup() and with its use.
 1.1 23-Jun-1996  pk Add tsleep(9)/sleep(9)/wakeup(9)
 1.11 04-Jan-2018  christos Add a new sockopt member to keep track of the actual size of the option
that should be returned to the caller in getsockopt(2).

(Tom Ivar Helbekkmo)
 1.10 16-Jan-2017  njoly branches: 1.10.4;
Last Nm macro line must not end with a comma.
 1.9 16-Jan-2017  njoly Add missing comma in NAME section.
 1.8 02-Dec-2010  wiz branches: 1.8.28; 1.8.32;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.7 04-Sep-2009  plunky confusing pooka.
manpage improvements,
sunshine returns.
 1.6 03-Aug-2009  rmind Mention kmem(9).
 1.5 28-Oct-2008  wiz Use .Er for error codes.
 1.4 28-Oct-2008  plunky clarify allocation/error return of sockopt_set()
 1.3 13-Oct-2008  wiz Bump date for previous, use Fx for FreeBSD.
 1.2 12-Oct-2008  plunky update to clarify that
sockopt_init() may sleep
sockopt_set() will not sleep
 1.1 06-Aug-2008  plunky branches: 1.1.2; 1.1.4;
add man page for sockopt(9)
 1.1.4.2 05-Oct-2008  mjf Sync with HEAD.
 1.1.4.1 06-Aug-2008  mjf file sockopt.9 was added on branch mjf-devfs2 on 2008-10-05 20:11:23 +0000
 1.1.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.1.2.1 06-Aug-2008  wrstuden file sockopt.9 was added on branch wrstuden-revivesa on 2008-09-18 04:38:09 +0000
 1.8.32.1 21-Apr-2017  bouyer Sync with HEAD
 1.8.28.1 20-Mar-2017  pgoyette Sync with HEAD
 1.10.4.1 18-Mar-2018  martin Pull up following revision(s) (requested by tih in ticket #639):
sys/kern/uipc_socket.c: revision 1.258
sys/kern/uipc_socket.c: revision 1.259
sys/netinet/ip_input.c: revision 1.364 (via patch)
sys/netinet/ip_output.c: revision 1.289
sys/netinet/in.h: revision 1.102
sys/netinet/in_pcb.c: revision 1.181
share/man/man9/sockopt.9: revision 1.11
sys/netinet/in_pcb.h: revision 1.65
sys/sys/socketvar.h: revision 1.146
sys/kern/uipc_syscalls.c: revision 1.189
sys/netinet/ip_output.c: revision 1.290
share/man/man4/ip.4: revision 1.41
share/man/man4/ip.4: revision 1.42
sys/kern/uipc_syscalls.c: revision 1.190

pass valsize for getsockopt like we do for setsockopt
make sure that we have enough space, don't require the exact size
(Tom Ivar Helbekkmo)

1) "#define ipi_spec_dst ipi_addr" in <netinet/in.h>
2) Change the IP_RECVPKTINFO option to control the generation of
IP_PKTINFO control messages, the way it's done in Solaris.
3) Remove the superfluous IP_RECVPKTINFO control message.
4) Change the IP_PKTINFO option to do different things depending on
the parameter it's supplied with:
- If it's sizeof(int), assume it's being used as in Linux:
- If it's non-zero, turn on the IP_RECVPKTINFO option.
- If it's zero, turn off the IP_RECVPKTINFO option.
- If it's sizeof(struct in_pktinfo), assume it's being used as in
Solaris, to set a default for the source interface and/or
source address for outgoing packets on the socket.
5) Return what Linux or Solaris compatible code expects, depending
on data size, and just added a fallback to a Linux (and current NetBSD)
compatible value if the size is unknown (as it is now), or,
in the future, if the calling application specifies a receiving
buffer that doesn't match either data item.

From: Tom Ivar Helbekkmo

new sentence-new line

Remove comment now that the getsockopt code passes the size.

Add a new sockopt member to keep track of the actual size of the option
that should be returned to the caller in getsockopt(2).
(Tom Ivar Helbekkmo)
 1.23 07-Sep-2024  rillig man: use https URLs for www.NetBSD.org
 1.22 08-Feb-2018  dholland branches: 1.22.16;
Typo fixes from Eitan Adler.
 1.21 30-Jun-2011  wiz dependant -> dependent
 1.20 03-Aug-2009  rmind Relate interfaces by updating "see also" section.
 1.19 18-May-2009  wiz Drop trailing whitespace. Use Dv.
 1.18 06-Oct-2008  pooka int -> u_int per source
 1.17 02-May-2008  martin Move TNF licenses to 2 clause form
 1.16 21-Apr-2008  ad Fix typo, PR misc/38474.
 1.15 06-Dec-2007  xtraeme branches: 1.15.6; 1.15.8;
typo: futher -> further
 1.14 05-Dec-2007  ad Minor corrections.
 1.13 05-Dec-2007  ad Sync with reality and supply a large dose of hot air.
 1.12 16-Apr-2003  wiz branches: 1.12.24;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.11 14-Feb-2003  grant The correct capitalisation of 'NetBSD.org' is (you
guessed it) 'NetBSD.org'.

some mdoc fixes.
 1.10 14-Oct-2002  wiz New sentence, new line.
 1.9 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.8 26-Dec-2001  wiz Sort sections.
 1.7 10-Sep-2001  wiz Use standard section headers.
 1.6 04-Sep-2001  wiz Boring whitespace fixes.
 1.5 21-Jan-2001  augustss Update to reflect reality.
 1.4 18-Jan-2001  augustss Update documentation to reflact new location and name of the symbol
defined if a port has generic soft interrupts.
 1.3 13-Jun-2000  cgd branches: 1.3.4;
Replace my personal attribution string ("This product includes software
developed by Christopher G. Demetriou for the NetBSD Project.") with
a generic NetBSD one ("This product includes software developed for the
NetBSD Project. See http://www.netbsd.org/ for information about NetBSD.")
so that this same set of terms can be used by others if they so desire.
(Eventually i'll be converting more/all of my code.)
 1.2 02-Jun-2000  matt Note that softintr_schedule can safely be called multiple times
before the callback is invoked.
 1.1 31-May-2000  cgd documentation of the NetBSD machine-independent software interrupt
framework, dredged out of the January, 1997 tech-kern e-mail archives.
 1.3.4.2 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.3.4.1 13-Jun-2000  minoura file softintr.9 was added on branch minoura-xpg4dl on 2000-06-22 16:17:49 +0000
 1.12.24.1 09-Jan-2008  matt sync with HEAD
 1.15.8.1 18-May-2008  yamt sync with head.
 1.15.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.22.16.1 02-Aug-2025  perseant Sync with HEAD
 1.7 15-Jun-2018  pgoyette branches: 1.7.2;
Add note that there is no way to delete an individual datum from a
container.
 1.6 15-Jun-2018  pgoyette Bump date for previous changes
 1.5 15-Jun-2018  pgoyette Improve synopsis, remove unnecessary .Nm markup
 1.4 15-Jun-2018  uwe Fix pasto in .Dt title
 1.3 15-Jun-2018  wiz Whitespace nit.
 1.2 03-Jun-2018  pgoyette Clean-up, improve wording, and use terminology from the implementation
(notably, value --> datum).
 1.1 03-Jun-2018  pgoyette Make a first pass at documenting the specificdata functionality.

XXX This is just a first pass, and I've probably made a ton of mistakes
XXX while reading the code! Updates and corrections greatly appreciated.
 1.7.2.2 25-Jun-2018  pgoyette Sync with HEAD
 1.7.2.1 15-Jun-2018  pgoyette file specificdata.9 was added on branch pgoyette-compat on 2018-06-25 07:25:37 +0000
 1.3 10-Oct-2025  brad Add another convenience wrapper function to the SPI framework.

spi_sendv(spi_handle_t sh, const struct iovec *iov,
int iovcnt)

Takes a iovec of buffers and sends them as one transaction down the
SPI bus.

There exists devices that will not handle sending the register that is
to be written to as one transaction and the data as a second
transaction. That is, use one spi_send() to send the register and a
second spi_send() to send the data. Those devices require a single
transaction with both parts in it.
 1.2 23-Feb-2019  wiz branches: 1.2.2;
New sentence, new line. Add missing Nd. Remove superfluous Rs.
 1.1 23-Feb-2019  mlelstv Add userland driver to spi framework.

Previously spi would configure the controller to use the lowest speed of
all connected devices since the kernel started and to fail attempted mode
changes. This is now improved to keep individual modes and speeds for each
slave and to reconfigure the controller as necessary for each transfer.

Added man page for spi(9).
 1.2.2.2 10-Jun-2019  christos Sync with HEAD
 1.2.2.1 23-Feb-2019  christos file spi.9 was added on branch phil-wifi on 2019-06-10 22:05:41 +0000
 1.42 07-Apr-2020  jdolecek bring the section on automatic acquisition of kernel_lock up-to-date
 1.41 06-Apr-2017  pgoyette branches: 1.41.12;
Expand on previous, and note that splnet() and spltty() are also synonyms
for splvm().
 1.40 06-Apr-2017  pgoyette Document splbio() as a deprecated synonym for splvm().
 1.39 16-Feb-2010  rmind branches: 1.39.2; 1.39.30; 1.39.34;
kpreempt(9): add a note when kernel preemption is disabled/deferred.
Sprinkle cross-links, bump dates.
 1.38 07-Feb-2010  wiz Xref i386/splraise.9 and bump date for previous.
 1.37 06-Feb-2010  dyoung Move MD spllower(9) and splraise(9) doco from the MI spl(9) to an i386
manual page.
 1.36 17-Nov-2009  wiz Remove trailing space. Remove unnecessary Pp before Sh.
 1.35 17-Nov-2009  dyoung Describe spllower(9) and splraise(9).
 1.34 18-May-2009  wiz Fix xrefs. Drop trailing whitespace. Use Dq.
 1.33 05-Mar-2009  msaitoh Fix typo(s/interupt/interrupt/)
 1.32 13-Feb-2008  skrll branches: 1.32.12;
Fix some pastos.
 1.31 04-Jan-2008  xtraeme Typo: muliprocessor -> multiprocessor
 1.30 06-Dec-2007  xtraeme Typo: indepenent -> independent
 1.29 06-Dec-2007  xtraeme Typo: higest -> highest
 1.28 05-Dec-2007  ad sys/param.h ???
 1.27 05-Dec-2007  ad Sync with reality.
 1.26 17-Feb-2007  wiz branches: 1.26.4;
Fix Dd argument.
 1.25 11-Feb-2007  ad Note that device drivers should not (in general) use these interfaces.
 1.24 23-Sep-2006  wiz Bump date for previous.
 1.23 23-Sep-2006  jmcneill PR# 34288: No splaudio() in man 9 spl, from Stephane Witzmann.
 1.22 31-Oct-2004  yamt a header actually used for spl functions is sys/param.h, not machine/intr.h.
 1.21 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.20 14-Oct-2002  wiz New sentence, new line.
 1.19 25-Sep-2002  wiz Use .Nm instead of Xref to ourselves.
 1.18 22-Sep-2002  mycroft Add a paragraph about splsoftnet()/splnet(), which often seems to confuse
people coming from FreeBSD.
 1.17 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.16 26-Dec-2001  wiz Drop some .Pps.
 1.15 04-Sep-2001  wiz Boring whitespace fixes.
 1.14 07-May-2001  jdolecek Move splched() prototype under splserial() in SYNOPSYS, so that the
entries are sorted by priority correctly.
 1.13 18-Apr-2001  jdolecek add splvm() to NAME section
 1.12 14-Apr-2001  thorpej Update to reflect reality.
 1.11 22-Aug-2000  thorpej Document spllock().
 1.10 22-Aug-2000  enami Fix two more typos.
 1.9 21-Aug-2000  thorpej i before e except after c ...
 1.8 21-Aug-2000  thorpej Inject more truth into this document.
 1.7 08-Jun-2000  cgd IPL-lowering functions are now defined to return `void.' See also my
post to tech-kern about the issue. No ports updated yet; they should
be updated as time permits.
 1.6 27-Mar-2000  soda branches: 1.6.2;
semantics of splclock() were changed, and spllowersoftclock() was introduced
on the following commit (thanks Frank van der Linden, Steve Woodford
and Alistair G. Crooks for english correction of HISTORY section):

date: 1999/08/05 18:08:10; author: thorpej; state: Exp; lines: +3 -2

Change the semantics of splsoftclock() to be like other spl*() functions,
that is priority is rasied. Add a new spllowersoftclock() to provide the
atomic drop-to-softclock semantics that the old splsoftclock() provided,
and update calls accordingly.

This fixes a problem with using the "rnd" pseudo-device from within
interrupt context to extract random data (e.g. from within the softnet
interrupt) where doing so would incorrectly unblock interrupts (causing
all sorts of lossage).
 1.5 16-Mar-1999  garbled More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.4 20-Nov-1997  mikel spl*() functions block interrupts of lesser or equal priority, not
higher priority. do some copy editing while I'm here.
 1.3 11-Nov-1997  mrg add missing .Nm sections
 1.2 10-Oct-1997  mikel branches: 1.2.2;
remove advertising clause from license
 1.1 11-Mar-1997  mikel add incomplete spl(9); realphabetize Makefile.
 1.2.2.2 26-Nov-1997  mellon Pull rev 1.4 up from trunk (mikel)
 1.2.2.1 11-Nov-1997  mrg pull up from trunk: add missing .Nm sections
 1.6.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.26.4.2 23-Mar-2008  matt sync with HEAD
 1.26.4.1 09-Jan-2008  matt sync with HEAD
 1.32.12.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.39.34.1 21-Apr-2017  bouyer Sync with HEAD
 1.39.30.1 26-Apr-2017  pgoyette Sync with HEAD
 1.39.2.2 16-Feb-2010  rmind kpreempt(9): add a note when kernel preemption is disabled/deferred.
Sprinkle cross-links, bump dates.
 1.39.2.1 16-Feb-2010  rmind file spl.9 was added on branch uebayasi-xip on 2010-02-16 19:21:31 +0000
 1.41.12.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.9 08-Feb-2018  dholland Typo fixes from Eitan Adler.
 1.8 09-Jul-2015  wiz Bump date for previous.
 1.7 09-Jul-2015  kamil Set proper include file: <sys/intr.h>

The <sys/param.h> header has nothing to do (directly or indirectly) with
splraiseipl(9). This issue might be hidden for kernel modules, as
<sys/module.h> includes <sys/mutex.h>, which in turn pulls in <sys/intr.h>.

Reviewed by <msaitoh>
 1.6 05-Dec-2007  ad - See the spl(9) manual page for a description of interrupt priority levels.
- splbio -> splvm
 1.5 17-Feb-2007  wiz branches: 1.5.4;
Fix Dd argument.
 1.4 11-Feb-2007  ad Note that device drivers should not (in general) use these interfaces.
 1.3 23-Dec-2006  wiz Drop trailing dot in Nd.
 1.2 21-Dec-2006  yamt fix a typo.
 1.1 21-Dec-2006  yamt document splraiseipl and makeiplcookie.
 1.5.4.1 09-Jan-2008  matt sync with HEAD
 1.11 06-Apr-2019  thorpej Overhaul the API used to fetch and store individual memory cells in
userspace. The old fetch(9) and store(9) APIs (fubyte(), fuword(),
subyte(), suword(), etc.) are retired and replaced with new ufetch(9)
and ustore(9) APIs that can return proper error codes, etc. and are
implemented consistently across all platforms. The interrupt-safe
variants are no longer supported (and several of the existing attempts
at fuswintr(), etc. were buggy and not actually interrupt-safe).

Also augmement the ucas(9) API, making it consistently available on
all plaforms, supporting uniprocessor and multiprocessor systems, even
those that do not have CAS or LL/SC primitives.

Welcome to NetBSD 8.99.37.
 1.10 16-Apr-2003  wiz branches: 1.10.100;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.9 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.8 16-Mar-1999  garbled More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.7 03-Sep-1998  msaitoh Eliminate extra comma in SEE ALSO section
 1.6 22-Apr-1998  ross Add David Brownlee's new intro pages, with editing. (PR #534[23])
Also, while here, expand apparently incorrectly .Dd month abbreviations.
(I thought about doing this in tmac/doc-common...heh...that would have
allowed a possible reverse map back to abbreviations.)
 1.5 11-Nov-1997  mrg add missing .Nm sections
 1.4 21-May-1997  jeremy branches: 1.4.2;
Added missing function arguments. Also made it clear which process receives
the data.
 1.3 19-Jun-1996  pk `.Pa' => `.Fa'
 1.2 09-Jan-1996  perry Fix typo: failire -> failure
 1.1 09-Jan-1996  thorpej Add fetch(9) and store(9), which describe the {fu,su}{,i}{byte,word}
functions. Cross-reference with each-other and copy(9).
 1.4.2.1 11-Nov-1997  mrg pull up from trunk: add missing .Nm sections
 1.10.100.1 10-Jun-2019  christos Sync with HEAD
 1.3 21-Jan-2021  wiz Quote minus.
 1.2 21-Jan-2021  wiz Use Nm instead of xref to itself. Fix typo.
 1.1 21-Jan-2021  thorpej Add a manual page for strlist(9).
 1.7 16-May-2006  elad kill unused man-pages. prompted by Iain Hibbert.
 1.6 06-Sep-2005  kleink Typo.
 1.5 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.4 25-Jan-2003  kleink <sys/ucred.h> requires <sys/param.h> as a pre-requisite; suggested
by Martin Husemann.
 1.3 14-Oct-2002  wiz New sentence, new line.
 1.2 25-Jun-2002  wiz Drop a trailing space, and markup an error code.
 1.1 24-Jun-2002  gmcgarry Document for driver authors.
 1.5 13-Apr-2010  jruoho branches: 1.5.2;
Remove dead reference to scheduler(9).
 1.4 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.3 16-Apr-2003  wiz branches: 1.3.32; 1.3.34;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.2 27-Sep-2002  wiz Begin new sentences on new lines; drop trailing whitespace; some mdoc
and typo fixes.
 1.1 22-Sep-2002  gmcgarry Document the details of the scheduler.
 1.3.34.1 18-May-2008  yamt sync with head.
 1.3.32.1 02-Jun-2008  mjf Sync with HEAD.
 1.5.2.2 13-Apr-2010  jruoho Remove dead reference to scheduler(9).
 1.5.2.1 13-Apr-2010  jruoho file suspendsched.9 was added on branch uebayasi-xip on 2010-04-13 18:33:45 +0000
 1.24 07-Sep-2022  pgoyette Update to match recent changes in implementation.
 1.23 07-Aug-2019  wiz Fix previous: Link to module(9). Suggested by pgoyette.
 1.22 07-Aug-2019  wiz Remove Pp in wrong places. Fix Xref.
 1.21 07-Aug-2019  pgoyette Document interaction of SYSCTL_SETUP functions and the module loader.
 1.20 03-Jul-2017  wiz branches: 1.20.6;
Remove workaround for ancient HTML generation code.
 1.19 18-Mar-2017  riastradh Use `\(em', not `--'.

Refill sentences and tweak wording where appropriate while here.
 1.18 04-Dec-2011  jym branches: 1.18.22; 1.18.26;
- add the bool type for IMMEDIATE flag.
- minor tweak to the handler example: it leaks 't' (on stack)
when passed to sysctl_lookup(9), as it copyout its content via
sysctl_data. That would not be the case if CTLFLAG_IMMEDIATE flag
was set for this node but the example does not preclude that.
 1.17 16-May-2010  jruoho branches: 1.17.6;
IMPLEMENTATION NOTES back to NOTES.
 1.16 14-May-2010  jruoho Use standard section headers.
 1.15 11-Apr-2010  jruoho branches: 1.15.2;
Document the CTLTYPEs. In addition, split some paragraphs to make the page
less exhaustive to read.
 1.14 08-Apr-2009  joerg Replace .sp in literal display with empty line.
 1.13 12-Nov-2008  ad branches: 1.13.2;
Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.12 15-Aug-2008  wiz Bump date for previous.
 1.11 15-Aug-2008  reed Point to further documentation related to SYSCTL_SETUP.
 1.10 10-May-2008  rumble Typo.
 1.9 30-Apr-2008  martin branches: 1.9.2;
Convert TNF licenses to new 2 clause variant
 1.8 04-Oct-2007  alc branches: 1.8.6; 1.8.8;
fix unbalanced double quote
 1.7 26-Jun-2005  wiz branches: 1.7.12;
Bump date for previous.
 1.6 20-Jun-2005  atatat Change the rest of the sysctl subsystem to use const consistently.
The __UNCONST macro is now used only where necessary and the RW macros
are gone. Most of the changes here are consumers of the
sysctl_createv(9) interface that now takes a pair of const pointers
which used not to be.
 1.5 24-Mar-2004  wiz Grammar fixes.
 1.4 24-Mar-2004  snj Bump date for last; drop trailing whitespace.
 1.3 24-Mar-2004  atatat Bring sysctl man pages up to date (wrt new query interface, the
versioning, and descriptions).
 1.2 21-Jan-2004  wiz Fix typo.
 1.1 21-Jan-2004  atatat Man page for kernel's sysctl infrastructure. Thanks for being
patient.
 1.7.12.1 06-Nov-2007  matt sync with HEAD
 1.8.8.1 18-May-2008  yamt sync with head.
 1.8.6.2 05-Oct-2008  mjf Sync with HEAD.
 1.8.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.9.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.9.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.13.2.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.15.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.15.2.1 11-Apr-2010  uebayasi file sysctl.9 was added on branch uebayasi-xip on 2010-08-17 06:40:06 +0000
 1.17.6.1 17-Apr-2012  yamt sync with head
 1.18.26.1 21-Apr-2017  bouyer Sync with HEAD
 1.18.22.1 20-Mar-2017  pgoyette Sync with HEAD
 1.20.6.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.46 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.45 29-Mar-2017  abhinav Fix couple of typos.
 1.44 15-Mar-2013  njoly branches: 1.44.12; 1.44.16;
Fix a few file system paths to use Pa macro.
 1.43 05-Dec-2012  riastradh Document that ENVSYS_STEMP is in microkelvins.
 1.42 15-Jul-2012  pgoyette branches: 1.42.2;
Document the new SYSMON_FHAS_ENTROPY flag.
 1.41 02-Dec-2010  wiz branches: 1.41.6;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.40 11-Apr-2010  pgoyette branches: 1.40.2;
Use a typedef to define the prototype of the per-sensor callback.

Update manpage for the prototype, and fix a fubar'd Cross-reference.
 1.39 10-Apr-2010  wiz Mark up NULL with Dv.
 1.38 10-Apr-2010  pgoyette Update for recent changes.
 1.37 19-Mar-2010  wiz Remove trailing whitespace. Use Nm instead of Xr to itself.
 1.36 19-Mar-2010  pgoyette Document the new sysmon_envsys_sensor_event() function.
 1.35 18-Mar-2010  pgoyette Update to reflect recent removal of monitor member from envsys_data_t
structure.
 1.34 17-Mar-2010  jruoho Some minor improvements to wording, grammar, and markup.
 1.33 25-Feb-2010  wiz Avoid marking up punctuation.
 1.32 25-Feb-2010  pgoyette Update for recent changes to data structures.
 1.31 19-Dec-2009  snj A couple small grammar fixes. From Constantine Aleksandrovich Murenin.
 1.30 15-Jun-2009  wiz Use Dv for ENVSYS_*.
 1.29 14-Jun-2009  pgoyette Clarify usage of the function members in struct sysmon_envsys and note
that they're optional.
 1.28 14-Jun-2009  wiz Drop trailing whitespace.
 1.27 14-Jun-2009  pgoyette Ooops - {get,set}_limits() need to be sensor-specific. Pass an extra
argument to them to identify the individual sensor being processed.
 1.26 13-Jun-2009  pgoyette Remove left-over XXX - thanks wiz@ for pointing this out.
 1.25 13-Jun-2009  pgoyette Add capability to send sensor limit values to the driver so they can
be programmed into device registers. This way we can let the hardware
help us out instead of having to always compare the value against each
limit. (Driver updates for some sensors to take advantage of this
capability will be forthcoming.)
 1.24 01-Jun-2009  pgoyette Since we no longer have individual events for each sensor value limit,
we don't need individual flag bits. Clean up extra bit definitions.
Bump kernel version - welcome to 5.99.13
 1.23 18-May-2009  wiz Fix spelling.
 1.22 18-May-2009  wiz Formatting improvements.
 1.21 04-May-2009  wiz New sentence, new line. Use \*[Gt] for HTML output.
Punctuation improvements. Other fixes.
 1.20 12-Nov-2008  ad branches: 1.20.2;
Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.
 1.19 30-Apr-2008  martin branches: 1.19.4; 1.19.8;
Convert TNF licenses to new 2 clause variant
 1.18 28-Feb-2008  xtraeme branches: 1.18.2; 1.18.4;
Add three new values for ENVSYS_DRIVE units:

* ENVSYS_DRIVE_OFFLINE, ENVSYS_DRIVE_CHECK and ENVSYS_DRIVE_BUILD
 1.17 07-Dec-2007  xtraeme branches: 1.17.4;
Add ENVSYS_DRIVE_MIGRATING for ENVSYS_DRIVE sensors, this is for RAID
volumes that are migrating such as when you change the stripe size.

While I'm here use the same string than we had in the old framework to
report status "online" vs "drive is online", because the sensor might be
a RAID volume and not just a drive.
 1.16 20-Nov-2007  xtraeme Improve description for ENVSYS_FMONNOTSUPP.
 1.15 20-Nov-2007  xtraeme Indentation fix for the units list.
 1.14 19-Nov-2007  njoly Small indentation fix for ENVSYS_BATTERY_CAPACITY_* description list.
 1.13 17-Nov-2007  xtraeme Improve description of sme_refresh and state.
 1.12 16-Nov-2007  xtraeme Extend the envsys2 API (one more time, sorry) as defined in:

http://mail-index.netbsd.org/tech-kern/2007/11/09/0001.html

sysmon_envsys_create() and sysmon_envsys_destroy() were added to
create/destroy sysmon_envsys objects (and its TAILQ/LIST for sensors/events).

sysmon_envsys_sensor_attach() and sysmon_envsys_sensor_detach() were
added to attach/detach sensors to a specified sysmon_envsys device.

The events framework is now per device and configurable via the
ENVSYS_SETDICTIONARY ioctl or /etc/envsys.conf and envstat(8).

Update all users and documentation to reflect these changes.
 1.11 03-Nov-2007  xtraeme Sync with latest round of changes and improve vastly sysmon_envsys(9).
 1.10 10-Oct-2007  xtraeme Fix the problems described in:
http://mail-index.netbsd.org/current-users/2007/07/16/0012.html

- Introduce sme_class into the sysmon_envsys struct to specify a
class; currently there are two classes: SME_CLASS_ACADAPTER and
SME_CLASS_BATTERY.

- Add a new envsys event: PENVSYS_EVENT_LOW_POWER that is reached when
all SME_CLASS_BATTERY devices are in CRITICAL/LOW state and there's not
any SME_CLASS_ACADAPTER connected.

- Add the 'low-power' event into the sensor_battery script that will
shutdown the system gracefully via 'shutdown -p'. If powerd(8) is
not running, cpu_reboot(9) with RB_POWERDOWN is used.

- Make acpiacad(4) a SME_CLASS_ACADAPTER device and acpibat(4) a
SME_CLASS_BATTERY device.

Update the documentation accordingly to these changes.
 1.9 14-Sep-2007  xtraeme Modify a block that wasn't valid anymore.
 1.8 04-Sep-2007  xtraeme Update to match current code.
 1.7 02-Sep-2007  xtraeme Document the new sensor units type: ENVSYS_GSTRING and its member
in the envsys_data_t struct.
 1.6 28-Aug-2007  xtraeme - Remove reference to unexistent sysmon_power(9). (I will work on this
manpage, but no ETA yet).
- Xref envstat(8).
 1.5 17-Jul-2007  xtraeme branches: 1.5.4;
Explain a bit more about edata->desc being unique in a device.
 1.4 16-Jul-2007  xtraeme Fix a typo: it's ENVSYS_FPERCENT not ENVSYS_FPERCENTAGE.

Bump date.
 1.3 04-Jul-2007  xtraeme Add the CODE REFERENCES section.
 1.2 03-Jul-2007  xtraeme Document the sysctl node to change the refresh value of the callout
function that monitors the sensors.
 1.1 01-Jul-2007  xtraeme Imported envsys 2, a brief description of the new features:
(Part 4: documentation and configuration files)

* Support for detachable sensors.
* Cleaned up the API for simplicity and efficiency.
* Ability to send capacity/critical/warning events to powerd(8).
* Adapted all the code to the new locking order.
* Compatibility with the old envsys API: the ENVSYS_GTREINFO
and ENVSYS_GTREDATA ioctl(2)s are supported.
* Added support for a 'dictionary based communication channel' between
sysmon_power(9) and powerd(8), that means there is no 32 bytes event
size restriction anymore.
* Binary compatibility with old envstat(8) and powerd(8) via COMPAT_40.
* All drivers with the n^2 gtredata bug were fixed, PR kern/36226.

Tested by:

blymn: smsc(4).
bouyer: ipmi(4), mfi(4).
kefren: ug(4).
njoly: viaenv(4), adt7463.c.
riz: owtemp(4).
xtraeme: acpiacad(4), acpibat(4), acpitz(4), aiboost(4), it(4), lm(4).
 1.5.4.3 23-Mar-2008  matt sync with HEAD
 1.5.4.2 09-Jan-2008  matt sync with HEAD
 1.5.4.1 06-Nov-2007  matt sync with HEAD
 1.17.4.1 24-Mar-2008  keiichi sync with head.
 1.18.4.1 18-May-2008  yamt sync with head.
 1.18.2.2 02-Jun-2008  mjf Sync with HEAD.
 1.18.2.1 28-Feb-2008  mjf file sysmon_envsys.9 was added on branch mjf-devfs2 on 2008-06-02 13:21:42 +0000
 1.19.8.1 21-Apr-2010  matt sync to netbsd-5
 1.19.4.2 19-Dec-2009  snj Revert commit to the wrong branch.
 1.19.4.1 19-Dec-2009  snj A couple small grammar fixes. From Constantine Aleksandrovich Murenin.
 1.20.2.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.40.2.2 11-Apr-2010  pgoyette Use a typedef to define the prototype of the per-sensor callback.

Update manpage for the prototype, and fix a fubar'd Cross-reference.
 1.40.2.1 11-Apr-2010  pgoyette file sysmon_envsys.9 was added on branch uebayasi-xip on 2010-04-11 01:12:29 +0000
 1.41.6.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.41.6.2 16-Jan-2013  yamt sync with (a bit old) head
 1.41.6.1 30-Oct-2012  yamt sync with head
 1.42.2.2 23-Jun-2013  tls resync from head
 1.42.2.1 25-Feb-2013  tls resync with head
 1.44.16.1 21-Apr-2017  bouyer Sync with HEAD
 1.44.12.1 26-Apr-2017  pgoyette Sync with HEAD
 1.7 01-Jun-2016  pgoyette Fix spello. From PR misc/49516
 1.6 06-Jan-2015  bouyer As proposed on tech-net@, introduce a new switch type, PSWITCH_TYPE_RADIO,
to be used to report to userland hardware radio switch changes.
powerd(8) will call a "radio_button" script to handle the event.
This script can e.g. start or stop wpa_supplicant.
Update wpi(4) to report PSWITCH_TYPE_RADIO events to sysmon.
 1.5 18-Mar-2014  riastradh branches: 1.5.4;
Merge riastradh-drm2 to HEAD.
 1.4 20-Jul-2013  wiz Use Mt for email addresses.
 1.3 29-Jan-2010  jruoho branches: 1.3.8; 1.3.14; 1.3.18;
Add couple instances of .Pp.
 1.2 26-Jan-2010  pgoyette Fix .Bl markup - s/-compat/-compact/
 1.1 26-Jan-2010  jruoho Document also the sysmon power switches; sysmon_pswitch(9).
 1.3.18.1 23-Jul-2013  riastradh sync with HEAD
 1.3.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.8.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.5.4.1 12-Jan-2015  snj Pull up following revision(s) (requested by bouyer in ticket #415):
share/man/man9/sysmon_pswitch.9: revision 1.6
sys/dev/pci/if_wpi.c: revision 1.70, 1.71
sys/dev/pci/if_wpivar.h: revision 1.19
sys/dev/sysmon/sysmon_power.c: revision 1.49
sys/sys/power.h: revision 1.20
As proposed on tech-net@, introduce a new switch type, PSWITCH_TYPE_RADIO,
to be used to report to userland hardware radio switch changes.
powerd(8) will call a "radio_button" script to handle the event.
This script can e.g. start or stop wpa_supplicant.
Update wpi(4) to report PSWITCH_TYPE_RADIO events to sysmon.
--
Take sc_rsw_mtx before calling wpi_getrfkill() from wpi_init(),
Problem reported and patch tested by chris at chriswareham.net
 1.9 31-Dec-2021  riastradh sysmon(9): New sysmon_task_queue_barrier(pri) function.

This waits for the completion of all tasks at priority pri or lower
that are currently queued at the time of the call.
 1.8 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.7 20-Jul-2013  wiz Use Mt for email addresses.
 1.6 26-Jan-2010  jruoho branches: 1.6.8; 1.6.14; 1.6.18;
Mention that all tasks are executed before the halt.
 1.5 26-Jan-2010  jruoho Clarify that sysmon_task_queue_init() should be called from arch-specific
routine.
 1.4 26-Jan-2010  jruoho Document also rest of the functions.
 1.3 26-Jan-2010  jruoho Instead of "general purpose task queue", call it "general purpose system
monitoring task queue". Also include a paragraph about the intended usage.
 1.2 25-Jan-2010  jruoho Add a RETURN VALUES section.
 1.1 25-Jan-2010  jruoho Add a simple manual page for the simple sysmon task queue.

ok wiz@
 1.6.18.1 23-Jul-2013  riastradh sync with HEAD
 1.6.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.8.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.13 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.12 01-Jul-2011  dyoung Reference <sys/bus.h> instead of <machine/bus.h>.
 1.11 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.10 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.9 04-Oct-2004  rumble branches: 1.9.26; 1.9.28;
Removed accidental repetitious words.
 1.8 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.7 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.6 14-Oct-2002  wiz New sentence, new line.
 1.5 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.4 05-Dec-2001  gmcgarry This is tc.9, not ioasic.9
 1.3 29-Oct-2001  gmcgarry TurboChannel -> TURBOchannel. Pointed out by Tohru Nishimura.
 1.2 22-Oct-2001  wiz Whitespace, punctuation fixes; sort sections, fix xrefs.
 1.1 22-Oct-2001  gmcgarry Programmer's guide for TurboChannel.
 1.9.28.1 18-May-2008  yamt sync with head.
 1.9.26.1 02-Jun-2008  mjf Sync with HEAD.
 1.4 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.3 15-Oct-2006  rpaulo branches: 1.3.16; 1.3.18;
Update structure.
 1.2 13-Oct-2006  wiz New sentence, new line. Drop trailing whitespace. Sort sections.
Use .Er for errors.
 1.1 09-Oct-2006  rpaulo Modular (I tried ;-) TCP congestion control API. Whenever certain conditions
happen in the TCP stack, this interface calls the specified callback to
handle the situation according to the currently selected congestion
control algorithm.
A new sysctl node was created: net.inet.tcp.congctl.{available,selected}
with obvious meanings.
The old net.inet.tcp.newreno MIB was removed.
The API is discussed in tcp_congctl(9).

In the near future, it will be possible to selected a congestion control
algorithm on a per-socket basis.

Discussed on tech-net and reviewed by <yamt>.
 1.3.18.1 18-May-2008  yamt sync with head.
 1.3.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.3 28-Aug-2020  riastradh thmap(9): Minor readability and style tweaks.

- Fix typo: hmap -> thmap

- Reduce excessive indentation.

- Specify largest entry width for flag name table.

- Include parameter names in function descriptions for easier
reference.
 1.2 28-Aug-2019  wiz branches: 1.2.4;
Add RCS Id, sort sections.
 1.1 28-Aug-2019  rmind Add thmap(9) man page. Reviewed by wiz@.
Forgot to commit it half a year ago.
 1.2.4.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.2.4.1 28-Aug-2019  martin file thmap.9 was added on branch phil-wifi on 2020-04-13 08:03:26 +0000
 1.4 07-Sep-2020  riastradh threadpool: Fix man page for threadpool_job_init.

This is threadpool_job_init(job, fn, interlock, fmt, args...), not
just threadpool_job_init(job, fn, interlock).
 1.3 26-Dec-2018  thorpej branches: 1.3.2;
Document the threadpool_job_fn_t type and its use.
 1.2 26-Dec-2018  thorpej - De-opaque'ify struct threadpool_job.
- De-_t'ify all of the structure types.

No functional chage, no ABI change (verified with old rump unit test
before and after new librump.so).

Per Taylor's request.
 1.1 24-Dec-2018  thorpej branches: 1.1.2;
Add threadpool(9), an abstraction that provides shared pools of kernel
threads running at specific priorities, with support for unbound pools
and per-cpu pools.

Written by riastradh@, and based on the May 2014 draft, with a few changes
by me:
- Working on the assumption that a relative few priorities will actually
be used, reduce the memory footprint by using linked lists, rather than
2 large (and mostly empty) tables. The performance impact is essentially
nil, since these lists are consulted only when pools are created (and
destroyed, for DIAGNOSTIC checks), and the lists will have at most 225
entries.
- Make threadpool job object, which the caller must allocate storage for,
really opaque.
- Use typedefs for the threadpool types, to reduce the verbosity of the
API somewhat.
- Fix a bunch of pool / worker thread / job object lifecycle bugs.

Also include an ATF unit test, written by me, that exercises the basics
of the API by loading a kernel module that exposes several sysctls that
allow the ATF test script to create and destroy threadpools, schedule a
basic job, and verify that it ran.

And thus NetBSD 8.99.29 has arrived.
 1.1.2.3 18-Jan-2019  pgoyette Synch with HEAD
 1.1.2.2 26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.1.2.1 24-Dec-2018  pgoyette file threadpool.9 was added on branch pgoyette-compat on 2018-12-26 14:01:30 +0000
 1.3.2.2 10-Jun-2019  christos Sync with HEAD
 1.3.2.1 26-Dec-2018  christos file threadpool.9 was added on branch phil-wifi on 2019-06-10 22:05:42 +0000
 1.16 06-Sep-2006  gdamore time.9 renamed to time_second.9. various updates to reflect API changes.
 1.15 01-Oct-2005  yamt we don't have the global runtime anymore.
 1.14 14-Feb-2003  grant The correct capitalisation of 'NetBSD.org' is (you
guessed it) 'NetBSD.org'.

some mdoc fixes.
 1.13 14-Oct-2002  wiz New sentence, new line.
 1.12 07-Aug-2002  wiz Uncomment hardclock(9) reference now that we have one.
 1.11 04-Sep-2001  wiz Xref hz(9), now that it exists.
 1.10 04-Sep-2001  wiz Punctuation fixes.
 1.9 04-Sep-2001  wiz Boring whitespace fixes.
 1.8 29-Apr-2001  jhawk Comment out references to hz(9) and hardclock(9). It'd be nice
if someone wrote them, but let's not reference them until they are
written. Addresses PR kern/4901.
 1.7 04-Apr-2001  wiz Add section to xref.
 1.6 14-Jun-2000  cgd branches: 1.6.2;
sweep of my licenses (userland files w/o only my copyright) for
consistency. (no functional changes)
 1.5 14-Jun-2000  cgd fix up NetBSD RCS Ids to match the standard, and the leading comment as
to match as well. No functional changes.
 1.4 06-Apr-1999  pk branches: 1.4.6;
1, 2, 3 and.. 4!
 1.3 16-Mar-1999  garbled branches: 1.3.2;
More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.2 08-Jun-1998  lukem fix up case of variables
 1.1 25-Nov-1995  perry Added first section 9 man pages -- initial pages and Makefile from cgd
Section 9 man pages document the internals of the kernel.
 1.3.2.1 07-Apr-1999  pk Pull up from trunk: copyright text warts.
 1.4.6.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.6.2.1 26-Apr-2001  he Pull up revision 1.7 (requested by wiz):
Add section numbers for cross references.
 1.11 07-Sep-2024  rillig man: use https URLs for www.NetBSD.org
 1.10 17-Jul-2023  riastradh branches: 1.10.2;
kern: Make time_second and time_uptime macros that work atomically.

These use atomic load on platforms with atomic 64-bit load, and
seqlocks on platforms without.

This has the unfortunate side effect of slightly reducing the real
times available on 32-bit platforms, from ending some time in the
year 584942417218 AD, available on 64-bit platforms, to ending some
time in the year 584942417355 AD. But during that slightly shorter
time, 32-bit platforms can avoid bugs arising from non-atomic access
to time_uptime and time_second.

Note: All platforms still have non-atomic access problems for
bintime, binuptime, nanotime, nanouptime, &c. This can be addressed
by putting a seqlock around timebasebin and possibly some other
variable -- to be done in a later change.

XXX kernel ABI change -- deleting symbols
 1.9 18-Apr-2020  wiz Remove trailing comma.
 1.8 17-Apr-2020  jdolecek remove documentation for (non-atomic) boottime, it was eliminated
from kernel in 2020-01-02 by thorpej@
 1.7 30-Oct-2018  kre Minor update. This already knew that boottime is a timespec.
Just a minor wording change to avoid pretending that time_t
variables contain nanoseconds, and that the base time is UTC.
 1.6 14-Mar-2017  dholland branches: 1.6.10; 1.6.12;
boottime is a timespec these days.
From Tomoyuki Sahara in PR 52059.
 1.5 13-Mar-2011  jruoho branches: 1.5.26; 1.5.30;
Tidy up the SEE ALSO section. Namely, do not duplicate a big list of xrefs
that are already used in the body of the text.
 1.4 12-Mar-2009  joerg Use .Vt for variables, not .Va and manual line breaking.
 1.3 28-Nov-2008  wiz branches: 1.3.2;
Fix typo, remove .Pp before .Sh (unneeded).
 1.2 28-Nov-2008  tsutsui - reorder description per meanings
- note header files in SYNOPSIS
- remove obsolete internal description about hardclock(9)
- note that microtime(9) and microuptime(9) family functions are prefered
for atomic operation (from FreeBSD's time(9))
- add more related Xrefs
 1.1 06-Sep-2006  gdamore branches: 1.1.24;
time.9 renamed to time_second.9. various updates to reflect API changes.
 1.1.24.2 01-Dec-2008  snj Pull up following revision(s) (requested by tsutsui in ticket #153):
share/man/man9/time_second.9: revision 1.3
Fix typo, remove .Pp before .Sh (unneeded).
 1.1.24.1 01-Dec-2008  snj Pull up following revision(s) (requested by tsutsui in ticket #153):
share/man/man9/time_second.9: revision 1.2
- reorder description per meanings
- note header files in SYNOPSIS
- remove obsolete internal description about hardclock(9)
- note that microtime(9) and microuptime(9) family functions are prefered
for atomic operation (from FreeBSD's time(9))
- add more related Xrefs
 1.3.2.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.5.30.1 21-Apr-2017  bouyer Sync with HEAD
 1.5.26.1 20-Mar-2017  pgoyette Sync with HEAD
 1.6.12.2 21-Apr-2020  martin Sync with HEAD
 1.6.12.1 10-Jun-2019  christos Sync with HEAD
 1.6.10.1 26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.10.2.1 02-Aug-2025  perseant Sync with HEAD
 1.11 18-Sep-2021  tsutsui Update description of struct timecounter (u_int64_t -> uint64_t).

It has been changed since src/sys/sys/timetc.h rev 1.8.
Bump date.
 1.10 27-Aug-2020  fcambus Fix a bunch of typos in various kernel man pages.
 1.9 08-Jun-2010  jruoho Xref bintime_add(9).
 1.8 18-May-2010  jruoho Note timeval(9). Add %D to the .Rs/.Re.
 1.7 25-Oct-2009  joerg branches: 1.7.2;
Use .%U inside of .Rs/.Re.
 1.6 28-Nov-2008  tsutsui - use Em for HZ
- add xrefs to hz(9) and time_second(9)
 1.5 26-Nov-2008  wiz New sentence, new line. Use more markup. The character is nul with one l.
 1.4 26-Nov-2008  tsutsui Add a section which describes struct bintime.
 1.3 24-Nov-2008  tsutsui Replace timecounter(9) man page with OpenBSD's tc_init(9)
since the previous one was derived from FreeBSD's time(9)
which was based on NetBSD's time_second(9), and
it didn't mention the timecounter framework itself.
 1.2 24-Jun-2006  wiz branches: 1.2.26;
Comment out "/usr/share/doc/papers/timecounter.ascii.gz", since we do not
have this in NetBSD (yet?)
 1.1 24-Jun-2006  kardel import timecounter interface description
from FreeBSD (time.9)
 1.2.26.4 01-Dec-2008  snj Pull up following revision(s) (requested by tsutsui in ticket #153):
share/man/man9/timecounter.9: revision 1.6
- use Em for HZ
- add xrefs to hz(9) and time_second(9)
 1.2.26.3 01-Dec-2008  snj Pull up following revision(s) (requested by tsutsui in ticket #153):
share/man/man9/timecounter.9: revision 1.5
New sentence, new line. Use more markup. The character is nul with one l.
 1.2.26.2 01-Dec-2008  snj Pull up following revision(s) (requested by tsutsui in ticket #153):
share/man/man9/timecounter.9: revision 1.4
Add a section which describes struct bintime.
 1.2.26.1 01-Dec-2008  snj Pull up following revision(s) (requested by tsutsui in ticket #153):
distrib/sets/lists/comp/mi: revision 1.1214
share/man/man9/Makefile: revision 1.274
share/man/man9/timecounter.9: revision 1.3
Replace timecounter(9) man page with OpenBSD's tc_init(9)
since the previous one was derived from FreeBSD's time(9)
which was based on NetBSD's time_second(9), and
it didn't mention the timecounter framework itself.
 1.7.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.8 23-Mar-2000  thorpej Documentation for new callout interfaces.
 1.7 16-Mar-1999  garbled More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.6 06-Mar-1999  mycroft Fix formatting errors (bad sentence breaks).
 1.5 08-Jun-1998  lukem fix punctuation
 1.4 11-Nov-1997  mrg add missing .Nm sections
 1.3 08-Oct-1997  jtc branches: 1.3.2;
Fix tipo inherited from old version of TNF copyright form.
s/REGENTS/FOUNDATION/.
 1.2 23-Jun-1996  pk Make untimeout(9) description match reality.. and add a BUGS section for it.
 1.1 23-Jun-1996  pk Add timeout(9)/untimeout(9)
 1.3.2.1 11-Nov-1997  mrg pull up from trunk: add missing .Nm sections
 1.5 23-Sep-2005  jmmv Kill the tmpfs(9) manual page; it was just documenting internal details of
tmpfs' "API" and was already rotting.

Instead, merge all the relevant comments into the code. This includes
acknowledgements to Google's Summer of Code 2005 program (they were in the
AUTHORS section of tmpfs(9) before), so all the files need to be changed
to include this sentence alongside the title. (Note that this was not a
requirement of the program.)
 1.4 10-Sep-2005  jmmv Fix some mistakes spotted by wiz@.
 1.3 10-Sep-2005  wiz Punctuation fixes. Add another XXX.
 1.2 10-Sep-2005  wiz Various fixes:
file-system -> file system
make (most) lines shorter than 80 chars
use more appropriate macros
fix a few typos
add two XXX for wrong sentences I'm not sure how to fix properly
 1.1 10-Sep-2005  jmmv Initial addition of tmpfs, an efficient memory file-system. This project
was developed as part of Google's Summer of Code 2005 program. This
change adds the kernel code, the mount_tmpfs utility, a regression test
suite and does all other related changes to integrate these.

The file-system is still *experimental*. Therefore, it is disabled by
default in all kernels. However, as typically done, a commented-out
entry is added in them to ease its setup.

Note that I haven't commited the required mountd(8) changes to be able
to export tmpfs file-systems because NFS support is still very unstable
and because, before enabling it, I'd like to do some other changes.

OK'ed by my project mentor, William Studenmund (wrstuden@).
 1.18 10-Sep-2014  martin Adapt to recent changes.
 1.17 30-Aug-2014  martin clock_secs_to_ymdhms(9) takes seconds as a time_t, not int.
 1.16 22-Mar-2010  joerg branches: 1.16.2; 1.16.26;
Use .In instead of .Aq Pa for header files.
 1.15 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.14 20-Feb-2007  wiz branches: 1.14.10; 1.14.12;
time(9) was renamed to time_second(9), fix xrefs.
 1.13 06-Sep-2006  gdamore time.9 renamed to time_second.9. various updates to reflect API changes.
 1.12 09-Nov-2005  wiz Bump date for previous.
 1.11 06-Nov-2005  tsutsui dt_day in struct clock_ymdhms should be 1-31, not 0-365.
 1.10 29-Dec-2004  snj "\-" makes a minus, "-" does not.
 1.9 29-Dec-2004  bjh21 Document clock_ymdhms_to_secs()' returning -1 for unrepresentable input.
 1.8 07-Aug-2003  wiz Sort SEE ALSO; add commas between Nm entries in NAME section.
 1.7 18-Jul-2003  thorpej Document todr_attach().
 1.6 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.5 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.4 14-Oct-2002  wiz New sentence, new line.
 1.3 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.2 11-Sep-2001  uwe Fix quotes for `time-of-day'.
 1.1 25-Jul-2000  pk Add man page for a new time-of-day clock driver interface. Also documents the
already existing clock_secs_to_ymdhms() & clock_ymdhms_to_secs().
 1.14.12.1 18-May-2008  yamt sync with head.
 1.14.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.16.26.1 12-Nov-2014  snj Pull up following revision(s) (requested by martin in ticket #216):
share/man/man9/todr.9: revision 1.17
sys/arch/sh3/dev/rtc.c: revision 1.9
sys/dev/clock_subr.c: revision 1.17-1.22
sys/dev/clock_subr.h: revision 1.22
sys/fs/msdosfs/msdosfs_conv.c: revision 1.10
tools/compat/compat_defs.h: revision 1.98
tools/compat/dev/clock_subr.h: revision 1.1-1.2
usr.sbin/makefs/msdos/Makefile.inc: revision 1.6
clock_secs_to_ymdhms(9) takes seconds as a time_t, not int.
--
Make this compile- and usable from userland as well.
--
Add a slightly stripped down version of sys/dev/clock/clock_subr.h to make
this code available for tools.
--
Reformulate an overflow test so it can be used in tool builds (i.e. does
not depend on netbsd specific macros).
--
Make msdosfs time conversion use the y/m/d/h/m/s conversion functions
from clock_subr.c and compile that into the userland (and tools)
makefs as well.
--
Copy definitions of __type_min(t), __type_max(t), and some related macros,
from <sys/cdefs.h>, for use when building tools.
--
Revert previous; test secs > __type_max(time_t) again, now
that __type_max is available in tools/compat/compat_defs.h.
--
If HAVE_NBTOOL_CONFIG_H is set, then include "nbtool_config.h",
because this file is compiled as part of tools/makefs.
--
Counting leap years was fine while we had 32bit time_t - but now it
is not a good idea for dates far away in the future.
For dates in the year 2000 or later, use arithmetic instead (since the
repeating periods are well aligned). Should fix PR 49144.
--
Avoid overflowing the "year" value by making the field uint64_t. Adapt
arguments and local variables accordingly.
This now fixes PR 49144 for real.
--
Adapt formats for debug printfs to clock_subr type changes.
 1.16.2.2 22-Mar-2010  joerg Use .In instead of .Aq Pa for header files.
 1.16.2.1 22-Mar-2010  joerg file todr.9 was added on branch uebayasi-xip on 2010-03-22 18:58:34 +0000
 1.5 10-Oct-2024  kre PR kern/58733 - avoid ts2timo() clobbering its arg

See the PR for the gory details - in the TIMER_ABSTIME case
ts2timo() should not (really *must* not) alter the timespec
it is passed (in that case it should be const - but for now
anyway, cannot be for the TIMER_RELTIME case, and there is
just one of them!)

XXX pullup -10
XXX pullup -9 (will need a patch).
 1.4 09-Oct-2024  kre ts2timo() uses struct timespec, those don't have a tv_usec
field, they have tv_nsec instead. EINVAL will happen if the
tv_nsec field is invalid, not the non-existant tv_usec field.
 1.3 24-May-2013  njoly branches: 1.3.2; 1.3.8; 1.3.34; 1.3.42; 1.3.44;
Kill extra El macro.
 1.2 24-May-2013  wiz Fix xrefs.
 1.1 22-May-2013  christos add a man page for ts2timo.
 1.3.44.1 02-Aug-2025  perseant Sync with HEAD
 1.3.42.1 11-Oct-2024  martin Pull up following revision(s) (requested by kre in ticket #942):

share/man/man9/ts2timo.9: revision 1.4
share/man/man9/ts2timo.9: revision 1.5
sys/kern/subr_time.c: revision 1.39

ts2timo() uses struct timespec, those don't have a tv_usec
field, they have tv_nsec instead. EINVAL will happen if the
tv_nsec field is invalid, not the non-existant tv_usec field.

PR kern/58733 - avoid ts2timo() clobbering its arg

See the PR for the gory details - in the TIMER_ABSTIME case
ts2timo() should not (really *must* not) alter the timespec
it is passed (in that case it should be const - but for now
anyway, cannot be for the TIMER_RELTIME case, and there is
just one of them!).
 1.3.34.1 13-Oct-2024  martin Pull up following revision(s) (requested by kre in ticket #1909):

share/man/man9/ts2timo.9: revision 1.4
share/man/man9/ts2timo.9: revision 1.5
sys/kern/subr_time.c: revision 1.39 (patch)

ts2timo() uses struct timespec, those don't have a tv_usec
field, they have tv_nsec instead. EINVAL will happen if the
tv_nsec field is invalid, not the non-existant tv_usec field.
PR kern/58733 - avoid ts2timo() clobbering its arg

See the PR for the gory details - in the TIMER_ABSTIME case
ts2timo() should not (really *must* not) alter the timespec
it is passed (in that case it should be const - but for now
anyway, cannot be for the TIMER_RELTIME case, and there is
just one of them!).
 1.3.8.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.3.8.1 24-May-2013  yamt file ts2timo.9 was added on branch yamt-pagecache on 2014-05-22 11:37:52 +0000
 1.3.2.2 23-Jun-2013  tls resync from head
 1.3.2.1 24-May-2013  tls file ts2timo.9 was added on branch tls-maxphys on 2013-06-23 06:28:54 +0000
 1.7 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.6 20-Jul-2013  wiz Use Mt for email addresses.
 1.5 20-Oct-2011  jruoho branches: 1.5.2; 1.5.8; 1.5.12;
Xref mstohz(9) and tvtohz(9) with each other.
 1.4 17-May-2010  jruoho Xref timeval(3).
 1.3 05-Apr-2010  joerg branches: 1.3.2;
No trailing whitespace
 1.2 24-Nov-2008  tsutsui branches: 1.2.2;
Add Xref to new timecounter(9).
 1.1 24-Nov-2008  tsutsui Add tvtohz(9) man page, which is Xref'ed from microtime(9) and microuptime(9),
from FreeBSD.
 1.2.2.3 01-Dec-2008  snj Pull up following revision(s) (requested by tsutsui in ticket #153):
share/man/man9/microtime.9: revision 1.14
share/man/man9/microuptime.9: revision 1.3
share/man/man9/tvtohz.9: revision 1.2
Add Xref to new timecounter(9).
 1.2.2.2 01-Dec-2008  snj Pull up following revision(s) (requested by tsutsui in ticket #153):
distrib/sets/lists/comp/mi: revision 1.1213
share/man/man9/Makefile: revision 1.273
share/man/man9/tvtohz.9: revision 1.1
Add tvtohz(9) man page, which is Xref'ed from microtime(9) and microuptime(9),
from FreeBSD.
 1.2.2.1 24-Nov-2008  snj file tvtohz.9 was added on branch netbsd-5 on 2008-12-01 01:25:59 +0000
 1.3.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.3.2.1 05-Apr-2010  uebayasi file tvtohz.9 was added on branch uebayasi-xip on 2010-08-17 06:40:06 +0000
 1.5.12.1 23-Jul-2013  riastradh sync with HEAD
 1.5.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.15 12-May-2018  jdolecek adjust description for ubc_uiomove() to not reference lenp variable (that part
was carried over from ubc_alloc() description), and instead mention the restriction
to ubc_winsize
 1.14 12-May-2018  jdolecek remove ubc_alloc(9) and ubc_release(9) from ubc(9) from the documentation, they
are internal (static) functions

pointed out by Matthew Green in private email
 1.13 06-Apr-2017  abhinav branches: 1.13.10;
Use Xr to refer uiomove(9) and kcopy(9)
Add kcopy(9) to SEE ALSO as well
 1.12 06-Apr-2017  wiz Add missing word.
 1.11 06-Apr-2017  pgoyette Bump date for previous.
 1.10 06-Apr-2017  pgoyette Document ubc_zerorange(9). Add it (and ubc_purge(9)) to the MLINKS
 1.9 01-Jun-2016  wiz branches: 1.9.2; 1.9.4;
Use Mt for email addresses.
 1.8 01-Jun-2016  pgoyette Use .An for authors. From PR misc/49516
 1.7 14-Jun-2011  rmind Describe ubc_purge(9).
 1.6 02-Dec-2010  wiz branches: 1.6.4;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.5 14-Apr-2010  wiz branches: 1.5.2;
Join URL.
 1.4 14-Apr-2010  jruoho Add the USENIX paper of the author to SEE ALSO.
 1.3 28-Sep-2009  joerg Do not use a list in the synopsis, groff doesn't like that.
 1.2 03-Aug-2009  rmind ubc(9): add "core references" and "see also", ubc_unmap -> ubc_release.
 1.1 03-Aug-2009  rmind Split descriptions of UBC functions from uvm(9) into separate ubc(9) man page.
 1.5.2.2 14-Apr-2010  wiz Join URL.
 1.5.2.1 14-Apr-2010  wiz file ubc.9 was added on branch uebayasi-xip on 2010-04-14 13:06:11 +0000
 1.6.4.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.9.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.9.2.1 26-Apr-2017  pgoyette Sync with HEAD
 1.13.10.1 21-May-2018  pgoyette Sync with HEAD
 1.7 04-Oct-2021  andvar s/userpsace/userspace/
 1.6 04-Oct-2021  andvar remove duplicate the article in documentation.
 1.5 10-Aug-2020  rin Fix typo: than --> then. Probably not worth bumping date.
 1.4 06-Apr-2019  wiz Sort sections. Fix typo. Remove superfluous Pp.
 1.3 06-Apr-2019  thorpej Overhaul the API used to fetch and store individual memory cells in
userspace. The old fetch(9) and store(9) APIs (fubyte(), fuword(),
subyte(), suword(), etc.) are retired and replaced with new ufetch(9)
and ustore(9) APIs that can return proper error codes, etc. and are
implemented consistently across all platforms. The interrupt-safe
variants are no longer supported (and several of the existing attempts
at fuswintr(), etc. were buggy and not actually interrupt-safe).

Also augmement the ucas(9) API, making it consistently available on
all plaforms, supporting uniprocessor and multiprocessor systems, even
those that do not have CAS or LL/SC primitives.

Welcome to NetBSD 8.99.37.
 1.2 27-Oct-2011  wiz branches: 1.2.42;
Sort SEE ALSO.
 1.1 24-Oct-2011  yamt document ucas
 1.2.42.1 10-Jun-2019  christos Sync with HEAD
 1.20 12-Apr-2025  bad s/ibufsizepad/obufsizepad/ after the description of ucaa_obufsize
 1.19 12-Oct-2016  wiz branches: 1.19.26;
Fix xref, sort SEE ALSO.
 1.18 12-Oct-2016  skrll Update for nhusb merge. Add some Xr. Bump date. Invoke wiz.
 1.17 27-Oct-2014  christos branches: 1.17.2;
PR/49326: Henning Petersen: Correct errors in man pages csf.9 , pci.9 and ucom.9
 1.16 05-Aug-2012  riastradh Clarify description of ->ucom_read method.

From when I was trying to figure out what's wrong with uftdi reading
from a beaglebone last month. (Still haven't figured that out!)
 1.15 30-Apr-2008  martin branches: 1.15.22;
Convert TNF licenses to new 2 clause variant
 1.14 07-Mar-2007  dogcow branches: 1.14.10; 1.14.12;
running in emulated wizd mode, convert caddr_t to void *.
 1.13 26-Dec-2005  perry u_intN_t -> uintN_t
 1.12 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.11 14-Oct-2002  wiz New sentence, new line.
 1.10 01-Jun-2002  wiz For macro arguments, separate punctuation from the argument so that the
punctuation does not get marked up with it.
 1.9 01-Jun-2002  nathanw Couple of .Dv fixes.
 1.8 07-Feb-2002  ross Edit -mdoc usage.

* There is no -indent option to .Bd or .Bl, although you would
never know that from its frequent use in this tree. There is a
"-offset indent" combination that makes sense, and you can certainly
say "-width indent".

* Also, you can't markup the -width option argument, tho you CAN
use a callable macro. So "-width Ar filename" doesn't make sense,
but either "-width Ar" or "-width filename" does, as might something
like "-width xxfilename" for a little extra space.

* There are a lot of needlessly complex hanging tag macros in man4 used
to create simple item lists. Those should be simplified one of these
days before someone copies and edits yet another man4 page.
 1.7 26-Dec-2001  wiz Empty lines vs. .Pp cleanup.
 1.6 28-Nov-2001  wiz No point in using __P in prototype declarations in man pages.
 1.5 21-Jun-2001  wiz Fix typos, punctuation and whitespace.
 1.4 09-Apr-2001  wiz ioctl(2), not (4); whitespace.
 1.3 09-Apr-2001  augustss Fix typo.
 1.2 28-Apr-2000  drochner branches: 1.2.4;
-fix .Dv usage at one point
-The ucom_get_status() argument list gets messed up - should be .Fn
anyway, so change it accordingly. Convert the other functions to
.Fn/.Fa too for consistency.
 1.1 15-Apr-2000  augustss Add a man page describing the ucom interface for making tty like USB devices.
 1.2.4.1 26-Apr-2001  he Pull up revisions 1.3-1.4 (requested by wiz):
Correct ioctl(2) reference and correct a typo.
 1.14.12.1 18-May-2008  yamt sync with head.
 1.14.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.15.22.1 30-Oct-2012  yamt sync with head
 1.17.2.1 04-Nov-2016  pgoyette Sync with HEAD
 1.19.26.1 02-Aug-2025  perseant Sync with HEAD
 1.1 06-Apr-2019  thorpej branches: 1.1.2;
Overhaul the API used to fetch and store individual memory cells in
userspace. The old fetch(9) and store(9) APIs (fubyte(), fuword(),
subyte(), suword(), etc.) are retired and replaced with new ufetch(9)
and ustore(9) APIs that can return proper error codes, etc. and are
implemented consistently across all platforms. The interrupt-safe
variants are no longer supported (and several of the existing attempts
at fuswintr(), etc. were buggy and not actually interrupt-safe).

Also augmement the ucas(9) API, making it consistently available on
all plaforms, supporting uniprocessor and multiprocessor systems, even
those that do not have CAS or LL/SC primitives.

Welcome to NetBSD 8.99.37.
 1.1.2.2 10-Jun-2019  christos Sync with HEAD
 1.1.2.1 06-Apr-2019  christos file ufetch.9 was added on branch phil-wifi on 2019-06-10 22:05:42 +0000
 1.21 22-May-2023  riastradh uiomove(9): Add uiopeek/uioskip operations.

This allows a caller to grab some data, consume part of it, and
atomically update the uio with only the amount it consumed. This
way, the caller can use a buffer of a size that doesn't depend on how
much it will actually consume, which it may not know in advance --
e.g., because it depends on how much an underlying hardware tty
device will accept before it decides it has had too much.

Proposed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/05/09/msg028883.html

(Opinions were divided between `uioadvance' and `uioskip'. I stuck
with `uioskip' because that was less work for me.)
 1.20 01-Sep-2019  wiz fetch(9) -> ufetch(9). Remove superfluous Pp.
 1.19 01-Sep-2019  oster s/Xr store/Xr ustore/ to fix cross-references in these man-pages.
 1.18 03-Jul-2017  wiz branches: 1.18.6; 1.18.8;
Remove workaround for ancient HTML generation code.
 1.17 26-Apr-2010  jruoho branches: 1.17.2;
Describe the struct iovec better.
 1.16 26-Apr-2010  jruoho Small markup improvements.
 1.15 22-Mar-2010  joerg Use .In instead of .Aq Pa for header files.
 1.14 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.13 19-May-2007  wiz branches: 1.13.10; 1.13.12;
Bump date for previous.
 1.12 07-Mar-2007  rmind We no longer have uio_segflg and uio_procp members in the the struct uio.
Instead of these, we use uio_vmspace. OK: ad@
 1.11 14-Feb-2005  skrll branches: 1.11.12; 1.11.14; 1.11.16;
Correct reference to uio_resid. PR 29355.
 1.10 20-Jul-2004  heas typo; date -> data
 1.9 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.8 25-Aug-2002  thorpej uiomove()'s second argument is now a size_t.
 1.7 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.6 26-Dec-2001  wiz Fix SEE ALSO section.
 1.5 04-Sep-2001  wiz Whitespace formatting improvements.
 1.4 04-Sep-2001  wiz Boring whitespace fixes.
 1.3 16-Mar-1999  garbled More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.2 06-Mar-1999  mycroft Fix formatting errors (bad sentence breaks).
 1.1 13-Feb-1999  nathanw Document uiomove().
 1.11.16.1 01-Mar-2008  bouyer Apply patch (requested by elad in ticket #1092):
share/man/man9/uiomove.9: patch
Sync struct uio's documentation with reality in uiomove(9) to reflect
the removal of uio_segflg and uio_procp.
 1.11.14.1 03-Jun-2008  skrll Sync with netbsd-4.
 1.11.12.1 01-Mar-2008  bouyer Apply patch (requested by elad in ticket #1092):
share/man/man9/uiomove.9: patch
Sync struct uio's documentation with reality in uiomove(9) to reflect
the removal of uio_segflg and uio_procp.
 1.13.12.1 18-May-2008  yamt sync with head.
 1.13.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.17.2.2 26-Apr-2010  jruoho Describe the struct iovec better.
 1.17.2.1 26-Apr-2010  jruoho file uiomove.9 was added on branch uebayasi-xip on 2010-04-26 07:51:37 +0000
 1.18.8.2 05-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #174):
lib/libc/sys/chmod.2: revision 1.48
lib/libc/sys/stat.2: revision 1.59
lib/libc/sys/unlink.2: revision 1.30
lib/libc/sys/lseek.2: revision 1.25
lib/libc/sys/getuid.2: revision 1.18
lib/libc/sys/chown.2: revision 1.37
lib/libm/man/exp.3: revision 1.32
lib/libm/man/log.3: revision 1.7
lib/libc/sys/open.2: revision 1.60
lib/libc/stdio/fopen.3: revision 1.36
lib/libc/stdio/putc.3: revision 1.14
lib/libc/sys/mount.2: revision 1.51
share/man/man9/copy.9: revision 1.22
share/man/man9/uiomove.9: revision 1.20
lib/libc/sys/setuid.2: revision 1.23
lib/libc/sys/close.2: revision 1.18
sbin/init/init.8: revision 1.61
lib/libc/sys/write.2: revision 1.36
lib/libc/sys/read.2: revision 1.39
sbin/init/init.8: revision 1.62
lib/libc/sys/wait.2: revision 1.40
usr.bin/tty/tty.1: revision 1.10
lib/libc/sys/link.2: revision 1.33
usr.bin/du/du.1: revision 1.24
lib/libc/stdlib/exit.3: revision 1.17
usr.bin/su/su.1: revision 1.53
usr.bin/mail/mail.1: revision 1.66
lib/libc/sys/fork.2: revision 1.25
usr.bin/su/su.1: revision 1.54
usr.bin/mail/mail.1: revision 1.67
lib/libm/man/sin.3: revision 1.15
share/man/man9/intro.9: revision 1.26
share/man/man5/utmp.5: revision 1.17
lib/libc/compat-43/creat.3: revision 1.17
lib/libc/time/ctime.3: revision 1.61
lib/libcompat/4.1/stty.3: revision 1.10
usr.bin/dc/dc.1: revision 1.3
lib/libm/man/cos.3: revision 1.17
lib/libc/sys/chdir.2: revision 1.23
lib/libc/gen/exec.3: revision 1.30
lib/libc/gen/exec.3: revision 1.31
games/bcd/bcd.6: revision 1.18
games/bcd/bcd.6: revision 1.19
usr.bin/write/write.1: revision 1.7
usr.bin/wc/wc.1: revision 1.18
usr.bin/pr/pr.1: revision 1.24
usr.bin/who/who.1: revision 1.25
lib/libc/sys/mkdir.2: revision 1.30
lib/libc/stdio/getc.3: revision 1.13
usr.bin/sort/sort.1: revision 1.40
usr.bin/mesg/mesg.1: revision 1.11
share/man/man5/passwd.5: revision 1.34
sort was there since v1
https://www.bell-labs.com/usr/dmr/www/man61.pdf

dc was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

du was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mail was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

mesg was in v1
https://www.bell-labs.com/usr/dmr/www/man12.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

su was in v1
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man13.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man14.pdf
Update URL

write was in v1
https://www.bell-labs.com/usr/dmr/www/man14.pdf
grammar

passwd(5) was in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

utmp(5) was present in v1
https://www.bell-labs.com/usr/dmr/www/man51.pdf

Earliest version of wtmp I could find was in v3
https://minnie.tuhs.org/cgi-bin/utree.pl?file=V3/man/man5/wtmp.5

Document history of chdir(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chmod(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of chown(2)
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

create was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history of exec()
Move statement on execlpe() & execvpe() to HISTORY section.

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

fork was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
stat() was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

document history of fstat()
https://www.bell-labs.com/usr/dmr/www/man21.pdf

getuid was present in v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

Document history
https://www.bell-labs.com/usr/dmr/www/man21.pdf

stty & gtty were around since v1
https://www.bell-labs.com/usr/dmr/www/man21.pdf
https://www.bell-labs.com/usr/dmr/www/man22.pdf

mount & umount were present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

Open was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

read was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

seek was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

setuid was in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

unlink was presen in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

wait was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

write was present in v1
https://www.bell-labs.com/usr/dmr/www/man22.pdf

start documenting history
exp was present in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

log appeared in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putc & putw were in v1
https://www.bell-labs.com/usr/dmr/www/man31.pdf

putchar was in v4
https://minie.tuhs.org/cgi-bin/utree.pl?file=V4/man/man3/putchr.3

Start documenting history
https://www.bell-labs.com/usr/dmr/www/man31.pdf

Document history.
https://www.bell-labs.com/usr/dmr/www/man11.pdf
Between v1 & v6 UNIX, bcd was rewritten in C, but I don't know if which
version,
hence I've skipped mentioning it.
End sentence with a dot.
Remove superfluous Pp.
Remove superfluous Pp.
Remove superfluous Ns.
Remove superfluous Pp.
fetch(9) -> ufetch(9)
fetch(9) -> ufetch(9). Remove superfluous Pp.
fetch(9) -> ufetch(9). Remove reference to unimplemented ppi(9).
 1.18.8.1 01-Sep-2019  martin Pull up following revision(s) (requested by oster in ticket #167):

share/man/man9/copy.9: revision 1.21
share/man/man9/intro.9: revision 1.25
share/man/man9/uiomove.9: revision 1.19

s/Xr store/Xr ustore/ to fix cross-references in these man-pages.
 1.18.6.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.3 11-Dec-2021  mrg remove clause 3 from all my licenses that aren't conflicting with
another copyright claim line. again. (i did this in 2008 and then
did not update all of my personal templates.)
 1.2 13-May-2012  wiz branches: 1.2.2;
Fix typo and remove superfluous Pp.
 1.1 13-May-2012  mrg document a large chunk of the USB interface. some of this is kind of
generic and depends upon understanding USB itself (and since i don't
really that well, i might have gotten some wrong.)
 1.2.2.2 23-May-2012  yamt sync with head.
 1.2.2.1 13-May-2012  yamt file usbd_status.9 was added on branch yamt-pagecache on 2012-05-23 10:07:36 +0000
 1.37 14-Aug-2022  skrll usbd_do_request_async got deleted back in 2013 so remove the commented out
reference to it here.
 1.36 11-Dec-2021  mrg remove clause 3 from all my licenses that aren't conflicting with
another copyright claim line. again. (i did this in 2008 and then
did not update all of my personal templates.)
 1.35 27-Aug-2020  fcambus Fix a bunch of typos in various kernel man pages.
 1.34 04-Sep-2018  mrg s/of/or/
 1.33 08-Feb-2018  dholland branches: 1.33.2; 1.33.4;
Typo fixes from Eitan Adler.
 1.32 24-Apr-2016  wiz Remove trailing whitespace.
 1.31 24-Apr-2016  skrll Update after nick-nhusb merge
 1.30 29-Jun-2015  skrll Typos
 1.29 26-Sep-2013  skrll branches: 1.29.4; 1.29.8;
s/the the/the/

Bump date.
 1.28 10-Jun-2013  wiz Bump date for previous.
 1.27 10-Jun-2013  mrg mark several interfaces as internal, most of which have other exported
APIs for their use.
 1.26 22-Jan-2013  wiz Use correct macro.
 1.25 22-Jan-2013  jmcneill document USBD_MPSAFE and USB_TASKQ_MPSAFE
 1.24 20-Jul-2012  mrg branches: 1.24.2;
- remove some comments about only being relevant for usbmp.
- add documentation for usb_rem_task(), and clean up the task doc in
general. be clear about SMP issues for tasks
- bump date
 1.23 10-Jun-2012  mrg remove a comment about usbmp.
 1.22 03-Jun-2012  wiz Remove superfluous Pp. New sentence, new line. Remove trailing whitespace.
 1.21 03-Jun-2012  mrg add doucmentation for usb_{add,rem,init}_task().
 1.20 03-Jun-2012  mrg add documentation for:
- usbd_alloc_buffer
- usbd_free_buffe
- usbd_get_buffer
- usbd_do_request
- usbd_do_request_flags

begin to document the changes present on the USBMP branch:
- usbd_sync_transfer_sig
- usb_detach_wait
- usb_detach_broadcast

create a new section on device detachment. XXX needs a code example.
 1.19 02-Jun-2012  mrg gives pipes and transfers their own .Sh section.
 1.18 02-Jun-2012  mrg document usbd_open_pipe*(). fix some minor errors.

prepare to re-structure a lot of stuff.
 1.17 02-Jun-2012  mrg greatly expand the discussion on transfers and provide most of the details
needed to alloc, setup, transfer and obtain the status of them.
this takes care of:
- usbd_close_pipe
- usbd_alloc_xfer
- usbd_free_xfer
- usbd_setup{,_default,_isoc}_xfer
- usbd_transfer
- usbd_{bulk,intr}_transfer
- usbd_transfer_sync{,_sig}
- usbd_get_xfer_status
as well as callback and request information.

update the list of functions missing real descriptions. there are about
30 usbdi.h and 35 usbdi_util.h functions remaining.
 1.16 01-Jun-2012  mrg - add some comments for post-usbmp
- basic documentation for:
usbd_clear_endpoint_toggle()
usbd_device2interface_handle()
usbd_interface2device_handle()
usbd_pipe2device_handle()
usbd_interface2endpoint_descriptor()
usbd_endpoint_count()
- usbd_close_pipe() has documentation already
- bump date
 1.15 17-May-2012  wiz Remove trailing whitespace.
 1.14 17-May-2012  mrg clarify some descriptions. document a couple more functions.
make a big commented list of the functions that are lacking real
descriptions.
 1.13 13-May-2012  mrg fix a broken sentence. bump date.
 1.12 13-May-2012  mlelstv Fix tag for usbd_get_buffer
 1.11 13-May-2012  wiz Move DESCRIPTION below SYNOPSIS.
Remove function descriptions from SYNOPSIS.
Some cleanup while here.
XXX: most functions lack descriptions.
 1.10 13-May-2012  mrg convert the ugly .Bl/.El list of functions to a real one inside the
.Sh SYNOPSIS section.

XXX, the .Sh DESCRIPTION needs to move under the .Sh SYNOPSIS.
 1.9 13-May-2012  mrg document a large chunk of the USB interface. some of this is kind of
generic and depends upon understanding USB itself (and since i don't
really that well, i might have gotten some wrong.)
 1.8 20-Oct-2011  njoly branches: 1.8.2;
Use .In macro.
 1.7 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.6 26-Dec-2005  perry branches: 1.6.20; 1.6.22;
u_intN_t -> uintN_t
 1.5 14-Oct-2002  wiz New sentence, new line.
 1.4 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.3 26-Dec-2001  wiz Empty lines vs. .Pp cleanup, and sort sections.
 1.2 19-Jun-2001  wiz Fix typo and whitespaces.
 1.1 15-Dec-1999  augustss branches: 1.1.2;
Add a skeleton for the usbdi documentation.
This is still very incomplete.
 1.1.2.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.6.22.1 18-May-2008  yamt sync with head.
 1.6.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.8.2.3 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.8.2.2 30-Oct-2012  yamt sync with head
 1.8.2.1 23-May-2012  yamt sync with head.
 1.24.2.3 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.24.2.2 23-Jun-2013  tls resync from head
 1.24.2.1 25-Feb-2013  tls resync with head
 1.29.8.1 31-Mar-2017  skrll Sync with HEAD/nhusb
 1.29.4.1 05-Apr-2017  snj Pull up following revision(s) (requested by skrll in ticket #1395):
share/man/man4/axe.4: netbsd-7-nhusb
share/man/man4/axen.4: netbsd-7-nhusb
share/man/man4/cdce.4: netbsd-7-nhusb
share/man/man4/uaudio.4: netbsd-7-nhusb
share/man/man4/ucom.4: netbsd-7-nhusb
share/man/man4/uep.4: netbsd-7-nhusb
share/man/man4/urtw.4: netbsd-7-nhusb
share/man/man4/usb.4: netbsd-7-nhusb
share/man/man4/uyap.4: netbsd-7-nhusb
share/man/man4/xhci.4: netbsd-7-nhusb
share/man/man9/usbdi.9: netbsd-7-nhusb
sys/arch/amd64/conf/ALL: netbsd-7-nhusb
sys/arch/amd64/conf/GENERIC: netbsd-7-nhusb
sys/arch/amiga/dev/slhci_zbus.c: netbsd-7-nhusb
sys/arch/arm/allwinner/awin_otg.c: netbsd-7-nhusb
sys/arch/arm/allwinner/awin_usb.c: netbsd-7-nhusb
sys/arch/arm/amlogic/amlogic_dwctwo.c: netbsd-7-nhusb
sys/arch/arm/at91/at91ohci.c: netbsd-7-nhusb
sys/arch/arm/broadcom/bcm2835_dwctwo.c: netbsd-7-nhusb
sys/arch/arm/broadcom/bcm53xx_usb.c: netbsd-7-nhusb
sys/arch/arm/ep93xx/epohci.c: netbsd-7-nhusb
sys/arch/arm/gemini/obio_ehci.c: netbsd-7-nhusb
sys/arch/arm/imx/files.imx23: netbsd-7-nhusb
sys/arch/arm/imx/imxusb.c: netbsd-7-nhusb
sys/arch/arm/imx/imxusbreg.h: netbsd-7-nhusb
sys/arch/arm/omap/obio_ohci.c: netbsd-7-nhusb
sys/arch/arm/omap/omap3_ehci.c: netbsd-7-nhusb
sys/arch/arm/omap/omapl1x_ohci.c: netbsd-7-nhusb
sys/arch/arm/omap/tiotg.c: netbsd-7-nhusb
sys/arch/arm/s3c2xx0/ohci_s3c24x0.c: netbsd-7-nhusb
sys/arch/arm/samsung/exynos_usb.c: netbsd-7-nhusb
sys/arch/arm/xscale/pxa2x0_ohci.c: netbsd-7-nhusb
sys/arch/arm/zynq/zynq_usb.c: netbsd-7-nhusb
sys/arch/hpcarm/dev/nbp_slhci.c: netbsd-7-nhusb
sys/arch/hpcmips/dev/plumohci.c: netbsd-7-nhusb
sys/arch/i386/conf/ALL: netbsd-7-nhusb
sys/arch/i386/conf/GENERIC: netbsd-7-nhusb
sys/arch/i386/pci/gcscehci.c: netbsd-7-nhusb
sys/arch/luna68k/conf/GENERIC: netbsd-7-nhusb
sys/arch/mips/adm5120/dev/ahci.c: netbsd-7-nhusb
sys/arch/mips/adm5120/dev/ahcivar.h: netbsd-7-nhusb
sys/arch/mips/alchemy/dev/ohci_aubus.c: netbsd-7-nhusb
sys/arch/mips/atheros/dev/ehci_arbus.c: netbsd-7-nhusb
sys/arch/mips/atheros/dev/ohci_arbus.c: netbsd-7-nhusb
sys/arch/mips/conf/files.adm5120: netbsd-7-nhusb
sys/arch/mips/ralink/ralink_ehci.c: netbsd-7-nhusb
sys/arch/mips/ralink/ralink_ohci.c: netbsd-7-nhusb
sys/arch/mips/rmi/rmixl_ehci.c: netbsd-7-nhusb
sys/arch/mips/rmi/rmixl_ohci.c: netbsd-7-nhusb
sys/arch/playstation2/dev/ohci_sbus.c: netbsd-7-nhusb
sys/arch/powerpc/booke/dev/pq3ehci.c: netbsd-7-nhusb
sys/arch/powerpc/ibm4xx/dev/dwctwo_plb.c: netbsd-7-nhusb
sys/arch/x68k/dev/slhci_intio.c: netbsd-7-nhusb
sys/conf/files: netbsd-7-nhusb
sys/dev/cardbus/ehci_cardbus.c: netbsd-7-nhusb
sys/dev/cardbus/ohci_cardbus.c: netbsd-7-nhusb
sys/dev/cardbus/uhci_cardbus.c: netbsd-7-nhusb
sys/dev/ic/sl811hs.c: netbsd-7-nhusb
sys/dev/ic/sl811hsvar.h: netbsd-7-nhusb
sys/dev/isa/slhci_isa.c: netbsd-7-nhusb
sys/dev/marvell/ehci_mv.c: netbsd-7-nhusb
sys/dev/pci/ehci_pci.c: netbsd-7-nhusb
sys/dev/pci/ohci_pci.c: netbsd-7-nhusb
sys/dev/pci/uhci_pci.c: netbsd-7-nhusb
sys/dev/pci/xhci_pci.c: netbsd-7-nhusb
sys/dev/pcmcia/slhci_pcmcia.c: netbsd-7-nhusb
sys/dev/usb/Makefile.usbdevs: netbsd-7-nhusb
sys/dev/usb/TODO: netbsd-7-nhusb
sys/dev/usb/TODO.usbmp: netbsd-7-nhusb
sys/dev/usb/aubtfwl.c: netbsd-7-nhusb
sys/dev/usb/auvitek.c: netbsd-7-nhusb
sys/dev/usb/auvitek_audio.c: netbsd-7-nhusb
sys/dev/usb/auvitek_dtv.c: netbsd-7-nhusb
sys/dev/usb/auvitek_i2c.c: netbsd-7-nhusb
sys/dev/usb/auvitek_video.c: netbsd-7-nhusb
sys/dev/usb/auvitekvar.h: netbsd-7-nhusb
sys/dev/usb/ehci.c: netbsd-7-nhusb
sys/dev/usb/ehcireg.h: netbsd-7-nhusb
sys/dev/usb/ehcivar.h: netbsd-7-nhusb
sys/dev/usb/emdtv.c: netbsd-7-nhusb
sys/dev/usb/emdtv_dtv.c: netbsd-7-nhusb
sys/dev/usb/emdtv_ir.c: netbsd-7-nhusb
sys/dev/usb/emdtvvar.h: netbsd-7-nhusb
sys/dev/usb/ezload.c: netbsd-7-nhusb
sys/dev/usb/ezload.h: netbsd-7-nhusb
sys/dev/usb/files.usb: netbsd-7-nhusb
sys/dev/usb/hid.c: netbsd-7-nhusb
sys/dev/usb/hid.h: netbsd-7-nhusb
sys/dev/usb/if_athn_usb.c: netbsd-7-nhusb
sys/dev/usb/if_athn_usb.h: netbsd-7-nhusb
sys/dev/usb/if_atu.c: netbsd-7-nhusb
sys/dev/usb/if_atureg.h: netbsd-7-nhusb
sys/dev/usb/if_aue.c: netbsd-7-nhusb
sys/dev/usb/if_auereg.h: netbsd-7-nhusb
sys/dev/usb/if_axe.c: netbsd-7-nhusb
sys/dev/usb/if_axen.c: netbsd-7-nhusb
sys/dev/usb/if_axenreg.h: netbsd-7-nhusb
sys/dev/usb/if_axereg.h: netbsd-7-nhusb
sys/dev/usb/if_cdce.c: netbsd-7-nhusb
sys/dev/usb/if_cdcereg.h: netbsd-7-nhusb
sys/dev/usb/if_cue.c: netbsd-7-nhusb
sys/dev/usb/if_cuereg.h: netbsd-7-nhusb
sys/dev/usb/if_kue.c: netbsd-7-nhusb
sys/dev/usb/if_kuereg.h: netbsd-7-nhusb
sys/dev/usb/if_otus.c: netbsd-7-nhusb
sys/dev/usb/if_otusvar.h: netbsd-7-nhusb
sys/dev/usb/if_rum.c: netbsd-7-nhusb
sys/dev/usb/if_rumreg.h: netbsd-7-nhusb
sys/dev/usb/if_rumvar.h: netbsd-7-nhusb
sys/dev/usb/if_run.c: netbsd-7-nhusb
sys/dev/usb/if_runvar.h: netbsd-7-nhusb
sys/dev/usb/if_smsc.c: netbsd-7-nhusb
sys/dev/usb/if_smscreg.h: netbsd-7-nhusb
sys/dev/usb/if_smscvar.h: netbsd-7-nhusb
sys/dev/usb/if_udav.c: netbsd-7-nhusb
sys/dev/usb/if_udavreg.h: netbsd-7-nhusb
sys/dev/usb/if_upgt.c: netbsd-7-nhusb
sys/dev/usb/if_upgtvar.h: netbsd-7-nhusb
sys/dev/usb/if_upl.c: netbsd-7-nhusb
sys/dev/usb/if_ural.c: netbsd-7-nhusb
sys/dev/usb/if_uralreg.h: netbsd-7-nhusb
sys/dev/usb/if_uralvar.h: netbsd-7-nhusb
sys/dev/usb/if_url.c: netbsd-7-nhusb
sys/dev/usb/if_urlreg.h: netbsd-7-nhusb
sys/dev/usb/if_urndis.c: netbsd-7-nhusb
sys/dev/usb/if_urndisreg.h: netbsd-7-nhusb
sys/dev/usb/if_urtw.c: netbsd-7-nhusb
sys/dev/usb/if_urtwn.c: netbsd-7-nhusb
sys/dev/usb/if_urtwn_data.h: netbsd-7-nhusb
sys/dev/usb/if_urtwnreg.h: netbsd-7-nhusb
sys/dev/usb/if_urtwnvar.h: netbsd-7-nhusb
sys/dev/usb/if_urtwreg.h: netbsd-7-nhusb
sys/dev/usb/if_zyd.c: netbsd-7-nhusb
sys/dev/usb/if_zydreg.h: netbsd-7-nhusb
sys/dev/usb/irmce.c: netbsd-7-nhusb
sys/dev/usb/moscom.c: netbsd-7-nhusb
sys/dev/usb/motg.c: netbsd-7-nhusb
sys/dev/usb/motgvar.h: netbsd-7-nhusb
sys/dev/usb/ohci.c: netbsd-7-nhusb
sys/dev/usb/ohcireg.h: netbsd-7-nhusb
sys/dev/usb/ohcivar.h: netbsd-7-nhusb
sys/dev/usb/pseye.c: netbsd-7-nhusb
sys/dev/usb/slurm.c: netbsd-7-nhusb
sys/dev/usb/stuirda.c: netbsd-7-nhusb
sys/dev/usb/u3g.c: netbsd-7-nhusb
sys/dev/usb/uark.c: netbsd-7-nhusb
sys/dev/usb/uatp.c: netbsd-7-nhusb
sys/dev/usb/uaudio.c: netbsd-7-nhusb
sys/dev/usb/uberry.c: netbsd-7-nhusb
sys/dev/usb/ubsa.c: netbsd-7-nhusb
sys/dev/usb/ubsa_common.c: netbsd-7-nhusb
sys/dev/usb/ubsavar.h: netbsd-7-nhusb
sys/dev/usb/ubt.c: netbsd-7-nhusb
sys/dev/usb/uchcom.c: netbsd-7-nhusb
sys/dev/usb/ucom.c: netbsd-7-nhusb
sys/dev/usb/ucomvar.h: netbsd-7-nhusb
sys/dev/usb/ucycom.c: netbsd-7-nhusb
sys/dev/usb/udl.c: netbsd-7-nhusb
sys/dev/usb/udl.h: netbsd-7-nhusb
sys/dev/usb/udsbr.c: netbsd-7-nhusb
sys/dev/usb/udsir.c: netbsd-7-nhusb
sys/dev/usb/uep.c: netbsd-7-nhusb
sys/dev/usb/uftdi.c: netbsd-7-nhusb
sys/dev/usb/uftdireg.h: netbsd-7-nhusb
sys/dev/usb/ugen.c: netbsd-7-nhusb
sys/dev/usb/ugensa.c: netbsd-7-nhusb
sys/dev/usb/uhci.c: netbsd-7-nhusb
sys/dev/usb/uhcireg.h: netbsd-7-nhusb
sys/dev/usb/uhcivar.h: netbsd-7-nhusb
sys/dev/usb/uhid.c: netbsd-7-nhusb
sys/dev/usb/uhidev.c: netbsd-7-nhusb
sys/dev/usb/uhidev.h: netbsd-7-nhusb
sys/dev/usb/uhmodem.c: netbsd-7-nhusb
sys/dev/usb/uhso.c: netbsd-7-nhusb
sys/dev/usb/uhub.c: netbsd-7-nhusb
sys/dev/usb/uipad.c: netbsd-7-nhusb
sys/dev/usb/uipaq.c: netbsd-7-nhusb
sys/dev/usb/uirda.c: netbsd-7-nhusb
sys/dev/usb/uirdavar.h: netbsd-7-nhusb
sys/dev/usb/ukbd.c: netbsd-7-nhusb
sys/dev/usb/ukbdmap.c: netbsd-7-nhusb
sys/dev/usb/ukyopon.c: netbsd-7-nhusb
sys/dev/usb/ukyopon.h: netbsd-7-nhusb
sys/dev/usb/ulpt.c: netbsd-7-nhusb
sys/dev/usb/umass.c: netbsd-7-nhusb
sys/dev/usb/umass_isdata.c: netbsd-7-nhusb
sys/dev/usb/umass_isdata.h: netbsd-7-nhusb
sys/dev/usb/umass_quirks.c: netbsd-7-nhusb
sys/dev/usb/umass_quirks.h: netbsd-7-nhusb
sys/dev/usb/umass_scsipi.c: netbsd-7-nhusb
sys/dev/usb/umass_scsipi.h: netbsd-7-nhusb
sys/dev/usb/umassvar.h: netbsd-7-nhusb
sys/dev/usb/umcs.c: netbsd-7-nhusb
sys/dev/usb/umct.c: netbsd-7-nhusb
sys/dev/usb/umidi.c: netbsd-7-nhusb
sys/dev/usb/umidi_quirks.c: netbsd-7-nhusb
sys/dev/usb/umidi_quirks.h: netbsd-7-nhusb
sys/dev/usb/umodem.c: netbsd-7-nhusb
sys/dev/usb/umodem_common.c: netbsd-7-nhusb
sys/dev/usb/umodemvar.h: netbsd-7-nhusb
sys/dev/usb/ums.c: netbsd-7-nhusb
sys/dev/usb/uplcom.c: netbsd-7-nhusb
sys/dev/usb/urio.c: netbsd-7-nhusb
sys/dev/usb/urio.h: netbsd-7-nhusb
sys/dev/usb/usb.c: netbsd-7-nhusb
sys/dev/usb/usb.h: netbsd-7-nhusb
sys/dev/usb/usb_mem.c: netbsd-7-nhusb
sys/dev/usb/usb_mem.h: netbsd-7-nhusb
sys/dev/usb/usb_quirks.c: netbsd-7-nhusb
sys/dev/usb/usb_quirks.h: netbsd-7-nhusb
sys/dev/usb/usb_subr.c: netbsd-7-nhusb
sys/dev/usb/usbdevices.config: netbsd-7-nhusb
sys/dev/usb/usbdevs: netbsd-7-nhusb
sys/dev/usb/usbdevs.h: netbsd-7-nhusb
sys/dev/usb/usbdevs_data.h: netbsd-7-nhusb
sys/dev/usb/usbdi.c: netbsd-7-nhusb
sys/dev/usb/usbdi.h: netbsd-7-nhusb
sys/dev/usb/usbdi_util.c: netbsd-7-nhusb
sys/dev/usb/usbdi_util.h: netbsd-7-nhusb
sys/dev/usb/usbdivar.h: netbsd-7-nhusb
sys/dev/usb/usbhid.h: netbsd-7-nhusb
sys/dev/usb/usbhist.h: netbsd-7-nhusb
sys/dev/usb/usbroothub.c: netbsd-7-nhusb
sys/dev/usb/usbroothub.h: netbsd-7-nhusb
sys/dev/usb/usbroothub_subr.c: delete
sys/dev/usb/usbroothub_subr.h: delete
sys/dev/usb/uscanner.c: netbsd-7-nhusb
sys/dev/usb/uslsa.c: netbsd-7-nhusb
sys/dev/usb/usscanner.c: netbsd-7-nhusb
sys/dev/usb/ustir.c: netbsd-7-nhusb
sys/dev/usb/uthum.c: netbsd-7-nhusb
sys/dev/usb/utoppy.c: netbsd-7-nhusb
sys/dev/usb/uts.c: netbsd-7-nhusb
sys/dev/usb/uvideo.c: netbsd-7-nhusb
sys/dev/usb/uvisor.c: netbsd-7-nhusb
sys/dev/usb/uvscom.c: netbsd-7-nhusb
sys/dev/usb/uyap.c: netbsd-7-nhusb
sys/dev/usb/uyap_firmware.h: netbsd-7-nhusb
sys/dev/usb/uyurex.c: netbsd-7-nhusb
sys/dev/usb/x1input_rdesc.h: netbsd-7-nhusb
sys/dev/usb/xhci.c: netbsd-7-nhusb
sys/dev/usb/xhcireg.h: netbsd-7-nhusb
sys/dev/usb/xhcivar.h: netbsd-7-nhusb
sys/dev/usb/xinput_rdesc.h: netbsd-7-nhusb
sys/external/bsd/common/conf/files.linux: netbsd-7-nhusb
sys/external/bsd/common/include/linux/err.h: netbsd-7-nhusb
sys/external/bsd/common/include/linux/kernel.h: netbsd-7-nhusb
sys/external/bsd/common/include/linux/workqueue.h: netbsd-7-nhusb
sys/external/bsd/common/linux/linux_work.c: netbsd-7-nhusb
sys/external/bsd/drm2/dist/drm/radeon/atombios_encoders.c: netbsd-7-nhusb
sys/external/bsd/drm2/dist/drm/radeon/radeon_legacy_encoders.c: netbsd-7-nhusb
sys/external/bsd/drm2/drm/files.drmkms: netbsd-7-nhusb
sys/external/bsd/drm2/i915drm/files.i915drmkms: netbsd-7-nhusb
sys/external/bsd/drm2/include/linux/err.h: delete
sys/external/bsd/drm2/include/linux/workqueue.h: delete
sys/external/bsd/drm2/linux/files.drmkms_linux: netbsd-7-nhusb
sys/external/bsd/drm2/linux/linux_work.c: delete
sys/external/bsd/dwc2/dwc2.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dwc2.h: netbsd-7-nhusb
sys/external/bsd/dwc2/dwc2var.h: netbsd-7-nhusb
sys/external/bsd/dwc2/dwctwo2netbsd: netbsd-7-nhusb
sys/external/bsd/dwc2/conf/files.dwc2: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_core.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_core.h: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_coreintr.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcd.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcd.h: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcdddma.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcdintr.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hcdqueue.c: netbsd-7-nhusb
sys/external/bsd/dwc2/dist/dwc2_hw.h: netbsd-7-nhusb
sys/modules/drmkms_linux/Makefile: netbsd-7-nhusb
sys/modules/i915drmkms/Makefile: netbsd-7-nhusb
sys/rump/dev/lib/libugenhc/ugenhc.c: netbsd-7-nhusb
sys/rump/dev/lib/libusb/Makefile: netbsd-7-nhusb
sys/rump/dev/lib/libusb/USB.ioconf: netbsd-7-nhusb
sys/rump/dev/lib/libusb/usb_at_ugenhc.c: delete
sys/rump/dev/lib/libusb/opt/opt_usb.h: delete
sys/rump/dev/lib/libusb/opt/opt_usbverbose.h: delete
sys/sys/mbuf.h: netbsd-7-nhusb
usr.sbin/usbdevs/usbdevs.8: netbsd-7-nhusb
usr.sbin/usbdevs/usbdevs.c: netbsd-7-nhusb
Merge netbsd-7-nhusb:
- API / infrastructure changes to support memory management changes.
- Memory management improvements and bug fixes.
- HCDs should now be MP safe
- conversion to KERNHIST based debug
- FS/LS isoc support on ehci(4).
- conversion to kmem(9)
- Some USB 3 support - mostly from Takahiro HAYASHI (t-hash).
- interrupt transfers now get proper DMA operations
- general bug fixes
- kern/48308
- uhub status notification improvements
- umass(4) probe fix (applied to HEAD already)
- ohci(4) short transfer fix
- Change the SOFTINT level from NET to SERIAL for the USB softint handler.
This gives the callback a chance of running when another softint handler
at SOFTINT_NET has blocked holding a lock, e.g. softnet_lock and most of
the network stack.
- kern/49065 - ifconfig tun0 ... sequence locks up system / lockup:
softnet_lock held across usb xfr
- kern/50491 - unkillable wait in usbd_transfer while using usmsc0
on raspberry pi 2
- kern/51395 - USB Ethernet makes xhci hang
- Various improvements to slhci(4)
- Various improvements to dwc2(4)
 1.33.4.1 10-Jun-2019  christos Sync with HEAD
 1.33.2.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.22 04-Feb-2024  mrg update my email address.
 1.21 17-Oct-2023  mrg fix a typo: s/usbent_set_link/usbnet_set_link/.
 1.20 20-Aug-2022  riastradh usbnet(9): Clarify how mii functions are used.
 1.19 20-Aug-2022  riastradh usbnet(9): New usbnet_ispromisc(un).

Replaces ifp->if_flags & IFF_PROMISC in multicast filter updates.
 1.18 12-Aug-2022  riastradh usbnet(9): Tidy up language about init/rx/tx/stop in man page.
 1.17 05-Mar-2022  riastradh usbnet(9): Clarify uno_stop contract in man page.
 1.16 05-Mar-2022  riastradh usbnet(9): uno_init is now optional.

Update assertion and man page accordingly.
 1.15 03-Mar-2022  riastradh usbnet(9): Update man page.
 1.14 11-Dec-2021  mrg remove clause 3 from all my licenses that aren't conflicting with
another copyright claim line. again. (i did this in 2008 and then
did not update all of my personal templates.)
 1.13 28-Aug-2020  fcambus Fix a bunch of typos in various device drivers and kernel man pages.
 1.12 09-Aug-2020  mrg fix a couple of minor issues:
- un_ed is not a function, but an array
- fix a typo
- add a blank line after a list
 1.11 20-Mar-2020  wiz branches: 1.11.2;
Fix some typos, remove unnecessary Pp
 1.10 20-Mar-2020  thorpej Update for recent locking changes.
 1.9 23-Aug-2019  wiz branches: 1.9.2;
Mark up NULL. Capitalize NetBSD.
 1.8 23-Aug-2019  mrg update for usbnet_mii and read/write reg return change.
 1.7 15-Aug-2019  wiz Fix Xr usage.
 1.6 15-Aug-2019  mrg - document locking requirements more
- expand uno_foo() docs to include return type and parameters
- expand uno_intr() docs
- add uno_tick()
- fix various typoes
 1.5 12-Aug-2019  mrg remove mention of dv_private and note that usbnet must be first.
fix Ethernet capitalisation in one place.
 1.4 11-Aug-2019  wiz Minor fixes.
 1.3 11-Aug-2019  mrg minor rewording of a few places and add a new section to describe
the type of changes required to port a driver to usbnet interfaces.
 1.2 11-Aug-2019  wiz Various fixes: Pp cleanup, use more macros, sort sections,
fix typos, Americanize spelling (like other man pages), fix macro arguments.
 1.1 10-Aug-2019  mrg usbnet may be stable now. document it.
 1.9.2.2 01-Sep-2019  martin Pull up following revision(s) (requested by mrg in ticket #135):

distrib/sets/lists/comp/mi 1.2279
distrib/sets/lists/modules/mi 1.123
share/man/man9/Makefile 1.438
share/man/man9/usbnet.9 1.1-1.9
sys/dev/ic/rndisreg.h 1.3
sys/dev/usb/TODO 1.47-1.52
sys/dev/usb/TODO.usbmp 1.15,1.16
sys/dev/usb/files.usb 1.157-1.167
sys/dev/usb/if_aue.c 1.155-1.161
sys/dev/usb/if_auereg.h 1.30-1.32
sys/dev/usb/if_axe.c 1.103-1.119
sys/dev/usb/if_axen.c 1.51-1.53,1.55-1.67
sys/dev/usb/if_axenreg.h 1.15
sys/dev/usb/if_cdce.c 1.54-1.67
sys/dev/usb/if_cue.c 1.85,1.86
sys/dev/usb/if_cuereg.h 1.23
sys/dev/usb/if_kue.c 1.97-1.100
sys/dev/usb/if_kuereg.h 1.23,1.24
sys/dev/usb/if_mue.c 1.51-1.55
sys/dev/usb/if_muereg.h 1.6
sys/dev/usb/if_muevar.h 1.9
sys/dev/usb/if_smsc.c 1.46-1.61
sys/dev/usb/if_smscreg.h 1.6
sys/dev/usb/if_smscvar.h delete
sys/dev/usb/if_udav.c 1.60-1.71
sys/dev/usb/if_udavreg.h 1.14,1.15
sys/dev/usb/if_upl.c 1.65,1.66
sys/dev/usb/if_ure.c 1.15-1.31
sys/dev/usb/if_urevar.h 1.4,1.5
sys/dev/usb/if_url.c 1.67-1.70
sys/dev/usb/if_urlreg.h 1.14
sys/dev/usb/if_urndis.c 1.22-1.33
sys/dev/usb/if_urtwn.c 1.72
sys/dev/usb/ohci.c 1.290
sys/dev/usb/uhub.c 1.143
sys/dev/usb/usb.c 1.180
sys/dev/usb/usb.h 1.118
sys/dev/usb/usb_mem.c 1.71
sys/dev/usb/usb_subr.c 1.238,1.239
sys/dev/usb/usbdevs 1.772
sys/dev/usb/usbdi.c 1.183,1.186
sys/dev/usb/usbdi.h 1.97
sys/dev/usb/usbdi_util.c 1.75
sys/dev/usb/usbhist.h 1.5,1.6
sys/dev/usb/usbnet.c 1.1-1.24
sys/dev/usb/usbnet.h 1.1-1.14
sys/dev/usb/usbroothub.c 1.9
sys/dev/usb/xhci.c 1.109,1.110
sys/modules/Makefile 1.223
sys/modules/usbnet/Makefile 1.1

usbnet(9): Add common framework for USB network devices.
This bring various safety fixes to all updated drivers,
and includes locking clean up, detach safety when being
used or not, separate rx/tx locks to improve performance,
porting to NET_MPSAFE, many edge/error case bugs in
drivers fixed, as well as resovling PRs 54303 and 54308.
These drivers are converted: axe(4), axen(4), aue(4),
cdce(4), cue(4), kue(4), mue(4), smsc(4), udav(4),
upl(4), ure(4), url(4), and urndis(4).
 1.9.2.1 23-Aug-2019  martin file usbnet.9 was added on branch netbsd-9 on 2019-09-01 13:00:37 +0000
 1.11.2.2 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.11.2.1 20-Mar-2020  martin file usbnet.9 was added on branch phil-wifi on 2020-04-13 08:03:26 +0000
 1.9 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.8 17-Feb-2007  yamt branches: 1.8.10; 1.8.12;
need_resched -> cpu_need_resched
 1.7 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.6 26-Jun-2003  wiz -indent -> -offset indent.
 1.5 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.4 07-Apr-2003  wiz More e.g. cleanup. Igor Sobrado, PR 19692.
 1.3 11-Nov-2002  gmcgarry Fix Xref formatting
 1.2 27-Sep-2002  wiz Begin new sentences on new lines; drop trailing whitespace; some mdoc
and typo fixes.
 1.1 22-Sep-2002  gmcgarry Document the details of the scheduler.
 1.8.12.1 18-May-2008  yamt sync with head.
 1.8.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.2 06-Apr-2019  wiz branches: 1.2.2;
Fix short description.
 1.1 06-Apr-2019  thorpej Overhaul the API used to fetch and store individual memory cells in
userspace. The old fetch(9) and store(9) APIs (fubyte(), fuword(),
subyte(), suword(), etc.) are retired and replaced with new ufetch(9)
and ustore(9) APIs that can return proper error codes, etc. and are
implemented consistently across all platforms. The interrupt-safe
variants are no longer supported (and several of the existing attempts
at fuswintr(), etc. were buggy and not actually interrupt-safe).

Also augmement the ucas(9) API, making it consistently available on
all plaforms, supporting uniprocessor and multiprocessor systems, even
those that do not have CAS or LL/SC primitives.

Welcome to NetBSD 8.99.37.
 1.2.2.2 10-Jun-2019  christos Sync with HEAD
 1.2.2.1 06-Apr-2019  christos file ustore.9 was added on branch phil-wifi on 2019-06-10 22:05:42 +0000
 1.115 04-Feb-2024  mrg update my email address.
 1.114 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.113 18-Mar-2017  riastradh Use `\(em', not `--'.

Refill sentences and tweak wording where appropriate while here.
 1.112 05-Jan-2017  wiz branches: 1.112.2;
New sentence, new line.
 1.111 02-Jan-2017  cherry Document sys/uvm/uvm_init.c:uvm_md_init()
 1.110 23-Mar-2015  riastradh branches: 1.110.2;
Reorganize UFP_* flags with markup and more detail.
 1.109 23-Mar-2015  wiz Bump date for previous. Use more markup in AUTHORS section.
 1.108 23-Mar-2015  riastradh Describe UFP_DIRTYONLY and UFP_BACKWARD flags to uvn_findpages.

PR kern/49335
 1.107 02-Jul-2012  jym Document atop(9), ptoa(9), round_page(9) and trunc_page(9).
 1.106 01-Jun-2011  rmind branches: 1.106.4;
Split parts of uvm(9) into uvm_km(9) and uvm_map(9) man pages.

OK mrg@
 1.105 27-Apr-2011  wiz Bump date for uvm_swap_stats() removal; remove superfluous Pp.
 1.104 27-Apr-2011  rmind Remove public uvm_swap_stats() routine, keep it internal.
 1.103 08-Nov-2010  dholland The "active" and "inactive" members of struct uvmexp were removed in
rev. 1.118 of uvm_extern.h with the merge of yamt-pdpolicy in 2006. So
they shouldn't still be documented as part of the structure. Bump date.
 1.102 17-Apr-2010  jruoho branches: 1.102.2;
Add USENIX paper to SEE ALSO.
 1.101 21-Dec-2009  matt uvm_page_physload takes paddr_t's not vaddr_t's.
 1.100 21-Oct-2009  wiz Bump date for uarea swap-out removal.
 1.99 21-Oct-2009  rmind Remove uarea swap-out functionality:

- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code. Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
 1.98 03-Aug-2009  rmind Split descriptions of UBC functions from uvm(9) into separate ubc(9) man page.
 1.97 12-Mar-2009  wiz New sentence, new line.
 1.96 12-Mar-2009  abs Clarify free_list usage in uvm_page_physload() regarding faster/slower RAM.
Slower RAM should be assigned a higher free_list id.
No functional change to code, just comments and manpage
 1.95 12-Mar-2009  joerg Replace Ft br Fn ... Pp dance with simpler .Bl -ohang.
 1.94 09-Nov-2008  wiz branches: 1.94.2;
Bump date for previous.
 1.93 09-Nov-2008  rmind Update uvm_km_suballoc() description.
Also closes PR/38713.
 1.92 06-Aug-2008  skrll s/non-zero/true/,s/zero/false/

where applicable.
 1.91 04-Aug-2008  pooka ubc doesn't require a vnode vm object these days.
 1.90 29-May-2008  mrg remove clause #3 from my license where there are no other
copyright holders involved.
 1.89 02-Dec-2007  wiz branches: 1.89.6; 1.89.8; 1.89.10;
Standardize spelling. Remove superfluous Pp. Fix typo.
 1.88 21-Nov-2007  dsieger Remove extraneous .Ed
 1.87 15-Oct-2007  pooka document ubc_uiomove()
 1.86 10-Oct-2007  pooka * uvn_attach() is a goner
* document UBC_FAULTBUSY
 1.85 11-Aug-2007  pooka branches: 1.85.2;
boolean_t -> bool sweep
 1.84 24-Jun-2007  rumble TRUE -> true, FALSE -> false.
 1.83 06-May-2007  pavel Sync the uvm_fault interface with reality after the removal of the
"fault type" third argument in rev. 1.110 of sys/uvm/uvm_fault.c

Hi Drochner!
 1.82 07-Mar-2007  dogcow running in emulated wizd mode, convert caddr_t to void *.
 1.81 17-Feb-2007  wiz Sort SEE ALSO (by section number first, then by name).
 1.80 16-Feb-2007  rmind - Add link to memoryallocators(9) in kmem_*(9), vmem(9), uvm(9), malloc(9),
pool(9) and pool_cache(9) manuals.
- Sort uvm(9) "SEE ALSO" section.
 1.79 07-Dec-2006  elad Back out uvm_is_swap_device().
 1.78 01-Dec-2006  elad branches: 1.78.2;
Introduce uvm_is_swap_device(), to check if the passed struct vnode * is
used as a swap device or not.

Okay mrg@.
 1.77 13-Oct-2006  wiz Bump date for previous.
 1.76 05-Oct-2006  chs add support for O_DIRECT (I/O directly to application memory,
bypassing any kernel caching for file data).
 1.75 04-Oct-2006  pooka and lo, the uvm_coredump() peril was no more (since almost 5 years ago)
 1.74 13-Jun-2006  yamt uvm_swapin: process -> lwp
 1.73 04-Mar-2006  sketch branches: 1.73.2;
Bump date for previous.
 1.72 27-Feb-2006  sketch Update documentation to reflect reality; uvm_init() runs after the console
has been configured, then cpu_startup() prints the initial copyright banner.
 1.71 29-Jan-2006  rpaulo More ktrace-lwp that I got wrong in the first try.

Thanks to Gregory McGarry for pointing this out.
 1.70 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.69 01-Dec-2005  yamt reflect yamt-readahead changes.
 1.68 25-Sep-2005  jmmv Fix two typos in ubc_alloc.
 1.67 10-Sep-2005  wiz Whitespace nits.
 1.66 13-Aug-2005  jmmv uvm_unmap returns void, not int.
Also drop some spaces before commas, as they ought not to be there.
 1.65 11-May-2005  skrll Grammar.
 1.64 04-Apr-2005  wiz Drop trailing whitespace, typo fix, and some additional articles.
 1.63 01-Apr-2005  yamt bump date for the previous.
 1.62 01-Apr-2005  yamt merge yamt-km-doc branch.
 1.61 11-Mar-2005  rumble Fix a tiny typo.
 1.60 11-Jan-2005  wiz branches: 1.60.2;
We have 2005 now.
 1.59 09-Jan-2005  chs adjust the UBC mapping code to support non-vnode uvm_objects.
this means we can no longer look at the vnode size to determine how many
pages to request in a fault, which is good since for NFS the size can change
out from under us on the server anyway. there's also a new flag UBC_UNMAP
for ubc_release(), so that the file system code can make the decision about
whether to cache mappings for files being used as executables.
 1.58 08-Dec-2004  wiz Actually, undo br/";" changes of previous, they are necessary
because .Ft/.Fn are not used in the SYNOPSIS.
 1.57 08-Dec-2004  wiz Consistency with other man pages: do not break between function type and function;
remove semicolon after function.
Remove superfluous Pp and bump date for uvm_unmap documentation.
 1.56 06-Dec-2004  yamt document uvm_unmap.
 1.55 23-Nov-2004  yamt note that wired pages can't be loaned out.
 1.54 08-Jan-2004  wiz Bump date for previous.
 1.53 07-Jan-2004  atatat Remove more references to the old sysctl infrastructure.
 1.52 19-Dec-2003  pk Document uvm_km_kmemalloc1().
 1.51 13-Nov-2003  wiz Bump date for uvm_useracc removal.
 1.50 13-Nov-2003  chs uvm_useracc() is gone.
 1.49 03-Nov-2003  wiz Use Dv for some defines; replace > with \*[Gt] for HTML.
 1.48 03-Nov-2003  yamt document a recent uvm_pagefree PG_ZERO change.
 1.47 31-Aug-2003  wiz Bump date for previous; use Dv for a #define; add an article for better grammar.
 1.46 31-Aug-2003  enami uvm_map() takes sixth argument `align'.
 1.45 30-Jun-2003  wiz Fixes to make these man page look nice with groff-1.19.
 1.44 14-May-2003  wiz setup -> set up, from jmc@openbsd.
 1.43 03-May-2003  wiz Misc fixes from jmc@openbsd.
 1.42 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.41 16-Apr-2003  wiz Drop trailing space.
 1.40 07-Apr-2003  wiz More e.g. cleanup. Igor Sobrado, PR 19692.
 1.39 06-Apr-2003  wiz SunOS 4. From Igor Sobrado in PR 19820.
 1.38 09-Mar-2003  manu Fix to uvm_map documentation, approved bu Chuck Silvers:
uvm_map size parameter is not in PAGE_SIZE units, it is a multiple of PAGE_SIZE.
 1.37 17-Nov-2002  chs change uvm_uarea_alloc() to indicate whether the returned uarea is already
backed by physical pages (ie. because it reused a previously-freed one),
so that we can skip a bunch of useless work in that case.
this fixes the underlying problem behind PR 18543, and also speeds up fork()
quite a bit (eg. 7% on my pc, 1% on my ultra2) when we get a cache hit.
 1.36 27-Sep-2002  wiz Bump date for recent changes.
Begin new sentences on new lines.
Use .Aq instead of \*[Lt]\*[Gt] if possible.
 1.35 22-Sep-2002  chs document new stuff:
UVM_KMF_CANFAIL, uvm_uarea_alloc(), uvm_uarea_free(), pmap_remove_all().
 1.34 02-Jun-2002  drochner update uvm_page_physload() description for "waitok" and "nsegs"
obeyed now, and clarify "rlist" initialization.
 1.33 29-Mar-2002  manu Added uvm_swap_stats()
 1.32 21-Feb-2002  reinoud Add the missing `int free_list' argument to the uvm_page_physadd() in the
documentation.
 1.31 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.30 05-Jan-2002  deberg fix typo
 1.29 26-Dec-2001  wiz Drop some .Pp, sort sections.
 1.28 24-Dec-2001  jdolecek Some basic documentation of uvm_loan() and uvm_unloan()
 1.27 17-Aug-2001  chs put back a sentence that was accidentally removed.
 1.26 28-Jul-2001  chs update uvm_pagealloc() and uvmspace_exec() arguments.
add "void" to functions which take no arguments.
untabify flags lists.
 1.25 28-Jul-2001  chs vm_map_t -> struct vm_map *.
add UBC interfaces.
 1.24 21-Jun-2001  jdolecek s/by published/published by/
 1.23 21-Jun-2001  wiz Fix typos, punctuation and whitespace.
 1.22 12-May-2001  wiz Refer pmap(9), not pmap_init(9).
 1.21 06-May-2001  gmcgarry pmap(9) does exist now
 1.20 25-Apr-2001  simonb Spell occurred correctly.
 1.19 21-Apr-2001  jdolecek update prototype for uvm_map_pageable()
XXX there are probably more things which need an update here
 1.18 06-Apr-2001  wiz Two typos.
 1.17 23-Mar-2001  drochner remove the "STANDARD UVM RETURN VALUES" section which is not true anymore
 1.16 23-Mar-2001  drochner update uvm_vslock arguments and return value
 1.15 21-Sep-2000  ad Use .{B,Bs,F,N,O}x and fix miscellaneous errors.
 1.14 29-Jun-2000  mrg <vm/vm.h> is gone. fix a few minor errors.
 1.13 07-May-2000  mrg branches: 1.13.4;
feex speeling eroor
 1.12 05-Apr-2000  enami - Remove empty line before .Pp
- Remove .Pp before .Sh
 1.11 05-Apr-2000  enami Add missing reset nS to 0.
 1.10 04-Apr-2000  kleink Typo.
 1.9 29-Mar-2000  deberg fix UVM whatis entry, fixes kern/9692
 1.8 26-Mar-2000  kleink Update for uvm object offsets being described by voff_t's.
 1.7 06-May-1999  hwr s/described in papers published Sun Microsystems/described in papers published
by Sun Microsystems/
 1.6 16-Mar-1999  garbled More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.5 14-Aug-1998  eeh Document vm_offset_t => {vaddr_t,paddr_t} changes in the interface.
 1.4 09-May-1998  kleink Use size_t to pass the length of the memory region to operate on to chgkprot(),
kernacc(), useracc(), vslock() and vsunlock(); (unsigned) ints are not
adequate on all platforms.
 1.3 09-May-1998  mrg uvm_swapout is a static function, not exported. does not belong in uvm.9
 1.2 08-May-1998  kleink Fix a couple of prototypes, and sync with the recent vslock()/vsunlock()
interface change. Also, add an item for uvm_swapout().
 1.1 04-May-1998  mrg add uvm.9
 1.13.4.1 04-Apr-2001  he Pull up revision 1.16 (requested by drochner):
Update uvm_vslock arguments and return value.
 1.60.2.1 18-Feb-2005  yamt document changes on yamt-km branch.
 1.73.2.1 19-Jun-2006  chap Sync with head.
 1.78.2.2 12-May-2007  snj Pull up following revision(s) (requested by pavel in ticket #623):
share/man/man9/uvm.9: revision 1.83
Sync the uvm_fault interface with reality after the removal of the
"fault type" third argument in rev. 1.110 of sys/uvm/uvm_fault.c
Hi Drochner!
 1.78.2.1 09-Dec-2006  bouyer Pull up following revision(s) (requested by elad in ticket #261):
sys/uvm/uvm_extern.h: revision 1.123
sys/uvm/uvm_swap.c: revision 1.115
share/man/man9/uvm.9: revision 1.79
Back out uvm_is_swap_device().
 1.85.2.2 09-Jan-2008  matt sync with HEAD
 1.85.2.1 06-Nov-2007  matt sync with HEAD
 1.89.10.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.89.10.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.89.8.1 04-Jun-2008  yamt sync with head
 1.89.6.2 05-Oct-2008  mjf Sync with HEAD.
 1.89.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.94.2.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.102.2.4 09-Nov-2010  uebayasi Sync with HEAD.
 1.102.2.3 02-Nov-2010  uebayasi Drop the 'paddr_t avail_start' and 'paddr_t avail_end' arguments
from uvm_page_physload_device(9).

Those two arguments are used by uvm_page_physload(9) to specify a
range of physical memory available for general purpose pages (pages
which are linked to freelists). Totally irrelevant to device
segments.
 1.102.2.2 21-Oct-2010  uebayasi Document uvm_page_physload_device(9).
 1.102.2.1 17-Apr-2010  uebayasi file uvm.9 was added on branch uebayasi-xip on 2010-10-21 17:16:28 +0000
 1.106.4.2 30-Oct-2012  yamt sync with head
 1.106.4.1 02-Dec-2011  yamt update
 1.110.2.2 20-Mar-2017  pgoyette Sync with HEAD
 1.110.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.112.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.6 17-Jan-2020  skrll Add '_p' to uvm_physseg_valid to match the function. Bump date.
 1.5 30-Nov-2019  riastradh Use .Sy, not .Em, for bold-faced WARNING of impending doom.

Underline and, worse, italic aren't as good at catching the eye.
 1.4 24-Dec-2016  wiz branches: 1.4.2; 1.4.16;
Fix SYNOPSIS. Fix xref. Avoid Xr for itself.
 1.3 24-Dec-2016  abhinav Fix a sentence
Make some makrup improvments to make mandoc -Tlint happy
Sort xrefs in SEE ALSO
 1.2 19-Dec-2016  wiz Various improvements.

New sentence, new line.
Better punctuation.
More appropriate macros.
More markup.
 1.1 19-Dec-2016  cherry This is a preview of the uvm_hotplug(9) api code.
This commit does not actually introduce the UVM_HOTPLUG option.
However it does provide developers a way to review, test and try out
the API.

To do this, please go to tests/sys/uvm/ and build and run the tests
there. The tests also have a set of basic load tests, to get a measure
of the performance penalties due to enabling the UVM_HOTPLUG option.

In order to build the tests you need to have at least done the
following in $SRC/

cd $SRC; $NBMAKE do-distrib-dirs includes
cd $SRC/lib/csu; $NBMAKE all install || exit
cd $SRC/external/gpl3/gcc/lib/libgcc/libgcc_s; $NBMAKE all install || exit
cd $SRC/external/gpl3/gcc/lib/libgcc/libgcc; $NBMAKE all install || exit
cd $SRC/lib/libc; $NBMAKE includes all install || exit
cd $SRC/lib/libpthread; $NBMAKE all install || exit
cd $SRC/lib/libm; $NBMAKE all install || exit
cd $SRC/external/gpl3/gcc/lib/libstdc++-v3/; $NBMAKE all install || exit

Once the development environment has these userspace libraries, one
can simple build using $NBMAKE and finally test the kernel API using

atf-run|atf-report
 1.4.16.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.4.2.2 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.4.2.1 24-Dec-2016  pgoyette file uvm_hotplug.9 was added on branch pgoyette-localcount on 2017-01-07 08:56:08 +0000
 1.5 15-Aug-2015  maxv Mention UVM_KMF_EXEC.
 1.4 08-Jan-2015  riastradh Clarify uvm_km_alloc is contiguous and zero result means fail.
 1.3 14-May-2014  riastradh branches: 1.3.2;
Fix typo in uvm_km(9): there is no struct vm_map_kernel.
 1.2 03-Jun-2011  rmind branches: 1.2.4; 1.2.8; 1.2.18;
Sync (mostly, not fully) uvm_km(9) and uvm_map(9) man pages with reality.
 1.1 01-Jun-2011  rmind branches: 1.1.2;
Split parts of uvm(9) into uvm_km(9) and uvm_map(9) man pages.

OK mrg@
 1.1.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.2.18.1 10-Aug-2014  tls Rebase.
 1.2.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.4.2 14-Apr-2015  msaitoh Pull up following revision(s) (requested by riastradh in ticket #1275):
share/man/man9/uvm_km.9: revision 1.4
Clarify uvm_km_alloc is contiguous and zero result means fail.
 1.2.4.1 29-Sep-2014  msaitoh Pull up following revision(s) (requested by riastradh in ticket #1126):
share/man/man9/uvm_km.9: revision 1.3
Fix typo in uvm_km(9): there is no struct vm_map_kernel.
 1.3.2.1 18-Mar-2015  snj Pull up following revision(s) (requested by riastradh in ticket #613):
share/man/man9/uvm_km.9: revision 1.4
Clarify uvm_km_alloc is contiguous and zero result means fail.
 1.12 27-Aug-2020  fcambus Fix a bunch of typos in various kernel man pages.
 1.11 20-Aug-2018  riastradh Clarify reference counting of uvm_map.
 1.10 20-May-2017  wiz branches: 1.10.8; 1.10.10;
New sentence, new line. Bump date for previous.
 1.9 20-May-2017  chs MAP_FIXED means something different for mremap() than it does for mmap(),
so we cannot use UVM_FLAG_FIXED to specify both behaviors.
keep UVM_FLAG_FIXED with its earlier meaning (prior to my previous change)
of whether to use uvm_map_findspace() to locate space for the new mapping or
to use the hint address that the caller passed in, and add a new flag
UVM_FLAG_UNMAP to indicate that any existing entries in the range should be
unmapped as part of creating the new mapping. the new UVM_FLAG_UNMAP flag
may only be used if UVM_FLAG_FIXED is also specified.
 1.8 14-May-2017  wiz Bump date for previous.
 1.7 06-May-2017  joerg Extend the mmap(2) interface to allow requesting protections for later
use with mprotect(2), but without enabling them immediately.

Extend the mremap(2) interface to allow duplicating mappings, i.e.
create a second range of virtual addresses references the same physical
pages. Duplicated mappings can have different effective protections.

Adjust PAX mprotect logic to disallow effective protections of W&X, but
allow one mapping W and another X protections. This obsoletes using
temporary files for purposes like JIT.

Adjust PAX logic for mmap(2) and mprotect(2) to fail if W&X is requested
and not silently drop the X protection.

Improve test cases to ensure correct operation of the changed
interfaces.
 1.6 12-Sep-2014  riastradh branches: 1.6.6;
Fix typo: mask, not mark.
 1.5 21-May-2014  wiz branches: 1.5.2;
Bump date for previous. Americanize a spelling.
 1.4 20-May-2014  riastradh Miscellaneous markup, speling and grammar fix.
 1.3 20-May-2014  riastradh Split large paragraph about uobj/uoffset into a bulleted list.

Mention that uvm_map doesn't add a reference to uobj. Evidently this
information is important, since I just wasted countless hours over
the past months investigating kernel memory corruption arising from a
failure to notice this fact.
 1.2 03-Jun-2011  rmind branches: 1.2.4; 1.2.8; 1.2.18;
Sync (mostly, not fully) uvm_km(9) and uvm_map(9) man pages with reality.
 1.1 01-Jun-2011  rmind branches: 1.1.2;
Split parts of uvm(9) into uvm_km(9) and uvm_map(9) man pages.

OK mrg@
 1.1.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.2.18.1 10-Aug-2014  tls Rebase.
 1.2.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.2.4.2 27-Oct-2014  msaitoh Pull up following revision(s) (requested by riastradh in ticket #1154):
share/man/man9/uvm_map.9: revision 1.6
Fix typo: mask, not mark.
 1.2.4.1 29-Sep-2014  msaitoh Pull up following revision(s) (requested by riastradh in ticket #1125):
share/man/man9/uvm_map.9: revision 1.3
share/man/man9/uvm_map.9: revision 1.4
share/man/man9/uvm_map.9: revision 1.5
Split large paragraph about uobj/uoffset into a bulleted list.
Mention that uvm_map doesn't add a reference to uobj. Evidently this
information is important, since I just wasted countless hours over
the past months investigating kernel memory corruption arising from a
failure to notice this fact.
Miscellaneous markup, speling and grammar fix.
Bump date for previous. Americanize a spelling.
 1.5.2.1 21-Sep-2014  snj Pull up following revision(s) (requested by riastradh in ticket #103):
share/man/man9/uvm_map.9: revision 1.6
Fix typo: mask, not mark.
 1.6.6.2 19-May-2017  pgoyette Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)
 1.6.6.1 11-May-2017  pgoyette Sync with HEAD
 1.10.10.1 10-Jun-2019  christos Sync with HEAD
 1.10.8.1 06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.2 14-Jun-2024  uwe uvm_obj_wirepages(9): fix a couple of markup glitches
 1.1 14-Jun-2024  riastradh uvm_obj_wirepages(9): New man page.
 1.15 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.14 08-Jan-2010  pooka Remove documentation for removed macros.
 1.13 08-Jan-2010  pooka fix markup (this is how i have enough things to commit)
 1.12 08-Jan-2010  pooka * update copypasted struct vattr (nobody wants manpages autogenerated
from interface descriptions because then we'd all be out of
things to commit)
* make "CODE REFERENCES" make a little more sense
 1.11 22-Apr-2009  elad There is no vfs_subr2.c.
 1.10 30-Apr-2008  martin branches: 1.10.6;
Convert TNF licenses to new 2 clause variant
 1.9 24-Jan-2008  tnn branches: 1.9.4; 1.9.6;
vattr_null lives in vfs_subr2.c now.
 1.8 24-Jun-2007  rumble branches: 1.8.4;
Add va_birthtime.
 1.7 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.6 06-Apr-2003  wiz Fix a typo, from Igor Sobrado in PR 19680.
 1.5 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.4 14-Oct-2002  wiz New sentence, new line.
 1.3 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.2 22-Oct-2001  wiz Whitespace, punctuation fixes; sort sections, fix xrefs.
 1.1 22-Oct-2001  gmcgarry Programmer's guide to the VFS interface.
 1.8.4.1 23-Mar-2008  matt sync with HEAD
 1.9.6.1 18-May-2008  yamt sync with head.
 1.9.4.1 02-Jun-2008  mjf Sync with HEAD.
 1.10.6.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.2 13-Feb-2006  wiz mdoc and wording improvements.
 1.1 12-Feb-2006  macallan crude attempt on a man page for the generic virtual consoles framework
 1.29 09-Dec-2015  maxv Rename verified_exec.c -> veriexec.c.

The old log is now in Attic/.
 1.28 13-Feb-2015  maxv Rename kern_verifiedexec.c to kern_veriexec.c. "Veriexec" is the name of
the subsystem, not "Verifiedexec".

The revisions of kern_verifiedexec.c are now in Attic/.

No change between kern_verifiedexec.c and kern_veriexec.c.

Also, update the man page accordingly.

Okayed by christos@ and blymn@ some months ago.
 1.27 18-Mar-2014  riastradh branches: 1.27.4;
Merge riastradh-drm2 to HEAD.
 1.26 20-Jul-2013  wiz Use Mt for email addresses.
 1.25 18-Mar-2011  jruoho branches: 1.25.4; 1.25.10; 1.25.14;
Fix xref; security(8) -> security(7).
 1.24 13-Apr-2010  jruoho branches: 1.24.2;
Bump date for previous.
 1.23 13-Apr-2010  jruoho Provide prototypes in SYNOPSIS; use only parameter names in FUNCTIONS.
 1.22 13-May-2009  wiz Expand abbreviation in subsection header.
 1.21 15-Mar-2009  joerg Specify all columns in .Bl -column.
 1.20 12-Mar-2009  joerg Fix markup.
 1.19 28-May-2008  snj branches: 1.19.4;
Fix a spelling error.
 1.18 10-Feb-2008  elad branches: 1.18.4; 1.18.6; 1.18.8;
Xref security(8) from veriexec(4), veriexec(9), veriexecctl(8), and
veriexecgen(8).

Suggested by Matthew Mondor.
 1.17 11-Aug-2007  pooka branches: 1.17.2;
boolean_t -> bool sweep
 1.16 24-Jun-2007  rumble TRUE -> true, FALSE -> false.
 1.15 19-May-2007  christos catch up with argument shuffle.
 1.14 15-May-2007  elad Some Veriexec stuff that's been rotting in my tree for months.

Bug fixes:
- Fix crash reported by Scott Ellis on current-users@.

- Fix race conditions in enforcing the Veriexec rename and remove
policies. These are NOT security issues.

- Fix memory leak in rename handling when overwriting a monitored
file.

- Fix table deletion logic.

- Don't prevent query requests if not in learning mode.


KPI updates:
- fileassoc_table_run() now takes a cookie to pass to the callback.

- veriexec_table_add() was removed, it is now done internally. As a
result, there's no longer a need for VERIEXEC_TABLESIZE.

- veriexec_report() was removed, it is now internal.

- Perform sanity checks on the entry type, and enforce default type
in veriexec_file_add() rather than in veriexecctl.

- Add veriexec_flush(), used to delete all Veriexec tables, and
veriexec_dump(), used to fill an array with all Veriexec entries.


New features:
- Add a '-k' flag to veriexecctl, to keep the filenames in the kernel
database. This allows Veriexec to produce slightly more accurate
logs under certain circumstances. In the future, this can be either
replaced by vnode->pathname translation, or combined with it.

- Add a VERIEXEC_DUMP ioctl, to dump the entire Veriexec database.
This can be used to recover a database if the file was lost.
Example usage:

# veriexecctl dump > /etc/signatures

Note that only entries with the filename kept (that is, were loaded
with the '-k' flag) will be dumped.

Idea from Brett Lymn.

- Add a VERIEXEC_FLUSH ioctl, to delete all Veriexec entries. Sample
usage:

# veriexecctl flush

- Add a 'veriexec_flags' rc(8) variable, and make its default have
the '-k' flag. On systems using the default signatures file
(generaetd from running 'veriexecgen' with no arguments), this will
use additional 32kb of kernel memory on average.

- Add a '-e' flag to veriexecctl, to evaluate the fingerprint during
load. This is done automatically for files marked as 'untrusted'.


Misc. stuff:
- The code for veriexecctl was massively simplified as a result of
eliminating the need for VERIEXEC_TABLESIZE, and now uses a single
pass of the signatures file, making the loading somewhat faster.

- Lots of minor fixes found using the (still under development)
Veriexec regression testsuite.

- Some of the messages Veriexec prints were improved.

- Various documentation fixes.


All relevant man-pages were updated to reflect the above changes.

Binary compatibility with existing veriexecctl binaries is maintained.
 1.13 11-Jan-2007  elad veriexec_file_delete() and veriexec_table_delete() now take 'struct lwp *'
too.
 1.12 30-Dec-2006  elad Add veriexe_openchk().
 1.11 26-Dec-2006  elad veriexec_lookup() should not return an internal data-structure, but rather
just a boolean value.
 1.10 20-Dec-2006  elad Markup fix - forgot 'Fn'.
 1.9 01-Dec-2006  elad branches: 1.9.2;
Trailing whitespace...
 1.8 30-Nov-2006  elad Sync with reality after recent changes.
 1.7 26-Nov-2006  elad Implement Veriexec's raw disk policy on-top of kauth(9)'s device scope,
using both the rawio_spec and passthru actions to detect raw disk
activity. Same for kernel memory policy.

Update documentation (no longer need to expose veriexec_rawchk()) and
remove all Veriexec-related bits from specfs.
 1.6 26-Nov-2006  elad I wanted to do this for so long: veriexec_init_fp_ops() -> veriexec_init().
 1.5 16-Sep-2006  elad Reference veriexecgen(8). Bump date.
 1.4 11-Aug-2006  christos Pretending to be Elad's keyboard:

fileassoc.diff adds a fileassoc_table_run() routine that allows you to
pass a callback to be called with every entry on a given mount.

veriexec.diff adds some raw device access policies: if raw disk is
opened at strict level 1, all fingerprints on this disk will be
invalidated as a safety measure. level 2 will not allow opening disk
for raw writing if we monitor it, and prevent raw writes to memory.
level 3 will not allow opening any disk for raw writing.

both update all relevant documentation.

veriexec concept is okay blymn@.
 1.3 29-Jul-2006  wiz branches: 1.3.2;
Use Dv for defined values. Add commas between SEE ALSO entries.
Remove trailing whitespace. Punctuation nits.
 1.2 26-Jul-2006  elad document data-structures, defines, and a macro.
 1.1 25-Jul-2006  elad first take at veriexec(9) man page, finally documenting some more
internals.
 1.3.2.1 14-Aug-2006  tron Pull up following revision(s) (requested by elad in ticket #15):
sys/miscfs/specfs/spec_vnops.c: revision 1.88
share/man/man9/fileassoc.9: revision 1.7
sys/kern/kern_verifiedexec.c: revision 1.66
sys/sys/verified_exec.h: revision 1.39
sys/sys/fileassoc.h: revision 1.3
lib/libc/gen/sysctl.3: revision 1.178
share/man/man9/veriexec.9: revision 1.4
sys/kern/kern_fileassoc.c: revision 1.6
Pretending to be Elad's keyboard:
fileassoc.diff adds a fileassoc_table_run() routine that allows you to
pass a callback to be called with every entry on a given mount.
veriexec.diff adds some raw device access policies: if raw disk is
opened at strict level 1, all fingerprints on this disk will be
invalidated as a safety measure. level 2 will not allow opening disk
for raw writing if we monitor it, and prevent raw writes to memory.
level 3 will not allow opening any disk for raw writing.
both update all relevant documentation.
veriexec concept is okay blymn@.
 1.9.2.4 19-Jan-2007  bouyer Pull up following revision(s) (requested by elad in ticket #362):
sys/dev/verified_exec.c: revision 1.57
sys/sys/verified_exec.h: revision 1.53
sys/kern/kern_verifiedexec.c: revision 1.94
share/man/man9/veriexec.9: revision 1.13
veriexec_file_delete() and veriexec_table_delete() now take 'struct lwp *'
too.
 1.9.2.3 06-Jan-2007  bouyer Pull up following revision(s) (requested by elad in ticket #320):
share/man/man9/veriexec.9: revision 1.12
Add veriexe_openchk().
 1.9.2.2 04-Jan-2007  bouyer Pull up following revision(s) (requested by elad in ticket #310):
sys/kern/kern_verifiedexec.c: revision 1.85
share/man/man9/veriexec.9: revision 1.11
sys/sys/verified_exec.h: revision 1.47
veriexec_lookup() should not return an internal data-structure, but rather
just a boolean value.
 1.9.2.1 20-Dec-2006  bouyer Pull up following revision(s) (requested by elad in ticket #292):
share/man/man9/veriexec.9: revision 1.10
Markup fix - forgot 'Fn'.
 1.17.2.1 23-Mar-2008  matt sync with HEAD
 1.18.8.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.18.6.1 04-Jun-2008  yamt sync with head
 1.18.4.1 02-Jun-2008  mjf Sync with HEAD.
 1.19.4.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.24.2.2 13-Apr-2010  jruoho Bump date for previous.
 1.24.2.1 13-Apr-2010  jruoho file veriexec.9 was added on branch uebayasi-xip on 2010-04-13 07:16:32 +0000
 1.25.14.1 23-Jul-2013  riastradh sync with HEAD
 1.25.10.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.25.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.27.4.1 19-May-2015  snj Pull up following revision(s) (requested by maxv in ticket #764):
sbin/veriexecctl/veriexecctl.c: revision 1.38
share/man/man9/veriexec.9: revision 1.10
sys/conf/files: revision 1.1128
sys/dev/verified_exec.c: revisions 1.70, 1.71
sys/kern/kern_veriexec.c: revisions 1.1-1.8
sys/kern/kern_verifiedexec.c: delete
Rename kern_verifiedexec.c to kern_veriexec.c. "Veriexec" is the name of
the subsystem, not "Verifiedexec".

The revisions of kern_verifiedexec.c are now in Attic/.

No change between kern_verifiedexec.c and kern_veriexec.c.

Also, update the man page accordingly.

Okayed by christos@ and blymn@ some months ago.
--
KNF
--
Don't mix veriexec lock and file lock in veriexec_file_verify().

Now:
- 'veriexec_op_lock' needs to be held when calling veriexec_file_verify()
- the 'file_lock_state' argument indicates if the file is locked
- add some KASSERTs
--
Instead of duplicating code, add veriexec_fp_status(). Also reorder a
useless goto.
--
Make veriexec_renamechk() more readable. Also add a KASSERT on vte_count.

No real functional change
--
If we already have an entry for the file being loaded, return EEXIST, don't
silently skip it.
--
Remove FreeBSD.

ok elad@
--
KASSERT x then y, not (x && y).
--
KNF
--
Not to add even more confusion in an already overcomplicated subsystem,
remove the FreeBSD code. This code is likely to be outdated, and Veriexec
is in all cases not available on FreeBSD.
--
Be a bit more verbose if the kernel rejects a file
 1.7 23-May-2024  pgoyette branches: 1.7.4;
s/and/an/
 1.6 20-May-2024  christos explain what the current and new numbering practice are.
 1.5 14-Jul-2023  rillig versioningsyscalls.9: fix typo
 1.4 10-Jul-2023  uwe versioningsyscalls(9): wrap long line in the example
 1.3 10-Jul-2023  christos Forgot to commit the expanded userland portion
 1.2 09-Jul-2023  uwe versioningsyscalls(9): markup fixes

While here, fix the pasto for the new ino_t and time_t size.
 1.1 08-Jul-2023  christos Document how system call versioning is done. From this summer's compat-linux
GSoC, by Theodore Preduta.
 1.7.4.2 20-Sep-2024  martin Pull up following revision(s) (requested by rin in ticket #887):

share/man/man9/versioningsyscalls.9: revision 1.1
share/man/man9/versioningsyscalls.9: revision 1.2
share/man/man9/versioningsyscalls.9: revision 1.3
share/man/man9/versioningsyscalls.9: revision 1.4
share/man/man9/versioningsyscalls.9: revision 1.5
share/man/man9/versioningsyscalls.9: revision 1.6
share/man/man9/versioningsyscalls.9: revision 1.7
share/man/man9/Makefile: revision 1.467
distrib/sets/lists/comp/mi: revision 1.2435
distrib/sets/lists/comp/mi: revision 1.2436

Document how system call versioning is done. From this summer's compat-linux
GSoC, by Theodore Preduta.

fix typo
versioningsyscalls(9): markup fixes

While here, fix the pasto for the new ino_t and time_t size.

Forgot to commit the expanded userland portion

versioningsyscalls(9): wrap long line in the example

versioningsyscalls.9: fix typo

explain what the current and new numbering practice are.

s/and/an/
 1.7.4.1 23-May-2024  martin file versioningsyscalls.9 was added on branch netbsd-10 on 2024-09-20 11:00:20 +0000
 1.8 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.7 25-Feb-2003  wiz branches: 1.7.32; 1.7.34;
.Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
 1.6 14-Oct-2002  wiz New sentence, new line.
 1.5 20-Aug-2002  wiz Remove Ns.
 1.4 15-Aug-2002  wiz Comma-separate entries in SEE ALSO.
 1.3 14-Aug-2002  soren Misc fixes.
Cross-reference v*ops.9.
 1.2 22-Oct-2001  wiz Whitespace, punctuation fixes; sort sections, fix xrefs.
 1.1 22-Oct-2001  gmcgarry Programmer's guide to the VFS interface.
 1.7.34.1 18-May-2008  yamt sync with head.
 1.7.32.1 02-Jun-2008  mjf Sync with HEAD.
 1.4 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.3 16-Jan-2006  yamt branches: 1.3.20; 1.3.22;
add a missing .El
 1.2 23-Sep-2005  wiz Fix Dt abuse.
 1.1 23-Sep-2005  jmmv Apply the NFS exports list rototill patch:

- Remove all NFS related stuff from file system specific code.
- Drop the vfs_checkexp hook and generalize it in the new nfs_check_export
function, thus removing redundancy from all file systems.
- Move all NFS export-related stuff from kern/vfs_subr.c to the new
file sys/nfs/nfs_export.c. The former was becoming large and its code
is always compiled, regardless of the build options. Using the latter,
the code is only compiled in when NFSSERVER is enabled. While doing this,
also make some functions in nfs_subs.c conditional to NFSSERVER.
- Add a new command in nfssvc(2), called NFSSVC_SETEXPORTSLIST, that takes a
path and a set of export entries. At the moment it can only clear the
exports list or append entries, one by one, but it is done in a way that
allows setting the whole set of entries atomically in the future (see the
comment in mountd_set_exports_list or in doc/TODO).
- Change mountd(8) to use the nfssvc(2) system call instead of mount(2) so
that it becomes file system agnostic. In fact, all this whole thing was
done to remove a 'XXX' block from this utility!
- Change the mount*, newfs and fsck* userland utilities to not deal with NFS
exports initialization; done internally by the kernel when initializing
the NFS support for each file system.
- Implement an interface for VFS (called VFS hooks) so that several kernel
subsystems can run arbitrary code upon receipt of specific VFS events.
At the moment, this only provides support for unmount and is used to
destroy NFS exports lists from the file systems being unmounted, though it
has room for extension.

Thanks go to yamt@, chs@, thorpej@, wrstuden@ and others for their comments
and advice in the development of this patch.
 1.3.22.1 18-May-2008  yamt sync with head.
 1.3.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.53 28-Aug-2020  hannken Another typo -- its vfs_newvnode().
 1.52 27-Aug-2020  fcambus Fix a bunch of typos in various kernel man pages.
 1.51 07-Aug-2020  christos Catch up with lktype addition.
 1.50 04-Jul-2020  christos add missing arg
 1.49 01-Jan-2019  hannken Add "void *extra" argument to vcache_new() so a file system may
pass more information about the file to create.

Welcome to 8.99.30
 1.48 03-Jul-2017  wiz branches: 1.48.4; 1.48.6;
Remove workaround for ancient HTML generation code.
 1.47 12-Jul-2015  hannken Operations getnewvnode() and ungetnewvnode() have been replaced with vcache.
- Remove now obsolete functions getnewvnode() and ungetnewvnode().
- Document vcache operations.

Welcome to 7.99.20
 1.46 13-Feb-2012  wiz Bump date for previous.
 1.45 13-Feb-2012  njoly Fix copyin/copyout sections in xrefs.
 1.44 13-Feb-2012  dholland Quota-related docs fixes:

- Remove old quotactl(2); replace with new __quotactl(2).
- Document quota_getrestrictions(3), the semantic restriction codes,
and quota_quotaon/off(3).
- Update VFS_QUOTACTL(9), which was still describing the pre-proplib API.

Approved by releng for the freeze.
 1.43 02-Dec-2010  wiz branches: 1.43.6;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.42 22-Apr-2009  elad There is no vfs_subr2.c.
 1.41 17-Mar-2009  joerg Match last row to get correct space for the first column.
 1.40 16-Mar-2009  uwe Don't restrict column width of the last column of the methods table.
nroff does the right thing and properly wrap descriptions that don't fit.
 1.39 16-Mar-2009  uwe Add more semantic markup (Dv, Fa, Va, ...).
 1.38 15-Mar-2009  joerg Convert to mdoc markup.
 1.37 23-Dec-2008  stacktic branches: 1.37.2;
VFS_UMOUNT -> VFS_UNMOUNT; fix typo.
 1.36 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.35 24-Jan-2008  tnn branches: 1.35.4; 1.35.6;
Mention vfs_subr2.c.
 1.34 02-Dec-2007  wiz file system -> filesystem; fix typos.
 1.33 26-Nov-2007  pooka "struct lwp *l" is a goner from VFS/VOP interfaces.
 1.32 31-Jul-2007  pooka branches: 1.32.2; 1.32.4;
VFS_MOUNT():
+ nameidata is a goner
+ document dlen (hi dsl!)
 1.31 20-Jun-2007  pooka There is no p - it's the calling lwp these days.
 1.30 16-Apr-2007  pooka handle vptofh and fhtovp:

* file handles are not only for nfs
* these functions are not allowed to be null
* update description of vptofh to contain the size parameter
(*bump date)
 1.29 07-Mar-2007  dogcow running in emulated wizd mode, convert caddr_t to void *.
 1.28 21-Jan-2007  hannken Add and update documentation for fstrans(9) file system suspension helper.

wiz?
 1.27 04-Oct-2006  pooka ucred -> kauth sweep
 1.26 25-Apr-2006  rtr list -> lists
 1.25 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.24 09-Nov-2005  pooka one thinko: s/VOP_START/VFS_START/
 1.23 23-Sep-2005  wiz Add missing comma. Mark up NULL with Dv.
 1.22 23-Sep-2005  jmmv Apply the NFS exports list rototill patch:

- Remove all NFS related stuff from file system specific code.
- Drop the vfs_checkexp hook and generalize it in the new nfs_check_export
function, thus removing redundancy from all file systems.
- Move all NFS export-related stuff from kern/vfs_subr.c to the new
file sys/nfs/nfs_export.c. The former was becoming large and its code
is always compiled, regardless of the build options. Using the latter,
the code is only compiled in when NFSSERVER is enabled. While doing this,
also make some functions in nfs_subs.c conditional to NFSSERVER.
- Add a new command in nfssvc(2), called NFSSVC_SETEXPORTSLIST, that takes a
path and a set of export entries. At the moment it can only clear the
exports list or append entries, one by one, but it is done in a way that
allows setting the whole set of entries atomically in the future (see the
comment in mountd_set_exports_list or in doc/TODO).
- Change mountd(8) to use the nfssvc(2) system call instead of mount(2) so
that it becomes file system agnostic. In fact, all this whole thing was
done to remove a 'XXX' block from this utility!
- Change the mount*, newfs and fsck* userland utilities to not deal with NFS
exports initialization; done internally by the kernel when initializing
the NFS support for each file system.
- Implement an interface for VFS (called VFS hooks) so that several kernel
subsystems can run arbitrary code upon receipt of specific VFS events.
At the moment, this only provides support for unmount and is used to
destroy NFS exports lists from the file systems being unmounted, though it
has room for extension.

Thanks go to yamt@, chs@, thorpej@, wrstuden@ and others for their comments
and advice in the development of this patch.
 1.21 20-Jul-2005  wiz Bump date for v.
 1.20 20-Jul-2005  pooka statfs -> statvfs
(better late than never)
 1.19 16-Jul-2005  rtr not -> no typo
 1.18 20-Jun-2005  peter Change all .Xr config 8 to .Xr config 1, following the recent move of
config from usr.sbin -> usr.bin.

Reviewed by wiz.
 1.17 20-Jun-2004  hannken branches: 1.17.2;
- Add flag L_COWINPROGRESS to struct lwp to avoid recursion when
doing copy-on-write.

- Change VFS_SNAPSHOT() to return the snapshot vnode locked.

- Make the IO path for copy-on-write and snapshot-read more lightweight.
Avoids deadlocks where vn_rdwr(...READ...) has a shared lock and needs
to copy-on-write.
Avoids deadlocks/panics where to clean pages the copy-on-write needs
to allocate pages for its VOP_PUTPAGES().

L_COWINPROGRESS part approved by: Jason R. Thorpe <thorpej@netbsd.org>
 1.16 25-May-2004  hannken Add ffs internal snapshots. Written by Marshall Kirk McKusick for FreeBSD.

- Not enabled by default. Needs kernel option FFS_SNAPSHOT.
- Change parameters of ffs_blkfree.
- Let the copy-on-write functions return an error so spec_strategy
may fail if the copy-on-write fails.
- Change genfs_*lock*() to use vp->v_vnlock instead of &vp->v_lock.
- Add flag B_METAONLY to VOP_BALLOC to return indirect block buffer.
- Add a function ffs_checkfreefile needed for snapshot creation.
- Add special handling of snapshot files:
Snapshots may not be opened for writing and the attributes are read-only.
Use the mtime as the time this snapshot was taken.
Deny mtime updates for snapshot files.
- Add function transferlockers to transfer any waiting processes from
one lock to another.
- Add vfsop VFS_SNAPSHOT to take a snapshot and make it accessible through
a vnode.
- Add snapshot support to ls, fsck_ffs and dump.

Welcome to 2.0F.

Approved by: Jason R. Thorpe <thorpej@netbsd.org>
 1.15 04-Dec-2003  wiz Bump date for previous (hi atatat!).
 1.14 04-Dec-2003  atatat Garbage collect some references to the old sysctl() infrastructure.
 1.13 06-Sep-2003  yamt use .Fn rather than .Fa for functions.
 1.12 30-Jun-2003  wiz Remove a superfluous space.
 1.11 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.10 06-Apr-2003  gmcgarry Move vfs interface out of vfsops.9 into its own page. Document
it completely.
 1.9 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.8 03-Jan-2003  jschauma Fix typos noted by Igor Sobrado in PR misc/19641 (some already fixed
by others):

MCHTYPE(9) - implemntation (implementation)
VFS_CHECKEXP(9) - specied (specified), acces (access)
VOP_ABORTOP(9) - singla (single), implments (implements),
callling (calling), credientials (credentials)
 1.7 14-Oct-2002  wiz New sentence, new line.
 1.6 15-Aug-2002  wiz Don't xref ourselves in SEE ALSO; separate SEE ALSO entries by comma;
use more mark up in some places.
 1.5 14-Aug-2002  soren Misc fixes.
Cross-reference v*ops.9.
 1.4 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.3 27-Dec-2001  wiz Fix the typo reported in PR #15062 and another one.
 1.2 22-Oct-2001  wiz Whitespace, punctuation fixes; sort sections, fix xrefs.
 1.1 22-Oct-2001  gmcgarry Programmer's guide to the VFS interface.
 1.17.2.1 21-Jul-2005  tron Pull up revision 1.20 (requested by pooka in ticket #605):
statfs -> statvfs
(better late than never)
 1.32.4.2 31-Jul-2007  pooka VFS_MOUNT():
+ nameidata is a goner
+ document dlen (hi dsl!)
 1.32.4.1 31-Jul-2007  pooka file vfsops.9 was added on branch matt-mips64 on 2007-07-31 21:39:57 +0000
 1.32.2.2 23-Mar-2008  matt sync with HEAD
 1.32.2.1 09-Jan-2008  matt sync with HEAD
 1.35.6.1 18-May-2008  yamt sync with head.
 1.35.4.1 02-Jun-2008  mjf Sync with HEAD.
 1.37.2.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.43.6.1 17-Apr-2012  yamt sync with head
 1.48.6.1 10-Jun-2019  christos Sync with HEAD
 1.48.4.1 18-Jan-2019  pgoyette Synch with HEAD
 1.28 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.27 17-Apr-2017  wiz Fix month in Dd.
 1.26 17-Apr-2017  hannken Update vfs_busy(), vfs_unbusy(), vfs_mountalloc() and vfs_rootmountalloc().
 1.25 24-May-2014  wiz branches: 1.25.6; 1.25.10;
End sentence with a dot.
 1.24 24-May-2014  christos Introduce a selector function to the vfs vnode iterator so that we don't
need to vget() vnodes that we are not interested at, and optimize locking
a bit. Iterator changes reviewed by Hannken (thanks), the rest of the bugs
are mine.
 1.23 18-Mar-2014  hannken branches: 1.23.2;
Operations vmark(), vunmark() and vismarker() have been replaced by
vfs_vnode_iterator_*(), remove them.

Document vfs_vnode_iterator_*().

Make VI_MARKER private to vfs_vnode.c, vfs_mount.c and unfortunately
to ufs/lfs/lfs_segment.c.

Welcome to 6.99.37
 1.22 22-Feb-2014  wiz Mark up NULL with Dv.
 1.21 22-Feb-2014  hannken Update the description of vfs_busy() and vfs_unbusy().
 1.20 02-Dec-2010  wiz branches: 1.20.6; 1.20.12;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.19 09-May-2009  wiz Mark up NULL, bump date for previous.
 1.18 08-May-2009  dyoung Document vfs_mountalloc(9).
 1.17 22-Apr-2009  elad There is no vfs_subr2.c.
 1.16 30-Apr-2008  martin branches: 1.16.6;
Convert TNF licenses to new 2 clause variant
 1.15 24-Jan-2008  tnn branches: 1.15.4; 1.15.6;
Mention vfs_subr2.c.
 1.14 21-Jan-2007  hannken branches: 1.14.4;
Add and update documentation for fstrans(9) file system suspension helper.

wiz?
 1.13 29-Jan-2006  rpaulo More ktrace-lwp that I got wrong in the first try.

Thanks to Gregory McGarry for pointing this out.
 1.12 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.11 23-Sep-2005  jmmv Apply the NFS exports list rototill patch:

- Remove all NFS related stuff from file system specific code.
- Drop the vfs_checkexp hook and generalize it in the new nfs_check_export
function, thus removing redundancy from all file systems.
- Move all NFS export-related stuff from kern/vfs_subr.c to the new
file sys/nfs/nfs_export.c. The former was becoming large and its code
is always compiled, regardless of the build options. Using the latter,
the code is only compiled in when NFSSERVER is enabled. While doing this,
also make some functions in nfs_subs.c conditional to NFSSERVER.
- Add a new command in nfssvc(2), called NFSSVC_SETEXPORTSLIST, that takes a
path and a set of export entries. At the moment it can only clear the
exports list or append entries, one by one, but it is done in a way that
allows setting the whole set of entries atomically in the future (see the
comment in mountd_set_exports_list or in doc/TODO).
- Change mountd(8) to use the nfssvc(2) system call instead of mount(2) so
that it becomes file system agnostic. In fact, all this whole thing was
done to remove a 'XXX' block from this utility!
- Change the mount*, newfs and fsck* userland utilities to not deal with NFS
exports initialization; done internally by the kernel when initializing
the NFS support for each file system.
- Implement an interface for VFS (called VFS hooks) so that several kernel
subsystems can run arbitrary code upon receipt of specific VFS events.
At the moment, this only provides support for unmount and is used to
destroy NFS exports lists from the file systems being unmounted, though it
has room for extension.

Thanks go to yamt@, chs@, thorpej@, wrstuden@ and others for their comments
and advice in the development of this patch.
 1.10 21-Apr-2004  christos Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
 1.9 10-Jan-2004  wiz Add a comma.
 1.8 10-Jan-2004  hannken Allow vfs_write_suspend() to wait if the file system is already
suspending.

Move vfs_write_suspend() and vfs_write_resume() from kern/vfs_vnops.c
to kern/vfs_subr.c.

Change vnode write gating in ufs/ffs/ffs_softdep.c (from FreeBSD).

When vnodes are throttled in softdep_trackbufs() check for
file system suspension every 10 msecs to avoid a deadlock.
 1.7 04-Dec-2003  wiz Bump date for previous (hi atatat!).
 1.6 04-Dec-2003  atatat Garbage collect some references to the old sysctl() infrastructure.
 1.5 22-Oct-2003  hannken Forgot to update the .Dd line. From Thomas Klausner <wiz@netbsd.org>.
 1.4 21-Oct-2003  hannken Add section 9 man pages for:
vfs_write_suspend, vfs_write_resume, vn_start_write and vn_finished_write.
 1.3 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.2 06-Apr-2003  wiz Fix a bug, and add a Dv before a NULL. Whitespace nits while here.
 1.1 06-Apr-2003  gmcgarry Move vfs interface out of vfsops.9 into its own page. Document
it completely.
 1.14.4.1 23-Mar-2008  matt sync with HEAD
 1.15.6.1 18-May-2008  yamt sync with head.
 1.15.4.1 02-Jun-2008  mjf Sync with HEAD.
 1.16.6.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.20.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.20.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.23.2.1 10-Aug-2014  tls Rebase.
 1.25.10.1 21-Apr-2017  bouyer Sync with HEAD
 1.25.6.1 26-Apr-2017  pgoyette Sync with HEAD
 1.7 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.6 20-Jul-2013  wiz Use Mt for email addresses.
 1.5 12-Mar-2009  joerg branches: 1.5.8; 1.5.14; 1.5.18;
Fix markup.
 1.4 08-Sep-2008  ahoka branches: 1.4.2; 1.4.4; 1.4.8;
That audio is in fact should be video in the short description. :-)
 1.3 06-Sep-2008  jmcneill Add AUTHORS section.
 1.2 06-Sep-2008  wiz New sentence, new line.
Use more markup, fix some; fix some typos.
 1.1 06-Sep-2008  jmcneill Add video(4) and video(9) man pages.
 1.4.8.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.4.4.2 05-Oct-2008  mjf Sync with HEAD.
 1.4.4.1 08-Sep-2008  mjf file video.9 was added on branch mjf-devfs2 on 2008-10-05 20:11:23 +0000
 1.4.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.4.2.1 08-Sep-2008  wrstuden file video.9 was added on branch wrstuden-revivesa on 2008-09-18 04:38:09 +0000
 1.5.18.1 23-Jul-2013  riastradh sync with HEAD
 1.5.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.8.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.13 01-Jul-2011  dyoung Reference <sys/bus.h> instead of <machine/bus.h>.
 1.12 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.11 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.10 30-Jun-2003  wiz branches: 1.10.32; 1.10.34;
Fixes to make these man page look nice with groff-1.19.
 1.9 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.8 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.7 21-Dec-2002  wiz dependent has no a.
 1.6 14-Oct-2002  wiz New sentence, new line.
 1.5 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.4 26-Dec-2001  wiz Fix SEE ALSO section.
 1.3 04-Sep-2001  wiz Punctuation fixes.
 1.2 04-Sep-2001  wiz Boring whitespace fixes.
 1.1 01-Jul-2001  gmcgarry Add some missing documentation.
 1.10.34.1 18-May-2008  yamt sync with head.
 1.10.32.1 02-Jun-2008  mjf Sync with HEAD.
 1.22 02-Dec-2023  thorpej Add a vmem_xalloc_addr() function, which allocates a specific address
from an arena. This is just a convenience wrapper around vmem_xalloc(),
that's just a bit more obvious how to use and performs some additional
sanity checks.
 1.21 15-Oct-2022  riastradh vmem(9): Clarify possible failure modes.

Note that vmem_alloc and vmem_xalloc have failure modes -- failing
with ENOMEM despite VM_SLEEP, or importing or sleeping forever --
that appear to be bugs when align/phase/nocross/minaddr/maxaddr are
specified.
 1.20 16-Jun-2020  thorpej Add vmem_xfreeall(), which frees all allocated regions in the specified arena.
All outstanding allocations MUST have been performed with vmem_xalloc() or
else the behavior is undefined. (This also implies that the arena must also
not have a quantum cache; note this in the documentation.)
 1.19 06-Nov-2019  wiz Remove superfluous Pp.
 1.18 05-Nov-2019  dyoung Fix typo: vmem_add(9) does not actually take an `addrp` argument.
 1.17 03-Jul-2017  wiz branches: 1.17.6;
Remove workaround for ancient HTML generation code.
 1.16 29-Feb-2016  chs fix vmem_alloc() to never return an error for VM_SLEEP requests,
thus fixing kmem_alloc() to never return NULL for KM_SLEEP requests.
instead these operations will retry forever, which was the intent.
 1.15 29-Jan-2013  wiz branches: 1.15.8;
Bump date for previous.
 1.14 29-Jan-2013  para bring man page up to date for vmem_xcreate and
the changed function signature of vmem_create
 1.13 05-Sep-2011  wiz branches: 1.13.2; 1.13.8;
Remove trailing whitespace.
 1.12 02-Sep-2011  dyoung Update vmem(9). Changes to the implementation and usage are following,
soon.
 1.11 23-Aug-2011  wiz Bump date for previous.
 1.10 23-Aug-2011  dyoung Introduce a couple of new constants, VMEM_ADDR_MIN (the least possible
address in a vmem(9) arena, 0) and VMEM_ADDR_MAX (the maximum possible
address, currently 0xFFFFFFFF). Modify several boundary conditions so
that a vmem(9) arena can allocate ranges including VMEM_ADDR_MAX.
Update documentation and tests.

These changes pass the tests in sys/kern/subr_vmem.c. To compile the
and run the test program, run "cd sys/kern/ && gcc -DVMEM_SANITY -o
subr_vmem ./subr_vmem.c && ./subr_vmem".
 1.9 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.8 22-Dec-2009  wiz Remove trailing whitespace, make HTML-ready, sort sections.
 1.7 21-Dec-2009  dyoung Describe arguments "allocfn", "freefn", and "source" of vmem_create(9)
in more detail. Describe vmem_add(9). Write a new BUGS section that
warns about aspects of vmem(9) behavior that may surprise first-time
users.
 1.6 03-Aug-2009  rmind Merge vmem_alloc(9) & friends (it's a whole company) into a single vmem(9).
 1.5 16-Feb-2007  rmind - Add link to memoryallocators(9) in kmem_*(9), vmem(9), uvm(9), malloc(9),
pool(9) and pool_cache(9) manuals.
- Sort uvm(9) "SEE ALSO" section.
 1.4 04-Nov-2006  yamt document vmem_xalloc/xfree.
 1.3 26-Oct-2006  wiz Various minor improvements.
 1.2 23-Oct-2006  peter Fix a typo.
 1.1 22-Oct-2006  yamt document vmem.
 1.13.8.1 25-Feb-2013  tls resync with head
 1.13.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.15.8.1 03-Dec-2017  snj Pull up following revision(s) (requested by mlelstv in ticket #1521):
share/man/man9/kmem.9: revision 1.20 via patch
share/man/man9/vmem.9: revision 1.16
sys/kern/subr_kmem.c: revision 1.62
sys/kern/subr_vmem.c: revision 1.94
fix vmem_alloc() to never return an error for VM_SLEEP requests,
thus fixing kmem_alloc() to never return NULL for KM_SLEEP requests.
instead these operations will retry forever, which was the intent.
 1.17.6.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.4 03-Aug-2009  rmind Merge vmem_alloc(9) & friends (it's a whole company) into a single vmem(9).
 1.3 04-Nov-2006  yamt consistency.
 1.2 26-Oct-2006  wiz Various minor improvements.
 1.1 22-Oct-2006  yamt document vmem.
 1.5 03-Aug-2009  rmind Merge vmem_alloc(9) & friends (it's a whole company) into a single vmem(9).
 1.4 24-Sep-2008  pooka * vmem_create returns vmem_t *, not vmem_t
* document ipl
 1.3 26-Oct-2006  wiz branches: 1.3.16;
Fix typo, found by yamt.
 1.2 26-Oct-2006  wiz Various minor improvements.
 1.1 22-Oct-2006  yamt document vmem.
 1.3.16.1 05-Oct-2008  mjf Sync with HEAD.
 1.4 03-Aug-2009  rmind Merge vmem_alloc(9) & friends (it's a whole company) into a single vmem(9).
 1.3 26-Oct-2006  wiz Various minor improvements.
 1.2 22-Oct-2006  yamt be consistent with other vmem pages.
 1.1 22-Oct-2006  yamt document vmem.
 1.4 03-Aug-2009  rmind Merge vmem_alloc(9) & friends (it's a whole company) into a single vmem(9).
 1.3 04-Nov-2006  yamt be explicit about the difference between vmem_free and vmem_xfree.
 1.2 26-Oct-2006  wiz Various minor improvements.
 1.1 22-Oct-2006  yamt document vmem.
 1.3 03-Aug-2009  rmind Merge vmem_alloc(9) & friends (it's a whole company) into a single vmem(9).
 1.2 04-Nov-2006  wiz Fix a typo.
 1.1 04-Nov-2006  yamt document vmem_xalloc/xfree.
 1.3 03-Aug-2009  rmind Merge vmem_alloc(9) & friends (it's a whole company) into a single vmem(9).
 1.2 04-Nov-2006  yamt be explicit about the difference between vmem_free and vmem_xfree.
 1.1 04-Nov-2006  yamt document vmem_xalloc/xfree.
 1.17 16-Feb-2023  pgoyette Add a period at the end of a sentence.
 1.16 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.15 31-May-2008  enami No comma is necessary for the last .Nm entry.
 1.14 30-Apr-2008  martin branches: 1.14.2;
Convert TNF licenses to new 2 clause variant
 1.13 10-Apr-2008  riz branches: 1.13.2;
Catch the documentation up with the changes in vfs_vnops.c revision
1.155 - s/struct file/file_t/, and dropping a struct lwp * arg from
some functions.
 1.12 17-May-2007  pooka branches: 1.12.10;
vn_poll does not return success/error, it return what VOP_POLL
returns, i.e. mask of available events
 1.11 04-Oct-2006  pooka ucred -> kauth sweep
 1.10 29-Jan-2006  rpaulo More ktrace-lwp that I got wrong in the first try.

Thanks to Gregory McGarry for pointing this out.
 1.9 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.8 20-Apr-2003  gmcgarry Update to reflect caddr_t -> void * change.
 1.7 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.6 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.5 20-Oct-2002  gmcgarry Some more xrefs.
 1.4 20-Oct-2002  wiz Sort SEE ALSO.
 1.3 20-Oct-2002  gmcgarry Xr file.9
 1.2 14-Oct-2002  wiz New sentence, new line.
 1.1 14-Oct-2002  gmcgarry Move the vnode file descriptor operations into their own file.
Add vn_marktext() and vn_statfile() descriptions.
 1.12.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.13.2.2 04-Jun-2008  yamt sync with head
 1.13.2.1 18-May-2008  yamt sync with head.
 1.14.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.84 19-Mar-2022  hannken Remove now unused VV_LOCKSWORK, all file systems support locking.

Remove unused predicates vn_locked() and vn_anylocked().

Welcome to 9.99.95
 1.83 17-Jan-2022  christos Add acl related changes; there is no more vaccess; document the genfs functions
instead.
 1.82 01-Jan-2019  hannken Add "void *extra" argument to vcache_new() so a file system may
pass more information about the file to create.

Welcome to 8.99.30
 1.81 03-Jul-2017  wiz branches: 1.81.4; 1.81.6;
Remove workaround for ancient HTML generation code.
 1.80 28-May-2017  hannken Restrict vgone() to suspended file systems only.

Welcome to 7.99.75, old file system modules would cause a diagnostic
assertion with new kernel.
 1.79 23-Jan-2017  abhinav Fix typo: s/asychronously/asynchronously
 1.78 11-Jan-2017  hannken branches: 1.78.2;
Move vnode member v_lock as vi_lock to vnode_impl.h.
 1.77 11-Jan-2017  hannken Move vnode member v_mntvnodes as vi_mntvnodes to vnode_impl.h.

Add an ugly hack so pstat.c may still traverse the list.
 1.76 11-Jan-2017  hannken Move vnode members v_synclist_slot and v_synclist as vi_synclist_slot and
vi_synclist to vnode_impl.h.
 1.75 11-Jan-2017  hannken Move vnode members v_dnclist and v_nclist as vi_dnclist and
vi_nclist to vnode_impl.h.
 1.74 02-Jan-2017  hannken Rename vget() to vcache_vget() and vcache_tryvget() respectively and
move the definitions to sys/vnode_impl.h.

No functional change intended.

Welcome to 7.99.54
 1.73 14-Dec-2016  hannken Move vnode members "v_freelisthd" and "v_freelist" from "struct vnode"
to "struct vnode_impl" and rename to "vi_lrulisthd" and "vi_lrulist".

No functional change intended.

Welcome to 7.99.48
 1.72 20-Aug-2016  wiz Bump date for previous.
 1.71 20-Aug-2016  hannken Remove now obsolete operation vcache_remove().

Welcome to 7.99.36
 1.70 17-Jul-2015  wiz branches: 1.70.2;
Trailing whitespace, begone!
 1.69 12-Jul-2015  hannken Operations getnewvnode() and ungetnewvnode() have been replaced with vcache.
- Remove now obsolete functions getnewvnode() and ungetnewvnode().
- Document vcache operations.

Welcome to 7.99.20
 1.68 20-Apr-2015  riastradh Cull unused vnode v_iflags: VI_LAYER, VI_LOCKSHARE.
 1.67 20-Apr-2015  riastradh Use Er, not Dv, for errno E* names.
 1.66 20-Apr-2015  riastradh First part of reworking vnode(9) man page. Much more to come.
 1.65 20-Apr-2015  riastradh Use Dv, not Li, for EBUSY/ENOENT.
 1.64 20-Apr-2015  riastradh Fix punctuation.
 1.63 20-Apr-2015  riastradh Rewrite vput(9) description.
 1.62 20-Apr-2015  riastradh Document current state of vget.
 1.61 24-Mar-2014  hannken - Make VI_XLOCK, VI_CLEAN and VI_LOCKSHARE private to kern/vfs_*.c.
- Make vwait() static.
- Add vdead_check() to check a vnode for being or becoming dead.

Discussed on tech-kern.

Welcome to 6.99.38
 1.60 05-Mar-2014  hannken Current support for iterating over mnt_vnodelist is rudimentary. Every
caller has to care about list and vnode mutexes, reference count being zero,
intermediate vnode states like VI_CLEAN, VI_XLOCK, VI_MARKER and so on.

Add an interface to iterate over a vnode list:

void vfs_vnode_iterator_init(struct mount *mp, struct vnode_iterator **marker)
void vfs_vnode_iterator_destroy(struct vnode_iterator *marker)
bool vfs_vnode_iterator_next(struct vnode_iterator *marker, struct vnode **vpp)

vfs_vnode_iterator_next() returns either "false / *vpp == NULL" when done
or "true / *vpp != NULL" to return the next referenced vnode from the list.

To make vrecycle() work in this environment change it to

bool vrecycle(struct vnode *vp)

where "vp" is a referenced vnode to be destroyed if this is the last reference.

Discussed on tech-kern.

Welcome to 6.99.34
 1.59 22-Feb-2014  wiz Use more markup. Add "flag" in a sentence.
 1.58 22-Feb-2014  hannken Update arguments of vrecycle(), description of getnewvnode() and
the vnode flags.
 1.57 29-Oct-2013  hannken Vnode API cleanup pass 1.

- Make these defines and functions private to vfs_vnode.c:

VC_MASK, VC_LOCK, DOCLOSE, VI_IANCTREDO and VI_INACTNOW
vclean() and vrelel()

- Remove the long time unused lwp argument from vrecycle().

- Remove vtryget(), it is responsible for ugly hacks and doesn't
look that effective.

Presented on tech-kern.

Welcome to 6.99.25
 1.56 08-Feb-2012  wiz branches: 1.56.6;
Bump date for previous, per mbalmer.
 1.55 08-Feb-2012  wiz xref rwlock instead of deprecated lockmgr.
From Julian Fagir in PR 45944.
 1.54 14-Jun-2011  wiz branches: 1.54.2;
Mark up NULL.
 1.53 14-Jun-2011  rmind Update getnewvnode(9) description.
 1.52 26-Apr-2011  hannken branches: 1.52.2;
Change vflushbuf() to return an error if a synchronous write fails.

Welcome to 5.99.51.
 1.51 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.50 21-Jul-2010  hannken Using vfinddev() leads to vnode races as it returns an unreferenced
vnode that may disappear before the caller has a chance to reference it.

Reference the vnode while the specfs cache is locked.

Welcome to 5.99.37.

No objections on tech-kern.
 1.49 06-Jun-2010  hannken Change layered file systems to always pass the locking VOP's down to the
leaf file system. Remove now unused member v_vnlock from struct vnode.
Welcome to 5.99.30

Discussed on tech-kern.
 1.48 30-May-2010  ahoka Sync struct vnode with reality.
 1.47 21-Feb-2010  wiz branches: 1.47.2;
Consistently call the file system "ext2".
 1.46 13-Feb-2010  wiz Bump date for vrele_async.
Reword slightly and put it outside the vget description.
 1.45 11-Feb-2010  haad Add vrele_async routine which asynchronously release vnodes in different contex
and in some time in the future.

Ok: ad@.
 1.44 08-Jan-2010  pooka Undocument checkalias() -- it was removed two years ago.
 1.43 08-Jan-2010  pooka vcount() was removed
 1.42 08-Jan-2010  pooka Remove documentation for removed macros.
 1.41 05-Dec-2009  pooka Remove the portalfs kernel file system driver. Replace mount_portal(8)
with a version based on puffs. User functionality remains the same.
 1.40 22-Apr-2009  elad There is no vfs_subr2.c.
 1.39 30-Apr-2008  martin branches: 1.39.6;
Convert TNF licenses to new 2 clause variant
 1.38 24-Jan-2008  tnn branches: 1.38.4; 1.38.6;
Mention vfs_subr2.c.
 1.37 15-Jun-2007  pooka branches: 1.37.4;
vprint takes a const char *label
 1.36 16-Feb-2007  dillo Fix typo, add comma.
 1.35 13-Oct-2006  wiz Bump date for previous.
 1.34 05-Oct-2006  chs add support for O_DIRECT (I/O directly to application memory,
bypassing any kernel caching for file data).
 1.33 04-Oct-2006  pooka ucred -> kauth sweep
 1.32 03-Mar-2006  rumble Bump date for previous commit, preempting wizd.
 1.31 03-Mar-2006  rumble Add missing vnode flags and tags from sys/vnode.h. Reorder a few things to
match the header file, and fix a few typos/grammar points.
 1.30 29-Jan-2006  rpaulo More ktrace-lwp that I got wrong in the first try.

Thanks to Gregory McGarry for pointing this out.
 1.29 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.28 05-Aug-2005  jmmv vgonel takes two parameters, not one.
 1.27 05-Aug-2005  jmmv Sync tag-types list with reality (missing VT_PTYFS) and fix some typos.
Bump date.
 1.26 01-Jan-2005  wiz Bump date for VDIRTY removal.
 1.25 31-Dec-2004  yamt remove VDIRTY.
 1.24 28-Dec-2004  wiz Bump date for previous.
 1.23 28-Dec-2004  yamt update to match with the recent reality. PR/28793.
 1.22 26-May-2004  wiz Bump date for previous.
 1.21 25-May-2004  wrstuden Change comments around locking. While you _can_ grab vnode locks
as LK_SHARED, the VOP_ code (in all our existing file systems)
was implememted assuming exclusive locking. Use of LK_SHARED
is technically a bug and only works right for uni-processor and
big-lock SMP systems. Our current file systems will blow up
(probably quite subtlely) with LK_SHARED and fine-grained SMP
locking.
 1.20 24-Oct-2003  wiz branches: 1.20.2;
Mark up error code with .Er.
 1.19 23-Oct-2003  hubertf Document which error vflush may return. Saves some code-reading...
 1.18 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.17 07-Apr-2003  wiz More e.g. cleanup. Igor Sobrado, PR 19692.
 1.16 06-Apr-2003  gmcgarry Back out previous.
 1.15 04-Apr-2003  wiz Minimally document vfs_shutdown(9). XXX: Right man page?
 1.14 04-Apr-2003  wiz vinvalbuf and vtruncbuf are using ltsleep(9), not the non-existing
sleep(9).
 1.13 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.12 29-Dec-2002  yamt update description of vflush.
from FreeBSD's vfs_subr.c.
 1.11 23-Oct-2002  gmcgarry Add vgonel(), although it is used only once.
 1.10 14-Oct-2002  wiz New sentence, new line.
 1.9 15-Aug-2002  wiz Mdoc nit.
 1.8 14-Aug-2002  soren Misc fixes.
Cross-reference v*ops.9.
 1.7 11-Jun-2002  wiz There is no vn_unlock; remove Xref and replace with explanation why not,
provided by fvdl. While here, ispell.
 1.6 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.5 06-Jan-2002  deberg typos
 1.4 28-Nov-2001  wiz No point in using __P in prototype declarations in man pages.
 1.3 31-Oct-2001  gmcgarry Document new VEXECMAP vnode flag and rename vn_marktext() to vn_markexec().
 1.2 22-Oct-2001  wiz Whitespace, punctuation fixes; sort sections, fix xrefs.
 1.1 22-Oct-2001  gmcgarry Programmer's guide to the VFS interface.
 1.20.2.1 30-May-2004  tron branches: 1.20.2.1.2;
Pull up revision 1.21 (requested by wrstuden in ticket #425):
Change comments around locking. While you _can_ grab vnode locks
as LK_SHARED, the VOP_ code (in all our existing file systems)
was implememted assuming exclusive locking. Use of LK_SHARED
is technically a bug and only works right for uni-processor and
big-lock SMP systems. Our current file systems will blow up
(probably quite subtlely) with LK_SHARED and fine-grained SMP
locking.
 1.20.2.1.2.1 06-May-2005  riz Pull up revision 1.23-1.26 (requested by yamt in ticket #1168):
update to match with the recent reality. PR/28793.
 1.37.4.1 23-Mar-2008  matt sync with HEAD
 1.38.6.1 18-May-2008  yamt sync with head.
 1.38.4.1 02-Jun-2008  mjf Sync with HEAD.
 1.39.6.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.47.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.47.2.1 21-Feb-2010  uebayasi file vnode.9 was added on branch uebayasi-xip on 2010-08-17 06:40:06 +0000
 1.52.2.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.54.2.2 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.54.2.1 17-Apr-2012  yamt sync with head
 1.56.6.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.70.2.2 20-Mar-2017  pgoyette Sync with HEAD
 1.70.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.78.2.1 21-Apr-2017  bouyer Sync with HEAD
 1.81.6.1 10-Jun-2019  christos Sync with HEAD
 1.81.4.1 18-Jan-2019  pgoyette Synch with HEAD
 1.101 15-Jun-2023  hannken VOP_IOCTL() is a wrapper around spec_ioctl() aka Xdev_ioctl() and
protected with spec_io_enter()/spec_io_exit() so there is no need
to force specific vnode locking.

Set locking requirement to '= = =' (unchanged, locked or unlocked).

PR kern/57450 (unplugging hung USB disk triggers panic via _vstate_assert)
 1.100 19-Nov-2017  christos branches: 1.100.14;
Fix locking info for VOP_RECLAIM.
 1.99 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.98 11-Apr-2017  riastradh Make VOP_INACTIVE preserve vnode lock on return.

Discussed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2017/04/01/msg021751.html

Ride 7.99.68, a bumpy bus of incremental vfs improvements!
 1.97 25-Jan-2016  christos branches: 1.97.2; 1.97.4;
we don't have va_mask
 1.96 25-Jul-2014  wiz New sentence, new line. Punctuation formatting nits.
 1.95 25-Jul-2014  dholland Add VOP_FALLOCATE and VOP_FDISCARD.
 1.94 21-Jul-2014  dholland Adjustments based on suggestions from gnrp in PR 45276:
- fix argument names of VOP_REMOVE
- mention deprecated behavior of calling VOP_GETATTR unlocked
- mention rename lock
 1.93 27-Feb-2014  hannken branches: 1.93.2;
The current implementation of vn_lock() is racy. Modification of
the vnode operations vector for active vnodes is unsafe because it
is not known whether deadfs or the original file system will be
called.

- Pass down LK_RETRY to the lock operation (hint for deadfs only).

- Change deadfs lock operation to return ENOENT if LK_RETRY is unset.

- Change all other lock operations to check for dead vnode once
the vnode is locked and unlock and return ENOENT in this case.

With these changes in place vnode lock operations will never succeed
after vclean() has marked the vnode as VI_XLOCK and before vclean()
has changed the operations vector.

Adresses PR kern/37706 (Forced unmount of file systems is unsafe)

Discussed on tech-kern.

Welcome to 6.99.33
 1.92 07-Feb-2014  hannken Change vnode operation lookup to return the resulting vnode *vpp unlocked.
Change cache_lookup() to return an unlocked vnode.

Discussed on tech-kern@

Welcome to 6.99.31
 1.91 23-Jan-2014  hannken Change vnode operations create, mknod, mkdir and symlink to return
the resulting vnode *vpp unlocked.

Discussed on tech-kern@

Welcome to 6.99.30
 1.90 17-Jan-2014  hannken Change vnode operations create, mknod, mkdir and symlink to keep the
directory node dvp locked on return.

Discussed on tech-kern@

Welcome to 6.99.29
 1.89 05-Nov-2012  wiz Bump date for previous.
 1.88 05-Nov-2012  dholland These two man pages contain complete cut and paste copies of struct
componentname and/or struct nameidata. Update the copies, for both
today's changes and a number of earlier changes too.
 1.87 01-Oct-2012  wiz Mark up defines with Dv.
(Leave Brq for now.)
 1.86 01-Oct-2012  njoly Update _PC_NO_TRUNC description to add the returned value, and
replace non-existant KERN_NAME_MAX with {NAME_MAX}.
 1.85 07-Jun-2012  agc branches: 1.85.2;
Fix a typo
 1.84 13-Feb-2012  wiz Add locking description to some functions.
Add FILES section referencing source code.
From Julian Fagir in PR 45988.
 1.83 18-Jul-2011  dholland branches: 1.83.2;
typo
 1.82 11-Jul-2011  hannken Change VOP_BWRITE() to take a vnode as its first argument like all other
VOPs do. Layered file systems no longer have to modify bp->b_vp and run
into trouble when an async VOP_BWRITE() uses the wrong vnode.

- change all occurences of VOP_BWRITE(bp) to VOP_BWRITE(bp->b_vp, bp).
- remove layer_bwrite().
- welcome to 5.99.55

Adresses PR kern/38762 panic: vwakeup: neg numoutput

No objections from tech-kern@.
 1.81 14-Jun-2011  rmind VOP_LEASE(9) was removed long ago. Misc improvement.
 1.80 24-Jun-2010  hannken branches: 1.80.4;
Clean up vnode lock operations pass 2:

VOP_UNLOCK(vp, flags) -> VOP_UNLOCK(vp): Remove the unneeded flags argument.

Welcome to 5.99.32.

Discussed on tech-kern.
 1.79 24-Jun-2010  hannken Clean up vnode lock operations:

- VOP_LOCK(vp, flags): Limit the set of allowed flags to LK_EXCLUSIVE,
LK_SHARED and LK_NOWAIT. LK_INTERLOCK is no longer allowed as it
makes no sense here.

- VOP_ISLOCKED(vp): Remove the for some time unused return value
LK_EXCLOTHER. Mark this operation as "diagnostic only".
Making a lock decision based on this operation is no longer allowed.

Discussed on tech-kern.
 1.78 19-May-2010  pooka * document VOP_DELETEEXTATTR
* remove "vector element" from summary table:
1) deleteextattr caused problems for 80col rendering
2) it's not correct on NetBSD, we use the VOFFSET instead (!)
 1.77 04-May-2009  wiz branches: 1.77.2;
Sort errors.
 1.76 15-Mar-2009  joerg Convert to mdoc.
XXX groff is rather stupid in the way it handles the list
 1.75 04-Aug-2008  pooka branches: 1.75.4;
fix VOP_ISLOCKED description

noticed by Adam Burkepile
 1.74 31-May-2008  enami No comma is necessary for the last .Nm entry.
 1.73 30-Apr-2008  martin branches: 1.73.2;
Convert TNF licenses to new 2 clause variant
 1.72 20-Mar-2008  mjf branches: 1.72.2; 1.72.4;
struct componentname has no cn_lwp member anymore. Also update the data
types for the other struct members so they actually reflect sys/sys/namei.h
 1.71 19-Jan-2008  pooka branches: 1.71.2;
improve readdir, abortop and bmap description

PR kern/15062 by Love
 1.70 01-Dec-2007  wiz Spelling, HTML output fix.
 1.69 26-Nov-2007  pooka "struct lwp *l" is a goner from VFS/VOP interfaces.
 1.68 24-Aug-2007  pooka branches: 1.68.2;
fix/clarify VOP_CLOSE
 1.67 30-Jul-2007  rumble branches: 1.67.4;
Be more specific in the description of VOP_READDIR:
- uio->uio_offset must be set to the offset of the next directory entry.
- each cookie entry points to the next directory entry's offset, not the
current entry's offset.
- cookies must be callee allocated with malloc type M_TEMP.
 1.66 27-Jul-2007  pooka VOP_MMAP fflags -> prot
 1.65 28-Jun-2007  rumble Fix typo.
 1.64 24-Jun-2007  rumble TRUE -> true, FALSE -> false.
 1.63 13-May-2007  tnn fix typos
 1.62 07-May-2007  pooka make description of VOP_MMAP compatible with reality
 1.61 29-Mar-2007  pooka fix definition of runp in VOP_BMAP
 1.60 23-Dec-2006  wiz Bump date for previous.
 1.59 09-Dec-2006  chs a smorgasbord of improvements to vnode locking and path lookup:
- LOCKPARENT is no longer relevant for lookup(), relookup() or VOP_LOOKUP().
these now always return the parent vnode locked. namei() works as before.
lookup() and various other paths no longer acquire vnode locks in the
wrong order via vrele(). fixes PR 32535.
as a nice side effect, path lookup is also up to 25% faster.
- the above allows us to get rid of PDIRUNLOCK.
- also get rid of WANTPARENT (just use LOCKPARENT and unlock it).
- remove an assumption in layer_node_find() that all file systems implement
a recursive VOP_LOCK() (unionfs doesn't).
- require that all file systems supply vfs_vptofh and vfs_fhtovp routines.
fill in eopnotsupp() for file systems that don't support being exported
and remove the checks for NULL. (layerfs calls these without checking.)
- in union_lookup1(), don't change refcounts in the ISDOTDOT case, just
adjust which vnode is locked. fixes PR 33374.
- apply fixes for ufs_rename() from ufs_vnops.c rev. 1.61 to ext2fs_rename().
 1.58 28-Nov-2006  pooka branches: 1.58.2;
match description of VOP_PUTPAGES with reality
 1.57 19-Oct-2006  pooka VOP_RENAME synopsis:
* tdvp points to a vnode, not a componentname.
* name of the source vnode is fvp, not vp
 1.56 08-Oct-2006  pooka VOP_REMOVE is supposed to vput the arguments before returning instead
of keeping them locked
 1.55 05-Oct-2006  chs add support for O_DIRECT (I/O directly to application memory,
bypassing any kernel caching for file data).
 1.54 04-Oct-2006  reinoud Fix confusing statement on locking and contradiction in the VOP_RECLAIM()
explanation.

It told the node vp would be locked on entry and later told that the vnode
is unlocked on entry and should remain unlocked on exit.
 1.53 04-Oct-2006  pooka ucred -> kauth sweep
 1.52 30-Sep-2006  jld Remove erroneous boilerplate about VOP_POLL's return value (which was
already described correctly earlier in the paragraph).
 1.51 16-Sep-2006  wiz Use macro for HTML output.
 1.50 16-Sep-2006  yamt VOP_ADVLOCK: document the current unnatural handling of SEEK_CUR.
pointed by efnbl06 at bn2.maus.net.
 1.49 16-Sep-2006  yamt VOP_ADVLOCK: fix a description of vp. pointed by efnbl06 at bn2.maus.net.
 1.48 23-Aug-2006  wiz Bump date for previous.
 1.47 17-Aug-2006  jld vnode_if.src says that VOP_POLL's vnode is unlocked, and has said so
since 1998; adjust the man page to reflect that.
 1.46 05-Apr-2006  rtr fix typo
 1.45 30-Mar-2006  rpaulo Fix more proc/lwp conversions. From Gregory McGarry in private email.
 1.44 11-Mar-2006  wiz Bump date for previous.
 1.43 04-Mar-2006  rumble Mention VOP_KQFILTER briefly. Its description could be more thorough, but
I am unfamiliar with the kqueue framework. Also fix a typo while we're
here.
 1.42 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.41 02-Nov-2005  yamt sync with kernel. (yamt-vop)
 1.40 31-Oct-2005  wiz Bump date for previous.
 1.39 30-Oct-2005  erh Mention that VOP_CREATE always unlocks the directory vnode.
 1.38 09-Sep-2005  wiz Uppercase I/O.
 1.37 30-Aug-2005  jmmv Sync the description of the getattr, link and rmdir operations with reality
as regards vnode locking. Thanks to wrstuden@ for clarifying this.
 1.36 19-Aug-2005  jmmv Specify the types for the cookies and ncookies parameters to the readdir
operation.
 1.35 11-Aug-2005  pooka apply cosmetics to VOP_MK/RMDIR prototypes
 1.34 11-Aug-2005  pooka match section on read/write ioflags with current reality
(bump date!)
 1.33 11-Jan-2005  chs typoes.
 1.32 02-Jan-2005  wiz Mark up NULL, and replace null by nul where appropriate.
 1.31 02-Jan-2005  thorpej Document file system extended attribute functions.
 1.30 25-Jun-2004  wiz Fix Dd argument.
 1.29 23-Apr-2004  simonb s/the the/the/ (only in sources that aren't regularly imported from
elsewhere).
 1.28 25-Jan-2004  hannken Make VOP_STRATEGY(bp) a real VOP as discussed on tech-kern.

VOP_STRATEGY(bp) is replaced by one of two new functions:

- VOP_STRATEGY(vp, bp) Call the strategy routine of vp for bp.
- DEV_STRATEGY(bp) Call the d_strategy routine of bp->b_dev for bp.

DEV_STRATEGY(bp) is used only for block-to-block device situations.
 1.27 04-Jul-2003  wiz Punctuation fix and grammar fix.
 1.26 01-Jul-2003  wiz Remove superfluous .Fc.
 1.25 30-Jun-2003  wiz Fixes to make these man page look nice with groff-1.19.
 1.24 19-Jun-2003  yamt note when VOP_GETPAGES updates number of pages pointed by 'count'.
 1.23 09-Jun-2003  yamt correct arguments of VOP_GETPAGES.
 1.22 14-May-2003  wiz setup -> set up.
 1.21 01-May-2003  yamt mdoc improvement.
(use the longest tag for width specifier)
 1.20 01-May-2003  yamt redo a half of the previous correctly.
('op' arg of VOP_ADVLOCK)
 1.19 01-May-2003  yamt VOP_ADVLOCK:
F_{RD,WR,UN}LCK is not for 'flags'.
 1.18 24-Apr-2003  wiz Use .Aq instead of \*[Lt]...\*[Gt].
 1.17 20-Apr-2003  gmcgarry Update to reflect caddr_t -> void * change.
 1.16 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.15 03-Jan-2003  jschauma Fix typos noted by Igor Sobrado in PR misc/19641 (some already fixed
by others):

MCHTYPE(9) - implemntation (implementation)
VFS_CHECKEXP(9) - specied (specified), acces (access)
VOP_ABORTOP(9) - singla (single), implments (implements),
callling (calling), credientials (credentials)
 1.14 14-Oct-2002  wiz New sentence, new line.
 1.13 14-Oct-2002  gmcgarry Slight markup.
 1.12 14-Aug-2002  soren Misc fixes.
Cross-reference v*ops.9.
 1.11 19-Jul-2002  yamt usually, VOP_SEEK checks new offset, not old one.
 1.10 29-Jun-2002  gmcgarry Document flags to VOP_UPDATE().
 1.9 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.8 07-Feb-2002  ross Edit -mdoc usage.

* There is no -indent option to .Bd or .Bl, although you would
never know that from its frequent use in this tree. There is a
"-offset indent" combination that makes sense, and you can certainly
say "-width indent".

* Also, you can't markup the -width option argument, tho you CAN
use a callable macro. So "-width Ar filename" doesn't make sense,
but either "-width Ar" or "-width filename" does, as might something
like "-width xxfilename" for a little extra space.

* There are a lot of needlessly complex hanging tag macros in man4 used
to create simple item lists. Those should be simplified one of these
days before someone copies and edits yet another man4 page.
 1.7 01-Feb-2002  eeh De-clunikfy some grammar.
 1.6 06-Jan-2002  deberg add VOP_GETPAGES to NAME and create link
 1.5 26-Oct-2001  yamt - VOP_READDIR will remain vnode locked.
- our VOP_FSYNC doesn't have argument "waitfor".
- IO_SYNC is synchronous.
- remove a repeated sentence in VOP_UNLOCK.
- fix some misspells.
 1.4 26-Oct-2001  yamt s/falg/flag/
 1.3 22-Oct-2001  gmcgarry fnctl -> fcntl
 1.2 22-Oct-2001  wiz Whitespace, punctuation fixes; sort sections, fix xrefs.
 1.1 22-Oct-2001  gmcgarry Programmer's guide to the VFS interface.
 1.58.2.1 17-Feb-2007  tron Apply patch (requested by chs in ticket #422):
- Fix various deadlock problems with nullfs and unionfs.
- Speed up path lookups by upto 25%.
 1.67.4.2 30-Jul-2007  rumble Be more specific in the description of VOP_READDIR:
- uio->uio_offset must be set to the offset of the next directory entry.
- each cookie entry points to the next directory entry's offset, not the
current entry's offset.
- cookies must be callee allocated with malloc type M_TEMP.
 1.67.4.1 30-Jul-2007  rumble file vnodeops.9 was added on branch matt-mips64 on 2007-07-30 03:25:51 +0000
 1.68.2.2 23-Mar-2008  matt sync with HEAD
 1.68.2.1 09-Jan-2008  matt sync with HEAD
 1.71.2.1 24-Mar-2008  keiichi sync with head.
 1.72.4.2 04-Jun-2008  yamt sync with head
 1.72.4.1 18-May-2008  yamt sync with head.
 1.72.2.3 05-Oct-2008  mjf Sync with HEAD.
 1.72.2.2 02-Jun-2008  mjf Sync with HEAD.
 1.72.2.1 20-Mar-2008  mjf file vnodeops.9 was added on branch mjf-devfs2 on 2008-06-02 13:21:42 +0000
 1.73.2.2 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.73.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.75.4.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.77.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.80.4.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.83.2.4 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.83.2.3 16-Jan-2013  yamt sync with (a bit old) head
 1.83.2.2 30-Oct-2012  yamt sync with head
 1.83.2.1 17-Apr-2012  yamt sync with head
 1.85.2.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.85.2.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.93.2.1 10-Aug-2014  tls Rebase.
 1.97.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.97.2.1 26-Apr-2017  pgoyette Sync with HEAD
 1.100.14.1 21-Jun-2023  martin Pull up following revision(s) (requested by hannken in ticket #197):

sys/kern/vnode_if.src: revision 1.85
share/man/man9/vnodeops.9: revision 1.101

VOP_IOCTL() is a wrapper around spec_ioctl() aka Xdev_ioctl() and
protected with spec_io_enter()/spec_io_exit() so there is no need
to force specific vnode locking.
Set locking requirement to '= = =' (unchanged, locked or unlocked).
 1.48 29-Jun-2021  dholland Add containment for the cloning devices hack in vn_open.

Cloning devices (and also things like /dev/stderr) work by allocating
a struct file, stuffing it in the file table (which is a layer
violation), stuffing the file descriptor number for it in a magic
field of struct lwp (which is gross), and then "failing" with one of
two magic errnos, EDUPFD or EMOVEFD.

Before this commit, all callers of vn_open in the kernel (there are
quite a few) were expected to check for these errors and handle the
situation. Needless to say, none of them except for open() itself did,
resulting in internal negative errnos being returned to userspace.

This hack is fairly deeply rooted and cannot be eliminated all at
once. This commit adds logic to handle the magic errnos inside
vn_open; now on success vn_open returns either a vnode or an integer
file descriptor, along with a flag that says whether the underlying
code requested EDUPFD or EMOVEFD. Callers not prepared to cope with
file descriptors can pass NULL for the extra return values, in which
case if a file descriptor would be produced vn_open fails with
EOPNOTSUPP.

Since I'm rearranging vn_open's signature anyway, stop exposing struct
nameidata. Instead, take three arguments: an optional vnode to use as
the starting point (like openat()), the path, and additional namei
flags to use, restricted to NOCHROOT and TRYEMULROOT. (Other namei
behavior, e.g. NOFOLLOW, can be requested via the open flags.)

This change requires a kernel bump. Ride the one an hour ago.
(That was supposed to be coordinated; did not intend to let an hour
slip by. My fault.)
 1.47 17-Nov-2019  wiz file system police. New sentence, new line.
 1.46 16-Nov-2019  mlelstv Document new functions vn_bdev_open and vn_bdev_openpath.
 1.45 05-Jan-2017  wiz branches: 1.45.14;
Bump date for previous.
 1.44 02-Jan-2017  hannken Rename vget() to vcache_vget() and vcache_tryvget() respectively and
move the definitions to sys/vnode_impl.h.

No functional change intended.

Welcome to 7.99.54
 1.43 11-Jul-2015  wiz branches: 1.43.2;
Avoid Pq.
 1.42 27-Feb-2014  hannken The current implementation of vn_lock() is racy. Modification of
the vnode operations vector for active vnodes is unsafe because it
is not known whether deadfs or the original file system will be
called.

- Pass down LK_RETRY to the lock operation (hint for deadfs only).

- Change deadfs lock operation to return ENOENT if LK_RETRY is unset.

- Change all other lock operations to check for dead vnode once
the vnode is locked and unlock and return ENOENT in this case.

With these changes in place vnode lock operations will never succeed
after vclean() has marked the vnode as VI_XLOCK and before vclean()
has changed the operations vector.

Adresses PR kern/37706 (Forced unmount of file systems is unsafe)

Discussed on tech-kern.

Welcome to 6.99.33
 1.41 30-Jan-2011  rmind branches: 1.41.4; 1.41.10;
vn_lock: describe flags, remove reference to lockmgr.
 1.40 02-Dec-2010  wiz branches: 1.40.2;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.39 18-Jun-2010  hannken Remove the concept of recursive vnode locks by eliminating
vn_setrecurse(), vn_restorerecurse() and LK_CANRECURSE.
Welcome to 5.99.31

Discussed on tech-kern.
 1.38 02-Jun-2009  jnemeth branches: 1.38.2;
note that vn_open locks the vnode
 1.37 28-May-2009  wiz Use Dv in more places.
 1.36 28-May-2009  jnemeth clarify vnode locking for vn_rdwr()
 1.35 27-May-2009  jnemeth correct vn_stat definition and description
 1.34 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.33 10-Apr-2008  riz branches: 1.33.2;
Catch the documentation up with the changes in vfs_vnops.c revision
1.155 - s/struct file/file_t/, and dropping a struct lwp * arg from
some functions.
 1.32 08-Oct-2007  hannken branches: 1.32.6;
Bump date.
 1.31 07-Oct-2007  hannken Update the file system copy-on-write handler.

- Instead of hooking the handler on the specdev of a mounted file system
hook directly on the `struct mount'.

- Rename from `vn_cow_*' to `fscow_*' and move to `kern/vfs_trans.c'. Use
`mount_*specific' instead of clobbering `struct mount' or `struct specinfo'.

- Replace the hand-made reader/writer lock with a krwlock.

- Keep `vn_cow_*' functions and mark as obsolete.

- Welcome to NetBSD 4.99.32 - `struct specinfo' changed size.

Reviewed by: Jason Thorpe <thorpej@netbsd.org>
 1.30 07-Mar-2007  dogcow branches: 1.30.4;
running in emulated wizd mode, convert caddr_t to void *.
 1.29 16-Feb-2007  hannken Make fstrans(9) the default helper for file system suspension.
Replaces the now obsolete vn_start_write()/vn_finished_write().
 1.28 23-Jan-2007  wiz Sort ERRORS.
 1.27 21-Jan-2007  hannken Add and update documentation for fstrans(9) file system suspension helper.

wiz?
 1.26 04-Oct-2006  pooka ucred -> kauth sweep
 1.25 04-Mar-2006  rumble Typo.
 1.24 29-Jan-2006  rpaulo More ktrace-lwp that I got wrong in the first try.

Thanks to Gregory McGarry for pointing this out.
 1.23 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.22 06-Jun-2005  wiz Grammar fix and improvement from jmc@openbsd.
 1.21 25-May-2004  hannken Add ffs internal snapshots. Written by Marshall Kirk McKusick for FreeBSD.

- Not enabled by default. Needs kernel option FFS_SNAPSHOT.
- Change parameters of ffs_blkfree.
- Let the copy-on-write functions return an error so spec_strategy
may fail if the copy-on-write fails.
- Change genfs_*lock*() to use vp->v_vnlock instead of &vp->v_lock.
- Add flag B_METAONLY to VOP_BALLOC to return indirect block buffer.
- Add a function ffs_checkfreefile needed for snapshot creation.
- Add special handling of snapshot files:
Snapshots may not be opened for writing and the attributes are read-only.
Use the mtime as the time this snapshot was taken.
Deny mtime updates for snapshot files.
- Add function transferlockers to transfer any waiting processes from
one lock to another.
- Add vfsop VFS_SNAPSHOT to take a snapshot and make it accessible through
a vnode.
- Add snapshot support to ls, fsck_ffs and dump.

Welcome to 2.0F.

Approved by: Jason R. Thorpe <thorpej@netbsd.org>
 1.20 14-Mar-2004  cube vn_close() expects an unlocked vnode.
 1.19 14-Feb-2004  hannken Add a generic copy-on-write hook to add/remove functions that will be
called with every buffer written through spec_strategy().

Used by fss(4). Future file-system-internal snapshots will need them too.

Welcome to 1.6ZK

Approved by: Jason R. Thorpe <thorpej@netbsd.org>
 1.18 22-Oct-2003  hannken Forgot to update the .Dd line. From Thomas Klausner <wiz@netbsd.org>.
 1.17 21-Oct-2003  hannken Add section 9 man pages for:
vfs_write_suspend, vfs_write_resume, vn_start_write and vn_finished_write.
 1.16 30-Jun-2003  wiz Fixes to make these man page look nice with groff-1.19.
 1.15 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.14 06-Apr-2003  wiz Fix a typo, from Igor Sobrado in PR 19680.
 1.13 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.12 20-Oct-2002  wiz Sort SEE ALSO.
 1.11 20-Oct-2002  gmcgarry Xr file.9
 1.10 14-Oct-2002  gmcgarry link for vn_rdwr()
 1.9 14-Oct-2002  wiz New sentence, new line.
 1.8 14-Oct-2002  gmcgarry Move the vnode file descriptor operations into their own file.
Add vn_marktext() and vn_statfile() descriptions.
 1.7 14-Oct-2002  gmcgarry vn_stat() now takes a struct vnode *. The description already implied this.
 1.6 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.5 06-Jan-2002  deberg fix typo
 1.4 31-Oct-2001  gmcgarry Document new VEXECMAP vnode flag and rename vn_marktext() to vn_markexec().
 1.3 22-Oct-2001  gmcgarry fnctl -> fcntl
 1.2 22-Oct-2001  wiz Whitespace, punctuation fixes; sort sections, fix xrefs.
 1.1 22-Oct-2001  gmcgarry Programmer's guide to the VFS interface.
 1.30.4.1 06-Nov-2007  matt sync with HEAD
 1.32.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.33.2.1 18-May-2008  yamt sync with head.
 1.38.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.40.2.1 08-Feb-2011  bouyer Sync with HEAD
 1.41.10.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.41.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.43.2.1 07-Jan-2017  pgoyette Sync with HEAD. (Note that most of these changes are simply $NetBSD$
tag issues.)
 1.45.14.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.9 07-Jan-2000  kleink vslock() is gone in UVM; uvm_vslock() can be found in uvm(9).
 1.8 16-Mar-1999  garbled More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.7 03-Sep-1998  msaitoh s/January/June/
This is a bug between rev. 1.3 and 1.4.
 1.6 09-May-1998  kleink Use size_t to pass the length of the memory region to operate on to chgkprot(),
kernacc(), useracc(), vslock() and vsunlock(); (unsigned) ints are not
adequate on all platforms.
 1.5 30-Apr-1998  thorpej Update for recent changes to vslock()/vsunlock(): document that the context
is taken from the provided proc, and remove the BUGS section, since it
has now been addressed.
 1.4 22-Apr-1998  ross Add David Brownlee's new intro pages, with editing. (PR #534[23])
Also, while here, expand apparently incorrectly .Dd month abbreviations.
(I thought about doing this in tmac/doc-common...heh...that would have
allowed a possible reverse map back to abbreviations.)
 1.3 11-Nov-1997  mrg add missing .Nm sections
 1.2 08-Oct-1997  jtc branches: 1.2.2;
Fix tipo inherited from old version of TNF copyright form.
s/REGENTS/FOUNDATION/.
 1.1 15-Jun-1996  pk Add descriptions of physio(), vslock(), vsunlock().
 1.2.2.1 11-Nov-1997  mrg pull up from trunk: add missing .Nm sections
 1.15 18-Mar-2017  riastradh Use `\(em', not `--'.

Refill sentences and tweak wording where appropriate while here.
 1.14 08-May-2016  wiz branches: 1.14.2; 1.14.4;
Remove unnecessary Ns macro.
 1.13 07-May-2016  riastradh Clarify wording about shared and exclusive locks.

Maybe this isn't important for users of wapbl, but it likely is
helpful for working in wapbl internals.
 1.12 07-May-2016  riastradh Omit confusing sentence.
 1.11 07-May-2016  riastradh Fix statement of what write-ahead means. Contrast with roll-back.
 1.10 01-Apr-2015  riastradh Clarify what wapbl_jlock_assert and wapbl_junlock_assert mean.
 1.9 31-Mar-2015  riastradh Explain large write transaction bug in WAPBL.
 1.8 27-Mar-2015  riastradh Whatever the original intent was, it works only for buffer cache.
 1.7 27-Mar-2015  riastradh Explain resource estimation bug in wapbl(9).
 1.6 27-Mar-2015  riastradh Make wording about who calls wapbl_*_buf consistent.
 1.5 27-Mar-2015  riastradh Explain wapbl's relation to the garbage-appendage bug.
 1.4 27-Mar-2015  riastradh Note that the wapbl transaction lock is nonrecursive.
 1.3 27-Mar-2015  riastradh Fix typo: VFS_UNMOUNT, not VFS_MOUNT, should call wapbl_stop.
 1.2 26-Mar-2015  wiz Use less macros for same output.
 1.1 26-Mar-2015  riastradh Add wapbl(9) man page.
 1.14.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.14.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.19 28-Apr-2015  prlw1 Fix typos
 1.18 17-Sep-2013  wiz Sort sections: consistently put CODE REFERENCES directly before SEE ALSO.
 1.17 18-Apr-2010  jruoho branches: 1.17.2; 1.17.8; 1.17.14;
Use .Dv instead of .Va for #defined constants.
 1.16 19-Oct-2009  bouyer Remove closes 3 & 4 from my licence. Lots of thanks to Soren Jacobsen
for the booring work !
 1.15 26-Dec-2005  perry u_intN_t -> uintN_t
 1.14 10-Sep-2005  wiz Use Xr to avoid Nm abuse.
 1.13 02-Sep-2005  rillig Fixed white-space.
 1.12 05-Oct-2003  bouyer Remove references to University of California from my copyright notices.
 1.11 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.10 14-Aug-2002  bjh21 Update the list of controller capabilities, and document the one I added
(WDC_CAPABILITY_NOIRQ).
 1.9 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.8 28-Nov-2001  wiz No point in using __P in prototype declarations in man pages.
Complete a prototype while I'm here.
 1.7 21-Jun-2001  wiz Improve grammar and formatting, fix some typos.
 1.6 05-Jun-2001  wiz Uppercase Dt, and fix some whitespace.
 1.5 31-May-2001  abs {independant,indepedant}->independent
 1.4 15-May-2000  bouyer Use my standart copyrigth notice.
 1.3 16-Mar-1999  garbled More .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.2 06-Mar-1999  mycroft Fix formatting errors (bad sentence breaks).
 1.1 19-Oct-1998  bouyer Man page describing the interface between the MI core wdc and its bus
front-ends.
 1.17.14.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.17.8.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.17.2.2 18-Apr-2010  jruoho Use .Dv instead of .Va for #defined constants.
 1.17.2.1 18-Apr-2010  jruoho file wdc.9 was added on branch uebayasi-xip on 2010-04-18 15:19:18 +0000
 1.15 08-Sep-2020  riastradh workqueue: Lift unnecessary restriction on workqueue_wait.

Allow multiple concurrent waits at a time, and allow enqueueing work
at the same time (as long as it's not the work we're waiting for).
This way multiple users can use a shared global workqueue and safely
wait for individual work items concurrently, while the workqueue is
still in use for other items (e.g., wg(4) peers).

This has the side effect of taking away a diagnostic measure, but I
think allowing the diagnostic's false positives instead of rejecting
them is worth it. We could cheaply add it back with some false
negatives if it's important.
 1.14 01-Aug-2020  wiz Fix typo.
 1.13 01-Aug-2020  riastradh New workqueue flag WQ_FPU.

Arranges kthread_fpu_enter/exit around calls to the worker. Saves
cost over explicit calls to kthread_fpu_enter/exit in the worker by
only doing it once, since there's often a high cost to flushing the
icache and zeroing the fpu registers.

As proposed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2020/06/20/msg026524.html
 1.12 28-Dec-2017  ozaki-r branches: 1.12.6;
Add workqueue_wait that waits for a specific work to finish

The caller must ensure that no new work is enqueued before calling
workqueue_wait. Note that Note that if the workqueue is WQ_PERCPU, the caller
can enqueue a new work to another queue other than the waiting queue.

Discussed on tech-kern@
 1.11 13-Oct-2015  riastradh branches: 1.11.8;
Semicolon, not comma; use future tense more Englishly.
 1.10 24-Oct-2011  yamt update the description of the priority argument.
 1.9 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.8 04-Aug-2009  wiz Use .Nm instead Xr to itself.
 1.7 03-Aug-2009  rmind Relate interfaces by updating "see also" section.
 1.6 03-Aug-2009  rmind Merge workqueue_create(9), workqueue_destroy(9) and workqueue_enqueue(9)
into a single workqueue(9) man page.
 1.5 14-Jul-2007  ad - kcont was removed.
- Replace some references to tsleep.
 1.4 16-Sep-2006  yamt add workqueue_destroy.
 1.3 24-Nov-2005  wiz Article improvements.
 1.2 24-Nov-2005  yamt .Xr kcont and workqueue each other.
 1.1 24-Nov-2005  yamt document workqueue.
 1.11.8.1 16-Jan-2018  martin Pull up following revision(s) (requested by ozaki-r in ticket #497):
tests/rump/rumpkern/Makefile: revision 1.16
tests/rump/kernspace/Makefile: revision 1.6
tests/rump/kernspace/workqueue.c: revision 1.1
tests/rump/kernspace/workqueue.c: revision 1.2
tests/rump/kernspace/workqueue.c: revision 1.3
tests/rump/kernspace/workqueue.c: revision 1.4
tests/rump/kernspace/workqueue.c: revision 1.5
tests/rump/kernspace/workqueue.c: revision 1.6
tests/rump/rumpkern/t_workqueue.c: revision 1.1
sys/sys/workqueue.h: revision 1.10
tests/rump/rumpkern/t_workqueue.c: revision 1.2
tests/rump/kernspace/kernspace.h: revision 1.5
tests/rump/kernspace/kernspace.h: revision 1.6
sys/net/if_bridge.c: revision 1.147
distrib/sets/lists/debug/mi: revision 1.225
sys/kern/subr_workqueue.c: revision 1.34
share/man/man9/workqueue.9: revision 1.12
sys/net/if_spppsubr.c: revision 1.178
distrib/sets/lists/tests/mi: revision 1.763
Add simple test for workqueue(9)
Add declaration. build fix
sorry, I forgot to commit this file.
Tweak use of cv_timedwait
- Handle its return value
- Specify more appropriate time-out periods (2 ticks is too short)
Fix a race condition on taking the mutex
The workqueue worker can take the mutex before the tester tries to take it after
calling workqueue_enqueue. If it happens, the worker calls cv_broadcast before
the tester calls cv_timedwait and the tester will wait until the cv timed out
Take the mutex before calling workqueue_enqueue so that the tester surely calls
cv_timedwait before the worker calls cv_broadcast.
The fix stabilizes the test, t_workqueue/workqueue1.
Add workqueue_wait that waits for a specific work to finish
The caller must ensure that no new work is enqueued before calling
workqueue_wait. Note that Note that if the workqueue is WQ_PERCPU, the caller
can enqueue a new work to another queue other than the waiting queue.
Discussed on tech-kern@
Ensure the timer isn't running by using workqueue_wait
Functionalize some routines to add new tests easily (NFC)
Add a test case for workqueue_wait
Fix build
 1.12.6.1 18-Apr-2024  martin Pull up following revision(s) (requested by riastradh in ticket #1830):

sys/kern/subr_workqueue.c: revision 1.40
sys/kern/subr_workqueue.c: revision 1.41
sys/kern/subr_workqueue.c: revision 1.42
sys/kern/subr_workqueue.c: revision 1.43
sys/kern/subr_workqueue.c: revision 1.44
sys/kern/subr_workqueue.c: revision 1.45
sys/kern/subr_workqueue.c: revision 1.46
tests/rump/kernspace/workqueue.c: revision 1.7
sys/kern/subr_workqueue.c: revision 1.47
tests/rump/kernspace/workqueue.c: revision 1.8
tests/rump/kernspace/workqueue.c: revision 1.9
tests/rump/rumpkern/t_workqueue.c: revision 1.3
tests/rump/rumpkern/t_workqueue.c: revision 1.4
tests/rump/kernspace/kernspace.h: revision 1.9
tests/rump/rumpkern/Makefile: revision 1.20
sys/kern/subr_workqueue.c: revision 1.39
share/man/man9/workqueue.9: revision 1.15
(all via patch)

workqueue: Lift unnecessary restriction on workqueue_wait.

Allow multiple concurrent waits at a time, and allow enqueueing work
at the same time (as long as it's not the work we're waiting for).

This way multiple users can use a shared global workqueue and safely
wait for individual work items concurrently, while the workqueue is
still in use for other items (e.g., wg(4) peers).

This has the side effect of taking away a diagnostic measure, but I
think allowing the diagnostic's false positives instead of rejecting
them is worth it. We could cheaply add it back with some false
negatives if it's important.
workqueue(9): workqueue_wait and workqueue_destroy may sleep.

But might not, so assert sleepable up front.
workqueue(9): Sprinkle dtrace probes.
tests/rump/rumpkern: Use PROGDPLIBS, not explicit -L/-l.

This way we relink the t_* test programs whenever changes under
tests/rump/kernspace change libkernspace.a.

workqueue(9) tests: Nix trailing whitespace.

workqueue(9) tests: Destroy struct work immediately on entry.

workqueue(9) tests: Add test for PR kern/57574.

workqueue(9): Avoid touching running work items in workqueue_wait.

As soon as the workqueue function has called, it is forbidden to
touch the struct work passed to it -- the function might free or
reuse the data structure it is embedded in.

So workqueue_wait is forbidden to search the queue for the batch of
running work items. Instead, use a generation number which is odd
while the thread is processing a batch of work and even when not.
There's still a small optimization available with the struct work
pointer to wait for: if we find the work item in one of the per-CPU
_pending_ queues, then after we wait for a batch of work to complete
on that CPU, we don't need to wait for work on any other CPUs.
PR kern/57574

workqueue(9): Sprinkle dtrace probes for workqueue_wait edge cases.

Let's make it easy to find out whether these are hit.

workqueue(9): Stop violating queue(3) internals.

workqueue(9): Avoid unnecessary mutex_exit/enter cycle each loop.

workqueue(9): Sort includes.
No functional change intended.

workqueue(9): Factor out wq->wq_flags & WQ_FPU in workqueue_worker.
No functional change intended. Makes it clearer that s is
initialized when used.
 1.12 03-Aug-2009  rmind Merge workqueue_create(9), workqueue_destroy(9) and workqueue_enqueue(9)
into a single workqueue(9) man page.
 1.11 06-May-2008  yamt add a missing .El
 1.10 07-Aug-2007  wiz branches: 1.10.8; 1.10.10;
Use more markup. Try to improve english. Sort SEE ALSO.
 1.9 07-Aug-2007  xtraeme <wizd> Bump date for previous.
 1.8 05-Aug-2007  rmind branches: 1.8.2;
Sync the manual pages of workqueue(9) interface with the code.

/etc/rc.d/wizd start
 1.7 13-May-2007  xtraeme Don't mention ltsleep(9), it's obsolete. workqueue(9) uses condvar(9).
 1.6 13-May-2007  xtraeme In DESCRIPTION move the name argument to the proper place, so
that it matches the order specificied in the prototype.
 1.5 01-Mar-2007  yamt sync with the code. (pri_t)
 1.4 23-Dec-2006  yamt remove a BUGS section because it's solved by yamt-splraiseipl.
 1.3 24-Nov-2005  wiz Use Fa for a structure member.
 1.2 24-Nov-2005  wiz Article improvements. Use more macros. Sort SEE ALSO.
 1.1 24-Nov-2005  yamt document workqueue.
 1.8.2.2 05-Aug-2007  rmind Sync the manual pages of workqueue(9) interface with the code.

/etc/rc.d/wizd start
 1.8.2.1 05-Aug-2007  rmind file workqueue_create.9 was added on branch matt-mips64 on 2007-08-05 17:57:38 +0000
 1.10.10.1 18-May-2008  yamt sync with head.
 1.10.8.1 02-Jun-2008  mjf Sync with HEAD.
 1.3 03-Aug-2009  rmind Merge workqueue_create(9), workqueue_destroy(9) and workqueue_enqueue(9)
into a single workqueue(9) man page.
 1.2 13-Apr-2007  plunky remove extraneous .El
 1.1 16-Sep-2006  yamt add workqueue_destroy.
 1.5 03-Aug-2009  rmind Merge workqueue_create(9), workqueue_destroy(9) and workqueue_enqueue(9)
into a single workqueue(9) man page.
 1.4 07-Aug-2007  wiz Use more markup. Try to improve english. Sort SEE ALSO.
 1.3 07-Aug-2007  xtraeme <wizd> Bump date for previous.
 1.2 05-Aug-2007  rmind branches: 1.2.2;
Sync the manual pages of workqueue(9) interface with the code.

/etc/rc.d/wizd start
 1.1 24-Nov-2005  yamt document workqueue.
 1.2.2.2 05-Aug-2007  rmind Sync the manual pages of workqueue(9) interface with the code.

/etc/rc.d/wizd start
 1.2.2.1 05-Aug-2007  rmind file workqueue_enqueue.9 was added on branch matt-mips64 on 2007-08-05 17:57:39 +0000
 1.4 11-Feb-2018  wiz Sort SEE ALSO.
 1.3 08-Feb-2018  dholland Typo fixes from Eitan Adler.
 1.2 30-Jun-2017  pgoyette Minor wording improvement, and use an apostrophe for possession.
 1.1 13-Jun-2017  nat Manual pages for wsbell.
 1.8 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.7 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.6 04-Feb-2003  perry branches: 1.6.32; 1.6.34;
"Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.5 14-Oct-2002  wiz New sentence, new line.
 1.4 20-Sep-2002  uebayasi .Xr each other.
 1.3 22-Oct-2001  gmcgarry wsemul.9 was merged with wsdisplay.9
 1.2 22-Oct-2001  wiz Whitespace, punctuation fixes; sort sections, fix xrefs.
 1.1 22-Oct-2001  gmcgarry Programmer's guide for wscons.
 1.6.34.1 18-May-2008  yamt sync with head.
 1.6.32.1 02-Jun-2008  mjf Sync with HEAD.
 1.23 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.22 18-May-2009  snj Fix some typos and bad wording. From Raphael Langerhorst in
PR misc/35213, plus two small nits from me.
 1.21 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.20 07-Mar-2007  dogcow branches: 1.20.10; 1.20.12;
running in emulated wizd mode, convert caddr_t to void *.
 1.19 15-Apr-2006  jmmv The getwschar and putwschar accessops are gone.
 1.18 12-Apr-2006  jmmv Document that the ioctl and mmap accessops now take an extra parameter that
points to the screen on which these were called.
 1.17 05-Apr-2006  drochner remove get/setborder from accessops
 1.16 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.15 30-Jul-2004  wiz De-__P, fix a typo.
 1.14 30-Jul-2004  jmmv Document the ("recently" added) getwschar, putwschar, scroll, getborder and
setborder accessops. Document the new replaceattr emulop.

While here, add a paragraph explaining the purpose of each emulop (just as
done in accessops). I believe I got them right, but a review could be good.
 1.13 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.12 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.11 14-Oct-2002  wiz New sentence, new line.
 1.10 19-Sep-2002  uebayasi A missing .Fa.
 1.9 18-Sep-2002  uebayasi Fix a typo.
 1.8 04-Jul-2002  junyoung alloc_attr -> allocattr

Approved by Matthias Drochner.
 1.7 22-Jun-2002  bjh21 Mention wsdisplay(4), since the ioctl documentation there is likely to be
useful to implementors as well.
 1.6 10-Mar-2002  wiz ispell, and a grammar fix.
 1.5 10-Mar-2002  junyoung Fix typos.
 1.4 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.3 12-Feb-2002  uwe s/passwd/passed/
 1.2 22-Oct-2001  wiz Whitespace, punctuation fixes; sort sections, fix xrefs.
 1.1 22-Oct-2001  gmcgarry Programmer's guide for wscons.
 1.20.12.1 18-May-2008  yamt sync with head.
 1.20.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.18 13-Jan-2012  wiz New sentence, new line. Use more markup. Bump date for previous.
 1.17 13-Jan-2012  macallan document recent changes
 1.16 13-Jun-2011  nonaka branches: 1.16.2;
Removed non-existent wsfont_getflg() functions.
Const'fy name in struct wsdisplay_font.
Fixed some typo.
 1.15 02-Dec-2010  wiz branches: 1.15.4;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.14 18-May-2009  snj Fix some typos and bad wording. From Raphael Langerhorst in
PR misc/35213, plus two small nits from me.
 1.13 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.12 05-Jun-2005  he branches: 1.12.20; 1.12.22;
Catch up to changes in prototype for a few functions, which changed some
"char*" parameters to "const char*".
 1.11 03-May-2003  gmcgarry Xr wsfont(4)
 1.10 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.9 06-Apr-2003  wiz Fix a typo, from Igor Sobrado in PR 19680.
 1.8 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.7 14-Oct-2002  wiz New sentence, new line.
 1.6 16-Mar-2002  ad Sync with reality.
 1.5 13-Mar-2002  wiz Remove a superfluous comma.
 1.4 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.3 21-Jan-2002  wiz Remove superfluous dot.
 1.2 22-Oct-2001  wiz Whitespace, punctuation fixes; sort sections, fix xrefs.
 1.1 22-Oct-2001  gmcgarry Programmer's guide for wscons.
 1.12.22.1 18-May-2008  yamt sync with head.
 1.12.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.15.4.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.16.2.1 17-Apr-2012  yamt sync with head
 1.16 06-Apr-2025  rillig wskbd.9: fix function prototype
 1.15 02-Dec-2010  wiz branches: 1.15.58;
Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.14 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.13 07-Mar-2007  dogcow branches: 1.13.10; 1.13.12;
running in emulated wizd mode, convert caddr_t to void *.
 1.12 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.11 05-Jun-2004  rumble Fix typos.
 1.10 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.9 06-Apr-2003  wiz Fix a typo, from Igor Sobrado in PR 19680.
 1.8 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.7 14-Oct-2002  wiz New sentence, new line.
 1.6 19-Mar-2002  wiz Markup fix.
 1.5 19-Mar-2002  gmcgarry Document keymaps.
 1.4 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.3 28-Nov-2001  wiz No point in using __P in prototype declarations in man pages.
 1.2 22-Oct-2001  wiz Whitespace, punctuation fixes; sort sections, fix xrefs.
 1.1 22-Oct-2001  gmcgarry Programmer's guide for wscons.
 1.13.12.1 18-May-2008  yamt sync with head.
 1.13.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.15.58.1 02-Aug-2025  perseant Sync with HEAD
 1.19 11-Oct-2021  nia wsmouse.9: document scrolling bits
 1.18 18-Dec-2020  pgoyette Minor typo - do I really need to bump the date for this? :)
 1.17 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.16 30-Apr-2008  martin Convert TNF licenses to new 2 clause variant
 1.15 07-Mar-2007  dogcow branches: 1.15.10; 1.15.12;
running in emulated wizd mode, convert caddr_t to void *.
 1.14 19-Nov-2006  wiz Bump date for previous.
 1.13 12-Nov-2006  plunky Tidy away wsmouse_input() abstractions and update
documentation to include the W direction.
 1.12 20-Dec-2005  rpaulo Adapt man pages to ktrace-lwp.
 1.11 25-Oct-2005  wiz Fix a typo.
 1.10 19-Oct-2005  tsutsui - Clarify the definitions of wsmouse_input(9) arguments as request
from Steave Rumble on port-sgimips. (maybe needs wizd(8))
- Add Xref pms(4), wsmouse(4), wscons(9).
- Bump date.
 1.9 05-Jun-2004  rumble Fix typos.
 1.8 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.7 06-Apr-2003  wiz Fix a typo, from Igor Sobrado in PR 19680.
 1.6 04-Feb-2003  perry "Utilize" has exactly the same meaning as "use," but it is more
difficult to read and understand. Most manuals of English style
therefore say that you should use "use".
 1.5 24-Jan-2003  tsarna "Obsolute" is a nonsklarkish English flutzpah... Replace it with "Absolute"
 1.4 14-Oct-2002  wiz New sentence, new line.
 1.3 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.2 22-Oct-2001  wiz Whitespace, punctuation fixes; sort sections, fix xrefs.
 1.1 22-Oct-2001  gmcgarry Programmer's guide for wscons.
 1.15.12.1 18-May-2008  yamt sync with head.
 1.15.10.1 02-Jun-2008  mjf Sync with HEAD.
 1.3 23-Jan-2010  rmind Rename xc(9) to xcall(9). OK dyoung@.
 1.2 22-Jan-2010  dyoung Per rmind@'s suggestion, describe the cross-call implementation in more
detail (by pulling more text from sys/kern/subr_xcall.c).

Mention that a cross-call can be preempted, and xref kpreempt(9).
 1.1 22-Jan-2010  dyoung Add a manual page for cross-calls. Somebody should read this to
make sure I've described it correctly and intelligibly.

TBD: hook this up in the Makefile and in the set lists.
 1.17 01-Feb-2020  riastradh Redocument xc_barrier.

Be more clearer, and more correcter, about what it does.
 1.16 30-Nov-2019  riastradh Document xc_barrier.
 1.15 06-Oct-2019  uwe Use .Bl -tag -width Fn. There's no such thing as -width compact
or, rather, there is, but the width specified is that of the word
"compact".
 1.14 06-Oct-2019  uwe Avoid using .Fn for XC_HIGHPRI_IPL as it looks inconsistent with
.Dv XC_HIGHPRI
 1.13 06-Oct-2019  uwe Format (*func)(arg1, arg2) so that "func" too is formatted as an
argument (the incantation is, admittedly, rather baroque and kludgy).
 1.12 01-Feb-2018  ozaki-r branches: 1.12.4;
Support arbitrary softint IPLs in high priority xcall

The high priority xcall supported only a softint of IPL_SOFTSERIAL. It meant
that it didn't work for xcall callbacks depending on lower IPLs than
IPL_SOFTSERIAL.

The change makes xcall have multiple softints of IPLs and allow users to specify
arbitrary IPLs. Users can specify an IPL by XC_HIGHPRI_IPL passed to the 1st
argument of xc_broadcast or xc_unicast.

Note that xcall still serves requests one by one (i.e., doesn't run them
concurrently) even if requests have different IPLs.

Proposed on tech-kern@
 1.11 26-Jan-2018  ozaki-r Refer softint(9)
 1.10 26-Nov-2013  rmind branches: 1.10.18;
Update xcall(9).
 1.9 20-Jul-2013  wiz Use Mt for email addresses.
 1.8 24-Oct-2011  yamt branches: 1.8.2; 1.8.8; 1.8.12;
- document XC_HIGHPRI
- explicitly note that xc_wait requires thread context.
 1.7 02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.6 16-May-2010  jruoho IMPLEMENTATION NOTES back to NOTES.
 1.5 14-May-2010  jruoho Use standard section headers.
 1.4 23-Jan-2010  wiz branches: 1.4.2;
Fix Dt, remove trailing whitespace, sort SEE ALSO.
 1.3 23-Jan-2010  rmind xcall(9): correct the point about preemption, add NOTES, do not mentioned
some implementation details.
 1.2 23-Jan-2010  rmind Remove xc_init_cpu(), percpu_init(), percpu_init_cpu() - they are part
of implementation, not public API. OK dyoung@.
 1.1 23-Jan-2010  rmind Rename xc(9) to xcall(9). OK dyoung@.
 1.4.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.8.12.1 23-Jul-2013  riastradh sync with HEAD
 1.8.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.8.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.10.18.1 19-Feb-2018  snj Pull up following revision(s) (requested by ozaki-r in ticket #556):
sys/sys/xcall.h: 1.6
share/man/man9/xcall.9: 1.11-1.12
sys/kern/subr_xcall.c: 1.21-1.25
Refer softint(9)
--
Support arbitrary softint IPLs in high priority xcall
The high priority xcall supported only a softint of IPL_SOFTSERIAL. It meant
that it didn't work for xcall callbacks depending on lower IPLs than
IPL_SOFTSERIAL.
The change makes xcall have multiple softints of IPLs and allow users to specify
arbitrary IPLs. Users can specify an IPL by XC_HIGHPRI_IPL passed to the 1st
argument of xc_broadcast or xc_unicast.
Note that xcall still serves requests one by one (i.e., doesn't run them
concurrently) even if requests have different IPLs.
Proposed on tech-kern@
--
Use high priority xcall with a softint of an IPL the same as psref class's one
This mitigates undesired delay of psref_target_destroy under load such as heavy
netowrk traffic that loads softint.
--
Try to fix the build: avoid duplicate case labels when IPL_SOFT* are
all the same.
--
Fix build of kernels that some (or all) IPL_SOFT* share a value (e.g., mips)
--
Avoid allocating unused softints that share a value of IPL between another
Sort XC_IPL_* in order of priority (NFC)
 1.12.4.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.6 21-Aug-2010  jruoho Move nmi(9) to the correct category.
 1.5 12-Feb-2010  dyoung branches: 1.5.2;
Add nmi(9), a manual page for the x86-only
nmi_establish(9)/nmi_disestablish(9) routines.
 1.4 06-Feb-2010  dyoung Move MD spllower(9) and splraise(9) doco from the MI spl(9) to an i386
manual page.
 1.3 03-Nov-2009  dyoung Install the manual page return_address(9).
 1.2 01-Jul-2001  gmcgarry Add some missing documentation.
 1.1 01-Oct-1998  jtk add bioscall(9) for i386
 1.5.2.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.5.2.1 12-Feb-2010  uebayasi file Makefile was added on branch uebayasi-xip on 2010-10-22 07:11:54 +0000
 1.8 17-Feb-2017  christos Fix cross references
 1.7 06-Jan-2014  njoly branches: 1.7.8; 1.7.12;
Remove extra trailing spaces in functions arguments.
 1.6 30-Apr-2008  martin branches: 1.6.22; 1.6.28;
Convert TNF licenses to new 2 clause variant
 1.5 26-Dec-2005  perry branches: 1.5.20; 1.5.22;
u_intN_t -> uintN_t
 1.4 16-Apr-2003  wiz Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.3 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.2 26-Dec-2001  wiz Whitespace nit.
 1.1 01-Jul-2001  gmcgarry Add some missing documentation.
 1.5.22.1 18-May-2008  yamt sync with head.
 1.5.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.6.28.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.6.22.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.7.12.1 21-Apr-2017  bouyer Sync with HEAD
 1.7.8.1 20-Mar-2017  pgoyette Sync with HEAD
 1.10 03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.9 05-May-2010  jruoho branches: 1.9.38;
Markup: .Fn instead of .Nm, .Tn, offset indent, newline for a new sentence.
 1.8 30-Apr-2008  martin branches: 1.8.12;
Convert TNF licenses to new 2 clause variant
 1.7 16-Apr-2003  wiz branches: 1.7.32; 1.7.34;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.6 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.5 26-Dec-2001  wiz Drop a .Pp.
 1.4 10-Sep-2001  wiz Use standard section headers.
 1.3 21-Jun-2001  wiz Whitespace and formatting fixes.
 1.2 05-Jun-2001  wiz Drop argument of .Os.
 1.1 01-Oct-1998  jtk add bioscall(9) for i386
 1.7.34.1 18-May-2008  yamt sync with head.
 1.7.32.1 02-Jun-2008  mjf Sync with HEAD.
 1.8.12.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.9.38.1 02-Sep-2019  martin Pull up following revision(s) (requested by sevan in ticket #1351):

share/man/man4/man4.amiga/grf.4: revision 1.7
share/man/man4/si.4: revision 1.11
share/man/man8/man8.sparc/boot.8: revision 1.32
share/man/man5/nsswitch.conf.5: revision 1.29
share/man/man5/mixerctl.conf.5: revision 1.7
share/man/man8/man8.vax/boot.8: revision 1.14
share/man/man4/man4.vax/dn.4: revision 1.12
share/man/man8/man8.vax/drtest.8: revision 1.16
share/man/man8/sysinst.8: revision 1.6
share/man/man4/ip.4: revision 1.37
share/man/man5/boot.cfg.5: revision 1.28
share/man/man1/cd.1: revision 1.10
share/man/man4/usb.4: revision 1.106
share/man/man4/man4.vax/ix.4: revision 1.17
share/man/man7/security.7: revision 1.15
share/man/man7/hier.7: revision 1.123
share/man/man8/afterboot.8: revision 1.58
share/man/man1/man1.x68k/bellctrl.1: revision 1.14
share/man/man4/se.4: revision 1.6
share/man/man4/utoppy.4: revision 1.7
share/man/man4/midi.4: revision 1.32
share/man/man4/cfb.4: revision 1.5
share/man/man4/man4.sparc/magma.4: revision 1.12
share/man/man4/audio.4: revision 1.80
share/man/man4/isic.4: revision 1.18
share/man/man1/cd.1: revision 1.7
share/man/man4/envsys.4: revision 1.51
share/man/man1/cd.1: revision 1.8
share/man/man1/cd.1: revision 1.9
share/man/man3/fast_divide32.3: revision 1.9
share/man/man4/pci.4: revision 1.97
share/man/man5/ranlib.5: revision 1.7
share/man/man3/__arraycount.3: revision 1.7
share/man/man4/isa.4: revision 1.46
share/man/man8/man8.atari/ahdilabel.8: revision 1.14
share/man/man4/chipsfb.4: revision 1.6
share/man/man8/man8.macppc/boot.8: revision 1.8
share/man/man5/passwd.5: revision 1.33
share/man/man8/man8.macppc/ofwboot.8: revision 1.14
share/man/man8/compat_linux.8: revision 1.38
share/man/man4/iop.4: revision 1.22
share/man/man4/ddb.4: revision 1.167
share/man/man4/termios.4: revision 1.37
share/man/man8/compat_freebsd.8: revision 1.18
share/man/man5/ar.5: revision 1.9
share/man/man7/release.7: revision 1.37
share/man/man5/core.5: revision 1.31
share/man/man4/ahd.4: revision 1.6
share/man/man4/man4.vax/ad.4: revision 1.12
share/man/man4/pppoe.4: revision 1.39
share/man/man5/locale.alias.5: revision 1.3
share/man/man8/man8.amiga/installboot.8: revision 1.23
share/man/man4/etherip.4: revision 1.8
share/man/man3/queue.3: revision 1.57
share/man/man5/genassym.cf.5: revision 1.13
share/man/man4/mpls.4: revision 1.10
share/man/man1/wait.1: revision 1.5
share/man/man5/capfile.5: revision 1.4
share/man/man4/man4.alpha/ttwopci.4: revision 1.6
share/man/man4/man4.atari/rtc.4: revision 1.8
share/man/man4/gpiosim.4: revision 1.6
share/man/man3/bitstring.3: revision 1.18
share/man/man4/isdntel.4: revision 1.8
share/man/man4/ai.4: revision 1.9
share/man/man8/man8.hppa/boot.8: revision 1.2
share/man/man4/uyurex.4: revision 1.6
share/man/man8/man8.alpha/mkbootimage.8: revision 1.9
share/man/man4/bpf.4: revision 1.56
share/man/man4/man4.amiga/mfcs.4: revision 1.8
share/man/man4/cmpci.4: revision 1.9
share/man/man8/man8.vax/format.8: revision 1.14
share/man/man8/compat_svr4.8: revision 1.27
share/man/man4/crypto.4: revision 1.26
share/man/man4/userconf.4: revision 1.13
share/man/man4/agp.4: revision 1.17
share/man/man9/man9.i386/bioscall.9: revision 1.10
share/man/man4/uftdi.4: revision 1.20
share/man/man4/radio.4: revision 1.13
share/man/man4/mfb.4: revision 1.5
share/man/man7/ascii.7: revision 1.8
share/man/man4/man4.vax/dl.4: revision 1.13
share/man/man4/ral.4: revision 1.12
share/man/man4/unix.4: revision 1.26
share/man/man4/edc.4: revision 1.12
share/man/man4/pim.4: revision 1.5
share/man/man8/compat_ultrix.8: revision 1.21
share/man/man4/dge.4: revision 1.11
share/man/man8/diskless.8: revision 1.32
share/man/man5/passwd.conf.5: revision 1.11
share/man/man8/man8.acorn26/boot26.8: revision 1.8
share/man/man4/man4.vax/hy.4: revision 1.12
share/man/man4/plip.4: revision 1.4
share/man/man4/sc.4: revision 1.8
share/man/man4/ec.4: revision 1.14
share/man/man4/man4.sgimips/giopci.4: revision 1.9
share/man/man7/sysctl.7: revision 1.114
share/man/man3/bits.3: revision 1.18
share/man/man4/we.4: revision 1.19
share/man/man8/compat_sunos.8: revision 1.21
share/man/man4/ip6.4: revision 1.31
share/man/man4/acpilid.4: revision 1.8
share/man/man4/man4.dreamcast/aica.4: revision 1.6
share/man/man4/mfi.4: revision 1.12
share/man/man4/ugen.4: revision 1.32
share/man/man4/jme.4: revision 1.7
share/man/man4/man4.sparc64/intro.4: revision 1.5
share/man/man4/zyd.4: revision 1.5
share/man/man4/gre.4: revision 1.45
share/man/man3/bitmap.3: revision 1.10
share/man/man4/man4.vax/cons.4: revision 1.12
share/man/man3/gcq.3: revision 1.4
share/man/man4/man4.hppa/pdc.4: revision 1.3
share/man/man4/multicast.4: revision 1.8
share/man/man4/man4.sparc/intro.4: revision 1.27
share/man/man4/ath.4: revision 1.32
share/man/man4/ym.4: revision 1.19
share/man/man3/iso646.3: revision 1.6
share/man/man4/btsco.4: revision 1.13
share/man/man4/man4.i386/ndis.4: revision 1.6
share/man/man4/pad.4: revision 1.6
share/man/man4/strip.4: revision 1.16
share/man/man8/man8.x86/boot.8: revision 1.12
share/man/man4/amr.4: revision 1.15
share/man/man4/ieee80211.4: revision 1.5
share/man/man4/options.4: revision 1.467
share/man/man5/link.5: revision 1.24
share/man/man8/man8.cobalt/boot.8: revision 1.10
share/man/man5/stab.5: revision 1.15
share/man/man3/tree.3: revision 1.12
share/man/man4/route.4: revision 1.31
share/man/man4/man4.sun3/leds.4: revision 1.13
share/man/man4/bluetooth.4: revision 1.20
share/man/man4/man4.i386/pcibios.4: revision 1.19
share/man/man5/veriexec.5: revision 1.8
share/man/man7/operator.7: revision 1.12
share/man/man4/man4.hp300/dcl.4: revision 1.13
share/man/man4/man4.i386/intro.4: revision 1.31
share/man/man5/ld.so.conf.5: revision 1.21
share/man/man8/man8.alpha/boot.8: revision 1.16
share/man/man4/bio.4: revision 1.13
share/man/man4/man4.sun2/leds.4: revision 1.10
share/man/man8/man8.x86/mbr.8: revision 1.4
share/man/man8/man8.mvme68k/boot.8: revision 1.9
share/man/man4/man4.alpha/ttwoga.4: revision 1.6
share/man/man4/ahc.4: revision 1.34

Direct reader to shell documentation generally, rather than csh(1)
specifically.

Mention variables OLDPWD and PWD.

Move the text that explains that cd(1) is a shell built-in to the very
beginning of the description where it can be seen prominently.

Improve formatting.

-

Remove workaround for ancient HTML generation code.
Use EXIT STATUS and .Ex.
 1.3 21-Aug-2010  jruoho Move nmi(9) to the correct category.
 1.2 16-Feb-2010  wiz branches: 1.2.2;
Remove trailing whitespace.
 1.1 12-Feb-2010  dyoung Add nmi(9), a manual page for the x86-only
nmi_establish(9)/nmi_disestablish(9) routines.
 1.2.2.2 22-Oct-2010  uebayasi Merge botch.
 1.2.2.1 16-Feb-2010  uebayasi file nmi.9 was added on branch uebayasi-xip on 2010-10-22 07:37:27 +0000
 1.7 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.6 20-Jul-2013  wiz Use Mt for email addresses.
 1.5 14-May-2010  joerg branches: 1.5.6; 1.5.12; 1.5.16;
\\ -> \e
 1.4 05-May-2010  wiz Add "function" to make sentences easier to read.
 1.3 05-May-2010  jruoho .Nm -> .Fn, and wrap the kernel config option so that it will fit into 80
columns.
 1.2 03-Nov-2009  wiz branches: 1.2.2;
Fix Dt, improve Nd, remove trailing whitespace.
 1.1 03-Nov-2009  dyoung Add return_address(9) for reading the Nth return address from the call
stack.
 1.2.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.5.16.1 23-Jul-2013  riastradh sync with HEAD
 1.5.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.5.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.1 06-Feb-2010  dyoung Move MD spllower(9) and splraise(9) doco from the MI spl(9) to an i386
manual page.
 1.2 11-Oct-1997  mycroft Use bsd.man.mk and bsd.subdir.mk as appropriate.
 1.1 22-May-1997  jeremy Description of sun3 interrupt handler interface functions.
 1.10 27-Dec-2019  msaitoh s/transfered/transferred/
 1.9 30-Apr-2008  martin branches: 1.9.64;
Convert TNF licenses to new 2 clause variant
 1.8 16-Apr-2003  wiz branches: 1.8.32; 1.8.34;
Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
 1.7 13-Feb-2002  ross Generate <>& symbolically. I'm avoiding .../dist/... directories for now.
 1.6 21-Jun-2001  wiz Whitespace and formatting fixes.
 1.5 05-Jun-2001  wiz Drop argument of .Os.
 1.4 03-Sep-1998  jeremy Changed to suggest using sun3/autoconf.h rather than machine/autoconf.h to
reflect the new system include file locations.
Reworded slightly and added more macros.
 1.3 11-Nov-1997  mrg add missing .Nm sections
 1.2 22-May-1997  jeremy branches: 1.2.2;
Remove extra whitespace.
 1.1 22-May-1997  jeremy Description of sun3 interrupt handler interface functions.
 1.2.2.1 11-Nov-1997  mrg pull up from trunk: add missing .Nm sections
 1.8.34.1 18-May-2008  yamt sync with head.
 1.8.32.1 02-Jun-2008  mjf Sync with HEAD.
 1.9.64.1 08-Apr-2020  martin Merge changes from current as of 20200406
 1.6 28-Oct-2011  jruoho Note briefly what MSRs are. Requested by wiz@.
 1.5 25-Oct-2011  jruoho Also mention rdtsc() in passing.
 1.4 25-Oct-2011  jruoho Briefly document the basic RDMSR/WRMSR functions.
 1.3 11-Mar-2011  jruoho Add x86/tsc(9).
 1.2 21-Aug-2010  jruoho branches: 1.2.2;
Move nmi(9) to the correct category.
 1.1 21-Aug-2010  jruoho Add x86_msr_xcall(9).
 1.2.2.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.2.2.1 21-Aug-2010  uebayasi file Makefile was added on branch uebayasi-xip on 2010-10-22 09:23:11 +0000
 1.5 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.4 20-Jul-2013  wiz Use Mt for email addresses.
 1.3 17-Mar-2011  jruoho branches: 1.3.4; 1.3.10; 1.3.14;
Remove the bulk "this section describes places within [...]" -paragraph.
 1.2 21-Aug-2010  wiz branches: 1.2.2;
Add x86 to Dt.
 1.1 21-Aug-2010  jruoho Move nmi(9) to the correct category.
 1.2.2.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.2.2.1 21-Aug-2010  uebayasi file nmi.9 was added on branch uebayasi-xip on 2010-10-22 09:23:11 +0000
 1.3.14.1 23-Jul-2013  riastradh sync with HEAD
 1.3.10.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.3.4.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.4 17-Feb-2017  christos Fix cross references
 1.3 28-Oct-2011  jruoho branches: 1.3.24; 1.3.28;
Note briefly what MSRs are. Requested by wiz@.
 1.2 25-Oct-2011  jruoho Also mention rdtsc() in passing.
 1.1 25-Oct-2011  jruoho Briefly document the basic RDMSR/WRMSR functions.
 1.3.28.1 21-Apr-2017  bouyer Sync with HEAD
 1.3.24.1 20-Mar-2017  pgoyette Sync with HEAD
 1.8 19-Feb-2017  wiz Sort.
 1.7 17-Feb-2017  christos Fix cross references
 1.6 04-May-2015  pgoyette branches: 1.6.2; 1.6.4;
Swap function names, so that xxx_bp() refers to the boot processor and
xxx_ap() to the application processor. It doesn't make any sense to
have bp reference the application processor while ap references boot!

XXX The two function are now lexicographically mis-ordered. If this
XXX is an issue, let me know and I will re-sequence them.
 1.5 20-Nov-2013  jruoho Don't be so pessimistic.
 1.4 25-Oct-2011  jruoho branches: 1.4.2; 1.4.8;
Also mention rdtsc() in passing.
 1.3 13-Mar-2011  jruoho Xref hpet(4) and hz(9).
 1.2 12-Mar-2011  wiz Fix typos.
 1.1 11-Mar-2011  jruoho Add x86/tsc(9).
 1.4.8.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.4.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.6.4.1 21-Apr-2017  bouyer Sync with HEAD
 1.6.2.1 20-Mar-2017  pgoyette Sync with HEAD
 1.5 17-Feb-2017  christos Fix cross references
 1.4 25-Oct-2011  jruoho branches: 1.4.24; 1.4.28;
Xref rdmsr(9).
 1.3 21-Aug-2010  wiz branches: 1.3.2;
Add x86 to Dt.
 1.2 21-Aug-2010  wiz Uppercase Dt argument.
 1.1 21-Aug-2010  jruoho Add x86_msr_xcall(9).
 1.3.2.2 22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.3.2.1 21-Aug-2010  uebayasi file x86_msr_xcall.9 was added on branch uebayasi-xip on 2010-10-22 09:23:11 +0000
 1.4.28.1 21-Apr-2017  bouyer Sync with HEAD
 1.4.24.1 20-Mar-2017  pgoyette Sync with HEAD

RSS XML Feed