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:
+1
-1
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user