aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Horne <mhorne@FreeBSD.org>2021-01-15 15:41:51 +0000
committerMitchell Horne <mhorne@FreeBSD.org>2021-01-15 15:57:04 +0000
commit0b92d1dd18c148740cf00b985e8641ad1670ba87 (patch)
tree82fc52b8ae1a03f0754b51ded3d8ccbd5d139354
parent510cc421263fa807a72c9b4b8d9a4091a96d9648 (diff)
downloadsrc-0b92d1dd18c148740cf00b985e8641ad1670ba87.tar.gz
src-0b92d1dd18c148740cf00b985e8641ad1670ba87.zip
riscv: fix kernel build
A more complete fix for this function is being worked on in D28054. Fix the uninitialized variable error so that builds can at least proceed. Reported by: several
-rw-r--r--sys/cddl/dev/dtrace/riscv/dtrace_isa.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/cddl/dev/dtrace/riscv/dtrace_isa.c b/sys/cddl/dev/dtrace/riscv/dtrace_isa.c
index aab6797be9b3..f8663b5bfeab 100644
--- a/sys/cddl/dev/dtrace/riscv/dtrace_isa.c
+++ b/sys/cddl/dev/dtrace/riscv/dtrace_isa.c
@@ -122,6 +122,7 @@ dtrace_getustack_common(uint64_t *pcstack, int pcstack_limit, uintptr_t pc,
uintptr_t oldfp;
int ret;
+ oldfp = fp;
ret = 0;
flags = (volatile uint16_t *)&cpu_core[curcpu].cpuc_dtrace_flags;
@@ -157,6 +158,7 @@ dtrace_getustack_common(uint64_t *pcstack, int pcstack_limit, uintptr_t pc,
cpu_core[curcpu].cpuc_dtrace_illval = fp;
break;
}
+ oldfp = fp;
}
return (ret);