summaryrefslogtreecommitdiffstats
path: root/sys/arch/hppa/dev/clock.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* timecounting: use C99-style initialization for all timecounter structscheloha2021-02-231-2/+9
| | | | | | | | | | | | | | | | | | 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@
* Add support for timeconting in userland.pirofti2020-07-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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@
* Use the same inittodr()/resettodr() implementation as onkettenis2020-05-011-64/+39
| | | | | | | | 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@
* It's been a quarter century: we can assume volatile is present with that name.guenther2014-03-291-4/+4
| | | | ok dlg@ mpi@ deraadt@
* Check in resettodr() if inittodr() has been called, otherwise we end upjasper2011-01-091-1/+10
| | | | | | | | | | 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)
* - remove unused headers wrapped in #if defined(DDB)jasper2011-01-051-8/+1
| | | | ok jsing@ kettenis@
* Move setting cpu_hzticks to the clock initialization function, likejasper2011-01-011-1/+3
| | | | | | other ports (e.g. hppa64) do. ok jsing@ kettenis@
* ANSIfykettenis2010-08-011-6/+4
|
* Store hardware timer information per CPU.jsing2010-04-291-9/+11
| | | | ok kettenis@
* Make sure than cpu_hardclock() never sets a ``next interrupt value'' which hasmiod2009-02-081-4/+64
| | | | | | | | | | | | | | already been hit by the running timer; this happens very often on oosiop-based machines, due to these machines being among the slowest hppa, and oosiop being interrupt greedy. Unfortunately, when this happened, one had to wait for the timer to wrap, which would take up to 128 seconds on the 33MHz machines. Also, invoke hardclock() as many times as necessary if it turns out that we had to delay the interrupt 1/hz seconds to avoid the aforementioned wrap problem. With help from kettenis@; ok kettenis@
* Move hppa to __HAVE_TIMECOUNTERS.kettenis2007-07-221-7/+30
|
* update copyright; miod@ is fine w/ files where he holds it toomickey2004-04-071-14/+10
|
* typoderaadt2003-12-121-2/+2
|
* less global name space pollutionmickey2003-10-151-4/+7
|
* reload the itmr as soon as we get the intr to avoid lagging on slower machinesmickey2003-10-051-2/+6
|
* no wrapper arounf hardclock(), use CPU_CLOCKUPDATE, real microtime; miod okmickey2002-11-271-41/+2
|
* check for errors on tod pdc ops. say that bad time is before 82mickey2002-09-151-7/+11
|
* hardclock() is not called until clock has been initializedmickey2002-05-201-1/+7
|
* make resettodr() save the clock (per the pdc manual), testedmickey2002-05-141-7/+3
|
* First round of __P removal in sysmillert2002-03-141-2/+2
|
* long arg int format fix, from netbsdmickey2002-02-011-2/+2
|
* Replace inclusion of <vm/foo.h> with the correct <uvm/bar.h> when necessary.miod2001-11-061-2/+2
| | | | (Look ma, I might have broken the tree)
* some knfmickey2001-08-311-4/+4
|
* timeout-driven heartbeat.mickey2000-03-291-8/+1
| | | | | | | right thing would be to pass beat count as an argument to timeout routine (casted to (void *)) avoiding static counter, but doing timeout_set() every timeout_add() sounds kinda uncool. well, pondering in the struct timeout guts would be even more ugly.
* thinking it seems reduces heartbeat, boymickey2000-02-091-14/+7
|
* heartbeat -- yeah we have a patch for thatmickey2000-02-091-10/+12
|
* make inittodr() whine some sane thingsmickey1999-09-071-5/+22
|
* clock_intr()mickey1999-08-141-1/+32
|
* manualy assign structuresmickey1999-06-241-3/+4
|
* microtime() is moving to locore.Smickey1999-06-121-11/+1
|
* missign extern cpu_hzticksmickey1999-02-071-1/+2
|
* no microtime() yetmickey1998-12-291-0/+121