git: 54a3920dc9b3 - main - hyperv/storvsc: Avoid conditional asserts in storvsc_xferbuf_prepare()

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Mon, 31 Mar 2025 11:16:15 UTC
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=54a3920dc9b3b5a47cdaaa3132b4fcf1c448a737

commit 54a3920dc9b3b5a47cdaaa3132b4fcf1c448a737
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-03-31 10:45:55 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2025-03-31 11:15:45 +0000

    hyperv/storvsc: Avoid conditional asserts in storvsc_xferbuf_prepare()
    
    whu@ cannot reproduce the assertion failure which led to these ifdefs
    being added in the first place, and since they appear wrong, i.e., the
    assertions ought to apply to all platforms, let's remove them.
    
    This reverts commits 0af5a0cd2788efce9f444f4f781357d317bb0bb1 and
    6f7b1310b6fe36f9bb653d3e97bc257adced3a2b.
    
    PR:             285681
    Tested by:      whu
    MFC after:      2 weeks
---
 sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c b/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
index cc3e7262e8d7..29a88e76a579 100644
--- a/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
+++ b/sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
@@ -1833,7 +1833,6 @@ 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 (i == 0) {
 				KASSERT((segs[i].ds_addr & PAGE_MASK) +
@@ -1853,7 +1852,6 @@ 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);
 	}