diff options
author | jhb <jhb@FreeBSD.org> | 2005-12-22 22:16:09 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2005-12-22 22:16:09 +0000 |
commit | cb0d490ebe9e4d2fdb160451bfb076856c76f155 (patch) | |
tree | 5d9826b3ac47ed5cf683fc0866e2dc25566d6a56 /sys/arm/include | |
parent | fdec22285a69d07ca0d4320e306828b89e06a8dd (diff) | |
download | FreeBSD-src-cb0d490ebe9e4d2fdb160451bfb076856c76f155.zip FreeBSD-src-cb0d490ebe9e4d2fdb160451bfb076856c76f155.tar.gz |
Tweak how the MD code calls the fooclock() methods some. Instead of
passing a pointer to an opaque clockframe structure and requiring the
MD code to supply CLKF_FOO() macros to extract needed values out of the
opaque structure, just pass the needed values directly. In practice this
means passing the pair (usermode, pc) to hardclock() and profclock() and
passing the boolean (usermode) to hardclock_cpu() and hardclock_process().
Other details:
- Axe clockframe and CLKF_FOO() macros on all architectures. Basically,
all the archs were taking a trapframe and converting it into a clockframe
one way or another. Now they can just extract the PC and usermode values
directly out of the trapframe and pass it to fooclock().
- Renamed hardclock_process() to hardclock_cpu() as the latter is more
accurate.
- On Alpha, we now run profclock() at hz (profhz == hz) rather than at
the slower stathz.
- On Alpha, for the TurboLaser machines that don't have an 8254
timecounter, call hardclock() directly. This removes an extra
conditional check from every clock interrupt on Alpha on the BSP.
There is probably room for even further pruning here by changing Alpha
to use the simplified timecounter we use on x86 with the lapic timer
since we don't get interrupts from the 8254 on Alpha anyway.
- On x86, clkintr() shouldn't ever be called now unless using_lapic_timer
is false, so add a KASSERT() to that affect and remove a condition
to slightly optimize the non-lapic case.
- Change prototypeof arm_handler_execute() so that it's first arg is a
trapframe pointer rather than a void pointer for clarity.
- Use KCOUNT macro in profclock() to lookup the kernel profiling bucket.
Tested on: alpha, amd64, arm, i386, ia64, sparc64
Reviewed by: bde (mostly)
Diffstat (limited to 'sys/arm/include')
-rw-r--r-- | sys/arm/include/cpu.h | 3 | ||||
-rw-r--r-- | sys/arm/include/frame.h | 22 |
2 files changed, 0 insertions, 25 deletions
diff --git a/sys/arm/include/cpu.h b/sys/arm/include/cpu.h index dc9ce02..f672c6a 100644 --- a/sys/arm/include/cpu.h +++ b/sys/arm/include/cpu.h @@ -29,10 +29,7 @@ get_cyclecount(void) #define CPU_MAXID 6 /* number of valid machdep ids */ -#define CLKF_USERMODE(frame) ((frame->if_spsr & PSR_MODE) == PSR_USR32_MODE) - #define TRAPF_USERMODE(frame) ((frame->tf_spsr & PSR_MODE) == PSR_USR32_MODE) -#define CLKF_PC(frame) (frame->if_pc) #define TRAPF_PC(tfp) ((tfp)->tf_pc) diff --git a/sys/arm/include/frame.h b/sys/arm/include/frame.h index 4d70c20..0a03829 100644 --- a/sys/arm/include/frame.h +++ b/sys/arm/include/frame.h @@ -137,28 +137,6 @@ typedef struct irqframe { unsigned int if_pc; } irqframe_t; -typedef struct clockframe { - unsigned int if_spsr; - unsigned int if_r0; - unsigned int if_r1; - unsigned int if_r2; - unsigned int if_r3; - unsigned int if_r4; - unsigned int if_r5; - unsigned int if_r6; - unsigned int if_r7; - unsigned int if_r8; - unsigned int if_r9; - unsigned int if_r10; - unsigned int if_r11; - unsigned int if_r12; - unsigned int if_usr_sp; - unsigned int if_usr_lr; - unsigned int if_svc_sp; - unsigned int if_svc_lr; - unsigned int if_pc; -} clockframe_t; - /* * Switch frame */ |