| 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@
|
|
|
|
|
|
| |
passed in when setting the RTC time instead of the global time_second.
ok mpi@
|
|
|
|
|
|
|
| |
and move it to the end of machdep.c. Rework the actual implementation
for te MC14818 compatible RTC into something that can be used as a todr_handle.
ok mpi@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The DST and TIMEZONE options(4) are incompatible with KARL, so we need
some other way to compensate for an RTC running with a known offset.
Enter kern.utc_offset, an offset in minutes East of UTC. TIMEZONE has
always been minutes West, but this is inconsistent with how everyone
else talks about timezones, hence the flip.
TIMEZONE has the advantage of being compiled into the binary. Our new
sysctl(2) has no such luck, so it needs to be set as early as possible
in boot, from sysctl.conf(5), so we can correct the kernel clock from
the RTC's local time to UTC before daemons like ntpd(8) and cron(8)
start. To encourage this, kern.utc_offset is made immutable after the
securelevel(7) is raised to 1.
Prompted by yasuoka@. Discussed with deraadt@, kettenis@, yasuoka@.
Additional testing by yasuoka@.
ok deraadt@, yasuoka@
|
|
|
|
|
|
|
|
|
|
| |
Back in the mid-90s these optimizations probably made sense, but
these days the compiler will produce even better code if we just
explicitly use 64-bit math and do the obvious thing.
joerg@netbsd.org even popped in on tech@ to agree.
ok guenther@
|
|
|
|
| |
ok mpi@
|
|
|
|
|
|
| |
remove the MD API.
ok guenther@, deraadt@, mpi@
|
|
|
|
|
|
| |
as it is impossoble to run an anything but a single-CPU machine with it.
ok mpi@, guenther@
|
|
|
|
| |
ok mpi@ deraadt@
|
|
|
|
|
|
|
| |
actually hangs a particular machine) to avoid reporting an error
which is common on modern machines
ok deraadt, patrick
|
|
|
|
| |
guenther@ deraadt@
|
| |
|
|
|
|
|
|
|
| |
have any direct symbols used. Tested for indirect use by compiling
amd64/i386/sparc64 kernels.
ok tedu@ deraadt@
|
|
|
|
| |
ok dlg@ mpi@ deraadt@
|
|
|
|
|
|
| |
Prevents strange hang-ups during reboot. Joint work with hshoexer@.
ok mikeb@, mlarkin@, miod@, deraadt@
|
|
|
|
|
|
|
| |
i386 disobeys the Nth commandment. Fix this. While here, make i386 and amd64
definitions of iplclock and statclock match.
ok art@, kettenis@
|
|
|
|
|
|
| |
the equivalent i386 file
ok kettenis@ deraadt@
|
|
|
|
|
|
|
| |
Dell Inspirion 4150 to wake up immediately even though RTC_EN isn't set
in the PM1 Enable register.
ok deraadt@, mlarkin@
|
| |
|
|
|
|
| |
for clock interrupts. Unbreaks amd64 in PIC mode.
|
|
|
|
|
|
|
|
|
| |
all jumbled up in the same functions. the rtc (mc chip) and clock (i8243)
startup was also mixed up. they the soft state and hardware state can
be started in the right order, and it is easy to restart just the
neccessary parts upon resume. tested in numerous cases:
(apic, pic) * (GENERIC.MP, GENERIC) * (mp, non-mp) * (i386, amd64)
ok kettenis
|
|
|
|
| |
tybollt@solace.miun.se, ok jcs
|
|
|
|
| |
Free commit ticket from miod@.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
rescinded 22 July 1999.
Checked by ian@, deraadt@ and millert@, arm portion checked by drahn@
|
|
|
|
| |
ok deraadt@
|
| |
|
|
|
|
| |
on some changes in the i386 codebase.
|
|
|
|
|
|
|
| |
done by me, niklas and others. Especially wrt. NXE support.
Still needs some polishing, especially in dmesg messages, but we're now
building kernel faster than ever.
|
|
|
|
| |
Use lsb table when calculating microtime. deraadt@ ok
|
| |
|
|
hacked by art@ from netbsd sources and then later debugged
by me into the shape where it can host itself.
no bootloader yet as needs redoing from the
recent advanced i386 sources (anyone? ;)
|