git: 6f7b1310b6fe - main - Hyper-V: storvsc: relax a couple more kasserts
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 08 Sep 2022 04:23:14 UTC
The branch main has been updated by whu:
URL: https://cgit.FreeBSD.org/src/commit/?id=6f7b1310b6fe36f9bb653d3e97bc257adced3a2b
commit 6f7b1310b6fe36f9bb653d3e97bc257adced3a2b
Author: Wei Hu <whu@FreeBSD.org>
AuthorDate: 2022-09-08 04:19:55 +0000
Commit: Wei Hu <whu@FreeBSD.org>
CommitDate: 2022-09-08 04:22:26 +0000
Hyper-V: storvsc: relax a couple more kasserts
Seems these kasserts don't work well on ARM64
Fixes: 0af5a0cd2788e
Sponsored by: Microsoft
---
sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c b/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
index d12d6a5982f6..75e2ae924d4b 100644
--- a/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
+++ b/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
@@ -1830,17 +1830,15 @@ storvsc_xferbuf_prepare(void *arg, bus_dma_segment_t *segs, int nsegs, int error
for (i = 0; i < nsegs; i++) {
#ifdef INVARIANTS
+#if !defined(__aarch64__)
if (nsegs > 1) {
-#if defined(__amd64__)
if (i == 0) {
KASSERT((segs[i].ds_addr & PAGE_MASK) +
segs[i].ds_len == PAGE_SIZE,
("invalid 1st page, ofs 0x%jx, len %zu",
(uintmax_t)segs[i].ds_addr,
segs[i].ds_len));
- } else
-#endif
- if (i == nsegs - 1) {
+ } else if (i == nsegs - 1) {
KASSERT((segs[i].ds_addr & PAGE_MASK) == 0,
("invalid last page, ofs 0x%jx",
(uintmax_t)segs[i].ds_addr));
@@ -1852,6 +1850,7 @@ storvsc_xferbuf_prepare(void *arg, bus_dma_segment_t *segs, int nsegs, int error
segs[i].ds_len));
}
}
+#endif
#endif
prplist->gpa_page[i] = atop(segs[i].ds_addr);
}