Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/cddl/osnet/dev/dtrace/arm Prepare dtrace_isa.c for ...
details: https://anonhg.NetBSD.org/src/rev/1c843b463cff
branches: trunk
changeset: 327456:1c843b463cff
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Sat Mar 08 11:46:01 2014 +0000
description:
Prepare dtrace_isa.c for build
- Tidy up header file inclusions
- Replace curcpu with cpu_number()
- Fix argument of dtrace_getreg
- Tweak for gcc 4.8
Note that the file is still not buildable.
diffstat:
external/cddl/osnet/dev/dtrace/arm/dtrace_isa.c | 37 +++++++-----------------
1 files changed, 11 insertions(+), 26 deletions(-)
diffs (133 lines):
diff -r 7626cc048bfc -r 1c843b463cff external/cddl/osnet/dev/dtrace/arm/dtrace_isa.c
--- a/external/cddl/osnet/dev/dtrace/arm/dtrace_isa.c Sat Mar 08 03:20:24 2014 +0000
+++ b/external/cddl/osnet/dev/dtrace/arm/dtrace_isa.c Sat Mar 08 11:46:01 2014 +0000
@@ -30,24 +30,14 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
-#include <sys/stack.h>
-#include <sys/pcpu.h>
#include <machine/frame.h>
-#include <machine/md_var.h>
#include <machine/reg.h>
-#include <vm/vm.h>
-#include <vm/vm_param.h>
-#include <vm/pmap.h>
-
#include <machine/db_machdep.h>
-#include <machine/md_var.h>
#include <machine/vmparam.h>
-#include <machine/stack.h>
#include <ddb/db_sym.h>
#include <ddb/ddb.h>
-#include <sys/kdb.h>
#include "regset.h"
@@ -69,9 +59,11 @@
uint32_t *intrpc)
{
uint32_t *frame, *lastframe;
+#if 0
int scp_offset;
+#endif
int depth = 0;
- pc_t caller = (pc_t) solaris_cpu[curcpu].cpu_dtrace_caller;
+ pc_t caller = (pc_t) solaris_cpu[cpu_number()].cpu_dtrace_caller;
if (intrpc != 0)
pcstack[depth++] = (pc_t) intrpc;
@@ -80,7 +72,9 @@
frame = (uint32_t *)__builtin_frame_address(0);;
lastframe = NULL;
+#if 0
scp_offset = -(get_pc_str_offset() >> 2);
+#endif
while ((frame != NULL) && (depth < pcstack_limit)) {
db_addr_t scp;
@@ -178,27 +172,18 @@
dtrace_getstackdepth(int aframes)
{
uint32_t *frame, *lastframe;
- int scp_offset;
int depth = 1;
frame = (uint32_t *)__builtin_frame_address(0);;
lastframe = NULL;
- scp_offset = -(get_pc_str_offset() >> 2);
while (frame != NULL) {
- db_addr_t scp;
#if 0
uint32_t savecode;
int r;
uint32_t *rp;
#endif
- /*
- * In theory, the SCP isn't guaranteed to be in the function
- * that generated the stack frame. We hope for the best.
- */
- scp = frame[FR_SCP];
-
depth++;
/*
@@ -229,7 +214,7 @@
}
ulong_t
-dtrace_getreg(struct trapframe *rp, uint_t reg)
+dtrace_getreg(struct regs *regs, uint_t reg)
{
return (0);
@@ -241,7 +226,7 @@
if (uaddr + size > VM_MAXUSER_ADDRESS || uaddr + size < uaddr) {
DTRACE_CPUFLAG_SET(CPU_DTRACE_BADADDR);
- cpu_core[curcpu].cpuc_dtrace_illval = uaddr;
+ cpu_core[cpu_number()].cpuc_dtrace_illval = uaddr;
return (0);
}
@@ -285,7 +270,7 @@
{
if ((uintptr_t)uaddr > VM_MAXUSER_ADDRESS) {
DTRACE_CPUFLAG_SET(CPU_DTRACE_BADADDR);
- cpu_core[curcpu].cpuc_dtrace_illval = (uintptr_t)uaddr;
+ cpu_core[cpu_number()].cpuc_dtrace_illval = (uintptr_t)uaddr;
return (0);
}
return (dtrace_fuword8_nocheck(uaddr));
@@ -296,7 +281,7 @@
{
if ((uintptr_t)uaddr > VM_MAXUSER_ADDRESS) {
DTRACE_CPUFLAG_SET(CPU_DTRACE_BADADDR);
- cpu_core[curcpu].cpuc_dtrace_illval = (uintptr_t)uaddr;
+ cpu_core[cpu_number()].cpuc_dtrace_illval = (uintptr_t)uaddr;
return (0);
}
return (dtrace_fuword16_nocheck(uaddr));
@@ -307,7 +292,7 @@
{
if ((uintptr_t)uaddr > VM_MAXUSER_ADDRESS) {
DTRACE_CPUFLAG_SET(CPU_DTRACE_BADADDR);
- cpu_core[curcpu].cpuc_dtrace_illval = (uintptr_t)uaddr;
+ cpu_core[cpu_number()].cpuc_dtrace_illval = (uintptr_t)uaddr;
return (0);
}
return (dtrace_fuword32_nocheck(uaddr));
@@ -318,7 +303,7 @@
{
if ((uintptr_t)uaddr > VM_MAXUSER_ADDRESS) {
DTRACE_CPUFLAG_SET(CPU_DTRACE_BADADDR);
- cpu_core[curcpu].cpuc_dtrace_illval = (uintptr_t)uaddr;
+ cpu_core[cpu_number()].cpuc_dtrace_illval = (uintptr_t)uaddr;
return (0);
}
return (dtrace_fuword64_nocheck(uaddr));
Home |
Main Index |
Thread Index |
Old Index