OpenBSD CVS

CVS log for src/sys/sys/systm.h


[BACK] Up to [local] / src / sys / sys

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.171 / (download) - annotate - [select for diffs], Tue May 28 12:50:23 2024 UTC (12 days, 19 hours ago) by jsg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.170: +1 -2 lines
Diff to previous 1.170 (colored)

remove maxmem extern, var removed from all archs long ago

Revision 1.170 / (download) - annotate - [select for diffs], Mon Oct 30 07:04:36 2023 UTC (7 months, 1 week ago) by claudio
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5
Changes since 1.169: +2 -2 lines
Diff to previous 1.169 (colored)

Adjust KERNEL_ASSERT_UNLOCKED() to not assert during a panic.

KERNEL_ASSERT_UNLOCKED calls _kernel_lock_held() which returns true
if panicstr || db_active which triggers this assert. Workaround this by
checking them before.

This will alter the following Syzkaller reports:
Reported-by: syzbot+169110a0815838ab5940@syzkaller.appspotmail.com
Reported-by: syzbot+3c2eced405b9de6f79c2@syzkaller.appspotmail.com

OK mpi@

Revision 1.169 / (download) - annotate - [select for diffs], Tue Oct 17 00:04:02 2023 UTC (7 months, 3 weeks ago) by cheloha
Branch: MAIN
Changes since 1.168: +3 -3 lines
Diff to previous 1.168 (colored)

clockintr: move callback-specific API behaviors to "clockrequest" namespace

The API's behavior when invoked from a callback function is impossible
to document.  Move the special behavior into a distinct namespace,
"clockrequest".

- Add a 'struct clockrequest'.  Basically a stripped-down 'struct clockintr'
  for exclusive use during clockintr_dispatch().
- In clockintr_queue, replace the "cq_shadow" clockintr with a "cq_request"
  clockrequest.  They serve the same purpose.
- CLST_SHADOW_PENDING -> CR_RESCHEDULE; different namespace, same meaning.
- CLST_IGNORE_SHADOW -> CLST_IGNORE_REQUEST; same meaning.
- Move shadow branch in clockintr_advance() to clockrequest_advance().
- clockintr_request_random() becomes clockrequest_advance_random().
- Delete dead shadow branches in clockintr_cancel(), clockintr_schedule().
- Callback functions now get a clockrequest pointer instead of a special
  clockintr pointer: update all prototypes, callers.

No functional change intended.

Revision 1.168 / (download) - annotate - [select for diffs], Wed Oct 11 15:42:44 2023 UTC (7 months, 4 weeks ago) by cheloha
Branch: MAIN
Changes since 1.167: +3 -3 lines
Diff to previous 1.167 (colored)

kernel: expand fixed clock interrupt periods to 64-bit values

Technically, all the current fixed clock interrupt periods fit within
an unsigned 32-bit value.  But 32-bit multiplication is an accident
waiting to happen.  So, expand the fixed periods for hardclock,
statclock, profclock, and roundrobin to 64-bit values.

One exception: statclock_mask remains 32-bit because random(9) yields
32-bit values.  Update the initclocks() comment to make it clear that
this is not an accident.

Revision 1.167 / (download) - annotate - [select for diffs], Thu Sep 14 20:58:51 2023 UTC (8 months, 3 weeks ago) by cheloha
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4
Changes since 1.166: +5 -2 lines
Diff to previous 1.166 (colored)

clockintr, statclock: eliminate clockintr_statclock() wrapper

- Move remaining statclock variables from kern_clockintr.c to
  kern_clock.c.  Move statclock variable initialization from
  clockintr_init() into initclocks().

- Change statclock() prototype to make it a legal clockintr
  callback function and establish the handle with statclock()
  instead clockintr_statclock().

- Merge the contents of clockintr_statclock() into statclock().
  statclock() can now reschedule itself and handles multiple
  expirations transparently.

- Make statclock_avg visible from sys/systm.h so that clockintr_cpu_init()
  can use it to advance the statclock across suspend/hibernate.

Thread: https://marc.info/?l=openbsd-tech&m=169428749720476&w=2

Revision 1.166 / (download) - annotate - [select for diffs], Thu Sep 14 19:39:47 2023 UTC (8 months, 3 weeks ago) by cheloha
Branch: MAIN
Changes since 1.165: +2 -1 lines
Diff to previous 1.165 (colored)

clockintr: replace CL_RNDSTAT with global variable statclock_is_randomized

In order to separate the statclock from the clock interrupt subsystem
we need to move all statclock state out into the broader kernel.

Start by replacing the CL_RNDSTAT flag with a new global variable,
"statclock_is_randomized", in kern_clock.c.  Update all clockintr_init()
callers to set the boolean instead of passing the flag.

Thread: https://marc.info/?l=openbsd-tech&m=169428749720476&w=2

Revision 1.165 / (download) - annotate - [select for diffs], Wed Aug 23 01:55:45 2023 UTC (9 months, 2 weeks ago) by cheloha
Branch: MAIN
Changes since 1.164: +2 -1 lines
Diff to previous 1.164 (colored)

all platforms: separate cpu_initclocks() from cpu_startclock()

To give the primary CPU an opportunity to perform clock interrupt
preparation in a machine-independent manner we need to separate the
"initialization" parts of cpu_initclocks() from the "start the clock
interrupt" parts.  Currently, cpu_initclocks() does everything all at
once, so there is no space for this MI setup.

Many platforms have more-or-less already done this separation by
implementing a separate routine named "cpu_startclock()".  This patch
promotes cpu_startclock() from de facto standard to mandatory API.

- Prototype cpu_startclock() in sys/systm.h alongside cpu_initclocks().
  The separation of responsibility between the two routines is a bit
  fuzzy but the basic guidelines are as follows:

  + cpu_initclocks() must initialize hz, stathz, and profhz, and call
    clockintr_init().

  + cpu_startclock() must call clockintr_cpu_init() and start the clock
    interrupt cycle on the calling CPU.

  These guidelines will shift in the future, but that's the way things
  stand as of *this* commit.

- In initclocks(): first call cpu_initclocks(), then do MI setup, and
  last call cpu_startclock().

- On platforms where cpu_startclock() already exists: don't call
  cpu_startclock() from cpu_initclocks() anymore.

- On platforms where cpu_startclock() doesn't yet exist: implement it.
  Usually this is as simple as dividing cpu_initclocks() in two.

Tested on amd64 (i8254, lapic), arm64, i386 (i8254, lapic), macppc,
mips64/octeon, and sparc64.  Tested on arm/armv7 (agtimer(4)) by
phessler@ and jmatthew@.  Tested on m88k/luna88k by aoyama@.  Tested
on powerpc64 by gkoehler@ and mlarkin@.  Tested on riscv64 by
jmatthew@.

Thread: https://marc.info/?l=openbsd-tech&m=169195251322149&w=2

Revision 1.164 / (download) - annotate - [select for diffs], Sat Aug 5 20:07:56 2023 UTC (10 months ago) by cheloha
Branch: MAIN
Changes since 1.163: +3 -1 lines
Diff to previous 1.163 (colored)

hardclock(9): move setitimer(2) code into itimer_update()

- Move the setitimer(2) code responsible for updating the ITIMER_VIRTUAL
  and ITIMER_PROF timers from hardclock(9) into a new clock interrupt
  routine, itimer_update().  itimer_update() is periodic and runs at the
  same frequency as the hardclock.

  + Revise itimerdecr() to run within itimer_mtx instead of entering
    and leaving it.

- Each schedstate_percpu has its own itimer_update() handle, spc_itimer.
  A new scheduler flag, SPCF_ITIMER, indicates whether spc_itimer was
  started during the last mi_switch() and needs to be stopped during the
  next mi_switch() or sched_exit().

- A new per-process flag, PS_ITIMER, indicates whether ITIMER_VIRTUAL
  and/or ITIMER_PROF are running.  Checking the flag is easier than
  entering itimer_mtx to check process.ps_timer[].  The flag is set
  and cleared in a new helper function, process_reset_itimer_flag().

- In setitimer(), call need_resched() when the state of ITIMER_VIRTUAL
  or ITIMER_PROF is changed to force an mi_switch() and update
  spc_itimer.

claudio@ notes that ITIMER_PROF could be implemented as a high-res
timer using the thread's execution time as a guide for when to
interrupt the process and assert SIGPROF.  This would probably work
really well in single-threaded processes.  ITIMER_VIRTUAL would be
more difficult to make high-res, though, as you need to exclude time
spent in the kernel.

Tested on powerpc64 by gkoehler@.  With input from claudio@.

Thread: https://marc.info/?l=openbsd-tech&m=169038818517101&w=2

ok claudio@

Revision 1.163 / (download) - annotate - [select for diffs], Fri Jul 14 07:07:08 2023 UTC (10 months, 3 weeks ago) by claudio
Branch: MAIN
Changes since 1.162: +3 -5 lines
Diff to previous 1.162 (colored)

struct sleep_state is no longer used, remove it.
Also remove the priority argument to sleep_finish() the code can use
the p_flag P_SINTR flag to know if the signal check is needed or not.
OK cheloha@ kettenis@ mpi@

Revision 1.162 / (download) - annotate - [select for diffs], Wed Jun 28 08:23:25 2023 UTC (11 months, 1 week ago) by claudio
Branch: MAIN
Changes since 1.161: +3 -3 lines
Diff to previous 1.161 (colored)

First step at removing struct sleep_state.

Pass the timeout and sleep priority not only to sleep_setup() but also
to sleep_finish(). With that sls_timeout and sls_catch can be removed
from struct sleep_state.

The timeout is now setup first thing in sleep_finish() and no longer as
last thing in sleep_setup(). This should not cause a noticeable difference
since the code run between sleep_setup() and sleep_finish() is minimal.

OK kettenis@

Revision 1.161 / (download) - annotate - [select for diffs], Tue Jan 31 15:18:56 2023 UTC (16 months, 1 week ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.160: +5 -1 lines
Diff to previous 1.160 (colored)

On systems without xonly mmu hardware-enforcement, we can still mitigate
against classic BROP with a range-checking wrapper in front of copyin() and
copyinstr() which ensures the userland source doesn't overlap the main program
text, ld.so text, signal tramp text (it's mapping is hard to distinguish
so it comes along for the ride), or libc.so text.  ld.so tells the kernel
libc.so text range with msyscall(2).  The range checking for 2-4 elements is
done without locking (because all 4 ranges are immutable!) and is inexpensive.

write(sock, &open, 400) now fails with EFAULT.  No programs have been
discovered which require reading their own text segments with a system call.

On a machine without mmu enforcement, a test program reports the following:
                  userland   kernel
ld.so             readable   unreadable
mmap xz           unreadable unreadable
mmap x            readable   readable
mmap nrx          readable   readable
mmap nwx          readable   readable
mmap xnwx         readable   readable
main              readable   unreadable
libc unmapped?    readable   unreadable
libc mapped       readable   unreadable

ok kettenis, additional help from miod

Revision 1.160 / (download) - annotate - [select for diffs], Fri Jan 6 19:10:18 2023 UTC (17 months ago) by miod
Branch: MAIN
Changes since 1.159: +1 -3 lines
Diff to previous 1.159 (colored)

Remove copystr(9), unless used internally by copy{in,out}str.

Revision 1.159 / (download) - annotate - [select for diffs], Sat Sep 3 15:29:44 2022 UTC (21 months ago) by kettenis
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.158: +2 -1 lines
Diff to previous 1.158 (colored)

Allow suspend with root on sdmmc(4).

ok deraadt@

Revision 1.158 / (download) - annotate - [select for diffs], Sat Aug 6 15:57:59 2022 UTC (22 months ago) by bluhm
Branch: MAIN
Changes since 1.157: +11 -17 lines
Diff to previous 1.157 (colored)

Clean up the netlock macros.  Merge NET_RLOCK_IN_SOFTNET and
NET_RLOCK_IN_IOCTL, which have the same implementation.  The R and
W are hard to see, call the new macro NET_LOCK_SHARED.  Rename the
opposite assertion from NET_ASSERT_WLOCKED to NET_ASSERT_LOCKED_EXCLUSIVE.
Update some outdated comments about net locking.
OK mpi@ mvs@

Revision 1.157 / (download) - annotate - [select for diffs], Tue Jul 12 17:12:31 2022 UTC (22 months, 4 weeks ago) by jca
Branch: MAIN
Changes since 1.156: +2 -1 lines
Diff to previous 1.156 (colored)

Add db_rint(), an MI interface to db_enter() copied from kdbrint() in vax code

If ddb.console is set and your serial console driver uses it, db_rint(),
lets you enter ddb(4) by typing the ESC D escape sequence.  This is
useful for drivers like sfuart(4) where the hardware doesn't have a true
BREAK mechanism.

Suggested by miod@, ok kettenis@ miod@

Revision 1.156 / (download) - annotate - [select for diffs], Tue Jul 5 15:06:16 2022 UTC (23 months ago) by visa
Branch: MAIN
Changes since 1.155: +1 -4 lines
Diff to previous 1.155 (colored)

Remove old poll/select wakeup mechanism.

Also remove unneeded seltrue() and selfalse().

OK mpi@ jsg@

Revision 1.155 / (download) - annotate - [select for diffs], Thu Dec 9 00:26:10 2021 UTC (2 years, 6 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.154: +2 -2 lines
Diff to previous 1.154 (colored)

We only have one syscall table: inline sysent/SYS_MAXSYSCALL and
SYS_syscall as the nosys() function into the MD syscall entry
routines and the SYSCALL_DEBUG support.  Adjust alpha's syscall
check to match the other archs.  Also, make sysent const to get it
into .rodata.

With that, 'struct emul' is unused: delete it and all its references

ok millert@

Revision 1.154 / (download) - annotate - [select for diffs], Wed Jun 2 00:39:25 2021 UTC (3 years ago) by cheloha
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.153: +1 -2 lines
Diff to previous 1.153 (colored)

kernel: introduce per-CPU panic(9) message buffers

Add a 512-byte buffer (ci_panicbuf) to each cpu_info struct on each
platform for use by panic(9).  The first panic on a given CPU writes
its message to this buffer.  Subsequent panics on a given CPU print
the panic message to the console but do not modify the buffer.  This
aids debugging in two cases:

- If 2+ CPUs panic simultaneously there is no risk of garbled messages
  in the panic buffer.

- If a CPU panics and then the operator causes a second panic while
  using ddb(4), the operator can still recall the first failure on
  a particular CPU.

Misc. changes to support this bigger change:

- Set panicstr atomically to identify the first CPU to reach panic().

- Tweak db_show_panic_cmd() to print all panic messages across all
  CPUs.  Prefix the first panic with an asterisk ('*').

- Prefer db_printf() to printf() during a panic if we have it.
  Apparently it disturbs less global state.

- On amd64, tweak fault() to write the local panic buffer.  This needs
  more work.

Prompted by bluhm@ and deraadt@.  Mostly written by deraadt@.
Discussed with bluhm@, deraadt@ and kettenis@.

Borne from a discussion on tech@ about making panic(9) more MP-safe:

https://marc.info/?l=openbsd-tech&m=162086462316143&w=2

ok kettenis@, visa@, bluhm@, deraadt@

Revision 1.153 / (download) - annotate - [select for diffs], Wed Apr 28 09:42:04 2021 UTC (3 years, 1 month ago) by sashan
Branch: MAIN
Changes since 1.152: +9 -1 lines
Diff to previous 1.152 (colored)

time to add NET_ASSERT_WLOCKED()

with moving towards NET_RLOCK...() we need NET_ASSERT_WLOCKED()
to check caller owns netlock exclusively.

OK @bluhm

Revision 1.152 / (download) - annotate - [select for diffs], Mon Feb 8 08:18:45 2021 UTC (3 years, 4 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.151: +3 -8 lines
Diff to previous 1.151 (colored)

Simplify sleep_setup API to two operations in preparation for splitting
the SCHED_LOCK().

Putting a thread on a sleep queue is reduce to the following:

sleep_setup();
/* check condition or release lock */
sleep_finish();

Previous version ok cheloha@, jmatthew@, ok claudio@

Revision 1.151 / (download) - annotate - [select for diffs], Mon Feb 1 15:55:07 2021 UTC (3 years, 4 months ago) by visa
Branch: MAIN
Changes since 1.150: +1 -6 lines
Diff to previous 1.150 (colored)

Remove obsolete vnode operation vector declarations.

OK bluhm@, claudio@, mpi@, semarie@

Revision 1.150 / (download) - annotate - [select for diffs], Sun Dec 27 11:38:35 2020 UTC (3 years, 5 months ago) by visa
Branch: MAIN
Changes since 1.149: +8 -1 lines
Diff to previous 1.149 (colored)

Make NET_LOCK() assertions conditional to DIAGNOSTIC

This saves about 2.5 KiB off amd64's RAMDISK after gzip compression.

OK deraadt@, mpi@, cheloha@

Revision 1.149 / (download) - annotate - [select for diffs], Thu Dec 24 01:16:14 2020 UTC (3 years, 5 months ago) by cheloha
Branch: MAIN
Changes since 1.148: +3 -1 lines
Diff to previous 1.148 (colored)

tsleep(9): add global "nowake" channel for threads avoiding wakeup(9)

It would be convenient if there were a channel a thread could sleep on
to indicate they do not want any wakeup(9) broadcasts.  The easiest way
to do this is to add an "int nowake" to kern_synch.c and extern it in
sys/systm.h.  You use it like this:

	#include <sys/systm.h>

	tsleep_nsec(&nowait, ...);

There is now no need to handroll a local dead channel, e.g.

	int chan;

	tsleep_nsec(&chan, ...);

which expands the stack.  Local dead channels will be replaced with
&nowake in later patches.

One possible problem with this "one global channel" approach is sleep
queue congestion.  If you have lots of threads sleeping on &nowake you
might slow down a wakeup(9) on a different channel that hashes into
the same queue.  Unsure how much of problem this actually is, if at all.

NetBSD and FreeBSD have a "pause" interface in the kernel that chooses
a suitable channel automatically.  To keep things simple and avoid
adding a new interface we will start with this global channel.

Discussed with mpi@, claudio@, kettenis@, and deraadt@.

Basically designed by kettenis@, who vetoed my other proposals.

Bugs caught by deraadt@, tb@, and patrick@.

Revision 1.148 / (download) - annotate - [select for diffs], Wed Aug 26 03:29:07 2020 UTC (3 years, 9 months ago) by visa
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.147: +7 -1 lines
Diff to previous 1.147 (colored)

Declare hw_{prod,serial,uuid,vendor,ver} in <sys/systm.h>.

OK deraadt@, mpi@

Revision 1.147 / (download) - annotate - [select for diffs], Fri May 29 04:42:25 2020 UTC (4 years ago) by deraadt
Branch: MAIN
Changes since 1.146: +6 -1 lines
Diff to previous 1.146 (colored)

dev/rndvar.h no longer has statistical interfaces (removed during various
conversion steps).  it only contains kernel prototypes for 4 interfaces,
all of which legitimately belong in sys/systm.h, which are already included
by all enqueue_randomness() users.

Revision 1.146 / (download) - annotate - [select for diffs], Wed May 27 11:19:29 2020 UTC (4 years ago) by mpi
Branch: MAIN
Changes since 1.145: +25 -16 lines
Diff to previous 1.145 (colored)

Document the various flavors of NET_LOCK() and rename the reader version.

Since our last concurrency mistake only ioctl(2) ans sysctl(2) code path
take the reader lock.  This is mostly for documentation purpose as long as
the softnet thread is converted back to use a read lock.

dlg@ said that comments should be good enough.

ok sashan@

Revision 1.145 / (download) - annotate - [select for diffs], Fri Mar 20 03:37:08 2020 UTC (4 years, 2 months ago) by cheloha
Branch: MAIN
CVS Tags: OPENBSD_6_7_BASE, OPENBSD_6_7
Changes since 1.144: +2 -1 lines
Diff to previous 1.144 (colored)

tsleep_nsec(9): add MAXTSLP macro, the maximum sleep duration

This macro will be useful for truncating durations below INFSLP
(UINT64_MAX) when converting from a timespec or timeval to a count
of nanoseconds before calling tsleep_nsec(9), msleep_nsec(9), or
rwsleep_nsec(9).

A relative timespec can hold many more nanoseconds than a uint64_t
can.  TIMESPEC_TO_NSEC() and TIMEVAL_TO_NSEC() check for overflow,
returning UINT64_MAX if the conversion would overflow a uint64_t.

Thus, MAXTSLP will make it easy to avoid inadvertently passing INFSLP
to tsleep_nsec(9) et al. when the caller intended to set a timeout.

The code in such a case might look something like this:

	uint64_t nsecs = MIN(TIMESPEC_TO_NSEC(&ts), MAXTSLP);

The macro may also be useful for rejecting intervals that are "too large",
e.g. for sockets with timeouts, if the timeout duration is to be stored
as a uint64_t in an object in the kernel.  The code in such a case might
look something like this:

	case SIOCTIMEOUT:
	{
		struct timeval *tv = (struct timeval *)data;
		uint64_t nsecs;

		if (tv->tv_sec < 0 || !timerisvalid(tv))
			return EINVAL;

		nsecs = TIMEVAL_TO_NSEC(tv);
		if (nsecs > MAXTSLP)
			return EOVERFLOW;

		obj.timeout = nsecs;
		break;
	}

Idea suggested by visa@.

ok visa@

Revision 1.144 / (download) - annotate - [select for diffs], Sat Nov 30 11:19:17 2019 UTC (4 years, 6 months ago) by visa
Branch: MAIN
Changes since 1.143: +2 -2 lines
Diff to previous 1.143 (colored)

Move kernel locking inside the sleep machinery. This enables calling
rwsleep(9) with PCATCH and rw_enter(9) with RW_INTR without the kernel
lock. In addition, now tsleep(9) with PCATCH should be safe to use
without the kernel lock if the sleep is purely time-based.

Tested by anton@, cheloha@, chris@
OK anton@, cheloha@

Revision 1.143 / (download) - annotate - [select for diffs], Sat Nov 2 16:56:18 2019 UTC (4 years, 7 months ago) by cheloha
Branch: MAIN
Changes since 1.142: +1 -2 lines
Diff to previous 1.142 (colored)

softclock: move softintr registration/scheduling into timeout module

softclock() is scheduled from hardclock(9) because long ago callouts were
processed from hardclock(9) directly.  The introduction of timeout(9) circa
2000 moved all callout processing into a dedicated module, but the softclock
scheduling stayed behind in hardclock(9).

We can move all the softclock() "stuff" into the timeout module to make
kern_clock.c a bit cleaner.  Neither initclocks() nor hardclock(9) need
to "know" about softclock().  The initial softclock() softintr registration
can be done from timeout_proc_init() and softclock() can be scheduled
from timeout_hardclock_update().

ok visa@

Revision 1.142 / (download) - annotate - [select for diffs], Wed Jul 3 22:39:33 2019 UTC (4 years, 11 months ago) by cheloha
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.141: +8 -1 lines
Diff to previous 1.141 (colored)

Add tsleep_nsec(9), msleep_nsec(9), and rwsleep_nsec(9).

Equivalent to their unsuffixed counterparts except that (a) they take
a timeout in terms of nanoseconds, and (b) INFSLP, aka UINT64_MAX (not
zero) indicates that a timeout should not be set.

For now, zero nanoseconds is not a strictly valid invocation: we log a
warning on DIAGNOSTIC kernels if we see such a call.  We still sleep
until the next tick in such a case, however.  In the future this could
become some sort of poll... TBD.

To facilitate conversions to these interfaces: add inline conversion
functions to sys/time.h for turning your timeout into nanoseconds.

Also do a few easy conversions for warmup and to demonstrate how
further conversions should be done.

Lots of input from mpi@ and ratchov@.  Additional input from tedu@,
deraadt@, mortimer@, millert@, and claudio@.

Partly inspired by FreeBSD r247787.

positive feedback from deraadt@, ok mpi@

Revision 1.141 / (download) - annotate - [select for diffs], Tue Apr 23 13:35:12 2019 UTC (5 years, 1 month ago) by visa
Branch: MAIN
Changes since 1.140: +3 -3 lines
Diff to previous 1.140 (colored)

Remove file name and line number output from witness(4)

Reduce code clutter by removing the file name and line number output
from witness(4). Typically it is easy enough to locate offending locks
using the stack traces that are shown in lock order conflict reports.
Tricky cases can be tracked using sysctl kern.witness.locktrace=1 .

This patch additionally removes the witness(4) wrapper for mutexes.
Now each mutex implementation has to invoke the WITNESS_*() macros
in order to utilize the checker.

Discussed with and OK dlg@, OK mpi@

Revision 1.140 / (download) - annotate - [select for diffs], Thu May 31 02:16:22 2018 UTC (6 years ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.139: +2 -1 lines
Diff to previous 1.139 (colored)

Add sleep_finish_all(), which provides the common combo of sleep_finish(),
sleep_finish_timeout(), and sleep_finish_signal() with error preferencing,
and then use it in five places.

ok mpi@

Revision 1.139 / (download) - annotate - [select for diffs], Tue Mar 20 15:45:32 2018 UTC (6 years, 2 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3
Changes since 1.138: +2 -1 lines
Diff to previous 1.138 (colored)

Do not panic from ddb(4) when a lock requirement isn't fulfilled.

Extend the logic already present for panic() to any DDB-related
operation such that if ddb(4) is entered because of a fault or
other trap it is still possible to call 'boot reboot'.

While here stop printing splassert() messages as well, to not fill
the buffer.

ok visa@, deraadt@

Revision 1.138 / (download) - annotate - [select for diffs], Thu Feb 8 09:27:44 2018 UTC (6 years, 4 months ago) by mortimer
Branch: MAIN
Changes since 1.137: +5 -1 lines
Diff to previous 1.137 (colored)

Use a temporary chacha instance to fill large randomdata sections. Avoids
grabbing the rnglock repeatedly.

ok deraadt@ djm@

Revision 1.137 / (download) - annotate - [select for diffs], Fri Jan 5 11:10:25 2018 UTC (6 years, 5 months ago) by pirofti
Branch: MAIN
Changes since 1.136: +2 -1 lines
Diff to previous 1.136 (colored)

Show uvm_fault and trace when typing show panic on a page fault'd kernel

Currently there is only support for amd64, if this change settles
I will add support for the rest of the architectures.

OK kettenis@.

Revision 1.136 / (download) - annotate - [select for diffs], Thu Dec 14 00:41:58 2017 UTC (6 years, 5 months ago) by dlg
Branch: MAIN
Changes since 1.135: +6 -1 lines
Diff to previous 1.135 (colored)

add code to provide simple wait condition handling.

this will be used to replace the bare sleep_state handling in a
bunch of places, starting with the barriers.

Revision 1.135 / (download) - annotate - [select for diffs], Mon Nov 13 14:41:46 2017 UTC (6 years, 6 months ago) by mpi
Branch: MAIN
Changes since 1.134: +4 -4 lines
Diff to previous 1.134 (colored)

Do not call splassert_fail() if splassert_ctl is <= 0.

This matches splassert(9)s behavior and prevent noise when a CPU
panic(9) and set splassert_ctl to 0.

Found the hardway by sthen@

Revision 1.134 / (download) - annotate - [select for diffs], Fri Nov 10 08:55:49 2017 UTC (6 years, 7 months ago) by mpi
Branch: MAIN
Changes since 1.133: +23 -13 lines
Diff to previous 1.133 (colored)

Introduce a reader version of the NET_LOCK().

This will be used to first allow read-only ioctl(2) to be executed while
the softnet taskq is running.  Then it will allows us to execute multiple
softnet taskq in parallel.

Tested by Hrvoje Popovski, ok kettenis@, sashan@, visa@, tb@

Revision 1.133 / (download) - annotate - [select for diffs], Fri Aug 11 21:24:20 2017 UTC (6 years, 10 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.132: +3 -5 lines
Diff to previous 1.132 (colored)

Remove NET_LOCK()'s argument.

Tested by Hrvoje Popovski, ok bluhm@

Revision 1.132 / (download) - annotate - [select for diffs], Thu Jul 27 12:08:19 2017 UTC (6 years, 10 months ago) by mpi
Branch: MAIN
Changes since 1.131: +3 -4 lines
Diff to previous 1.131 (colored)

Stop doing an splsoftnet()/splx() dance inside the NET_LOCK().

This will allow us to not carry a returned value when entering a critical
section.

ok bluhm@, visa@

Revision 1.131 / (download) - annotate - [select for diffs], Mon May 29 12:12:35 2017 UTC (7 years ago) by tedu
Branch: MAIN
Changes since 1.130: +4 -2 lines
Diff to previous 1.130 (colored)

clang has builtin_memmove. ok deraadt

Revision 1.130 / (download) - annotate - [select for diffs], Thu May 18 09:15:16 2017 UTC (7 years ago) by kettenis
Branch: MAIN
Changes since 1.129: +2 -1 lines
Diff to previous 1.129 (colored)

Add copyin32(9) prototype.

Revision 1.129 / (download) - annotate - [select for diffs], Mon May 15 12:26:00 2017 UTC (7 years ago) by mpi
Branch: MAIN
Changes since 1.128: +9 -1 lines
Diff to previous 1.128 (colored)

Enable the NET_LOCK(), take 3.

Recursions are still marked as XXXSMP.

ok deraadt@, bluhm@

Revision 1.128 / (download) - annotate - [select for diffs], Sun Apr 30 16:45:46 2017 UTC (7 years, 1 month ago) by mpi
Branch: MAIN
Changes since 1.127: +2 -2 lines
Diff to previous 1.127 (colored)

Rename Debugger() into db_enter().

Using a name with the 'db_' prefix makes it invisible from the dynamic
profiler.

ok deraadt@, kettenis@, visa@

Revision 1.127 / (download) - annotate - [select for diffs], Sun Apr 30 13:04:49 2017 UTC (7 years, 1 month ago) by mpi
Branch: MAIN
Changes since 1.126: +2 -2 lines
Diff to previous 1.126 (colored)

Unifdef KGDB.

It doesn't compile und hasn't been working during the last decade.

ok kettenis@, deraadt@

Revision 1.126 / (download) - annotate - [select for diffs], Thu Apr 20 13:20:17 2017 UTC (7 years, 1 month ago) by visa
Branch: MAIN
Changes since 1.125: +3 -3 lines
Diff to previous 1.125 (colored)

Hook up mplock to witness(4) on amd64 and i386.

Revision 1.125 / (download) - annotate - [select for diffs], Fri Mar 17 17:19:16 2017 UTC (7 years, 2 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.124: +1 -9 lines
Diff to previous 1.124 (colored)

Revert the NET_LOCK() and bring back pf's contention lock for release.

For the moment the NET_LOCK() is always taken by threads running under
KERNEL_LOCK().  That means it doesn't buy us anything except a possible
deadlock that we did not spot.  So make sure this doesn't happen, we'll
have plenty of time in the next release cycle to stress test it.

ok visa@

Revision 1.124 / (download) - annotate - [select for diffs], Tue Feb 14 09:46:21 2017 UTC (7 years, 3 months ago) by mpi
Branch: MAIN
Changes since 1.123: +2 -2 lines
Diff to previous 1.123 (colored)

Wrap the NET_LOCK() into a per-socket solock() that does nothing for
unix domain sockets.

This should prevent the multiple deadlock related to unix domain sockets.

Inputs from millert@ and bluhm@, ok bluhm@

Revision 1.123 / (download) - annotate - [select for diffs], Wed Jan 25 06:15:50 2017 UTC (7 years, 4 months ago) by mpi
Branch: MAIN
Changes since 1.122: +16 -2 lines
Diff to previous 1.122 (colored)

Enable the NET_LOCK(), take 2.

Recursions are currently known and marked a XXXSMP.

Please report any assert to bugs@

Revision 1.122 / (download) - annotate - [select for diffs], Tue Jan 24 08:09:05 2017 UTC (7 years, 4 months ago) by kettenis
Branch: MAIN
Changes since 1.121: +11 -1 lines
Diff to previous 1.121 (colored)

In preparation of compiling our kernels with -ffreestanding, explicitly map
a few performance-critical functions to compiler builtins.  Since the
builtins supported by gcc3, gcc4 and clang are not the same, there are
(unfortunately) some compiler checks to make sure we only do the mapping
for builtins that are actually supported by the compiler.

ok jca@, tom@, guenther@

Revision 1.121 / (download) - annotate - [select for diffs], Thu Dec 29 12:12:44 2016 UTC (7 years, 5 months ago) by mpi
Branch: MAIN
Changes since 1.120: +2 -10 lines
Diff to previous 1.120 (colored)

Change NET_LOCK()/NET_UNLOCK() to be simple wrappers around
splsoftnet()/splx() until the known issues are fixed.

In other words, stop using a rwlock since it creates a deadlock when
chrome is used.

Issue reported by Dimitris Papastamos and kettenis@

ok visa@

Revision 1.120 / (download) - annotate - [select for diffs], Mon Dec 19 08:36:50 2016 UTC (7 years, 5 months ago) by mpi
Branch: MAIN
Changes since 1.119: +25 -1 lines
Diff to previous 1.119 (colored)

Introduce the NET_LOCK() a rwlock used to serialize accesses to the parts
of the network stack that are not yet ready to be executed in parallel or
where new sleeping points are not possible.

This first pass replace all the entry points leading to ip_output(). This
is done to not introduce new sleeping points when trying to acquire ART's
write lock, needed when a new L2 entry is created via the RT_RESOLVE.

Inputs from and ok bluhm@, ok dlg@

Revision 1.119 / (download) - annotate - [select for diffs], Sat Sep 24 18:35:52 2016 UTC (7 years, 8 months ago) by tedu
Branch: MAIN
Changes since 1.118: +2 -1 lines
Diff to previous 1.118 (colored)

introduce hashfree() function to free hash tables, with sizes.
ok guenther

Revision 1.118 / (download) - annotate - [select for diffs], Sat Sep 17 14:56:12 2016 UTC (7 years, 8 months ago) by jasper
Branch: MAIN
Changes since 1.117: +1 -2 lines
Diff to previous 1.117 (colored)

garbage collect dead prototype

ok kettenis@ mpi@

Revision 1.117 / (download) - annotate - [select for diffs], Tue Sep 13 08:32:44 2016 UTC (7 years, 8 months ago) by mpi
Branch: MAIN
Changes since 1.116: +3 -1 lines
Diff to previous 1.116 (colored)

Introduce rwsleep(9), an equivalent to msleep(9) but for code protected
by a write lock.

ok guenther@, vgross@

Revision 1.116 / (download) - annotate - [select for diffs], Sun Sep 4 09:22:29 2016 UTC (7 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.115: +1 -5 lines
Diff to previous 1.115 (colored)

Introduce Dynamic Profiling, a ddb(4) based & gprof compatible kernel
profiling framework.

Code patching is used to enable probes when entering functions.  The
probes will call a mcount()-like function to match the behavior of a
GPROF kernel.

Currently only available on amd64 and guarded under DDBPROF.  Support
for other archs will follow soon.

A new sysctl knob, ddb.console, need to be set to 1 in securelevel 0
to be able to use this feature.

Inputs and ok guenther@

Revision 1.115 / (download) - annotate - [select for diffs], Sat Sep 3 14:46:56 2016 UTC (7 years, 9 months ago) by naddy
Branch: MAIN
Changes since 1.114: +4 -1 lines
Diff to previous 1.114 (colored)

Write the system time back to the RTC every 30 minutes.
This fixes the problem that long-running machines which were not
shut down properly would reboot with a badly offset system time.

hints and ok kettenis@

Revision 1.114 / (download) - annotate - [select for diffs], Thu Sep 1 12:50:53 2016 UTC (7 years, 9 months ago) by akfaew
Branch: MAIN
Changes since 1.113: +2 -3 lines
Diff to previous 1.113 (colored)

MPSAFE is never used, so get rid of it.

OK natano@ mpi@ guenther@

Revision 1.113 / (download) - annotate - [select for diffs], Tue May 17 23:28:03 2016 UTC (8 years ago) by bluhm
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.112: +1 -3 lines
Diff to previous 1.112 (colored)

Backout the previous fix for the sendsyslog(2) with LOG_CONS solution.
Permanently holding /dev/console open in the kernel works only until
init(8) calls revoke(2).  After that the console device vnode cannot
be used anymore.  It still resulted in a hanging init(8) if it tried
to syslog(3) something.  With the backout also dmesg -s works again.

Revision 1.112 / (download) - annotate - [select for diffs], Tue May 10 23:54:01 2016 UTC (8 years, 1 month ago) by bluhm
Branch: MAIN
Changes since 1.111: +3 -1 lines
Diff to previous 1.111 (colored)

If sendsyslog(2) is called with LOG_CONS before syslogd(8) has been
started and before init(8) has opened the console, the kernel could
crash as the console device has not been initialized.  Open
/dev/console in the kernel before starting init(8) and keep it open.
This way sendsyslog(2) can be called early in the system.
OK beck@ deraadt@

Revision 1.111 / (download) - annotate - [select for diffs], Thu Mar 24 08:57:51 2016 UTC (8 years, 2 months ago) by mpi
Branch: MAIN
Changes since 1.110: +1 -8 lines
Diff to previous 1.110 (colored)

Remove unused ``curpriority'' define.

Its description might be confusing, it was the pre-SMP parent of what
is now ``spc_curpriority'' which reflects the ``p_usrpri'' of curproc.

Revision 1.110 / (download) - annotate - [select for diffs], Tue Mar 15 04:19:26 2016 UTC (8 years, 2 months ago) by stefan
Branch: MAIN
Changes since 1.109: +1 -2 lines
Diff to previous 1.109 (colored)

Remove now unused legacy uiomovei() function.

All its callers got reviewed and converted to
use uiomove() properly.

ok deraadt@

Revision 1.109 / (download) - annotate - [select for diffs], Fri Dec 11 16:07:02 2015 UTC (8 years, 6 months ago) by mpi
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.108: +2 -8 lines
Diff to previous 1.108 (colored)

Replace mountroothook_establish(9) by config_mountroot(9) a narrower API
similar to config_defer(9).

ok mikeb@, deraadt@

Revision 1.108 / (download) - annotate - [select for diffs], Thu Jun 11 16:03:04 2015 UTC (9 years ago) by mikeb
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.107: +1 -2 lines
Diff to previous 1.107 (colored)

Move hzto(9) to the attic;  OK dlg

Revision 1.107 / (download) - annotate - [select for diffs], Tue Feb 10 21:56:10 2015 UTC (9 years, 4 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.106: +3 -2 lines
Diff to previous 1.106 (colored)

First step towards making uiomove() take a size_t size argument:
- rename uiomove() to uiomovei() and update all its users.
- introduce uiomove(), which is similar to uiomovei() but with a size_t.
- rewrite uiomovei() as an uiomove() wrapper.
ok kettenis@

Revision 1.106 / (download) - annotate - [select for diffs], Wed Dec 10 15:29:53 2014 UTC (9 years, 6 months ago) by mikeb
Branch: MAIN
Changes since 1.105: +4 -14 lines
Diff to previous 1.105 (colored)

retire shutdown hooks; ok deraadt, krw

Revision 1.105 / (download) - annotate - [select for diffs], Wed Dec 10 12:27:57 2014 UTC (9 years, 6 months ago) by mikeb
Branch: MAIN
Changes since 1.104: +2 -2 lines
Diff to previous 1.104 (colored)

Convert watchdog(4) devices to use autoconf(9) framework.

ok deraadt, tests on glxpcib and ok mpi

Revision 1.104 / (download) - annotate - [select for diffs], Tue Nov 18 18:34:50 2014 UTC (9 years, 6 months ago) by miod
Branch: MAIN
Changes since 1.103: +3 -2 lines
Diff to previous 1.103 (colored)

Add __attribute__((__bounded__)) to arc4random_buf().
ok deraadt@ tedu@

Revision 1.103 / (download) - annotate - [select for diffs], Tue Nov 18 02:37:31 2014 UTC (9 years, 6 months ago) by tedu
Branch: MAIN
Changes since 1.102: +5 -1 lines
Diff to previous 1.102 (colored)

move arc4random prototype to systm.h. more appropriate for most code
to include that than rdnvar.h. ok deraadt dlg

Revision 1.102 / (download) - annotate - [select for diffs], Thu Oct 9 04:04:27 2014 UTC (9 years, 8 months ago) by tedu
Branch: MAIN
Changes since 1.101: +1 -3 lines
Diff to previous 1.101 (colored)

remove LKM support

Revision 1.101 / (download) - annotate - [select for diffs], Sun Jul 13 15:46:21 2014 UTC (9 years, 11 months ago) by uebayasi
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.100: +6 -1 lines
Diff to previous 1.100 (colored)

KERNEL_ASSERT_LOCKED(9): Assertion for kernel lock (Rev. 3)

This adds a new assertion macro, KERNEL_ASSERT_LOCKED(), to assert that
kernel_lock is held.  In the long process of removing kernel_lock, there will
be a lot (hundreds or thousands) of use of this; virtually almost all functions
in !MP-safe subsystems should have this assertion.  Thus this assertion should
have a short, good name.

Not only that "KERNEL_ASSERT_LOCKED" is consistent with other KERNEL_* and
SCHED_ASSERT_LOCKED() macros.

Input from dlg@ guenther@ kettenis@.

OK dlg@ guenther@

Revision 1.100 / (download) - annotate - [select for diffs], Tue Jun 11 18:15:54 2013 UTC (11 years ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.99: +1 -4 lines
Diff to previous 1.99 (colored)

Replace all ovbcopy with memmove; swap the src and dst arguments too
ok otto

Revision 1.99 / (download) - annotate - [select for diffs], Wed Apr 24 17:29:02 2013 UTC (11 years, 1 month ago) by matthew
Branch: MAIN
Changes since 1.98: +3 -1 lines
Diff to previous 1.98 (colored)

Add tstohz(9) as the timespec analog to tvtohz(9).

ok miod

Revision 1.98 / (download) - annotate - [select for diffs], Sat Apr 6 03:53:25 2013 UTC (11 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.97: +1 -4 lines
Diff to previous 1.97 (colored)

shuffle around some poison code, prototypes, values...
allow some more pool debug code to be enabled if not compiled in
bump poison size back up to 64

Revision 1.97 / (download) - annotate - [select for diffs], Sat Apr 6 03:44:34 2013 UTC (11 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.96: +1 -3 lines
Diff to previous 1.96 (colored)

rthreads are always enabled. remove the sysctl.
ok deraadt guenther kettenis matthew

Revision 1.96 / (download) - annotate - [select for diffs], Thu Mar 28 16:41:39 2013 UTC (11 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.95: +4 -1 lines
Diff to previous 1.95 (colored)

separate memory poisoning code to a new file and make it usable kernel wide
ok deraadt

Revision 1.95 / (download) - annotate - [select for diffs], Sat Feb 9 20:56:35 2013 UTC (11 years, 4 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.94: +5 -3 lines
Diff to previous 1.94 (colored)

Add explicit __attribute__ ((__format__(__kprintf__)))) to the functions and
function pointer arguments which are {used as,} wrappers around the kernel
printf function.
No functional change.

Revision 1.94 / (download) - annotate - [select for diffs], Wed Oct 17 22:32:01 2012 UTC (11 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.93: +3 -2 lines
Diff to previous 1.93 (colored)

Swap arguments to wdog_register() since it is nicer, and prepare
wdog_shutdown() for external usage.

Revision 1.93 / (download) - annotate - [select for diffs], Wed Sep 26 00:09:48 2012 UTC (11 years, 8 months ago) by brad
Branch: MAIN
Changes since 1.92: +3 -3 lines
Diff to previous 1.92 (colored)

Explicitly annotate setjmp() and longjmp() (and friends) as
__returns_twice and __dead instead of depending on GCC's special
handling of these function names.

With input from kettenis@ and guenther@
Fixes a warning from clang
ok matthew@

Revision 1.92 / (download) - annotate - [select for diffs], Tue Aug 7 05:16:53 2012 UTC (11 years, 10 months ago) by guenther
Branch: MAIN
Changes since 1.91: +4 -3 lines
Diff to previous 1.91 (colored)

Move the common bits of syscall invocation and return handling into
an MI file, <sys/syscall_mi.h>, correcting inconsistencies and the
handling when copyin() of arguments fails.

Tested on i386, amd64, sparc64, and alpha (thanks naddy@)
Any issues with other platforms will be fixed in tree.

header name from millert@; ok miod@

Revision 1.91 / (download) - annotate - [select for diffs], Thu Aug 2 03:18:48 2012 UTC (11 years, 10 months ago) by guenther
Branch: MAIN
Changes since 1.90: +4 -3 lines
Diff to previous 1.90 (colored)

Apply profiling to all threads instead of just the thread that called
profil() by moving P_PROFIL from proc->p_flag to process->ps_flags with
matching adjustment in fork1() and exit1()

ok matthew@

Revision 1.90 / (download) - annotate - [select for diffs], Fri Jan 13 12:55:52 2012 UTC (12 years, 4 months ago) by jsing
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.89: +1 -0 lines
Diff to previous 1.89 (colored)

Switch back to bootduid, however remember to include sys/systm.h...

Revision 1.89 / (download) - annotate - [select for diffs], Wed Jul 6 21:41:37 2011 UTC (12 years, 11 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.88: +1 -7 lines
Diff to previous 1.88 (colored)

Clean up after P_BIGLOCK removal.
KERNEL_PROC_LOCK -> KERNEL_LOCK
KERNEL_PROC_UNLOCK -> KERNEL_UNLOCK

oga@ ok

Revision 1.88 / (download) - annotate - [select for diffs], Tue Apr 26 17:20:20 2011 UTC (13 years, 1 month ago) by jsing
Branch: MAIN
Changes since 1.87: +1 -0 lines
Diff to previous 1.87 (colored)

Allow the root device to be identified via its disklabel UID.

ok deraadt@ marco@ krw@

Revision 1.87 / (download) - annotate - [select for diffs], Mon Jan 10 23:23:56 2011 UTC (13 years, 5 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.86: +3 -1 lines
Diff to previous 1.86 (colored)

add a new function, explicit_bzero, to be used for erasing "secret" stuff.
unlike normal bzero, we guarantee that the compiler will not optimize out
calls to this function for otherwise dead variables.
to be adjusted as needed when compilers and linkers get smarter.
ok deraadt miod

Revision 1.86 / (download) - annotate - [select for diffs], Tue Sep 21 01:09:10 2010 UTC (13 years, 8 months ago) by matthew
Branch: MAIN
Changes since 1.85: +3 -1 lines
Diff to previous 1.85 (colored)

Add assertwaitok(9) to declare code paths that assume they can sleep.
Currently only checks that we're not in an interrupt context, but will
soon check that we're not holding any mutexes either.

Update malloc(9) and pool(9) to use assertwaitok(9) as appropriate.

"i like it" art@, oga@, marco@; "i see no harm" deraadt@; too trivial
for me to bother prying actual oks from people.

Revision 1.85 / (download) - annotate - [select for diffs], Tue Sep 7 16:21:47 2010 UTC (13 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.84: +1 -8 lines
Diff to previous 1.84 (colored)

remove the powerhook code.  All architectures now use the ca_activate tree
traversal code to suspend/resume
ok oga kettenis blambert

Revision 1.84 / (download) - annotate - [select for diffs], Mon Sep 6 19:20:24 2010 UTC (13 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.83: +1 -3 lines
Diff to previous 1.83 (colored)

All PWR_{SUSPEND,RESUME} can now be replaced by DVACT_{SUSPEND,RESUME}

Revision 1.83 / (download) - annotate - [select for diffs], Fri Aug 27 04:09:21 2010 UTC (13 years, 9 months ago) by deraadt
Branch: MAIN
Changes since 1.82: +3 -4 lines
Diff to previous 1.82 (colored)

kill PWR_STANDBY (apm can use PWR_SUSPEND instead).  While here, renumber
PWR_{SUSPEND,RESUME} so that they match the values of DAVCT_{SUSPEND,RESUME}
so that we can eventually (many more steps...) kill the powerhook garbage
and use the activate mechanism.
no objections

Revision 1.82 / (download) - annotate - [select for diffs], Fri Aug 20 22:03:22 2010 UTC (13 years, 9 months ago) by matthew
Branch: MAIN
Changes since 1.81: +3 -3 lines
Diff to previous 1.81 (colored)

Change hzto(9) and tvtohz(9) arguments to const pointers.

ok krw@, "of course" tedu@

Revision 1.81 / (download) - annotate - [select for diffs], Thu Jul 8 20:15:01 2010 UTC (13 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.80: +2 -1 lines
Diff to previous 1.80 (colored)

Devices which don't have read or write functionality should not return
enodev to poll, because this returns an errno of 19 in revents.  Oops.
Use seltrue where needed, and use a new selfalse function for those which
don't know if the next op will be non-blocking
Mostly discussed with guenther and miod

Revision 1.80 / (download) - annotate - [select for diffs], Tue Jun 29 00:28:14 2010 UTC (13 years, 11 months ago) by tedu
Branch: MAIN
Changes since 1.79: +3 -1 lines
Diff to previous 1.79 (colored)

Eliminate RTHREADS kernel option in favor of a sysctl.  The actual status
(not done) hasn't changed, but now it's less work to test things.
ok art deraadt

Revision 1.79 / (download) - annotate - [select for diffs], Tue Apr 20 22:05:44 2010 UTC (14 years, 1 month ago) by tedu
Branch: MAIN
Changes since 1.78: +3 -1 lines
Diff to previous 1.78 (colored)

remove proc.h include from uvm_map.h.  This has far reaching effects, as
sysctl.h was reliant on this particular include, and many drivers included
sysctl.h unnecessarily.  remove sysctl.h or add proc.h as needed.
ok deraadt

Revision 1.78 / (download) - annotate - [select for diffs], Tue Apr 6 22:26:59 2010 UTC (14 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.77: +18 -1 lines
Diff to previous 1.77 (colored)

move some of proc.h's greatest hits to systm.h, speeding up compiles.
lots of build testing by deraadt, ok/feedback deraadt guenther kettenis

Revision 1.77 / (download) - annotate - [select for diffs], Wed Nov 4 19:14:09 2009 UTC (14 years, 7 months ago) by kettenis
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.76: +2 -2 lines
Diff to previous 1.76 (colored)

Get rid of __HAVE_GENERIC_SOFT_INTERRUPTS now that all our platforms support it.

ok jsing@, miod@

Revision 1.76 / (download) - annotate - [select for diffs], Sun Apr 19 17:53:39 2009 UTC (15 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.75: +3 -2 lines
Diff to previous 1.75 (colored)

Count number of cpus found (potentially not attached) and store that
in sysctl hw.ncpufound; ok miod kettenis

Revision 1.75 / (download) - annotate - [select for diffs], Thu Nov 6 19:12:37 2008 UTC (15 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.74: +2 -2 lines
Diff to previous 1.74 (colored)

queue the mountroot hooks to be run in the same order

Revision 1.74 / (download) - annotate - [select for diffs], Fri May 16 17:45:37 2008 UTC (16 years ago) by thib
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.73: +1 -2 lines
Diff to previous 1.73 (colored)

merge vfs_opv_init into vfs_op_init and remove the former,
as they where called consecutively in vfs_init.

Revision 1.73 / (download) - annotate - [select for diffs], Tue Nov 27 18:04:01 2007 UTC (16 years, 6 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.72: +6 -1 lines
Diff to previous 1.72 (colored)

Add possibility to add flags to syscalls in syscalls.master to mark
syscalls as NOLOCK and MPSAFE. The flags have slightly different semantics:
 NOLOCK - the syscall doesn't grab any locks whatsoever.
 MPSAFE - the syscall deals with its own locking.

What this means in practice is that NOLOCK syscalls can always be done
without the biglock. The MPSAFE syscalls can be done without the biglock
on CPUs that don't handle interrupts that require biglock (to preserve
lock ordering).

deraadt@ ok

Revision 1.72 / (download) - annotate - [select for diffs], Fri Jun 1 19:25:08 2007 UTC (17 years ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.71: +2 -3 lines
Diff to previous 1.71 (colored)

some architectures called setroot() from cpu_configure(), *way* before some
subsystems were enabled.  others used a *md_diskconf -> diskconf() method to
make sure init_main could "do late setroot".  Change all architectures to
have diskconf(), use it directly & late.  tested by todd and myself on most
architectures, ok miod too

Revision 1.71 / (download) - annotate - [select for diffs], Fri May 11 10:06:56 2007 UTC (17 years, 1 month ago) by pedro
Branch: MAIN
Changes since 1.70: +4 -4 lines
Diff to previous 1.70 (colored)

Don't use LK_CANRECURSE for the kernel lock, okay miod@ art@

Revision 1.70 / (download) - annotate - [select for diffs], Thu Oct 26 13:18:24 2006 UTC (17 years, 7 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.69: +3 -3 lines
Diff to previous 1.69 (colored)

typos; from bret lambert

Revision 1.69 / (download) - annotate - [select for diffs], Thu Apr 27 02:17:21 2006 UTC (18 years, 1 month ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.68: +3 -3 lines
Diff to previous 1.68 (colored)

use the underscore variants of _BYTE_ORDER which are always defined
even when various "strict" compiler options are used
ok deraadt millert

Revision 1.68 / (download) - annotate - [select for diffs], Wed Feb 22 22:16:08 2006 UTC (18 years, 3 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.67: +1 -8 lines
Diff to previous 1.67 (colored)

Remove unused _{ins,rem}que functions - they were not even implemented on
all architectures.

Revision 1.67 / (download) - annotate - [select for diffs], Wed Dec 14 21:46:31 2005 UTC (18 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.66: +3 -1 lines
Diff to previous 1.66 (colored)

convert _FOO_SOURCE -> __FOO_VISIBLE in machine.  OK deraadt@

Revision 1.66 / (download) - annotate - [select for diffs], Fri Jan 14 04:31:33 2005 UTC (19 years, 5 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.65: +7 -4 lines
Diff to previous 1.65 (colored)

bounds checking for copystr, copyin and copyinstr;
tested by moritz@ otto@ deraadt@, ok deraadt@

Revision 1.65 / (download) - annotate - [select for diffs], Sun Nov 28 02:11:33 2004 UTC (19 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.64: +9 -2 lines
Diff to previous 1.64 (colored)

mountroothooks are called after the root filesystem is mounted.

Revision 1.64 / (download) - annotate - [select for diffs], Thu Sep 16 07:07:17 2004 UTC (19 years, 8 months ago) by grange
Branch: MAIN
Changes since 1.63: +1 -4 lines
Diff to previous 1.63 (colored)

We don't have vsprintf/sprintf in the kernel anymore, spotted
by form@pdp-11.org.ru.

ok millert@ deraadt@

Revision 1.63 / (download) - annotate - [select for diffs], Sun Jun 20 17:28:26 2004 UTC (19 years, 11 months ago) by itojun
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.62: +21 -9 lines
Diff to previous 1.62 (colored)

boundary-check memcpy and friends.  henning ok

Revision 1.62 / (download) - annotate - [select for diffs], Sun Jun 13 21:49:28 2004 UTC (20 years ago) by niklas
Branch: MAIN
Changes since 1.61: +28 -1 lines
Diff to previous 1.61 (colored)

debranch SMP, have fun

Revision 1.61 / (download) - annotate - [select for diffs], Tue Jun 8 18:09:31 2004 UTC (20 years ago) by marc
Branch: MAIN
CVS Tags: SMP_SYNC_B, SMP_SYNC_A
Changes since 1.60: +2 -1 lines
Diff to previous 1.60 (colored)

pull ncpus support from smp tree into main branch.
remove alpha specific definition of ncpus.
OK (and tested on alpha) deraadt@

Revision 1.37.2.11 / (download) - annotate - [select for diffs], Sat Jun 5 17:19:55 2004 UTC (20 years ago) by niklas
Branch: SMP
Changes since 1.37.2.10: +5 -1 lines
Diff to previous 1.37.2.10 (colored) to branchpoint 1.37 (colored) next main 1.38 (colored)

Make a few scheduling globals per-cpu, mostly NetBSD code

Revision 1.37.2.10 / (download) - annotate - [select for diffs], Thu Feb 19 11:01:34 2004 UTC (20 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.37.2.9: +12 -18 lines
Diff to previous 1.37.2.9 (colored) to branchpoint 1.37 (colored)

Merge of current from two weeks agointo the SMP branch

Revision 1.60 / (download) - annotate - [select for diffs], Mon Jan 5 00:16:56 2004 UTC (20 years, 5 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.59: +2 -2 lines
Diff to previous 1.59 (colored)

unobfuscate systm.h: use va_list for vprintf.
_BSD_VA_LIST_ explained by millert@, okay drahn@

Revision 1.59 / (download) - annotate - [select for diffs], Sat Jan 3 14:08:54 2004 UTC (20 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.58: +2 -2 lines
Diff to previous 1.58 (colored)

put an mi wrapper around stdarg.h/varargs.h. gcc3 moved stdarg/varargs macros
to built-ins, so eventually we will have one version of these files.
Special adjustments for the kernel to cope: machine/stdarg.h -> sys/stdarg.h
and machine/ansi.h needs to have a _BSD_VA_LIST_ for syslog* prototypes.
okay millert@, drahn@, miod@.

Revision 1.58 / (download) - annotate - [select for diffs], Sun Aug 24 01:27:07 2003 UTC (20 years, 9 months ago) by avsm
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.57: +9 -15 lines
Diff to previous 1.57 (colored)

sprinkle some __kprintf__ attributes around functions which use format
strings in the kernel to make gcc aware of the extra modifiers
deraadt@ ok

Revision 1.57 / (download) - annotate - [select for diffs], Mon Jul 21 22:44:49 2003 UTC (20 years, 10 months ago) by tedu
Branch: MAIN
Changes since 1.56: +2 -2 lines
Diff to previous 1.56 (colored)

remove caddr_t casts.  it's just silly to cast something when the function
takes a void *.  convert uiomove to take a void * as well.  ok deraadt@

Revision 1.37.2.9 / (download) - annotate - [select for diffs], Sat Jun 7 11:09:08 2003 UTC (21 years ago) by ho
Branch: SMP
Changes since 1.37.2.8: +3 -7 lines
Diff to previous 1.37.2.8 (colored) to branchpoint 1.37 (colored)

Sync SMP branch to -current

Revision 1.56 / (download) - annotate - [select for diffs], Mon Jun 2 23:28:22 2003 UTC (21 years ago) by millert
Branch: MAIN
Changes since 1.55: +2 -6 lines
Diff to previous 1.55 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.55 / (download) - annotate - [select for diffs], Wed May 21 16:17:37 2003 UTC (21 years ago) by art
Branch: MAIN
Changes since 1.54: +2 -2 lines
Diff to previous 1.54 (colored)

Match vprintf prototype to userland and standards.

deraadt@ ok

Revision 1.44.2.3 / (download) - annotate - [select for diffs], Mon May 19 22:32:36 2003 UTC (21 years ago) by tedu
Branch: UBC
Changes since 1.44.2.2: +3 -14 lines
Diff to previous 1.44.2.2 (colored) to branchpoint 1.44 (colored) next main 1.45 (colored)

sync

Revision 1.37.2.8 / (download) - annotate - [select for diffs], Thu May 15 04:08:03 2003 UTC (21 years, 1 month ago) by niklas
Branch: SMP
Changes since 1.37.2.7: +24 -1 lines
Diff to previous 1.37.2.7 (colored) to branchpoint 1.37 (colored)

Biglock!  Most of the logic
comes from NetBSD.
Also a lot of fixes, enough to get a dual cpu machine actually run MP for a
very short while (we are just talking about seconds) before starving out one
of the cpus.  More coming very soon.

Revision 1.37.2.7 / (download) - annotate - [select for diffs], Fri Mar 28 00:41:30 2003 UTC (21 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.37.2.6: +11 -22 lines
Diff to previous 1.37.2.6 (colored) to branchpoint 1.37 (colored)

Sync the SMP branch with 3.3

Revision 1.54 / (download) - annotate - [select for diffs], Tue Jan 21 16:59:23 2003 UTC (21 years, 4 months ago) by markus
Branch: MAIN
CVS Tags: UBC_SYNC_A, OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.53: +3 -1 lines
Diff to previous 1.53 (colored)

add kern.watchdog sysctl and generic watchdog interface;
based on feedback and discussions with mickey, henric, fgsch and jakob.
ok art@, mickey@, jakob@, henric@

Revision 1.53 / (download) - annotate - [select for diffs], Thu Jan 9 22:27:12 2003 UTC (21 years, 5 months ago) by miod
Branch: MAIN
Changes since 1.52: +1 -14 lines
Diff to previous 1.52 (colored)

Remove fetch(9) and store(9) functions from the kernel, and replace the few
remaining instances of them with appropriate copy(9) usage.

ok art@, tested on all arches unless my memory is non-ECC

Revision 1.44.2.2 / (download) - annotate - [select for diffs], Tue Oct 29 00:36:49 2002 UTC (21 years, 7 months ago) by art
Branch: UBC
Changes since 1.44.2.1: +7 -10 lines
Diff to previous 1.44.2.1 (colored) to branchpoint 1.44 (colored)

sync to -current

Revision 1.52 / (download) - annotate - [select for diffs], Fri Jul 12 13:31:20 2002 UTC (21 years, 11 months ago) by art
Branch: MAIN
CVS Tags: UBC_SYNC_B, OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.51: +7 -4 lines
Diff to previous 1.51 (colored)

- Add a flags argument to dohooks.
  The flag can be either HOOK_REMOVE or HOOK_REMOVE|HOOK_FREE.
   o HOOK_REMOVE removes the hook from the list before executing it.
   o HOOK_FREE frees the hook after that.

- Let dostartuphooks use HOOK_REMOVE|HOOK_FREE so we can reclaim the memory.

- Let doshutdownhooks use HOOK_REMOVE so that when some shutdown hook
  panics (they do that all the #@$%! time these days) we don't loop
  for ever. Don't HOOK_FREE, it doesn't matter and I don't want to add
  another possible panic condition for shutdown hooks.

- Actually free the pointer we're throwing away in hook_disestablish (I wonder
  how much memory this has leaked over the years).

Revision 1.51 / (download) - annotate - [select for diffs], Sat Jul 6 19:14:20 2002 UTC (21 years, 11 months ago) by nordin
Branch: MAIN
Changes since 1.50: +1 -7 lines
Diff to previous 1.50 (colored)

Remove kernel support for NTP. ok deraadt@ and tholo@

Revision 1.44.2.1 / (download) - annotate - [select for diffs], Tue Jun 11 03:32:34 2002 UTC (22 years ago) by art
Branch: UBC
Changes since 1.44: +102 -96 lines
Diff to previous 1.44 (colored)

Sync UBC branch to -current

Revision 1.50 / (download) - annotate - [select for diffs], Wed May 15 23:17:53 2002 UTC (22 years, 1 month ago) by art
Branch: MAIN
Changes since 1.49: +4 -1 lines
Diff to previous 1.49 (colored)

Implement splassert() for sparc - a tool for finding problems related to
spl handling (already found 3 problems).

Man page in a few seconds.
deraadt@ ok.

Revision 1.37.2.6 / (download) - annotate - [select for diffs], Thu Mar 28 14:52:02 2002 UTC (22 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.37.2.5: +97 -95 lines
Diff to previous 1.37.2.5 (colored) to branchpoint 1.37 (colored)

Merge in -current from roughly a week ago

Revision 1.49 / (download) - annotate - [select for diffs], Thu Mar 14 20:31:31 2002 UTC (22 years, 3 months ago) by mickey
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.48: +6 -3 lines
Diff to previous 1.48 (colored)

remove ambiguity in version,ostype,osversion,osrelease and their constanity, they are and declarre 'em accordingly also removing private externies of those

Revision 1.48 / (download) - annotate - [select for diffs], Thu Mar 14 03:16:12 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.47: +3 -4 lines
Diff to previous 1.47 (colored)

Final __P removal plus some cosmetic fixups

Revision 1.47 / (download) - annotate - [select for diffs], Thu Mar 14 01:27:14 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.46: +92 -92 lines
Diff to previous 1.46 (colored)

First round of __P removal in sys

Revision 1.37.2.5 / (download) - annotate - [select for diffs], Wed Mar 6 02:17:13 2002 UTC (22 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.37.2.4: +2 -1 lines
Diff to previous 1.37.2.4 (colored) to branchpoint 1.37 (colored)

Merge in trunk

Revision 1.46 / (download) - annotate - [select for diffs], Fri Feb 15 01:59:26 2002 UTC (22 years, 3 months ago) by art
Branch: MAIN
Changes since 1.45: +2 -1 lines
Diff to previous 1.45 (colored)

Add a tvtohz function. Like hzto, but doesn't subtract the current time.

Revision 1.45 / (download) - annotate - [select for diffs], Mon Feb 4 19:38:20 2002 UTC (22 years, 4 months ago) by miod
Branch: MAIN
Changes since 1.44: +2 -2 lines
Diff to previous 1.44 (colored)

Cleanup mountroot-related definitions.

Revision 1.37.2.4 / (download) - annotate - [select for diffs], Tue Nov 13 23:02:30 2001 UTC (22 years, 7 months ago) by niklas
Branch: SMP
Changes since 1.37.2.3: +1 -2 lines
Diff to previous 1.37.2.3 (colored) to branchpoint 1.37 (colored)

merge in -current

Revision 1.44 / (download) - annotate - [select for diffs], Tue Nov 6 18:41:10 2001 UTC (22 years, 7 months ago) by art
Branch: MAIN
CVS Tags: UBC_BASE
Branch point for: UBC
Changes since 1.43: +1 -2 lines
Diff to previous 1.43 (colored)

Let fork1, uvm_fork, and cpu_fork take a function/argument pair as argument,
instead of doing fork1, cpu_set_kpc. This lets us retire cpu_set_kpc and
avoid a multiprocessor race.

This commit breaks vax because it doesn't look like any other arch, someone
working on vax might want to look at this and try to adapt the code to be
more like the rest of the world.

Idea and uvm parts from NetBSD.

Revision 1.37.2.3 / (download) - annotate - [select for diffs], Wed Oct 31 03:30:30 2001 UTC (22 years, 7 months ago) by nate
Branch: SMP
Changes since 1.37.2.2: +41 -10 lines
Diff to previous 1.37.2.2 (colored) to branchpoint 1.37 (colored)

Sync the SMP branch to something just after 3.0

Revision 1.43 / (download) - annotate - [select for diffs], Sun Aug 26 04:10:56 2001 UTC (22 years, 9 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.42: +8 -2 lines
Diff to previous 1.42 (colored)

be and le varients of syscallarg; from netbsd

Revision 1.42 / (download) - annotate - [select for diffs], Thu Aug 23 08:18:59 2001 UTC (22 years, 9 months ago) by miod
Branch: MAIN
Changes since 1.41: +1 -3 lines
Diff to previous 1.41 (colored)

Remove the old timeout legacy code.

Revision 1.41 / (download) - annotate - [select for diffs], Fri Jul 27 09:55:07 2001 UTC (22 years, 10 months ago) by niklas
Branch: MAIN
Changes since 1.40: +34 -7 lines
Diff to previous 1.40 (colored)

Startup hooks.  Can be used for providing root/swap devices from device
systems which want configuration to finish late, like I2O.  Implemented via
a general hooks mechanism which the shutdown hooks have been converted to
use as well.  It even has manpages!

Revision 1.37.2.2 / (download) - annotate - [select for diffs], Wed Jul 4 11:00:35 2001 UTC (22 years, 11 months ago) by niklas
Branch: SMP
Changes since 1.37.2.1: +3 -7 lines
Diff to previous 1.37.2.1 (colored) to branchpoint 1.37 (colored)

Merge in -current from two days ago in the SMP branch.
As usual with merges, they do not indicate progress, so do not hold
your breath for working SMP, and do not mail me and ask about the
state of it.  It has not changed.  There is work ongoing, but very, very
slowly.  The commit is done in parts as to not lock up the tree in too
big chunks at a time.

Revision 1.40 / (download) - annotate - [select for diffs], Wed Jun 27 04:51:49 2001 UTC (22 years, 11 months ago) by art
Branch: MAIN
Changes since 1.39: +1 -7 lines
Diff to previous 1.39 (colored)

kill old vm

Revision 1.39 / (download) - annotate - [select for diffs], Sun Jun 24 20:53:40 2001 UTC (22 years, 11 months ago) by mickey
Branch: MAIN
Changes since 1.38: +2 -1 lines
Diff to previous 1.38 (colored)

place extern cold here; per discussion w/ art@

Revision 1.38 / (download) - annotate - [select for diffs], Sat May 5 22:34:35 2001 UTC (23 years, 1 month ago) by art
Branch: MAIN
Changes since 1.37: +2 -1 lines
Diff to previous 1.37 (colored)

Rename configure() to cpu_configure().
Move it from cpu_startup() to main().

Revision 1.37.2.1 / (download) - annotate - [select for diffs], Sun Feb 20 11:57:33 2000 UTC (24 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.37: +2 -1 lines
Diff to previous 1.37 (colored)

Merge in recent code from the trunk

Revision 1.37 / (download) - annotate - [select for diffs], Sun Jan 2 06:31:28 2000 UTC (24 years, 5 months ago) by assar
Branch: MAIN
CVS Tags: SMP_BASE, OPENBSD_2_9_BASE, OPENBSD_2_9, OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7
Branch point for: SMP
Changes since 1.36: +5 -3 lines
Diff to previous 1.36 (colored)

(sy_call_t): define a type for the functions in sysent
PR 1032

Revision 1.36 / (download) - annotate - [select for diffs], Thu Dec 2 00:23:35 1999 UTC (24 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: kame_19991208
Changes since 1.35: +5 -1 lines
Diff to previous 1.35 (colored)

snprintf in kernel; assar@stacken.kth.se

Revision 1.35 / (download) - annotate - [select for diffs], Fri Nov 12 05:58:54 1999 UTC (24 years, 7 months ago) by angelos
Branch: MAIN
Changes since 1.34: +1 -2 lines
Diff to previous 1.34 (colored)

This shouldn't have been committed with the previous commit, revert
(experimental code)

Revision 1.34 / (download) - annotate - [select for diffs], Fri Nov 12 05:56:33 1999 UTC (24 years, 7 months ago) by angelos
Branch: MAIN
Changes since 1.33: +2 -1 lines
Diff to previous 1.33 (colored)

Merge dvdio.h and cdio.h, don't use typedefs, get rid of bitfields (no
good reason to use them, not packed structures anyway).

Revision 1.33 / (download) - annotate - [select for diffs], Sun Nov 7 17:39:14 1999 UTC (24 years, 7 months ago) by provos
Branch: MAIN
Changes since 1.32: +11 -1 lines
Diff to previous 1.32 (colored)

add APM powerhooks.
from NetBSD, Sat Jun 26 08:25:25 1999 UTC by augustss:

Add powerhooks, i.e., the ability to register a function that will be
called when the machine does a suspend or resume.
XXX Will go away when Jason's kevents come to life.

Revision 1.32 / (download) - annotate - [select for diffs], Sun Sep 12 19:44:04 1999 UTC (24 years, 9 months ago) by weingart
Branch: MAIN
CVS Tags: OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.31: +2 -1 lines
Diff to previous 1.31 (colored)

Fix rootdev handling, use disk checksums to find the device we were booted
from.  Hopefully this will fix all the hangs/panics where the root device
was not found.

Revision 1.31 / (download) - annotate - [select for diffs], Wed Jul 21 21:12:51 1999 UTC (24 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.30: +4 -1 lines
Diff to previous 1.30 (colored)

proto mem*() functions

Revision 1.30 / (download) - annotate - [select for diffs], Thu May 20 12:56:40 1999 UTC (25 years ago) by aaron
Branch: MAIN
Changes since 1.29: +2 -2 lines
Diff to previous 1.29 (colored)

fix some typos; kwesterback@home.com

Revision 1.29 / (download) - annotate - [select for diffs], Thu May 6 15:33:57 1999 UTC (25 years, 1 month ago) by mickey
Branch: MAIN
Changes since 1.28: +6 -2 lines
Diff to previous 1.28 (colored)

add scdebug_{call,ret} to help SYSCALL_DEBUG compile.
remove nsysent extern declaration, since it's no longer defined anywhere,
and SYS_MAXSYSCALL is used everywhere instead.
niklas@ -- ok

Revision 1.28 / (download) - annotate - [select for diffs], Wed Apr 28 09:28:17 1999 UTC (25 years, 1 month ago) by art
Branch: MAIN
Changes since 1.27: +2 -3 lines
Diff to previous 1.27 (colored)

zap the newhashinit hack.
Add an extra flag to hashinit telling if it should wait in malloc.
update all calls to hashinit.

Revision 1.27 / (download) - annotate - [select for diffs], Fri Feb 26 03:19:57 1999 UTC (25 years, 3 months ago) by art
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5
Changes since 1.26: +7 -1 lines
Diff to previous 1.26 (colored)

uvm doesn't use nswdev or nswmap.
add prototype for kcopy (uvm)

Revision 1.26 / (download) - annotate - [select for diffs], Fri Feb 26 03:16:47 1999 UTC (25 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.25: +2 -1 lines
Diff to previous 1.25 (colored)

Add newhashinit(), which is identical to hashinit() except it takes a flags
arg for passing to malloc() (hashinit always uses M_WAITOK which is not
always what you want).  Everything that uses hashinit should really
get converted to newhashinit and then newhashinit can be renamed.

Revision 1.25 / (download) - annotate - [select for diffs], Sun Jan 10 13:34:16 1999 UTC (25 years, 5 months ago) by niklas
Branch: MAIN
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

Generalize cpu_set_kpc to take any kind of arg; mostly from NetBSD

Revision 1.24 / (download) - annotate - [select for diffs], Thu Nov 6 05:59:12 1997 UTC (26 years, 7 months ago) by csapuntz
Branch: MAIN
CVS Tags: OPENBSD_2_4_BASE, OPENBSD_2_4, OPENBSD_2_3_BASE, OPENBSD_2_3
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored)

Updates for VFS Lite 2 + soft update.

Revision 1.23 / (download) - annotate - [select for diffs], Tue Nov 4 19:17:34 1997 UTC (26 years, 7 months ago) by chuck
Branch: MAIN
Changes since 1.22: +2 -1 lines
Diff to previous 1.22 (colored)

add prototype for vprintf

Revision 1.22 / (download) - annotate - [select for diffs], Mon Oct 6 20:21:12 1997 UTC (26 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

back out vfs lite2 till after 2.2

Revision 1.21 / (download) - annotate - [select for diffs], Mon Oct 6 15:25:35 1997 UTC (26 years, 8 months ago) by csapuntz
Branch: MAIN
Changes since 1.20: +3 -3 lines
Diff to previous 1.20 (colored)

VFS Lite2 Changes

Revision 1.20 / (download) - annotate - [select for diffs], Thu Mar 6 07:05:54 1997 UTC (27 years, 3 months ago) by tholo
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.19: +4 -1 lines
Diff to previous 1.19 (colored)

Prototype hardpps() if PPS_SYNC option is present

Revision 1.19 / (download) - annotate - [select for diffs], Sat Jan 18 13:39:28 1997 UTC (27 years, 4 months ago) by mickey
Branch: MAIN
Changes since 1.18: +5 -1 lines
Diff to previous 1.18 (colored)

protect from multiple includes (required by gpl_math_emulate)

Revision 1.18 / (download) - annotate - [select for diffs], Tue Jan 14 02:25:20 1997 UTC (27 years, 5 months ago) by kstailey
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

Debugger() is needed by KGDB not just DDB

Revision 1.17 / (download) - annotate - [select for diffs], Sun Dec 8 14:25:52 1996 UTC (27 years, 6 months ago) by niklas
Branch: MAIN
Changes since 1.16: +27 -27 lines
Diff to previous 1.16 (colored)

-Wcast-qual happiness

Revision 1.16 / (download) - annotate - [select for diffs], Fri Nov 29 04:53:38 1996 UTC (27 years, 6 months ago) by kstailey
Branch: MAIN
Changes since 1.15: +1 -2 lines
Diff to previous 1.15 (colored)

back out bitmask_snprintf()

Revision 1.15 / (download) - annotate - [select for diffs], Sun Nov 24 04:30:56 1996 UTC (27 years, 6 months ago) by niklas
Branch: MAIN
Changes since 1.14: +2 -1 lines
Diff to previous 1.14 (colored)

Added bitmap_snprintf proto

Revision 1.14 / (download) - annotate - [select for diffs], Mon Nov 11 15:35:20 1996 UTC (27 years, 7 months ago) by mickey
Branch: MAIN
Changes since 1.13: +7 -1 lines
Diff to previous 1.13 (colored)

export vfs_opv_init*

Revision 1.13 / (download) - annotate - [select for diffs], Wed Nov 6 01:29:24 1996 UTC (27 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.12: +5 -1 lines
Diff to previous 1.12 (colored)

proto mountroot and friends

Revision 1.12 / (download) - annotate - [select for diffs], Tue Oct 29 08:46:27 1996 UTC (27 years, 7 months ago) by mickey
Branch: MAIN
Changes since 1.11: +3 -1 lines
Diff to previous 1.11 (colored)

-Wall happiness, especially for sparc/stand

Revision 1.11 / (download) - annotate - [select for diffs], Tue Oct 29 08:28:24 1996 UTC (27 years, 7 months ago) by mickey
Branch: MAIN
Changes since 1.10: +2 -1 lines
Diff to previous 1.10 (colored)

-Wall happiness (especially for sparc)

Revision 1.10 / (download) - annotate - [select for diffs], Sat Oct 19 10:02:45 1996 UTC (27 years, 7 months ago) by niklas
Branch: MAIN
Changes since 1.9: +3 -1 lines
Diff to previous 1.9 (colored)

__assert added, impl from netbsd, however put elsewhere. use it instead
of private versions (one even using the userland header) in if_sn.c

Revision 1.9 / (download) - annotate - [select for diffs], Thu Aug 15 13:49:48 1996 UTC (27 years, 10 months ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.8: +6 -1 lines
Diff to previous 1.8 (colored)

-Wall, -Wstrict-prototypes and some KNF cleanup

Revision 1.8 / (download) - annotate - [select for diffs], Tue Jul 23 23:54:17 1996 UTC (27 years, 10 months ago) by deraadt
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

make printf/addlog return 0, for compat to userland

Revision 1.7 / (download) - annotate - [select for diffs], Tue Jul 2 06:52:06 1996 UTC (27 years, 11 months ago) by niklas
Branch: MAIN
Changes since 1.6: +5 -1 lines
Diff to previous 1.6 (colored)

-Wall & -Wstrict-prototype fixes

Revision 1.6 / (download) - annotate - [select for diffs], Sun Jun 9 03:40:36 1996 UTC (28 years ago) by briggs
Branch: MAIN
Changes since 1.5: +5 -2 lines
Diff to previous 1.5 (colored)

Add prototype for hardupdate() ifdef NTP.

Revision 1.5 / (download) - annotate - [select for diffs], Thu May 2 13:14:59 1996 UTC (28 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.4: +9 -2 lines
Diff to previous 1.4 (colored)

proto more stuff

Revision 1.4 / (download) - annotate - [select for diffs], Sun Apr 21 22:32:04 1996 UTC (28 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.3: +23 -11 lines
Diff to previous 1.3 (colored)

partial sync with netbsd 960418, more to come

Revision 1.3 / (download) - annotate - [select for diffs], Thu Apr 18 21:41:14 1996 UTC (28 years, 1 month ago) by niklas
Branch: MAIN
Changes since 1.2: +5 -4 lines
Diff to previous 1.2 (colored)

Merge of NetBSD 960317

Revision 1.2 / (download) - annotate - [select for diffs], Thu Feb 29 13:57:30 1996 UTC (28 years, 3 months ago) by niklas
Branch: MAIN
Changes since 1.1: +24 -7 lines
Diff to previous 1.1 (colored)

From NetBSD: Merge with NetBSD 960217

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:53:30 1995 UTC (28 years, 7 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:53:30 1995 UTC (28 years, 7 months ago) by deraadt
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.