summaryrefslogtreecommitdiff
path: root/sys/arch/sgi
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2016-08-16 13:03:59 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2016-08-16 13:03:59 +0000
commitce91e33c4771160c690e3a7d44b50db29aa8e566 (patch)
tree722ebc03213f9839709b8abc0c91ae96eedd6871 /sys/arch/sgi
parent09dc4d0753adc0d6353b4d8be77a85ec44f431ab (diff)
Remove RM7000/RM9000-specific performance counter code. It originates
from PMON2000 and has not been enabled on OpenBSD. Suggested by and ok miod@ (after seeing a quad_t cleanup patch of mine)
Diffstat (limited to 'sys/arch/sgi')
-rw-r--r--sys/arch/sgi/sgi/machdep.c82
1 files changed, 1 insertions, 81 deletions
diff --git a/sys/arch/sgi/sgi/machdep.c b/sys/arch/sgi/sgi/machdep.c
index 069aaa1b755..100de8d242a 100644
--- a/sys/arch/sgi/sgi/machdep.c
+++ b/sys/arch/sgi/sgi/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.151 2016/03/06 19:42:27 mpi Exp $ */
+/* $OpenBSD: machdep.c,v 1.152 2016/08/16 13:03:58 visa Exp $ */
/*
* Copyright (c) 2003-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -71,10 +71,6 @@ CACHE_PROTOS(ip22)
CACHE_PROTOS(tcc)
#endif
-#ifdef CPU_RM7000
-#include <mips64/rm7000.h>
-#endif
-
#include <dev/cons.h>
#include <mips64/arcbios.h>
@@ -1012,79 +1008,3 @@ is_memory_range(paddr_t pa, psize_t len, psize_t limit)
return FALSE;
}
-
-#ifdef CPU_RM7000
-#ifdef RM7K_PERFCNTR
-/*
- * RM7000 Performance counter support.
- */
-int
-rm7k_perfcntr(cmd, arg1, arg2, arg3)
- int cmd;
- long arg1, arg2, arg3;
-{
- int result;
- quad_t cntval;
- struct proc *p = curproc;
-
-
- switch(cmd) {
- case PCNT_FNC_SELECT:
- if ((arg1 & 0xff) > PCNT_SRC_MAX ||
- (arg1 & ~(PCNT_CE|PCNT_UM|PCNT_KM|0xff)) != 0) {
- result = EINVAL;
- break;
- }
-#ifdef DEBUG
-printf("perfcnt select %x, proc %p\n", arg1, p);
-#endif
- p->p_md.md_pc_count = 0;
- p->p_md.md_pc_spill = 0;
- p->p_md.md_pc_ctrl = arg1;
- result = 0;
- break;
-
- case PCNT_FNC_READ:
- cntval = p->p_md.md_pc_count;
- cntval += (quad_t)p->p_md.md_pc_spill << 31;
- result = copyout(&cntval, (void *)arg1, sizeof(cntval));
- break;
-
- default:
-#ifdef DEBUG
-printf("perfcnt error %d\n", cmd);
-#endif
- result = -1;
- break;
- }
- return(result);
-}
-
-/*
- * Called when the performance counter d31 gets set.
- * Increase spill value and reset d31.
- */
-void
-rm7k_perfintr(trapframe)
- struct trapframe *trapframe;
-{
- struct proc *p = curproc;
-
-#ifdef DEBUG
- printf("perfintr proc %p!\n", p);
-#endif
- cp0_setperfcount(cp0_getperfcount() & 0x7fffffff);
- if (p != NULL) {
- p->p_md.md_pc_spill++;
- }
-}
-
-int
-rm7k_watchintr(trapframe)
- struct trapframe *trapframe;
-{
- return(0);
-}
-
-#endif /* RM7K_PERFCNTR */
-#endif /* CPU_RM7000 */