From e4ce6aadac9e1de8d5ea625e9680d24cabce0e1a Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sun, 20 Dec 2020 22:34:41 +0100 Subject: 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. --- sys/src/9/omap/trap.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'sys/src/9/omap/trap.c') diff --git a/sys/src/9/omap/trap.c b/sys/src/9/omap/trap.c index e8802849e..6c8021f02 100644 --- a/sys/src/9/omap/trap.c +++ b/sys/src/9/omap/trap.c @@ -465,12 +465,7 @@ trap(Ureg *ureg) rem, up, ureg, ureg->pc); } - user = (ureg->psr & PsrMask) == PsrMusr; - if(user){ - up->dbgreg = ureg; - cycles(&up->kentry); - } - + user = kenter(ureg); /* * All interrupts/exceptions should be resumed at ureg->pc-4, * except for Data Abort which resumes at ureg->pc-8. -- cgit v1.2.3