Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Jan 2021 16:11:44 GMT
From:      Mitchell Horne <mhorne@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 0b92d1dd18c1 - main - riscv: fix kernel build
Message-ID:  <202101151611.10FGBi9Q053133@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by mhorne:

URL: https://cgit.FreeBSD.org/src/commit/?id=0b92d1dd18c148740cf00b985e8641ad1670ba87

commit 0b92d1dd18c148740cf00b985e8641ad1670ba87
Author:     Mitchell Horne <mhorne@FreeBSD.org>
AuthorDate: 2021-01-15 15:41:51 +0000
Commit:     Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2021-01-15 15:57:04 +0000

    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
---
 sys/cddl/dev/dtrace/riscv/dtrace_isa.c | 2 ++
 1 file changed, 2 insertions(+)

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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101151611.10FGBi9Q053133>