summaryrefslogtreecommitdiff
path: root/sys/src/9/ppc/main.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2020-12-20 22:34:41 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2020-12-20 22:34:41 +0100
commite4ce6aadac9e1de8d5ea625e9680d24cabce0e1a (patch)
tree63c0b00f6f2c8eac29d4a0354d402206bc61397a /sys/src/9/ppc/main.c
parent08c1622b0d8de92c2650d7b0338d9abf20985827 (diff)
kernel: handle tos and per process pcycle counters in port/
we might as well handle the per process cycle counter in the portable part instead of duplicating the code in every arch and have inconsistent implementations. we now have a portable kenter() and kexit() function, that is ment to be used in trap/syscall from user, which updates the counters. some kernels missed initializing Mach.cyclefreq.
Diffstat (limited to 'sys/src/9/ppc/main.c')
-rw-r--r--sys/src/9/ppc/main.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/sys/src/9/ppc/main.c b/sys/src/9/ppc/main.c
index 1eaabe8f7..1dcd9ab22 100644
--- a/sys/src/9/ppc/main.c
+++ b/sys/src/9/ppc/main.c
@@ -186,28 +186,16 @@ void
procsetup(Proc *p)
{
p->fpstate = FPinit;
-
- cycles(&p->kentry);
- p->pcycles = -p->kentry;
}
void
procfork(Proc *p)
{
- p->kentry = up->kentry;
- p->pcycles = -p->kentry;
}
void
procrestore(Proc *p)
{
- uvlong t;
-
- if(p->kp)
- return;
- cycles(&t);
- p->pcycles -= t;
- p->kentry += t;
}
/*
@@ -216,11 +204,6 @@ procrestore(Proc *p)
void
procsave(Proc *p)
{
- uvlong t;
-
- cycles(&t);
- p->pcycles += t;
- p->kentry -= t;
if(p->fpstate == FPactive){
if(p->state != Moribund)
fpsave(up->fpsave);