pmap_mapdev: Consistently use vm_paddr_t for the first argument.

The devmap variants used vm_offset_t for some reason, and a few places
explicitly cast bus addresses to vm_offset_t.  (Probably those casts
along with similar casts for vm_size_t should just be removed and
instead permit the compiler to DTRT.)

Reviewed by:	markj
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D35961
This commit is contained in:
John Baldwin
2022-07-28 15:55:10 -07:00
parent 9579540144
commit ea8f128c7c
7 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -363,7 +363,7 @@ nexus_activate_resource(device_t bus, device_t child, int type, int rid,
}
rman_set_bustag(r, fdtbus_bs_tag);
#else
vaddr = (bus_space_handle_t)pmap_mapdev((vm_offset_t)paddr,
vaddr = (bus_space_handle_t)pmap_mapdev((vm_paddr_t)paddr,
(vm_size_t)psize);
if (vaddr == 0) {
rman_deactivate_resource(r);
+1 -1
View File
@@ -81,7 +81,7 @@ fsl_ocotp_devmap(void)
ocotp_size = (vm_size_t)size;
if ((ocotp_regs = pmap_mapdev((vm_offset_t)base, ocotp_size)) == NULL)
if ((ocotp_regs = pmap_mapdev((vm_paddr_t)base, ocotp_size)) == NULL)
goto fatal;
return;