HomeFreeBSD

linuxkpi: Make arch_io_*_memtype_wc amd64-only

Description

linuxkpi: Make arch_io_*_memtype_wc amd64-only

Linux only implements these functions on x86. They return 0 on other
architectures. The FreeBSD implementation calls PHYS_TO_DMAP but this
panics on i386 because it does not have a direct map so return 0 on i386
as well for now. These functions are only used by graphics/drm-*-kmod
to mark the VRAM aperture write-combining but this is also accomplished
by a call to vm_phys_fictitious_reg_range so this change is sufficient
to fix drm-*-kmod on i386 for FreeBSD 14.1.

Reviewed by: kib
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D45125

(cherry picked from commit 2ae0f5a4d0931067c672be9a791909f0e32d5a0e)

Details

Provenance
tijlAuthored on May 8 2024, 6:49 PM
Reviewer
kib
Differential Revision
D45125: linuxkpi: Make arch_io_*_memtype_wc amd64-only
Parents
rG147ea7d4092f: linuxkpi: Fix set_memory_*
Branches
Unknown
Tags
Unknown