diff options
-rw-r--r-- | sys/arch/hppa/dev/clock.c | 11 | ||||
-rw-r--r-- | sys/arch/hppa/hppa/locore.S | 10 | ||||
-rw-r--r-- | sys/arch/hppa/hppa/machdep.c | 7 | ||||
-rw-r--r-- | sys/arch/hppa/include/cpu.h | 3 |
4 files changed, 19 insertions, 12 deletions
diff --git a/sys/arch/hppa/dev/clock.c b/sys/arch/hppa/dev/clock.c index e11c945c1b1..27fc71bee97 100644 --- a/sys/arch/hppa/dev/clock.c +++ b/sys/arch/hppa/dev/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.18 2003/10/05 14:13:28 mickey Exp $ */ +/* $OpenBSD: clock.c,v 1.19 2003/10/15 18:54:55 mickey Exp $ */ /* * Copyright (c) 1998,1999 Michael Shalayeff @@ -55,11 +55,14 @@ void cpu_initclocks() { - register_t __itmr; - __asm __volatile("mfctl %%cr16, %0" : "=r" (__itmr)); + extern volatile u_long cpu_itmr; + extern u_long cpu_hzticks; + u_long __itmr; + + mfctl(CR_ITMR, __itmr); cpu_itmr = __itmr; __itmr += cpu_hzticks; - __asm __volatile("mtctl %0, %%cr16" :: "r" (__itmr)); + mtctl(__itmr, CR_ITMR); } /* diff --git a/sys/arch/hppa/hppa/locore.S b/sys/arch/hppa/hppa/locore.S index 62c03b75f64..19e13dbb7ef 100644 --- a/sys/arch/hppa/hppa/locore.S +++ b/sys/arch/hppa/hppa/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.115 2003/10/05 14:13:28 mickey Exp $ */ +/* $OpenBSD: locore.S,v 1.116 2003/10/15 18:54:55 mickey Exp $ */ /* * Copyright (c) 1998-2003 Michael Shalayeff @@ -144,8 +144,12 @@ netisr .word 0 .align 16 - BSS(cpu_hzticks, 4) /* itmr ticks in one hz */ - BSS(cpu_itmr, 4) /* itmr value at the most recent clk int */ + .export cpu_hzticks, data +cpu_hzticks /* itmr ticks in one hz */ + .word 0 + .export cpu_itmr, data +cpu_itmr /* itmr value at the most recent clk int */ + .word 0 BSS(pdc_stack, 4) /* temp stack for PDC call */ BSS(emrg_stack, 4) /* stack for HPMC/TOC/PWRF */ diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c index 7d8b5d331ca..b182b6399b8 100644 --- a/sys/arch/hppa/hppa/machdep.c +++ b/sys/arch/hppa/hppa/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.115 2003/10/05 14:13:28 mickey Exp $ */ +/* $OpenBSD: machdep.c,v 1.116 2003/10/15 18:54:55 mickey Exp $ */ /* * Copyright (c) 1999-2002 Michael Shalayeff @@ -279,7 +279,7 @@ void hppa_init(start) paddr_t start; { - extern u_int cpu_hzticks; + extern u_long cpu_hzticks; extern int kernel_text; vaddr_t v, v1; int error; @@ -749,7 +749,8 @@ delay(us) void microtime(struct timeval *tv) { - u_int itmr; + extern u_long cpu_itmr; + u_long itmr; int s; s = splhigh(); diff --git a/sys/arch/hppa/include/cpu.h b/sys/arch/hppa/include/cpu.h index 94c75959e34..0fa1b4ae3af 100644 --- a/sys/arch/hppa/include/cpu.h +++ b/sys/arch/hppa/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.38 2003/10/05 14:13:28 mickey Exp $ */ +/* $OpenBSD: cpu.h,v 1.39 2003/10/15 18:54:55 mickey Exp $ */ /* * Copyright (c) 2000-2002 Michael Shalayeff @@ -139,7 +139,6 @@ extern int cpu_hvers; (((t)? pdcache : fdcache) (HPPA_SID_KERNEL,(vaddr_t)(a),(s))) extern int want_resched; -extern u_int cpu_itmr, cpu_hzticks; #define DELAY(x) delay(x) |