Page MenuHomeFreeBSD

sys: Remove PAE #ifdef's in drivers
Needs ReviewPublic

Authored by jhb on Mon, Oct 12, 6:31 PM.
Tags
None
Referenced Files
F176281390: D60672.diff
Sat, Oct 17, 3:27 PM
F176268872: D60672.id189650.diff
Sat, Oct 17, 1:21 PM
F176230385: D60672.id.diff
Sat, Oct 17, 4:09 AM
Unknown Object (File)
Fri, Oct 16, 3:51 PM
Unknown Object (File)
Fri, Oct 16, 3:35 PM
Unknown Object (File)
Fri, Oct 16, 2:00 PM
Unknown Object (File)
Fri, Oct 16, 1:41 PM
Unknown Object (File)
Tue, Oct 13, 2:26 PM
Subscribers

Details

Reviewers
kib
Group Reviewers
srcmgr

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 78090
Build 74973: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Mon, Oct 12, 6:31 PM
sys/dev/arcmsr/arcmsr.c
4923

Is that right on amd64 if PAE could only do 32-bits?

sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
963

Shouldn't this always be MAXADDR_48BIT?

jhb added inline comments.
sys/dev/arcmsr/arcmsr.c
4923

It's what it does now? arcmsr_build_srb() seems to handle 64-bit DMA addresses just fine. It does manually split requests that cross a 4GB boundary. I'm not sure why this ever needed the #ifdef.

sys/dev/hyperv/storvsc/hv_storvsc_drv_freebsd.c
963

Doesn't look like it, and it's what the code does today. Looks like @markj added this because BUS_SPACE_MAXADDR is only 32-bits on PAE (or was?):

commit a319ba694538a38429115aaaf1d4b3946ea3a8b5
Author: Mark Johnston <markj@FreeBSD.org>
Date:   Mon Mar 31 06:45:14 2025 -0400

    hyperv/storvsc: Fix busdma constraints
    
    - The BUS_DMA_KEEP_PG_OFFSET flag is needed, since
      storvsc_xferbuf_prepare() assumes that only the first segment may have
      a non-zero offset, and that all following segments are page-sized and
      -aligned.
    - storvsc_xferbuf_prepare() handles 64-bit bus addresses, so avoid
      unneeded bouncing on i386.
    
    PR:             285681
    Reported by:    dim
    Tested by:      dim, whu
    MFC after:      2 weeks

Seems odd though, as with PAE enabled, BUS_SPACE_MAXADDR on i386 was always 64 bits. No idea why @markj's commit did this.