| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The timecounter struct is large and I think it may change in the
future. Changing it later will be easier if we use C99-style
initialization for all timecounter structs. It also makes reading the
code a bit easier.
For reasons I cannot explain, switching to C99-style initialization
sometimes changes the hash of the resulting object file, even though
the resulting struct should be the same. So there is a binary change
here, but only sometimes. No behavior should change in either case.
I can't compile-test this everywhere but I have been staring at the
diff for days now and I'm relatively confident this will not break
compilation. Fingers crossed.
ok gnezdo@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This diff exposes parts of clock_gettime(2) and gettimeofday(2) to
userland via libc eliberating processes from the need for a context
switch everytime they want to count the passage of time.
If a timecounter clock can be exposed to userland than it needs to set
its tc_user member to a non-zero value. Tested with one or multiple
counters per architecture.
The timing data is shared through a pointer found in the new ELF
auxiliary vector AUX_openbsd_timekeep containing timehands information
that is frequently updated by the kernel.
Timing differences between the last kernel update and the current time
are adjusted in userland by the tc_get_timecount() function inside the
MD usertc.c file.
This permits a much more responsive environment, quite visible in
browsers, office programs and gaming (apparently one is are able to fly
in Minecraft now).
Tested by robert@, sthen@, naddy@, kmos@, phessler@, and many others!
OK from at least kettenis@, cheloha@, naddy@, sthen@
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
amd64/arm64/armv7/i386/sparc64 and move it to the end of machdep.c. Rework the
actual implementation for the MC14818 compatible RTC into something that can
be used as a todr_handle just like on amd64.
ok mpi@
|
|
|
|
|
|
| |
Tested by kettenis@.
ok kettenis@
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- dynamic allocation of interrupts for dino(4) and gsc(4)
- only mention irq locators for devices which use interrupts.
- for gsc(4), this actually postpones interrupt allocation until gsc(4)
attaches, so asp(4)/lasi(4)/wax(4) won't route the interrupt yet, but
the gsc(4) child will take care of this.
- remove the irq locator for the drivers which do not need a fixed
assignment. siop and moongoose could benefit from this but don't work
at the moment so this is left as an exercize to future kernel hackers.
A side effect from this is that we do not need multiple sti(4)
attachment lines, so PCI sti(4) devices will now attach as sti0 rather
than sti2.
With this diff, multiple dino(4) devices attached to the same parent
will use different interrupt sources, and more than two dino(4) devices
can attach.
Tested on 715/75 (old-gen using asp), 715/100/XC (new-gen using lasi),
B132L+, B180L, C240, B2000, C3650.
From miod@
|
|
|
|
|
|
|
| |
The account flag `ASU' will no longer be set but that makes suser()
mpsafe since it no longer mess with a per-process field.
No objection from millert@, ok tedu@, bluhm@
|
|
|
|
|
|
| |
(probably landed in dev because it has support for this viper thing,
but i like consistency for the /dev/null parts.)
ok kettenis
|
| |
|
|
|
|
|
|
| |
similar to config_defer(9).
ok mikeb@, deraadt@
|
| |
|
|
|
|
|
|
| |
ok miod@
found by Maxime Villard / Brainy Code Scanner. thanks.
|
|
|
|
| |
ok guenther@
|
|
|
|
|
|
|
| |
- 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@
|
|
|
|
| |
ok tedu@ deraadt@
|
|
|
|
|
|
|
| |
PROT_NONE, PROT_READ, PROT_WRITE, and PROT_EXEC from mman.h.
PROT_MASK is introduced as the one true way of extracting those bits.
Remove UVM_ADV_* wrapper, using the standard names.
ok doug guenther kettenis
|
| |
|
|
|
|
| |
ok miod@
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some ports watch temperature in MD and try to shutdown system, when overheated,
by calling directly (re)boot(9). Change this to signal init(8) from kernel,
as acpi(4) and acpitz(4) do, which has been more tested. This also helps to
clarify design that ``clean shutdown must be always started by init(8)''.
Note that SIGUSR2 causes init(8) to call reboot(2) with RB_POWERDOWN, as
acpi(4) etc. already does. It is reasonable, pointed out by kettenis@,
considering system is overheated and immediate reboot may be dangerous.
OK deraadt@ miod@
|
|
|
|
| |
after discussions with beck deraadt kettenis.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I have found that some ports call boot(9) from machine-dependent code to
reboot system. These should be changed to either:
- Sending signal to init(8) to trigger it to shutdown system cleanly, like
acpi(4) does, in cases where found problems don't prevent system from working
immediately, or
- Just doing panic(9) if the situation is severely broken.
For now, just rewrite boot() to reboot(). Actual fixes follow.
Discussed with & OK from kettenis@
|
| |
|
|
|
|
| |
ok dlg@ mpi@ deraadt@
|
|
|
|
| |
This should make bus_dmamap_load(9) and bus_dmamap_unload(9) "mpsafe".
|
|
|
|
|
| |
libkern srandom() API since it is not suitable for this use.
ok kettenis miod
|
|
|
|
|
| |
resurrection of the bad idiom in the tree.
sufficient review by miod, kettenis, tedu
|
|
|
|
|
|
| |
pci configuration space accesses to allow proper recovery from failure, causing
the measure not to have any effect and the system to freeze hard.
Fixes use of pcidump -x on B1000, and probably more systems.
|
|
|
|
| |
way around.
|
|
|
|
|
|
| |
in the kernel, not only when com @ gsc is there.
ok miod@
|
|
|
|
|
|
|
|
| |
interrupts would be counted double, once for the interrupting device and
once for the device at the head of the chain. The handlers would run properly
though. Avoid this by giving each device its own interrupt counter instead
of using the counter provided by the generic interrupt handling code for the
head of the chain.
|
|
|
|
|
|
|
|
|
| |
(positive interrupt was for me), like we do on other architectures.
This is done here, at the elroy(4) driver level, since this is where shared
PCI interrupts are handled. We could do something similar for dino(4) but
this optimization is probably not very relevant there.
ok deraadt@
|
|
|
|
| |
ok matthew@ tedu@, also eyeballed by at least krw@ oga@ kettenis@ jsg@
|
|
|
|
|
|
|
| |
system LCD. Move LCD initialisation to a mountroot hook in order to avoid
PDC output after initialisation.
Committing on behalf of kettenis@
|
|
|
|
|
|
|
|
|
|
| |
resetting the clock when we don't need to. Found out with booting hppa64
kernels, and the problem also exists on hppa when booting with '-a' and hitting
'exit' when asked for the root filesystem.
help & ok jsing@
also ok kettenis@ (who suggested naming the variable like amd64/i386 to
prevent creating yet another variant of this code)
|
|
|
|
| |
ok jsing@ kettenis@
|
|
|
|
|
|
| |
another CPU.
ok miod@
|
|
|
|
|
|
| |
other ports (e.g. hppa64) do.
ok jsing@ kettenis@
|
|
|
|
| |
isn't NULL.
|
|
|
|
| |
ok kettenis@
|
|
|
|
|
|
|
| |
a physical address [more precisely, something suitable to pass to pmap_enter()'sphysical address argument].
This allows MI drivers to implement mmap() routines without having to know
about the pmap_phys_address() implementation and #ifdef obfuscation.
|
|
|
|
|
|
|
| |
given pcitag_t configuration address space. Currently, all pci controllers
will return the usual 0x100 bytes of PCI configuration space, but this will
eventually change on PCIe-capable controlers.
ok kettenis@
|
|
|
|
| |
ok krw@ kettenis@
|
|
|
|
|
|
|
| |
hierarchy. Everything attached to a single root node anyway, so at
best we had a bush.
"i think it is good" deraadt@
|
|
|
|
|
|
|
| |
Bogus chunks pointed out by matthew@ and miod@. No cookies for
marco@ and jasper@.
ok deraadt@ miod@ matthew@ jasper@ macro@
|
| |
|