aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2022-04-08 00:01:29 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2023-01-26 19:26:30 +0000
commitc7ff222d20607264516b3a31f102f965fd8159b4 (patch)
treee7eed3cd63076702a26c6db0b2c27b5fb2ed0235
parent0bf049af5a8be17a25c029622bd81791ba2157f5 (diff)
downloadsrc-c7ff222d20607264516b3a31f102f965fd8159b4.tar.gz
src-c7ff222d20607264516b3a31f102f965fd8159b4.zip
vmm amdvi: Move ctrl under #ifdef AMDVI_DEBUG_CMD.
(cherry picked from commit a7d876f7010068d93f1d9b4bb62d1370c9a0798f)
-rw-r--r--sys/amd64/vmm/amd/amdvi_hw.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/amd64/vmm/amd/amdvi_hw.c b/sys/amd64/vmm/amd/amdvi_hw.c
index 57386b6bea88..86df0ad76bf5 100644
--- a/sys/amd64/vmm/amd/amdvi_hw.c
+++ b/sys/amd64/vmm/amd/amdvi_hw.c
@@ -444,13 +444,14 @@ amdvi_inv_domain(struct amdvi_softc *softc, uint16_t domain_id)
static bool
amdvi_cmp_wait(struct amdvi_softc *softc)
{
- struct amdvi_ctrl *ctrl;
+#ifdef AMDVI_DEBUG_CMD
+ struct amdvi_ctrl *ctrl = softc->ctrl;
+#endif
const uint64_t VERIFY = 0xA5A5;
volatile uint64_t *read;
int i;
bool status;
- ctrl = softc->ctrl;
read = &softc->cmp_data;
*read = 0;
amdvi_cmd_cmp(softc, VERIFY);